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
// Getter(s) & Setter(s) // // // Public Methods // (alphabetical order) // // Many of these public methods are intended for use by the // BankProtocol class, which specifies how incoming requests // are handled // Adds given amount to given account, providing a general method for testing and future development.
public BankAccount addFunds(int theAcctNum, double amtToAdd) { BankAccount currentBankAccount; // find BankAccount from Bank's account -> BankAccount HashMap currentBankAccount = hashMapOfAllAccts.get(theAcctNum); if ( currentBankAccount == null) { // if no account was found, generate a generic empty account currentBankAccount = new BankAccount(); } else { // increase funds by amtToAdd currentBankAccount.increaseTotalBalance(amtToAdd); } updateBankDisplay(); return currentBankAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AccountService\n{\n /**\n * Retrieves current balance or zero if addAmount() method was not called before for specified id\n *\n * @param id balance identifier\n */\n Long getAmount(Integer id) throws Exception;\n /**\n * Increases balance or set if addAmount() method was called first time\n * @param id balance identifier\n * @param value positive or negative value, which must be added to current balance\n */\n Long addAmount(Integer id, Long value) throws Exception;\n}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount addNewAmount();", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public void deposit(double value){\r\n balance += value;\r\n}", "public int getAmount() { return this.amount; }", "public double getAmount() { return amount; }", "int getAmount();", "void setAmount(ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount amount);", "void addBalance(double amount) {\n\t\tbalance += amount;\n\t}", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "public void setAmount(double amount) {\nloanAmount = amount;\n}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount addNewCapitalPayed();", "public void credit(double amount) {\n this.balance += amount;\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();", "public void changeBalance (int amount){\n balance += amount;\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount addNewCapital();", "@Override\n\tpublic void businessMoney() {\n\n\t}", "public double getAmount() {\n return amount;\n }", "public interface AccountService {\n void deposit(Account account, double amount);\n\n void withdraw(Account account, double amount) throws NotEnoughFundsException;\n\n void transfer(Account fromAccount, Account toAccount, double amount) throws NotEnoughFundsException;\n\n\n}", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "public Amount getAmount() {\n return amount;\n }", "@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }", "long getAmount();", "public void setAmount(int moneyOption);", "private double getBalance() { return balance; }", "public void setAmount(int amount) {\n this.amount = amount;\n }", "@Override\r\npublic void checkBalance() {\n\t\r\n}", "int getMoney();", "@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}", "public double getBalance(){\n return balance;\n }", "public long getAmount();", "public long getAmount();", "public abstract String withdrawAmount(double amountToBeWithdrawn);", "public interface Account {\n\t\n//\t\n//\t\tMoney money;\n//\t\tInterestRate interestRate;\n//\t\tPeriod interestPeriod;\n\t\t\n\t\tpublic int deposit(int depositAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()+depositAmmount;\n//\t\t}\n\t\t\n\t\tpublic int withdrawl(int withdrawAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()-withdrawAmmount;\n//\t\t}\n\t\t\n\t\tpublic int getBalance();\n//\t\t{\n//\t\t\treturn money.getMoney()*interestRate.getInterestRate()*interestPeriod.getPeriod()/100;\n//\t\t}\n\t}", "public double getBalance(){\n return balance;\r\n }", "interface Transaction {\n int BALANCE = 500;\n //Storing Balance\n Object transaction(Object input);\n}", "public void incrementAmount() { amount++; }", "public void transferMoney(float amount, String transferToNumber) {}", "void addToAmount(double amount) {\n this.currentAmount += amount;\n }", "public void addMoney(int amount) {\n\t\tcurrentBalance += amount;\n\t}", "@WebMethod public void addBetMade(Account user, Bet bet, float money);", "public BigDecimal getAmount()\n {\n return amount;\n }", "public int getJackpot(){ return amount; }", "public void addJackpot(int amount){\n this.amount += amount;\n }", "@Override\n\tvoid money() {\n\t\t\n\t}", "@Override\n\tpublic void OkHereIsMoney(double amount) {\n\t\t\n\t}", "public double getBalance()\n \n {\n \n return balance;\n \n }", "public IBankTransfert payment();", "public Money getTotalBalance();", "public int amount() {\n return amount;\n }", "void payBills();", "public int getTotalAmount();", "public interface BankAccountService\n{\n BankAccount openAccount(long accountNumber, Date timeCreated);\n\n BankAccount getAccount(long accountNumber);\n\n void deposit(long accountNumber, double amount, String description, Date time);\n\n List<Transaction> getTransactions(BankAccount bankAccount, Date startTime, Date endTime);\n\n void withdraw(long testAccountNumber, double amount, String description, Date time);\n\n List<Transaction> getAllTransactions(BankAccount bankAccount);\n\n List<Transaction> getLatestTransactions(BankAccount bankAccount, int total);\n}", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "void setIncome(double amount);", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "void deposit(double amount)\n\t{\n\t\tbalance += amount;\n\t\t//what this translates to is\n\t\t// this.balance += amount;\n\t}", "public interface SendMoney {\n boolean sendMoney(Transfer transfer);\n}", "public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }", "float getAmount();", "public void setAmount(String amount) {\r\n this.amount = amount;\r\n }", "public void calculatePayment() {}", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public double getBalance(){\n return balance;\n }", "public int deposit(int amount) {\n\n balance += amount;\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return balance;\n\n }", "public Double getAmount() {\r\n return amount;\r\n }", "public double getBalance(){\n return balance;\n }", "public void setAmount(String amount) {\n this.amount = amount;\n }", "public int getBalance()\n {\n return balance;\n }", "@Override\n\tvoid deposit(double amount) {\n\t\tsuper.balance += amount - 20;\n\t}", "public void setAmount(Integer amount) {\n this.amount = amount;\n }", "public void addMoney(int amount) {\n\t\tmoney += amount;\n\t}", "public void deposit(double amount)\n {\n balance = balance + amount;\n }", "@Override\r\n\tpublic void deposit(int amount) {\n\t\t\r\n\t}", "public double getAmount () {\r\n\t\treturn amount;\r\n\t}", "public BigDecimal getAmount() {\r\n return amount;\r\n }", "public int getMoney()\n {\n return money;\n }", "public double depositInto(double amount)\r\n {\r\n _balance += amount;\r\n\r\n return _balance;\r\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public void CashPayment()\n {\n }", "public String getAmount() {\n return amount;\n }", "public String getAmount() {\n return amount;\n }", "@Test\n\tpublic void testAddMoney() {\n\t\tcard.addMoney(200);\n\t\tassertEquals(300.0, card.getBalance());\n\t}", "@ApiModelProperty(required = true, value = \"The amount to transfer from account\")\n @JsonProperty(JSON_PROPERTY_AMOUNT)\n @JsonInclude(value = JsonInclude.Include.ALWAYS)\n\n public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }" ]
[ "0.71383613", "0.7032877", "0.6949454", "0.6830787", "0.6804142", "0.6728785", "0.6717977", "0.67048836", "0.6679286", "0.6640574", "0.6601456", "0.6574257", "0.6545663", "0.65134436", "0.6473763", "0.64242876", "0.64186287", "0.6397964", "0.6393188", "0.6390304", "0.6390304", "0.6390304", "0.63899684", "0.6389351", "0.6354593", "0.6347572", "0.6343651", "0.6337521", "0.63307077", "0.632889", "0.63261217", "0.6314704", "0.6311562", "0.6311562", "0.6310219", "0.63081235", "0.6307476", "0.6303818", "0.63008034", "0.6282408", "0.6275667", "0.62658596", "0.62652564", "0.6262782", "0.62623745", "0.6251987", "0.624726", "0.6244472", "0.6223544", "0.62215155", "0.62159413", "0.6213985", "0.62128925", "0.6212191", "0.62011534", "0.61999065", "0.61999065", "0.61999065", "0.61999065", "0.61999065", "0.61999065", "0.61999065", "0.619442", "0.6194381", "0.618916", "0.61840695", "0.6179371", "0.6178054", "0.6177844", "0.6168104", "0.616325", "0.616325", "0.616325", "0.6139939", "0.6133695", "0.61222965", "0.6119024", "0.61179596", "0.61124504", "0.6111697", "0.6108249", "0.6102219", "0.6098593", "0.6096157", "0.60886323", "0.6081738", "0.6081731", "0.60791445", "0.6076368", "0.60617286", "0.60577404", "0.60577404", "0.60574037", "0.6052293", "0.6048905", "0.6048905", "0.6048905", "0.6048905", "0.6048905", "0.6048905", "0.6048905" ]
0.0
-1
Provides a way to (1) check an account to see if it has at least a certain amount of unfrozen funds, and if so, to (2) freeze that amount in funds
public boolean checkAndFreezeFunds (int secretKey, double proposedFreeze) { int theBankAccountNumber; // use AccountLink and secret key to get actual Bank Account number AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey); if ( theAccountLink != null ) { theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER(); } else { return false; } // use account number to get full BankAccount BankAccount theBankAccount = hashMapOfAllAccts.get(theBankAccountNumber); // ask BankAccount to check and (if possible) freeze the amount boolean fundsFrozen = theBankAccount.checkAndFreeze(proposedFreeze); if (fundsFrozen) { updateBankDisplay(); } return fundsFrozen; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean unfreezeFunds (int secretKey, double amtToUnfreeze) {\n\n int theBankAccountNumber;\n // use AccountLink and secret key to get actual Bank Account number\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n if ( theAccountLink != null ) {\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n return false;\n }\n // use account number to get full BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // ask BankAccount to check and (if possible) un-freeze the amount\n boolean fundsUnfrozen = theBankAccount.decreaseFreeze(amtToUnfreeze);\n\n if ( fundsUnfrozen ) {\n updateBankDisplay();\n }\n\n return fundsUnfrozen;\n }", "public void withdrawMoney(double amount, boolean checkingAccount) {\n if (checkingAccount && amount <= checkingBalance) {\n checkingBalance -= amount;\n totalBalance -= amount;\n } else if (!checkingAccount && amount <= savingsBalance) {\n savingsBalance -= amount;\n totalBalance -= amount;\n } else {\n System.out.println(\"Insufficient Funds.\");\n }\n }", "private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "boolean hasAccountBudget();", "InsufficientFunds(Account a) {\n balance = a.currentBalance();\n }", "public boolean isValidTransfer(double amount) {\n boolean amt = amount >= 0;\n boolean bal = false;\n if (amount <= this.balance + 100 && this.balance > 0) {\n bal = true;\n }\n return amt && bal && !isFreeze();\n }", "Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);", "public boolean isBenefitAvailableFor(Account account, Dining dining);", "boolean check(double amount) {\n\t\treturn (balance >= amount);\n\t}", "public boolean checkIfEnough(Account account, float amount) {\n float remaining = account.getBalance() - amount;\n if (remaining >= 0) {\n return true;\n }\n return false;\n }", "private static boolean hasFunds(double cost)\n {\n if (Clock.getRoundNum() < 200) { //TODO edit this out if necessary\n return rc.getTeamOre() > cost;\n } else {\n return rc.getTeamOre() > cost*2;\n }\n }", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "public boolean isBalanced ();", "boolean investmentIsBondListFull() throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }", "public void withdraw (double amount) throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be withdrawn\");\n }\n if (dailyMaxWithdraw != null){\n todayWithdraw += amount;\n if(todayWithdraw > dailyMaxWithdraw){\n throw new IllegalArgumentException(\"Amount entered would exceed your daily withdraw limit\");\n }\n }\n else if (amount <= balance){\n balance -= amount;\n savingTransactions[arrayLocation] = \"Withdraw from savings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n else {\n throw new InsufficientFundsException(\"Not enough money\");\n }\n }", "public int checkEND(int amount, boolean burnStun);", "protected void imposeTransactionFee ()\n {\n if (getBalance () < minimumBalance)\n super.withdraw (transactionFee);\n }", "protected boolean ensureBalance(BigInteger value)\n {\n String account = appContext.getSettingProvider().getSelectedAccount();\n\n BigInteger balance = appContext.getServiceProvider().getAccountService().getAccountBalance(account).get();\n if(balance == null)\n {\n appContext.getMessageService().showErrorMessage(\"Cannot reach the exchange service. Try again later.\");\n return false;\n }\n\n if(balance.compareTo(value) < 0)\n {\n appContext.getMessageService().showErrorMessage(\"You need at least \" + value.toString() + \" wei to do that!\");\n return false;\n }\n\n return true;\n }", "public boolean isBankrupt() {\n\t\tif (money < 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Transactional(readOnly = true)\n public boolean checkAvailableBalance(Long accountId, Double amount) {\n return getAccountBalance(accountId) < amount;\n }", "public void withdrawFromChecking(double amount) {\r\n\t\tif(amount > this.getSavingsBalance()) {\r\n\t\t\tSystem.out.println(\"Unsufficient funds\");\r\n\t\t} else {\r\n\t\t\tthis.checkingBalance -= amount;\r\n\t\t\ttotalAmount -= amount;\r\n\t\t}\r\n\t}", "public boolean getAccountHasWithdrawLimit(){\n if (currentAccount instanceof SavingAccount){\n return ((SavingAccount)currentAccount).getHasWithdrawLimit();\n \n }\n else if (currentAccount instanceof NetSavingAccount){\n return ((NetSavingAccount)currentAccount).getHasWithdrawLimit();\n }\n else if (currentAccount instanceof ChequeAccount){\n return ((ChequeAccount)currentAccount).getHasWithdrawLimit(); \n }\n else if (currentAccount instanceof FixedAccount){\n return ((FixedAccount)currentAccount).getHasWithdrawLimit();\n }\n else{\n System.out.println(\"Get Account WithdrawLimit (Bool) Account not found\");\n return false;\n }\n }", "public static boolean fundsAvailable(Map<Money, Integer> toWithdraw,\r\n\t\t\tMap<Money, Integer> count) {\r\n\t\tif (count.size() > 0) {\r\n\t\t\tfor (Map.Entry<Money, Integer> entry : toWithdraw.entrySet()) {\r\n\t\t\t\tif (!count.containsKey(entry.getKey()))\r\n\t\t\t\t\treturn false;\r\n\t\t\t\tif (count.get(entry.getKey()) < entry.getValue())\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean sendMoney(BigDecimal amount, BankAccount toAccount){\n //check if balance can cover that transfer\n if(!mIsActive || balance.compareTo(amount)<0){\n //account not active or insufficient funds\n return false;\n }\n //take out of balance\n balance = balance.subtract(amount);\n //check that the receiver received the amount\n toAccount.deposit(amount);\n //success! return true\n return true;\n }", "boolean hasBonusMoney();", "public Integer withdraw(Integer amount) {\r\n\t if (balance < amount) {\r\n\t throw new NotEnoughFundsException(amount, balance);\r\n\t }\r\n\t balance -= amount;\r\n\t return balance;\r\n\t }", "private void doWithdrawal() {\n while(true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n int amountWithdrawn = ui.readWithdrawalAmount();\n\n if(userAccount.debit(amountWithdrawn)){\n ui.displayNewBalance(userAccount);\n break;\n\n } else {\n ui.displayError(\"You do not have enough money in this account to withdraw \" + amountWithdrawn);\n }\n }catch(Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }", "boolean hasMoney();", "public int withdraw() {\n\t\tif ((acc.getBalance() - keyboard.getAmt()) > acc.getMinimumBalace()) {\r\n\t\t\tif (casher.withdraw(keyboard.getAmt()) == 1) {\r\n\t\t\t\tsetNewBalance();\r\n\t\t\t\t\r\n\t\t\t\treciept.printer(acc.getAccountNumber(), acc.getBalance(), keyboard.getAmt());\r\n\t\t\t\treturn 1;\r\n\t\t\t} else\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}", "boolean hasAmount();", "boolean hasAmount();", "public abstract boolean isBalanced();", "public boolean isBancrupt(){\r\n \treturn _budget <= 0;\r\n }", "public void withdraw (int amount) {\n if (amount >= 0) {\n balance = balance - amount;\n valueWithdrawals = valueWithdrawals + amount;\n if (balance < minimumBalance){\n minimumBalance = balance;\n }\n }\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "@Override\r\n\tpublic boolean withdraw(WithdrawBean wb, double amount) throws WalletException {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb : customerList) {\r\n\t\t\tif(cb.getPhoneNum()==wb.getPhoneNum()) {\r\n\t\t\t\tif(wb.getBalance()>amount) {\r\n\t\t\t\twb.setBalance(wb.getBalance()-amount);\r\n\t\t\t\twb.setDate(LocalDateTime.now());\r\n\t\t\t\tisValid = true;\r\n\t\t\t\tWalletTransactions transac = new WalletTransactions();\r\n\t\t\t\ttransac.setAmount(amount);\r\n\t\t\t\ttransac.setBalance(wb.getBalance());\r\n\t\t\t\ttransac.setDate(wb.getDate());\r\n\t\t\t\ttransac.setPhoneNum(wb.getPhoneNum());\r\n\t\t\t\ttransac.setType(\"withdraw\");\r\n\t\t\t\ttransacList.add(transac);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "@Override\r\n\tpublic double deductAccountMaintenanceFee() {\n\t\tif (this.getBalance() < 250.0)\r\n\t\t\treturn super.withdraw(250.0);\r\n\t\telse \r\n\t\t\treturn this.getBalance();\r\n\t\t\r\n\t}", "boolean CanBuySettlement();", "@Test\n public void noFrozenBalance() {\n UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(getContractForBandwidth(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), UnfreezeBalanceActuatorTest.dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n try {\n actuator.validate();\n actuator.execute(ret);\n TestCase.fail(\"cannot run here.\");\n } catch (ContractValidateException e) {\n Assert.assertTrue((e instanceof ContractValidateException));\n Assert.assertEquals(\"no frozenBalance(BANDWIDTH)\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse((e instanceof ContractExeException));\n }\n }", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "@Override\n public boolean deposit(Account account, BigDecimal amount) {\n return false;\n }", "boolean withdraw (int value )\n {\n if (value>balance)\n {\n return false;\n }\n else {\n balance-=value;\n return true;\n }\n }", "public boolean isPendingAcctSufficientFundsIndicator() {\n return pendingAcctSufficientFundsIndicator;\n }", "@Override\r\n\tpublic boolean fundTransfer(FundTransferBean fb, double amount) {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb1 : customerList) {\r\n\t\t\tif(cb1.getPhoneNum()== fb.getSourcePhoneNum()) {\r\n\t\t\t\tfor (CustomerBean cb2 : customerList) {\r\n\t\t\t\t\tif(cb2.getPhoneNum()==fb.getDesPhoneNum()) {\r\n\t\t\t\t\t\twithdraw(cb1,amount);\r\n\t\t\t\t\t\tdeposit(cb2,amount);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "@Override\n public void apply(Map<Integer, Account> accounts) {\n Account account = accounts.get(accountNumber);\n if (account == null) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from non-existent account \" + accountNumber\n );\n }\n\n // Make sure the account is enabled.\n if (!account.isEnabled()) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from disabled account \" + accountNumber\n );\n }\n\n // Check that the account belongs to accountHolder.\n if (!account.getAccountHolder().equals(accountHolder)) {\n throw new ViolatedConstraintException(\n \"User \\\"\" + accountHolder + \"\\\" tried to perform transaction \" +\n \"on account \" + accountNumber +\n \" which belongs to user \\\"\" + account.getAccountHolder() + \"\\\"\"\n );\n }\n\n // Compute fee based on whether it was admin initiated or not\n // and whether they are a student or not.\n int fee = (adminInitiated) ? 0 : (\n (account.isStudent()) ? Constants.STUDENT_FEE : Constants.NORMAL_FEE\n );\n\n // Check that the final balance of the account after removing the funds\n // and fee is greater than zero.\n int finalBalance = account.getBalance() - amount - fee;\n if (finalBalance < 0) {\n throw new ViolatedConstraintException(\n \"Final balance should be >= 0, got \" + finalBalance\n );\n }\n\n // If the transaction isn't admin initiated, check that the final\n // withdrawal total is less than the withdrawal limit.\n int finalWithdrawalTotal = 0;\n\n if (!adminInitiated) {\n finalWithdrawalTotal = account.getWithdrawalTotal() + amount;\n\n if (finalWithdrawalTotal > Constants.WITHDRAWAL_LIMIT) {\n throw new ViolatedConstraintException(\n \"Final withdrawal total should be <= \" + Constants.WITHDRAWAL_LIMIT +\n \", got \" + finalWithdrawalTotal\n );\n }\n }\n\n // Remove the funds and fee from the account.\n account.setBalance(finalBalance);\n\n // If the transaction isn't admin initiated update withdrawal total\n // and increment the transaction count.\n if (!adminInitiated) {\n account.setWithdrawalTotal(finalWithdrawalTotal);\n account.incrementTransactionCount();\n }\n }", "public void withdraw(double ammount) throws insufficientFunds{\n if(ammount > abal)\n throw new insufficientFunds();\n else{\n ammount = abal - ammount;\n UpdateDB();\n }\n }", "public void withdraw(double amount)\n throws InterruptedException\n {\n balanceChangeLock.lock();\n try\n {\n while (balance < amount)\n sufficientFundsCondition.await();\n System.out.print(\"Sacando \" + amount);\n double newBalance = balance - amount;\n System.out.println(\", novo saldo igual a \" + newBalance);\n balance = newBalance;\n }\n finally\n {\n balanceChangeLock.unlock();\n }\n }", "protected static Boolean withdrawCanBeMade(\n Account account,\n Integer amount,\n Transaction.TransactionType type\n ) {\n return doWithdrawCheck(account, null, null, amount, type);\n }", "public double withdraw(double withdrawalAmount) {\n\t\tdouble savingsBalance = getBalance();\n\t\tif ((savingsBalance - withdrawalAmount) >= overdraft) { // Check if balance is less than overdraft limit.\n\t\t\tsuper.withdraw(withdrawalAmount);\n\t\t}\n\t\tif ((savingsBalance - withdrawalAmount) < overdraft) {\n\t\t\tSystem.out.print(\"Cannot execute withdraw action: greater than savings withdraw limit.\\n\");\n\t\t}\n\t\treturn getBalance();\n\t}", "@Test\n\tpublic void moneyTrnasferExcetionInsufficientBalanceOfFromAccount() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account Number - \");\n\t\tsb.append(accountNumberFrom);\n\t\tsb.append(\" do not have sufficient amout to transfer.\");\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "public boolean transferMoney(Account fromAcct, Account toAcct, DollarAmount amount,\n long timeout, TimeUnit unit)\n throws DollarAmount.InsufficientFundsException, InterruptedException {\n long stopTime = System.nanoTime() + unit.toNanos(timeout);\n\n for (; ; ) {\n if (fromAcct.lock.tryLock()) {\n try {\n if (toAcct.lock.tryLock()) {\n try {\n if (fromAcct.getBalance().compareTo(amount) < 0) {\n throw new DollarAmount.InsufficientFundsException();\n } else {\n fromAcct.debit(amount);\n toAcct.credit(amount);\n return true;\n }\n } finally {\n toAcct.lock.unlock();\n }\n }\n } finally {\n fromAcct.lock.unlock();\n }\n }\n\n if (System.nanoTime() > stopTime)\n return false;\n\n// TimeUnit.NANOSECONDS.sleep(fixedDelay + rnd.nextLong() % randMod);\n }\n }", "void withdraw(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Withdrawing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (check(amount)) {\n\t\t\tbalance -= amount;\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" successfully.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" unsuccessfully. Do not have enough available funds.\");\n\t\t}\n\t}", "private void doCheckBalance() {\n while (true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n ui.displayMessage(\"Balance: \" + userAccount.getBalance());\n break;\n } catch (Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }", "public Masary_Error CheckBillType(String BTC, double CusAmount, String CustId, double serv_balance, double masry_balance, double billamount, double fees, Main_Provider provider, double deductedAmount) {\n Masary_Error Status = new Masary_Error();\n try {\n Masary_Bill_Type bill_type = MasaryManager.getInstance().getBTC(BTC);\n double trunccusamount = Math.floor(CusAmount);\n// double deductedAmount = MasaryManager.getInstance().GetDeductedAmount(Integer.parseInt(CustId), Integer.parseInt(BTC), CusAmount, provider.getPROVIDER_ID());\n if ((deductedAmount > serv_balance) || deductedAmount == -1) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-501\", provider);\n } else if (!bill_type.isIS_PART_ACC() && CusAmount < billamount) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-502\", provider);\n } else if (!bill_type.isIS_OVER_ACC() && CusAmount > billamount && billamount != 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-503\", provider);\n } else if (!bill_type.isIS_ADV_ACC() && billamount == 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-504\", provider);\n } else if (!bill_type.isIS_FRAC_ACC() && (CusAmount - trunccusamount) > 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-505\", provider);\n } else if ((CusAmount > masry_balance) || deductedAmount == -2 || deductedAmount == -3 || deductedAmount == -4) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-506\", provider);\n } else {\n Status = MasaryManager.getInstance().GETMasary_Error(\"200\", provider);\n }\n } catch (Exception ex) {\n\n MasaryManager.logger.error(\"Exception \" + ex.getMessage(), ex);\n }\n\n return Status;\n }", "protected boolean canBeBought(@NotNull AmmoAmountUncapped funds){\n for (AmmoColor i: AmmoColor.values()){\n if (getAmounts().get(i)>funds.getAmounts().get(i)){\n return false;\n }\n }\n return true;\n }", "boolean isFrozen();", "boolean isFrozen();", "public boolean canWithdraw(double withdrawalAmount){\n double potentialAmountOwed = withdrawalAmount + Math.abs(super.getCurrentBalance());\n if(potentialAmountOwed < creditLine) return true;\n \n return false;\n }", "private void CustomerPaidCheck() {\n\t\tfloat CompanyDemand = Float.parseFloat(label_7.getText());\n\t\tif (CompanyDemand > 0) {\n\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t\t.prepareStatement(\"update customer_list set `Check` = 0 where Name = '\"\n\t\t\t\t\t\t\t\t+ name + \"'And Last_Name = '\" + lastName + \"' \");\n\t\t\t\tstatement.execute();\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} else {\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t\t.prepareStatement(\"update customer_list set `Check` = 1 where Name = '\"\n\t\t\t\t\t\t\t\t+ name + \"'And Last_Name = '\" + lastName + \"' \");\n\t\t\t\tstatement.execute();\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}\n\t}", "@Test\n\tpublic void testCheckSufficientCredits_OverdraftFacility() {\n\n\t\tint creditsRequired = 11;\n\n\t\tSmsMessage msg = new SmsMessage();\n\t\tSmsTask smsTask = new SmsTask();\n\t\tsmsTask.setSakaiSiteId(SmsConstants.SMS_DEV_DEFAULT_SAKAI_SITE_ID);\n\t\tsmsTask.setSmsAccountId(account.getId());\n\t\tsmsTask.setDateCreated(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setDateToSend(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setStatusCode(SmsConst_DeliveryStatus.STATUS_PENDING);\n\t\tsmsTask.setAttemptCount(2);\n\t\tsmsTask.setMessageBody(SmsConstants.SMS_DEV_DEFAULT_SMS_MESSAGE_BODY);\n\t\tsmsTask.setSenderUserName(\"senderUserName\");\n\t\tsmsTask.setMaxTimeToLive(1);\n\t\tsmsTask.getSmsMessages().add(msg);\n\t\tsmsTask.setCreditEstimate(creditsRequired);\n\t\tmsg.setSmsTask(smsTask);\n\n\t\tboolean sufficientCredits = smsBillingImpl.checkSufficientCredits(\n\t\t\t\taccount.getId(), creditsRequired);\n\t\tAssert.assertFalse(\"Expected insufficient credit\", sufficientCredits);\n\t\thibernateLogicLocator.getSmsAccountLogic().persistSmsAccount(account);\n\t\tsufficientCredits = smsBillingImpl.checkSufficientCredits(account\n\t\t\t\t.getId(), creditsRequired);\n\t\tAssert.assertTrue(\"Expected insufficient credit\", !sufficientCredits);\n\t}", "private void validateBalance(Double fromBalance, Double transferAmount) throws PaymentsException {\n\t\tif ((fromBalance - transferAmount) <= 0) {\n\t\t\tlogger.error(\"Not enough balance.\");\n\t\t\tthrow new PaymentsException(\" Not enough funds. \");\n\t\t\t\n\t\t}\n\t}", "abstract int checkBalance(String accountno) throws RemoteException;", "public final void payBills() {\n if (this.isBankrupt) {\n return;\n }\n Formulas formulas = new Formulas();\n if ((getInitialBudget() - formulas.monthlySpendings(this)) < 0) {\n setBankrupt(true);\n }\n setInitialBudget(getInitialBudget() - formulas.monthlySpendings(this));\n }", "@Test\n\tpublic void withdrawTest(){\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tAccount cAcc = new CurrentAccount(cus);\n\t\tbc.withdraw(cAcc, 300);\n\t\tboolean flag = false;\n\t\tif(cAcc.getBalance() == -300.0){\n\t\t\tflag = true;\n\t\t}\n\t\tassertTrue(flag);\n\t}", "public boolean canCredit(double amount);", "boolean hasLedger();", "public Account()\n {\n balance = 0;\n balanceChangeLock = new ReentrantLock();\n sufficientFundsCondition = balanceChangeLock.newCondition();\n }", "public abstract boolean deposit(float amount);", "public boolean withdrawal (double amount) \r\n {\r\n\r\n boolean result = false;\r\n\r\n if ( ! super.withdrawal (amount) ) \r\n {\r\n System.out.println (\"Using overdraft...\");\r\n if ( ! overdraft.withdrawal (amount-balance) )\r\n System.out.println (\"Overdraft source insufficient.\");\r\n else {\r\n balance = 0;\r\n System.out.println (\"Current Balance on account \" + account + \": \" + balance);\r\n result = true;\r\n }\r\n }\r\n System.out.println ();\r\n\r\n return result;\r\n\r\n }", "@Override\r\n\tpublic boolean checkBudget() {\n\t\treturn false;\r\n\t}", "protected static Boolean withdrawCanBeMade(\n Account fromAccount,\n Integer toAccountId,\n Integer userId,\n Integer amount,\n Transaction.TransactionType type\n ) {\n return doWithdrawCheck(fromAccount, toAccountId, userId, amount, type);\n }", "public boolean isOverdrawn() {\n return balance < 0;\n }", "public void transferFunds(BankAccount account1, BankAccount account2, double amount){\n if(account1.checkAccountOpen()&&account2.checkAccountOpen()){\n if((account1.getCurrentBalance()-amount)>0) {\n if (isSameAccount(account1, account2)) {\n account1.subtractCreditTransaction(amount);\n account2.addDebitTransaction(amount);\n } else {\n System.out.println(\"This transaction could not be processed. BankAccount owners are not the same.\");\n }\n }\n else {\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n }\n\n\n }\n }", "private boolean checkBudgetAvailability(Company company, double bonusForDevelopers) {\n\n double requiredBudget = 0;\n\n for (Employee employee : company.getEmployees()) {\n\n double employeeSalary = 0;\n\n if (employee instanceof Developer) {\n employeeSalary = ((Developer) employee).getSalary(bonusForDevelopers);\n } else {\n employeeSalary = employee.getSalary();\n }\n requiredBudget += employeeSalary;\n }\n\n return requiredBudget >= company.getBudget();\n }", "@Test\n\tpublic void testWithdraw(){\n\t\t\n\t\t// Arrange\n\t\tBigDecimal amountToWithdraw = new BigDecimal(10.00);\n\t\tBigDecimal expectedBalance = new BigDecimal(110.5);\n\t\tdouble delta = 1e-3;\n\t\t// Act\n\t\tcurrentAccount.withdraw(amountToWithdraw);\n\t\tBalance actualBalance = currentAccount.checkBalance();\n\t\t\n\t\t// Assert\n\t\tassertEquals(expectedBalance.doubleValue(), actualBalance.getAmount().doubleValue(), delta);\n\t}", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "public abstract boolean withdraw(float amount);", "@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }", "@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 }", "public static void atmCheckTransferValid(String accNum, int amount, String accNumB) {\n\t\ttry {\n\t\t\tif (amount >= 0 && amount <= 1000000) {\n\t\t\t\tif (AccMgr.checkDailyTransferLimit(accNum, amount)) {\n\t\t\t\t\tAccMgr.performDailyTransfer(amount, accNum);\n\t\t\t\t\tTransactionFileMgr.addXfrTransaction(accNum, Integer.toString(amount), accNumB);\n\t\t\t\t\tSystem.out.println(\"Transfer successful!\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"You have exceeded the daily limit\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Please enter a number between 0 - 1000000\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public void withdraw(double dollarAmount) throws InsufficientFundsException {\r\n\t\tif (this.accountBalance - dollarAmount < 0 || this.accountBalance - dollarAmount - 1.50 < 0) {\r\n\t\t\tthrow new InsufficientFundsException();\r\n\t\t} else {\r\n\t\t\ttransactionTracker++;\r\n\t\t\tSystem.out.println(transactionTracker);\r\n\t\t\tif (transactionTracker > 4) {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount - 1.50;\r\n\t\t\t} else {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testImpossible3TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(1000, \"0000 0000 0000 0000\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), \"0000 0000 0000 0001\", 100), is(false));\n }", "public boolean hasBust()\n {\n return getSumOfCards(false) > 21;\n }", "public boolean fundTransfer(int accountNumber, float amount) {\n\t\treturn dao.fundTransfer(accountNumber,amount);\r\n\t}", "public boolean hasMoney(int x)\n\t{\n\t\treturn money >= x;\n\t}", "boolean deposit(UUID name, double amount);", "private boolean checkIsValid(BankClient client, Message message) {\n int lastDigit = message.getMessageContent() % BASE_TEN;\n int amount = message.getMessageContent() / BASE_TEN;\n if (lastDigit <= DEPOSIT_WITHDRAWAL_FLAG) {\n return amount <= client.getDepositLimit();\n } else {\n return amount <= client.getWithdrawalLimit();\n }\n }", "public static void atmCheckDepositValid(String accNum, int amount) {\n\t\ttry {\n\t\t\tif (amount >= 0 && amount <= 200000) {\n\t\t\t\tif (AccMgr.checkDailyDepositLimit(accNum, amount)) {\n\t\t\t\t\tAccMgr.performDailyDeposit(amount, accNum);\n\t\t\t\t\tTransactionFileMgr.addDepTransaction(accNum, Integer.toString(amount));\n\t\t\t\t\tSystem.out.println(\"Deposit successfully!\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"You have exceeded the daily limit.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Please enter a number between 0 - 200000:\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public void depositMoney(double amount, boolean checkingAccount) {\n if (checkingAccount) {\n checkingBalance += amount;\n totalBalance += amount;\n } else {\n savingsBalance += amount;\n totalBalance += amount;\n }\n }", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "@Override\r\n\tpublic boolean deopsit(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tbalance = (float) (balance + amount);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean withdrawMoney(int accountNo, float amount) {\n Account account = getAccountByAccountNo(accountNo);\n //check if account has sufficient balance\n if (checkIfEnough(account, amount)) {\n account.setBalance(account.getBalance() - amount);\n saveOrUpdate(account);\n //save transaction to database\n Transaction transaction = new Transaction();\n transaction.setAccountNo(accountNo);\n transaction.setTime(new Timestamp(new Date().getTime()));\n transaction.setType(\"withdraw\");\n transactionRepository.save(transaction);\n return true;\n }\n return false;\n }", "@Override\n\tpublic void withdraw(double amount) {\n\t\tif (super.getBalance() - amount > overdraftLimit) {\n\t\t\tsuper.setBalance(getBalance() - amount);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Amount exceeds overdraft limit.\");\n\t}", "boolean isAccountNonLocked();", "boolean isAccountNonLocked();", "public boolean isSelectedPlayerHasEnoughMoney(Supplier <Integer> amountOfMoney) {\n return amountOfMoney.get() <= getCurrentPlayerFunds();\n }" ]
[ "0.6995754", "0.65030634", "0.647705", "0.6397417", "0.63906044", "0.63249743", "0.6267356", "0.6241632", "0.6222127", "0.62090904", "0.6165932", "0.6159289", "0.61373436", "0.61357844", "0.60802466", "0.6079298", "0.6033948", "0.60029376", "0.5970575", "0.5963727", "0.5932699", "0.5925603", "0.58994585", "0.5892674", "0.58909774", "0.58673096", "0.5846846", "0.58257663", "0.58154213", "0.58107567", "0.5805788", "0.5804579", "0.5804579", "0.57961065", "0.57956415", "0.57764316", "0.57758325", "0.5772606", "0.5767933", "0.57669395", "0.5766057", "0.5762966", "0.5744372", "0.57411957", "0.57399154", "0.57151085", "0.5715008", "0.5713225", "0.5698088", "0.56962377", "0.56835246", "0.5682091", "0.5668708", "0.566086", "0.5648151", "0.56460047", "0.5600371", "0.5599469", "0.55988914", "0.5594697", "0.5594697", "0.5592643", "0.55911803", "0.5586482", "0.5571146", "0.55649984", "0.5563369", "0.5558762", "0.5558095", "0.5553173", "0.5551301", "0.55482453", "0.5530109", "0.55295473", "0.55247647", "0.5522353", "0.55167913", "0.550793", "0.55072993", "0.5506107", "0.55055475", "0.5498112", "0.54958904", "0.5493736", "0.5490996", "0.5483629", "0.5479511", "0.5474261", "0.5473449", "0.5469149", "0.54671973", "0.544356", "0.5436127", "0.5432837", "0.542812", "0.5425777", "0.5422116", "0.5413891", "0.5413891", "0.5404382" ]
0.759028
0
Basically, if request is legitimate, then remove associated item(s) from the: (1) hashMapOfAllAccts (2) listOfAuctionHouseIDRecords; (3) listOfAgentIDRecords (4) hashMapOfSecretKeys For closure requests from an Auction House, simply comply with request any unrealized gains from frozenbutnottransferred funds from agent accounts is ignored For closure requests from an Agent, comply with request only if agent account has no frozen funds. Frozen funds indicate a transfer that is pending. (0) extract the Bank Account Number
public BankAccount closeAccount ( IDRecord theIDRecord ) { int theBankAccountNumber = theIDRecord.getNumericalID(); // (1) Get the actual BankAccount BankAccount theBankAccount = hashMapOfAllAccts.get(theBankAccountNumber); // (2) If such a BankAccount actually exists ... if (theBankAccount != null) { // (3) Check if we're dealing with an Auction House if ( theBankAccount.getAccountType() == BankAccount.AccountType.AUCTION_HOUSE) { // 3(a) Remove account from hashMapOfAllAccts hashMapOfAllAccts.remove(theBankAccountNumber); // 3(b) Remove account from listOfAuctionHouseIDRecords // Complicated because process doesn't know how to compare // IDRecords (IDRecord class not over-riding .equals() method), // so using list.remove(Obj) does not work! // so we try something different … int indexToRemove = -1; for(int i = 0; i < listOfAuctionHouseIDRecords.size(); i++){ int tempAcctNum = (listOfAuctionHouseIDRecords.get(i)).getNumericalID(); if (tempAcctNum == theBankAccountNumber ) { indexToRemove = i; break; } } if ( indexToRemove >= 0 ) { listOfAuctionHouseIDRecords.remove(indexToRemove); } // 3(c) More difficult: remove from the HashMap of secretKeys Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet(); List<Integer> secretKeysToRemove = new ArrayList<>(); for (int i : setOfSecretKeys) { int tempAcctNum = (hashMapOfSecretKeys.get(i)).getAH_ACCOUNT_NUMBER(); if ( tempAcctNum == theBankAccountNumber ) { secretKeysToRemove.add(i); } } // and only THEN remove the HashMap items // associated with those saved secretKeyToRemove items: if (secretKeysToRemove.size() > 0) { for (int i = 0; i < secretKeysToRemove.size(); i++) { hashMapOfSecretKeys.remove(secretKeysToRemove.get(i)); } } // 3(d) then update display and return BankAccount updateBankDisplay(); return theBankAccount; } // (4) if account type is AGENT and Agent has no frozen funds else if ( theBankAccount.getAccountType() == BankAccount.AccountType.AGENT && theBankAccount.getTotalFrozen() == 0.0) { // 4(a) Remove account from hashMapOfAllAccts hashMapOfAllAccts.remove(theBankAccountNumber); // 4(b) Remove account from listOfAgentIDRecords // Complicated because process doesn't know how to compare // IDRecords (IDRecord class not over-riding .equals() method), // so using list.remove(Obj) does not work! // so we try something different … int indexToRemove = -1; for ( int i = 0; i < listOfAgentIDRecords.size(); i++ ) { int tempAcctNum = (listOfAgentIDRecords.get(i)).getNumericalID(); if (tempAcctNum == theBankAccountNumber ) { indexToRemove = i; break; } } if ( indexToRemove >= 0 ) { listOfAgentIDRecords.remove(indexToRemove); } // 4(c) More difficult: remove from the HashMap of secretKeys Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet(); List<Integer> secretKeysToRemove = new ArrayList<>(); for (int i : setOfSecretKeys) { int tempAcctNum = (hashMapOfSecretKeys.get(i)).getAGENT_ACCOUNT_NUMBER(); if ( tempAcctNum == theBankAccountNumber ) { secretKeysToRemove.add(i); } } // and only THEN remove the HashMap items // associated with those saved secretKeyToRemove items: if (secretKeysToRemove.size() > 0) { for (int i = 0; i < secretKeysToRemove.size(); i++) { hashMapOfSecretKeys.remove(secretKeysToRemove.get(i)); } } // 4(d) then update display and return BankAccount updateBankDisplay(); return theBankAccount; } else { // valid BankAccount but: // not an auction house // not an agent with 0 frozen funds return new BankAccount(); } } else { // null BankAccount -- cannot close return new BankAccount(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<PooledTransaction> removeTxsWithNonceLessThan(Map<AionAddress, BigInteger> accNonce) {\n\n List<ByteArrayWrapper> bwList = new ArrayList<>();\n for (Map.Entry<AionAddress, BigInteger> en1 : accNonce.entrySet()) {\n AccountState as = this.getAccView(en1.getKey());\n lock.writeLock().lock();\n Iterator<Map.Entry<BigInteger, AbstractMap.SimpleEntry<ByteArrayWrapper, BigInteger>>>\n it = as.getMap().entrySet().iterator();\n\n while (it.hasNext()) {\n Map.Entry<BigInteger, AbstractMap.SimpleEntry<ByteArrayWrapper, BigInteger>> en =\n it.next();\n if (en1.getValue().compareTo(en.getKey()) > 0) {\n bwList.add(en.getValue().getKey());\n it.remove();\n } else {\n break;\n }\n }\n lock.writeLock().unlock();\n\n Set<BigInteger> fee = Collections.synchronizedSet(new HashSet<>());\n if (this.getPoolStateView(en1.getKey()) != null) {\n this.getPoolStateView(en1.getKey())\n .parallelStream()\n .forEach(ps -> fee.add(ps.getFee()));\n }\n\n fee.parallelStream()\n .forEach(\n bi -> {\n if (this.getFeeView().get(bi) != null) {\n this.getFeeView()\n .get(bi)\n .entrySet()\n .removeIf(\n byteArrayWrapperTxDependListEntry ->\n byteArrayWrapperTxDependListEntry\n .getValue()\n .getAddress()\n .equals(en1.getKey()));\n\n if (this.getFeeView().get(bi).isEmpty()) {\n this.getFeeView().remove(bi);\n }\n }\n });\n\n as.setDirty();\n }\n\n List<PooledTransaction> removedTxl = Collections.synchronizedList(new ArrayList<>());\n bwList.parallelStream()\n .forEach(\n bw -> {\n if (this.getMainMap().get(bw) != null) {\n PooledTransaction pooledTx = this.getMainMap().get(bw).getTx();\n removedTxl.add(pooledTx);\n\n long timestamp = pooledTx.tx.getTimeStampBI().longValue() / multiplyM;\n synchronized (this.getTimeView().get(timestamp)) {\n if (this.getTimeView().get(timestamp) == null) {\n LOG.error(\n \"Txpool.remove can't find the timestamp in the map [{}]\",\n pooledTx.toString());\n return;\n }\n\n this.getTimeView().get(timestamp).remove(bw);\n if (this.getTimeView().get(timestamp).isEmpty()) {\n this.getTimeView().remove(timestamp);\n }\n }\n\n lock.writeLock().lock();\n this.getMainMap().remove(bw);\n lock.writeLock().unlock();\n }\n });\n\n this.updateAccPoolState();\n this.updateFeeMap();\n\n if (LOG.isInfoEnabled()) {\n LOG.info(\"TxPoolA0.remove {} TX\", removedTxl.size());\n }\n\n return removedTxl;\n }", "@Override\n\tpublic Map<String, Object> unbindHouseInfo(Map<String, Object> requestMap) {\n\t\tMap<String, Object> map = new HashMap<>();\n\t\tmap.put(\"status\", false);\n\t\tString openId = (String)requestMap.get(\"openId\");\n\t\tString infoId = (String)requestMap.get(\"infoId\");\n\t\tlogger.debug(\"openId: \"+openId+\" infoId: \"+infoId);\n\t\tVoteApplyInfoExample voteApplyInfoExample = new VoteApplyInfoExample();\n\t\tcom.indihx.elecvote.entity.VoteApplyInfoExample.Criteria criteria = voteApplyInfoExample.createCriteria();\n\t\tcriteria.andUserIdEqualTo(openId);\n\t\tcriteria.andInfoIdEqualTo(new BigDecimal(infoId));\n\t\tint count = voteApplyInfoMapper.deleteByExample(voteApplyInfoExample);\n\t\tif (count > 0) {\n\t\t\tmap.put(\"status\", true);\n\t\t}\n\t\t\n\t\treturn map;\n\t}", "private void getDetailedDebitAgingOLDEST(List<DebtorsDetailedAgingHelper> agingList, Date atDate, EMCUserData userData) {\n getDetailedDebitAgingNONE(agingList, atDate, userData);\n\n //Aging lines to remove\n //List<DebtorsDetailedAgingLineDS> toRemove = new ArrayList<DebtorsDetailedAgingLineDS>();\n\n //All credits\n List<DebtorsDetailedAgingLineDS> credits = new ArrayList<DebtorsDetailedAgingLineDS>();\n //All debits\n List<DebtorsDetailedAgingLineDS> debits = new ArrayList<DebtorsDetailedAgingLineDS>();\n\n for (DebtorsDetailedAgingHelper agingHelper : agingList) {\n for (DebtorsDetailedAgingLineDS agingLine : agingHelper.getAgingLines()) {\n if (agingLine.getAmount().compareTo(BigDecimal.ZERO) < 0) {\n //Credit\n credits.add(agingLine);\n } else {\n //Debit\n debits.add(agingLine);\n }\n }\n }\n\n//Start allocating from oldest credits.\ncredit: for (DebtorsDetailedAgingLineDS credit : credits) {\n if (credit.getBalance().compareTo(BigDecimal.ZERO) != 0) {\n//Loop through debits\ndebit: for (DebtorsDetailedAgingLineDS debit : debits) {\n if (debit.getBalance().compareTo(BigDecimal.ZERO) != 0) {\n //Get difference between debit and credit balances.\n BigDecimal difference = debit.getBalance().add(credit.getBalance());\n if (difference.compareTo(BigDecimal.ZERO) > 0) {\n //Debit greater than credit. Allocate credit in full.\n debit.setBalance(debit.getBalance().add(credit.getBalance()));\n credit.setBalance(BigDecimal.ZERO);\n\n //toRemove.add(credit);\n\n //Credit consumed. Continue outer loop.\n continue credit;\n } else if (difference.compareTo(BigDecimal.ZERO) < 0) {\n //Credit greater than debit.\n credit.setBalance(credit.getBalance().add(debit.getBalance()));\n debit.setBalance(BigDecimal.ZERO);\n\n //toRemove.add(debit);\n\n //Debit consumed\n continue;\n } else {\n //Debit == credit. Consume both.\n debit.setBalance(BigDecimal.ZERO);\n credit.setBalance(BigDecimal.ZERO);\n\n //toRemove.add(credit);\n //toRemove.add(debit);\n\n //Credit consumed. Continue outer loop.\n continue credit;\n }\n } else {\n //Credit, continue to next line.\n continue;\n }\n }\n } else {\n //Debit, continue to next line\n continue;\n }\n }\n\n //Try to remove all records from all bins.\n //TODO: Is there a more efficient way?\n //for (DebtorsDetailedAgingHelper agingHelper : agingList) {\n // agingHelper.getAgingLines().removeAll(toRemove);\n //}\n }", "public void deletetAUMCacheMap(int advisorUserId, HttpServletRequest request);", "private void removeRecurrentResponses(Map<BbRef, BallotResponse> ballots) {\n ballots.entrySet().stream()\n .collect(groupingBy(e -> e.getValue().response.getKey(), // Group by resp key\n mapping(e -> e, toCollection(() -> new TreeSet<>(this::compare)))))\n .values().stream().filter(e -> e.size() > 1) // Having only colliding entries\n .flatMap(es -> es.stream().skip(1)) // Skip the first in sorted set as earliest\n .forEach(e -> { // Process the others as the recurring ones\n helper.report(e.getKey(), Result.REG_RESP_NOT_UNIQUE);\n ballots.remove(e.getKey());\n });\n }", "public List getAllUnPaidBillAmount(HttpServletRequest request, HttpServletResponse response) {\n\r\n\t\tString supplierId = request.getParameter(\"supplier\");\r\n\r\n\t\tMap<Long, GetSupplierDetails> map = new HashMap<Long, GetSupplierDetails>();\r\n\r\n\t\tSupplierDetailDao dao = new SupplierDetailDao();\r\n\t\tList<GetSupplierDetails> custList = dao.getAllUnPaidBillAmount(supplierId);\r\n\r\n\t\treturn custList;\r\n\t}", "public void removeFinArFundsInActionAppliedHistoryList(List<FinArFundsInActionAppliedHistory> finArFundsInActionAppliedHistoryList);", "@Override\n public List<PooledTransaction> remove(List<PooledTransaction> pooledTxs) {\n\n List<PooledTransaction> removedTxl = Collections.synchronizedList(new ArrayList<>());\n Set<AionAddress> checkedAddress = Collections.synchronizedSet(new HashSet<>());\n\n for (PooledTransaction pooledTx : pooledTxs) {\n ByteArrayWrapper bw = ByteArrayWrapper.wrap(pooledTx.tx.getTransactionHash());\n lock.writeLock().lock();\n try {\n if (this.getMainMap().remove(bw) == null) {\n continue;\n }\n } finally {\n lock.writeLock().unlock();\n }\n\n removedTxl.add(pooledTx);\n\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"TxPoolA0.remove:[{}] nonce:[{}]\",\n ByteUtil.toHexString(pooledTx.tx.getTransactionHash()),\n pooledTx.tx.getNonceBI().toString());\n }\n\n long timestamp = pooledTx.tx.getTimeStampBI().longValue() / multiplyM;\n if (this.getTimeView().get(timestamp) != null) {\n if (this.getTimeView().get(timestamp).remove(bw)) {\n if (this.getTimeView().get(timestamp).isEmpty()) {\n this.getTimeView().remove(timestamp);\n }\n }\n }\n\n // remove the all transactions belong to the given address in the feeView\n AionAddress address = pooledTx.tx.getSenderAddress();\n Set<BigInteger> fee = Collections.synchronizedSet(new HashSet<>());\n if (!checkedAddress.contains(address)) {\n\n if (this.getPoolStateView(pooledTx.tx.getSenderAddress()) != null) {\n this.getPoolStateView(pooledTx.tx.getSenderAddress())\n .parallelStream()\n .forEach(ps -> fee.add(ps.getFee()));\n }\n\n fee.parallelStream()\n .forEach(\n bi -> {\n if (this.getFeeView().get(bi) != null) {\n this.getFeeView()\n .get(bi)\n .entrySet()\n .removeIf(\n byteArrayWrapperTxDependListEntry ->\n byteArrayWrapperTxDependListEntry\n .getValue()\n .getAddress()\n .equals(address));\n\n if (this.getFeeView().get(bi).isEmpty()) {\n this.getFeeView().remove(bi);\n }\n }\n });\n\n checkedAddress.add(address);\n }\n\n AccountState as = this.getAccView(pooledTx.tx.getSenderAddress());\n\n lock.writeLock().lock();\n as.getMap().remove(pooledTx.tx.getNonceBI());\n lock.writeLock().unlock();\n\n as.setDirty();\n }\n\n this.updateAccPoolState();\n this.updateFeeMap();\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"TxPoolA0.remove TX remove [{}] removed [{}]\", pooledTxs.size(), removedTxl.size());\n }\n\n return removedTxl;\n }", "public void removeFinArFundsInActionAppliedHistory(FinArFundsInActionAppliedHistory finArFundsInActionAppliedHistory);", "private static void cleanLeaseCache(Map<HashPair, Lease> tc) {\n for (Iterator<Lease> iter = tc.values().iterator(); iter.hasNext(); ) {\n Lease l = iter.next();\n if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))\n iter.remove();\n }\n }", "private void getDetailedDebitAgingDATE(List<DebtorsDetailedAgingHelper> agingList, Date atDate, EMCUserData userData) {\n getDetailedDebitAgingNONE(agingList, atDate, userData);\n\n for (DebtorsDetailedAgingHelper agingHelper : agingList) {\n//Lines to be removed from aging helper. (Transactions allocated in full) These should be ignored while processing.\n//List<DebtorsDetailedAgingLineDS> toRemove = new ArrayList<DebtorsDetailedAgingLineDS>();\n\n//Get all debit and credit transactions in date range and allocate. Allocate credits to debits.\n//The list of aging lines will be ordered by date.\ncredit: for (DebtorsDetailedAgingLineDS agingLine : agingHelper.getAgingLines()) {\n if (agingLine.getAmount().compareTo(BigDecimal.ZERO) < 0 && agingLine.getBalance().compareTo(BigDecimal.ZERO) != 0) {\n DebtorsDetailedAgingLineDS credit = agingLine;\n\n//Loop again, looking for debits\ndebit: for (DebtorsDetailedAgingLineDS otherAgingLine : agingHelper.getAgingLines()) {\n if (otherAgingLine.getAmount().compareTo(BigDecimal.ZERO) < 0 && otherAgingLine.getBalance().compareTo(BigDecimal.ZERO) != 0) {\n DebtorsDetailedAgingLineDS debit = otherAgingLine;\n\n //Get difference between debit and credit balances.\n BigDecimal difference = debit.getBalance().add(credit.getBalance());\n if (difference.compareTo(BigDecimal.ZERO) > 0) {\n //Debit greater than credit. Allocate credit in full.\n credit.setBalance(BigDecimal.ZERO);\n debit.setBalance(debit.getBalance().add(credit.getBalance()));\n\n //toRemove.add(credit);\n\n //Credit consumed. Continue outer loop.\n continue credit;\n } else if (difference.compareTo(BigDecimal.ZERO) < 0) {\n //Credit greater than debit.\n debit.setBalance(BigDecimal.ZERO);\n credit.setBalance(credit.getBalance().subtract(debit.getBalance()));\n\n //toRemove.add(debit);\n\n //Debit consumed\n continue;\n } else {\n //Debit == credit. Consume both.\n debit.setBalance(BigDecimal.ZERO);\n credit.setBalance(BigDecimal.ZERO);\n\n //toRemove.add(credit);\n //toRemove.add(debit);\n\n //Credit consumed. Continue outer loop.\n continue credit;\n }\n } else {\n //Credit, continue to next line.\n continue;\n }\n }\n } else {\n //Debit, continue to next line\n continue;\n }\n }\n\n //Remove balanced lines.\n //agingHelper.getAgingLines().removeAll(toRemove);\n }\n }", "private void removalOfTemporaryAttSet(Context context, StringList sLFeatAndRuleIds)\r\n \t throws Exception{\r\n\r\n \t \t\tStringBuffer sbTypePattern = new StringBuffer(50);\r\n \t\t\tsbTypePattern.append(ConfigurationConstants.TYPE_LOGICAL_STRUCTURES);\r\n \t\t\tsbTypePattern.append(\",\");\r\n \t\t\tsbTypePattern.append(ConfigurationConstants.TYPE_CONFIGURATION_FEATURES);\r\n \t\t\tsbTypePattern.append(\",\");\r\n \t\t\tsbTypePattern.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n \t\t\tsbTypePattern.append(\",\");\r\n \t\t\tsbTypePattern.append(ConfigurationConstants.TYPE_RULE);\r\n\r\n \t\t\tStringBuffer sbWhereClause = new StringBuffer(50);\r\n \t\t\tsbWhereClause.append(\"(\");\r\n \t\t\tsbWhereClause.append(\"interface[FTRIntermediateObjectMigration] == \\\"\" + ConfigurationConstants.RANGE_VALUE_TRUE + \"\\\"\");\r\n \t\t\tsbWhereClause.append(\")\");\r\n\r\n \t\t\tStringList objectSelects = new StringList();\r\n \t\t\tobjectSelects.add(SELECT_TYPE);\r\n \t\t\tobjectSelects.add(\"interface\");\r\n objectSelects.add(SELECT_NAME);\r\n objectSelects.add(SELECT_REVISION);\r\n objectSelects.add(SELECT_ID);\r\n\r\n \t \t\tMapList MapListObjects = DomainObject.findObjects(context, // context\r\n \t \t\t\t\t\t\t\t\t\t\t\t\tsbTypePattern.toString(), // typePattern\r\n\t\t\t\t\t\t\t\t\t \t\t\t\t\t\"*\", // vaultPattern\r\n\t\t\t\t\t\t\t\t\t \t\t\t\t\tsbWhereClause.toString(), // whereExpression\r\n\t\t\t\t\t\t\t\t\t \t\t\t\t\tobjectSelects); // objectSelects\r\n\r\n\r\n \t \t\tStringList sLObjIds = new StringList();\r\n \t \t\tfor(int i=0;i<MapListObjects.size();i++){\r\n \t \t\t\t Map mObj = (Map) MapListObjects.get(i);\r\n \t \t\t\t String strObjId = (String) mObj.get(SELECT_ID);\r\n \t \t\t\t sLObjIds.add(strObjId);\r\n \t \t\t}\r\n\r\n\r\n\r\n \t \t\t//Intersection of 2 lists\r\n \t \t\tsLObjIds.retainAll(sLFeatAndRuleIds);\r\n\r\n\r\n \t \t\t try {\r\n\t\t\t\t\tfor(int i=0;i<sLObjIds.size();i++){\r\n\t\t\t\t\t\t String strObjId = (String) sLObjIds.get(i);\r\n\t\t\t\t\t\t //String strMqlCommand = \"modify bus \" + strObjId + \" remove interface\" + \" \" + INTERFACE_FTRIntermediateObjectMigration;\r\n\t\t\t\t\t\t String strMqlCommand = \"modify $1 $2 remove interface $3\";\r\n\t\t\t\t\t\t MqlUtil.mqlCommand(context,strMqlCommand, \"bus\", strObjId, INTERFACE_FTRIntermediateObjectMigration);\r\n\t\t\t\t\t }\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n \t }", "public void deleteCopiedPendingLedgerEntries();", "static void clearRequest(long requestId)\n {\n requestMap.remove(requestId);\n }", "public void removeExpiredAuctions(){\r\n ArrayList <String> expiredAuction = new ArrayList <String>(super.size());\r\n for(String expiredKey: keySet()){\r\n if(getAuction(expiredKey).getTimeRemaining() == 0){\r\n expiredAuction.add(expiredKey);\r\n }\r\n } \r\n for(String expiredKey: expiredAuction){\r\n super.remove(expiredKey);\r\n }\r\n }", "public void mo37873b() {\n if (C13262e.this.f34200n.onRequest(this.f34217f, this.f34218g)) {\n try {\n C13262e.this.f34208v.mo38156a(this.f34217f, C13256a.CANCEL);\n synchronized (C13262e.this) {\n C13262e.this.f34210x.remove(Integer.valueOf(this.f34217f));\n }\n } catch (IOException unused) {\n }\n }\n }", "private void calculateDebitAgingOLDEST(String customerId, List<EMCQuery> periodQueries, List<DebtorsAgingHelper> agingList, Date atDate, EMCUserData userData) {\n //First calculate total outstanding debits\n calculateDebitAgingNONE(periodQueries, agingList, atDate, customerId, userData);\n\n //Bev requested that we remove this check. This will now include all unallocated credits, regardless of\n //whether or not they existed at atDate.\n //query.addAnd(\"createdDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n BigDecimal unallocatedCredit = getTotalUnallocatedCredit(customerId, atDate, userData);\n\n //Start allocating credits to oldest debits\n for (int i = agingList.size() - 1; i >= 0; i--) {\n BigDecimal currentBinAmount = agingList.get(i).getBinAmount();\n if (currentBinAmount.compareTo(BigDecimal.ZERO) > 0) {\n //Debit amount found\n if (currentBinAmount.compareTo(unallocatedCredit) > 0) {\n //Outstanding debit is more than outstanding credit.\n //Allocate credit in full.\n agingList.get(i).setBinAmount(currentBinAmount.subtract(unallocatedCredit));\n unallocatedCredit = BigDecimal.ZERO;\n } else {\n //Outstanding debit is less than or equal to outstanding credit.\n //Allocate bin debit amount.\n unallocatedCredit = unallocatedCredit.subtract(currentBinAmount);\n agingList.get(i).setBinAmount(BigDecimal.ZERO);\n }\n\n if (unallocatedCredit.compareTo(BigDecimal.ZERO) == 0) {\n //Consumed credit, exit loop.\n break;\n }\n }\n }\n\n //If credit remains, allocate all of it to the current bin.\n if (unallocatedCredit.compareTo(BigDecimal.ZERO) > 0 && !agingList.isEmpty()) {\n agingList.get(0).setBinAmount(agingList.get(0).getBinAmount().subtract(unallocatedCredit));\n }\n\n// This code removed. As the getTotalUnallocatedCredit() method already returned the full credit amount outstanding at the specified\n// date, this caused double the outstanding credit to be allocated.\n// //If atDate less than today, ignore updates made to transactions between atDate and today.\n// //Only check dates, not time\n// Calendar atCalendar = Calendar.getInstance();\n// atCalendar.setTime(atDate);\n// atCalendar.set(Calendar.HOUR, 0);\n// atCalendar.set(Calendar.MINUTE, 0);\n// atCalendar.set(Calendar.SECOND, 0);\n// atCalendar.set(Calendar.MILLISECOND, 0);\n//\n// Calendar nowCalendar = Calendar.getInstance();\n// nowCalendar.setTime(Functions.nowDate());\n// nowCalendar.set(Calendar.HOUR, 0);\n// nowCalendar.set(Calendar.MINUTE, 0);\n// nowCalendar.set(Calendar.SECOND, 0);\n// nowCalendar.set(Calendar.MILLISECOND, 0);\n//\n// if (atCalendar.compareTo(nowCalendar) < 0) {\n// EMCQuery creditQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n// creditQuery.addFieldAggregateFunction(\"creditSettled\", \"SUM\");\n// //Only include transactions that existed on atDate. Bev requested that we remove this check.\n// //creditQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n//\n// //Customer is optional\n// if (customerId != null) {\n// creditQuery.addAnd(\"customerId\", customerId);\n// }\n//\n// //Only include transactions settled after atDate\n// creditQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n//\n// BigDecimal creditSettled = (BigDecimal) util.executeSingleResultQuery(creditQuery, userData);\n// if (creditSettled == null) {\n// creditSettled = BigDecimal.ZERO;\n// }\n//\n// //Start allocating credits to oldest debits\n// for (int i = agingList.size() - 1; i >= 0; i--) {\n// BigDecimal currentBinAmount = agingList.get(i).getBinAmount();\n// if (currentBinAmount.compareTo(BigDecimal.ZERO) > 0) {\n// //Debit amount found\n// if (currentBinAmount.compareTo(creditSettled) > 0) {\n// //Outstanding debit is more than outstanding credit.\n// //Allocate credit in full.\n// agingList.get(i).setBinAmount(currentBinAmount.subtract(creditSettled));\n// creditSettled = BigDecimal.ZERO;\n// } else {\n// //Outstanding debit is less than or equal to outstanding credit.\n// //Allocate bin debit amount.\n// creditSettled = creditSettled.subtract(currentBinAmount);\n// agingList.get(i).setBinAmount(BigDecimal.ZERO);\n// }\n//\n// if (creditSettled.compareTo(BigDecimal.ZERO) == 0) {\n// //Consumed credit, exit loop.\n// break;\n// }\n// }\n// }\n//\n// //If credit remains, allocate all of it to the current bin.\n// if (creditSettled.compareTo(BigDecimal.ZERO) > 0 && !agingList.isEmpty()) {\n// agingList.get(0).setBinAmount(agingList.get(0).getBinAmount().subtract(creditSettled));\n// }\n// }\n }", "private static void cleanLeaseSetCache(RouterContext ctx, Map<HashPair, LeaseSet> tc) {\n long now = ctx.clock().now();\n for (Iterator<LeaseSet> iter = tc.values().iterator(); iter.hasNext(); ) {\n LeaseSet l = iter.next();\n if (l.getEarliestLeaseDate() < now)\n iter.remove();\n }\n }", "private void clearFriendlistReq() {\n if (reqCase_ == 9) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "private void deleteBooking() \n {\n Scanner memberID=new Scanner(System.in);\n System.out.println(\"Please enter your member number: \");\n int memberId = memberID.nextInt();\n \n Member mem = sportsClub.searchMember(memberId);\n if(mem==null || mem.getBookings()==null)\n {\n System.out.println(\"Sorry! There are no members with the given ID. \");\n\n \n\n }\n else\n {\n for(Booking b : mem.getBookings())//Displays the member details n bookings\n {\n System.out.println(\"Booking Id : \" + b.hashCode()+ \" Booking made by \"+mem.getMemberName() +\" for \" + b.getBookingDate() + \" at \" + b.getBookingTime() + \" for \" + b.getBookingEndTime() + \" minutes on Court number \" + b.getCourt().getCourtId());\n\n }\n \n if(mem.getBookings().size()!=0)\n {\n Scanner inputID=new Scanner(System.in);\n System.out.println(\"Enter Booking ID: \");\n int input = inputID.nextInt();\n Iterator<Booking> itr = mem.getBookings().iterator();\n\n\n while(itr.hasNext())//delettion starts based on the ID\n { \n if(itr.next().hashCode() == input)\n {\n itr.remove();\n for(String str : mem.getSportsPlayed())\n {\n Sport sportObj = sportsClub.findSport(str);\n\n ArrayList<Court> itrCourt = sportObj.getCourtList();\n for(Court c : itrCourt)//finds the court\n {\n\n Iterator<Booking> itrBooking = c.getCourtBookings().iterator();\n while(itrBooking.hasNext())//helps to get the booking object\n {\n if(itrBooking.next().hashCode() == input)\n {\n itrBooking.remove();//removes the booking object\n System.out.println(\"Deleted Successfully\");\n }\n } \n } \n } \n }\n }\n }\n }\n\n\n\n }", "public void removeOrderDetails(final Map idList);", "private void calculateDebitAgingNONE(List<EMCQuery> periodQueries, List<DebtorsAgingHelper> agingList, Date atDate, String customerId, EMCUserData userData) {\n for (int i = 0; i < periodQueries.size(); i++) {\n //Only sum over debits\n Object[] debitTotals = (Object[]) util.executeSingleResultQuery(periodQueries.get(i), userData);\n\n if (debitTotals != null) {\n BigDecimal debitTotal = (BigDecimal) debitTotals[0] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[0];\n BigDecimal debitSettledTotal = (BigDecimal) debitTotals[1] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[1];\n\n BigDecimal binAmount = debitTotal.subtract(debitSettledTotal);\n agingList.get(i).setBinAmount(binAmount);\n } else {\n agingList.get(i).setBinAmount(BigDecimal.ZERO);\n }\n }\n\n //If atDate less than today, ignore updates made to transactions between atDate and today.\n //Only check dates, not time\n Calendar atCalendar = Calendar.getInstance();\n atCalendar.setTime(atDate);\n atCalendar.set(Calendar.HOUR, 0);\n atCalendar.set(Calendar.HOUR_OF_DAY, 0);\n atCalendar.set(Calendar.MINUTE, 0);\n atCalendar.set(Calendar.SECOND, 0);\n atCalendar.set(Calendar.MILLISECOND, 0);\n\n Calendar nowCalendar = Calendar.getInstance();\n nowCalendar.setTime(Functions.nowDate());\n nowCalendar.set(Calendar.HOUR, 0);\n nowCalendar.set(Calendar.HOUR_OF_DAY, 0);\n nowCalendar.set(Calendar.MINUTE, 0);\n nowCalendar.set(Calendar.SECOND, 0);\n nowCalendar.set(Calendar.MILLISECOND, 0);\n\n if (atCalendar.compareTo(nowCalendar) < 0) {\n //For each bin, revert transaction history\n for (DebtorsAgingHelper binHelper : agingList) {\n EMCQuery settledQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n settledQuery.addFieldAggregateFunction(\"debitSettled\", \"SUM\");\n //Check that transaction existed at atDate. Bev requested that we remove this check.\n //settledQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n settledQuery.openConditionBracket(EMCQueryBracketConditions.NONE);\n settledQuery.addAnd(\"debitTransactionDate\", binHelper.getBinEndDate(), EMCQueryConditions.LESS_THAN_EQ);\n //settledQuery.addAnd(\"creditTransactionDate\", binHelper.getBinEndDate(), EMCQueryConditions.LESS_THAN_EQ);\n settledQuery.closeConditionBracket();\n\n //Customer is optional\n if (customerId != null) {\n settledQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate.\n settledQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n if (binHelper.getBinStartDate() != null) {\n settledQuery.openConditionBracket(EMCQueryBracketConditions.AND);\n settledQuery.addAnd(\"debitTransactionDate\", binHelper.getBinStartDate(), EMCQueryConditions.GREATER_THAN_EQ);\n //settledQuery.addAnd(\"creditTransactionDate\", binHelper.getBinStartDate(), EMCQueryConditions.GREATER_THAN_EQ);\n settledQuery.closeConditionBracket();\n }\n\n BigDecimal totalSettled = (BigDecimal) util.executeSingleResultQuery(settledQuery, userData);\n if (totalSettled == null) {\n totalSettled = BigDecimal.ZERO;\n }\n\n //Add settled amount & discount back to bin\n //binHelper.setBinAmount(binHelper.getBinAmount().add(totalSettled).add(totalDiscount));\n binHelper.setBinAmount(binHelper.getBinAmount().add(totalSettled));\n }\n }\n }", "static /* synthetic */ Map m890b(Request request) {\n HashMap hashMap = new HashMap();\n hashMap.put(\"device_verifier\", request.verifier);\n HashMap hashMap2 = new HashMap();\n C1543ak a = C1948n.m1229a().f1421g.mo16243a();\n String str = (String) a.mo16260a().get(C1544al.AndroidAdvertisingId);\n if (str != null) {\n hashMap2.put(\"gpaid\", str);\n }\n String str2 = (String) a.mo16260a().get(C1544al.DeviceId);\n if (str2 != null) {\n hashMap2.put(\"andid\", str2);\n }\n hashMap.putAll(hashMap2);\n HashMap hashMap3 = new HashMap();\n byte[] bytes = ((String) C1948n.m1229a().f1421g.mo16243a().mo16260a().get(C1544al.AndroidInstallationId)).getBytes();\n if (bytes != null) {\n hashMap3.put(\"flurry_guid\", C1734dz.m868a(bytes));\n }\n hashMap3.put(\"flurry_project_api_key\", C1948n.m1229a().f1422h.f444a);\n hashMap.putAll(hashMap3);\n Context context = request.context;\n HashMap hashMap4 = new HashMap();\n hashMap4.put(\"src\", \"flurryandroidsdk\");\n hashMap4.put(\"srcv\", \"12.3.0\");\n hashMap4.put(\"appsrc\", context.getPackageName());\n C1601bl.m537a();\n hashMap4.put(\"appsrcv\", C1601bl.m538a(context));\n hashMap.putAll(hashMap4);\n return hashMap;\n }", "public void interestCachePurge()\n\t{\n\t\tdouble currentTime = getTime() ;\n\t\tfor(InterestCacheEntry entry:interestCache.values()){\n\t\t\tentry.setPayable(macroLearner.calcPayable(entry.getInterest(),entry.getMaxGradient().getPayment()));\n\t\t\tentry.gradientListPurge(currentTime) ;\n\t\t\t//microLearner.updateTaskExpectedPrice(entry.getInterest().getTaskId());\n\t\t\t/*if ( entry.IsGradientListEmpty() == true ){\n\t\t\t\tit.remove();\n\t\t\t}\t*/\t\t\n\t\t}\n\t}", "private Set<Long> removeSomeBlocks(Map<BlockStoreLocation, List<Long>> blockMap) {\n Set<Long> toRemove = new HashSet<>();\n // 1 block goes missing from each location\n for (Map.Entry<BlockStoreLocation, List<Long>> entry : blockMap.entrySet()) {\n List<Long> blocks = entry.getValue();\n if (blocks.isEmpty()) {\n continue;\n }\n toRemove.add(blocks.get(0));\n blocks.remove(0);\n }\n return toRemove;\n }", "public static void removeByitems(long requestId) {\n\t\tgetPersistence().removeByitems(requestId);\n\t}", "public void pruneItemSet(ItemSet itemSet) {\n Map<ItemSet,Integer> listentry = scb.get(itemSet.getNumberOfItems());\n listentry.put(itemSet, 0);\n }", "@Override\n public void removeFromCache(List<NulsDigestData> txHashList) {\n\n }", "private void removeUnfundedInvestors(Loan l, List<Investor> investorList) {\n\t\tList<Investor> investorsToRemoveList = new ArrayList<Investor>();\n\t\t\n\t\tfor(Investor i : l.getInvestorList().keySet()) {\n\t\t\tfor(Investor investor : investorList) {\n\t\t\t\t\n\t\t\t\tif(i.getName().equals(investor.getName())) {\n\t\t\t\t\ti.setInvestmentAmount(temporaryInvestors.get(i));\n\t\t\t\t\tinvestorsToRemoveList.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(investorsToRemoveList.size() > 0) {\n\t\t\tfor(Investor i : investorsToRemoveList) {\n\t\t\t\tl.getInvestorList().remove(i);\n\t\t\t\ti.getInvestmentsMap().remove(l);\n\t\t\t}\n\t\t}\n\t}", "public static boolean addressWaitingBanker(){\n boolean addressedSomething = false;\n removeSet = new HashSet<>();\n for(Instruction i : waitingList){\n\n if(bankerRequest(i)){\n //System.out.println(\"Task \" + i.taskNumber + \" had its request completed off the waiting List\" );\n removeSet.add(i);\n addressedSomething = true;\n }else{\n //System.out.println(\"Task \" + i.taskNumber + \" could not be completed, remains on waiting list\" );\n }\n }\n\n return addressedSomething;\n }", "private static void cleanReplyCache(RouterContext ctx, Map<HashPair, Long> tc) {\n long now = ctx.clock().now();\n for (Iterator<Long> iter = tc.values().iterator(); iter.hasNext(); ) {\n Long l = iter.next();\n if (l.longValue() < now - CLEAN_INTERVAL)\n iter.remove();\n }\n }", "private void clearAddFriendBToServer() {\n if (reqCase_ == 2) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "void removeDebts(int i);", "public void deleteRequest(Address pickupOrDelivery){\n Request requestToRemove = planningRequest.getRequestByAddress(pickupOrDelivery);\n ArrayList<Address> AddressOfRequest= new ArrayList<>();\n AddressOfRequest.add(requestToRemove.getPickupAddress());\n AddressOfRequest.add(requestToRemove.getDeliveryAddress());\n this.planningRequest.removeRequest(requestToRemove);\n if(!this.planningRequest.isEmpty()) {\n for (Address a : AddressOfRequest) {\n Path pathToRemove1 = this.tour.findPathDestination(a);\n Path pathToRemove2 = this.tour.findPathOrigin(a);\n try {\n Path newPath = this.findShortestPath(pathToRemove1.getDeparture(), pathToRemove2.getArrival());\n this.tour.replaceOldPaths(pathToRemove1, pathToRemove2, newPath);\n }catch (Exception e){\n //Do nothing here, this exception will never occur as find shortest path will only throw an\n //Exception if the the destination point is unreachable from the departure point\n //Which can never be true because if we are here it means that such a path exists\n //The proof is left as an exercise to the reader :)\n }\n }\n this.setChanged();\n notifyObservers();\n }else{\n this.tour.reset();\n this.setChanged();\n notifyObservers(\"We have erased all requests in the map\");\n }\n\n }", "private Map<String, List<Integer>> getRecipientRanksExcludingSelf(List<FeedbackResponseAttributes> responses) {\n List<FeedbackResponseAttributes> responsesExcludingSelf = getResponsesExcludingSelf(responses);\n return generateOptionRanksMapping(responsesExcludingSelf);\n }", "boolean discardEntriesInPeerDeliveryPolicyDataStructure(Identifier msgID_keypart, Identifier senderID_keypart){\r\n\r\n\t\tDeliveryPolicyDataStructureKey key = new DeliveryPolicyDataStructureKey(msgID_keypart, senderID_keypart);\r\n\t\tif (!peerDatastruct.containsKey(key)) return false;\r\n\t\t//Although here a race-condition may happen, since HashMap.remove is idempotent, \r\n\t\t//so trying to remove again will make no harm. Returning true will just cost another check in the collectiveDeliveryDatastructure\r\n\t\tpeerDatastruct.remove(key);\r\n\t\treturn true;\r\n\t}", "private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}", "final IntHashMapEntry removeEntry(int par1)\n {\n int j = computeHash(par1);\n int k = getSlotIndex(j, this.slots.length);\n IntHashMapEntry inthashmapentry = this.slots[k];\n IntHashMapEntry inthashmapentry1;\n IntHashMapEntry inthashmapentry2;\n\n for (inthashmapentry1 = inthashmapentry; inthashmapentry1 != null; inthashmapentry1 = inthashmapentry2)\n {\n inthashmapentry2 = inthashmapentry1.nextEntry;\n\n if (inthashmapentry1.hashEntry == par1)\n {\n ++this.versionStamp;\n --this.count;\n\n if (inthashmapentry == inthashmapentry1)\n {\n this.slots[k] = inthashmapentry2;\n }\n else\n {\n inthashmapentry.nextEntry = inthashmapentry2;\n }\n\n return inthashmapentry1;\n }\n\n inthashmapentry = inthashmapentry1;\n }\n\n return inthashmapentry1;\n }", "private void removeTerritoriesOfPlayerFromSpecificTime(Player player,RoundHistory roundHistory) {\n List<Integer> mapsToClear = player.getTerritoriesID();\n while(!mapsToClear.isEmpty()){\n Integer territoryID = mapsToClear.get(0);\n getTerritoryFromSpecificTime(roundHistory,territoryID).eliminateThisWeakArmy();\n mapsToClear.remove(0);\n }\n }", "public String uncheckedBill() {\n\t\tMap<String,Object> request = (Map) ActionContext.getContext().get(\"request\");\r\n\t\t\r\n\t\tSet uncheckedBill = creditCardManager.getUncheckedBill(creditCardID);\r\n\t\trequest.put(\"uncheckedBill\", uncheckedBill);\r\n\t\treturn \"uncheckedBill\";\r\n\t}", "void clearCaches(HashPair hashPair, Lease lease, TunnelInfo inTunnel, TunnelInfo outTunnel) {\n if (inTunnel != null) { // if we wanted an ack, we sent our lease too\n leaseSetCache.remove(hashPair);\n }\n if (lease != null) {\n // remove only if still equal to lease (concurrent)\n leaseCache.remove(hashPair, lease);\n }\n if (outTunnel != null) {\n synchronized(tunnelCache) {\n TunnelInfo t = backloggedTunnelCache.get(hashPair);\n if (t != null && t.equals(outTunnel))\n backloggedTunnelCache.remove(hashPair);\n t = tunnelCache.get(hashPair);\n if (t != null && t.equals(outTunnel))\n tunnelCache.remove(hashPair);\n }\n }\n }", "public boolean unfreezeFunds (int secretKey, double amtToUnfreeze) {\n\n int theBankAccountNumber;\n // use AccountLink and secret key to get actual Bank Account number\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n if ( theAccountLink != null ) {\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n return false;\n }\n // use account number to get full BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // ask BankAccount to check and (if possible) un-freeze the amount\n boolean fundsUnfrozen = theBankAccount.decreaseFreeze(amtToUnfreeze);\n\n if ( fundsUnfrozen ) {\n updateBankDisplay();\n }\n\n return fundsUnfrozen;\n }", "@Test\n public void mapRemove() {\n check(MAPREM);\n query(MAPSIZE.args(MAPREM.args(MAPENTRY.args(1, 2), 1)), 0);\n }", "public void pruneCooldowns() {\n HashMap<String, Long> cooldownsTempList = new HashMap<>();\n cooldownsList.keySet().forEach(key -> {\n long timeRemaining = cooldownDuration - (System.currentTimeMillis() - cooldownsList.get(key));\n if(timeRemaining > 0) {\n cooldownsTempList.put(key, cooldownsList.get(key));\n }\n });\n cooldownsList.clear();\n cooldownsList.putAll(cooldownsTempList);\n }", "void removeFinancialStatements(int i);", "private boolean canRemoveAllBillsFromRegister(Map<BillDenomination, Integer> debitBills) {\n for (Map.Entry<BillDenomination, Integer> entry : debitBills.entrySet()) {\n if (entry.getValue() < ZERO || entry.getValue() > register.get(entry.getKey())) {\n return false;\n }\n }\n return true;\n }", "private void clearDeleteFriendServerToB() {\n if (rspCase_ == 18) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "private void getDetailedDebitAgingNONE(List<DebtorsDetailedAgingHelper> agingList, Date atDate, EMCUserData userData) {\n //Get and revert all updates made to all transactions from atDate to today.\n for (DebtorsDetailedAgingHelper agingHelper : agingList) {\n for (DebtorsDetailedAgingLineDS agingLine : agingHelper.getAgingLines()) {\n EMCQuery settlementQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n settlementQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n if (agingLine.getAmount().compareTo(BigDecimal.ZERO) > 0) {\n //Debit\n settlementQuery.addFieldAggregateFunction(\"debitSettled\", \"SUM\");\n settlementQuery.addAnd(\"debitTransRef\", agingLine.getTransRecordID());\n //When changing the following line, note that the customer statement and detailed aging reports will be affected.\n settlementQuery.addOrderBy(\"debitTransactionDate\");\n } else {\n //Credit\n settlementQuery.addFieldAggregateFunction(\"creditSettled\", \"SUM\");\n settlementQuery.addAnd(\"creditTransRef\", agingLine.getTransRecordID());\n //When changing the following line, note that the customer statement and detailed aging reports will be affected.\n settlementQuery.addOrderBy(\"creditTransactionDate\");\n }\n\n BigDecimal totalSettled = (BigDecimal) util.executeSingleResultQuery(settlementQuery, userData);\n\n if (totalSettled == null) {\n totalSettled = BigDecimal.ZERO;\n }\n\n if (agingLine.getAmount().compareTo(BigDecimal.ZERO) > 0) {\n //Debit\n agingLine.setBalance(agingLine.getBalance().add(totalSettled));\n } else {\n agingLine.setBalance(agingLine.getBalance().subtract(totalSettled));\n }\n }\n }\n }", "private void clearDeleteFriendAToServer() {\n if (reqCase_ == 14) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "public Hashtable<Integer, Hashtable<String, Obs>> remove_handovers(Hashtable<Integer, Hashtable<String, Obs>> obs) {\n\t\tHashtable<Integer, Hashtable<String, Obs>> tmp_obs = new Hashtable<>();\n\n\t\tfor (Map.Entry<Integer, Hashtable<String, Obs>> entrySet : obs.entrySet()) {\n\t\t\tInteger usr_key = entrySet.getKey();\n\t\t\tHashtable<String, Obs> obs_raw_data = entrySet.getValue();\n\t\t\tHashtable<String, Obs> tmp_obs_raw_data = new Hashtable<>();\n\t\t\tfor (Map.Entry<String, Obs> obs_raw_entrySet : obs_raw_data.entrySet()) {\n\n\t\t\t\tString day_key = obs_raw_entrySet.getKey();\n\t\t\t\tObs day_val = obs_raw_entrySet.getValue();\n\n\t\t\t\tString[] twrs = day_val.getSeq().split(CLM);\n\t\t\t\tString[] tstamps = day_val.getTimeStamp().split(CLM);\n\n\t\t\t\tString handled_twrs = twrs[0];\n\t\t\t\tString handled_tstamps = tstamps[0];\n\n\t\t\t\tfor (int i = 0; i < tstamps.length - 1; i++) {\n\t\t\t\t\tString tstamp = tstamps[i];\n\t\t\t\t\tString htstamp = tstamps[i + 1];\n\t\t\t\t\tif (!tstamp.equals(htstamp)) {\n\t\t\t\t\t\thandled_twrs += CLM + twrs[i + 1];\n\t\t\t\t\t\thandled_tstamps += CLM + tstamps[i + 1];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\ttmp_obs_raw_data.put(day_key, new Obs(handled_twrs, handled_tstamps));\n\t\t\t\t// System.out.println(day_val.timeStamp);\n\t\t\t\t// System.out.println(\"++\" + handled_tstamps);\n\n\t\t\t}\n\t\t\ttmp_obs.put(usr_key, tmp_obs_raw_data);\n\n\t\t}\n\t\treturn tmp_obs;\n\t}", "@Override\n\tpublic int deleteFeesByMap(Map<String, Object> condition) {\n\t\treturn delete(\"com.jiuyescm.bms.fees.out.dispatch.mapper.FeesPayDispatchMapper.deleteFeesByMap\", condition);\n\t}", "public static void main(String... args) {\n List<Integer> data = new ArrayList<Integer>();\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(2);\n data.add(2);\n data.add(3);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(6);\n data.add(6);\n data.add(7);\n data.add(7);\n data.add(7);\n data.add(8);\n data.add(9);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(11);\n data.add(12);\n data.add(12);\n\n int count = droppedRequests(data);\n System.out.println(count);\n }", "public void removeOrderFromTheStock(Map<String, Integer> order) {\n musicShopStock.getStock();\n //musicShopStock.addGoods(3, 3, 3);\n for (Map.Entry<String, Integer> orderEntry : order.entrySet()) {\n String goodsType = orderEntry.getKey();\n Integer needToOrder = orderEntry.getValue();\n int numberDeleteGoods = 0;\n Iterator<MusicalInstrument> iterator = musicShopStock.getStock().iterator();\n while (iterator.hasNext()) {\n MusicalInstrument instrument = iterator.next();\n if (instrument.getType().equals(goodsType) && numberDeleteGoods < needToOrder) {\n iterator.remove();\n numberDeleteGoods++;\n }\n }\n }\n musicShopStock.showGoods();\n }", "protected void unLockItems() throws NbaBaseException {\n Iterator it = getMatchingWorkItems().iterator();\n NbaDst nbaDst; \n\t\t//NBA213 deleted code\n\t\t//process transactions\n\t\twhile (it.hasNext()) {\n\t\t\tnbaDst = (NbaDst) it.next();\n\t\t\tunlockWork(getUser(), nbaDst); //NBA213\n\t\t}\n\t\tit = getCaseWorkItems().values().iterator();\n\t\t//process cases\n\t\twhile (it.hasNext()) {\n\t\t\tnbaDst = (NbaDst) it.next();\n\t\t\tunlockWork(getUser(), nbaDst); //NBA213\n\t\t}\n\t\t//NBA213 deleted code\n }", "public void removeVenTransactionFeeList(List<VenTransactionFee> venTransactionFeeList);", "public int addDeleteRequest(Map<String, AttributeValue> item) {\n AttributeValue tableHashKey = item.get(tableHashKeyName);\n AttributeValue tableRangeKey = item.get(tableRangeKeyName);\n return addDeleteRequest(tableHashKey, tableRangeKey);\n }", "public ReceivingSpace planToRemoveGoodsListWithBizOrder(ReceivingSpace receivingSpace, String bizOrderId, Map<String,Object> options)throws Exception;", "public abstract Map<IBinder, ClientTransactionItem> getActivitiesToBeDestroyed();", "void removeAllLocks(){\r\n \tpageAccess = new ConcurrentHashMap<String, AccessDetailVO>();\r\n\r\n }", "static void removeBomb(int x, int y)\r\n {\r\n Map<Integer,Integer> map = new HashMap<Integer, Integer>();\r\n damagedBombs.put(x, map); \r\n damagedBombs.get(x).put(y,0);\r\n \r\n /*\r\n if(twoSecondBombs.get(x) != null)\r\n twoSecondBombs.get(x).remove(y);\r\n \r\n if(oneSecondBombs.get(x) != null)\r\n oneSecondBombs.get(x).remove(y);\r\n */\r\n }", "public void discard(){\n for(int i = 1 ; i <= 110 ; i++) cardDeck.remove(i);\n }", "private HashMap<Integer, Integer> obtainBills(double amount, HashMap<Integer, Integer> bills)\n {\n if (amount == 0)\n return bills;\n HashMap<Integer, Integer> b;\n HashMap<Integer, Integer> k;\n if (amount >= 50 && typeOfCash.get(50) - bills.get(50) > 0)\n {\n k = new HashMap<>(bills);\n k.put(50, bills.get(50) + 1);\n b = obtainBills(amount - 50, k);\n if (b != null)\n return b;\n }\n if (amount >= 20 && typeOfCash.get(20) - bills.get(20) > 0)\n {\n k = new HashMap<>(bills);\n k.put(20, bills.get(20) + 1);\n b = obtainBills(amount - 20, k);\n if (b != null)\n return b;\n }\n if (amount >= 10 && typeOfCash.get(10) - bills.get(10) > 0)\n {\n k = new HashMap<>(bills);\n k.put(10, bills.get(10) + 1);\n b = obtainBills(amount - 10, k);\n if (b != null)\n return b;\n }\n if (amount >= 5 && typeOfCash.get(5) - bills.get(5) > 0)\n {\n k = new HashMap<>(bills);\n k.put(5, bills.get(5) + 1);\n b = obtainBills(amount - 5, k);\n if (b != null)\n return b;\n }\n return null;\n }", "public static void removeInfo(HashMap<String,String> hm) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString ssn =\"\";\n\t\t\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"Enter SSN to remove from system from the list below\");\n\t\t\t\n\t\t\tfor (String keys : hm.keySet()) \n\t\t\t{\n\t\t\t System.out.println(keys + \":\"+ hm.get(keys)+\"\\n\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Press 'Q' to end the program\");\n\t\t\tssn =scan.next();\n\t\t\tif(ssn.equalsIgnoreCase(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Thank you! Bye now!\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(hm.isEmpty()) {\n\t\t\t\tSystem.out.println(\"there is no any data to remove, bye Now\");\n\t\t\t\tbreak;\n\t\t\t}else if(hm.containsKey(ssn)) {\n\t\t\t\tString personInfo=hm.remove(ssn);\n\t\t\t\tSystem.out.println(ssn+ \" you entered is removed/deleted\"+personInfo);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(ssn+ \" is not in the map. please enter the one that is below\");\n\t\t\t\tfor (String keys : hm.keySet()) \n\t\t\t\t{\n\t\t\t\t System.out.println(keys + \":\"+ hm.get(keys));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}while(true);\n\t\tSystem.out.println(hm);\n\t\t\n\t}", "private void clearAddFriendAToServer() {\n if (reqCase_ == 1) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "public PaymentRequestItem(PurchaseOrderItem poi, PaymentRequestDocument preq, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {\r\n\r\n // copy base attributes w/ extra array of fields not to be copied\r\n PurApObjectUtils.populateFromBaseClass(PurApItemBase.class, poi, this, PurapConstants.PREQ_ITEM_UNCOPYABLE_FIELDS);\r\n\r\n setItemDescription(poi.getItemDescription());\r\n\r\n //New Source Line should be set for PaymentRequestItem\r\n resetAccount();\r\n\r\n // set up accounts\r\n List accounts = new ArrayList();\r\n for (PurApAccountingLine account : poi.getSourceAccountingLines()) {\r\n PurchaseOrderAccount poa = (PurchaseOrderAccount) account;\r\n\r\n // check if this account is expired/closed and replace as needed\r\n SpringContext.getBean(AccountsPayableService.class).processExpiredOrClosedAccount(poa, expiredOrClosedAccountList);\r\n\r\n //KFSMI-4522 copy an accounting line with zero dollar amount if system parameter allows\r\n if (poa.getAmount().isZero()) {\r\n if (SpringContext.getBean(AccountsPayableService.class).canCopyAccountingLinesWithZeroAmount()) {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n } else {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n }\r\n\r\n this.setSourceAccountingLines(accounts);\r\n this.getUseTaxItems().clear();\r\n //List<PurApItemUseTax> newUseTaxItems = new ArrayList<PurApItemUseTax>();\r\n /// this.setUseTaxItems(newUseTaxItems);\r\n //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)\r\n /*\r\n this.getUseTaxItems().clear();\r\n for (PurApItemUseTax useTaxItem : poi.getUseTaxItems()) {\r\n PaymentRequestItemUseTax newItemUseTax = new PaymentRequestItemUseTax(useTaxItem);\r\n this.getUseTaxItems().add(newItemUseTax);\r\n\r\n }\r\n */\r\n\r\n // clear amount and desc on below the line - we probably don't need that null\r\n // itemType check but it's there just in case remove if it causes problems\r\n // also do this if of type service\r\n if ((ObjectUtils.isNotNull(this.getItemType()) && this.getItemType().isAmountBasedGeneralLedgerIndicator())) {\r\n // setting unit price to be null to be more consistent with other below the line\r\n this.setItemUnitPrice(null);\r\n }\r\n\r\n // copy custom\r\n this.purchaseOrderItemUnitPrice = poi.getItemUnitPrice();\r\n// this.purchaseOrderCommodityCode = poi.getPurchaseOrderCommodityCd();\r\n\r\n // set doc fields\r\n this.setPurapDocumentIdentifier(preq.getPurapDocumentIdentifier());\r\n this.setPurapDocument(preq);\r\n }", "private static void cleanTunnelCache(RouterContext ctx, Map<HashPair, TunnelInfo> tc) {\n for (Iterator<Map.Entry<HashPair, TunnelInfo>> iter = tc.entrySet().iterator(); iter.hasNext(); ) {\n Map.Entry<HashPair, TunnelInfo> entry = iter.next();\n HashPair k = entry.getKey();\n TunnelInfo tunnel = entry.getValue();\n // This is a little sneaky, but get the _from back out of the \"opaque\" hash key\n if (!ctx.tunnelManager().isValidTunnel(k.sh, tunnel))\n iter.remove();\n }\n }", "public void deleteUniversalDeal() {\r\n/* 149 */ this._has_universalDeal = false;\r\n/* */ }", "private void deAllocate() {\n if (getC_Order_ID() != 0) {\n setC_Order_ID(0);\n }\n //\tif (getC_Invoice_ID() == 0)\n //\t\treturn;\n //\tDe-Allocate all\n MAllocationHdr[] allocations = MAllocationHdr.getOfPayment(getCtx(),\n getC_Payment_ID(), get_TrxName());\n log.fine(\"#\" + allocations.length);\n for (int i = 0; i < allocations.length; i++) {\n allocations[i].set_TrxName(get_TrxName());\n allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct);\n allocations[i].processIt(DocAction.ACTION_Reverse_Correct);\n allocations[i].save();\n }\n\n // \tUnlink (in case allocation did not get it)\n if (getC_Invoice_ID() != 0) {\n //\tInvoice\n String sql = \"UPDATE C_Invoice \"\n + \"SET C_Payment_ID = NULL, IsPaid='N' \"\n + \"WHERE C_Invoice_ID=\" + getC_Invoice_ID()\n + \" AND C_Payment_ID=\" + getC_Payment_ID();\n int no = DB.executeUpdate(sql, get_TrxName());\n if (no != 0) {\n log.fine(\"Unlink Invoice #\" + no);\n }\n //\tOrder\n sql = \"UPDATE C_Order o \"\n + \"SET C_Payment_ID = NULL \"\n + \"WHERE EXISTS (SELECT * FROM C_Invoice i \"\n + \"WHERE o.C_Order_ID=i.C_Order_ID AND i.C_Invoice_ID=\" + getC_Invoice_ID() + \")\"\n + \" AND C_Payment_ID=\" + getC_Payment_ID();\n no = DB.executeUpdate(sql, get_TrxName());\n if (no != 0) {\n log.fine(\"Unlink Order #\" + no);\n }\n }\n //\n setC_Invoice_ID(0);\n setIsAllocated(false);\n }", "public static void banker(){\n while(terminatedCount < taskList.size()){\n releaseArr = new int [numResources];\n\n // first address any blocked tasks\n addressWaitingBanker();\n // address any unblocked tasks\n addressNonWaitingBanker();\n // update released resources\n updateResources();\n time += 1;\n\n for(Instruction i : removeSet){\n waitingList.remove(i);\n }\n Collections.sort(waitingList);\n }\n\n }", "@ZAttr(id=831)\n public Map<String,Object> removeGalAccountId(String zimbraGalAccountId, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraGalAccountId, zimbraGalAccountId);\n return attrs;\n }", "@ZAttr(id=659)\n public Map<String,Object> removeACE(String zimbraACE, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraACE, zimbraACE);\n return attrs;\n }", "public void performSuppression() {\n \n for (int row = 0; row < dataOutput.getNumRows(); row++) {\n if (privacyModelDefinesSubset == null || privacyModelDefinesSubset.contains(row)) {\n final int hash = dataOutput.hashCode(row);\n final int index = hash & (hashTableBuckets.length - 1);\n HashGroupifyEntry m = hashTableBuckets[index];\n while ((m != null) && ((m.hashcode != hash) || !dataOutput.equalsIgnoringOutliers(row, m.row))) {\n m = m.next;\n }\n if (m == null) {\n throw new RuntimeException(\"Invalid state! Group the data before suppressing records!\");\n }\n if (!m.isNotOutlier || this.isCompletelyGeneralized(m)) {\n dataOutput.or(row, Data.OUTLIER_MASK);\n m.isNotOutlier = false;\n }\n } else {\n dataOutput.or(row, Data.OUTLIER_MASK);\n }\n }\n }", "public void clearBids(){\n this.bids.clear();\n setRequested();\n }", "public void deleteTradeRequest(TradeRequest request){\n tradeRequests.remove(request);\n }", "public void openAddressingRemoveKeyTest1(){\r\n int collisions = oa.removeKey(4);\r\n String result = collisions == 0 ? p : f;\r\n System.out.println(\"open addressing remove existing key test: \" + result);\r\n }", "public static boolean deleteReqList(String keyList[]) {\r\n\tif (keyList.length >0){\r\n\t\tint size = keyList.length;\r\n\t\tfor(int i = 0; i<size; i++){\r\n\t\t\tLong id = Long.valueOf(keyList[i]);\r\n\t\t\tif (updateStatusGroupReq(id, Constant.GROUP_FREE_REQ)){\r\n\t\t\t\treqDao.deleteReq(id);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}", "public void openAddressingRemoveKeyTest2(){\r\n int collisions = oa.removeKey(12);\r\n String result = collisions == oa.Table.length ? p : f;\r\n System.out.println(\"open addressing remove nonexisting key test: \" + result);\r\n }", "public static void removeAccount (int customerId, int accountId, Database d)\r\n\t{\r\n\r\n\t\tCustomer c = d.getCustomer(customerId);\r\n\r\n\t\tList <Integer> accList = c.AccountList;\r\n\t\t\r\n\t\tfor (int i = 0; i < accList.size(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif (accList.get(i) == accountId)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tc.AccountList.remove(i);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public PaymentRequestItem(OleInvoiceItem poi, OlePaymentRequestDocument preq, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {\r\n\r\n // copy base attributes w/ extra array of fields not to be copied\r\n PurApObjectUtils.populateFromBaseClass(PurApItemBase.class, poi, this, PurapConstants.PREQ_ITEM_UNCOPYABLE_FIELDS);\r\n\r\n setItemDescription(poi.getItemDescription());\r\n\r\n //New Source Line should be set for PaymentRequestItem\r\n resetAccount();\r\n\r\n // set up accounts\r\n List accounts = new ArrayList();\r\n\r\n for (PurApAccountingLine account : poi.getSourceAccountingLines()) {\r\n InvoiceAccount poa = (InvoiceAccount) account;\r\n\r\n // check if this account is expired/closed and replace as needed\r\n SpringContext.getBean(AccountsPayableService.class).processExpiredOrClosedAccount(poa, expiredOrClosedAccountList);\r\n\r\n //KFSMI-4522 copy an accounting line with zero dollar amount if system parameter allows\r\n if (poa.getAmount().isZero()) {\r\n if (SpringContext.getBean(AccountsPayableService.class).canCopyAccountingLinesWithZeroAmount()) {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n } else {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n }\r\n\r\n this.setSourceAccountingLines(accounts);\r\n this.getUseTaxItems().clear();\r\n //List<PurApItemUseTax> newUseTaxItems = new ArrayList<PurApItemUseTax>();\r\n /// this.setUseTaxItems(newUseTaxItems);\r\n //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)\r\n /*\r\n this.getUseTaxItems().clear();\r\n for (PurApItemUseTax useTaxItem : poi.getUseTaxItems()) {\r\n PaymentRequestItemUseTax newItemUseTax = new PaymentRequestItemUseTax(useTaxItem);\r\n this.getUseTaxItems().add(newItemUseTax);\r\n\r\n }\r\n */\r\n\r\n // clear amount and desc on below the line - we probably don't need that null\r\n // itemType check but it's there just in case remove if it causes problems\r\n // also do this if of type service\r\n if ((ObjectUtils.isNotNull(this.getItemType()) && this.getItemType().isAmountBasedGeneralLedgerIndicator())) {\r\n // setting unit price to be null to be more consistent with other below the line\r\n // this.setItemUnitPrice(null);\r\n }\r\n\r\n // copy custom\r\n /*Modified for the jira -5458*/\r\n this.purchaseOrderItemUnitPrice = poi.getPurchaseOrderItem()!=null ? poi.getPurchaseOrderItem().getItemUnitPrice() : null;\r\n// this.purchaseOrderCommodityCode = poi.getPurchaseOrderCommodityCd();\r\n\r\n // set doc fields\r\n this.setPurapDocumentIdentifier(preq.getPurapDocumentIdentifier());\r\n this.setPurapDocument(preq);\r\n }", "private HashMap<Integer, Integer> obtainBills(double amount)\n {\n HashMap<Integer, Integer> bills = new HashMap<>();\n bills.put(5, 0);\n bills.put(10, 0);\n bills.put(20, 0);\n bills.put(50, 0);\n return obtainBills(amount, bills);\n }", "public void clear() {\n for (int i = 0; i < if_you_items.length; i++) {\n if_you_items[i].setEnabled(true);\n }\n for (int i = 0; i < then_we_items.length; i++) {\n then_we_items[i].setEnabled(true);\n }\n non_promised_ministries.clear();\n non_promised_ministries.addAll(all_ministries);\n // if not at war, can't ask/offer peace\n if (game.getDiplomacy().getDiplomaticState(game.getTurn(), faction) != C.DS_WAR) {\n if_you_items[IfYouWill.PEACE.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.PEACE.ordinal()].setEnabled(false);\n }\n if (faction > C.HOUSE5) { // non-house\n non_promised_ministries.clear();\n if_you_items[IfYouWill.TECH.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.TECH.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n return;\n }\n // search for promised votes and ministries in pending contracts of sender\n for (Contract con : game.getDiplomacy().getSentContracts()) {\n for (Term term : con.getTerms()) {\n if (term.getDonor() == game.getTurn()) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n if (term.getDonor() == faction) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n }\n }\n // search for promised votes and ministries for sender and for receiver\n // those that are made with sender\n if (game.getRegency().getVotes()[game.getTurn()][Regency.CANDIDATE_IDX] > -1\n || game.getRegency().getVotes()[faction][Regency.CANDIDATE_IDX] == game.getTurn()) {\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n }\n int[] promises = game.getDiplomacy().getMinistryPromises(game.getTurn());\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] > -1) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n promises = game.getDiplomacy().getMinistryPromises(faction);\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] == game.getTurn()) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n if (non_promised_ministries.isEmpty()) {\n then_we_items[ThenWeWill.MINISTRY.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.MINISTRY.ordinal()].setEnabled(false);\n }\n }", "public static void main(String[] args) {\n\n\tBankAccount2 gil = new BankAccount2(\"Gil\",500);\n\tBankAccount2 joe = new BankAccount2(\"Joe\",1000);\n\tBankAccount2 fred = new BankAccount2(\"Fred\",2000);\n\tBankAccount2 sally = new BankAccount2(\"Sally\",2500);\n\tArrayList<BankAccount2> accountList= new ArrayList<>();\n\taccountList.add(gil);\n\taccountList.add(joe);\n\taccountList.add(fred);\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tSystem.out.println(Account.getAccount());\n\t}\n\taccountList.add(sally);\n\t\n\tdouble highBal = 0;\n\tString info = \" \";\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tif(Account.getBalance() > highBal)\n\t\t{\n\t\t\thighBal = Account.getBalance();\n\t\t\tinfo = Account.getAccount();\n\t\t}\n\t}\n\t\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tif(Account.getBalance() > highBal)\n\t\t{\n\t\t\thighBal = Account.getBalance();\n\t\t\tinfo = Account.getAccount();\n\t\t}\n\t}\n\t\n\tSystem.out.println(\"The account with the highest balance once Sally is added is: \"+info);\n\taccountList.remove(sally);\n\t\n\thighBal = 0;\n\tinfo = \" \";\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tif(Account.getBalance() > highBal)\n\t\t{\n\t\t\thighBal = Account.getBalance();\n\t\t\tinfo = Account.getAccount();\n\t\t}\n\t}\n\t\n\tSystem.out.println(\"The account with the highest balance once Sally is removed is: \"+ info);\n\t\n\t\n\t}", "public void beginExecute_NoBids(WebRequest request) throws Exception {\r\n request.addParameter(\"aid\", \"123\");\r\n }", "void purge() {\n\t\t\t\t\n\t\tlong now = System.currentTimeMillis();\n\t\t\n\t\t// when sending out I_BEACON we do change the UUID based on temp exposure keys\n\t\t// and thus need to purge these occasionally....\n\t\tif ( now - getPurgedObsoleteTempExpKeysTS() > getPurgeTempExpKeysInterval()) {\n\t\t\tpurgeObsoleteTempExpKeys( now);\n\t\t}\n\t\t\n\t\t// when in I_BEACON MODE, we don't store any IDs...\n\t\tif ( this.getAppType() == Beacon.AppType.I_BEACON) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( now - getPurgedEphemeralIDsTS() > getPurgeEphemeralIDsInterval()) {\n\t\t\tpurgeEphemeralIDs( now);\t\t\t\n\t\t}\n\t\t\n\t\tif ( now - getPurgedObsoleteExposureIDsTS() > getPurgeExpIDsInterval()) {\n\t\t\tpurgeObsoleteExposureIDs( now);\n\t\t}\n\t}", "private void removeFromCache(String moduleId, String ownerId, String copyId){\n\t\tString key = getKey(moduleId,copyId, ownerId);\n\t\tcache.remove(key);\n\t}", "private static void cleanAnis() {\n\t\t// get an iterator\n\t\tIterator<?> i = anisLookup.entrySet().iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<?, ?> entry = (Map.Entry<?, ?>)i.next();\n\t\t\tAni existingAni = (Ani) entry.getValue(); \n\t\t\tif (existingAni.isEnded()) {\n\t\t\t\ti.remove();\n\t\t\t}\n\t\t}\t\n\t}", "@DeleteMapping\n void removeCoin() {\n coin = false;\n }", "protected void discardExtraAccommodationOfferings(final List<String> returnedAccommodationOfferings,\n\t\t\tfinal List<PropertyData> properties)\n\t{\n\t\tfinal List<String> propertyCodes = properties.stream()\n\t\t\t\t.map(PropertyData::getAccommodationOfferingCode).collect(Collectors.toList());\n\n\t\tfinal Collection<String> propertyCodeIntersection = CollectionUtils.intersection(propertyCodes, returnedAccommodationOfferings);\n\n\t\tfinal List<PropertyData> accommodationOfferingToRemove = properties.stream().filter(\n\t\t\t\taccommodationOffering -> BooleanUtils.isNotTrue(accommodationOffering.isIgnoreRules()) && !propertyCodeIntersection\n\t\t\t\t\t\t.contains(accommodationOffering.getAccommodationOfferingCode())).collect(Collectors.toList());\n\t\tproperties.removeAll(accommodationOfferingToRemove);\n\t}", "private void trimEntities() {\n \t\tList<String> chainIds = getActiveEntities();\n \t\tif (chainIds.size() > 0) {\n \t\t\tfor (Iterator<Atom> iter = atomVector.iterator();iter.hasNext();) {\n \t\t\t\tAtom atom = iter.next();\n \t\t\t\tif (!chainIds.contains(atom.chain_id)) {\n \t\t\t\t\titer.remove();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "private void removeRequests(int index) {\n ensureRequestsIsMutable();\n requests_.remove(index);\n }", "public void mo78148b() {\n HashMap hashMap = this.f53724A;\n if (hashMap != null) {\n hashMap.clear();\n }\n }", "protected abstract void removeRequest ();", "private void removeOOSBalas() {\n balasToRemove = new ArrayList<>();\n balas.forEach(bala -> {\n if(bala.getState() == Enums.BulletState.TO_REMOVE) {\n if(!balasToRemove.contains(bala)) {\n balasToRemove.add(bala);\n }\n }\n });\n balasToRemove.forEach(bala -> balas.remove(bala));\n }", "static void testRemove1(BTMap<Integer, Integer> m) {\n var keys = Arrays.asList(3, 8, 1, 0);\n\n System.out.println(keys);\n\n for (int i = 0; i < keys.size(); i++) {\n m.insert(keys.get(i), i);\n }\n\n System.out.println(m);\n\n m.remove(0);\n\n System.out.println(m);\n \n m.remove(1);\n\n System.out.println(m);\n }", "void removeAddressHistory(int i);", "private void getUnsettledTransactionListRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_UNSETTLED_TRANSACTION_LIST.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "void remove(ThreadLocal<?> key) {\n cleanUp();\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object reference = table[index];\n\n if (reference == key.reference) {\n // Success!\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n return;\n }\n\n if (reference == null) {\n // No entry found.\n return;\n }\n }\n }", "private void eliminaAccount(HttpServletRequest request, HttpServletResponse response) {\r\n HttpSession session = request.getSession();\r\n Medico medico = (Medico) session.getAttribute(\"utente\");\r\n if (medico != null) {\r\n\r\n if (PazienteModel.getPazientiSeguiti(medico.getCodiceFiscale()).size() != 0) {\r\n // non è possibile effettuare l'eliminazione, notificare al medico che non può\r\n // proseguire con l'opeazione fino a che\r\n // segue dei pazienti.\r\n } else {\r\n MedicoModel.removeMedico(medico.getCodiceFiscale());\r\n request.setAttribute(\"notifica\", \"Account eliminato con successo\");\r\n session.removeAttribute(\"utente\");\r\n session.setAttribute(\"accessDone\", false);\r\n }\r\n\r\n }\r\n\r\n }", "protected void removeIneffectiveRecords(List<BusRecord> busRecords) {\n List<BusRecord> recordsToRemove = new ArrayList<>();\n BusRecord firstRecord = busRecords.get(0);\n\n for (BusRecord secondRecord : busRecords.subList(1, busRecords.size())) {\n if (!firstRecord.getBusCompany().equals(secondRecord.getBusCompany())) {\n firstRecord = secondRecord;\n continue;\n }\n // If it starts at the same time and reaches earlier\n if (isStartsAtSameTime(firstRecord, secondRecord)) {\n if (isArriveEarlier(firstRecord, secondRecord)) {\n recordsToRemove.add(secondRecord);\n } else {\n recordsToRemove.add(firstRecord);\n firstRecord = secondRecord;\n }\n continue;\n }\n // If it starts later and reaches at the same time\n if (isStartsLater(secondRecord, firstRecord) && isArriveAtSameTime(secondRecord, firstRecord)) {\n recordsToRemove.add(firstRecord);\n }\n // If it starts later and reaches earlier\n if (isStartsLater(secondRecord, firstRecord) && isArriveEarlier(secondRecord, firstRecord)) {\n recordsToRemove.add(firstRecord);\n }\n firstRecord = secondRecord;\n }\n busRecords.removeAll(recordsToRemove);\n }", "private void discardRestrictedCards()\n\t{\n\t\tif (playerList.size() == 2)\n\t\t{\n\t\t\tfor(Card card : restrictedCard2PlayerList)\n\t\t\t{\n\t\t\t\tswitch (card.getType())\n\t\t\t\t{\n\t\t\t\t\tcase GreenPlayerCard:\n\t\t\t\t\tcase BrownPlayerCard:\n\t\t\t\t\t\tCard playerCardMatch = board.getPlayerCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (playerCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(playerCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase CityAreaCard:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PersonalityCard:\n\t\t\t\t\t\tCard personalityCardMatch = board.getPersonalityCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (personalityCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(personalityCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RandomEventCard:\n\t\t\t\t\t\tCard randomEventCardMatch = board.getRandomEventCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (randomEventCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(randomEventCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.604285", "0.56544316", "0.5614964", "0.5525384", "0.5510153", "0.5322523", "0.53167", "0.53139347", "0.5232418", "0.5166614", "0.51638836", "0.5159621", "0.5158647", "0.5121455", "0.5091757", "0.50639796", "0.5040556", "0.50275105", "0.502187", "0.5009209", "0.5004569", "0.49927318", "0.49604067", "0.49159628", "0.48921087", "0.48900232", "0.48876294", "0.48802775", "0.48714995", "0.48609367", "0.485612", "0.48475707", "0.4844368", "0.4830372", "0.48135486", "0.48025393", "0.4800899", "0.47894976", "0.47694966", "0.47637492", "0.47573373", "0.4739612", "0.47083938", "0.47081324", "0.47060993", "0.4703647", "0.4700594", "0.46973133", "0.46926206", "0.46817395", "0.46796092", "0.46741414", "0.46644926", "0.46631572", "0.46554008", "0.46536297", "0.4647756", "0.46413434", "0.4639745", "0.46385726", "0.4638447", "0.4632201", "0.46222785", "0.4617257", "0.46144322", "0.4614171", "0.46123463", "0.4602612", "0.4592028", "0.45855042", "0.45846748", "0.45816356", "0.45810127", "0.45726863", "0.4564923", "0.456438", "0.45601514", "0.45576006", "0.4549018", "0.45463502", "0.45459974", "0.45431954", "0.4542841", "0.45417273", "0.4541273", "0.45376748", "0.45358542", "0.45338464", "0.45338395", "0.453382", "0.45285663", "0.45270535", "0.45242706", "0.45144108", "0.451129", "0.4510246", "0.45065203", "0.45063278", "0.4502732", "0.45012715" ]
0.6614612
0
Creates an account with the Bank, using information in the given IDRecord to create a BankAccount object of type AGENT or AUCTION_HOUSE.
public IDRecord createAccount(IDRecord theIDRecord) { IDRecord updatedIDRecord = theIDRecord; // pull out or generate info for BankAccount String userName = updatedIDRecord.getName(); // generate an account number int acctNum = getUniqueAccountNumber(); double initBalance = updatedIDRecord.getInitialBalance(); updatedIDRecord.setNumericalID(acctNum); // Formalize info into an actual BankAccount object. // Some as-yet unused options here for future development. BankAccount.AccountType baType; switch (updatedIDRecord.getRecordType()) { case AGENT: baType = BankAccount.AccountType.AGENT; break; case AUCTION_HOUSE: baType = BankAccount.AccountType.AUCTION_HOUSE; break; case BANK: baType = BankAccount.AccountType.BANK; break; default: baType = BankAccount.AccountType.OTHER; break; } BankAccount newBankAccount = new BankAccount(baType, userName, acctNum, initBalance); // Update Bank's list(s) of accounts. // Note: at account initiation, secretKeys HashMap not relevant. hashMapOfAllAccts.put(acctNum, newBankAccount); if (baType == BankAccount.AccountType.AUCTION_HOUSE) { listOfAuctionHouseIDRecords.add(updatedIDRecord); } else if (baType == BankAccount.AccountType.AGENT) { listOfAgentIDRecords.add(updatedIDRecord); } // Send requests to the BankDisplay thread to update display // to reflect new account information updateBankDisplay(); return updatedIDRecord; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account create();", "@Override\n\tpublic void createAccount(String username, Bank bank) {\n\t\ttry {\n\t\tAccount newAccount = new Account(username, bank.getBankID(), bank.getNumOfAccounts()+1);\n\t\tbank.setNumOfAccounts(bank.getNumOfAccounts()+1);\n\t\taddAccount(bank, newAccount);\n\t\t}catch(NullPointerException e) {\n\t\t\tSystem.out.println(\"Could not find bank\");\n\t\t}\n\t\t\n\t}", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "@RolesAllowed(\"bankAdmin\")\n public Long createAccount(\n AccountDetails details,\n Long customerId)\n throws IllegalAccountTypeException, CustomerNotFoundException,\n InvalidParameterException {\n // makes a new account and enters it into db,\n Account account = null;\n Customer customer = null;\n\n Debug.print(\"AccountControllerBean createAccount\");\n\n if (details.getType() == null) {\n throw new InvalidParameterException(\"null type\");\n } else if (details.getDescription() == null) {\n throw new InvalidParameterException(\"null description\");\n } else if (details.getBeginBalanceTimeStamp() == null) {\n throw new InvalidParameterException(\"null beginBalanceTimeStamp\");\n } else if (customerId == null) {\n throw new InvalidParameterException(\"null customerId\");\n }\n\n try {\n customer = em.find(\n Customer.class,\n new Long(customerId));\n\n if (customer == null) {\n throw new CustomerNotFoundException();\n }\n } catch (Exception ex) {\n throw new EJBException(ex);\n }\n\n try {\n account = new Account(\n details.getType(),\n details.getDescription(),\n details.getBalance(),\n details.getCreditLine(),\n details.getBeginBalance(),\n details.getBeginBalanceTimeStamp());\n em.persist(account);\n account.addCustomer(customer);\n } catch (Exception ex) {\n throw new EJBException(ex);\n }\n\n return account.getId();\n }", "public void createESEAccount(String farmerId, String farmerAcctNo, Date txnTime, int type);", "int createAccount(Account account);", "public abstract void createAccount(final GDataAccount account)\n throws ServiceException;", "BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}", "void insert(CusBankAccount record);", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}", "public void createAccount(String accountType, double balance){\r\n // check what is the type of the account being created\r\n /* update the list each time an account is being created and then put it into the hashtable. Then increase the\r\n counter do this for each of the following accounts each time an account is created*/\r\n switch (accountType){\r\n case \"1\":\r\n credits[creditCounter]= new CreditCardAccount(balance);\r\n allAccounts.replace(\"CreditCard\",credits);\r\n creditCounter++;\r\n break;\r\n case \"2\":\r\n lineOfCredits[lineOfCreditCounter] = new LineOfCreditAccount(balance);\r\n allAccounts.replace(\"LineOfCredit\",lineOfCredits);\r\n lineOfCreditCounter++;\r\n break;\r\n case \"3\":\r\n chequing[chequingCounter] = new ChequingAccount(balance);\r\n allAccounts.replace(\"Chequing\",chequing);\r\n chequingCounter++;\r\n break;\r\n case \"4\":\r\n saving[savingCounter] = new SavingsAccount(balance);\r\n allAccounts.replace(\"Saving\",saving);\r\n savingCounter++;\r\n break;\r\n default:\r\n System.out.println(\"ERROR IN CREATE ACCOUNT\");\r\n break;\r\n }\r\n }", "public void createUserAccount(UserAccount account);", "public abstract void createAccount(JSONObject account);", "@POST\r\n @Path(\"/create\")\r\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public NewAccount createNewCustomerAccount(@FormParam(\"accountNumber\") int accountNumber,\r\n @FormParam(\"accountType\") String accountType,\r\n @FormParam(\"accountBalance\") double accountBalance\r\n ){\r\n return newaccountservice.createNewAccount(accountNumber, accountType, accountBalance);\r\n }", "@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public Account createAccount(Account account){\n\t\t\n\t\taccount.createdDate = new Date();\n\t\taccount.isActive = true;\n\t\t\n\t\t\n\t\taccount.person = personService.createPerson(account.person);\n\t\taccount.person.personSettings = personalSettingsService.createSettings(account.person.personSettings);\n\t\t\n\t\t\n\t\treturn account;\n\t}", "@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}", "Account create(Context context);", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "Document createAccount(String username, String accountDisplayName,\n String accountFullName, double balance, double interestRate);", "int insert(FinanceAccount record);", "int insert(BankUserInfo record);", "int insert(BankUserInfo record);", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "UserAccount createUserAccount(User user, double amount);", "public int createBank(String owner,String bankName,int type) {\n\t\tif (type==1) {\n\t\t\tbankDb.add(new NormalAccount(owner,bankName,this.bankCount));\n\t\t\tthis.bankCount+=1;\n\t\t}\n\t\telse if(type==2) {\n\t\t\tbankDb.add(new OnlyInAccount(owner,bankName,this.bankCount));\n\t\t\tthis.bankCount+=1;\n\t\t}\n\t\telse if(type==3) {\n\t\t\tbankDb.add(new OnlyOutAccount(owner,bankName,this.bankCount,10000));\n\t\t\tthis.bankCount+=1;\n\t\t}\n\t\telse {\n\t\t\t/* Invalid type defined */\n\t\t\treturn -3;\n\t\t}\n\t\t/* normally created */\n\t\treturn this.bankCount-1;\n\t}", "AionAddress createAccount(String password);", "public boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;", "public static void createAccount(String name, String address, String contactNum, String userId, String password, float initDeposit) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, new SavingsAccount(userId, password, initDeposit)));\n\t}", "public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}", "public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "private Account createAccount4() {\n Account account = new Account(\"123456004\", \"Chad I. Cobbs\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false,\n new CreditCard(\"1234123412340004\"), new CreditCard(\"4320123412340005\"));\n\n final Percentage percent50 = new Percentage(0.5);\n final Percentage percent25 = new Percentage(0.25);\n account.addBeneficiary(\"Jane\", percent25);\n account.addBeneficiary(\"Amy\", percent25);\n account.addBeneficiary(\"Susan\", percent50);\n return account;\n }", "@Override\r\n\tpublic boolean create(Account newAccount) {\n\t\treturn daoref.create(newAccount);\r\n\t}", "private Account createAccount(byte[] address) {\n return new Account(address);\n }", "@Override\n\tpublic CreditAppBankReference create(long bankReferenceId) {\n\t\tCreditAppBankReference creditAppBankReference = new CreditAppBankReferenceImpl();\n\n\t\tcreditAppBankReference.setNew(true);\n\t\tcreditAppBankReference.setPrimaryKey(bankReferenceId);\n\n\t\treturn creditAppBankReference;\n\t}", "int insert(DepAcctDO record);", "public Account createAccount(Account newAccount, Integer userId){\n if(!userRepository.existsById(userId))\n return null;\n\n List<Account> ownersAccounts = getAllAccountsFromUser(userId);\n\n // User already has two accounts, a user is allowed to have only one current account and one savings account.\n if(ownersAccounts.size() == 1) {\n Account ownersAccount = ownersAccounts.get(0);\n // User already has a current account\n if(ownersAccount.getAccountType() == Account.AccountTypeEnum.CURRENT && newAccount.getAccountType() == Account.AccountTypeEnum.CURRENT)\n return null;\n // User already has a savings account\n else if(ownersAccount.getAccountType() == Account.AccountTypeEnum.SAVINGS && newAccount.getAccountType() == Account.AccountTypeEnum.SAVINGS)\n return null;\n }\n if(!(newAccount.getAccountType() == Account.AccountTypeEnum.CURRENT || newAccount.getAccountType() == Account.AccountTypeEnum.SAVINGS))\n return null;\n\n // User does not already have an account with the same accounttype, he is allowed to make another account.\n newAccount.setIban(createIban());\n newAccount.setOwner(userId);\n\n bankAccount.addAmountToBankBalance(newAccount.getBalance());\n accountRepository.save(newAccount);\n return newAccount;\n\n }", "int insert(Account record);", "int insert(Account record);", "public Account createAccount(String accountId) throws LedgerException {\n // Check uniqueness of 'accountId'\n if (getExistingAccount(accountId) != null) {\n throw new LedgerException(\n \"create account\",\n String.format(\"The account '%s' already exists.\", accountId)\n );\n }\n\n // The accountId is unique, so create new account\n Account newAccount = new Account(accountId);\n\n // Update currentBlock with new account\n this.currentBlock.addAccount(newAccount);\n return newAccount;\n }", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "public void executeNewAccount(int account_id, int balance, Connection con) throws SQLException {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into ACCOUNTS (ACCOUNT_ID, BALANCE, TIMESTAMP) values (?,?,?)\");\n\n stmt.setInt(1, account_id);\n stmt.setInt(2, balance);\n stmt.setTimestamp(3, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n }", "public int makeNewAccount(int balance){\n int generated_id = 0;\n\n try {\n accountLock.lock();\n executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection());\n accountLock.unlock();\n\n cache.add(new Account(generated_id, balance));\n\n operationLock.lock();\n logNewAccount(currentOperationId, generated_id, balance);\n currentOperationId++;\n operationLock.unlock();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return generated_id;\n }", "int insert(AccountBankStatementImportJournalCreationEntity record);", "int insert(TmpUserPayAccount record);", "public Account(String id, String type, String accountNum, String routingNum, String balance, String profileId) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.type = type;\n\t\tthis.accountNum = accountNum;\n\t\tthis.routingNum = routingNum;\n\t\tthis.balance = balance;\n\t\tthis.profile = new Profile(profileId,\"\",\"\",\"\",\"\",0,0,\"\");\n\t}", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "public void create(UserValidator account) {\n Account validated = new Account();\n validated.setUsername(account.getUsername());\n validated.setPassword(passwordEncoder.encode(account.getPassword()));\n validated.setFirstName(account.getFirstName());\n validated.setLastName(account.getLastName());\n validated.getAuthorities().add(\"USER\");\n\n this.accountRepository.save(validated);\n }", "int insert(ShopAccount record);", "public static void createSavings(ArrayList<Account> accounts, int id, double balance, double interestRate){\n SavingsAccount sAccount = new SavingsAccount(id, balance, interestRate);\r\n \r\n //add the account just created to array\r\n accounts.add(sAccount);\r\n System.out.println(\"Your account has been created. Information of your new account is below. \\n\");\r\n \r\n //get the current index of the id and print out the info\r\n int idIndex = idIndex(accounts, sAccount.getID());\r\n System.out.println(\"Account type: Saving\");\r\n accounts.get(idIndex).displayAccountInformation();\r\n }", "public void addAccount(Account account,Person person);", "BankAccount(){\n\t\tSystem.out.println(\"NEW ACCOUNT CREATED\");\t\n\t}", "public static void createAccount(String name, String address, String contactNum, SavingsAccount savings) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, savings));\n\t}", "public BankAccount createAccount(String name, String pin, int initialDeposit) {\n\t\tString accountNumber = \"\";\n\n\t\tString sql = \"INSERT INTO accounts (id, name, pin, balance, balance_saving) VALUES(?, ?, ?, ?, ?)\";\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// not sure why this was changed, but the database should of been auto-incrementing id\n\t\t\tpstmt.setInt(1, getNumAccounts() + 1);\n\t\t\tpstmt.setString(2, name);\n\t\t\tpstmt.setString(3, pin);\n\t\t\tpstmt.setInt(4, initialDeposit);\n\t\t\tpstmt.setInt(5, 0);\n\n\t\t\tpstmt.executeUpdate();\n\t\t\tResultSet genky = pstmt.getGeneratedKeys();\n\t\t\taccountNumber = Long.toString(genky.getLong(1));\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn authenticateAccount(accountNumber, pin);\n\t}", "@Test\n @Order(4)\n void create_account_2() {\n Account empty = service.createAccount(client.getId());\n Assertions.assertEquals(client.getId(), empty.getClientId());\n Assertions.assertNotEquals(-1, empty.getId());\n Assertions.assertEquals(0, empty.getAmount());\n client.addAccount(empty);\n }", "public Account create(CheckingAccDto checkingAccDto) {\n CheckingAcc checkingAcc;\n Optional<AccountHolder> accountHolder = accountHolderRepository.findById(checkingAccDto.getPrimaryOwnerId());\n if (accountHolder.isPresent()){\n if(Utils.calculateYears(accountHolder.get().getDateOfBirth())<24){\n StudentCheckingAcc studentCheckingAcc = new StudentCheckingAcc(\n accountHolder.get(),\n new Money(checkingAccDto.getBalance()),\n checkingAccDto.getSecretKey());\n if (checkingAccDto.getSecondaryOwnerId() != null){\n Optional<AccountHolder> secondaryOwner = accountHolderRepository.findById(checkingAccDto.getSecondaryOwnerId());\n if (secondaryOwner.isPresent()){\n studentCheckingAcc.setSecondaryOwner(secondaryOwner.get());\n }\n }\n return studentCheckingAccRepository.save(studentCheckingAcc);\n } else {\n checkingAcc = new CheckingAcc (accountHolder.get(),\n new Money(checkingAccDto.getBalance()),\n checkingAccDto.getSecretKey());\n if (checkingAccDto.getSecondaryOwnerId() != null){\n Optional<AccountHolder> secondaryOwner = accountHolderRepository.findById(checkingAccDto.getSecondaryOwnerId());\n if (secondaryOwner.isPresent()){\n checkingAcc.setSecondaryOwner(secondaryOwner.get());\n }\n }\n return checkingAccRepository.save(checkingAcc);\n }\n } else {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"Primary owner not found\");\n }\n }", "private void createDriver() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L,\n new Licence(\"Full for over 2 years\", \"YXF87231\",\n LocalDate.parse(\"12/12/2015\", formatter),\n LocalDate.parse(\"12/12/2020\", formatter)));\n }", "public boolean makeNewAccount(String name, BigDecimal balance, int type)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (currentCustomerAuthenticated && currentUserAuthenticated) {\n int id = DatabaseInsertHelper.insertAccount(name, balance, type);\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n // find out what account type the account is and create and add that account to the customer\n if (type == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(id, name, balance);\n currentCustomer.addAccount(chequing);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(savings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(id, name, balance);\n currentCustomer.addAccount(tfsa);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsavings = new RestrictedSavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(rsavings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n }\n return false;\n }\n System.out.println(\"reached here\");\n throw new ConnectionFailedException();\n }", "@Override\n\tpublic Account createAccount(Account account) {\n\t\tif(account != null) {\n\t\t\taccountList.add(account);\n\t\t\treturn account;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@Test\n\tpublic void createAccountSavingTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnSaving.setSelected(true);\n\t\tdata.setRdbtnSaving(rdbtnSaving);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.SAVING.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "public Integer ejbCreate(final Integer id, final int balance, final Integer customerId) \n throws CreateException\n { \n setId(id);\n setBalance(balance);\n setCustomerId(customerId);\n PreparedStatement ps = null;\n try \n {\n \n ps = getConnection().prepareStatement(\"INSERT INTO CCBMPACCOUNT (ID, BALANCE, CUSTOMERID) VALUES (?, ?, ?)\");\n ps.setInt(1, id.intValue());\n ps.setInt(2, balance);\n ps.setObject(3, customerId);\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception in ejbCreate\", e);\n throw new CreateException(\"Can't insert: \" + e);\n } // end of try-catch\n finally\n {\n try \n {\n if (ps != null) {ps.close();}\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception closing ps: \" + e);\n } // end of try-catch\n \n } // end of finally\n return id;\n }", "void insertSelective(CusBankAccount record);", "@POST\n @Path(\"bank/account\")\n @Consumes(MediaType.APPLICATION_JSON)\n public void createBankAccount(String bankAccountDetails){\n \n System.out.println(bankAccountDetails);\n \n }", "@Given(\"^that I am a using a \\\"([^\\\"]*)\\\" account$\")\n public void thatIAmAUsingAAccount(String accountType) throws Throwable {\n if (accountType.equals(\"driver\")) {\n createDriver();\n } else {\n createPassenger();\n }\n }", "String insertClientAccount(ClientAccount account) throws ServiceException;", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "@Test\n\tpublic void createNewAccountWithOpeningBalanceSavingTest() {\n\t\tcreateAccountSavingTest();\n\t\tcreateNewAccountWithOpeningBalanceHelper();\n\t}", "public Account(String owner, int ownerID, int accountID, double growthRate){\n this.owner = owner;\n this.ownerID = ownerID;\n this.accountID = accountID;\n this.growthRate = growthRate;\n \n }", "@PostMapping(\"/account/create\")\n @PreAuthorize(\"hasRole('USER') or hasRole('ADMIN')\")\n\tpublic ResponseEntity createAccount(\n\t \t @AuthenticationPrincipal UserDetailsImpl userDetail\n\t ){\n\t\t\tAccount account = new Account(userDetail.getId());\n\t\t\t// save the account to the database\n\t\t\tAccount createdAccount = accountRepository.save(account);\n\t \t // response\n\t return ResponseEntity.ok(\n\t \t\tcreatedAccount\n\t );\n\t }", "void addBankAccountDetails(BankAccountDTO bankAccountDTO,String name)throws EOTException;", "protected void createAccount(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"CREATEACCOUNT\");\n\t\ttry {\n\t\t\tString email = args.getString(0);\n\t\t\tString password = args.getString(1);\n\t\t\tString userName = null;\n\t\t\tif (args.length() == 3) {\n\t\t\t\tuserName = args.optString(2);\n\t\t\t}\n\t\t\tNotificare.shared().createAccount(email, password, userName, new NotificareCallback<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "@Override\r\n\tpublic boolean createAccount(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.createAccount(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "public static void createChecking(ArrayList<Account> accounts, int id, double balance, double interestRate) throws IOException{\n CheckingAccount cAccount = new CheckingAccount(id, balance, interestRate);\r\n \r\n //add the account just created to array\r\n accounts.add(cAccount);\r\n System.out.println(\"Your account has been created. Information of your new account is below. \\n\");\r\n \r\n //get the current index of the id and print out the info\r\n int idIndex = idIndex(accounts, cAccount.getID());\r\n System.out.println(\"Account type: Checking\");\r\n accounts.get(idIndex).displayAccountInformation();\r\n }", "Account(int id, double balance){\r\n\t\t//sets the default values and than the specified values of the id and balance\r\n\t\tsetId(id);\r\n\t\tsetBalance(balance);\t\t \r\n\t\tsetAnnualInterestRate(0);\r\n\t\tthis.dateCreated = new Date(System.currentTimeMillis());\r\n\t }", "@Test\n\tpublic void createAccountCashTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnCash.setSelected(true);\n\t\tdata.setRdbtnCash(rdbtnCash);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.CASH.getAccountType());\n\t\tassertEquals(accountTest, account);\n\n\t}", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "public BankAccount getBalance (IDRecord idRecord) {\n\n BankAccount currentBankAccount;\n // extract the bank account number\n int theAcctNum = idRecord.getNumericalID();\n\n // find BankAccount from account -> BankAccount HashMap\n currentBankAccount = hashMapOfAllAccts.get(theAcctNum);\n\n if ( currentBankAccount == null) {\n // if no account was found, generate a generic empty account\n currentBankAccount = new BankAccount();\n\n }\n\n return currentBankAccount;\n }", "public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }", "public Account createAccount(String login, String name, String surname, String city, String street, int number) throws Exception {\r\n\t\tif (login==null || login.equals(\"\")) throw(new Exception(\"Nazwa konta nie moze byc pusta\"));\r\n\t\tif (findAccount(login)!=null) throw(new Exception(\"Konto juz istnieje\"));\r\n\t\tAccount newAccount = new Account(login, name, surname, city, street, number);\r\n\t\tlistOfAccounts.add( newAccount );\r\n\t\treturn newAccount;\r\n\t}", "public Long createRecord(Record object);", "public SavingAccount(double balance, Date dateOfCreation, String accountId, User owner) {\n\t\tsuper(balance, dateOfCreation, accountId, owner);\n\t\tthis.interestRate = 0.1/100;\n\t}", "public CreateInstanceAccountResponse CreateInstanceAccount(CreateInstanceAccountRequest req) throws TencentCloudSDKException{\n JsonResponseModel<CreateInstanceAccountResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<CreateInstanceAccountResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"CreateInstanceAccount\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "@Override\n\tpublic int addAccount(Account account) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"insert into accounts values(default, ?, ?) returning id\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setString(1, account.getType());\n\t\tprepStmt.setDouble(2, account.getBalance());\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\tint id = 0;\n\t\twhile(rs.next()) {\n\t\t\tid = rs.getInt(1);\n\t\t}\n\t\treturn id;\n\t}", "public static AccountRest createAccount(ExternalTestCurrency currency, String id) {\n\t\tAccountRestBuilder builder = createAccountBuilder(currency, id);\n\t\treturn builder.build();\n\t}", "void addBank(IBank bank) throws RemoteException;", "public static boolean createAccountAndAccountEntry(String playerName, String accountnumber, double interest, double withdrawlimit) {\n\t\tif (!accountNoExists(accountnumber)) {\n\t\t\t//Insert Account into Accounts Table\n\t\t\tString execute = \"INSERT INTO \" + EconomosConstants.DB_ACCOUNTS_TABLENAME + \" (accountno, balance, interest)\" +\n\t\t\t\t\t\" VALUES (\" + accountnumber + \", \" + interest + \", \" + EconomosConstants.INTEREST_AMOUNT + \")\";\n\t\t\tif (!SQLUtil.transactUpdate(execute)) {\n\t\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Account \" + accountnumber + \" Account MySQL DB INSERT transaction failed.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t//Insert Account Entry into AccountEntries\n\t\t\texecute = \"INSERT INTO \" + EconomosConstants.DB_ACCOUNTENTRIES_TABLENAME + \" (accountno, user, role, withdrawlimit)\" +\n\t\t\t\t\t\" VALUES (\" + accountnumber + \", '\" + playerName + \"', 'owner', \" + withdrawlimit + \")\";\n\t\t\tif (!SQLUtil.transactUpdate(execute)) {\n\t\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Account \" + accountnumber + \" AccountEntry MySQL DB INSERT transaction failed.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Account \" + accountnumber + \" created for \" + playerName + \".\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Tried to create account \" + accountnumber + \" but it already exists!\");\n\t\t\treturn false;\n\t\t}\n\t}", "public void create(Employee employee, Company company, IncomingReport incoming_report) throws IllegalArgumentException, DAOException;", "String addAccount(UserInfo userInfo);", "public void insert(AlManageOnAir record) {\r\n getSqlMapClientTemplate().insert(\"AL_MANAGE_ON_AIR.ibatorgenerated_insert\", record);\r\n }", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public RecordObject createUser(String token, Object record) throws RestResponseException;", "int insert(AddressMinBalanceBean record);", "@Test\n\tpublic void createAccountDebtsTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnDebt.setSelected(true);\n\t\tdata.setRdbtnDebt(rdbtnDebt);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.DEBITS.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "public Banking addFundsToAccount(Banking banking){\n return client.addBanking(banking);\n }", "int insertSelective(FinanceAccount record);", "public static void createAccount(String accountnumber, double interest) {\n\t\t//Insert Account into Accounts Table\n\t\tString execute = \"INSERT INTO \" + EconomosConstants.DB_ACCOUNTS_TABLENAME + \" (accountno, balance, interest)\" +\n\t\t\t\t\" VALUES (\" + accountnumber + \", \" + interest + \", \" + EconomosConstants.INTEREST_AMOUNT + \")\";\n\t\tSQLUtil.transactUpdate(execute);\n\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Bank account \" + accountnumber + \" created.\");\n\t}" ]
[ "0.6347872", "0.6293336", "0.6246937", "0.6200399", "0.6102208", "0.60880244", "0.60770845", "0.607569", "0.598044", "0.5974487", "0.59423447", "0.5887922", "0.58776546", "0.5873148", "0.58022696", "0.5791693", "0.57887864", "0.57791275", "0.5777508", "0.5708969", "0.5676835", "0.56527877", "0.56336045", "0.56336045", "0.56244904", "0.5622908", "0.56191254", "0.56157535", "0.561448", "0.56034267", "0.5596587", "0.55848724", "0.5556902", "0.5554576", "0.55440277", "0.5532279", "0.55309993", "0.552848", "0.55276257", "0.55241734", "0.55166394", "0.55166394", "0.5494405", "0.54736644", "0.54596007", "0.5456258", "0.543308", "0.5425112", "0.54136086", "0.5409893", "0.5402353", "0.5371867", "0.53676045", "0.5348712", "0.5344011", "0.53180224", "0.5308258", "0.53039104", "0.5301334", "0.5294818", "0.5294451", "0.5293203", "0.5277238", "0.5276406", "0.52721477", "0.5270144", "0.527003", "0.5268893", "0.5267963", "0.52459294", "0.52366453", "0.5229563", "0.5223592", "0.5221731", "0.5219641", "0.5204847", "0.51882696", "0.5186584", "0.5171818", "0.5167276", "0.51635635", "0.5150461", "0.514683", "0.5130027", "0.51179224", "0.51176244", "0.51157665", "0.51129305", "0.5108434", "0.5104479", "0.508592", "0.50732017", "0.5070836", "0.50704986", "0.5063936", "0.5059527", "0.5051534", "0.50512666", "0.5049327", "0.50451106" ]
0.7492748
0
Generates and returns an integer "secret key" used to link an Agent account with an Auction House account, enabling the Agent and Auction House to do business with each other.
public int createSecretKey (AccountLink theAccountLink) { // should verify that the accountlink contains valid account #s // generate a unique secret key int aSecretKey = getUniqueSecretKey(); // store away that secret key in HashMap with theAccountLink hashMapOfSecretKeys.put(aSecretKey, theAccountLink); return aSecretKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }", "private String generateSecretKey(){\n SecureRandom random = new SecureRandom();\n byte[] bytes = new byte[20];\n\n random.nextBytes(bytes);\n Base32 base32 = new Base32();\n return base32.encodeToString(bytes);\n }", "private static Key generateKey() {\n return new SecretKeySpec(keyValue, ALGO);\n }", "public int generateKey() {\n SecureRandom secureRandom = new SecureRandom();\n try {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return secureRandom.nextInt(26);\n }", "void generateSecretKey() {\n\n Random rand = new Random();\n \n // randomly generate alphabet chars\n this.secretKey.setCharAt(0, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(1, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(4, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(5, (char) (rand.nextInt(26) + 'a'));\n\n // randomly generate special chars\n // special chars are between 33-47 and 58-64 on ASCII table\n if (rand.nextBoolean()) {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(15) + '!'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(15) + '!'));\n } else {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(7) + ':'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(7) + ':'));\n }\n \n // randomly generate int between 2 and 5\n this.secretKey.setCharAt(7, (char) (rand.nextInt(4) + '2'));\n }", "java.lang.String getServerSecret();", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "private String key() {\n return \"secret\";\n }", "java.lang.String getSecret();", "String getSecret();", "private static String generateSecret(Accessor accessor, Consumer consumer) {\n return generateHash(accessor.getToken() + consumer.getSecret() + System.nanoTime());\n }", "public static KeyPair createKeyPair(){\n KeyPair pair = KeyPair.random();\n System.out.println(pair.getSecretSeed());\n System.out.println(pair.getAccountId());\n return pair;\n\n }", "public int getSecret() {\n return secret;\n }", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "public String generateApiKey() {\r\n\t\t\r\n\t\tString key = \"\";\r\n\t\t\r\n\t\tfor (int i = 0; i < API_LENGTH; i++) {\r\n\t\t\tchar letter = (char) (Math.random() * (90 - 65 + 1) + 65);\r\n\t\t\tkey += letter;\r\n\t\t}\r\n\t\t\r\n\t\treturn key;\r\n\t}", "public String generateClientSecret() {\n return clientSecretGenerator.generate().toString();\n }", "private int getUniqueSecretKey () {\n\n int minInt = 100000;\n int maxInt = 999999;\n int candidateNumber = -1;\n Set<Integer> listOfCurrentSecretKeys =\n hashMapOfSecretKeys.keySet();\n boolean numberIsUnique = false;\n while ( !numberIsUnique ) {\n\n candidateNumber = rng.nextInt(maxInt+1);\n // assume unique for a moment\n numberIsUnique = true;\n // verify uniqueness assumption\n for ( int theNum : listOfCurrentSecretKeys) {\n if (candidateNumber == theNum) {\n numberIsUnique = false;\n break;\n }\n } // end for() loop\n\n } // end while() loop\n\n return candidateNumber;\n }", "private SecretKey generateSecretKey() throws NoSuchAlgorithmException {\n final KeyGenerator keygen = KeyGenerator.getInstance(KEYSPEC_ALGORITHM);\n keygen.init(KEY_SIZE, mRandom);\n return keygen.generateKey();\n }", "public static String getApiKey() {\n String sep = \"-\";\n String a = BuildConfig.GUARD_A;\n String b = BuildConfig.GUARD_B;\n String c = BuildConfig.GUARD_C;\n String d = BuildConfig.GUARD_D;\n String e = BuildConfig.GUARD_E;\n return b+sep+a+sep+d+sep+c+sep+e;\n }", "public String getSecretKey();", "public static String generateHalfKey(){\n return randomChars(HALF_KEY_LENGTH);\n }", "short generateKeyAndWrap(byte[] applicationParameter, short applicationParameterOffset, byte[] publicKey, short publicKeyOffset, byte[] keyHandle, short keyHandleOffset, byte info);", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(RESET_CODE_DIGIT_COUNT);\n }", "public Key generateKey2(int l) throws IOException{\n int b = l/32;\r\n int [] unos = new int[b];\r\n for(int i=0;i<b;i++){\r\n unos[i] = 1;\r\n }\r\n byte [] aB = int2byte(unos);\r\n\r\n return new SecretKeySpec(aB, \"AES\");\r\n }", "public static SecretKey generateSecretKey() {\r\n\t\t// generate a secret symmetric key\r\n\t\ttry {\r\n\t\t\tKeyGenerator keyGenerator = KeyGenerator.getInstance(symmetricKeyAlgorithm);\r\n\t\t\tkeyGenerator.init(SYMMETRIC_KEY_LENGTH);\r\n\t\t\treturn keyGenerator.generateKey();\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\t// should not happen\r\n\t\t\tthrow new ModelException(\"Internal Error-- unable to generate key\",e);\r\n\t\t}\r\n\t}", "public abstract String getSecret();", "private static int getSecretNum(int arg1) {\n Random rand = new Random();\n return rand.nextInt(UPPERBOUND)+1; //make range 1-100\n }", "protected SecretKey generateRandomAESKey() throws GeneralSecurityException {\n fixPrng();\n // Instantiante KeyGenerator\n KeyGenerator keyGenerator = KeyGenerator.getInstance(AES_INSTANCE);\n // Initialize generator with the desired keylength\n keyGenerator.init(AES_128);\n // Return new key\n return keyGenerator.generateKey();\n }", "public String generateId() {\n return Utils.generateKey();\n }", "String getSecretByKey(String key);", "public String generateKey(long duration) throws Exception;", "public void generateNewSecret() {\r\n \r\n //Get Random Number With Correct Digits\r\n int intRand = randomNumberGenerator.nextInt((int)(Math.pow(10, numDigits) - Math.pow(10, numDigits - 1))) + (int)Math.pow(10, numDigits - 1);\r\n \r\n //Set To String\r\n String strRand = String.valueOf(intRand);\r\n \r\n //Set Value\r\n secretNumber = convertNumToDigitArray(strRand);\r\n \r\n }", "public void generateEphemeralKey(){\n esk = BIG.randomnum(order, rng); //ephemeral secret key, x\n epk = gen.mul(esk); //ephemeral public key, X = x*P\n }", "com.google.protobuf.ByteString getSecretBytes();", "public String getAppKey(Integer appId) {\n\t\treturn \"d3d1f52452be41aaa1b68e33d59d0188\";\n\t}", "com.google.protobuf.ByteString\n getServerSecretBytes();", "byte[] get_node_secret();", "public static String generateShortActivationKey() {\n return RandomStringUtils.randomNumeric(SHORT_DEF_COUNT);\n }", "public static SecretKey generateSecretKey(PrivateKey privateKeySelf, PublicKey publicKeyOther)\n\t\t\tthrows InvalidKeyException, NoSuchAlgorithmException {\n\t\treturn DHAlgorithm.agreeSecretKey(privateKeySelf, publicKeyOther);\n\t}", "public short key();", "public void generateKey() {\n\twhile(true){\n\t rsaKeyA = (int)(Math.random()*20000 + 26);\n\t if(isPrime(rsaKeyA)){\n\t\tbreak;\n\t }\n\t}\n\twhile(true){\n\t rsaKeyB = (int)(Math.random()* 20000 + 26);\n\t if(isPrime(rsaKeyB)&& rsaKeyB != rsaKeyA){\n\t\tbreak;\n\t }\n\t}\n \n }", "public String getSecretKey() {\n return secretKey;\n }", "public SecretKey getSecretKey() {\n return secretKey;\n }", "private static Key generateKey(String secretKeyString) throws Exception {\n // generate secret key from string\n Key key = new SecretKeySpec(secretKeyString.getBytes(), \"AES\");\n return key;\n }", "private static Key generateKey() throws NoSuchAlgorithmException {\r\n\t\tif (key == null) {\r\n\t\t\tgenerator = KeyGenerator.getInstance(\"DES\");\r\n\t\t\tgenerator.init(new SecureRandom());\r\n\t\t\tkey = generator.generateKey();\r\n\t\t}\r\n\t\treturn key;\r\n\t}", "public static SecretKey createSecretKey() throws KeyGenerationException {\n\t\treturn cipherKeyProvider.createKey(KEY_LENGTH, GENERATOR_TYPE);\n\t}", "public final byte[] secret() {\n try {\n ByteSequence seq = new ByteSequence(this.sequence());\n seq.append(this._domainNameSeq);\n seq.append(this._creatorCert.getEncoded());\n return seq.sequence();\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n }", "public static String generateApiKey(String name) throws EndlosException {\n\t\treturn hash(Utility.generateToken(6) + DateUtility.getCurrentEpoch() + name + Utility.generateToken(8));\n\t}", "public String getSecret(String key) throws ClassicDatabaseException,ClassicNotFoundException;", "public static String generateApiKey(int length) throws NoSuchAlgorithmException {\n\n SecureRandom random = new SecureRandom();\n byte [] bytes = new byte[length/8];\n random.nextBytes(bytes);\n\n return DatatypeConverter.printHexBinary(bytes).toLowerCase();\n }", "public static Key generarKey() throws Exception{\n Key key = new SecretKeySpec(keyvalue, instancia); \n return key;\n }", "public final KeyPair generateKeyPair() {\n\t\tif (SECURE_RANDOM == null) {\n\t\t\tSECURE_RANDOM = new SecureRandom();\n\t\t}\n\t\t// for p and q we divide the bits length by 2 , as they create n, \n\t\t// which is the modulus and actual key size is depend on it\n\t\tBigInteger p = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\tBigInteger q;\n\t\tdo {\n\t\t\tq = new BigInteger(STRENGTH / 2, 64, SECURE_RANDOM);\n\t\t} while (q.compareTo(p) == 0);\n\n\t\t// lambda = lcm(p-1, q-1) = (p-1)*(q-1)/gcd(p-1, q-1)\n\t\tBigInteger lambda = p.subtract(BigInteger.ONE).multiply(q\n\t\t\t\t.subtract(BigInteger.ONE)).divide(p.subtract(BigInteger.ONE)\n\t\t\t\t.gcd(q.subtract(BigInteger.ONE)));\n\n\t\tBigInteger n = p.multiply(q); // n = p*q\n\t\tBigInteger nsquare = n.multiply(n); // nsquare = n*n\n\t\tBigInteger g;\n\t\tdo {\n\t\t\t// generate g, a random integer in Z*_{n^2}\n\t\t\tdo {\n\t\t\t\tg = new BigInteger(STRENGTH, 64, SECURE_RANDOM);\n\t\t\t} while (g.compareTo(nsquare) >= 0\n\t\t\t\t\t|| g.gcd(nsquare).intValue() != 1);\n\n\t\t\t// verify g, the following must hold: gcd(L(g^lambda mod n^2), n) =\n\t\t\t// 1,\n\t\t\t// where L(u) = (u-1)/n\n\t\t} while (g.modPow(lambda, nsquare).subtract(BigInteger.ONE).divide(n)\n\t\t\t\t.gcd(n).intValue() != 1);\n\n\t\t// mu = (L(g^lambda mod n^2))^{-1} mod n, where L(u) = (u-1)/n\n\t\tBigInteger mu = g.modPow(lambda, nsquare).subtract(BigInteger.ONE)\n\t\t\t\t.divide(n).modInverse(n);\n\n\t\tPaillierPublicKey publicKey = new PaillierPublicKey(n, g, nsquare);\n\t\tPaillierPrivateKey privateKey = new PaillierPrivateKey(lambda, mu,\n\t\t\t\tnsquare, n);\n\n\t\treturn new KeyPair(publicKey, privateKey);\n\t}", "void genKey(){\n Random rand = new Random();\n int key_length = 16;\n String key_alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n StringBuilder sb = new StringBuilder(key_length);\n for(int i = 0; i < key_length; i++){\n int j = rand.nextInt(key_alpha.length());\n char c = key_alpha.charAt(j);\n sb.append(c);\n }\n this.key = sb.toString();\n }", "@Override\n public String generateKey(int round) {\n return this.key.substring(4 * round, 4 * round + 16);\n }", "DBOOtpSecret activateSecret(Long userId, Long secretId);", "public static ECKey createFromPassphrase(String secret) {\n byte[] hash = null;\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n md.update(secret.getBytes(\"UTF-8\"));\n hash = md.digest();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n ECKey key = new ECKey(new SecureRandom(hash));\n return key;\n }", "byte[] genKeyBlock(byte[] mastersecret, int[]clientRandom, int[]serverRandom) throws NoSuchAlgorithmException, IOException{\n byte[] part1 = md5andshaprocessing(\"AA\", mastersecret, clientRandom, serverRandom);\r\n byte[] part2 = md5andshaprocessing(\"BB\", mastersecret, clientRandom, serverRandom);\r\n byte[] part3 = md5andshaprocessing(\"CCC\", mastersecret, clientRandom, serverRandom);\r\n byte[] part4 = md5andshaprocessing(\"DDDD\", mastersecret, clientRandom, serverRandom);\r\n byte[] part5 = md5andshaprocessing(\"EEEEE\", mastersecret, clientRandom, serverRandom);\r\n byte[] part6 = md5andshaprocessing(\"FFFFFF\", mastersecret, clientRandom, serverRandom);\r\n \r\n baos.write(part1);\r\n baos.write(part2);\r\n baos.write(part3);\r\n baos.write(part4);\r\n baos.write(part5);\r\n baos.write(part6);\r\n \r\n byte[] keyblock = baos.toByteArray();\r\n baos.reset();\r\n \r\n client_macsecret = new byte[20];\r\n server_macsecret = new byte[20];\r\n client_writekey = new byte[24];\r\n server_writekey = new byte[24];\r\n \r\n System.arraycopy(keyblock, 0, client_macsecret, 0, 20);\r\n System.arraycopy(keyblock, 20, server_macsecret, 0, 20);\r\n System.arraycopy(keyblock, 40, client_writekey, 0, 24);\r\n System.arraycopy(keyblock, 64, server_writekey, 0, 24);\r\n return keyblock;\r\n }", "public String getRandomKey() {\n return randomKey;\n }", "public String getAppsecret() {\n return appsecret;\n }", "String getComponentAppSecret();", "public String getSecretKey() {\n return properties.getProperty(SECRET_KEY);\n }", "byte[] generateMasterSecret(String type, byte[]secret, int[]clientRandom, int[]serverRandom) throws NoSuchAlgorithmException, IOException{\n byte[] part1 = md5andshaprocessing(\"AA\", secret, clientRandom, serverRandom);\r\n byte[] part2 = md5andshaprocessing(\"BB\", secret, clientRandom, serverRandom);\r\n byte[] part3 = md5andshaprocessing(\"CCC\", secret, clientRandom, serverRandom);\r\n \r\n /* using ByteArrayOutputStream to concatenate the 3 parts */\r\n \r\n baos.write(part1);\r\n baos.write(part2);\r\n baos.write(part3);\r\n \r\n byte[] result = baos.toByteArray();\r\n\r\n System.out.println(\"The \" + type + \" is indeed 48 bytes: \" + result.length);\r\n System.out.println(type + \" to string: \" + Base64.getEncoder().encodeToString(result) + \"\\n\");\r\n \r\n baos.reset();\r\n \r\n return result;\r\n }", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "public String generateActivationId() {\n return UUID.randomUUID().toString();\n }", "public static byte[] getSecret()\r\n/* 136: */ {\r\n/* 137: */ try\r\n/* 138: */ {\r\n/* 139:122 */ return getPropertyBytes(\"secret\");\r\n/* 140: */ }\r\n/* 141: */ catch (Exception e)\r\n/* 142: */ {\r\n/* 143:124 */ log.warning(\"Error getting secret: \" + e.getMessage());\r\n/* 144: */ }\r\n/* 145:126 */ return new byte[0];\r\n/* 146: */ }", "private static byte[] genKey(String algorithm, int keySize) throws NoSuchAlgorithmException {\n KeyGenerator keyGenerator = KeyGenerator.getInstance(algorithm);\n\n keyGenerator.init(keySize);\n\n SecretKey secretKey = keyGenerator.generateKey();\n\n return secretKey.getEncoded();\n }", "protected static boolean[] generateSecretKey() {\n\n\t\t//Creating the key generator\n\n\t\tKeyGenerator gen = null;\n\t\ttry {\n\t\t gen = KeyGenerator.getInstance(\"AES\");\n\t\t} catch (NoSuchAlgorithmException e1) {\n\t\t System.out.println(\"Algoritmo non supportato\");\n\t\t System.exit(1);\n\t\t}\n\n\t\t//Generating the secret key\n\n\t\tgen.init(new SecureRandom());\n\n\t\tKey k = gen.generateKey();\n\t\tbyte[] key = k.getEncoded();\n\t\t\n\t\tString stringKey = Base64.getEncoder().encodeToString(key);\n\t\t\n\t\tJTextArea textarea= new JTextArea(stringKey);\n\t\ttextarea.setEditable(false);\n\t\tJOptionPane.showMessageDialog(null, textarea, \"This is your SECRET KEY, keep it safe!\", JOptionPane.WARNING_MESSAGE);\n\t\t\n\t\tStego_Model\tmodel = new Stego_Model();\n\t\tboolean[] boolSecretKey = model.bytesToBooleans(key);\n\t\treturn boolSecretKey;\n\t\t}", "DBOOtpSecret storeSecret(Long userId, String secret);", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "public void generateKeyPair() {\n\t\ttry {\n\t\t\tKeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"DSA\", \"SUN\");\n\t\t\tSecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n\t\t\tkeyGen.initialize(1024, random);\n\t\t\tKeyPair pair = keyGen.generateKeyPair();\n\t\t\tprivateKey = pair.getPrivate();\n\t\t\tpublicKey = pair.getPublic();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static HydraKey generateKey() throws NoSuchAlgorithmException {\n // Sets the keygenerator to use blowfish key\n KeyGenerator keygen = KeyGenerator.getInstance(ALGORITHM_DEFAULT);\n keygen.init(128); // set a keylength of 128 bits\n SecretKey secret_key = keygen.generateKey();\n HydraKey hk = new HydraKey(secret_key.getEncoded(), ALGORITHM_DEFAULT);\n return hk;\n }", "protected byte[] engineSharedSecret() throws KeyAgreementException {\n return Util.trim(ZZ);\n }", "public GenerateKey() {\n\t\tsuper(\"generate_key\", org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER, org.jooq.impl.SQLDataType.VARCHAR);\n\n\t\tsetReturnParameter(RETURN_VALUE);\n\t\taddInParameter(LICENSE_DATE);\n\t\taddInParameter(EMAIL);\n\t}", "public static Tuple<String, String> generateKey() {\r\n\t\t// Get the KeyGenerator\r\n\t\ttry {\r\n\t\t\tKeyGenerator kgen;\r\n\t\t\tkgen = KeyGenerator.getInstance(\"AES\");\r\n\t\t\tkgen.init(256);\r\n\t\t\t// Generate the secret key specs.\r\n\t\t\tSecretKey skey = kgen.generateKey();\r\n\t\t\tbyte[] raw = skey.getEncoded();\r\n\t\t\tString key = new Base64().encodeAsString(raw);\r\n\r\n\t\t\tSecureRandom randomSecureRandom = SecureRandom\r\n\t\t\t\t\t.getInstance(\"SHA1PRNG\");\r\n\t\t\tCipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\r\n\t\t\tbyte[] iv = new byte[cipher.getBlockSize()];\r\n\t\t\trandomSecureRandom.nextBytes(iv);\r\n\t\t\tString ivStr = new Base64().encodeAsString(iv);\r\n\t\t\treturn new Tuple(key, ivStr);\r\n\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\tLogger.error(\"Error while generating key: %s\",\r\n\t\t\t\t\t\"NoSuchAlgorithmException\");\r\n\t\t} catch (NoSuchPaddingException e) {\r\n\t\t\tLogger.error(\"Error while generating key: %s\",\r\n\t\t\t\t\t\"NoSuchPaddingException\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static String generateAuthToken() throws EndlosException {\n\t\treturn hash(Utility.generateToken(6) + DateUtility.getCurrentEpoch() + Utility.generateToken(8));\n\t}", "public String getSecretKey() {\n return getProperty(SECRET_KEY);\n }", "private String getTOTPCode(String secretKey){\n Base32 base32 = new Base32();\n byte[] bytes = base32.decode(secretKey);\n String hexKey = Hex.encodeHexString(bytes);\n\n return TOTP.getOTP(hexKey);\n }", "public String encodeKey() {\n byte[] keyByte = secretKey.getEncoded();\n return Base64.getEncoder().encodeToString(keyByte);\n }", "private static byte[] generateSymetricKey(int length) {\n\t\tSecureRandom random = new SecureRandom();\n\t\tbyte[] keyBytes = new byte[length];\n\t\trandom.nextBytes(keyBytes);\n\t\tSecretKeySpec key = new SecretKeySpec(keyBytes, \"AES\");\n\t\treturn key.getEncoded();\n\t}", "public int generateSessionID(){\r\n SecureRandom randsession = new SecureRandom();\r\n return randsession.nextInt(1234567890);\r\n }", "private void generateIntegrityKeyPair(boolean clientMode) throws UnsupportedEncodingException, IOException, NoSuchAlgorithmException {\n byte[] cimagic = CLIENT_INT_MAGIC.getBytes(encoding);\n byte[] simagic = SVR_INT_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n byte[] keyBuffer = new byte[H_A1.length + cimagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, H_A1.length);\n System.arraycopy(cimagic, 0, keyBuffer, H_A1.length, cimagic.length);\n md5.update(keyBuffer);\n byte[] Kic = md5.digest();\n System.arraycopy(simagic, 0, keyBuffer, H_A1.length, simagic.length);\n md5.update(keyBuffer);\n byte[] Kis = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST12:Kic: \", Kic);\n traceOutput(DI_CLASS_NAME, \"generateIntegrityKeyPair\", \"DIGEST13:Kis: \", Kis);\n }\n if (clientMode) {\n myKi = Kic;\n peerKi = Kis;\n } else {\n myKi = Kis;\n peerKi = Kic;\n }\n }", "@Override\n public int hashCode() {\n int i;\n int result = 17;\n i = getIdacquirente();\n result = 37*result + i;\n return result;\n }", "public static char[] getSecretKey(Context context) {\n StringBuilder builder = new StringBuilder(0x10000);\n\n builder.append(context.getPackageName());\n builder.append(Constants.HIPHEN);\n\n String appendToken = getDeviceTokenID(context);\n try {\n if (appendToken.length() > 10) {\n appendToken = appendToken.substring(2, 10);\n }\n } catch (Exception e) {\n AppUtils.debugThrowable(TAG, e);\n }\n builder.append(Constants.LEFTSQUAREBRACKET);\n builder.append(appendToken);\n builder.append(Constants.RIGHTSQUAREBRACKET);\n\n return builder.toString().toCharArray();\n\n }", "public static SecretKey getAdminSigningKey() {\n return adminSigningKey;\n }", "private KeyPair generateKeyPair() {\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n keyGen.initialize(2048, random);\n return keyGen.generateKeyPair();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n return null;\n }", "public int getUserKey() {\r\n\t\tif(email!=null&&password!=null) {\r\n\t\t\treturn (email.hashCode()+password.hashCode())/2;\r\n\t\t}else if(email!=null||password!=null) {\r\n\t\t\tif(email!=null) {\r\n\t\t\t\treturn email.hashCode();\r\n\t\t\t}else {\r\n\t\t\t\treturn password.hashCode();\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public void createSecret(final ArtifactVersion version, final Secret secret);", "private static byte[] genKeyWithSeed(String seed) throws Exception {\n\t\tKeyGenerator kg = KeyGenerator.getInstance(ALGORITHM);\n\t\tkg.init(256, new SecureRandom(seed.getBytes()));\n\n\t\tSecretKey secretKey = kg.generateKey();\n\t\treturn secretKey.getEncoded();\n\t}", "private static int nextClientId(){\n\n\t\tint id = random.nextInt(U16_MAX +1);\n\n\t\twhile(clients.containsKey(id))\n\t\t\tid = random.nextInt(U16_MAX +1);\n\n\t\treturn id;\n\t}", "public CryptographyKeysCreator() {\n Random random = new Random();\n BigInteger prime1 = BigInteger.probablePrime(256, random);\n BigInteger prime2 = BigInteger.probablePrime(256, random);\n primesMultiplied = prime1.multiply(prime2);\n BigInteger phi = prime1.subtract(BigInteger.ONE).multiply(prime2.subtract(BigInteger.ONE));\n encryptingBigInt = BigInteger.probablePrime(256, random);\n\n while (phi.gcd(encryptingBigInt).compareTo(BigInteger.ONE) > 0 && encryptingBigInt.compareTo(phi) < 0) {\n encryptingBigInt = encryptingBigInt.add(BigInteger.ONE);\n }\n\n decryptingBigInt = encryptingBigInt.modInverse(phi);\n }", "T getRandomKey();", "public String getAppSecret() {\r\n return appSecret;\r\n }", "public static Account generate() {\n return Account.fromHexString(Util.generateRandom32BytesHex());\n }", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(SHORT_DEF_COUNT);\n }", "void computeSecrets() {\n final Bytes agreedSecret =\n signatureAlgorithm.calculateECDHKeyAgreement(ephKeyPair.getPrivateKey(), partyEphPubKey);\n\n final Bytes sharedSecret =\n keccak256(\n concatenate(agreedSecret, keccak256(concatenate(responderNonce, initiatorNonce))));\n\n final Bytes32 aesSecret = keccak256(concatenate(agreedSecret, sharedSecret));\n final Bytes32 macSecret = keccak256(concatenate(agreedSecret, aesSecret));\n final Bytes32 token = keccak256(sharedSecret);\n\n final HandshakeSecrets secrets =\n new HandshakeSecrets(aesSecret.toArray(), macSecret.toArray(), token.toArray());\n\n final Bytes initiatorMac = concatenate(macSecret.xor(responderNonce), initiatorMsgEnc);\n final Bytes responderMac = concatenate(macSecret.xor(initiatorNonce), responderMsgEnc);\n\n if (initiator) {\n secrets.updateEgress(initiatorMac.toArray());\n secrets.updateIngress(responderMac.toArray());\n } else {\n secrets.updateIngress(initiatorMac.toArray());\n secrets.updateEgress(responderMac.toArray());\n }\n\n this.secrets = secrets;\n }", "public RgwAdminBuilder secretKey(String secretKey) {\n this.secretKey = secretKey;\n return this;\n }", "public static SecretKey createEntity(EntityManager em) {\n SecretKey secretKey = new SecretKey()\n .uniqueId(DEFAULT_UNIQUE_ID)\n .manuId(DEFAULT_MANU_ID)\n .assignmentStatus(DEFAULT_ASSIGNMENT_STATUS)\n .validStatus(DEFAULT_VALID_STATUS);\n return secretKey;\n }", "public int[] getSecretNumber() {\r\n \r\n //Return Value\r\n return secretNumber;\r\n \r\n }", "public BigInteger getSharedSecret(BigInteger composite)\n {\n return composite.modPow(privateKey, modulus);\n }" ]
[ "0.71376276", "0.6868146", "0.6675181", "0.6640646", "0.6624613", "0.6474579", "0.640111", "0.640111", "0.6319254", "0.62398577", "0.622042", "0.61811656", "0.6162589", "0.6145378", "0.61447984", "0.61176556", "0.6111983", "0.60149455", "0.6005208", "0.5991149", "0.5983259", "0.597772", "0.59740335", "0.59728676", "0.5959342", "0.59528697", "0.59369576", "0.593032", "0.590966", "0.5905796", "0.5881582", "0.5854995", "0.58477634", "0.5829251", "0.58160025", "0.5784258", "0.57836854", "0.5779679", "0.57598907", "0.57362777", "0.570846", "0.5693967", "0.5678327", "0.5621557", "0.56175655", "0.55962944", "0.5589976", "0.5579008", "0.557036", "0.5559074", "0.5543725", "0.5543665", "0.55404115", "0.5532667", "0.5531193", "0.5509521", "0.5481795", "0.5474992", "0.5463781", "0.54218423", "0.54204416", "0.541184", "0.53981966", "0.5384629", "0.5351331", "0.53490263", "0.5338778", "0.53132087", "0.5309254", "0.53089064", "0.5298347", "0.52858704", "0.52858317", "0.5268961", "0.52504206", "0.5250043", "0.5248868", "0.5246223", "0.52437806", "0.5230949", "0.5204602", "0.51911706", "0.5188216", "0.5187176", "0.5180087", "0.517648", "0.5172519", "0.51676285", "0.51672155", "0.51618433", "0.5159984", "0.5154367", "0.5146878", "0.5145738", "0.5140937", "0.513439", "0.51252806", "0.51236653", "0.51195484", "0.51158595" ]
0.6984137
1
Gets account balance information for the account whose account number appears in the given IDRecord.
public BankAccount getBalance (IDRecord idRecord) { BankAccount currentBankAccount; // extract the bank account number int theAcctNum = idRecord.getNumericalID(); // find BankAccount from account -> BankAccount HashMap currentBankAccount = hashMapOfAllAccts.get(theAcctNum); if ( currentBankAccount == null) { // if no account was found, generate a generic empty account currentBankAccount = new BankAccount(); } return currentBankAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "public Integer getAccountBalance(int account_id){\n Account a = cache.get(account_id);\n if(a != null) return a.getBalance();\n\n try (\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT BALANCE FROM ACCOUNTS WHERE ACCOUNT_ID = \" + account_id)) {\n\n if (res.next())\n return res.getInt(\"BALANCE\");\n } catch (SQLException ex) {\n return null;\n }\n\n return null;\n }", "public BankAccountInterface getAccount(String accountID){\n BankAccountInterface account = null;\n for(int i = 0; i < accounts.size(); i++){\n if(accounts.get(i).getAccountID().equals(accountID)){\n account = accounts.get(i);\n break;\n } \n }\n return account;\n }", "AccountDetail getAccount(String number) throws Exception;", "public BankAccount getBankAccount(int accountNumber) {\n\t\tString sql = \"SELECT id, name, balance, balance_saving FROM accounts WHERE id = ?\";\n\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\tpstmt.setInt(1, accountNumber);\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\t// loop through the result set\n\t\t\tif (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tint checking_balance = rs.getInt(\"balance\");\n\t\t\t\tint saving_balance = rs.getInt(\"balance_saving\");\n\t\t\t\treturn new BankAccount(id, name, checking_balance, saving_balance);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n\tpublic Account getAccount(Integer id) {\n\t\tfor(Account account:accountList) {\n\t\t\tif(id.compareTo(account.returnAccountNumber()) == 0 ) {\n\t\t\t\treturn account;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public BankAccount findAccountById(int currentBankID) throws SQLException;", "@Override\n public ResponseEntity<ResponseAccountBalance> getAccountBalanceById(String accountId) {\n\n final String url = \"https://sandbox.platfr.io/api/gbs/banking/v2/accounts/\"+accountId+\"/balance\";\n //=======================================================================\n //============================= HEADER ==================================\n //=======================================================================\n HttpHeaders requestHeaders = new HttpHeaders();\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n requestHeaders.set(\"Auth-Schema\",\"S2S\");\n\n HttpEntity<AccountBalance> entity = new HttpEntity<>(requestHeaders);\n // Send request with GET method, and Headers.\n return restTemplate.exchange(url,HttpMethod.GET, entity, ResponseAccountBalance.class);\n\n }", "private Account getAccount( int accountNumber )\n {\n for( Account currentAccount : accounts )\n {\n if( currentAccount.getAccountNumber() == accountNumber )\n {\n return currentAccount;\n }\n \n }\n return null;\n }", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public Account getAccountByID(int id)//This function is for getting account for transfering amount\r\n {\r\n return this.ac.stream().filter(ac1 -> ac1.getAccId()==id).findFirst().orElse(null);\r\n }", "private Account getAccount(int accountNumber) {\r\n // loop through accounts searching for matching account number\r\n for (Account currentAccount : accounts) {\r\n // return current account if match found\r\n if (currentAccount.getAccountNumber() == accountNumber) {\r\n return currentAccount;\r\n }\r\n }\r\n\r\n return null; // if no matching account was found, return null\r\n }", "public long balanceForAccount(int acctnum) {\n if (acctnum != -1) {\n return mAccounts.get(acctnum).balance();\n } else {\n long sum = 0;\n for (HDAccount hda : mAccounts)\n sum += hda.balance();\n return sum;\n }\n }", "public MnoAccount getAccountById(String id);", "public static void getAcountsBalance(int value) {\n\t\t\t\n\t\t\taccounts.clear();\n\n\t\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t\t \"from ser322.account,ser322.customer \" + \n\t\t \"WHERE customer.accID = account.accID AND balance =\" + value;\n\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t\t ResultSet rs = stmt.executeQuery(query);\n\t\t while (rs.next()) {\n\t\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t\t \n\t\t }\n\t\t \n\t\t } catch (SQLException e ) {\n\t\t \tSystem.out.println(\"QUERY WRONG - getAcountsBalance\");\n\t\t }\n\t\n\t\t}", "public synchronized double getBalanceForAccId(int AccId) {\n\t\tConnection dbAccess = DataAccess.getDbAccess();\n\t\tPreparedStatement psttmnt;\n\t\tResultSet rs;\n\t\tString querySting;\n\t\tdouble balance = -1.0;\n\t\ttry {\n\t\t\tquerySting = \"SELECT acc_balance FROM accounts where acc_id = \" + AccId;\n\t\t\tpsttmnt = dbAccess.prepareStatement(querySting);\n\t\t\trs = psttmnt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tbalance = rs.getDouble(\"acc_balance\");\n\t\t\t}\n\t\t\tdbAccess.close();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn balance;\n\t}", "public double getBankAccountBalance() {\r\n\t\t\r\n\t\tdouble balance = 0.0;\r\n\t\t\r\n\t\t\t\tif( customerBankAccountList.contains(this.getCustomer() ) ) \r\n\t\t\t\t{\t\r\n\t\t\t\t\tbalance = this.getCustomer().getBalance();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn balance;\r\n\t\t}", "@Override\n public AccountDto getBalance(AccountNumberDto accountNumber) {\n AccountEntity accountEntity = new AccountDaoImpl(new StatementsRunnerImpl()).readBalance(accountNumber);\n return new AccountDto(accountEntity.getId(), accountNumber.getAccountNumber(), accountEntity.getCurrency());\n }", "public IDRecord createAccount(IDRecord theIDRecord) {\n\n IDRecord updatedIDRecord = theIDRecord;\n\n // pull out or generate info for BankAccount\n String userName = updatedIDRecord.getName();\n\n // generate an account number\n int acctNum = getUniqueAccountNumber();\n double initBalance = updatedIDRecord.getInitialBalance();\n updatedIDRecord.setNumericalID(acctNum);\n\n // Formalize info into an actual BankAccount object.\n // Some as-yet unused options here for future development.\n BankAccount.AccountType baType;\n switch (updatedIDRecord.getRecordType()) {\n case AGENT:\n baType = BankAccount.AccountType.AGENT;\n break;\n\n case AUCTION_HOUSE:\n baType = BankAccount.AccountType.AUCTION_HOUSE;\n break;\n\n case BANK:\n baType = BankAccount.AccountType.BANK;\n break;\n\n default:\n baType = BankAccount.AccountType.OTHER;\n break;\n }\n BankAccount newBankAccount =\n new BankAccount(baType, userName, acctNum, initBalance);\n\n // Update Bank's list(s) of accounts.\n // Note: at account initiation, secretKeys HashMap not relevant.\n hashMapOfAllAccts.put(acctNum, newBankAccount);\n if (baType == BankAccount.AccountType.AUCTION_HOUSE) {\n\n listOfAuctionHouseIDRecords.add(updatedIDRecord);\n\n } else if (baType == BankAccount.AccountType.AGENT) {\n\n listOfAgentIDRecords.add(updatedIDRecord);\n }\n\n // Send requests to the BankDisplay thread to update display\n // to reflect new account information\n updateBankDisplay();\n\n return updatedIDRecord;\n }", "public AccountDto getBalanceFor(UUID accountId) {\n Account account = repository.getAccount(accountId);\n return getAccountDtoFor(account);\n }", "Balance[] findAllByBankAccount_Id(Long id);", "Account getAccount(Integer accountNumber);", "Account getAccount(int id);", "public static Account getAccountDetails(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a account id, establish a connection\n if (cdt1) {\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n ResultSet results = DatabaseSelector.getAccountDetails(accountId, connection);\n while (results.next()) {\n // get the account details\n String name = results.getString(\"NAME\");\n BigDecimal balance = new BigDecimal(results.getString(\"BALANCE\"));\n // make an account class (either chequing, savings, or tfsa) based on the type\n if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(accountId, name, balance);\n connection.close();\n return chequing;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(accountId, name, balance);\n connection.close();\n return savings;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(accountId, name, balance);\n connection.close();\n return tfsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsa = new RestrictedSavingsAccountImpl(accountId, name, balance);\n connection.close();\n return rsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.BALANCEOWING)) {\n BalanceOwingAccount boa = new BalanceOwingAccountImpl(accountId, name, balance);\n connection.close();\n return boa;\n }\n }\n }\n return null;\n }", "public RemoteCall<BigInteger> balanceOf(String account) {\n final Function function = new Function(FUNC_BALANCEOF,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(account)),\n Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));\n return executeRemoteCallSingleValueReturn(function, BigInteger.class);\n }", "PaymentAccountScope find(final long accountID);", "public CarerAccount getAccountWithID(int search){\n\t\tCarerAccount item = null;\n\n\t\tint count = 0;\n for (int i = 0; i < CarerAccounts.size(); ++i) {\n if (CarerAccounts.get(i).getID() == search){\n\t\t\t\tcount++;\n item = CarerAccounts.get(i);\n\t\t\t}\n\t\t}\n\t\treturn item;\n\t}", "public int getBankAccount() {\n return bankAccount;\n }", "public Account getAccount(int accountid) {\n\t\treturn userDao.getAccount(accountid);\r\n\t}", "@Override\npublic Account findById(int accountid) {\n\treturn accountdao.findById(accountid);\n}", "public BankAccount closeAccount ( IDRecord theIDRecord ) {\n int theBankAccountNumber = theIDRecord.getNumericalID();\n\n // (1) Get the actual BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // (2) If such a BankAccount actually exists ...\n if (theBankAccount != null) {\n\n // (3) Check if we're dealing with an Auction House\n if ( theBankAccount.getAccountType() ==\n BankAccount.AccountType.AUCTION_HOUSE) {\n\n // 3(a) Remove account from hashMapOfAllAccts\n hashMapOfAllAccts.remove(theBankAccountNumber);\n\n // 3(b) Remove account from listOfAuctionHouseIDRecords\n // Complicated because process doesn't know how to compare\n // IDRecords (IDRecord class not over-riding .equals() method),\n // so using list.remove(Obj) does not work!\n // so we try something different …\n int indexToRemove = -1;\n for(int i = 0; i < listOfAuctionHouseIDRecords.size(); i++){\n int tempAcctNum =\n (listOfAuctionHouseIDRecords.get(i)).getNumericalID();\n if (tempAcctNum == theBankAccountNumber ) {\n indexToRemove = i;\n break;\n }\n }\n if ( indexToRemove >= 0 ) {\n listOfAuctionHouseIDRecords.remove(indexToRemove);\n }\n\n // 3(c) More difficult: remove from the HashMap of secretKeys\n Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet();\n List<Integer> secretKeysToRemove = new ArrayList<>();\n for (int i : setOfSecretKeys) {\n int tempAcctNum =\n (hashMapOfSecretKeys.get(i)).getAH_ACCOUNT_NUMBER();\n if ( tempAcctNum == theBankAccountNumber ) {\n secretKeysToRemove.add(i);\n }\n }\n // and only THEN remove the HashMap items\n // associated with those saved secretKeyToRemove items:\n if (secretKeysToRemove.size() > 0) {\n for (int i = 0; i < secretKeysToRemove.size(); i++) {\n hashMapOfSecretKeys.remove(secretKeysToRemove.get(i));\n }\n }\n\n // 3(d) then update display and return BankAccount\n updateBankDisplay();\n return theBankAccount;\n }\n // (4) if account type is AGENT and Agent has no frozen funds\n else if ( theBankAccount.getAccountType() ==\n BankAccount.AccountType.AGENT &&\n theBankAccount.getTotalFrozen() == 0.0) {\n\n // 4(a) Remove account from hashMapOfAllAccts\n hashMapOfAllAccts.remove(theBankAccountNumber);\n\n // 4(b) Remove account from listOfAgentIDRecords\n // Complicated because process doesn't know how to compare\n // IDRecords (IDRecord class not over-riding .equals() method),\n // so using list.remove(Obj) does not work!\n // so we try something different …\n int indexToRemove = -1;\n for ( int i = 0; i < listOfAgentIDRecords.size(); i++ ) {\n int tempAcctNum =\n (listOfAgentIDRecords.get(i)).getNumericalID();\n if (tempAcctNum == theBankAccountNumber ) {\n indexToRemove = i;\n break;\n }\n }\n if ( indexToRemove >= 0 ) {\n listOfAgentIDRecords.remove(indexToRemove);\n }\n\n // 4(c) More difficult: remove from the HashMap of secretKeys\n Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet();\n List<Integer> secretKeysToRemove = new ArrayList<>();\n for (int i : setOfSecretKeys) {\n int tempAcctNum =\n (hashMapOfSecretKeys.get(i)).getAGENT_ACCOUNT_NUMBER();\n if ( tempAcctNum == theBankAccountNumber ) {\n secretKeysToRemove.add(i);\n }\n }\n // and only THEN remove the HashMap items\n // associated with those saved secretKeyToRemove items:\n if (secretKeysToRemove.size() > 0) {\n for (int i = 0; i < secretKeysToRemove.size(); i++) {\n hashMapOfSecretKeys.remove(secretKeysToRemove.get(i));\n }\n }\n\n // 4(d) then update display and return BankAccount\n updateBankDisplay();\n return theBankAccount;\n\n } else {\n // valid BankAccount but:\n // not an auction house\n // not an agent with 0 frozen funds\n return new BankAccount();\n }\n\n } else {\n // null BankAccount -- cannot close\n return new BankAccount();\n }\n\n }", "public float getBalance()\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tDBConnection ToDB = new DBConnection(); //Have a connection to the DB\r\n\t\t\tConnection DBConn = ToDB.openConn();\r\n\t\t\tStatement Stmt = DBConn.createStatement();\r\n\t\t\tString SQL_Command = \"SELECT Balance FROM SavingsAccount WHERE SavingsAccountNumber ='\"+SavingsAccountNumber+\"'\"; //SQL query command for Balance\r\n\t\t\tResultSet Rslt = Stmt.executeQuery(SQL_Command);\r\n\t\t\twhile (Rslt.next())\r\n\t\t\t{\r\n\t\t\t\tBalance = Rslt.getFloat(1);\r\n\t\t\t}\r\n\t\t\tStmt.close();\r\n\t\t\tToDB.closeConn();\r\n\t\t}\r\n\t\tcatch(SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"SQLException: \" + e);\r\n\t\t\twhile (e != null)\r\n\t\t\t{ System.out.println(\"SQLState: \" + e.getSQLState());\r\n\t\t\t\tSystem.out.println(\"Message: \" + e.getMessage());\r\n\t\t\t\tSystem.out.println(\"Vendor: \" + e.getErrorCode());\r\n\t\t\t\te = e.getNextException();\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exception: \" + e);\r\n\t\t\te.printStackTrace ();\r\n\t\t}\r\n\t\treturn Balance;\r\n\t}", "public int getBankAccountNumber() {\n return bankAccountNumber;\n }", "@Override\r\n\tpublic Double getBalance( Integer id) {\n\t\tString sql = \"SELECT balance FROM buyers WHERE id = ?;\";\r\n\t\treturn jdbcTemplate.queryForObject( sql, Double.class, id);\r\n\t}", "public static void getAcountsID(int accID) {\n\t\t\n\t\taccounts.clear();\n\n\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t \"from ser322.account,ser322.customer \" + \n\t \"WHERE customer.accID = account.accID AND account.accID =\" + accID;\n\n\t\ttry {\n\t\t\t\n\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t ResultSet rs = stmt.executeQuery(query);\n\t while (rs.next()) {\n\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t }\n\t \n\t } catch (SQLException e ) {\n\t \tSystem.out.println(\"QUERY WRONG - getAcountsID\");\n\t }\n\n\t}", "List<TransactionRec> loadRecordsByAccount(BankAccount account);", "public Bill findBill(int cusID) {\n\t\treturn ab.get(cusID);\n\t}", "public BankAccount getAccountBalanceRepo(String accountNr){\n String sql = \"SELECT * FROM bankaccount WHERE accountnr = :accountnr\";\n Map paramMap = new HashMap();\n paramMap.put(\"accountnr\", accountNr);\n BankAccount result = jdbcTemplate.queryForObject(sql, paramMap, new AccountRowMapper());\n return result;\n }", "public String balance() {\n\t\treturn this.apiCall(\"balance\", \"\", \"\", true);\n\t}", "public AmountBalance findByBalance(Long bpAccountId, Long currencyId) {\r\n\t\treturn (AmountBalance) this\r\n\t\t\t\t.getEntityManager()\r\n\t\t\t\t.createNamedQuery(AmountBalance.NQ_FIND_BY_BALANCE_PRIMITIVE)\r\n\t\t\t\t.setParameter(\"clientId\",\r\n\t\t\t\t\t\tSession.user.get().getClient().getId())\r\n\t\t\t\t.setParameter(\"bpAccountId\", bpAccountId)\r\n\t\t\t\t.setParameter(\"currencyId\", currencyId).getSingleResult();\r\n\t}", "public static String getCurrentBill(String accountNumber){\n return \"select cb_bill from current_bills where cb_account = '\"+accountNumber+\"'\";\n }", "public Account getAccount(Integer id) {\n if (!accounts.containsKey(id)) {\n throw new NotFoundException(\"Not found\");\n }\n\n AccountEntry entry = accounts.get(id);\n if (entry == null) {\n throw new NotFoundException(\"Not found\");\n }\n\n // concurrency: optimistic, entry may already be excluded from accounts\n Lock itemLock = entry.lock.readLock();\n try {\n itemLock.lock();\n return entry.data;\n } finally {\n itemLock.unlock();\n }\n }", "public BankAccount getBankAccount (int secretKey) {\n // using a secretKey to obtain a BankAccount means/assumes that\n // the BankAccount belongs to an Agent that has been involved in\n // an AuctionHouse-linked transaction\n\n int theBankAccountNumber;\n // use the secretKey to get associated AccountLink\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n\n if (theAccountLink != null) { // i.e. secret key was valid\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n // secretKey appears to be invalid, return generic BankAccount\n return new BankAccount();\n }\n\n // return the associated BankAccount\n return hashMapOfAllAccts.get(theBankAccountNumber);\n\n }", "public static BigDecimal getBalance(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a valid account id, establish a connection\n if (cdt1) {\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n BigDecimal balance = DatabaseSelector.getBalance(accountId, connection);\n connection.close();\n return balance;\n }\n return null;\n }", "public void readAccountInfo(String AccountID, int PIN) {\n\t\t//get information from the database\n\t\tmysqlDWC sql = new mysqlDWC();\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsql.Connection();\n\t\tthis.AccountID=sql.GetAccountInfo(AccountID).AccountID;\n\t\tthis.PIN=PIN;\n\t\tthis.CardNo=sql.GetAccountInfo(AccountID).CardNo;\n\t\tthis.CustomerEmail=sql.GetAccountInfo(AccountID).CustomerEmail;\n\t}", "public ResultSet returnbroaccount(Long brokerId) throws Exception{\n\t\trs=DbConnect.getStatement().executeQuery(\"select BANK_ACC_NO from broker where broker_id=\"+brokerId+\"\");\r\n\t\treturn rs;\r\n\t}", "CusBankAccount selectByPrimaryKey(Integer id);", "public Integer getAccountBalance(String address) throws LedgerException {\n // Convenience variable for throwing exceptions\n String action = \"get account balance\";\n\n Account account;\n Block lastBlock;\n\n try {\n // Retrieve most recent completed block\n lastBlock = getBlock(blockMap.size());\n } catch (LedgerException e) {\n // Catch 'Block does not exist' and throw more specific exception\n throw new LedgerException(action, \"No blocks have been commited yet.\");\n }\n\n // If the account does not exist, throw an Exception\n if ( (account = lastBlock.getAccount(address)) == null ) {\n throw new LedgerException(action, \"Account does not exist.\");\n }\n\n return account.getBalance();\n }", "public int getC_BankAccount_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_BankAccount_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public float getBalance(String SavngsAcct) {\n\t\ttry\r\n\t\t{\r\n\t\t\tDBConnection ToDB = new DBConnection(); //Have a connection to the DB\r\n\t\t\tConnection DBConn = ToDB.openConn();\r\n\t\t\tStatement Stmt = DBConn.createStatement();\r\n\t\t\tString SQL_Command = \"SELECT Balance FROM SavingsAccount WHERE SavingsAccountNumber ='\"+SavingsAccountNumber+\"'\"; //SQL query command for Balance\r\n\t\t\tResultSet Rslt = Stmt.executeQuery(SQL_Command);\r\n\t\t\twhile (Rslt.next()) {\r\n\t\t\t\tBalance = Rslt.getFloat(1);\r\n\t\t\t}\r\n\t\t\tStmt.close();\r\n\t\t\tToDB.closeConn();\r\n\t\t}\r\n\t\tcatch(SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"SQLException: \" + e);\r\n\t\t\twhile (e != null)\r\n\t\t\t{ System.out.println(\"SQLState: \" + e.getSQLState());\r\n\t\t\t\tSystem.out.println(\"Message: \" + e.getMessage());\r\n\t\t\t\tSystem.out.println(\"Vendor: \" + e.getErrorCode());\r\n\t\t\t\te = e.getNextException();\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exception: \" + e);\r\n\t\t\te.printStackTrace ();\r\n\t\t}\r\n\t\treturn Balance;\r\n\t}", "java.lang.String getAccountNumber();", "public List<BankAccount> getAccountsByClientId(String clientID) {\n\n String sql = \"SELECT * FROM bankaccount WHERE bankclient_id = :bankclient_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankclient_id\", new BigDecimal(clientID));\n List<BankAccount> result = jdbcTemplate.query(sql, paramMap, new AccountRowMapper());\n return result;\n }", "@Override\n\tpublic Account getAccountById(int id) {\n\t\treturn (Account) jdbcTemplate.queryForObject(\"select * from account where id=? limit 0 , 1\", new Object[]{id}, new BeanPropertyRowMapper(Account.class));\n\t}", "public BankAccount getAccountByAccountNr(String accountNr){\n\n String sql = \"SELECT * FROM bankaccount WHERE accountnr = :accountnr\";\n Map paramMap = new HashMap();\n paramMap.put(\"accountnr\", accountNr);\n\n // check if account by given number exists\n List<BankAccount> accounts = jdbcTemplate.query(sql, paramMap, new AccountRowMapper());\n\n if(accounts.size() == 0){\n throw new ApplicationException(\"Account not found!\");\n }\n\n BankAccount result = jdbcTemplate.queryForObject(sql, paramMap, new AccountRowMapper());\n return result;\n }", "public Map<String, Integer> getAccountBalances() throws LedgerException {\n Block lastBlock;\n\n try {\n // Retrieve most recent completed block\n lastBlock = getBlock(blockMap.size());\n } catch (LedgerException e) {\n // Catch exception that 'Block does not exist' and throw a more specific error\n throw new LedgerException(\"get account balances\", \"No blocks have been committed yet.\");\n }\n\n // Get accountBalanceMap from the last committed block\n Map<String, Account> accountMap = lastBlock.getBalanceMap();\n\n // Create new map to store values\n Map<String, Integer> accountBalancesMap = new HashMap<String, Integer>();\n\n // Iterate through accounts to retrieve their current balances.\n for (Map.Entry<String, Account> entry : accountMap.entrySet() ) {\n accountBalancesMap.put(entry.getKey(), entry.getValue().getBalance());\n }\n\n return accountBalancesMap;\n }", "public BankAccount lookUp(int accountNumber){\n\t\t// create an Entry with a \"dummy\" name, zero balance and the given accountNumber\n\t\t// This \"dummy\" name will be ignored when executing getData\n\t\tBankAccount lookFor = new BankAccount(\"dummy\", accountNumber,0);\n\t\treturn (BankAccount)accountNumbersTree.findData(lookFor);\n\t}", "public int getC_BankAccount_ID();", "public String getBankID() {\n return bankID;\n }", "@Override\n\tpublic Account findAccountByAccountId(int accountId) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"select * from accounts where id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setInt(1, accountId);\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\tAccount a = null;\n\t\twhile (rs.next()) {\n\t\t\ta = new Account(rs.getInt(1), rs.getString(2), rs.getDouble(3));\n\t\t}\n\t\treturn a;\n\n\t}", "public boolean collectAccountInfo(IBankAPI bankAPI){\n\t}", "public Bank find(Integer id) {\n return em.find(Bank.class, id);\n }", "public int findAccount(String accountID) {\n // Assumes account does not exist until found\n int accPos = -1;\n for (AccountModel a : accounts) {\n if (a.getName().equals(accountID)) {\n accPos = accounts.indexOf(a);\n }\n }\n return accPos;\n }", "public void setBankAccountDetails(int C_BankAccount_ID) {\n if (C_BankAccount_ID == 0) {\n return;\n }\n setC_BankAccount_ID(C_BankAccount_ID);\n //\n String sql = \"SELECT b.RoutingNo, ba.AccountNo \"\n + \"FROM C_BankAccount ba\"\n + \" INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID) \"\n + \"WHERE C_BankAccount_ID=?\";\n try {\n PreparedStatement pstmt = DB.prepareStatement(sql, get_TrxName());\n pstmt.setInt(1, C_BankAccount_ID);\n ResultSet rs = pstmt.executeQuery();\n if (rs.next()) {\n setRoutingNo(rs.getString(1));\n setAccountNo(rs.getString(2));\n }\n rs.close();\n pstmt.close();\n } catch (SQLException e) {\n log.log(Level.SEVERE, \"setsetBankAccountDetails\", e);\n }\n }", "Accounts getAccount(int id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{KEY_ID,\n KEY_NAME, KEY_PASSWORD, KEY_PH_NO, KEY_EMAIL}, KEY_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n if (cursor != null)\n cursor.moveToFirst();\n\n Accounts account = new Accounts(Integer.parseInt(cursor.getString(0)),\n cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4));\n\n return account;\n }", "public Bank findByBankId(Integer id) {\n return (Bank) (em.find(Bank.class, id));\n\n }", "public int balance(String accountNumber, String userId) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry{\n\t\t\t//connect to database\n\t\t\tconn=DriverManager.getConnection(url, username, password);\n\t\t\tString sql = \"select balance from \"+this.name+\" where accountNumber=?\";\n\t\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\t\tps.setString(1, accountNumber.toString());\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tint nowBalance = 0;\n\t\t\twhile(rs.next()) { \n\t\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\t}\n\t\t\t\n\t\t\tString logs = \"Checked balance: \"+String.valueOf(nowBalance);\n\t\t\tString sql1 = \"insert into \"+userId+\" (log) values (?)\";\n\t\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\t\tpp.setString(1, logs);\n\t\t\tpp.executeUpdate();\n\t\t\t\n\t\t\treturn nowBalance;\n\t\t} catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "public ResultSet retBalance(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"Select balance from account where accno=\"+userid+\"\");\r\n\treturn rs;\r\n}", "public String getBankID() {\n return bankID;\n }", "List<BookAccount> findAllForAccount(long idAccount);", "public String getAccountInfo(){\n NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();\n return \"Account No : \" + accountNo +\n \"\\nName : \" + name +\n \"\\nBalance : \" + currencyFormat.format(balance);\n }", "public Account findById(String num) {\n\t\treturn null;\n\t}", "IBank getBank(int rekeningNr) throws RemoteException;", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "public Account[] search(int findBalance){\n //will find the size of the account array, then create\n //the according account array size\n int sizeAcc = 0;\n for(int i = 0; i < currAccounts; i++){\n if(bankAccounts[i].getBal() == findBalance){\n sizeAcc++;\n }\n }\n Account[] foundMatches = new Account[sizeAcc];\n //now constructs the array\n int counter = 0;\n for(int i = 0; i < currAccounts; i++){\n //don't need to check if the counter is at max\n //because we already found all the matches required\n if(bankAccounts[i].getBal() == findBalance){\n foundMatches[counter] = bankAccounts[i];\n }\n }\n\n return foundMatches;\n }", "public List<Account> getBalanceByPassbook(String passbook_id) throws Exception{\n Session session= sessionFactory.getCurrentSession();\n List<Account> accountList= session.createQuery(\"select a.balance from Account a, Passbook p where p.passbook_id='\"+passbook_id+\"'\").list();\n return AccountDto.getBalanceByPassbook(accountList);\n }", "public Record readRecord(int recordId) {\n return records[recordId];\n }", "@Override\r\n\tpublic Account getDetails(Integer personId) throws Exception {\n\t\t\r\n\t\tAccountEntity ae=entity.find(AccountEntity.class, personId);\r\n\t\t\r\n\t\tAccount a = new Account();\r\n\t\ta.setPersonId(personId);\r\n\t\ta.setDepartment(ae.getDepartment());\r\n\t\ta.setDesg(ae.getDesg());\r\n\t\ta.setSalary(ae.getSalary());\r\n\t\treturn a;\r\n\t}", "@GET\n @Path(\"bank/account/{account_id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getBankAccountDetails(@PathParam(\"account_id\") \n String accountId) {\n \n int id = Integer.parseInt(accountId);\n Account a1 = new Account(1234, 12345678, 123.47, \"Current\", id, 1);\n return Response.status(200).entity(gson.toJson(a1)).build();\n \n }", "public Account queryById(Integer id) {\n\t\treturn accountDao.queryById(id);\n\t}", "List<Account> getAccountsForCustomerId(int customerId);", "public Account getAccountByAccountNo(int accNo) {\n Account account = accountRepository.findByAccountNo(accNo);\n return account;\n }", "public static Account getAccountById(int id) throws SQLException\n {\n PreparedStatement ps = ConnectionManager\n .getConnection()\n .prepareStatement(\n \"SELECT accountId, name, address, manager FROM Account WHERE accountId = ?\");\n ps.setInt(1, id);\n\n ResultSet rs = ps.executeQuery();\n try\n {\n if (rs.next())\n return new Account(rs.getInt(1), rs.getString(2),\n rs.getString(3), rs.getBoolean(4));\n else\n throw new SQLException(\"No matching account.\");\n }\n finally\n {\n rs.close();\n ps.close();\n }\n }", "@Override\r\n\tpublic Account findById(int id) {\n\t\treturn daoref.findById(id);\r\n\t}", "java.lang.String getBankNo();", "@Override\r\n\tpublic BankAccount checkAccount(int accountNo) {\n\t\tfor (BankAccount acc : bankAccount)\r\n\t\t{\r\n\t\t\tif (acc.getAccNum() == accountNo)\r\n\t\t\t\treturn acc;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic double showBalance(String phoneNumber) throws AccountException {\n\t\treturn dao.showBalance(phoneNumber);\r\n\t}", "public Account(int id, double balance) {\n this();\n this.id = id;\n this.balance = balance;\n }", "@Override\n\tpublic double getAccountBalance(final int bankAccountId, final String vcDate, final Connection connection)\n\t{\n\t\tdouble opeAvailable = 0, totalAvailable = 0;\n\t\ttry {\n\n\t\t\tfinal StringBuilder str = new StringBuilder(\"SELECT case when sum(openingDebitBalance) = null then 0\")\n\t\t\t\t\t.append(\" ELSE sum(openingDebitBalance) end - case when sum(openingCreditBalance) = null then 0\")\n\t\t\t\t\t.append(\" else sum(openingCreditBalance) end AS \\\"openingBalance\\\" \")\n\t\t\t\t\t.append(\"FROM transactionSummary WHERE financialYearId=( SELECT id FROM financialYear WHERE startingDate <= ?\")\n\t\t\t\t\t.append(\"AND endingDate >= ?) AND glCodeId =(select glcodeid from bankaccount where id= ?)\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str);\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(str.toString());\n\t\t\tpst.setString(0, vcDate);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setInteger(2, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset)\n\t\t\t\topeAvailable = Double.parseDouble(element[0].toString());\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(\"opening balance \" + opeAvailable);\n\n\t\t\tfinal StringBuilder str1 = new StringBuilder(\"SELECT (case when sum(gl.debitAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.debitAmount) end - case when sum(gl.creditAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.creditAmount) end) + \").append(opeAvailable).append(\"\")\n\t\t\t\t\t.append(\" as \\\"totalAmount\\\" FROM generalLedger gl, voucherHeader vh WHERE vh.id = gl.voucherHeaderId\")\n\t\t\t\t\t.append(\" AND gl.glCodeid = (select glcodeid from bankaccount where id= ?) AND \")\n\t\t\t\t\t.append(\" vh.voucherDate >=( SELECT TO_CHAR(startingDate, 'dd-Mon-yyyy')\")\n\t\t\t\t\t.append(\" FROM financialYear WHERE startingDate <= ? AND endingDate >= ?) AND vh.voucherDate <= ?\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str1);\n\t\t\tpst = persistenceService.getSession().createSQLQuery(str1.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setString(2, vcDate);\n\t\t\tpst.setString(3, vcDate);\n\t\t\trset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\ttotalAvailable = Double.parseDouble(element[0].toString());\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\"total balance \" + totalAvailable);\n\t\t\t}\n\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" could not get Bankbalance \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn totalAvailable;\n\t}", "void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public Long getBusinessBankAccountId() {\n return businessBankAccountId;\n }", "public int getAccountID() {\n return accountID;\n }", "public void getBalance() {\n\t\tSystem.out.println(\"Balance in Savings account is\" + balance);\n\t\t//return balance;\n\t}", "public Account getAccount(int accound_index){\n return accounts[accound_index];\n }", "public java.lang.Object getAccountID() {\n return accountID;\n }", "@Override\n\tpublic List<Account> searchAccountById(String key) {\n\t\treturn m_managementDao.findByAccountIdContaining(key);\n\t}", "@Override\n\tpublic String getBankId(final int bankAccountId, final Connection connection)\n\t{\n\t\tString bankAndBranchId = \"null\";\n\t\ttry {\n\t\t\tfinal StringBuilder sql = new StringBuilder(\"select b.id,c.id from bankaccount a,bankbranch b,bank c\")\n\t\t\t\t\t.append(\" where a.branchid=b.id and b.bankid=c.id and a.id= ?\");\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(sql.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\tbankAndBranchId = element[0].toString();\n\t\t\t\tbankAndBranchId = bankAndBranchId + \"#\" + element[1].toString();\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\">>>bankAndBranchId \" + bankAndBranchId);\n\t\t\t}\n\t\t\tif (rset == null || rset.size() == 0)\n\t\t\t\tthrow new NullPointerException(\"Bank Code Not Found\");\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" Bank Id not found \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn bankAndBranchId;\n\t}", "Long getAccountId();", "String getAccountID();" ]
[ "0.6941769", "0.67512137", "0.64640075", "0.62407863", "0.61844534", "0.6048157", "0.5966289", "0.5966088", "0.59541625", "0.59287167", "0.5883991", "0.58536047", "0.5852192", "0.5839167", "0.58292794", "0.5820739", "0.5815158", "0.5802237", "0.57926095", "0.5769144", "0.5768267", "0.57535875", "0.5724785", "0.5696044", "0.56839955", "0.56600493", "0.5639276", "0.56195146", "0.5606156", "0.5599238", "0.55855906", "0.55813503", "0.5576953", "0.5566563", "0.55612165", "0.5514706", "0.5511093", "0.5498669", "0.54944587", "0.54794574", "0.5462604", "0.54612416", "0.5437124", "0.5434046", "0.5423715", "0.54202825", "0.5419522", "0.5418464", "0.54038054", "0.540221", "0.54000896", "0.5394726", "0.5383746", "0.53817445", "0.5376545", "0.53736395", "0.53647923", "0.5361971", "0.5352257", "0.534356", "0.5334058", "0.5330654", "0.5330411", "0.53290594", "0.5323622", "0.53228414", "0.53194374", "0.5313294", "0.531152", "0.53104675", "0.5304751", "0.5304733", "0.5297417", "0.5297417", "0.5297417", "0.52952534", "0.5286535", "0.52856994", "0.52848077", "0.5284039", "0.5259018", "0.5256762", "0.52436423", "0.5236754", "0.52361816", "0.5234066", "0.5233056", "0.5228037", "0.52163535", "0.5216337", "0.52157426", "0.52043575", "0.5200123", "0.5185458", "0.5175054", "0.51738137", "0.51725113", "0.5168202", "0.51599586", "0.5158141" ]
0.81280625
0
Gets a BankAccount object associated with a secret key. Not all BankAccount objects have an associated secret key, just those for Agents who have joined up to do business with a specific chosen Auction House.
public BankAccount getBankAccount (int secretKey) { // using a secretKey to obtain a BankAccount means/assumes that // the BankAccount belongs to an Agent that has been involved in // an AuctionHouse-linked transaction int theBankAccountNumber; // use the secretKey to get associated AccountLink AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey); if (theAccountLink != null) { // i.e. secret key was valid theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER(); } else { // secretKey appears to be invalid, return generic BankAccount return new BankAccount(); } // return the associated BankAccount return hashMapOfAllAccts.get(theBankAccountNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BankAccount getBalance (IDRecord idRecord) {\n\n BankAccount currentBankAccount;\n // extract the bank account number\n int theAcctNum = idRecord.getNumericalID();\n\n // find BankAccount from account -> BankAccount HashMap\n currentBankAccount = hashMapOfAllAccts.get(theAcctNum);\n\n if ( currentBankAccount == null) {\n // if no account was found, generate a generic empty account\n currentBankAccount = new BankAccount();\n\n }\n\n return currentBankAccount;\n }", "public BankAccount getBankAccount(int accountNumber) {\n\t\tString sql = \"SELECT id, name, balance, balance_saving FROM accounts WHERE id = ?\";\n\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\tpstmt.setInt(1, accountNumber);\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\t// loop through the result set\n\t\t\tif (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tint checking_balance = rs.getInt(\"balance\");\n\t\t\t\tint saving_balance = rs.getInt(\"balance_saving\");\n\t\t\t\treturn new BankAccount(id, name, checking_balance, saving_balance);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "public BankAccount findAccountById(int currentBankID) throws SQLException;", "public BankAccountInterface getAccount(String accountID){\n BankAccountInterface account = null;\n for(int i = 0; i < accounts.size(); i++){\n if(accounts.get(i).getAccountID().equals(accountID)){\n account = accounts.get(i);\n break;\n } \n }\n return account;\n }", "public static Bank getBank() {\n return Bank;\n }", "public Long getBusinessBankAccountId() {\n return businessBankAccountId;\n }", "Balance[] findAllByBankAccount_Id(Long id);", "@Override\n\tpublic Account getAccount(Bank bank, String username) {\n\t\tif (cache.contains(bank)){\n\t\t\tfor (Account accountInBank : bank.getAccounts()) {\n\t\t\t\tif (accountInBank.getUsername().equals(username)) {\n\t\t\t\t\treturn accountInBank;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static Bank getInstance() {\r\n\t\treturn instance;\r\n\t}", "IBank getBank(int rekeningNr) throws RemoteException;", "public Account getAccount(int accound_index){\n return accounts[accound_index];\n }", "BillingAccount getBillingAccount();", "public BankThing retrieve(String id);", "public Integer getAccountBalance(int account_id){\n Account a = cache.get(account_id);\n if(a != null) return a.getBalance();\n\n try (\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT BALANCE FROM ACCOUNTS WHERE ACCOUNT_ID = \" + account_id)) {\n\n if (res.next())\n return res.getInt(\"BALANCE\");\n } catch (SQLException ex) {\n return null;\n }\n\n return null;\n }", "public CoinbaseAccount getCoinbaseAccount(Currency currency) throws IOException {\n\n String path = \"/v2/accounts/\" + currency.getCurrencyCode();\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String signature = getSignature(timestamp, path);\n showCurl(apiKey, timestamp, signature, path);\n \n return coinbase.getAccount(Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp, currency.getCurrencyCode()).getData();\n }", "IBank getBankFromName(String bankName) throws RemoteException;", "Account getAccount(int id);", "private static long getRandAccountFromBranch(int bid) {\n int noa = uniqueAccounts.get(bid).size();\n int index = rand.nextInt(noa);\n return accounts.get(bid).get(index);\n }", "Databank getBank();", "Account getAccount(Integer accountNumber);", "public int getBankAccount() {\n return bankAccount;\n }", "com.google.ads.googleads.v6.resources.AccountBudget getAccountBudget();", "public AccountDto getBalanceFor(UUID accountId) {\n Account account = repository.getAccount(accountId);\n return getAccountDtoFor(account);\n }", "private Account getAccount( int accountNumber )\n {\n for( Account currentAccount : accounts )\n {\n if( currentAccount.getAccountNumber() == accountNumber )\n {\n return currentAccount;\n }\n \n }\n return null;\n }", "@Override\n\tpublic Bank getBank(int bankID) {\n\t\tfor (Bank bankInSet : cache.retrieveAllItems()) {\n\t\t\tif (bankInSet.getBankID() == bankID){\n\t\t\t\treturn bankInSet;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "Account getAccount();", "protected static Account userOwnsAccount(Integer accountId, Integer userId) {\n ArrayList<Account> accounts;\n try {\n accounts = AccountDatabase.retrieveAccounts(userId);\n } catch (Exception e) {\n return null;\n }\n\n for (Account accountCandidate : accounts) {\n if (accountCandidate.accountId.equals(accountId)) {\n return accountCandidate;\n }\n }\n return null;\n }", "public Bank findByBankId(Integer id) {\n return (Bank) (em.find(Bank.class, id));\n\n }", "public long getBankId() {\n return bankId;\n }", "public BankAccount closeAccount ( IDRecord theIDRecord ) {\n int theBankAccountNumber = theIDRecord.getNumericalID();\n\n // (1) Get the actual BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // (2) If such a BankAccount actually exists ...\n if (theBankAccount != null) {\n\n // (3) Check if we're dealing with an Auction House\n if ( theBankAccount.getAccountType() ==\n BankAccount.AccountType.AUCTION_HOUSE) {\n\n // 3(a) Remove account from hashMapOfAllAccts\n hashMapOfAllAccts.remove(theBankAccountNumber);\n\n // 3(b) Remove account from listOfAuctionHouseIDRecords\n // Complicated because process doesn't know how to compare\n // IDRecords (IDRecord class not over-riding .equals() method),\n // so using list.remove(Obj) does not work!\n // so we try something different …\n int indexToRemove = -1;\n for(int i = 0; i < listOfAuctionHouseIDRecords.size(); i++){\n int tempAcctNum =\n (listOfAuctionHouseIDRecords.get(i)).getNumericalID();\n if (tempAcctNum == theBankAccountNumber ) {\n indexToRemove = i;\n break;\n }\n }\n if ( indexToRemove >= 0 ) {\n listOfAuctionHouseIDRecords.remove(indexToRemove);\n }\n\n // 3(c) More difficult: remove from the HashMap of secretKeys\n Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet();\n List<Integer> secretKeysToRemove = new ArrayList<>();\n for (int i : setOfSecretKeys) {\n int tempAcctNum =\n (hashMapOfSecretKeys.get(i)).getAH_ACCOUNT_NUMBER();\n if ( tempAcctNum == theBankAccountNumber ) {\n secretKeysToRemove.add(i);\n }\n }\n // and only THEN remove the HashMap items\n // associated with those saved secretKeyToRemove items:\n if (secretKeysToRemove.size() > 0) {\n for (int i = 0; i < secretKeysToRemove.size(); i++) {\n hashMapOfSecretKeys.remove(secretKeysToRemove.get(i));\n }\n }\n\n // 3(d) then update display and return BankAccount\n updateBankDisplay();\n return theBankAccount;\n }\n // (4) if account type is AGENT and Agent has no frozen funds\n else if ( theBankAccount.getAccountType() ==\n BankAccount.AccountType.AGENT &&\n theBankAccount.getTotalFrozen() == 0.0) {\n\n // 4(a) Remove account from hashMapOfAllAccts\n hashMapOfAllAccts.remove(theBankAccountNumber);\n\n // 4(b) Remove account from listOfAgentIDRecords\n // Complicated because process doesn't know how to compare\n // IDRecords (IDRecord class not over-riding .equals() method),\n // so using list.remove(Obj) does not work!\n // so we try something different …\n int indexToRemove = -1;\n for ( int i = 0; i < listOfAgentIDRecords.size(); i++ ) {\n int tempAcctNum =\n (listOfAgentIDRecords.get(i)).getNumericalID();\n if (tempAcctNum == theBankAccountNumber ) {\n indexToRemove = i;\n break;\n }\n }\n if ( indexToRemove >= 0 ) {\n listOfAgentIDRecords.remove(indexToRemove);\n }\n\n // 4(c) More difficult: remove from the HashMap of secretKeys\n Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet();\n List<Integer> secretKeysToRemove = new ArrayList<>();\n for (int i : setOfSecretKeys) {\n int tempAcctNum =\n (hashMapOfSecretKeys.get(i)).getAGENT_ACCOUNT_NUMBER();\n if ( tempAcctNum == theBankAccountNumber ) {\n secretKeysToRemove.add(i);\n }\n }\n // and only THEN remove the HashMap items\n // associated with those saved secretKeyToRemove items:\n if (secretKeysToRemove.size() > 0) {\n for (int i = 0; i < secretKeysToRemove.size(); i++) {\n hashMapOfSecretKeys.remove(secretKeysToRemove.get(i));\n }\n }\n\n // 4(d) then update display and return BankAccount\n updateBankDisplay();\n return theBankAccount;\n\n } else {\n // valid BankAccount but:\n // not an auction house\n // not an agent with 0 frozen funds\n return new BankAccount();\n }\n\n } else {\n // null BankAccount -- cannot close\n return new BankAccount();\n }\n\n }", "public Account getAccount(int accountid) {\n\t\treturn userDao.getAccount(accountid);\r\n\t}", "public Account getAccountByOwnerAndName(String user,String accountName);", "public Bank getBank() {\r\n return bank;\r\n }", "private Account getAccount(int accountNumber) {\r\n // loop through accounts searching for matching account number\r\n for (Account currentAccount : accounts) {\r\n // return current account if match found\r\n if (currentAccount.getAccountNumber() == accountNumber) {\r\n return currentAccount;\r\n }\r\n }\r\n\r\n return null; // if no matching account was found, return null\r\n }", "public String getBankID() {\n return bankID;\n }", "@Override\n public ResponseEntity<ResponseAccountBalance> getAccountBalanceById(String accountId) {\n\n final String url = \"https://sandbox.platfr.io/api/gbs/banking/v2/accounts/\"+accountId+\"/balance\";\n //=======================================================================\n //============================= HEADER ==================================\n //=======================================================================\n HttpHeaders requestHeaders = new HttpHeaders();\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n requestHeaders.set(\"Auth-Schema\",\"S2S\");\n\n HttpEntity<AccountBalance> entity = new HttpEntity<>(requestHeaders);\n // Send request with GET method, and Headers.\n return restTemplate.exchange(url,HttpMethod.GET, entity, ResponseAccountBalance.class);\n\n }", "public List<BankAccount> getAccountsByClientId(String clientID) {\n\n String sql = \"SELECT * FROM bankaccount WHERE bankclient_id = :bankclient_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankclient_id\", new BigDecimal(clientID));\n List<BankAccount> result = jdbcTemplate.query(sql, paramMap, new AccountRowMapper());\n return result;\n }", "Bucket getBucket(K key) {\r\n\t\treturn (Bucket) buckets[key.hashCode() % numBuckets];\r\n\t}", "public Account getAccount(Player p) {\n\t\tif (p == null)\n\t\t\treturn null; // safety\n\t\t// If the account is in memory, return it\n\t\tfor ( Account a : accounts) {\n\t\t\tif (a.isFor(p.getUniqueId()))\n\t\t\t\treturn a;\n\t\t}\n\t\t// spawn a new account object with default values\n\t\tAccount acct = new Account(p.getName(), p.getUniqueId());\n\t\t// load account status from yml file, if it exists\n\t\tacct.openAccount();\n\t\t// append to the bank list\n\t\taccounts.add(acct);\n\t\treturn acct;\n\t}", "public static Account getAccount(String accountId) {\r\n return (accounts.get(accountId));\r\n }", "CusBankAccount selectByPrimaryKey(Integer id);", "public Account getAccount(int index) {\n\n\t\ttry {\n\t\t\treturn accounts.get(index);\n\t\t} catch (IndexOutOfBoundsException ex) {\n\t\t\treturn null;\n\t\t}\n\t}", "public abstract GDataAccount getFeedOwningAccount(String feedId) throws ServiceException;", "public String getBankID() {\n return bankID;\n }", "public static Account getAccountDetails(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a account id, establish a connection\n if (cdt1) {\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n ResultSet results = DatabaseSelector.getAccountDetails(accountId, connection);\n while (results.next()) {\n // get the account details\n String name = results.getString(\"NAME\");\n BigDecimal balance = new BigDecimal(results.getString(\"BALANCE\"));\n // make an account class (either chequing, savings, or tfsa) based on the type\n if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(accountId, name, balance);\n connection.close();\n return chequing;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(accountId, name, balance);\n connection.close();\n return savings;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(accountId, name, balance);\n connection.close();\n return tfsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsa = new RestrictedSavingsAccountImpl(accountId, name, balance);\n connection.close();\n return rsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.BALANCEOWING)) {\n BalanceOwingAccount boa = new BalanceOwingAccountImpl(accountId, name, balance);\n connection.close();\n return boa;\n }\n }\n }\n return null;\n }", "public List<Account> getBalanceByPassbook(String passbook_id) throws Exception{\n Session session= sessionFactory.getCurrentSession();\n List<Account> accountList= session.createQuery(\"select a.balance from Account a, Passbook p where p.passbook_id='\"+passbook_id+\"'\").list();\n return AccountDto.getBalanceByPassbook(accountList);\n }", "public double getBankAccountBalance() {\r\n\t\t\r\n\t\tdouble balance = 0.0;\r\n\t\t\r\n\t\t\t\tif( customerBankAccountList.contains(this.getCustomer() ) ) \r\n\t\t\t\t{\t\r\n\t\t\t\t\tbalance = this.getCustomer().getBalance();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn balance;\r\n\t\t}", "public Map<Integer, BankClient> getBankDatabase() {\n return bankDatabase;\n }", "AccountDetail getAccount(String number) throws Exception;", "public String getBank() {\r\n return bank;\r\n }", "public String getBank() {\r\n return bank;\r\n }", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.Account getAccount() {\r\n return account;\r\n }", "public final AfAccount getAccount(String accountName) {\n return _accounts.get(accountName);\n }", "Booking getBookingById(BookingKey bookingKey);", "public String getBank() {\n return bank;\n }", "public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}", "public int getBankAccountNumber() {\n return bankAccountNumber;\n }", "Account getAccount(Long recvWindow, Long timestamp);", "public Account getAccount(String username)\n\t {\n\t\t Account account = null;\n\t\t \n\t\t String columns[] = new String[] {DatabaseContract.AccountContract.COLUMN_NAME_USERNAME,\n\t\t\t\t \t\t\t\t\t\t\tDatabaseContract.AccountContract.COLUMN_NAME_BALANCE,\n\t\t\t\t \t\t\t\t\t\t\tDatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN};\n\t\t \n\t\t String where = DatabaseContract.AccountContract.COLUMN_NAME_USERNAME + \" = ? \";\n\t\t \n\t\t Cursor cursor = db.query(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t columns,\n\t\t\t\t where,\n\t\t\t\t new String[] {username},\n\t\t\t\t null, null, null);\n\t\t\n\t\t if(cursor.getCount() > 0)\n\t\t {\n\t\t\t cursor.moveToFirst();\n\t\t\t \n\t\t\t int userCol = cursor.getColumnIndex(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME);\n\t\t\t int balCol = cursor.getColumnIndex(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE);\n\t\t\t int authCol = cursor.getColumnIndex(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN);\n\t\t\t \n\t\t\t String usernameString = cursor.getString(userCol);\n\t\t\t String authTokenString = cursor.getString(authCol);\n\t\t\t int balance = cursor.getInt(balCol);\n\t\t\t \n\t\t\t account = new Account(usernameString, authTokenString, balance); \n\t\t }\n\t\t \n\t\t cursor.close();\n\t\t return account;\n\t }", "public BankAccount authenticateAccount(String acctNumber, String pin) {\n\t\tString sql = \"SELECT id, name, balance, balance_saving FROM accounts WHERE id = ? and pin = ?\";\n\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// set the value\n\t\t\tint acctNumberInt = 0;\n\t\t\ttry {\n\t\t\t\tacctNumberInt = Integer.parseInt(acctNumber);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tpstmt.setInt(1, acctNumberInt);\n\t\t\tpstmt.setString(2, pin);\n\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\t// loop through the result set\n\t\t\tif (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tint checking_balance = rs.getInt(\"balance\");\n\t\t\t\tint saving_balance = rs.getInt(\"balance_saving\");\n\t\t\t\treturn new BankAccount(id, name, checking_balance, saving_balance);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "public Bank find(Integer id) {\n return em.find(Bank.class, id);\n }", "private LinkedList<Entry> chooseBucket(Object key) { \t\n // hint: use key.hashCode() to calculate the key's hashCode using its built in hash function\n // then use % to choose which bucket to return.\n return buckets[key.hashCode() % buckets.length];\n }", "@Override\n\tpublic Account findAccountByAccountId(int accountId) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"select * from accounts where id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setInt(1, accountId);\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\tAccount a = null;\n\t\twhile (rs.next()) {\n\t\t\ta = new Account(rs.getInt(1), rs.getString(2), rs.getDouble(3));\n\t\t}\n\t\treturn a;\n\n\t}", "BigDecimal getClosingDebitBalance();", "BudgetKeyEntity getBudgetKeyByBudgetKey(BudgetKeyEntity budgetKeyEntity);", "public ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyAddressDescription getBank()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyAddressDescription target = null;\n target = (ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyAddressDescription)get_store().find_element_user(BANK$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public AmountBalance findByBalance(Long bpAccountId, Long currencyId) {\r\n\t\treturn (AmountBalance) this\r\n\t\t\t\t.getEntityManager()\r\n\t\t\t\t.createNamedQuery(AmountBalance.NQ_FIND_BY_BALANCE_PRIMITIVE)\r\n\t\t\t\t.setParameter(\"clientId\",\r\n\t\t\t\t\t\tSession.user.get().getClient().getId())\r\n\t\t\t\t.setParameter(\"bpAccountId\", bpAccountId)\r\n\t\t\t\t.setParameter(\"currencyId\", currencyId).getSingleResult();\r\n\t}", "public String getBank() {\n\t\tthis.setBank(this.bank);\n\t\treturn this.bank;\n\t}", "@GET\n @Path(\"bank/account/{account_id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getBankAccountDetails(@PathParam(\"account_id\") \n String accountId) {\n \n int id = Integer.parseInt(accountId);\n Account a1 = new Account(1234, 12345678, 123.47, \"Current\", id, 1);\n return Response.status(200).entity(gson.toJson(a1)).build();\n \n }", "public List<CoinbaseAccount> getCoinbaseAccounts() throws IOException {\n\n String path = \"/v2/accounts\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String signature = getSignature(timestamp, path);\n showCurl(apiKey, timestamp, signature, path);\n \n return coinbase.getAccounts(Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp).getData();\n }", "public CloudStackAccount getCurrentAccount() throws Exception {\n if (currentAccount != null) {\n // verify this is the same account!!!\n for (CloudStackUser user : currentAccount.getUser()) {\n if (user.getSecretkey() != null && user.getSecretkey().equalsIgnoreCase(UserContext.current().getSecretKey())) {\n return currentAccount;\n }\n }\n }\n // otherwise let's find this user/account\n List<CloudStackAccount> accounts = getApi().listAccounts(null, null, null, null, null, null, null, null);\n for (CloudStackAccount account : accounts) {\n CloudStackUser[] users = account.getUser();\n for (CloudStackUser user : users) {\n String userSecretKey = user.getSecretkey();\n if (userSecretKey != null && userSecretKey.equalsIgnoreCase(UserContext.current().getSecretKey())) {\n currentAccount = account;\n return account;\n }\n }\n }\n // if we get here, there is something wrong...\n return null;\n }", "public ResultSet returnbroaccount(Long brokerId) throws Exception{\n\t\trs=DbConnect.getStatement().executeQuery(\"select BANK_ACC_NO from broker where broker_id=\"+brokerId+\"\");\r\n\t\treturn rs;\r\n\t}", "UserAccount getUserAccountById(long id);", "public java.lang.String getBankaccount() {\r\n return localBankaccount;\r\n }", "List<BookAccount> findAllForAccount(long idAccount);", "public BankAccount lookUp(int accountNumber){\n\t\t// create an Entry with a \"dummy\" name, zero balance and the given accountNumber\n\t\t// This \"dummy\" name will be ignored when executing getData\n\t\tBankAccount lookFor = new BankAccount(\"dummy\", accountNumber,0);\n\t\treturn (BankAccount)accountNumbersTree.findData(lookFor);\n\t}", "public List <Account> getAllAccountsByRIB(String RIB);", "public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public static BigDecimal getBalance(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a valid account id, establish a connection\n if (cdt1) {\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n BigDecimal balance = DatabaseSelector.getBalance(accountId, connection);\n connection.close();\n return balance;\n }\n return null;\n }", "@Override\r\n\tpublic ArrayList<BankAccountVO> getBankAccountVOListByKey(String key) {\n\t\tif(key.equals(\"ss\")){\r\n\t\t\tArrayList<BankAccountVO> BAVOList = new ArrayList<>();\r\n\t\t\tBAVOList.add(new BankAccountVO(\"ss141250110\",20000));\r\n\t\t\treturn BAVOList;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AccountDto getAccountFor(int cardNumber, int cardPIN) {\n Account account = repository.getAccount(cardNumber, cardPIN);\n return getAccountDtoFor(account.getAccountId());\n }", "com.google.ads.googleads.v6.resources.AccountBudgetOrBuilder getAccountBudgetOrBuilder();", "@Override\n\tpublic List<Account> searchAccountById(String key) {\n\t\treturn m_managementDao.findByAccountIdContaining(key);\n\t}", "public AmountBalance findByBalance(BpAccount bpAccount, Currency currency) {\r\n\t\treturn (AmountBalance) this\r\n\t\t\t\t.getEntityManager()\r\n\t\t\t\t.createNamedQuery(AmountBalance.NQ_FIND_BY_BALANCE)\r\n\t\t\t\t.setParameter(\"clientId\",\r\n\t\t\t\t\t\tSession.user.get().getClient().getId())\r\n\t\t\t\t.setParameter(\"bpAccount\", bpAccount)\r\n\t\t\t\t.setParameter(\"currency\", currency).getSingleResult();\r\n\t}", "public static Account getAccountById(int id) throws SQLException\n {\n PreparedStatement ps = ConnectionManager\n .getConnection()\n .prepareStatement(\n \"SELECT accountId, name, address, manager FROM Account WHERE accountId = ?\");\n ps.setInt(1, id);\n\n ResultSet rs = ps.executeQuery();\n try\n {\n if (rs.next())\n return new Account(rs.getInt(1), rs.getString(2),\n rs.getString(3), rs.getBoolean(4));\n else\n throw new SQLException(\"No matching account.\");\n }\n finally\n {\n rs.close();\n ps.close();\n }\n }", "BankUserInfo selectByPrimaryKey(String bankUserId);", "PaymentAccountScope find(final long accountID);", "@Override\n public AccountDto getBalance(AccountNumberDto accountNumber) {\n AccountEntity accountEntity = new AccountDaoImpl(new StatementsRunnerImpl()).readBalance(accountNumber);\n return new AccountDto(accountEntity.getId(), accountNumber.getAccountNumber(), accountEntity.getCurrency());\n }", "public ClanBank getClanBank() {\n return clanBank;\n }", "@Override\npublic Account findById(int accountid) {\n\treturn accountdao.findById(accountid);\n}", "public BittrexApi(String apiKey, String secretKey) throws BittrexApiException {\n\n this.apiKey = apiKey;\n this.secretKey = secretKey;\n validateCredentials();\n }", "@JsonGetter(\"bank_account_id\")\r\n public String getBankAccountId() {\r\n return bankAccountId;\r\n }", "public BankAccount getSavingsAccount() {\n return this.savings;\n }", "public Bot getBotById(int botId) {\n final String selectQuery = \"SELECT * FROM Bots WHERE bot_id = %d;\";\n final String errorMessage = \"Error in getting bot information for bot with %d\";\n\n ResultSet retrievedBot = dbConnector.selectQuery(String.format(Locale.US, selectQuery, botId));\n try {\n while (retrievedBot.next()) {\n return toBot(retrievedBot);\n }\n } catch (SQLException e) {\n System.out.println(String.format(Locale.US, errorMessage, botId));\n }\n return null;\n }", "public Account getAccountByAccountNo(int accNo) {\n Account account = accountRepository.findByAccountNo(accNo);\n return account;\n }", "BigDecimal getClosingCreditBalance();", "public Account getAccountByAccountId(String accountId) {\n\t\treturn this.accountMapper.selectAccountByPrimaryKey(accountId);\r\n\t}", "@Nullable\n public String getBankBic() {\n return bankBic;\n }", "public Account getExistingAccount(String accountId) {\n return this.currentBlock.getAccount(accountId);\n }" ]
[ "0.5994032", "0.5816724", "0.5743985", "0.56986123", "0.5634716", "0.54490685", "0.5419221", "0.5413661", "0.5400861", "0.53964305", "0.5363028", "0.53553385", "0.53428143", "0.5340093", "0.53367597", "0.5336016", "0.53277653", "0.52973163", "0.52439666", "0.52258724", "0.5210389", "0.52030104", "0.5201417", "0.52008384", "0.5190545", "0.51810074", "0.51759446", "0.51398134", "0.5134539", "0.5134053", "0.51203066", "0.51146096", "0.5113564", "0.5106687", "0.51018494", "0.5056441", "0.50555116", "0.50503004", "0.50321937", "0.5031496", "0.50240093", "0.5019366", "0.5002567", "0.4997888", "0.4959951", "0.49596494", "0.4957534", "0.4955678", "0.4926188", "0.49216616", "0.49216616", "0.49204546", "0.49193227", "0.49151772", "0.49104774", "0.4908875", "0.49050868", "0.48934412", "0.48898146", "0.4887636", "0.48612577", "0.48567897", "0.4851956", "0.48443297", "0.48302576", "0.48281726", "0.48212636", "0.48124072", "0.4808782", "0.48053005", "0.47999552", "0.47940838", "0.47929728", "0.47913712", "0.47875273", "0.47834224", "0.47818682", "0.47773167", "0.47766078", "0.47621733", "0.47611594", "0.4750407", "0.47461638", "0.47451103", "0.4744036", "0.47412717", "0.4735558", "0.47323453", "0.47290125", "0.47275665", "0.47234148", "0.4723376", "0.4722724", "0.47191826", "0.47047397", "0.4694437", "0.46890092", "0.4686621", "0.4678494", "0.46783978" ]
0.8660592
0
Returns an ArrayList of Auction House IDRecords corresponding to Auction Houses currently having accounts with the Bank. The ArrayList might be empty, but should never be null.
public ArrayList<IDRecord> getListOfAuctionHouses () { return listOfAuctionHouseIDRecords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<BankAccount> getAccounts() {\n\t\tString sql = \"SELECT id, name, balance, balance_saving FROM accounts WHERE id > ?\";\n\n\t\tArrayList<BankAccount> bankAccounts = new ArrayList<>();\n\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// set the value\n\t\t\tpstmt.setInt(1, 0);\n\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\t// loop through the result set\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tint checking_balance = rs.getInt(\"balance\");\n\t\t\t\tint saving_balance = rs.getInt(\"balance_saving\");\n\n\t\t\t\tBankAccount bankAccount = new BankAccount(id, name, checking_balance, saving_balance);\n\t\t\t\tbankAccounts.add(bankAccount);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn bankAccounts;\n\t}", "public List<Bank> findAllBanks() {\n return em.createNamedQuery(\"Bank.findAll\").getResultList();\n\n }", "public List<Bank> findAll() {\n return em.createQuery(\"SELECT b FROM Bank b\").getResultList();\n }", "public List<Account> getAccounts() throws SQLException {\r\n\t\tList<Account> accounts = new ArrayList<>();\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\tStatement statement = connection.createStatement();\r\n\t\t// Alle Datensätze der Account-Tabelle abrufen\r\n\t\tString sql = \"SELECT * FROM account\";\r\n\t\tResultSet resultSet = statement.executeQuery(sql);\r\n\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\twhile (resultSet.next()) {\r\n\t\t\t// Datensätze in Kontoobjekte umwandeln\r\n\t\t\tint id = resultSet.getInt(1);\r\n\t\t\tString owner = resultSet.getString(2);\r\n\t\t\tString number = resultSet.getString(3);\r\n\t\t\tAccount account = new Account();\r\n\t\t\taccount.setId(id);\r\n\t\t\taccount.setOwner(owner);\r\n\t\t\taccount.setNumber(number);\r\n\t\t\taccount.setTransactions(daTransaction.getTransactionHistory(number));\r\n\t\t\taccounts.add(account);\r\n\t\t}\r\n\t\tresultSet.close();\r\n\t\tstatement.close();\r\n\t\tconnection.close();\r\n\t\treturn accounts;\r\n\t}", "public List<Record> getAccountHistory(BigDecimal bankAccountID){\n String sql = \"SELECT * FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankaccount_id\", bankAccountID);\n List<Record> result = jdbcTemplate.query(sql, paramMap, new HistoryRowMapper());\n return result;\n }", "public ArrayList getAllAccountIds() {\n\t\tConnection dbAccess = DataAccess.getDbAccess();\n\t\tStatement sttmnt;\n\t\tResultSet rs;\n\t\ttry {\n\t\t\tsttmnt = dbAccess.createStatement();\n\t\t\trs = sttmnt.executeQuery(\"SELECT acc_id FROM accounts\");\n\t\t\twhile (rs.next()) {\n\t\t\t\taccountIds.add(rs.getInt(\"acc_id\"));\n\t\t\t}\n\t\t\tdbAccess.close();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn accountIds;\n\t}", "public ArrayList<BankAccount> getAccounts() {\n return accounts;\n }", "public BankAccount closeAccount ( IDRecord theIDRecord ) {\n int theBankAccountNumber = theIDRecord.getNumericalID();\n\n // (1) Get the actual BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // (2) If such a BankAccount actually exists ...\n if (theBankAccount != null) {\n\n // (3) Check if we're dealing with an Auction House\n if ( theBankAccount.getAccountType() ==\n BankAccount.AccountType.AUCTION_HOUSE) {\n\n // 3(a) Remove account from hashMapOfAllAccts\n hashMapOfAllAccts.remove(theBankAccountNumber);\n\n // 3(b) Remove account from listOfAuctionHouseIDRecords\n // Complicated because process doesn't know how to compare\n // IDRecords (IDRecord class not over-riding .equals() method),\n // so using list.remove(Obj) does not work!\n // so we try something different …\n int indexToRemove = -1;\n for(int i = 0; i < listOfAuctionHouseIDRecords.size(); i++){\n int tempAcctNum =\n (listOfAuctionHouseIDRecords.get(i)).getNumericalID();\n if (tempAcctNum == theBankAccountNumber ) {\n indexToRemove = i;\n break;\n }\n }\n if ( indexToRemove >= 0 ) {\n listOfAuctionHouseIDRecords.remove(indexToRemove);\n }\n\n // 3(c) More difficult: remove from the HashMap of secretKeys\n Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet();\n List<Integer> secretKeysToRemove = new ArrayList<>();\n for (int i : setOfSecretKeys) {\n int tempAcctNum =\n (hashMapOfSecretKeys.get(i)).getAH_ACCOUNT_NUMBER();\n if ( tempAcctNum == theBankAccountNumber ) {\n secretKeysToRemove.add(i);\n }\n }\n // and only THEN remove the HashMap items\n // associated with those saved secretKeyToRemove items:\n if (secretKeysToRemove.size() > 0) {\n for (int i = 0; i < secretKeysToRemove.size(); i++) {\n hashMapOfSecretKeys.remove(secretKeysToRemove.get(i));\n }\n }\n\n // 3(d) then update display and return BankAccount\n updateBankDisplay();\n return theBankAccount;\n }\n // (4) if account type is AGENT and Agent has no frozen funds\n else if ( theBankAccount.getAccountType() ==\n BankAccount.AccountType.AGENT &&\n theBankAccount.getTotalFrozen() == 0.0) {\n\n // 4(a) Remove account from hashMapOfAllAccts\n hashMapOfAllAccts.remove(theBankAccountNumber);\n\n // 4(b) Remove account from listOfAgentIDRecords\n // Complicated because process doesn't know how to compare\n // IDRecords (IDRecord class not over-riding .equals() method),\n // so using list.remove(Obj) does not work!\n // so we try something different …\n int indexToRemove = -1;\n for ( int i = 0; i < listOfAgentIDRecords.size(); i++ ) {\n int tempAcctNum =\n (listOfAgentIDRecords.get(i)).getNumericalID();\n if (tempAcctNum == theBankAccountNumber ) {\n indexToRemove = i;\n break;\n }\n }\n if ( indexToRemove >= 0 ) {\n listOfAgentIDRecords.remove(indexToRemove);\n }\n\n // 4(c) More difficult: remove from the HashMap of secretKeys\n Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet();\n List<Integer> secretKeysToRemove = new ArrayList<>();\n for (int i : setOfSecretKeys) {\n int tempAcctNum =\n (hashMapOfSecretKeys.get(i)).getAGENT_ACCOUNT_NUMBER();\n if ( tempAcctNum == theBankAccountNumber ) {\n secretKeysToRemove.add(i);\n }\n }\n // and only THEN remove the HashMap items\n // associated with those saved secretKeyToRemove items:\n if (secretKeysToRemove.size() > 0) {\n for (int i = 0; i < secretKeysToRemove.size(); i++) {\n hashMapOfSecretKeys.remove(secretKeysToRemove.get(i));\n }\n }\n\n // 4(d) then update display and return BankAccount\n updateBankDisplay();\n return theBankAccount;\n\n } else {\n // valid BankAccount but:\n // not an auction house\n // not an agent with 0 frozen funds\n return new BankAccount();\n }\n\n } else {\n // null BankAccount -- cannot close\n return new BankAccount();\n }\n\n }", "@Override\r\n\tpublic List<SbiBank> DisplayingRecord() {\n\t\tTransaction tx=null;\r\n\t\tSession ses=HBNutility.getSession();\r\n\t\ttx=ses.beginTransaction();\r\n\t\tCriteria ct=ses.createCriteria(SbiBank.class);\r\n\t\tList<SbiBank> sb=ct.list();\r\n\t\treturn sb;\r\n\t}", "@Override\r\n\tpublic ArrayList<BankAccountVO> getBankAccountVOList() {\n\t\tArrayList<BankAccountVO> BankAccountList = new ArrayList<>();\r\n\t\tBankAccountList.add(new BankAccountVO(\"SS141250110\",200000));\r\n\t\treturn BankAccountList;\r\n\t}", "public Map<Integer, BankClient> getBankDatabase() {\n return bankDatabase;\n }", "List<TransactionRec> loadRecordsByAccount(BankAccount account);", "public ArrayList getAccountList() throws RemoteException, SQLException, Exception;", "@Override\n public List<BloodBank> getAllBloodBank() throws SQLException {\n logger.info(\"in the List<BloodBank> getAllBloodBank() method in \"+BloodBankSvcJDBCImpl.class.getName());\n List<BloodBank> displayList = new ArrayList();\n try\n {\n logger.warn(\"in try, may cause errors\");\n this.connectToDatabase();\n \n Statement stmt = this.getConnection().createStatement();\n //sql query\n String selectSql = \"SELECT * FROM `blood_bank`;\"\n + \"SELECT * FROM `blood_bank_address`;\";\n //set join string here\n ResultSet rs = stmt.executeQuery(selectSql);\n \n boolean result = rs.next();\n \n if(result == false)\n {\n logger.warn(\"NO results found!!\");\n System.out.println(\"Empty!!\\n\");\n }\n else\n {\n while(rs.next())\n {\n BloodBank bloodBank = new BloodBank();\n \n bloodBank.setId(rs.getString(\"idblood_bank\"));\n bloodBank.setName(rs.getString(\"name\"));\n bloodBank.setNumber(rs.getString(\"phone\"));\n //bloodBank.getBloodBankAddress().setAddressId(rs.getString(\"address_id\"));\n \n displayList.add(bloodBank);\n }\n System.out.println(\"Success!!!\");\n //return displayList;\n }\n }\n catch(SQLException ex)\n {\n logger.error(\"JDBC List all error\"+ex.toString()+\" in->\"+BloodBankSvcJDBCImpl.class.getName());\n System.out.println(\"Error: \" + ex.toString() + \" could not retreive list\");\n }\n finally{\n close();\n }\n return displayList;\n }", "public List<Balance> getAddBalanceList() {\r\n\t\tList<Balance> balanceList = new ArrayList<Balance>();\r\n\t\tif (selectedItem != null) {\r\n\t\t\tList<Book> bookList = new ArrayList<Book>();\r\n\t\t\tfor (BalanceData b : GlobalBalance.instance().list()) {\r\n\t\t\t\t// Flag no se ha encontrado\r\n\t\t\t\tboolean founded = false;\r\n\t\t\t\t// Recuperar la lista de books a las que pertenece el balance\r\n\t\t\t\tbookList = bookService.getBooksByIdBalance(b.getId());\r\n\t\t\t\tfor (Book book : bookList) {\r\n\t\t\t\t\t// Si el book seleccionado ya pertenece al balance\r\n\t\t\t\t\tif (selectedItem.getId().compareTo(book.getId()) == 0) {\r\n\t\t\t\t\t\t// Flag se ha encontrado\r\n\t\t\t\t\t\tfounded = true;\r\n\t\t\t\t\t\t// Detener el bucle\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\t// Si el balance no ha sido agregado ya al book\r\n\t\t\t\tif (!founded) {\r\n\t\t\t\t\t// Agregarlo a la lista\r\n\t\t\t\t\tbalanceList.add(b.getEntity());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn balanceList;\r\n\t}", "public static ArrayList<Account> getAccounts() {\n ArrayList<Account> accounts = new ArrayList<>();\n\n try (Statement statement = connection.createStatement()) {\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM LOGIN_ACCOUNTS\");\n while (resultSet.next()) { // as long as the next row is not null\n String username, password, firstName, lastName;\n int age;\n username = resultSet.getString(\"username\");\n password = resultSet.getString(\"password\");\n firstName = resultSet.getString(\"firstname\");\n lastName = resultSet.getString(\"lastname\");\n age = resultSet.getInt(\"age\");\n // place all the new items into a new Account object\n Account newAccount = new Account(username, password, firstName, lastName, age);\n // add the account to the list\n accounts.add(newAccount);\n }\n } catch (SQLException exc) {\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, exc);\n }\n\n return accounts;\n }", "public List<IBS2101105RsResult> getHouseList() {\n return houseList;\n }", "@Override\r\n\tpublic ArrayList<BankAccountPO> findBankAccountPOList() {\n\t\tArrayList<BankAccountPO> BankAccountList = new ArrayList<>();\r\n\t\tBankAccountList.add(new BankAccountPO(\"SS141250110\",200000));\r\n\t\treturn BankAccountList;\r\n\t}", "public List<BusinessAccount> searchAllContractors() {\n\t\tfactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);\n\t\tEntityManager em = factory.createEntityManager();\t\n\t\n\t\t\tem.getTransaction().begin();\n\t\t\tQuery myQuery = em.createQuery(\"SELECT b FROM BusinessAccount b\");\n\t\t\tcontractorList=myQuery.getResultList();\n\t\t em.getTransaction().commit();\n\t\t em.close();\n\t\t\t\n\t\t\treturn contractorList;\n\t\t}", "Balance[] findAllByBankAccount_Id(Long id);", "static SearchResult<AccountHolder> getHolders(String no) throws RecordSearchException {\n String condition = \"AccountNo = '\" + no + \"'\";\n\n LinkedList<Record> records = AccountHolderTable.getInstance().read(condition);\n\n if (records == null || records.size() == 0) {\n throw new RecordSearchException();\n }\n\n try {\n SearchResult<AccountHolder> holders = new SearchResult<>();\n\n for (LinkedHashMap<String, Object> record : records) {\n holders.add(new AccountHolder(record));\n }\n\n return holders;\n } catch (SchemaCreationException e) {\n Logger.error(e);\n\n throw new RecordSearchException(\"Error reading records from the Database\");\n }\n }", "public List<AuctionItem> joinAH(IDRecord myRecord, int secretKey){\n IDRecord temp = new IDRecord(myRecord.getRecordType(),myRecord.getName()\n ,myRecord.getInitialBalance(),\n myRecord.getHostname(),myRecord.getPortNumber());\n temp.setNumericalID(secretKey);\n Message<IDRecord> message = new Message<>(Message.MessageIdentifier.\n JOIN_AUCTION_HOUSE,temp);\n Message<AuctionHouseInventory> reply = sendMSG(message);\n if(reply != null){\n if(reply.getMessageIdentifier() == Message.MessageIdentifier.\n LIST_OF_AUCTION_HOUSE_ITEMS){\n return reply.getMessageContent().getAuctions();\n }else if(reply.getMessageIdentifier() == Message.MessageIdentifier.\n CASE_NOT_FOUND){\n System.out.println(\"AuctionHouse missing list of items\");\n }\n }\n return null;\n\n }", "public static ArrayList<HashMap<String, String>> getOwnApplianceList(\r\n\t\t\tint ploan_id) {\r\n\t\t\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\r\n\t\t// made by Abbas\r\n\t\ttry (Connection connection = Connect.getConnection();) {\r\n\t\t\t// Begin Procedure Call // Abbas\r\n\t\t\tCallableStatement cs = connection\r\n\t\t\t\t\t.prepareCall(\"{call get_own_appliance(?)}\");\r\n\t\t\tcs.setInt(1, ploan_id);\r\n\t\t\tResultSet rs = cs.executeQuery();\r\n\r\n\t\t\tResultSetMetaData metaData = rs.getMetaData();\r\n\t\t\tString columns[] = new String[metaData.getColumnCount()];\r\n\t\t\tfor (int a = 0; a < columns.length; a++) {\r\n\t\t\t\tcolumns[a] = metaData.getColumnLabel(a + 1);\r\n//\t\t\t\tSystem.err.println(metaData.getColumnLabel(a + 1));\r\n\t\t\t}\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tHashMap<String, String> map = new HashMap<>();\r\n\t\t\t\tfor (String string : columns) {\r\n\t\t\t\t\tif(string.equalsIgnoreCase(\"created_on\") || string.equalsIgnoreCase(\"returned_date\")){\r\n\t\t\t\t\t\tmap.put(string, \"\"+rs.getDate(string));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tmap.put(string, rs.getString(string));\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tSystem.err.println(rs.getString(string));\r\n\t\t\t\t}\r\n\t\t\t\tSystem.err.println(map);\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"\", ex);\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "ArrayList<Bet> selectLostBetsOfAccount(Account account) throws DAOException;", "public final int[] getBankIndices() {\n return (int[]) bankIndices.clone();\n }", "List <Aid> getAllAids();", "public void getLocalBankListforIndicator() {\n\t\t\tList<BigDecimal> duplicateCheck = new ArrayList<BigDecimal>();\n\t\t\tList<BigDecimal> duplicateCheck1 = new ArrayList<BigDecimal>();\n\t\t\tList<ViewBankDetails> lstofBank = new ArrayList<ViewBankDetails>();\n\t\t\tList<ViewBankDetails> lstofBank1 = new ArrayList<ViewBankDetails>();\n\t\t\tbankMasterList.clear();\n\t\t\tchequebankMasterList.clear();\n\t\t\tsetRemitBankId(null);\n\t\t\tsetCardBankId(null);\n\t\t\tclearKnetDetails();\n\t\t\tlocalbankList = generalService.getLocalBankListFromView(session.getCountryId());\n\n\t\t\t// cheque banks purpose \n\t\t\tif(localbankList.size() != 0){\n\t\t\t\tchequebankMasterList.addAll(localbankList);\n\t\t\t}\n\n\t\t\t\n\t\t\tList<ViewBankDetails> localBankListinCollection = icustomerBankService.customerBanks(getCustomerId(), getColBankCode());\n\t\t\tif (localBankListinCollection.size() > 0) {\n\t\t\t\tbankMasterList.addAll(localBankListinCollection);\n\t\t\t} else {\n\t\t\t\tbankMasterList.addAll(localbankList);\n\t\t\t}\n\t\t\tif (bankMasterList.size() != 0) {\n\t\t\t\tfor (ViewBankDetails lstBank : bankMasterList) {\n\t\t\t\t\tif (!duplicateCheck.contains(lstBank.getChequeBankId())) {\n\t\t\t\t\t\tduplicateCheck.add(lstBank.getChequeBankId());\n\t\t\t\t\t\tlstofBank.add(lstBank);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbankMasterList.clear();\n\t\t\tbankMasterList.addAll(lstofBank);\n\n\n\t\t\tif (chequebankMasterList.size() != 0) {\n\t\t\t\tfor (ViewBankDetails lstBank : chequebankMasterList) {\n\t\t\t\t\tif (!duplicateCheck1.contains(lstBank.getChequeBankId())) {\n\t\t\t\t\t\tduplicateCheck1.add(lstBank.getChequeBankId());\n\t\t\t\t\t\tlstofBank1.add(lstBank);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tchequebankMasterList.clear();\n\t\t\tchequebankMasterList.addAll(lstofBank1);\n\n\t\t}", "public List<BillingRecord> list() {\n\t\tList<BillingRecord> billingRecords = new ArrayList<BillingRecord>();\n\t\tbillingRecords = billingRecordRepo.findAll();\n\t\treturn billingRecords;\n\t}", "ArrayList<Bet> selectPlayingBetsOfAccount(Account account) throws DAOException;", "public List<Branch> getBranchListForBank(String name);", "ArrayList<Bet> selectWonBetsOfAccount(Account account) throws DAOException;", "public List <Account> getAllAccountsByRIB(String RIB);", "public SimpleList<Bidding> getBiddingsList() throws IOException{\r\n\t\treturn biddingPersistence.getAllBiddings();\r\n\t}", "List<Account> getAccountsForCustomerId(int customerId);", "@Override\r\n\tpublic Map<String, List<NewAccount>> Accountlist(int UserID) throws SQLException {\n\t\tList<NewAccount> accounts = createAccountDao.Accountlist(UserID);\r\n\t\tSystem.out.println(\"[CreateAccountDaoImp][save] New account save status : \" + accounts);\r\n\t\tList<NewAccount> loanAccounts = new ArrayList<NewAccount>();\r\n\t\tList<NewAccount> savingAccount = new ArrayList<NewAccount>();\r\n\t\tList<NewAccount> creditAccount = new ArrayList<NewAccount>();\r\n\t\tMap<String, List<NewAccount>> accountsMap = new HashMap<String, List<NewAccount>>();\r\n\r\n\t\t// Account Sorting\r\n\t\tfor (int i = 0; i < accounts.size(); i++) {\r\n\t\t\t\r\n\t\t\tif (accounts.get(i).getAccountType().equals(\"Loans\")) {\r\n\t\t\t\t\r\n\t\t\t\tloanAccounts.add(accounts.get(i));\r\n\t\t\t\t\r\n\t\t\t} else if (accounts.get(i).getAccountType().equals(\"Accounts\")) {\r\n\t\t\t\t\r\n\t\t\t\tsavingAccount.add(accounts.get(i));\r\n\t\t\t\t\r\n\t\t\t} else if (accounts.get(i).getAccountType().equals(\"Cards\")) {\r\n\t\t\t\tcreditAccount.add(accounts.get(i));\r\n\t\t\t}\r\n\t\t\t// credit //accountsMap.put(\"loan\",accounts.get(i));\r\n\t\t}\r\n\t\taccountsMap.put(\"loanAccount\", loanAccounts);\r\n\t\taccountsMap.put(\"savingsAccount\", savingAccount);\r\n\t\taccountsMap.put(\"creditAccount\", creditAccount);\r\n\t\tSet<String> key = accountsMap.keySet();\r\n\t\tIterator<String> iterator = key.iterator();\r\n\t/*\twhile (iterator.hasNext()) {\r\n\t\t\tString accountType = iterator.next();\r\n\r\n\t\t\tSystem.out.println(\"----------------------\" + accountType + \"------------------------\");\r\n\t\t\tSystem.out.println(\"|------------\" + accountsMap.get(accountType) + \"---------------|\");\r\n\t\t\tSystem.out.println(\"-----------------End of first Account Type-------------------\");\r\n\t\t}*/\r\n\r\n\t\treturn accountsMap;\r\n\t}", "List<Client> getAllClients(Bank bankId);", "public long getBankId() {\n return bankId;\n }", "public List<BankAccount> getAccountsByClientId(String clientID) {\n\n String sql = \"SELECT * FROM bankaccount WHERE bankclient_id = :bankclient_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankclient_id\", new BigDecimal(clientID));\n List<BankAccount> result = jdbcTemplate.query(sql, paramMap, new AccountRowMapper());\n return result;\n }", "List<BookAccount> findAllForAccount(long idAccount);", "public String getBankID() {\n return bankID;\n }", "public static Bank getBank() {\n return Bank;\n }", "public String getBankID() {\n return bankID;\n }", "public DataBank getDataBank() {\n return dataBank;\n }", "public BankAccount findAccountById(int currentBankID) throws SQLException;", "@Override\n\tpublic List<BankTransaction> getAllTransactionsById(int account_id) throws BusinessException {\n\t\tList<BankTransaction> bankTransactionList = new ArrayList<>();\n\t\tBankTransaction transaction = null;\n\t\tConnection connection;\n\t\ttry {\n\t\t\tconnection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select transaction_id, account_id, transaction_type, amount, transaction_date from dutybank.transactions where account_id=?\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\t\t\tpreparedStatement.setInt(1, account_id);\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\ttransaction = new BankTransaction();\n\t\t\t\ttransaction.setTransactionid(resultSet.getInt(\"transaction_id\"));\n\t\t\t\ttransaction.setAccountid(resultSet.getInt(\"account_id\"));\n\t\t\t\ttransaction.setTransactiontype(resultSet.getString(\"transaction_type\"));\n\t\t\t\ttransaction.setTransactionamount(resultSet.getDouble(\"amount\"));\n\t\t\t\ttransaction.setTransactiondate(resultSet.getDate(\"transaction_date\"));\n\n\t\t\t\t\n\t\t\t\tbankTransactionList.add(transaction);\n\n\t\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\tif (bankTransactionList.size() == 0) {\n\t\t\t\tthrow new BusinessException(\"No data for accounts\");\n\t\t\t}\n\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new BusinessException(\"Some exception retrieving tha data has occurred in transactions\");\n\t\t}\n\t\treturn bankTransactionList;\n\t}", "@Override\r\n\tpublic List<Buss> findbid() {\n\t\treturn dao.findbid();\r\n\t}", "public static ArrayList<Citizen> getAccounts()\n\t{\n\t\treturn accounts;\n\t}", "List<Bill> all() throws SQLException;", "public List<AccountBean> getAllAccounts() {\n\t\tList<AccountBean> accountBeans = null;\n\t\tConnectionSource connectionSource = null;\n\t\tDao<AccountBean, Integer> contactDao = null;\n\n\t\ttry {\n\t\t\tconnectionSource = new AndroidConnectionSource(mDatabase);\n\t\t\tcontactDao = DaoManager.createDao(connectionSource,\n\t\t\t\t\tAccountBean.class);\n\t\t\taccountBeans = contactDao.queryBuilder()\n\t\t\t\t\t.orderBy(IConstants.ORDER_BY_UPDATED_AT, false).query();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn accountBeans;\n\t}", "public List<Accounts> getAllAccounts() {\n List<Accounts> accountList = new ArrayList<Accounts>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_ACCOUNTS;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n Accounts account = new Accounts();\n account.setID(Integer.parseInt(cursor.getString(0)));\n account.setName(cursor.getString(1));\n account.setPassword(cursor.getString(2));\n account.setPhoneNumber(cursor.getString(3));\n account.setEmail(cursor.getString(4));\n // Adding account to list\n accountList.add(account);\n } while (cursor.moveToNext());\n }\n\n // return account list\n return accountList;\n }", "public ArrayList<Billing> getBillings() \n\t{\n\t\treturn billings;\n\t}", "public Account[] search(int findBalance){\n //will find the size of the account array, then create\n //the according account array size\n int sizeAcc = 0;\n for(int i = 0; i < currAccounts; i++){\n if(bankAccounts[i].getBal() == findBalance){\n sizeAcc++;\n }\n }\n Account[] foundMatches = new Account[sizeAcc];\n //now constructs the array\n int counter = 0;\n for(int i = 0; i < currAccounts; i++){\n //don't need to check if the counter is at max\n //because we already found all the matches required\n if(bankAccounts[i].getBal() == findBalance){\n foundMatches[counter] = bankAccounts[i];\n }\n }\n\n return foundMatches;\n }", "Databank getBank();", "public Collection<Integer> getLoanAccounts() {\n try {\n return costumerRepo.getAllAccounts(ssn, \"LineOfCreditAccount\");\n }catch (Exception ex) {\n rootLogger.error(\"JDBC: message: {}\", ex.getMessage());\n }\n return null;\n }", "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}", "public Bids[] populateBids() {\r\n\t\tint bidsLength = bids.size();\r\n\t\tint index = 0;\r\n\t\t\r\n\t\tBids[] auctionBids = new Bids[bidsLength];\r\n\t\tfor(Map.Entry<Integer, Bids> auctions: bids.entrySet()) {\r\n\t\t\tauctionBids[index] = auctions.getValue();\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn auctionBids;\r\n\t\r\n\t}", "@Override\r\n\tpublic Collection<Account> getAccountsHashmap() {\n\t\treturn dataMap.values();\r\n\t}", "public BankAccount getBalance (IDRecord idRecord) {\n\n BankAccount currentBankAccount;\n // extract the bank account number\n int theAcctNum = idRecord.getNumericalID();\n\n // find BankAccount from account -> BankAccount HashMap\n currentBankAccount = hashMapOfAllAccts.get(theAcctNum);\n\n if ( currentBankAccount == null) {\n // if no account was found, generate a generic empty account\n currentBankAccount = new BankAccount();\n\n }\n\n return currentBankAccount;\n }", "String getAccountList(int accountId);", "public boolean collectAccountInfo(IBankAPI bankAPI){\n\t}", "@Override\r\n public List<Map<String, Object>> findAllRecords(String tableName, int upperLimit) throws SQLException {\r\n List<Map<String, Object>> records = new ArrayList();\r\n String sqlQuery = (upperLimit > 0) ? \"SELECT * FROM \" + tableName + \" LIMIT \" + upperLimit : \"SELECT * FROM \" + tableName;\r\n if (connection != null) {\r\n\r\n Statement sqlStatement = connection.createStatement();\r\n ResultSet rs = sqlStatement.executeQuery(sqlQuery);\r\n ResultSetMetaData rsmd = rs.getMetaData();\r\n int columnCount = rsmd.getColumnCount();\r\n while (rs.next()) {\r\n Map<String, Object> record = new HashMap();\r\n for (int i = 1; i <= columnCount; i++) {\r\n record.put(rsmd.getColumnName(i), rs.getObject(i));\r\n }\r\n records.add(record);\r\n }\r\n } else {\r\n System.out.println(\"No connection could be established\");\r\n }\r\n return records;\r\n }", "@Override\n public List<BloodBank> findAll() {\n return findResults( \"BloodBank.findAll\", null );\n }", "@Override\r\n\tpublic List<Post> hotPostsBybankuai(int bankuaihao) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.hotPostsBybankuai(bankuaihao);\r\n\t\t\r\n\t}", "public BankDataBase()\n {\n accounts = new Account[ 2 ];\n accounts[ 0 ] = new Account( 12345, 54321, 1000.0, 1200.0 );\n accounts[ 1 ] = new Account( 98765, 56789, 200.0, 200.0 );\n }", "@Override\n\tpublic List<BillardAccounts> getBilliardAccounts() {\n\t\treturn announceMapper.getBilliardAccounts();\n\t}", "@Override\n\tpublic List<Transaction> getTransactionsByAccountId(int accountId) throws SQLException {\n\t\tList<Transaction> tList = new ArrayList<>();\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"select * from transaction_history where account_id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setInt(1, accountId);\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\twhile (rs.next()) {\n\t\t\tTransaction t = new Transaction(rs.getInt(2), rs.getString(3), rs.getDouble(4),rs.getTimestamp(5));\n\t\t\ttList.add(t);\n\t\t}\n\t\treturn tList;\n\t}", "public Collection<Integer> getDepositAccounts() {\n try {\n return costumerRepo.getAllAccounts(ssn, \"DepositAccount\");\n }catch (Exception ex) {\n rootLogger.error(\"JDBC: message: {}\", ex.getMessage());\n }\n return null;\n }", "@Override\n\tpublic List<Map> getBankInfoList(Map<String, Object> params) {\n\t\treturn tBankInfoMapper.getBankInfoList(params);\n\t}", "@Transactional\r\n\tpublic Set<BudgetAccount> loadBudgetAccounts() {\r\n\t\treturn budgetAccountDAO.findAllBudgetAccounts();\r\n\t}", "public List<BankAccount> getAccounts(String email) {\n\t\tUser user = findByEmail(email);\n\t\tfinal List<BankAccount> accounts;\n\t\tif (user != null) {\n\t\t\tHibernate.initialize(user.getBankAccounts());\n\t\t\taccounts = user.getBankAccounts();\n\t\t} else {\n\t\t\taccounts = Collections.<BankAccount> emptyList();\n\t\t}\n\t\treturn accounts;\n\t}", "public @NotNull Set<Bid> findAllBids() throws BazaarException;", "public ArrayList<Institution> getFinalBank() {\n\t\treturn Bank;\n\t}", "public List<Account> accounts() {\n return getMany(Account.class, Account.TITLE_FOREIGN_KEY_PERSON_DATA);\n }", "public ArrayList<AccountRegister> getAccountRegister() {\r\n\t\tArrayList<AccountRegister> accountRegisterList = new ArrayList<AccountRegister>();\r\n\t\tAccount account = get(ACCOUNT).getValue();\r\n\t\tFinanceDate[] financeDates = CommandUtils.getMinimumAndMaximumDates(\r\n\t\t\t\tstartDate, endDate, getCompanyId());\r\n\t\ttry {\r\n\t\t\taccountRegisterList = new FinanceTool().getAccountRegister(\r\n\t\t\t\t\tfinanceDates[0], financeDates[1], account.getID(),\r\n\t\t\t\t\tgetCompanyId(), 0, -1);\r\n\t\t\tif (accountRegisterList != null && !accountRegisterList.isEmpty()) {\r\n\t\t\t\taccountRegisterList.remove(0);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn accountRegisterList;\r\n\t}", "@RequestMapping(value = \"/viewAllBank\", method = RequestMethod.GET)\n\tpublic List<Bank> viewAllBank() {\n\t\tAtmDAO ad = new AtmDAO();\n\t\tList<Bank> listBank = ad.getAllBank();\n\t\treturn listBank;\n\t}", "private void listBalances() {\n\t\t\r\n\t}", "public static ArrayList<Account> arrAcc() {\n ArrayList<Account> acc = new ArrayList<>();\n ArrayList<Integer> bookmark1 = new ArrayList<>();\n bookmark1.add(0);\n bookmark1.add(1);\n ArrayList<Integer> bookmark2 = new ArrayList<>();\n bookmark2.add(0);\n acc.add(new Account(\"User1\", \"12345678\", \"User\", bookmark1));\n acc.add(new Account(\"User2\", \"12345678\", \"User\", bookmark1));\n acc.add(new Account(\"User3\", \"12345678\", \"User\", bookmark2));\n acc.add(new Account(\"AdminHuy\", \"123456789\", \"Administrator\", bookmark1));\n acc.add(new Account(\"AdminDiem\", \"123456789\", \"Administrator\", bookmark2));\n acc.add(new Account(\"EmMo\", \"12345678\", \"Translator\", bookmark1));\n acc.add(new Account(\"Roan\", \"12345678\", \"Translator\", bookmark1));\n acc.get(5).addProject(0);\n acc.get(6).addProject(1);\n return acc;\n }", "public Long getBusinessBankAccountId() {\n return businessBankAccountId;\n }", "public List<Bill> findAllBill() {\n\treturn iBillRespository.findAll();\n}", "public BankDatabase() {\r\n accounts = new Account[3];\r\n Connection c = null;\r\n Statement stmt = null;\r\n try {\r\n Class.forName(\"org.postgresql.Driver\");\r\n c = DriverManager\r\n .getConnection(\"jdbc:postgresql://localhost:5432/ATM\",\r\n \"postgres\", \"0000\");\r\n c.setAutoCommit(false);\r\n stmt = c.createStatement();\r\n ResultSet rs = stmt.executeQuery( \"SELECT * FROM accounts;\" );\r\n var i = 0;\r\n while ( rs.next() ) {\r\n int theAccountNumber = rs.getInt(\"accountnumber\");\r\n int thePin = rs.getInt(\"pin\");\r\n double theAvailiableBalance = rs.getDouble(\"availiablebalance\");\r\n double theTotalBalance = rs.getDouble(\"totalbalance\");\r\n accounts[i] = new Account( theAccountNumber, thePin, theAvailiableBalance, theTotalBalance);\r\n i++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n c.close();\r\n } catch ( Exception e ) {\r\n System.err.println( e.getClass().getName()+\": \"+ e.getMessage() );\r\n System.exit(0);\r\n }\r\n\r\n\r\n// accounts = new Account[2]; // just 2 accounts for testing\r\n// accounts[0] = new Account(12345, 54321, 1000.0, 1200.0);\r\n// accounts[1] = new Account(98765, 56789, 200.0, 200.0);\r\n }", "public static void getAcountsBalance(int value) {\n\t\t\t\n\t\t\taccounts.clear();\n\n\t\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t\t \"from ser322.account,ser322.customer \" + \n\t\t \"WHERE customer.accID = account.accID AND balance =\" + value;\n\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t\t ResultSet rs = stmt.executeQuery(query);\n\t\t while (rs.next()) {\n\t\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t\t \n\t\t }\n\t\t \n\t\t } catch (SQLException e ) {\n\t\t \tSystem.out.println(\"QUERY WRONG - getAcountsBalance\");\n\t\t }\n\t\n\t\t}", "public List<Bill> getDrinkforBill() {\n\t\n\tString sql = \"SELECT * FROM bills join employees e on bills.Id_employees = e.Id_employees join drink d on bills.Id_drink = d.Id_drink\";\n\t\n\tList<Bill>getDrinkForBill = new ArrayList<Bill>();\n\t\n\ttry {\n\t\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = ps.executeQuery();\n\t\t\n\t\twhile(rs.next()) {\n\t\t\t\n\t\t\tBill drinkBill = new Bill();\n\t\t\tdrinkBill.setId(rs.getInt(\"Id_bills\"));\n\t\t\tdrinkBill.setDrink(rs.getString(\"Name_Drink\"));\n\t\t\tdrinkBill.setEmployyes(rs.getString(\"Name_and_surname\"));\n\t\t\tdrinkBill.setPrice(rs.getDouble(\"Price\"));\n\t\t\tdrinkBill.setSerialNumber(rs.getString(\"Serial_Number_Bill\"));\n\t\t\tdrinkBill.setTotal(rs.getDouble(\"TOTAL\"));\n\t\t\t\n\t\t\tgetDrinkForBill.add(drinkBill);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\t\n\t\n\treturn getDrinkForBill;\n}", "@GetMapping(\"/households\")\n public ResultEntity<List<ItemDTO>> getAllHousehold()\n {\n\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Household\");\n }", "@Generated(hash = 96040862)\n public List<Account> getAccounts() {\n if (accounts == null) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n AccountDao targetDao = daoSession.getAccountDao();\n List<Account> accountsNew = targetDao._queryType_Accounts(id);\n synchronized (this) {\n if (accounts == null) {\n accounts = accountsNew;\n }\n }\n }\n return accounts;\n }", "public static List<Account> getAccounts()\n\t{\n\t\treturn Application.getAccountLibrary().getAccounts();\n\t}", "public BankImpl() {\n accounts = new HashMap<Integer,Account>();\n }", "public List<Account> getAllAccountsFromUser(Integer userId) {\n if(userId == bankAccount.getBankAccountOwnerId())\n {\n List<Account> accountList = accountRepository.findAccountByOwner(userId);\n accountList.add( new Account(bankAccount.getBankAccountIban(), \"current\", 0, 0, 0,0,bankAccount.getBankAccountBalance()));\n return accountList;\n }\n\n return (List<Account>)accountRepository.findAccountByOwner(userId);\n }", "public List<Account> getAllAccounts() {\n List<Account> accounts = new ArrayList<>();\n accountRepository.findAll().forEach(account -> accounts.add(account));\n return accounts;\n }", "public ArrayList<Bid> getBids(){\n\t\tArrayList<Bid> bids = new ArrayList<Bid>();\n\t\tcreateFile(bidsFile);\n\t\ttry {\n\t\t\tString[] data;\n\t\t\treader = new BufferedReader(new FileReader(bidsFile));\n\t\t\t\n\t\t\tString strLine;\n\t\t\twhile((strLine = getLine()) != null){\n\t\t\t\tdata = strLine.split(\",\");\n\n\t\t\t\tBid bid = new Bid(data[0], Integer.parseInt(data[1]),Integer.parseInt(data[2]));\n\t\t\t\tbids.add(bid);\n\n\t\t\t}\n\t\t}catch (IOException e){\n\t\t\t//TODO auto generated catch block\n\t\tSystem.err.println(e);\n\t\t}\n\t\t\n\t\treturn bids;\n\t}", "private List<Budget> listResults(ResultSet rs) throws SQLException{\n List<Budget> found = new ArrayList<Budget>();\n while (rs.next()){\n Budget x = new Budget();\n x.setDescription(rs.getString(\"bud_description\"));\n x.setCategory(rs.getString(\"bud_category\"));\n x.setBudgetAmount(rs.getDouble(\"bud_budgeted_amount\"));\n x.setActualAmount(rs.getDouble(\"bud_actual_amount\"));\n x.setId(rs.getInt(\"bud_key_id\"));\n }\n return found;\n }", "public List<B2bInvoiceAccount> getAccounts() {\r\n return this.accounts;\r\n }", "Collection<Account> getAll();", "public List<BankAccount> getAllByClient(Client client){\n\t\treturn this.getRepo().getAllByClient(client);\n\t}", "public List<Bill> getBill() {\n\tString sql =\"SELECT * FROM bills JOIN employees e on bills.Id_employees = e.Id_employees JOIN food f on bills.Id_food = f.Id_food\";\n\tList<Bill> list = new ArrayList<Bill>();\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\n\t\twhile(resultSet.next()) {\n\t\t\tBill getBill = new Bill();\n\t\t\tgetBill.setId(resultSet.getInt(\"Id_bills\"));\n\t\t\tgetBill.setFood(resultSet.getString(\"Name\"));\n\t\t\tgetBill.setEmployyes(resultSet.getString(\"Name_and_surname\"));\n\t\t\tgetBill.setPrice(resultSet.getDouble(\"Price\"));\n\t\t\tgetBill.setSerialNumber(resultSet.getString(\"Serial_Number_Bill\"));\n\t\t\tgetBill.setTotal(resultSet.getDouble(\"TOTAL\"));\n\t\t\tlist.add(getBill);\n\t\t}\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "@Override\n\tpublic Bank getBank(int bankID) {\n\t\tfor (Bank bankInSet : cache.retrieveAllItems()) {\n\t\t\tif (bankInSet.getBankID() == bankID){\n\t\t\t\treturn bankInSet;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "List<Bill> todaysBills() throws SQLException;", "@Override\n\tpublic List<BankTransaction> getAllTransactions() throws BusinessException {\n\t\tBankTransaction bankTransaction = null;\n\t\tList<BankTransaction> bankTransactionList = new ArrayList<>();\n\t\tConnection connection;\n\n\t\ttry {\n\t\t\tconnection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select transaction_id, account_id, transaction_type, amount, transaction_date from dutybank.transactionss\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tbankTransaction = new BankTransaction();\n\t\t\t\tbankTransaction.setTransactionid(resultSet.getInt(\"transaction_id\"));\n\t\t\t\tbankTransaction.setAccountid(resultSet.getInt(\"account_id\"));\n\t\t\t\tbankTransaction.setTransactiontype(resultSet.getString(\"transaction_type\"));\n\t\t\t\tbankTransaction.setTransactionamount(resultSet.getDouble(\"amount\"));\n\t\t\t\tbankTransaction.setTransactiondate(resultSet.getDate(\"transaction_date\"));\n\n\t\t\t\tbankTransactionList.add(bankTransaction);\n\t\t\t} \n\t\t\t\n\t\t\tif (bankTransactionList.size() == 0) {\n\t\t\t\tthrow new BusinessException(\"There is not data to retrieve\");\n\t\t\t}\n\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tthrow new BusinessException(\"Some Error ocurred retrieving data for transactions\");\n\t\t}\n\t\t\n\t\treturn bankTransactionList;\n\t}", "public List<USLActionBanHistory> fetchByBanHistoryID(int banHistoryId);", "public List<MicroFinanceModel> getMicroFinance() {\n List<MicroFinanceModel> microFinanceList = new ArrayList<MicroFinanceModel>();\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.query(TABLE_BANKS, new String[]{\n KEY_MICRO_FINANCE_ID, KEY_MICRO_FINANCE_OBJECT_ID, KEY_MICRO_FINANCE_NAME, KEY_MICRO_FINANCE_IMAGE, KEY_MICRO_FINANCE_ADDRESS, KEY_MICRO_FINANCE_STATUS, KEY_MICRO_FINANCE_SUMMARY\n }, null, null, null, null, null);\n try {\n if (cursor.moveToFirst()) {\n do {\n MicroFinanceModel microFinanceDetails = new MicroFinanceModel();\n microFinanceDetails.setMicroFinanceObjectId(cursor.getString(1));\n microFinanceDetails.setMicroFinanceName(cursor.getString(2));\n microFinanceDetails.setMicroFinanceImage(cursor.getString(3));\n microFinanceDetails.setMicroFinanceAddress(cursor.getString(4));\n microFinanceDetails.setMicroFinanceStatus(cursor.getString(5));\n microFinanceDetails.setMicroFinanceSummary(cursor.getString(6));\n microFinanceList.add(microFinanceDetails);\n } while (cursor.moveToNext());\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error Retrieving Banks\");\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n return microFinanceList;\n\n }", "public static List<Address> listAddressBillingByIdCustomer(int a) throws SQLException, NamingException {\n List<Address> result = new ArrayList<Address>();\n Database database = Database.getInstance();\n Connection connection;\n connection = database.getConnection();\n PreparedStatement statement = connection.prepareStatement(viewAddressBillingByIdCustomer);\n statement.setInt(1, a);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n Address address = new Address(\n rs.getInt(\"ADDRESS_ID\"),\n rs.getString(\"ADDRESS_COMPANY_NAME\"),\n rs.getString(\"ADDRESS_L_NAME\"),\n rs.getString(\"ADDRESS_F_NAME\"),\n rs.getString(\"ADDRESS_STREET\"),\n rs.getString(\"ADDRESS_STREET_EXTRA\"),\n rs.getString(\"ADDRESS_POSTCODE\"),\n rs.getString(\"ADDRESS_CITY\"),\n rs.getString(\"ADDRESS_PHONE\"),\n rs.getString(\"ADDRESS_PHONE_EXTRA\"));\n result.add(address);\n }\n return result;\n }" ]
[ "0.6938644", "0.59412223", "0.5869849", "0.586686", "0.58604044", "0.5812392", "0.5811076", "0.5715424", "0.56844217", "0.56753445", "0.5662046", "0.56431043", "0.5587435", "0.5561188", "0.5535648", "0.55338985", "0.5524213", "0.5485177", "0.5474698", "0.54484504", "0.5426678", "0.5419655", "0.5418001", "0.5417933", "0.54164886", "0.5401689", "0.5378702", "0.53527117", "0.53438646", "0.5342785", "0.53274083", "0.53176147", "0.5307448", "0.52862453", "0.5272109", "0.5270576", "0.5237931", "0.5237356", "0.52292156", "0.5224743", "0.5210589", "0.51984584", "0.5195988", "0.5189011", "0.51805335", "0.51750165", "0.51747334", "0.51723194", "0.516939", "0.51628697", "0.515743", "0.51515406", "0.5147185", "0.5143802", "0.51432234", "0.51318157", "0.5131415", "0.5129918", "0.51275635", "0.51135", "0.5111826", "0.51084864", "0.5107323", "0.5101327", "0.50971836", "0.5089901", "0.50866157", "0.5081054", "0.50780886", "0.50622123", "0.50600016", "0.5059668", "0.50434697", "0.5039277", "0.5035883", "0.5031699", "0.50314456", "0.50262576", "0.5017684", "0.5015095", "0.5008692", "0.49976936", "0.49931422", "0.49895525", "0.49885023", "0.49879038", "0.49873346", "0.49872965", "0.49869242", "0.4983564", "0.49825802", "0.49746138", "0.4957816", "0.4950633", "0.49357545", "0.49275628", "0.49269646", "0.49247485", "0.4912937", "0.49077532" ]
0.692578
1
Checks if it is safe for the Bank to close basically returning false if the Bank has any active client accounts.
public boolean safeToClose(){ if(hashMapOfAllAccts.isEmpty()){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkAccountClosed() {\n return this.accountStatus == \"Closed\";\n }", "@Override\r\n\tpublic boolean close() {\n\t\taccountStatus = AccountStatus.CLOSED;\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean closeAccount() {\n\t\treturn false;\r\n\t}", "private boolean verifyBTClosed() {\n if (btSocket != null) {\n try {\n btSocket.close();\n btSocket = null;\n } catch (IOException e) {\n Log.d(TAG, \"Exception closing BT socket in BT thread: \" + e.toString());\n } finally {\n sendConnectionMessage(EventMessage.EventType.HW_DISCONNECTED);\n btSocket = null;\n }\n }\n return false;\n }", "public boolean canClose(){\n return true;\n }", "public boolean checkBalance() {\n checkBalanceHelper(root);\n if (unbalanced == null) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isOverdrawn() {\n return this.getBalance().compareTo(new BigDecimal(\"0\")) < 0;\n }", "public boolean canWithdraw(double withdrawalAmount){\n double potentialAmountOwed = withdrawalAmount + Math.abs(super.getCurrentBalance());\n if(potentialAmountOwed < creditLine) return true;\n \n return false;\n }", "public boolean validateBank() {\n\t\treturn this.getBank().length() > 0 && this.getBank().length() <= 30;\n\t}", "public boolean isOverdrawn() {\n return balance < 0;\n }", "@Override\n\tpublic boolean close(String cardNum) {\n\t\treturn closeAccountDao.close(cardNum);\n\t}", "public static boolean isInBank(){\n return isInBank(Players.localPlayer());\n }", "boolean hasAllowedCredit();", "public boolean checkWin() throws Exception {\r\n\t\treturn getOcean().checkWin();\r\n\t}", "protected void checkNotClosed() {\n if (closed) {\n throw new IllegalStateException(\"Client has been closed.\");\n }\n }", "public Boolean canBorrowBook() {\n\t\tif (loans.size() >= getLoanLimit()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isClosed() {\n\t\treturn mService == null;\n\t}", "public boolean checkAutoClose();", "boolean investmentIsBondListFull() throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }", "protected synchronized boolean isSockOpen(){\n\t\ttry{\n\t\t\tif(out.checkError()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isBankrupt() {\n\t\tif (money < 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean shouldClose(Connection conn) {\n return true;\n }", "public boolean checkClosed();", "public boolean isClosed() {\n\t\treturn (dbConnection == null);\n\t}", "public boolean close() {\n BleMultiConnector bleMultiConnector = this.bleMultiConnector;\n this.bleMultiConnector = null;\n boolean result = bleMultiConnector != null && bleMultiConnector.close(address);\n if (result){\n address = null;\n }\n return result;\n }", "private boolean checkIsValid(BankClient client, Message message) {\n int lastDigit = message.getMessageContent() % BASE_TEN;\n int amount = message.getMessageContent() / BASE_TEN;\n if (lastDigit <= DEPOSIT_WITHDRAWAL_FLAG) {\n return amount <= client.getDepositLimit();\n } else {\n return amount <= client.getWithdrawalLimit();\n }\n }", "public static void close(){\n System.out.println(\"Thank you for choosing our Bank\");\r\n System.out.println();\r\n if(CLIENT.length() == 16 && PASSWORD.length() == 4){ //if the user lenght is equal to 16 and password lenght to 4 (if they are valid) then the user closes by saying the account number\r\n System.out.println(\"Farewell user \" +CLIENT); //farewell for the client\r\n }\r\n else{ //if the account or password isnt valid then the following is displayed\r\n System.out.println(\"PLEASE CONTACT THE BANK FOR ASSISTANCE IF NEEDED\");\r\n }\r\n System.exit(0); //the system forces the exit of the program\r\n }", "boolean isIsClosable();", "public boolean isClosed() {\n\t\treturn ( mCurrentState == STATE.CLOSED_CANCEL ) || ( mCurrentState == STATE.CLOSED_CONFIRMED );\n\t}", "protected boolean ensureBalance(BigInteger value)\n {\n String account = appContext.getSettingProvider().getSelectedAccount();\n\n BigInteger balance = appContext.getServiceProvider().getAccountService().getAccountBalance(account).get();\n if(balance == null)\n {\n appContext.getMessageService().showErrorMessage(\"Cannot reach the exchange service. Try again later.\");\n return false;\n }\n\n if(balance.compareTo(value) < 0)\n {\n appContext.getMessageService().showErrorMessage(\"You need at least \" + value.toString() + \" wei to do that!\");\n return false;\n }\n\n return true;\n }", "public boolean canTrade()\n\t{\n\t\treturn System.currentTimeMillis() - m_lastTrade > 60 * 1000 && getPartyCount() >= 2;\n\t}", "public boolean isClosed() {\n return calculateSumOfHouse() > 31;\n }", "public static boolean own() {\n return InventoryManager.getAccessibleCount(ItemPool.COMBAT_LOVERS_LOCKET) > 0;\n }", "public boolean validateBankPackage() {\n\t\treturn this.validateBank() && this.validateBSB() && this.validateAccountNumber();\n\t}", "public static boolean Logout() {\n try {\n clientSocket.close();\n return true;\n } catch (Exception exc) {\n System.out.println(\"Logout error: \" + exc.toString());\n }\n return false;\n }", "void checkClosed() throws SQLException {\n\n if (result == null) { throw Message.getSQLException(ErrorCode.OBJECT_CLOSED); }\n if (stat != null) {\n stat.checkClosed();\n }\n if (conn != null) {\n conn.checkClosed();\n }\n }", "public boolean isClosed() {\n boolean result = true;\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n result &= catalog.isClosed( );\n }\n return result;\n\n }", "public boolean\tcloseAccount(String name);", "public static boolean destroy() {\n if (!Runtime.checkWitness(contractOwner)) {\n return false;\n }\n ContractManagement.destroy();\n return true;\n }", "public boolean isClosed() {\n return (mRLS == null);\n }", "public boolean closeConnection(){\n try{\n conn.close();\n }catch(SQLException sqle){\n DLException dle = new DLException(sqle, \"Unable to conclude this operation\");\n return false;\n }\n \n return true;\n }", "private boolean isBalanceIntegrity(final CustStmtRecord custStmtRecord) {\n\t\treturn !(custStmtRecord.getStartBalance().add(custStmtRecord.getMutation()) \n\t\t\t\t).equals(custStmtRecord.getEndBalance());\n\t}", "public boolean close() {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\treturn connection.isClosed();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "private void checkCloseStatus() throws IllegalStateException {\n checkState(!closed, \"The algorithm is already closed\");\n }", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "public boolean isSetBank()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BANK$0) != 0;\n }\n }", "boolean isConcealed();", "boolean isCloseRequested()\r\n\t{\r\n\t\treturn this.closeRequested;\r\n\t}", "public void safeClose(){\r\n\t\tthis.isRun = false;\r\n\t}", "@Override\n public boolean isCompleted() {\n return dalek.getZeitonCount() == NUM_CRYSTALS;\n }", "boolean check(double amount) {\n\t\treturn (balance >= amount);\n\t}", "public boolean isSetAmountOpen()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(AMOUNTOPEN$8) != 0;\n }\n }", "public boolean disconnectDB(){\n\t\ttry {\n\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n return true;\n }", "protected boolean checkInternetConnection() {\n if (!Utils.hasInternetConnection(getApplicationContext())) {\n final AlertDialog.Builder adBuilder = createAlertDialog(R.string.dialog_title_no_internet, R.string.dialog_message_no_internet);\n adBuilder.setPositiveButton(R.string.dialog_btn_ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n adBuilder.show();\n return false;\n }\n\n return true;\n }", "public boolean isValidTransfer(double amount) {\n boolean amt = amount >= 0;\n boolean bal = false;\n if (amount <= this.balance + 100 && this.balance > 0) {\n bal = true;\n }\n return amt && bal && !isFreeze();\n }", "@Override\n public boolean isBoatOnTheLeftBank() {\n return false;\n }", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean getAccountHasWithdrawLimit(){\n if (currentAccount instanceof SavingAccount){\n return ((SavingAccount)currentAccount).getHasWithdrawLimit();\n \n }\n else if (currentAccount instanceof NetSavingAccount){\n return ((NetSavingAccount)currentAccount).getHasWithdrawLimit();\n }\n else if (currentAccount instanceof ChequeAccount){\n return ((ChequeAccount)currentAccount).getHasWithdrawLimit(); \n }\n else if (currentAccount instanceof FixedAccount){\n return ((FixedAccount)currentAccount).getHasWithdrawLimit();\n }\n else{\n System.out.println(\"Get Account WithdrawLimit (Bool) Account not found\");\n return false;\n }\n }", "@Override\n public boolean isAccountNonExpired() {\n return !locked;\n }", "final boolean checkAlive() {\r\n\t\t\r\n\t\tif (this.conn == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (this.conn.isClosed()) {\r\n\t\t\t\tthis.conn = null;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (--this.loops < 0 || this.date < System.currentTimeMillis()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = null;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (this.databaseType == ConnectionHolder.DT_UNKNOWN) {\r\n\t\t\t\tthis.databaseType = this.conn.getMetaData().getDatabaseProductName().toUpperCase().indexOf(\"ORACLE\") == -1\r\n\t\t\t\t\t? ConnectionHolder.DT_NORMAL\r\n\t\t\t\t\t: ConnectionHolder.DT_ORACLE;\r\n\t\t\t}\r\n\t\t\ttry (final Statement st = this.conn.createStatement()) {\r\n\t\t\t\t/** Do not use it here, may be unsupported? */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst.setQueryTimeout(10);\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tst.execute(\r\n\t\t\t\t\t\tthis.databaseType == ConnectionHolder.DT_ORACLE\r\n\t\t\t\t\t\t\t? \"SELECT 5 FROM DUAL\"\r\n\t\t\t\t\t\t\t: \"SELECT 5\");\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} catch (final SQLException e) {\r\n\t\t\tif (this.conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = null;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private boolean tryInactivate() {\n if (active) {\n if (!pool.tryDecrementActiveCount())\n return false;\n active = false;\n }\n return true;\n }", "private boolean tryInactivate() {\n if (active) {\n if (!pool.tryDecrementActiveCount())\n return false;\n active = false;\n }\n return true;\n }", "public boolean isValid() {\n return handle > 0;\n }", "private void checkCloseStatus() throws IllegalStateException {\n checkState(!closed, \"The representation is already closed\");\n }", "public abstract boolean isBalanced();", "protected boolean shouldCloseConnection(HttpConnection conn) {\n return true;\n }", "public boolean checkConnection() {\n\t\ttry {\n\t\t\tif (con.isClosed() || !isAlive) {\n\t\t\t\treturn connect();\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean closeUnchecked() {\r\n PacketRepository.send(CloseInterface.class, (opened == null ||\r\n opened.getDefinition() == null || opened.getDefinition().getContext() == null)\r\n ? new InterfaceContext(player, -1, false) : opened.getDefinition().getContext().setPlayer(player));\r\n opened = null;\r\n return true;\r\n }", "public boolean checkAndFreezeFunds (int secretKey, double proposedFreeze) {\n\n int theBankAccountNumber;\n // use AccountLink and secret key to get actual Bank Account number\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n if ( theAccountLink != null ) {\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n return false;\n }\n // use account number to get full BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // ask BankAccount to check and (if possible) freeze the amount\n boolean fundsFrozen = theBankAccount.checkAndFreeze(proposedFreeze);\n\n if (fundsFrozen) {\n updateBankDisplay();\n }\n\n return fundsFrozen;\n }", "public Boolean checkBust() {\n\t\tif (getHandValue() > 21) {\n\t\t\tSystem.out.println(name + \" Busted!\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isTabClosable(int index)\r\n {\r\n return ((CloseableTabComponent) getTabComponentAt(index)).isClosable();\r\n }", "public boolean unfreezeFunds (int secretKey, double amtToUnfreeze) {\n\n int theBankAccountNumber;\n // use AccountLink and secret key to get actual Bank Account number\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n if ( theAccountLink != null ) {\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n return false;\n }\n // use account number to get full BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // ask BankAccount to check and (if possible) un-freeze the amount\n boolean fundsUnfrozen = theBankAccount.decreaseFreeze(amtToUnfreeze);\n\n if ( fundsUnfrozen ) {\n updateBankDisplay();\n }\n\n return fundsUnfrozen;\n }", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "public boolean isBalanced ();", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "public boolean cerrarConexion(){\n try{\n conexion.close();\n conexion=null;\n this.bConexcionOk=false;\n if(this.isDebug()){\n System.out.println(\"Cerrando la conexcion\");\n }\n return this.isConexcionOk();\n }catch(SQLException e){\n if(this.isDebug()){\n System.out.println(e.getMessage());\n }\n this.bConexcionOk=false;\n return this.isConexcionOk();\n }\n }", "@Override\n public boolean isValid() {\n return (connection != null && session != null && session.isOpen());\n }", "public boolean deleteAccount(String accountNumber) {\r\n\t\t// check whether this account has no money left or due ( balance=0 )\r\n\t\t// only when balance =0 can delete\r\n\r\n\t\tif (!DaoUtility.isAccountNumberValid(accountNumber))\r\n\t\t\treturn false;\r\n\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\t\tconn = dbConnector.getConnection();\r\n\t\t\tif (conn == null) // cannot connect to DB\r\n\t\t\t\treturn false;\r\n\r\n\t\t\tPreparedStatement pst;\r\n\t\t\tString sql;\r\n\t\t\tResultSet rs;\r\n\r\n\t\t\t// Search is this account has balance !=0 ?\r\n\t\t\tsql = \"select * from tbAccount where \" + \" acnumber= ? \"\r\n\t\t\t\t\t+ \" and balance <> 0\";\r\n\r\n\t\t\tpst = conn.prepareStatement(sql);\r\n\t\t\tpst.setString(1, accountNumber);\r\n\r\n\t\t\trs = pst.executeQuery();\r\n\t\t\t// if exist non-emply account, then REFUSE to delete client\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// ---------------- Batch Transaction\r\n\t\t\tint nRs = 0;\r\n\t\t\tconn.setAutoCommit(false); // begin Transaction\r\n\t\t\tSavepoint savepnt = conn.setSavepoint();\r\n\t\t\ttry {\r\n\t\t\t\t// remove(from table Transaction where username = 'userName');\r\n\t\t\t\tsql = \"delete from tbTransaction where aid = \"\r\n\t\t\t\t\t\t+ \"(select aid from tbAccount where \"\r\n\t\t\t\t\t\t+ \" acnumber = ? )\";\r\n\r\n\t\t\t\tpst = conn.prepareStatement(sql);\r\n\t\t\t\tpst.setString(1, accountNumber);\r\n\t\t\t\tpst.executeUpdate();\r\n\r\n\t\t\t\t// remove(from table Account where acnumber= 'acnumber');\r\n\t\t\t\tsql = \"delete from tbAccount where acnumber = ? \";\r\n\t\t\t\tpst = conn.prepareStatement(sql);\r\n\t\t\t\tpst.setString(1, accountNumber);\r\n\t\t\t\tnRs = pst.executeUpdate(); // nRs: number of account row deleted\r\n\r\n\t\t\t\tconn.commit(); // commit and end Transaction\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t} finally {\r\n\t\t\t\tconn.setAutoCommit(true);\r\n\t\t\t}\r\n\t\t\t// ---------------- Execute batch\r\n\r\n\t\t\treturn (nRs == 1); // 1 account deleted.\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "private Boolean canUserValidate() throws ServeurException, ClientException {\n // Direct on/off line\n return checkValidatePermission();\n }", "public boolean close()\r\n\t{\r\n\t\tif(status == 'B')\r\n\t\t{\r\n\t\t\tthis.status = 'D';\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean checkOpen(boolean recordException) {\n/* 650 */ if (!isOpen()) {\n/* 651 */ if (recordException) {\n/* 652 */ recordException(new ClosedChannelException());\n/* */ }\n/* 654 */ return false;\n/* */ } \n/* */ \n/* 657 */ return true;\n/* */ }", "public boolean isOpen()\r\n {\r\n if(connection != null)\r\n {\r\n try\r\n {\r\n return !connection.isClosed();\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n }\r\n }\r\n return false;\r\n }", "@Override\n public boolean isValid(int timeout) throws SQLException\n {\n return !isClosed;\n }", "@Override\n public boolean canClose() {\n if (!isRunningSession()) {\n return true;\n } else {\n // Running. Abort?\n boolean canClose = false;\n NotifyDescriptor descriptor\n = new NotifyDescriptor(\n NbBundle.getMessage(SessionTopComponent.class,\n \"MSG_CloseRunningSession\",\n session.getName()),\n \"Arkade\",\n NotifyDescriptor.YES_NO_CANCEL_OPTION,\n NotifyDescriptor.WARNING_MESSAGE,\n SessionTopComponent.YES_NO_OPTIONS,\n SessionTopComponent.YES_NO_OPTIONS[1]);\n Object notifyValue\n = DialogDisplayer.getDefault().notify(descriptor);\n if (descriptor.getValue().equals(\n SessionTopComponent.YES_NO_OPTIONS[0])) {\n // Yes\n // Can close session\n canClose = true;\n }\n return canClose;\n }\n }", "public void closeAccount() {}", "public void closeAccount() {}", "public boolean isValid() {\n return m_handle != 0;\n }", "public boolean isClosed() throws SQLException {\n\n try {\n debugCodeCall(\"isClosed\");\n return result == null;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "private boolean isConnected() {\n try {\n return (conn != null) && conn.isValid(0);\n } catch (SQLException ex) {\n Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "public final boolean close()\r\n {\r\n\r\n // see if we need to save data\r\n if (isDirty())\r\n {\r\n // try to do a file save - ask the user\r\n if (wantsToClose())\r\n {\r\n // user still want to close\r\n }\r\n else\r\n {\r\n // user doesn't want to close anymore, drop out\r\n return false;\r\n }\r\n\r\n }\r\n\r\n // delete the local variables\r\n\r\n _theBuffer.close();\r\n _theBuffer = null;\r\n\r\n _theClipboard = null;\r\n _fileName = null;\r\n _theName = null;\r\n\r\n if (_theViews != null)\r\n {\r\n if (_theViews.size() == 1)\r\n {\r\n final PlainView theV = (PlainView) _theViews.elementAt(0);\r\n theV.close();\r\n _theViews.removeElement(theV);\r\n }\r\n _theViews = null;\r\n }\r\n\r\n // and the layers\r\n _theData.close();\r\n _theData = null;\r\n\r\n // now the GUI stuff\r\n //\tcloseGUI();\r\n\r\n // set the stuff we don;t want to null\r\n return true;\r\n }", "public boolean checkConnected() {\n boolean isClosed = true;\n boolean isValid = false;\n boolean exists = (connection != null);\n\n // If we're waiting for server to recover then leave early\n if (nextReconnectTimestamp > 0 && nextReconnectTimestamp > System.nanoTime()) {\n return false;\n }\n\n if (exists) {\n try {\n isClosed = connection.isClosed();\n }\n catch (SQLException e) {\n isClosed = true;\n e.printStackTrace();\n printErrors(e);\n }\n\n if (!isClosed) {\n try {\n isValid = connection.isValid(VALID_TIMEOUT);\n }\n catch (SQLException e) {\n // Don't print stack trace because it's valid to lose idle connections to the server and have to restart them.\n isValid = false;\n }\n }\n }\n\n // Leave if all ok\n if (exists && !isClosed && isValid) {\n // Housekeeping\n nextReconnectTimestamp = 0;\n reconnectAttempt = 0;\n return true;\n }\n\n // Cleanup after ourselves for GC and MySQL's sake\n if (exists && !isClosed) {\n try {\n connection.close();\n }\n catch (SQLException ex) {\n // This is a housekeeping exercise, ignore errors\n }\n }\n\n // Try to connect again\n connect();\n\n // Leave if connection is good\n try {\n if (connection != null && !connection.isClosed()) {\n // Schedule a database save if we really had an outage\n if (reconnectAttempt > 1) {\n new SQLReconnectTask().runTaskLater(Assassin.p, 5);\n }\n nextReconnectTimestamp = 0;\n reconnectAttempt = 0;\n return true;\n }\n }\n catch (SQLException e) {\n // Failed to check isClosed, so presume connection is bad and attempt later\n e.printStackTrace();\n printErrors(e);\n }\n\n reconnectAttempt++;\n nextReconnectTimestamp = (long) (System.nanoTime() + Math.min(MAX_WAIT, (reconnectAttempt * SCALING_FACTOR * MIN_WAIT)));\n return false;\n }", "@Override\n public boolean activate() {\n // We only want to go to the bank if our inventory is full and we aren't already there.\n return Mining.isInvFull() && !Constants.BANK_AREA.contains(Players.getLocal());\n }", "public boolean close() {\n\t\tif (_OPEN) {\n\t\t\t_OPEN = false;\n\t\t\tdoPurgeAction();\n\t\t\treturn (true);\n\t\t}\n\t\treturn (false);\n\t}", "private void doCheckBalance() {\n while (true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n ui.displayMessage(\"Balance: \" + userAccount.getBalance());\n break;\n } catch (Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }", "public boolean isBusted() {\n\t\tif (hand.checkHandValue() > 21) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean canProtectPieces() {\r\n\t\treturn (cityCards.stream().anyMatch(c -> (c.isSmallGods() && !c.isDisabled())\r\n\t\t\t\t&& money >= PROTECTION_COST)); \r\n\t}", "protected boolean isBalanceBelow(double amount) {\n return balance < amount;\n }", "public boolean isDBConnected() {\n\t\ttry {\n\t\t\treturn !conn.isClosed();\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean disconnect() {\n if(!this.isConnected()) {\n return true;\n }\n try {\n this.bluetoothSocket.close();\n this.bluetoothSocket = null;\n return true;\n } catch (IOException e) {\n e.printStackTrace();\n }\n return false;\n }", "void checkClosed();" ]
[ "0.68332636", "0.682443", "0.66895556", "0.6613559", "0.6173545", "0.6122301", "0.5916414", "0.5909536", "0.58636737", "0.58496475", "0.58465767", "0.5815036", "0.58040243", "0.5792064", "0.57606286", "0.57423574", "0.5729639", "0.57282484", "0.56714886", "0.56327814", "0.56280357", "0.56237924", "0.5616739", "0.56136113", "0.5604971", "0.55892605", "0.5583542", "0.55646974", "0.5555593", "0.5550963", "0.55438316", "0.55383706", "0.55321056", "0.5509723", "0.5500561", "0.54885685", "0.54821014", "0.5478619", "0.547602", "0.5464762", "0.54610485", "0.54441917", "0.54358065", "0.54273945", "0.5409841", "0.54092956", "0.54079473", "0.54067355", "0.53817517", "0.5377618", "0.53768265", "0.53616345", "0.53609574", "0.53558964", "0.53473586", "0.53472996", "0.5346577", "0.53361017", "0.5330794", "0.53288203", "0.5328435", "0.5328435", "0.5328017", "0.5327936", "0.5326502", "0.53216827", "0.5319063", "0.5314894", "0.5313771", "0.5308404", "0.53071135", "0.5303671", "0.5298763", "0.52965", "0.5293998", "0.5288424", "0.5285001", "0.52823293", "0.5282258", "0.5281629", "0.52748996", "0.52680457", "0.52638483", "0.52599955", "0.5257469", "0.5257469", "0.5254095", "0.5253575", "0.5244149", "0.5242448", "0.5237632", "0.52302027", "0.5217902", "0.5211114", "0.5207893", "0.5205784", "0.5205432", "0.5204948", "0.5203852", "0.5200039" ]
0.6812606
2
Transfers the specified amount from one account to another, with the secret key specifying a LinkedAccount object giving the source and target/destination accounts for the transfer. Transfer executed only if there are frozen funds in the source account equal to or greater than the desired transfer amount. If frozen funds less than desired transferred amount, no money is transferred at all.
public boolean transferFunds (int secretKey, double amtToTransfer) { int sourceBankAccountNumber; // account FROM which to transfer int targetBankAccountNumber; // account TO which to transfer // use secretKey to obtain AccountLink, which will contains the // source and target BankAccount numbers AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey); if ( theAccountLink != null ) { // i.e. secretKey was valid sourceBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER(); targetBankAccountNumber = theAccountLink.getAH_ACCOUNT_NUMBER(); } else { // secretKey appears invalid; no transfer possible return false; } // use account numbers to get full BankAccounts BankAccount sourceBankAccount = hashMapOfAllAccts.get(sourceBankAccountNumber); BankAccount targetBankAccount = hashMapOfAllAccts.get(targetBankAccountNumber); // ask source BankAccount to delete amtToTransfer (if possible) // This effects a transfer only if frozen funds >= amtToTransfer boolean fundsTakenFromSource = sourceBankAccount.decreaseFrozenAndBalance(amtToTransfer); // if funds were able to be taken from source, then add amt to target if ( fundsTakenFromSource ) { targetBankAccount.increaseTotalBalance(amtToTransfer); updateBankDisplay(); } else { return false; // b/c funds could not be taken from source } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void transfer(int fromId, int toId, long amount) {\n synchronized (accounts.get(fromId)){\n synchronized (accounts.get(toId)){\n try {\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n } catch (InsufficientFundsException e) {\n //Swallow the error and do nothing\n }\n\n }\n }\n }", "@Test\n public void customerCanPerformTransferBetweenAccounts() {\n String ownerId = \"ownerId\";\n Account accountFrom = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n Account accountTo = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n\n // Put some money in the from account\n Transaction transaction = new Transaction.Builder().setDescription(\"Test\").setAmount(DollarAmount.fromInt(100)).setType(Transaction.Type.DEPOSIT).build();\n accountFrom.applyTransaction(transaction);\n assertEquals(accountFrom.getAccountBalance(), DollarAmount.fromInt(100));\n\n // Attempt transfer\n Account.transfer(accountFrom, accountTo, DollarAmount.fromInt(30));\n\n // Assert transfer was successful\n assertEquals(DollarAmount.fromInt(70), accountFrom.getAccountBalance());\n assertEquals(DollarAmount.fromInt(30), accountTo.getAccountBalance());\n }", "@Override\n public void transferLockingBank(int fromId, int toId, long amount) throws InsufficientFundsException {\n synchronized (this){\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n }\n }", "@Override\n public void transferWithoutLocking(int fromId, int toId, long amount) throws InsufficientFundsException {\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n }", "@Override\n public void transferLockingAccounts(int fromId, int toId, long amount) throws InsufficientFundsException {\n Account fromAccount = accounts.get(fromId);\n Account toAccount = accounts.get(toId);\n synchronized (fromAccount) {\n fromAccount.withdraw(amount);\n }\n synchronized (toAccount) {\n toAccount.deposit(amount);\n }\n }", "@Override\n public void transferWithoutLocking(int fromId, int toId, long amount) throws InsufficientFundsException {\n Account fromAcct = accountMap.get(fromId);\n Account toAcct = accountMap.get(toId);\n fromAcct.withdraw(amount);\n toAcct.deposit(amount);\n }", "public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "@Override\n public boolean transfer(Account from, Account to, BigDecimal amount) {\n return false;\n }", "public void transferFunds(BankAccount account1, BankAccount account2, double amount){\n if(account1.checkAccountOpen()&&account2.checkAccountOpen()){\n if((account1.getCurrentBalance()-amount)>0) {\n if (isSameAccount(account1, account2)) {\n account1.subtractCreditTransaction(amount);\n account2.addDebitTransaction(amount);\n } else {\n System.out.println(\"This transaction could not be processed. BankAccount owners are not the same.\");\n }\n }\n else {\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n }\n\n\n }\n }", "@Override\n public void makeTransfer(BigInteger sender, BigInteger recipient, BigDecimal amount)\n throws InsufficientFundsException, GenericBankNowException {\n if (isTheSameAccount(sender, recipient)) {\n throw new GenericBankNowException(\"Sender and recipient are the same accounts\");\n } else {\n Account accountSender = accountDao.getAccountByIban(sender);\n if (hasEfficientFunds(accountSender, amount)) {\n throw new InsufficientFundsException(\"Insufficient funds to proceed transfer\");\n } else {\n Account accountRecipient = accountDao.getAccountByIban(recipient);\n accountSender.setBalance(accountSender.getBalance().subtract(amount));\n accountRecipient.setBalance(accountRecipient.getBalance().add(amount));\n\n accountDao.updateAccount(accountSender);\n accountDao.updateAccount(accountRecipient);\n\n transactionDao.storeTransaction(new Transaction(sender, recipient, amount, TransactionType.TRANSFER));\n }\n }\n }", "@Override\n\tpublic void transferAccount(Bank recievingBank, String recievingUser,\n\t\t\tBank payingBank, String payingUser, double amount) {\n\t\ttry {\n\t\t\tif (getAccount(payingBank, payingUser).getBalance() >= amount) {\n\t\t\tgetAccount(payingBank, payingUser).withdrawal(amount);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not enough funds\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t}catch(NullPointerException e){\n\t\t\t\tSystem.out.println(\"User not found\");\n\t\t\t}\n\t\t\n\t\ttry {\n\t\tgetAccount(recievingBank, recievingUser).deposit(amount);\n\t\t}\n\t\tcatch(NullPointerException e) {\n\t\t\tSystem.out.println(\"User not found\");\n\t\t\tgetAccount(payingBank, payingUser).deposit(amount);\n\t\t}\n\t}", "public boolean makeTransfer(int originAccNo, int targetAccNo, float amount) {\n Account origAccount = getAccountByAccountNo(originAccNo);\n Account targetAccount = getAccountByAccountNo(targetAccNo);\n if (checkIfEnough(origAccount, amount)) {\n origAccount.setBalance(origAccount.getBalance() - amount);\n targetAccount.setBalance(targetAccount.getBalance() + amount);\n //update the two accounts after the transaction\n saveOrUpdate(origAccount);\n saveOrUpdate(targetAccount);\n //save transaction to database with current timestamp\n Transaction transaction = new Transaction();\n transaction.setAccountNo(originAccNo);\n transaction.setTime(new Timestamp(new Date().getTime()));\n transaction.setType(\"transfer from\");\n transactionRepository.save(transaction);\n Transaction transaction2 = new Transaction();\n transaction2.setAccountNo(targetAccNo);\n transaction2.setTime(new Timestamp(new Date().getTime()));\n transaction2.setType(\"transfer to\");\n transactionRepository.save(transaction2);\n\n return true;\n } else {\n return false;\n }\n }", "public void transferMoney(int customerAccountId, int accountId) throws SQLException {\n // check if the customer has this account\n boolean customerOwnsAccount = false;\n for (int i = 0; i < this.currentCustomer.getAccounts().size(); i++) {\n if (customerAccountId == this.currentCustomer.getAccounts().get(i).getId()) {\n customerOwnsAccount = true;\n break;\n }\n }\n // it is safe to proceed since the customer accounts have been authenticated\n if (customerOwnsAccount) {\n Account customerAccount = DatabaseSelectHelper.getAccountDetails(customerAccountId);\n // try and catch for valid input (int) expected\n try {\n System.out.println(\"Enter amount you wish to transfer:\");\n // take user input as a big decimal\n BigDecimal bigAmount = new BigDecimal(br.readLine());\n if (bigAmount.compareTo(customerAccount.getBalance()) <= 0) {\n // try to update accounts\n try {\n // update the account which received money in database\n DatabaseUpdateHelper.updateAccountBalance(\n bigAmount.add(DatabaseSelectHelper.getBalance(accountId)), accountId);\n // update account which transfered money in database\n DatabaseUpdateHelper.updateAccountBalance(\n customerAccount.getBalance().subtract(bigAmount), customerAccountId);\n // update the customer object for printing reasons for other options\n this.currentCustomer.updateAccounts();\n // Explicitly tell user money is transfered\n System.out.println(\"you have successfully transfered money to account \" + accountId);\n \n } catch (Exception e) {\n System.out.println(\"The account ID you wish to transfer money to does not exist\");\n }\n // error printing\n } else {\n System.out.println(\"This account does not have enough money to send this amount\");\n }\n \n } catch (Exception e) {\n System.out.println(\"Invalid amount\");\n }\n // error printing\n } else {\n System.out.println(\"You do not have access to this account\");\n }\n \n }", "public Account doMoneyTransfer(MoneyTransferDTO moneyTransferDTO, Long id) {\n Account origin = accountService.getAccountById(id);\n Account destination = accountService.getAccountById(moneyTransferDTO.getToAccountId());\n\n // check for fraud detection\n //fraudDetectionService.checkMoneyTransfer(origin, moneyTransferDTO);\n fraudDetectionService.checkMoneyTransferV2(origin, moneyTransferDTO);\n\n // check enough funds in origin account\n BigDecimal currentBalance = origin.getBalance().getAmount();\n BigDecimal transferAmount = moneyTransferDTO.getAmount();\n if (transferAmount.compareTo(currentBalance) > 0)\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Amount exceeds balance of the account\");\n\n // check if penalty fee has to be deducted later\n BigDecimal result = currentBalance.subtract(transferAmount);\n boolean applyPenaltyFee =\n currentBalance.compareTo(origin.getMinimumBalance().getAmount()) > 0 &&\n result.compareTo(origin.getMinimumBalance().getAmount()) < 0;\n\n // make the transaction\n Transaction transaction = new Transaction(new Money(transferAmount));\n transaction.setType(Type.MONEY_TRANSFER);\n transaction.setFromAccount(origin);\n transaction.setToAccount(destination);\n //transaction.setAmount(new Money(transferAmount));\n transaction.setAuthorName(moneyTransferDTO.getName());\n transaction.setDescription(moneyTransferDTO.getDescription());\n Transaction newTransaction = transactionService.addTransaction(transaction);\n\n // deduct penalty fee with another transaction if needed\n if (applyPenaltyFee) {\n\n Transaction deductionTransaction = new Transaction(origin.getPenaltyFee());\n transaction.setType(Type.PENALTY_FEE);\n deductionTransaction.setFromAccount(origin);\n //deductionTransaction.setToAccount(null);\n //deductionTransaction.setAmount(origin.getPenaltyFee()); // set amount before accounts\n deductionTransaction.setAuthorName(moneyTransferDTO.getName());\n deductionTransaction.setDescription(\"Penalty fee deduction\");\n transactionService.addTransaction(deductionTransaction);\n }\n\n return accountService.saveAccount(origin);\n }", "@Override\n public void transferLockingAccounts(int fromId, int toId, long amount) throws InsufficientFundsException {\n Account fromAcct = accountMap.get(fromId);\n Account toAcct = accountMap.get(toId);\n Account lock1, lock2;\n\n if(fromAcct.getId() < toAcct.getId()){\n lock1 = fromAcct;\n lock2 = toAcct;\n } else {\n lock1 = toAcct;\n lock2 = fromAcct;\n }\n\n synchronized (lock1){\n synchronized (lock2){\n fromAcct.withdraw(amount);\n toAcct.deposit(amount);\n }\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void transferBetweenTwoAccountsMustBelongToSameOwner() {\n Account accountFrom = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, \"owner1\");\n Account accountTo = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, \"owner2\");\n\n // Put some money in the from account\n Transaction transaction = new Transaction.Builder().setDescription(\"Test\").setAmount(DollarAmount.fromInt(100)).setType(Transaction.Type.DEPOSIT).build();\n accountFrom.applyTransaction(transaction);\n assertEquals(accountFrom.getAccountBalance(), DollarAmount.fromInt(100));\n\n // Attempt transfer\n Account.transfer(accountFrom, accountTo, DollarAmount.fromInt(30));\n\n // Assert transfer was successful\n assertEquals(DollarAmount.fromInt(70), accountFrom.getAccountBalance());\n assertEquals(DollarAmount.fromInt(30), accountTo.getAccountBalance());\n }", "public int transfer(String fromAccNum, String toAccNum, double amount) {\n String output; \n\n Account fromAcc = bank.retrieveAccount(fromAccNum); \n Account toAcc = bank.retrieveAccount(toAccNum);\n\n if (fromAcc.getBalance() >= amount) {\n fromAcc.deduct(amount);\n toAcc.add(amount); \n \n return 0;\n }\n return -1; \n\n\n }", "public void transfer(double amount, checkingAccount cAccount)throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be deposited\");\n }\n else if (amount > balance){\n throw new InsufficientFundsException(\"Not enough money\");\n }\n else{\n balance -= amount;\n cAccount.balance += amount;\n savingTransactions[arrayLocation] = \"Transfer from savings account into checkings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n }", "public MoneyTransfer(BigDecimal amount, Long sourceAccountId, Long targetAccountId) {\n this.amount = amount;\n this.sourceAccountId = sourceAccountId;\n this.targetAccountId = targetAccountId;\n }", "public void sendAccountCoins(Wallet wallet,\n int acctnum,\n Address dest,\n long value,\n long fee,\n boolean spendUnconfirmed)\n throws RuntimeException {\n HDAccount acct = mAccounts.get(acctnum);\n\n SendRequest req = SendRequest.to(dest, BigInteger.valueOf(value));\n req.fee = BigInteger.valueOf(fee);\n req.feePerKb = BigInteger.ZERO;\n req.ensureMinRequiredFee = false;\n req.changeAddress = acct.nextChangeAddress();\n req.coinSelector = acct.coinSelector(spendUnconfirmed);\n req.aesKey = mAesKey;\n\n\t\ttry {\n\t\t\twallet.sendCoins(req);\n\t\t} catch (InsufficientMoneyException e) {\n throw new RuntimeException(\"Not enough BTC in account\");\n\t\t}\n }", "boolean transfer(UUID from, UUID to, double amount);", "public boolean transferMoney(Account fromAcct, Account toAcct, DollarAmount amount,\n long timeout, TimeUnit unit)\n throws DollarAmount.InsufficientFundsException, InterruptedException {\n long stopTime = System.nanoTime() + unit.toNanos(timeout);\n\n for (; ; ) {\n if (fromAcct.lock.tryLock()) {\n try {\n if (toAcct.lock.tryLock()) {\n try {\n if (fromAcct.getBalance().compareTo(amount) < 0) {\n throw new DollarAmount.InsufficientFundsException();\n } else {\n fromAcct.debit(amount);\n toAcct.credit(amount);\n return true;\n }\n } finally {\n toAcct.lock.unlock();\n }\n }\n } finally {\n fromAcct.lock.unlock();\n }\n }\n\n if (System.nanoTime() > stopTime)\n return false;\n\n// TimeUnit.NANOSECONDS.sleep(fixedDelay + rnd.nextLong() % randMod);\n }\n }", "public void updateAccounts(String sourceAccountNumber, BigDecimal transferedAmount, String destinationAccount ) throws TransferServiceException {\n\t\t\n\t\tList<Account> accountList = new ArrayList<>();\n\t\t\n\t\taccountList.add(debitAmount(sourceAccountNumber,transferedAmount));\n\t\taccountList.add(creditAmount(destinationAccount, transferedAmount));\n\t\trepository.saveAll(accountList);\n\t\n\t}", "public void transfer(BigDecimal value, Account account) {\n\n\t\ttheValueHasToBeGreaterThanZero(value);\n\n\t\tif (value.compareTo(balance) <= 0) {\n\t\t\tthis.withdrawalAlgorithm(value);\n\t\t\taccount.depositAlgorithm(value);\n\t\t\taccount.notifyMovements(value, MovementAction.TRANSFER_RECEIVED);\n\t\t\tthis.movements.add(new Movement(MovementAction.TRANSFERRED, this));\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new IllegalArgumentException(\"You do not have enough balance to transfer\");\n\t}", "public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}", "public void transferMoney(float amount, String transferToNumber) {}", "public void transferTo(double dollarAmount) {\r\n\t\tthis.accountBalance = this.accountBalance + dollarAmount;\r\n\t}", "public void transferFrom(double dollarAmount) throws InsufficientFundsException {\r\n\t\tif (this.accountBalance - dollarAmount < 0) {\r\n\t\t\tthrow new InsufficientFundsException();\r\n\t\t} else {\r\n\t\t\tthis.accountBalance = this.accountBalance - dollarAmount;\r\n\t\t}\r\n\t}", "public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;", "public boolean makeTransfer(String fromAccountNumber,\r\n\t\t\tString toAccountNumber, double amount, String memo) {\r\n\t\tif (DaoUtility.isAccountNumberValid(fromAccountNumber)\r\n\t\t\t\t&& DaoUtility.isAccountNumberValid(toAccountNumber)) {\r\n\t\t} else\r\n\t\t\treturn false;\r\n\r\n\t\t// do transaction\r\n\t\tConnection conn = dbConnector.getConnection();\r\n\t\tif (conn==null)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tPreparedStatement st;\r\n\t\tString sql;\r\n\t\tResultSet rs;\r\n\r\n\t\ttry {\r\n\t\t\tconn.setAutoCommit(false);\r\n\t\t\tSavepoint savepnt = conn.setSavepoint();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tint fromAccountId=0;\r\n\t\t\t\tint toAccountId=0;\r\n\t\t\t\tString fromName=\"SECRET USER\";\r\n\t\t\t\tString toName=\"SECRET USER\";\r\n\t\t\t\tString fname,mname,lname;\r\n\t\t\t\t\r\n\t\t\t\tst = conn.prepareStatement(\"select tbAccount.aid,balance,isactive,\"\r\n\t\t\t\t\t\t+ \"fname,mname,lname from tbAccount, tbClient \"\r\n\t\t\t\t\t\t+ \" where acnumber= ? and tbAccount.cid=tbClient.cid\");\r\n\t\t\t\tst.setString(1, fromAccountNumber);\r\n\t\t\t\trs = st.executeQuery();\r\n\t\t\t\tif (rs.next()){\r\n\t\t\t\t\tfromAccountId = rs.getInt(\"aid\");\r\n\t\t\t\t\tdouble balance = rs.getDouble(\"balance\");\r\n\t\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\t\t\t\t\tfname = rs.getString(\"fname\");\r\n\t\t\t\t\tmname = rs.getString(\"mname\");\r\n\t\t\t\t\tlname = rs.getString(\"lname\");\r\n\t\t\t\t\tfromName = fname + \" \" + (mname==null?\"\":mname) + \" \" +lname;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (balance<amount || !isactive) { //not enough money or frozen\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tst = conn.prepareStatement(\"select aid,isactive,\"\r\n\t\t\t\t\t\t+ \" fname,mname,lname from tbAccount,tbClient \"\r\n\t\t\t\t\t\t+ \" where acnumber= ? and tbAccount.cid=tbClient.cid\");\r\n\t\t\t\tst.setString(1, toAccountNumber);\r\n\t\t\t\trs = st.executeQuery();\r\n\t\t\t\tif (rs.next()){\r\n\t\t\t\t\ttoAccountId = rs.getInt(\"aid\");\r\n\t\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\t\t\t\t\tfname = rs.getString(\"fname\");\r\n\t\t\t\t\tmname = rs.getString(\"mname\");\r\n\t\t\t\t\tlname = rs.getString(\"lname\");\r\n\t\t\t\t\ttoName = fname + \" \" + (mname==null?\"\":mname) + \" \" +lname;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!isactive) { //frozen\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// substract balance of fromAccount\r\n\t\t\t\tst = conn.prepareStatement(\r\n\t\t\t\t\t\t\"update tbAccount set balance = balance - ? \"\r\n\t\t\t\t\t\t\t\t+ \" where balance >= ? \"\r\n\t\t\t\t\t\t\t\t+ \" and acnumber = ? \"\r\n\t\t\t\t\t\t\t\t+ \" and isactive=TRUE \");\r\n\t\t\t\tst.setDouble(1, amount);\r\n\t\t\t\tst.setDouble(2, amount);\r\n\t\t\t\tst.setString(3, fromAccountNumber);\r\n\t\t\t\tint nRs = st.executeUpdate();\r\n\t\t\t\tif (nRs <= 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// add balance of toAccount\r\n\t\t\t\tst = conn.prepareStatement(\r\n\t\t\t\t\t\t\"update tbAccount set balance = balance + ? \"\r\n\t\t\t\t\t\t\t\t+ \" where acnumber = ? \"\r\n\t\t\t\t\t\t\t\t+ \" and isactive=TRUE \");\r\n\t\t\t\tst.setDouble(1, amount);\r\n\t\t\t\tst.setString(2, toAccountNumber);\r\n\t\t\t\tnRs = st.executeUpdate();\r\n\t\t\t\tif (nRs <= 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// insert 2 transaction record\r\n\t\t\t\t// insert into tbTransaction(aid, trtype, amount, description)\r\n\t\t\t\t// values( select aid from tbAccount where acnumber='acnumber',\r\n\t\t\t\t// DEPOSIT_TRANSACTION_TYPE_ID,\r\n\t\t\t\t// amount, 'transfer 123.4 dollars to 3333343 on 2014-09-19')\r\n\t\t\t\t//\r\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\t\tString currentDate = dateFormat.format(date); // 2014-08-06\r\n\r\n\t\t\t\tsql = String.format(\r\n\t\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t\t+ \" values( %d, \" + \"\t\t\t%d, \"\r\n\t\t\t\t\t\t\t\t+ \"\t\t\t%f, 'Transfer out %.2f dollars to %s(%s) on %s. MEMO: %s' ) \", \r\n\t\t\t\t\t\t\t\tfromAccountId,\r\n\t\t\t\t\tTRANSFER_OUT_TRANSACTION_TYPE_ID, amount, amount,\r\n\t\t\t\t\ttoAccountNumber, toName, currentDate,memo);\r\n\t\t\t\tnRs = st.executeUpdate(sql);\r\n\t\t\t\tif (nRs<=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsql = String.format(\r\n\t\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t\t+ \" values( %d, \" + \" %d, \"\r\n\t\t\t\t\t\t\t\t+ \"\t%f, 'Transfer in %.2f dollars from %s(%s) on %s. MEMO: %s' ) \", \r\n\t\t\t\t\t\t\t\ttoAccountId,\r\n\t\t\t\t\tTRANSFER_IN_TRANSACTION_TYPE_ID, amount, amount,\r\n\t\t\t\t\tfromAccountNumber, fromName, currentDate,memo);\r\n\t\t\t\tnRs = st.executeUpdate(sql);\r\n\t\t\t\tif (nRs<=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t\t\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\tconn.rollback(savepnt);\r\n\t\t\t} finally {\r\n\t\t\t\tconn.setAutoCommit(true);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public void transferToChecking(double amount){\n withdrawSavings(amount);\r\n depositChecking(amount);\r\n }", "@Override\n public void deposit(int accountId, long amount) {\n if(!accounts.containsKey(accountId)){\n throw new IllegalArgumentException(\"Account \" + accountId + \" does not exist in this Bank.\");\n }\n else{\n synchronized (accounts.get(accountId)){\n accounts.get(accountId).deposit(amount);\n }\n }\n }", "@Test\n\tpublic void moneyTrnasferExcetionInsufficientBalanceOfFromAccount() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account Number - \");\n\t\tsb.append(accountNumberFrom);\n\t\tsb.append(\" do not have sufficient amout to transfer.\");\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "public RemoteCall<KlayTransactionReceipt.TransactionReceipt> safeTransferFrom(String sender, String recipient, BigInteger amount) {\n final Function function = new Function(\n FUNC_SAFETRANSFERFROM,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(sender),\n new org.web3j.abi.datatypes.Address(recipient),\n new org.web3j.abi.datatypes.generated.Uint256(amount)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "@Override\r\n\tpublic void fundTransfer(String sender, String reciever, double amount) {\n\t\t\r\n\t\tString name, newMobileNo;\r\n\t\tfloat age;\r\n\t\tdouble amountFund;\r\n\t\t\r\n\t\tCustomer custSender = custMap.get(sender);\r\n\t\tCustomer custReciever = custMap.get(reciever);\r\n\t\t\r\n\t\tdouble recieverAmount = custReciever.getInitialBalance();\r\n\t\tdouble senderAmount = custSender.getInitialBalance();\r\n\t\tif(senderAmount - amount > 500){\r\n\t\t\trecieverAmount += amount;\r\n\t\t\tsenderAmount -= amount;\r\n\t\t\tSystem.out.println(\"Fund Transferred\");\r\n\t\t}\r\n\t\tname = custSender.getName();\r\n\t\tnewMobileNo = custSender.getMobileNo();\r\n\t\tage = custSender.getAge();\r\n\t\tamountFund = senderAmount;\r\n\t\t\r\n\t\tcustSender.setAge(age);\r\n\t\tcustSender.setInitialBalance(senderAmount);\r\n\t\tcustSender.setMobileNo(newMobileNo);\r\n\t\tcustSender.setName(name);\r\n\t\t\r\n\t\tcustMap.put(newMobileNo, custSender);\r\n\t\t\r\n\t\tname = custReciever.getName();\r\n\t\tnewMobileNo = custReciever.getMobileNo();\r\n\t\tage = custReciever.getAge();\r\n\t\tamountFund = recieverAmount;\r\n\t\t\r\n\t\tcustReciever.setAge(age);\r\n\t\tcustReciever.setInitialBalance(recieverAmount);\r\n\t\tcustReciever.setMobileNo(newMobileNo);\r\n\t\tcustReciever.setName(name);\r\n\t\t\r\n\t\tcustMap.put(newMobileNo, custReciever);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\t\n\t@Transactional\n\tpublic Boolean transferMoney(TransferDto transferData) throws Exception {\n\t\t\n\t\tUser targetUser = userDao.findByUsername(transferData.getTargetUser().getUsername());\n\t\t\n\t\tBalanceDto balanceData = transferData.getBalance();\n\t\t\n\t\t\n\t\tbalanceData.setType(AccountTransactionType.SUBTRACT);\n\t\t\n\t\taddSubtractBalance(balanceData);\n\t\n\t\tbalanceData.setType(AccountTransactionType.ADD);\n\t\t\n\t\tbalanceData.setAccount(transferData.getTargetAccount());\n\t\t\n\t\t\n\t\taddSubtractBalanceByUser(targetUser, balanceData);\n\t\t\n\t\t\n\t\treturn true;\n\t}", "@Override\n public Transfer makeTransfer(String counterAccount, Money amount)\n throws BusinessException {\n if (amount.greaterThan(this.transferLimit)) {\n throw new BusinessException(\"Limit exceeded!\");\n }\n // 2. Assuming result is 9-digit bank account number, validate 11-test:\n int sum = AccountChekSum(counterAccount);\n\n if (sum % 11 == 0) {\n // 3. Look up counter account and make transfer object:\n Transfer result = doTransfer(counterAccount,amount);\n return result;\n } else {\n throw new BusinessException(\"Invalid account number!\");\n }\n }", "public boolean transfer(int fromId, int toId, double amount) {\n boolean result;\n synchronized (this.base) {\n User from = this.base.get(fromId);\n User to = this.base.get(toId);\n if (result = from != null && to != null) {\n if (result = amount > 0 && from.getAmount() >= amount) {\n synchronized (this.base) {\n this.base.put(fromId, new User(fromId, from.getAmount() - amount));\n this.base.put(toId, new User(toId, to.getAmount() + amount));\n }\n }\n }\n }\n return result;\n }", "@PutMapping(\"/{fromWalletId}/exchange\")\n public ResponseEntity<Wallet> exchangeCurrency(@PathVariable(name = \"fromWalletId\") String fromWalletId,\n @RequestParam(name = \"toWalletId\", required = false) String toWalletId,\n @RequestBody @Valid WalletEntryTransaction walletEntryTransaction) {\n return ResponseEntity\n .ok()\n .body(walletService.exchange(fromWalletId, toWalletId, walletEntryTransaction));\n }", "private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }", "public RemoteCall<KlayTransactionReceipt.TransactionReceipt> safeTransfer(String recipient, BigInteger amount) {\n final Function function = new Function(\n FUNC_SAFETRANSFER,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(recipient),\n new org.web3j.abi.datatypes.generated.Uint256(amount)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }", "public void transferFromBrokerageToSavings(long socialSecurityNumber, String userName, String password, double amount) throws AuthenticationException,UnauthorizedActionException, InsufficientAssetsException{\r\n if(security(socialSecurityNumber, userName, password)){\r\n throw new AuthenticationException();\r\n }\r\n if(getPatron(socialSecurityNumber).getSavingsAccount() == null || getPatron(socialSecurityNumber).getBrokerageAccount() == null){\r\n throw new UnauthorizedActionException();\r\n }\r\n try{\r\n Transaction withdraw = new Transaction(getPatron(socialSecurityNumber), Transaction.TRANSACTION_TYPE.WITHDRAW, getPatron(socialSecurityNumber).getBrokerageAccount(), amount);\r\n withdraw.execute();\r\n txHistoryByPatron.get(getPatron(socialSecurityNumber)).add(withdraw);\r\n Transaction deposit = new Transaction(getPatron(socialSecurityNumber), Transaction.TRANSACTION_TYPE.DEPOSIT, getPatron(socialSecurityNumber).getSavingsAccount(), amount);\r\n deposit.execute();\r\n txHistoryByPatron.get(getPatron(socialSecurityNumber)).add(deposit);\r\n } catch (InsufficientAssetsException e){\r\n throw new InsufficientAssetsException();\r\n }\r\n }", "void transfer(BankAccount x,double amt)\n\t{\n\t\tSystem.out.println(\"transferring the amount\");\n\t\twithdraw(amt);\n\t\tx.deposit(amt);\n\t\tSystem.out.println(\"transfer done successfully! \");\n\t}", "public void transferFromSavingsToBrokerage(long socialSecurityNumber, String userName, String password, double amount) throws AuthenticationException,UnauthorizedActionException, InsufficientAssetsException {\r\n if(security(socialSecurityNumber, userName, password)){\r\n throw new AuthenticationException();\r\n }\r\n if(getPatron(socialSecurityNumber).getSavingsAccount() == null || getPatron(socialSecurityNumber).getBrokerageAccount() == null){\r\n throw new UnauthorizedActionException();\r\n }\r\n try{\r\n Transaction withdraw = new Transaction(getPatron(socialSecurityNumber), Transaction.TRANSACTION_TYPE.WITHDRAW, getPatron(socialSecurityNumber).getSavingsAccount(), amount);\r\n withdraw.execute();\r\n txHistoryByPatron.get(getPatron(socialSecurityNumber)).add(withdraw);\r\n Transaction deposit = new Transaction(getPatron(socialSecurityNumber), Transaction.TRANSACTION_TYPE.DEPOSIT, getPatron(socialSecurityNumber).getBrokerageAccount(), amount);\r\n deposit.execute();\r\n txHistoryByPatron.get(getPatron(socialSecurityNumber)).add(deposit);\r\n } catch (InsufficientAssetsException e){\r\n throw new InsufficientAssetsException();\r\n }\r\n }", "@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}", "private void sendBucks() {\n\t\tconsole.printUsers(userService.getAll(currentUser.getToken()));\n\t\tSystem.out.println(\"\");\n\n\t\tBoolean validResponse = false;\n\t\tint selectedUserId = -1;\n\t\tBigDecimal transferAmount = new BigDecimal(0);\n\t\tBigDecimal zero = new BigDecimal(0);\n\t\tBigDecimal currentBalance = (accountService.getAccountBalance(currentUser.getToken()));\n\t\tTransfer transfer = new Transfer();\n\n\t\twhile (true) {\n\t\t\t// ask which user you want to send money to or exit\n\t\t\tselectedUserId = console.getUserInputInteger(\"Enter ID of user you are sending to (0 to cancel)\");\n\t\t\tif (selectedUserId == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (selectedUserId > 0 && selectedUserId <= userService.getAll(currentUser.getToken()).length) {\n\t\t\t\t// prompt for amount to send\n\t\t\t\ttransferAmount = console.getUserInputBigDecimal(\"Enter amount\");\n\t\t\t\t// transfer money\n\n\t\t\t\tif (transferAmount.compareTo(zero) == 1 && transferAmount.compareTo(currentBalance) <= 0) {\n\n\t\t\t\t\ttransfer.setFromUserId(currentUser.getUser().getId());\n\t\t\t\t\ttransfer.setToUserId(selectedUserId);\n\t\t\t\t\ttransfer.setTransferAmount(transferAmount);\n\t\t\t\t\ttransfer.setStatusOfTransferId(2);\n\t\t\t\t\ttransfer.setTypeOfTransferId(2);\n\n\t\t\t\t\t\n\t\t\t\t\ttransferService.createTransfer(currentUser.getToken(), transfer);\n\t\t\t\t\tSystem.out.println(\"\\nTransfer Complete!\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"\\nInsufficient Funds! Please try again.\\n\");\n\n\t\t\t}\n\t\t}\n\n\t}", "public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }", "void sendTransaction(IUserAccount target, ITransaction trans, IUserAccount user);", "public boolean transferAmount(BankAccountBindingModel bankAccountBindingModel) {\n BankAccount fromAccount = this.bankAccountRepository\n .findById(bankAccountBindingModel.getId()).orElse(null);\n\n //Get bank account that receives amount\n BankAccount toAccount = this.bankAccountRepository\n .findById(bankAccountBindingModel.getReceiverId()).orElse(null);\n\n //If one of the accounts does not exist, returns false\n if (fromAccount == null || toAccount == null) {\n return false;\n }\n //if the amount from the binding model's account is equal or less than 0, return false\n else if (bankAccountBindingModel.getAmount().compareTo(BigDecimal.ZERO) <= 0) {\n return false;\n }\n\n //Calculate the new balance for the bank account that sends amount and then set the new value\n BigDecimal newBalanceFromAccount = fromAccount.getBalance().subtract(bankAccountBindingModel.getAmount());\n fromAccount.setBalance(newBalanceFromAccount);\n\n //Returns false if the new balance in fromAccount is equal or less than 0\n if (fromAccount.getBalance().compareTo(BigDecimal.ZERO) <= 0) {\n return false;\n }\n\n //Calculate the new balanse for the bank account that receives amount and then set the new value\n BigDecimal newBalanceToAccount = toAccount.getBalance().add(bankAccountBindingModel.getAmount());\n toAccount.setBalance(newBalanceToAccount);\n\n //Create a new transaction and set its data\n Transaction transaction = new Transaction();\n transaction.setType(\"TRANSFER\");\n transaction.setFromAccount(fromAccount);\n transaction.setToAccount(toAccount);\n transaction.setAmount(bankAccountBindingModel.getAmount());\n\n //Save changes and return true\n this.bankAccountRepository.save(fromAccount);\n this.bankAccountRepository.save(toAccount);\n this.transactionRepository.save(transaction);\n return true;\n }", "@Override\r\n\tpublic TransferAmountResponseDto transfer(TransferAmountRequestDto transferAmountRequestDto) {\r\n\t\tlog.info(\"inside transaction service\");\r\n\r\n\t\tTransferAmountResponseDto transferAmountResponseDto = new TransferAmountResponseDto();\r\n\r\n\t\tTransaction debitTransaction = new Transaction();\r\n\t\tTransaction creditTransaction = new Transaction();\r\n\r\n\t\tAccount fromAccount = accountRepository.findByCustomerId(transferAmountRequestDto.getCustomerId());\r\n\t\tAccount toAccount = accountRepository.findByAccountNumber(transferAmountRequestDto.getCreditTo());\r\n\r\n\t\tif (fromAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (toAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getAccountNumber().equalsIgnoreCase(toAccount.getAccountNumber())) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_ACCOUNT);\r\n\t\t}\r\n\r\n\t\tBeneficiary existBeneficiary = beneficiaryRepository.findByCustomerAccountNumberAndBeneficiaryAccountNumber(\r\n\t\t\t\tfromAccount.getAccountNumber(), toAccount.getAccountNumber());\r\n\r\n\t\tif (existBeneficiary == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.NOT_BENEFICIARY);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getBalance() < transferAmountRequestDto.getTransferAmount()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_AMOUNT);\r\n\t\t}\r\n\r\n\t\tif (transferAmountRequestDto.getTransferAmount() <= 0) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.MINIMUM_AMOUNT);\r\n\t\t}\r\n\r\n\t\tdebitTransaction.setAccountNumber(fromAccount.getAccountNumber());\r\n\t\tdebitTransaction.setTransactionType(\"debit\");\r\n\t\tdebitTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tdebitTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tdebitTransaction.setAccount(fromAccount);\r\n\r\n\t\tcreditTransaction.setAccountNumber(toAccount.getAccountNumber());\r\n\t\tcreditTransaction.setTransactionType(\"credit\");\r\n\t\tcreditTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tcreditTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tcreditTransaction.setAccount(toAccount);\r\n\r\n\t\tdouble remainingBalance = fromAccount.getBalance() - transferAmountRequestDto.getTransferAmount();\r\n\t\tdouble updatedBalance = toAccount.getBalance() + transferAmountRequestDto.getTransferAmount();\r\n\r\n\t\tfromAccount.setBalance(remainingBalance);\r\n\t\ttoAccount.setBalance(updatedBalance);\r\n\r\n\t\taccountRepository.save(fromAccount);\r\n\r\n\t\tTransaction transaction = transactionRepository.save(debitTransaction);\r\n\t\tif (transaction.getTransactionId() == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.TRANSACTION_FAILED);\r\n\t\t}\r\n\t\taccountRepository.save(toAccount);\r\n\r\n\t\ttransactionRepository.save(creditTransaction);\r\n\r\n\t\ttransferAmountResponseDto.setMessage(\"Amount Transferred successfully..\");\r\n\t\ttransferAmountResponseDto.setTransactionId(transaction.getTransactionId());\r\n\t\ttransferAmountResponseDto.setStatusCode(201);\r\n\t\treturn transferAmountResponseDto;\r\n\t}", "public static void main(String[] args) {\n Random rand = new Random();\n rand.setSeed(0);\n for (int run = 0; run < 1000 * 1000; run++) {\n // Generate 2 arrays of 50 amounts.\n final int NUM = 50;\n int difference = 0;\n int[] amounts1 = new int[50];\n int[] amounts2 = new int[50];\n for (int i = 0; i < NUM; i++) {\n amounts1[i] = rand.nextInt(500);\n amounts2[i] = rand.nextInt(500);\n difference -= amounts1[i];\n difference += amounts2[i];\n }\n\n // Make some accounts.\n Account a = new Account(0);\n Account b = new Account(1);\n\n // Run some transfer threads on the accounts.\n Thread[] threads = new Thread[] {\n new Thread(new Transfer(a, amounts1, b), \"Thread-1\"),\n new Thread(new Transfer(b, amounts2, a), \"Thread-2\"),\n };\n\n for (Thread thread : threads) {\n thread.start();\n }\n\n // Wait for them to finish.\n for (Thread thread : threads) {\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n // See if we got it right.\n if (a.getBalance() != -b.getBalance() ||\n a.getBalance() != difference ||\n b.getBalance() != -difference) {\n System.out.printf(\"Balances were %d & %d, supposed to be %d & %d\\n\",\n a.getBalance(), b.getBalance(),\n difference, -difference);\n }\n }\n }", "@Secured({\"ROLE_ADMIN\"})\r\n\t@RequestMapping(value=\"/transfer\", method=RequestMethod.POST)\r\n\tList<AccountMovement> transferMoneyBetweenAccountsWithObjects(@Valid @RequestBody(required=true) MoneyTransferDTOInput moneyTransferDTOIn) throws Exception{\r\n\t\t\r\n\t\t//Validate accounts\r\n\t\tAccount sourceAccount = accountRepository.findOne(moneyTransferDTOIn.getSourceAccountNo());\r\n\t\tif(sourceAccount == null)\r\n\t\t\tthrow new Exception(\"Source account not found\");\r\n\t\t\r\n\t\tAccount destinationAccount = accountRepository.findOne(moneyTransferDTOIn.getDestinationAccountNo());\r\n\t\tif(destinationAccount == null)\r\n\t\t\tthrow new Exception(\"Destination account not found\");\r\n\t\t\r\n\t\tif(sourceAccount.equals(destinationAccount))\r\n\t\t\tthrow new Exception(\"Source and destination accounts must be different\");\r\n\t\t\r\n\t\tList<AccountMovement> accountMovements = new ArrayList<AccountMovement>();\r\n\t\tAccountMovement sourceMovement = new AccountMovement(sourceAccount, destinationAccount, moneyTransferDTOIn.getAmount().negate());\r\n\t\trepository.save(sourceMovement);\r\n\t\t\r\n\t\tAccountMovement destinationMovement = new AccountMovement(destinationAccount, sourceAccount, moneyTransferDTOIn.getAmount());\r\n\t\trepository.save(destinationMovement);\r\n\t\t\r\n\t\taccountMovements.add(sourceMovement);\r\n\t\taccountMovements.add(destinationMovement);\r\n\t\t\r\n\t\treturn accountMovements;\r\n\t}", "public void deposit(int amount)\n {\n setBalance(getBalance()+amount);\n }", "public boolean sendMoney(BigDecimal amount, BankAccount toAccount){\n //check if balance can cover that transfer\n if(!mIsActive || balance.compareTo(amount)<0){\n //account not active or insufficient funds\n return false;\n }\n //take out of balance\n balance = balance.subtract(amount);\n //check that the receiver received the amount\n toAccount.deposit(amount);\n //success! return true\n return true;\n }", "public ReturnValue marketTransfer(BankTransferValue bankTransferValue)\r\n\t\t\tthrows RemoteException {\n\t\treturn cp.marketTransfer(bankTransferValue);\r\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tint fromAccountId = Integer.parseInt(fromAccount.getSelectedItem().toString());\n\t\t\tint toAccountId = Integer.parseInt(toAccount.getSelectedItem().toString());\n\t\t\tfloat amountTransfer = Float.parseFloat(transferAmount.getText());\n\t\t\tFloat balance = ATMOptionUtility.getBalanceFromAccountId(fromAccountId);\n\n\t\t\tif (fromAccountId == toAccountId) {\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Illegal transfer. Cannot pick two same accounts.\");\n\t\t\t} else if (amountTransfer > 2000){\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Illegal transfer. Cannot transfer more than $2000.\");\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tif (ATMOptionUtility.checkEnoughBalance(fromAccountId, amountTransfer)) {\n\t\t\t\t\t\tATMOptionUtility.subtractMoneyToAccountId(fromAccountId, amountTransfer);\n\t\t\t\t\t\tATMOptionUtility.addMoneyToAccountId(toAccountId, amountTransfer);\n\t\t\t\t\t\tATMOptionUtility.addToTransactionsTable(\"Transfer\", ssn, fromAccountId, toAccountId, amountTransfer);\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Transfer succeeded.\");\n\t\t\t\t\t\tif(balance - amountTransfer <= 0.01) {\n\t\t\t\t\t\t\tString closeAccount = \"UPDATE CR_ACCOUNTS SET ISCLOSED = 1 WHERE ACCOUNTID = \" + fromAccountId;\n\t\t\t\t\t\t\tint numRowsUpdated = Application.stmt.executeUpdate(closeAccount);\n\t\t\t\t\t\t\tassert(numRowsUpdated == 1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tBankTellerUtility.showPopUpMessage(\"Since your account: \" + fromAccountId + \" balance was less than or \"\n\t\t\t\t\t\t\t\t\t+ \"equal to $0.01, your account was closed.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"You don't have enough to make this transaction.\");\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@RequiresPermissions(ENTITLEMENT_CAN_TRANSFER)\n public UUID transferEntitlements(final UUID sourceAccountId, final UUID destAccountId, final String bundleExternalKey, final LocalDate effectiveDate,\n final Map<UUID, String> subExtKeys, final BcdTransfer bcdTransfer, final Iterable<PluginProperty> properties, final CallContext context)\n throws EntitlementApiException;", "@PostMapping(value = \"/transfer\")\n public ResponseEntity<ResponseWrapper> transfer(@RequestBody AccountWrapper accountWrapper) {\n ResponseWrapper wrapper =new ResponseWrapper();\n UserAccount userAccount = userAccountRepository.findByAccountNumber(accountWrapper.getAccountNumber());\n if(Objects.isNull(userAccount)){\n wrapper.setMessage(\"Account With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n if (userAccount.getAmount() < accountWrapper.getAmount()) {\n wrapper.setMessage(\"Amount in your account is less than the amount you want to transfer \");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n //crediting the other user account\n UserAccount userAccount2 = userAccountRepository.findByAccountNumber(accountWrapper.getTransfer_accountNumber());\n if(Objects.isNull(userAccount2)){\n wrapper.setMessage(\"Account To Transfer With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n Float amount = userAccount2.getAmount() + accountWrapper.getAmount();\n userAccount2.setAmount(amount);\n userAccountRepository.save(userAccount2);\n\n //debit the user transferring money\n float amount1 = userAccount.getAmount() - accountWrapper.getAmount();\n userAccount.setAmount(amount1);\n userAccountRepository.save(userAccount);\n\n accountTransactionService.saveTransaction(new AccountTransaction(TRANSFER,accountWrapper.getAccountNumber(),\"Transferring Money\",\n accountWrapper.getAmount(),accountWrapper.getTransfer_accountNumber(),userAccount.getUserID()));\n wrapper.setData(\"Amount transfered successfully\");\n\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }", "public void withdrawMoney(int amount) {\n wallet.withdraw(amount);\n }", "public boolean changeAmountBy(Money Other);", "@Override\r\n\tpublic boolean transferAmnt(int toAccNo, double money)\r\n\t\t\tthrows EwalletException {\n\t\tAccount ftTemp =new Account();\r\n\t\tif(temp.getCustBal()>=money) {\r\n\t\tftTemp = dao.loginuser(toAccNo);\r\n\t\tif(ftTemp!=null)\r\n\t\t{\r\n\t\t\tftTemp.setCustBal(ftTemp.getCustBal()+money);\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Transfered :\"+money+\" To Acc No: \"+ftTemp.getAccNum()+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\tftTemp.settDetails(\"Date :\"+tDate+\" Depsoited Amount :\"+money+\" From Acc No: \"+temp.getAccNum()+\" Total Balance :\"+ftTemp.getCustBal());\r\n\t\t\tdao.updatedetails(temp.getAccNum(), temp);\r\n\t\t\tdao.updatedetails(ftTemp.getAccNum(), ftTemp);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\telse if(temp.getCustBal()<money)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Low Balance to transfer\");\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tSystem.out.println(\"No such user account\");\r\n\t\treturn false;\r\n\t}", "public void enoughForTransfer(double amount) throws BankException {\n if (this.currentAmount + amount > MAX_AMOUNT) {\n logger.warning(\"The amount in the receiving bank account cannot exceed 9 digits\");\n throw new BankException(\"The amount in the receiving bank account cannot exceed 9 digits\");\n }\n }", "public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}", "@Override\n public void apply(Map<Integer, Account> accounts) {\n Account account = accounts.get(accountNumber);\n if (account == null) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from non-existent account \" + accountNumber\n );\n }\n\n // Make sure the account is enabled.\n if (!account.isEnabled()) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from disabled account \" + accountNumber\n );\n }\n\n // Check that the account belongs to accountHolder.\n if (!account.getAccountHolder().equals(accountHolder)) {\n throw new ViolatedConstraintException(\n \"User \\\"\" + accountHolder + \"\\\" tried to perform transaction \" +\n \"on account \" + accountNumber +\n \" which belongs to user \\\"\" + account.getAccountHolder() + \"\\\"\"\n );\n }\n\n // Compute fee based on whether it was admin initiated or not\n // and whether they are a student or not.\n int fee = (adminInitiated) ? 0 : (\n (account.isStudent()) ? Constants.STUDENT_FEE : Constants.NORMAL_FEE\n );\n\n // Check that the final balance of the account after removing the funds\n // and fee is greater than zero.\n int finalBalance = account.getBalance() - amount - fee;\n if (finalBalance < 0) {\n throw new ViolatedConstraintException(\n \"Final balance should be >= 0, got \" + finalBalance\n );\n }\n\n // If the transaction isn't admin initiated, check that the final\n // withdrawal total is less than the withdrawal limit.\n int finalWithdrawalTotal = 0;\n\n if (!adminInitiated) {\n finalWithdrawalTotal = account.getWithdrawalTotal() + amount;\n\n if (finalWithdrawalTotal > Constants.WITHDRAWAL_LIMIT) {\n throw new ViolatedConstraintException(\n \"Final withdrawal total should be <= \" + Constants.WITHDRAWAL_LIMIT +\n \", got \" + finalWithdrawalTotal\n );\n }\n }\n\n // Remove the funds and fee from the account.\n account.setBalance(finalBalance);\n\n // If the transaction isn't admin initiated update withdrawal total\n // and increment the transaction count.\n if (!adminInitiated) {\n account.setWithdrawalTotal(finalWithdrawalTotal);\n account.incrementTransactionCount();\n }\n }", "@Override\r\n\tpublic boolean fundTransfer(FundTransferBean fb, double amount) {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb1 : customerList) {\r\n\t\t\tif(cb1.getPhoneNum()== fb.getSourcePhoneNum()) {\r\n\t\t\t\tfor (CustomerBean cb2 : customerList) {\r\n\t\t\t\t\tif(cb2.getPhoneNum()==fb.getDesPhoneNum()) {\r\n\t\t\t\t\t\twithdraw(cb1,amount);\r\n\t\t\t\t\t\tdeposit(cb2,amount);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "public int makeTransfer(int tr_amount, int from_account, int to_account, int from_final_balance, int to_final_balance) {\n int generated_id = 0;\n\n try {\n operationLock.lock();\n executeTransfer(generated_id = currentOperationId++, tr_amount, from_account,\n to_account, from_final_balance, to_final_balance, rawDataSource.getConnection());\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n operationLock.unlock();\n }\n\n updateBalance(from_account, from_final_balance);\n updateBalance(to_account, to_final_balance);\n\n return generated_id;\n }", "private void sendMoney(String amount, String address) {\n//\t\tAlertDialog ad = new AlertDialog.Builder(DonateActivity.this).create(); \n//\t\tad.setMessage(\"Sending money is disabled for testing purposes. See DonateActivity.sendMoney()\"); \n//\t\tad.setButton(DialogInterface.BUTTON_POSITIVE, \"OK\", new DialogInterface.OnClickListener() { \n//\t\t @Override \n//\t\t public void onClick(DialogInterface dialog, int which) { \n//\t\t dialog.dismiss(); \n//\t\t } \n//\t\t}); \n//\t\tad.show();\n\t\t\n\t\t// TODO: uncomment this when you want to send money\n \tString url = \"https://coinbase.com/api/v1/transactions/send_money/\";\n\t\tnew SendMoneyTask().execute(url, amount, address);\n \t//Intent intent = new Intent(getApplicationContext(), ThankYouActivity.class);\n \t//intent.putExtra(\"charity\", charity);\n \t//startActivity(intent);\n }", "public boolean transfer(double total, String sender, String receiver) {\n\n }", "public void deposit(double amount)\n {\n startingBalance += amount;\n }", "@RequiresPermissions(ENTITLEMENT_CAN_TRANSFER)\n public UUID transferEntitlementsOverrideBillingPolicy(final UUID sourceAccountId, final UUID destAccountId, final String bundleExternalKey, final LocalDate effectiveDate,\n final Map<UUID, String> subExtKeys, final BillingActionPolicy billingPolicy, final BcdTransfer bcdTransfer, Iterable<PluginProperty> properties, final CallContext context)\n throws EntitlementApiException;", "public static String requestTransfer(Player player, Team playersTeam, double bid, Library library, TransferList existingTransfers) {\n\t\tif (playersTeam.isMax()) {\n\t\t\treturn \"You already have 30 players in your team, this is the maximum. Sell some players before trying to buy any new!\";\n\t\t} else {\n\t\tif (existingTransfers.getTransfer(player)==null) {\n\t\t\tboolean answer = TransferLogic.getAnswer(player, bid, library, existingTransfers);\n\t\t\tif (answer) {\n\t\t\t\tTeam opponentsTeam = library.getTeamForName(player.getTeam());\n\t\t\t\topponentsTeam.deleteIfInCurrentTeam(player);\n//\t\t\t\tif (opponentsTeam.getPositions().contains(player)) {\n//\t\t\t\t\t\n//\t\t\t\t\tboolean itsdone=false;\n//\t\t\t\t\tfor (int i=0;i<opponentsTeam.getTeam().size();i++) {\n//\t\t\t\t\t\tif (!itsdone) {\n//\t\t\t\t\t\t\tPlayer p = opponentsTeam.getTeam().get(i);\n//\t\t\t\t\t\t\tif (p.getPlayerType().equals(player.getPlayerType()) && !(opponentsTeam.getPositions().contains(p))) {\n//\t\t\t\t\t\t\t\topponentsTeam.replacePlayerInCurrentTeam(player, p);\n//\t\t\t\t\t\t\t\titsdone=true;\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t\tif (!itsdone) {\n//\t\t\t\t\t\tfor (int i=0;i<opponentsTeam.getTeam().size();i++) {\n//\t\t\t\t\t\t\tif (!itsdone) {\n//\t\t\t\t\t\t\t\tPlayer p = opponentsTeam.getTeam().get(i);\n//\t\t\t\t\t\t\t\tif (((p instanceof FieldPlayer && player instanceof FieldPlayer) || (p instanceof Goalkeeper && player instanceof Goalkeeper)) && !(opponentsTeam.getPositions().contains(p))) {\n//\t\t\t\t\t\t\t\t\topponentsTeam.replacePlayerInCurrentTeam(player, p);\n//\t\t\t\t\t\t\t\t\titsdone=true;\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\tplayersTeam.add(player);\n\t\t\t\topponentsTeam.getTeam().remove(player);\n\t\t\t\tplayer.setTeam(playersTeam.getTeamName());\n\t\t\t\tplayersTeam.setBudget(playersTeam.getBudget()-bid);\n\t\t\t\topponentsTeam.setBudget(opponentsTeam.getBudget()+bid);\n\t\t\t\tBigDecimal bbid = new BigDecimal(bid);\n\t\t\t\t\n\t\t\t\t//price string\n\t\t\t\t\n\t\t\t\tDecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);\n\t\t\t\tbbid = bbid.setScale(2, BigDecimal.ROUND_DOWN);\n\t\t\t\tDecimalFormat df = new DecimalFormat();\n\t\t\t\tdf.setGroupingUsed(false);\t\t\n\t\t\t\tString priceString = formatter.format(bbid.longValue());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn \"Congratulations! Your bid of \" + priceString + \" got accepted and \" + player.getName() + \" is now part of your team\";\n\t\t\t} else {\n\t\t\t\tdouble percentage = bid/player.getPrice().doubleValue()*100-100;\n\t\t\t\tdouble returnedprice=0;\n\t\t\t\tdouble price = player.getPrice().doubleValue();\n\t\t\t\tif (percentage<-10) {\n\t\t\t\t\treturnedprice=0.9*price;\n\t\t\t\t} if (percentage>=-10 && percentage<0) {\n\t\t\t\t\treturnedprice=price;\n\t\t\t\t} if (percentage>=0 && percentage<5) {\n\t\t\t\t\treturnedprice=1.05*price;\n\t\t\t\t} if (percentage>=5 && percentage<10) {\n\t\t\t\t\treturnedprice=1.1*price;\n\t\t\t\t} if (percentage>=10 && percentage<15) {\n\t\t\t\t\treturnedprice=1.15*price;\n\t\t\t\t} if (percentage>=15 && percentage<20) {\n\t\t\t\t\treturnedprice=1.2*price;\n\t\t\t\t} if (percentage>=20 && percentage<25) {\n\t\t\t\t\treturnedprice=1.25*price;\n\t\t\t\t} if (percentage>=25 && percentage<30) {\n\t\t\t\t\treturnedprice=1.3*price;\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tTransferInProgress tp = new TransferInProgress(player, returnedprice, bid);\n\t\t\t\texistingTransfers.addTransfer(tp);\n\t\t\t\tBigDecimal bbid = new BigDecimal(bid);\n\t\t\t\tBigDecimal breturnedprice = new BigDecimal(returnedprice);\n\t\t\t\t//price string\n\t\t\t\t\n\t\t\t\tDecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);\n\t\t\t\tbbid = bbid.setScale(2, BigDecimal.ROUND_DOWN);\n\t\t\t\tbreturnedprice = breturnedprice.setScale(2, BigDecimal.ROUND_DOWN);\n\t\t\t\tDecimalFormat df = new DecimalFormat();\n\t\t\t\tdf.setGroupingUsed(false);\t\t\n\t\t\t\tString priceString = formatter.format(bbid.longValue());\n\t\t\t\tString priceString2 = formatter.format(breturnedprice.longValue());\n\t\t\t\treturn player.getTeam() + \" did not accept your offer of \" + priceString + \" for \" + player.getName() + \". They have indicated they want at least \" + priceString2 + \" for this player\";\n\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tTransferInProgress tp = existingTransfers.getTransfer(player);\n\t\t\tboolean answer = TransferLogic.getAnswerForExistingTransfer(player, bid, library, existingTransfers, tp.getPriceReturned());\n\t\t\tif (answer) {\n\t\t\t\tTeam opponentsTeam = library.getTeamForName(player.getTeam());\n\t\t\t\topponentsTeam.deleteIfInCurrentTeam(player);\n//\t\t\t\tif (opponentsTeam.getPositions().contains(player)) {\n//\t\t\t\t\tboolean itsdone=false;\n//\t\t\t\t\tfor (int i=0;i<opponentsTeam.getTeam().size();i++) {\n//\t\t\t\t\t\tif (!itsdone) {\n//\t\t\t\t\t\t\tPlayer p = opponentsTeam.getTeam().get(i);\n//\t\t\t\t\t\t\tif (p.getPlayerType().equals(player.getPlayerType()) && !(opponentsTeam.getPositions().contains(p))) {\n//\t\t\t\t\t\t\t\topponentsTeam.replacePlayerInCurrentTeam(player, p);\n//\t\t\t\t\t\t\t\titsdone=true;\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t\tif (!itsdone) {\n//\t\t\t\t\t\tfor (int i=0;i<opponentsTeam.getTeam().size();i++) {\n//\t\t\t\t\t\t\tif (!itsdone) {\n//\t\t\t\t\t\t\t\tPlayer p = opponentsTeam.getTeam().get(i);\n//\t\t\t\t\t\t\t\tif (((p instanceof FieldPlayer && player instanceof FieldPlayer) || (p instanceof Goalkeeper && player instanceof Goalkeeper)) && !(opponentsTeam.getPositions().contains(p))) {\n//\t\t\t\t\t\t\t\t\topponentsTeam.replacePlayerInCurrentTeam(player, p);\n//\t\t\t\t\t\t\t\t\titsdone=true;\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\tplayersTeam.add(player);\n\t\t\t\topponentsTeam.getTeam().remove(player);\n\t\t\t\tplayer.setTeam(playersTeam.getTeamName());\n\t\t\t\texistingTransfers.getTransfers().remove(tp);\n\t\t\t\tplayersTeam.setBudget(playersTeam.getBudget()-bid);\n\t\t\t\topponentsTeam.setBudget(opponentsTeam.getBudget()+bid);\n\t\t\t\tBigDecimal bbid = new BigDecimal(bid);\n\t\t\t\t//price string\n\t\t\t\t\n\t\t\t\tDecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);\n\t\t\t\tbbid = bbid.setScale(2, BigDecimal.ROUND_DOWN);\n\t\t\t\tDecimalFormat df = new DecimalFormat();\n\t\t\t\tdf.setGroupingUsed(false);\t\t\n\t\t\t\tString priceString = formatter.format(bbid.longValue());\n\t\t\t\treturn \"Congratulations! Your bid of \" + priceString + \" got accepted and \" + player.getName() + \" is now part of your team\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tdouble pricereturned = existingTransfers.getTransfer(player).getPriceReturned();\n\t\t\t\t\n\t\t\t\tif (bid>pricereturned) {\n\t\t\t\t\tdouble percentage = bid/player.getPrice().doubleValue()*100-100;\n\t\t\t\t\tdouble returnedprice=0;\n\t\t\t\t\tdouble price = player.getPrice().doubleValue();\n\t\t\t\t\tif (percentage<-10) {\n\t\t\t\t\t\treturnedprice=0.9*price;\n\t\t\t\t\t} if (percentage>=-10 && percentage<0) {\n\t\t\t\t\t\treturnedprice=price;\n\t\t\t\t\t} if (percentage>=0 && percentage<5) {\n\t\t\t\t\t\treturnedprice=1.05*price;\n\t\t\t\t\t} if (percentage>=5 && percentage<10) {\n\t\t\t\t\t\treturnedprice=1.1*price;\n\t\t\t\t\t} if (percentage>=10 && percentage<15) {\n\t\t\t\t\t\treturnedprice=1.15*price;\n\t\t\t\t\t} if (percentage>=15 && percentage<20) {\n\t\t\t\t\t\treturnedprice=1.2*price;\n\t\t\t\t\t} if (percentage>=20 && percentage<25) {\n\t\t\t\t\t\treturnedprice=1.25*price;\n\t\t\t\t\t} if (percentage>=25 && percentage<30) {\n\t\t\t\t\t\treturnedprice=1.3*price;\n\t\t\t\t\t}\n\t\t\t\t\texistingTransfers.getTransfer(player).setPriceReturned(returnedprice);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\texistingTransfers.getTransfer(player).setBid(bid);\n\t\t\t\tBigDecimal bbid = new BigDecimal (bid);\n\t\t\t\tBigDecimal bpriceReturned = new BigDecimal(existingTransfers.getTransfer(player).getPriceReturned());\n\t\t\t\t//price string\n\t\t\t\t\n\t\t\t\tDecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);\n\t\t\t\tbbid = bbid.setScale(2, BigDecimal.ROUND_DOWN);\n\t\t\t\tbpriceReturned = bpriceReturned.setScale(2, BigDecimal.ROUND_DOWN);\n\t\t\t\tDecimalFormat df = new DecimalFormat();\n\t\t\t\tdf.setGroupingUsed(false);\t\t\n\t\t\t\tString priceString = formatter.format(bbid.longValue());\n\t\t\t\tString priceString2 = formatter.format(bpriceReturned.longValue());\n\t\t\t\treturn player.getTeam() + \" did not accept your offer of \" + priceString + \" for \" + player.getName() + \". They have indicated they want at least \" + priceString2 + \" for this player\";\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}}", "@Override\n public List<Transfer> getTransfers(int limit) {\n throw new NotImplementedError(\"Use MergedWallet instead.\");\n }", "public void deposit(int amount) throws RejectedException {\n if (amount < 0) {\n throw new RejectedException(\n \"Tried to deposit negative value, illegal value: \" + amount + \".\" + accountInfo());\n }\n balance += amount;\n }", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public double depositInto(double amount)\r\n {\r\n _balance += amount;\r\n\r\n return _balance;\r\n }", "public RemoteCall<KlayTransactionReceipt.TransactionReceipt> burnFrom(String account, BigInteger amount) {\n final Function function = new Function(\n FUNC_BURNFROM,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(account),\n new org.web3j.abi.datatypes.generated.Uint256(amount)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }", "public static void atmCheckTransferValid(String accNum, int amount, String accNumB) {\n\t\ttry {\n\t\t\tif (amount >= 0 && amount <= 1000000) {\n\t\t\t\tif (AccMgr.checkDailyTransferLimit(accNum, amount)) {\n\t\t\t\t\tAccMgr.performDailyTransfer(amount, accNum);\n\t\t\t\t\tTransactionFileMgr.addXfrTransaction(accNum, Integer.toString(amount), accNumB);\n\t\t\t\t\tSystem.out.println(\"Transfer successful!\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"You have exceeded the daily limit\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Please enter a number between 0 - 1000000\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public void deposit(double amount)\n {\n balanceChangeLock.lock();\n try\n {\n System.out.print(\"Depositando \" + amount);\n double newBalance = balance + amount;\n System.out.println(\", novo saldo igual a \" + newBalance);\n balance = newBalance;\n sufficientFundsCondition.signalAll();\n }\n finally\n {\n balanceChangeLock.unlock();\n }\n }", "public void deposit(double amount) {\n this.balance += amount;\n }", "public void credit(double amount) {\n this.balance += amount;\n }", "public void deposit(double amount) {\n balance = balance + amount + 10;\n }", "private void transferCoin(Player customer, MarketObject<?> x) throws IllegalStateException {\n\t\tPlayer seller=game.getPlayerByID(x.getSellingPlayer().getPlayerID());\n\t\tif(customer.checkCoins(x.getPrice()))\n\t\t\tseller.setCoins(\n\t\t\t\tseller.getCoins() + x.getPrice());\n\t\telse\n\t\t\tthrow new IllegalStateException(\"Impossible to buy. You only own \"\n\t\t\t\t\t+customer.getCoins()+\" instead of the \"+x.getPrice()+\" required\");\n\t\t\n\t}", "public boolean fundTransfer(int accountNumber, float amount) {\n\t\treturn dao.fundTransfer(accountNumber,amount);\r\n\t}", "private void transferToBankAccount() {\n ArrayList<Coin> selectedCoins;\n String collection;\n mGoldAmount = 0.0;\n mBankTransferTotal = 0;\n\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n selectedCoins = getSelectedCoins(Data.COLLECTED);\n collection = Data.COLLECTED;\n // Impose 25 coin limit\n if (selectedCoins.size() > (25 - Data.getCollectedTransferred())) {\n displayToast(getString(R.string.msg_25_coin_limit));\n return;\n }\n } else {\n selectedCoins = getSelectedCoins(Data.RECEIVED);\n collection = Data.RECEIVED;\n }\n\n if (selectedCoins.size() == 0) {\n displayToast(getString(R.string.msg_please_select_coins));\n return;\n }\n\n // Transfer selected coins to bank account\n mBankTransferInProgress = true;\n mProgressBar.setVisibility(View.VISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer in progress...\");\n\n for (Coin c : selectedCoins) {\n double value = c.getValue();\n String currency = c.getCurrency();\n double exchange = value * mExchangeRates.get(currency);\n mGoldAmount += exchange;\n Data.removeCoinFromCollection(c, collection, new OnEventListener<String>() {\n\n @Override\n public void onSuccess(String string) {\n mBankTransferTotal++;\n Log.d(TAG, \"[transferToBankAccount] number processed: \" + mBankTransferTotal);\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Get current date\n LocalDateTime now = LocalDateTime.now();\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\n \"yyyy/MM/dd\", Locale.ENGLISH);\n String date = format.format(now);\n\n // Add transaction to firebase\n Transaction transaction = new Transaction(mGoldAmount, date);\n Data.addTransaction(transaction, mBankTransferTotal, collection);\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer complete\");\n displayToast(getString(R.string.msg_transfer_complete));\n }\n }\n\n @Override\n public void onFailure(Exception e) {\n mBankTransferTotal++;\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer failed\");\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n\n } else {\n displayToast(getString(R.string.msg_failed_to_transfer) + c.getCurrency()\n + \" worth \" + c.getValue());\n }\n Log.d(TAG, \"[sendCoins] failed to transfer coin: \" + c.getId());\n }\n });\n }\n }", "public void deposit(double amount)\n {\n balance = balance + amount;\n }", "void depositByCash(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tbalance += amount;\n\t\tSystem.out.println(\"Deposit \" + amount + \" successfully\");\n\t}", "public void deposit(double amount){\n\t\tbalance += amount;\n\t}", "public void deposit(int amount) {\n\t\tint newBalance = balance + amount;\n\t\ttry{\n\t\t\tThread.sleep(5); //added to make magnify corruption & make visible\n\t\t}catch(InterruptedException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tthis.balance = newBalance;\n\t}", "public static void agentCheckTransferValid(String accNum, int amount, String accNumB) {\n\t\ttry {\n\t\t\tif (amount >= 0 && amount <= 99999999) {\n\t\t\t\tSystem.out.println(\"Transfer successful!\");\n\t\t\t\tTransactionFileMgr.addXfrTransaction(accNum, Integer.toString(amount), accNumB);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Please enter a number between 0 - 99999999\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public RemoteCall<KlayTransactionReceipt.TransactionReceipt> transferFrom(String from, String to, BigInteger value) {\n final Function function = new Function(\n FUNC_TRANSFERFROM,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(from),\n new org.web3j.abi.datatypes.Address(to),\n new org.web3j.abi.datatypes.generated.Uint256(value)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }", "private void makeTransfer(String withdrawAmt, String depositAcct){\n //assume this will come as numbers only (Keyboard restricted to numbers)\n Double transferAmt = Double.valueOf(withdrawAmt);\n\n //make transfer\n customer.transferFund(currAcctName, depositAcct, transferAmt);\n\n //reset transfer value\n ((EditText)findViewById(R.id.transferAmt)).setText(\"\");\n\n //update balance\n ((TextView) findViewById(R.id.fromAmt)).setText(customer.getBalanceString(currAcctName));\n }", "public void createUserAndFundFromCash(\n constants.core.clientExperience.Constants.BrokerageAccountType desiredAccountType,\n constants.core.clientExperience.Constants.BankAccountType cashAccountType,\n constants.core.clientExperience.Constants.BrokerageAccountType destinationAccountType) throws Exception {\n\n AdvisorSplashPage advisorSplashPage = new AdvisorSplashPage(getDriver());\n AddAccountsPage addAccountsPage = signupUser(advisorSplashPage, Constants.LastName.PREMIUM_INDIVIDUAL);\n\n DepositCashForm depositCashForm = addAccountsPage.clickOpenDepositCashBtn();\n addAccountsPage = depositCashForm.reportCashAccount(\n desiredAccountType,\n \"5000\",\n cashAccountType,\n getFreeGaslampUser().routingNumber,\n getFreeGaslampUser().accountNumber);\n\n ReviewTransfersPage reviewTransfersPage = addAccountsPage.navigateToReviewTransfersPage();\n softAssert.assertTrue(reviewTransfersPage.verifyDestinationAccountType(0, destinationAccountType));\n\n ManagedApplicationPage managedApplicationPage = reviewTransfersPage.clickOnNextBtn();\n enrollFreeUserToPremium(managedApplicationPage);\n\n PaperworkStatusPage paperworkStatusPage = managedApplicationPage.navigateToPaperworkStatusPage();\n DocuSignPage docuSignPage = paperworkStatusPage.waitForPageToTransitionToDocuSign();\n paperworkStatusPage = docuSignPage.skipDocusign();\n PremiumRetirementDashboardPage retirementDashboardPage = paperworkStatusPage.clickOnGoToDashboard();\n\n softAssert.assertTrue(retirementDashboardPage.isClientEnrolling());\n\n retirementDashboardPage.header.logOut();\n softAssert.assertAll();\n }", "@Override\r\n\tpublic List<Transfer> getTransfersByDestinationAccount(int accountId) {\n\t\treturn null;\r\n\t}", "public void deposit(double amount) \n\t{\n\t\tbalance += amount;\n\t}", "public void depositMoney(double amount, boolean checkingAccount) {\n if (checkingAccount) {\n checkingBalance += amount;\n totalBalance += amount;\n } else {\n savingsBalance += amount;\n totalBalance += amount;\n }\n }", "public void pay(InternalAccountOwner from, InternalAccountOwner to, BigDecimal amount) {\n PerformPaymentData data;\n try {\n data = transactionService.getPaymentData(from, to, null);\n } catch (EntityNotFoundException e) {\n System.out.println(\"Some of the users were not found. Transaction aborted.\");\n return;\n }\n\n // try to figure out the type of payment (for some reason)\n List<TransferTypeWithCurrencyVO> types = data.getPaymentTypes();\n TransferTypeWithCurrencyVO paymentType = CollectionHelper.first(types);\n if (paymentType == null) {\n System.out.println(\"There is no possible payment type.\");\n }\n\n // set up payment to be made\n PerformPaymentDTO payment = new PerformPaymentDTO();\n payment.setType(paymentType);\n payment.setFrom(from);\n payment.setTo(to);\n payment.setAmount(amount);\n\n try {\n PaymentVO result = paymentService.perform(payment);\n TransactionAuthorizationStatus authStatus = result.getAuthorizationStatus();\n if (authStatus == TransactionAuthorizationStatus.PENDING_AUTHORIZATION) {\n System.out.println(\"The payment is pending authorization.\");\n } else {\n System.out.println(\"The payment has been processed.\");\n }\n } catch (InsufficientBalanceException e) {\n System.out.println(\"Insufficient balance\");\n } catch (MaxPaymentsPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MinTimeBetweenPaymentsException e) {\n System.out.println(\"A minimum period of time should be awaited to make \"\n + \"a payment of this type\");\n } catch (MaxAmountPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (Exception e) {\n System.out.println(\"The payment couldn't be performed\");\n }\n\n }", "public void deposit(double amount) {\n\t\tbalance += amount;\n\t}", "public void deposit(double amount) {\n\t\tbalance += amount;\n\t}" ]
[ "0.67248696", "0.63708854", "0.62458354", "0.6203385", "0.62003225", "0.6174711", "0.61744326", "0.6172515", "0.6168337", "0.6161564", "0.61532587", "0.61136067", "0.609971", "0.606204", "0.6050565", "0.6007154", "0.595342", "0.5952071", "0.5866902", "0.58448964", "0.57871324", "0.5781531", "0.5764278", "0.57433593", "0.57297194", "0.57121956", "0.5692121", "0.56653917", "0.5424879", "0.5410569", "0.539483", "0.539062", "0.5367672", "0.53440297", "0.5341608", "0.5289164", "0.5287832", "0.5281689", "0.52782965", "0.5277402", "0.52666986", "0.52557284", "0.5242569", "0.52291876", "0.52203816", "0.52054703", "0.5202423", "0.51869345", "0.5179679", "0.5174586", "0.51533747", "0.51489073", "0.51487446", "0.5138437", "0.513408", "0.5133251", "0.51176584", "0.5087115", "0.50853205", "0.5077678", "0.5069915", "0.50682354", "0.506036", "0.5059689", "0.5053991", "0.5051136", "0.5050971", "0.5048295", "0.50412947", "0.50184757", "0.5012481", "0.5009979", "0.50073236", "0.5001913", "0.49976283", "0.4972417", "0.49697918", "0.49508578", "0.49499935", "0.49490422", "0.49461013", "0.49443462", "0.49437267", "0.49405634", "0.49319357", "0.49238864", "0.49119964", "0.48911637", "0.48850355", "0.4882714", "0.48744524", "0.48681137", "0.48629194", "0.48619547", "0.4829739", "0.48229265", "0.4809271", "0.48050147", "0.4804294", "0.4804294" ]
0.68155426
0
Unfreezes funds in an account if the account's frozen funds exceed the amount specified. If frozen funds are less than specified amount, entire request is rejected.
public boolean unfreezeFunds (int secretKey, double amtToUnfreeze) { int theBankAccountNumber; // use AccountLink and secret key to get actual Bank Account number AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey); if ( theAccountLink != null ) { theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER(); } else { return false; } // use account number to get full BankAccount BankAccount theBankAccount = hashMapOfAllAccts.get(theBankAccountNumber); // ask BankAccount to check and (if possible) un-freeze the amount boolean fundsUnfrozen = theBankAccount.decreaseFreeze(amtToUnfreeze); if ( fundsUnfrozen ) { updateBankDisplay(); } return fundsUnfrozen; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void withdraw(int amount) throws RejectedException {\n if (amount < 0) {\n throw new RejectedException(\n \"Tried to withdraw negative value, illegal value: \" + amount + \".\" + accountInfo());\n }\n if (balance - amount < 0) {\n throw new RejectedException(\n \"Tried to overdraft, illegal value: \" + amount + \".\" + accountInfo());\n }\n balance -= amount;\n }", "public Integer withdraw(Integer amount) {\r\n\t if (balance < amount) {\r\n\t throw new NotEnoughFundsException(amount, balance);\r\n\t }\r\n\t balance -= amount;\r\n\t return balance;\r\n\t }", "public void withdraw (double amount) throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be withdrawn\");\n }\n if (dailyMaxWithdraw != null){\n todayWithdraw += amount;\n if(todayWithdraw > dailyMaxWithdraw){\n throw new IllegalArgumentException(\"Amount entered would exceed your daily withdraw limit\");\n }\n }\n else if (amount <= balance){\n balance -= amount;\n savingTransactions[arrayLocation] = \"Withdraw from savings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n else {\n throw new InsufficientFundsException(\"Not enough money\");\n }\n }", "public synchronized void applyFee() {\r\n balance -= FEE;\r\n }", "protected void imposeTransactionFee ()\n {\n if (getBalance () < minimumBalance)\n super.withdraw (transactionFee);\n }", "public void reduceBalance(int amount){\n this.money.subtractMoney(amount);\n }", "public void brake(double amount){\n if(acceptedValueRange(amount)){\n decrementSpeed(Math.abs(amount));\n }\n }", "public void withdrawFromChecking(double amount) {\r\n\t\tif(amount > this.getSavingsBalance()) {\r\n\t\t\tSystem.out.println(\"Unsufficient funds\");\r\n\t\t} else {\r\n\t\t\tthis.checkingBalance -= amount;\r\n\t\t\ttotalAmount -= amount;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void withdraw(double amount) {\n\t\tif (super.getBalance() - amount > overdraftLimit) {\n\t\t\tsuper.setBalance(getBalance() - amount);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Amount exceeds overdraft limit.\");\n\t}", "public boolean checkAndFreezeFunds (int secretKey, double proposedFreeze) {\n\n int theBankAccountNumber;\n // use AccountLink and secret key to get actual Bank Account number\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n if ( theAccountLink != null ) {\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n return false;\n }\n // use account number to get full BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // ask BankAccount to check and (if possible) freeze the amount\n boolean fundsFrozen = theBankAccount.checkAndFreeze(proposedFreeze);\n\n if (fundsFrozen) {\n updateBankDisplay();\n }\n\n return fundsFrozen;\n }", "public boolean debit(double amount) throws InsufficientFundsException,InvalidAmountException {\r\n\t\tif (getAmount() + overdraftBalance < amount){\r\n\t\t\tthrow new InsufficientFundsException(\"Insufficient funds to withdraw the amount.\");\r\n\t\t}\r\n\t\tif (amount <= 0){\r\n throw new InvalidAmountException(\"Amount can't be negative or 0.\");\r\n }\r\n\t\tsetAmount(getAmount() - amount);\r\n\t\tthis.setCountVal(this.getCountVal() + 1);\r\n return true;\r\n\t}", "InsufficientFunds(Account a) {\n balance = a.currentBalance();\n }", "public void deposit(int amount) throws RejectedException {\n if (amount < 0) {\n throw new RejectedException(\n \"Tried to deposit negative value, illegal value: \" + amount + \".\" + accountInfo());\n }\n balance += amount;\n }", "public void enoughForTransfer(double amount) throws BankException {\n if (this.currentAmount + amount > MAX_AMOUNT) {\n logger.warning(\"The amount in the receiving bank account cannot exceed 9 digits\");\n throw new BankException(\"The amount in the receiving bank account cannot exceed 9 digits\");\n }\n }", "public void removeBitcoins(double amount) throws NotEnoughBitcoinsException{\r\n if (amount < 0) throw new IllegalArgumentException(\"Amount may not be less than 0\");\r\n \r\n\r\n if (!this.CheckCostToBuildOrUpgrade(amount)) throw new NotEnoughBitcoinsException(\"You do not have enough Bitcoins to build this module.\");\r\n\r\n if (amount > this.getBitcoins())\r\n {\r\n throw new NotEnoughBitcoinsException (\"Not enough bitcoins\");\r\n } \r\n\r\n \r\n this.bitcoins -= amount;\r\n }", "public void withdraw (int amount) {\n if (amount >= 0) {\n balance = balance - amount;\n valueWithdrawals = valueWithdrawals + amount;\n if (balance < minimumBalance){\n minimumBalance = balance;\n }\n }\n }", "public void withdrawMoney(double amount, boolean checkingAccount) {\n if (checkingAccount && amount <= checkingBalance) {\n checkingBalance -= amount;\n totalBalance -= amount;\n } else if (!checkingAccount && amount <= savingsBalance) {\n savingsBalance -= amount;\n totalBalance -= amount;\n } else {\n System.out.println(\"Insufficient Funds.\");\n }\n }", "@Override\r\n\tpublic boolean deopsit(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tbalance = (float) (balance + amount);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void withdraw(double amount)\n throws InterruptedException\n {\n balanceChangeLock.lock();\n try\n {\n while (balance < amount)\n sufficientFundsCondition.await();\n System.out.print(\"Sacando \" + amount);\n double newBalance = balance - amount;\n System.out.println(\", novo saldo igual a \" + newBalance);\n balance = newBalance;\n }\n finally\n {\n balanceChangeLock.unlock();\n }\n }", "void withdraw(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Withdrawing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (check(amount)) {\n\t\t\tbalance -= amount;\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" successfully.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" unsuccessfully. Do not have enough available funds.\");\n\t\t}\n\t}", "@Override\n public void transferWithoutLocking(int fromId, int toId, long amount) throws InsufficientFundsException {\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n }", "public void withdraw( double amount ) throws Exception\n\t{\n\t\tif(amount >= 0.0 && amount <= balance)\n\t\t\tbalance -= amount;\n\t\t\n\t\telse\n\t\t\tthrow new Exception(\"Insufficient Balance\");\n\t}", "@Override\n\tpublic void takeMoneyOut(double amount) throws NoEnoughMoneyException {\n\t\tif (this.balance - amount < 0) {\n\t\t\tthrow new NoEnoughMoneyException(\"Sorry, operation failed. \" +\n\t\t\t\t\"The amount exceeds existing balance in this account\");\n\t\t}\n\t\tthis.balance -= amount;\n\t}", "public void withdraw(double amount) {\n this.balance -= amount;\n }", "public void withdraw(double ammount) throws insufficientFunds{\n if(ammount > abal)\n throw new insufficientFunds();\n else{\n ammount = abal - ammount;\n UpdateDB();\n }\n }", "public void withdraw(double amount)\n\t{\n\t\tbalance -= amount;\n\t}", "public void withdraw(double amount) {\n\t\tbalance -= amount;\n\t}", "public void withdraw(double amount) throws \n\t\t\t\t\t\t\t\t\tBalanceTooLowException{\n\t\tif(balance >= amount){\n\t\t\tbalance -= amount;\n\t\t}\n\t\telse{\n\t\t\tdouble needs = amount - balance;\n\t throw new BalanceTooLowException(needs);\n\t\t}\n\t}", "@Override\r\n\tpublic double deductAccountMaintenanceFee() {\n\t\tif (this.getBalance() < 250.0)\r\n\t\t\treturn super.withdraw(250.0);\r\n\t\telse \r\n\t\t\treturn this.getBalance();\r\n\t\t\r\n\t}", "public void dispenseMoney(Money amount){\n\t\ttry{\n\t\t\tThread.sleep(4000);\n\t\t} catch(InterruptedException e)\n\t\t{}\n\t\tavailableCash.subtract(amount);\n\t}", "public void deposit (int amount) {\n if (amount >= 0) {\n balance = balance + amount;\n valueDeposits = valueDeposits + amount;\n if (balance > maximumBalance) {\n maximumBalance = balance;\n }\n }\n }", "@Override\n public void withdraw(double amount) {\n try {\n if (amount > 1000) {\n throw new InvalidFundingAmountException(amount);\n }\n if (this.getBalance() < 5000) {\n throw new InsufficientFundsException(amount);\n }\n doWithdrawing(amount);\n } catch (BankException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n public void transferWithoutLocking(int fromId, int toId, long amount) throws InsufficientFundsException {\n Account fromAcct = accountMap.get(fromId);\n Account toAcct = accountMap.get(toId);\n fromAcct.withdraw(amount);\n toAcct.deposit(amount);\n }", "public void withdraw(double amount){\n\t\tbalance -= amount;\n\t}", "@Test\n public void noFrozenBalance() {\n UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(getContractForBandwidth(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), UnfreezeBalanceActuatorTest.dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n try {\n actuator.validate();\n actuator.execute(ret);\n TestCase.fail(\"cannot run here.\");\n } catch (ContractValidateException e) {\n Assert.assertTrue((e instanceof ContractValidateException));\n Assert.assertEquals(\"no frozenBalance(BANDWIDTH)\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse((e instanceof ContractExeException));\n }\n }", "@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}", "public void withdrawMoney(int amount) {\n wallet.withdraw(amount);\n }", "public void withdraw(double amount)\n {\n startingBalance -= amount;\n }", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isValidTransfer(double amount) {\n boolean amt = amount >= 0;\n boolean bal = false;\n if (amount <= this.balance + 100 && this.balance > 0) {\n bal = true;\n }\n return amt && bal && !isFreeze();\n }", "public long withdraw(long amount) {\n if (amount > balance) {\n long tmp = balance;\n balance = 0;\n return tmp;\n } else {\n balance -= amount;\n return amount;\n }\n }", "public void withdrawFromBalance(double withdrawBalanceAmount) \n\t{\n\t\taccountBalance -= withdrawBalanceAmount;\n\t}", "public void deposit(double amount){\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be deposited\");\n }\n else{\n balance += amount;\n savingTransactions[arrayLocation]= \"Deposit into savings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public void refuelBoat(double amount){\n\t if(amount > 0.0 && amount < 6.0){\n\t if (amount + amountOfFuelInTheTank > capacityOfTheFuelTank)\n\t \tamountOfFuelInTheTank = capacityOfTheFuelTank;\n\t else\n\t \tamountOfFuelInTheTank += amount;\n\t }\n\t }", "public void removeBalance(float withdraw) {\r\n\t\tthis.balance -= withdraw;\r\n\t}", "public void transferFrom(double dollarAmount) throws InsufficientFundsException {\r\n\t\tif (this.accountBalance - dollarAmount < 0) {\r\n\t\t\tthrow new InsufficientFundsException();\r\n\t\t} else {\r\n\t\t\tthis.accountBalance = this.accountBalance - dollarAmount;\r\n\t\t}\r\n\t}", "public void deposit(int amount) {\n\t\tint newBalance = balance + amount;\n\t\ttry{\n\t\t\tThread.sleep(5); //added to make magnify corruption & make visible\n\t\t}catch(InterruptedException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tthis.balance = newBalance;\n\t}", "public void unfreeze(){\n isFrozen = false;\n }", "public void withdrawMoney(double amount) {\n\t\tbalance = balance - amount;\n\t}", "public void brake(double amount){\n if (amount >= 0 && amount <= 1) {\n decrementSpeed(amount);\n }\n }", "public double withdrawFrom(double amount)\r\n {\r\n _balance -= amount;\r\n\r\n return _balance;\r\n }", "@Override\n public void apply(Map<Integer, Account> accounts) {\n Account account = accounts.get(accountNumber);\n if (account == null) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from non-existent account \" + accountNumber\n );\n }\n\n // Make sure the account is enabled.\n if (!account.isEnabled()) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from disabled account \" + accountNumber\n );\n }\n\n // Check that the account belongs to accountHolder.\n if (!account.getAccountHolder().equals(accountHolder)) {\n throw new ViolatedConstraintException(\n \"User \\\"\" + accountHolder + \"\\\" tried to perform transaction \" +\n \"on account \" + accountNumber +\n \" which belongs to user \\\"\" + account.getAccountHolder() + \"\\\"\"\n );\n }\n\n // Compute fee based on whether it was admin initiated or not\n // and whether they are a student or not.\n int fee = (adminInitiated) ? 0 : (\n (account.isStudent()) ? Constants.STUDENT_FEE : Constants.NORMAL_FEE\n );\n\n // Check that the final balance of the account after removing the funds\n // and fee is greater than zero.\n int finalBalance = account.getBalance() - amount - fee;\n if (finalBalance < 0) {\n throw new ViolatedConstraintException(\n \"Final balance should be >= 0, got \" + finalBalance\n );\n }\n\n // If the transaction isn't admin initiated, check that the final\n // withdrawal total is less than the withdrawal limit.\n int finalWithdrawalTotal = 0;\n\n if (!adminInitiated) {\n finalWithdrawalTotal = account.getWithdrawalTotal() + amount;\n\n if (finalWithdrawalTotal > Constants.WITHDRAWAL_LIMIT) {\n throw new ViolatedConstraintException(\n \"Final withdrawal total should be <= \" + Constants.WITHDRAWAL_LIMIT +\n \", got \" + finalWithdrawalTotal\n );\n }\n }\n\n // Remove the funds and fee from the account.\n account.setBalance(finalBalance);\n\n // If the transaction isn't admin initiated update withdrawal total\n // and increment the transaction count.\n if (!adminInitiated) {\n account.setWithdrawalTotal(finalWithdrawalTotal);\n account.incrementTransactionCount();\n }\n }", "public void refill(int amount) {\n myAmount = myAmount + amount;\n }", "public void withdraw(double amount) {\n\t\tif (amount < balance) {\n\t\t\tSystem.out.println(\"Successful withdraw: $\" + amount);\n\t\t\tbalance -= amount;\n\t\t} else {\n\t\t\tSystem.out.println(\"Withdraw Failed: Insufficient balance. The amount of $\" + amount + \" is more than your balance ($\" + balance +\").\");\n\t\t}\n\t}", "@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }", "public boolean transferMoney(Account fromAcct, Account toAcct, DollarAmount amount,\n long timeout, TimeUnit unit)\n throws DollarAmount.InsufficientFundsException, InterruptedException {\n long stopTime = System.nanoTime() + unit.toNanos(timeout);\n\n for (; ; ) {\n if (fromAcct.lock.tryLock()) {\n try {\n if (toAcct.lock.tryLock()) {\n try {\n if (fromAcct.getBalance().compareTo(amount) < 0) {\n throw new DollarAmount.InsufficientFundsException();\n } else {\n fromAcct.debit(amount);\n toAcct.credit(amount);\n return true;\n }\n } finally {\n toAcct.lock.unlock();\n }\n }\n } finally {\n fromAcct.lock.unlock();\n }\n }\n\n if (System.nanoTime() > stopTime)\n return false;\n\n// TimeUnit.NANOSECONDS.sleep(fixedDelay + rnd.nextLong() % randMod);\n }\n }", "public void deposit(double amount)\n {\n balanceChangeLock.lock();\n try\n {\n System.out.print(\"Depositando \" + amount);\n double newBalance = balance + amount;\n System.out.println(\", novo saldo igual a \" + newBalance);\n balance = newBalance;\n sufficientFundsCondition.signalAll();\n }\n finally\n {\n balanceChangeLock.unlock();\n }\n }", "public void removeMoney(int amount) {\n\t\tmoney -= amount;\n\t}", "public boolean sendMoney(BigDecimal amount, BankAccount toAccount){\n //check if balance can cover that transfer\n if(!mIsActive || balance.compareTo(amount)<0){\n //account not active or insufficient funds\n return false;\n }\n //take out of balance\n balance = balance.subtract(amount);\n //check that the receiver received the amount\n toAccount.deposit(amount);\n //success! return true\n return true;\n }", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "void depositByCash(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tbalance += amount;\n\t\tSystem.out.println(\"Deposit \" + amount + \" successfully\");\n\t}", "void deductFromAmount(double amount) {\n this.currentAmount -= amount;\n }", "public double payFine(double amount) {\n\t\tif (amount < 0) {\r\n\t\t\tthrow new RuntimeException(\"Member.payFine: amount must be positive\");\r\n\t\t}\r\n\t\tdouble change = 0;\r\n\t\tif (amount > fines) {\r\n\t\t\tchange = amount - fines;\r\n\t\t\tfines = 0;\r\n\t\t}else {\r\n\t\t\tfines -= amount;\r\n\t\t}\r\n\t\treturn change;\r\n\t}", "public void withdraw(BigDecimal amount) {\n this.setBalance(this.getBalance().subtract(amount));\n }", "public void restCash(double amount) {\r\n cash -= amount;\r\n }", "@Override\n public void transfer(int fromId, int toId, long amount) {\n synchronized (accounts.get(fromId)){\n synchronized (accounts.get(toId)){\n try {\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n } catch (InsufficientFundsException e) {\n //Swallow the error and do nothing\n }\n\n }\n }\n }", "public void withdraw(double dollarAmount) throws InsufficientFundsException {\r\n\t\tif (this.accountBalance - dollarAmount < 0 || this.accountBalance - dollarAmount - 1.50 < 0) {\r\n\t\t\tthrow new InsufficientFundsException();\r\n\t\t} else {\r\n\t\t\ttransactionTracker++;\r\n\t\t\tSystem.out.println(transactionTracker);\r\n\t\t\tif (transactionTracker > 4) {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount - 1.50;\r\n\t\t\t} else {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void withdraw(double amount) {\n try {Thread.sleep(10l);} catch (InterruptedException e) {}\r\n balance -= amount;\r\n System.out.println(\"Inside withdraw\"+ balance);\r\n }", "public final void payBills() {\n if (this.isBankrupt) {\n return;\n }\n Formulas formulas = new Formulas();\n if ((getInitialBudget() - formulas.monthlySpendings(this)) < 0) {\n setBankrupt(true);\n }\n setInitialBudget(getInitialBudget() - formulas.monthlySpendings(this));\n }", "void depositByCheque(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tcheque += amount;\n\t\tSystem.out.println(\"Deposit cheque \" + amount + \" successfully\");\n\t}", "public void withdrawMoney(double amount) {\n\t\tif (amount>=0){\n\t\t\tsetBalance(this.balance - amount);\n\t\t}else{\n\t\t\tSystem.out.println(\"You can not withdraw a negative value!\");\n\t\t}\n\t\t\t\t\n\t}", "public void decreaseMoneyForReserve(String login,BigDecimal money);", "public void withdraw(double amount)\n {\n if (amount <= balance) {\n balance = balance - amount;\n }\n else {\n System.err.println(\"Transaction Declined\");\n remainder = balance - amount;\n System.out.println(\"Your balance would have been \" + remainder);\n }\n }", "public void minusMoney(int amount) {\n\t\tcurrentMoney.minusMoney(amount);\n\t}", "@Override\n\tvoid withdraw(double amount) {\n\t\tsuper.balance -= amount - 20;\n\t}", "public void takeoutMoney (double amount) {\n if(amount >= 2.0) {\n int numberToRemove = (int) Math.min(getToonie(), amount / 2.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 2.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NToonie -= numberToRemove;\n amount -= 2.0 * numberToRemove;\n }\n if(amount >= 1.0) {\n int numberToRemove = (int) Math.min(getLoonie(), amount / 1.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 1.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NLoonie -= numberToRemove;\n amount -= 1.0 * numberToRemove;\n }\n if(amount >= 0.25) {\n int numberToRemove = (int) Math.min(getQuarter(), amount / 0.25);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.25) {\n coins.remove(j);\n break;\n }\n }\n }\n NQuarter -= numberToRemove;\n amount -= 0.25 * numberToRemove;\n }\n if(amount >= 0.1) {\n int numberToRemove = (int) Math.min(getDime(), amount / 0.1);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.1) {\n coins.remove(j);\n break;\n }\n }\n }\n NDime -= numberToRemove;\n amount -= 0.1 * numberToRemove;\n }\n if(amount >= 0.05) {\n int numberToRemove = (int) Math.min(getNickel(), amount / 0.05);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.05) {\n coins.remove(j);\n break;\n }\n }\n }\n NNickel -= numberToRemove;\n amount -= 0.05 * numberToRemove;\n }\n }", "public void withdraw(int amount)\n {\n setBalance(getBalance()-amount);\n }", "private void releaseBlockedBalances(int blockNumber) {\n int key = blockNumber - Blockchain.REQUIRED_BLOCK_CONFIRMATIONS;\n Account account = minerMap.get(key);\n if (account != null) {\n double sumToUnlock = Blockchain.BLOCK_REWARD;\n Block block = blockMap.get(blockNumber);\n\n if (block != null) {\n for (Transaction transaction : block.getTransactions()) {\n sumToUnlock += transaction.getTransactionFee();\n }\n blockMap.remove(blockNumber);\n }\n account.unlockBalance(sumToUnlock);\n minerMap.remove(blockNumber);\n }\n }", "public void transfer(double amount, checkingAccount cAccount)throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be deposited\");\n }\n else if (amount > balance){\n throw new InsufficientFundsException(\"Not enough money\");\n }\n else{\n balance -= amount;\n cAccount.balance += amount;\n savingTransactions[arrayLocation] = \"Transfer from savings account into checkings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n }", "public void unfreeze() {\n\t\tthis.__freezed = false;\n\t}", "public double withdraw(double withdrawalAmount) {\n\t\tdouble savingsBalance = getBalance();\n\t\tif ((savingsBalance - withdrawalAmount) >= overdraft) { // Check if balance is less than overdraft limit.\n\t\t\tsuper.withdraw(withdrawalAmount);\n\t\t}\n\t\tif ((savingsBalance - withdrawalAmount) < overdraft) {\n\t\t\tSystem.out.print(\"Cannot execute withdraw action: greater than savings withdraw limit.\\n\");\n\t\t}\n\t\treturn getBalance();\n\t}", "public void unfreeze() {\n this.frozen = false;\n }", "private static void withdraw(double amount) {\n double resultWithdraw = balance - amount;\r\n if (resultWithdraw < 0 || amount > 2000) {\r\n System.out.println(\"Withdrawal cannot exceed $2000. Balance cannot be reduced below $0.\");\r\n } else {\r\n System.out.println(amount + \" has been withdrawn from your bank account.\\nCurrent balance \" + resultWithdraw + \".\");\r\n }\r\n }", "public boolean checkIfEnough(Account account, float amount) {\n float remaining = account.getBalance() - amount;\n if (remaining >= 0) {\n return true;\n }\n return false;\n }", "private void validateBalance(Double fromBalance, Double transferAmount) throws PaymentsException {\n\t\tif ((fromBalance - transferAmount) <= 0) {\n\t\t\tlogger.error(\"Not enough balance.\");\n\t\t\tthrow new PaymentsException(\" Not enough funds. \");\n\t\t\t\n\t\t}\n\t}", "private void sendBucks() {\n\t\tconsole.printUsers(userService.getAll(currentUser.getToken()));\n\t\tSystem.out.println(\"\");\n\n\t\tBoolean validResponse = false;\n\t\tint selectedUserId = -1;\n\t\tBigDecimal transferAmount = new BigDecimal(0);\n\t\tBigDecimal zero = new BigDecimal(0);\n\t\tBigDecimal currentBalance = (accountService.getAccountBalance(currentUser.getToken()));\n\t\tTransfer transfer = new Transfer();\n\n\t\twhile (true) {\n\t\t\t// ask which user you want to send money to or exit\n\t\t\tselectedUserId = console.getUserInputInteger(\"Enter ID of user you are sending to (0 to cancel)\");\n\t\t\tif (selectedUserId == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (selectedUserId > 0 && selectedUserId <= userService.getAll(currentUser.getToken()).length) {\n\t\t\t\t// prompt for amount to send\n\t\t\t\ttransferAmount = console.getUserInputBigDecimal(\"Enter amount\");\n\t\t\t\t// transfer money\n\n\t\t\t\tif (transferAmount.compareTo(zero) == 1 && transferAmount.compareTo(currentBalance) <= 0) {\n\n\t\t\t\t\ttransfer.setFromUserId(currentUser.getUser().getId());\n\t\t\t\t\ttransfer.setToUserId(selectedUserId);\n\t\t\t\t\ttransfer.setTransferAmount(transferAmount);\n\t\t\t\t\ttransfer.setStatusOfTransferId(2);\n\t\t\t\t\ttransfer.setTypeOfTransferId(2);\n\n\t\t\t\t\t\n\t\t\t\t\ttransferService.createTransfer(currentUser.getToken(), transfer);\n\t\t\t\t\tSystem.out.println(\"\\nTransfer Complete!\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"\\nInsufficient Funds! Please try again.\\n\");\n\n\t\t\t}\n\t\t}\n\n\t}", "public static void atmCheckTransferValid(String accNum, int amount, String accNumB) {\n\t\ttry {\n\t\t\tif (amount >= 0 && amount <= 1000000) {\n\t\t\t\tif (AccMgr.checkDailyTransferLimit(accNum, amount)) {\n\t\t\t\t\tAccMgr.performDailyTransfer(amount, accNum);\n\t\t\t\t\tTransactionFileMgr.addXfrTransaction(accNum, Integer.toString(amount), accNumB);\n\t\t\t\t\tSystem.out.println(\"Transfer successful!\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"You have exceeded the daily limit\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Please enter a number between 0 - 1000000\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "@Override\r\n\tpublic void updateBalance( Integer userid, double amount) {\n\t\tif ( getBalance( userid) < amount) {\r\n\t\t\tthrow new RuntimeException( \"用户余额不足!\");\r\n\t\t}\r\n\t\tString sql = \"UPDATE buyers SET balance = balance - ? WHERE id = ?;\";\r\n\t\tjdbcTemplate.update( sql, amount, userid);\r\n\t}", "@Override\n public void transferLockingBank(int fromId, int toId, long amount) throws InsufficientFundsException {\n synchronized (this){\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n }\n }", "public void deposit(int amountToDeposit) {\n if (amountToDeposit > 0) {\n balance = balance + amountToDeposit;\n }\n }", "public void unfreeze() {\n frozen = false;\n }", "void clearFunds() {\n\t\tbalance += cheque;\n\t\tcheque = 0;\n\t}", "public void subtractCreditTransaction(double withdrawAmount){\n if(!checkAccountOpen()){\n System.out.println(\"Your credit transaction in the amount of -$\" + withdrawAmount +\" has been declined\");\n }\n else {\n this.currentBalance = this.currentBalance - withdrawAmount;\n if(this.currentBalance<0){\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n this.currentBalance = this.currentBalance + withdrawAmount;\n }\n else {\n System.out.println(\"Your credit transaction has been approved!\");\n System.out.println(\"Your current balance is: $\" + currentBalance);\n }\n }\n\n }", "boolean withdraw (int value )\n {\n if (value>balance)\n {\n return false;\n }\n else {\n balance-=value;\n return true;\n }\n }", "public void depreciate(){\r\n float amountN = getAmount();\r\n float reduce = amountN*(rate/100);\r\n amountN = amountN - reduce;\r\n this.amount = amountN;\r\n }", "public void removeCoins(Integer amount) {\n addCoins(amount*-1);\n }", "public void sendBidLimit(int amount) {\n sendMessage(Prefix.BIDLIMIT, \"\" + amount);\n }", "public int deductMoney(int amount) {\r\n\t\tmoney = Math.max(0, money - amount);\r\n\t\treturn money;\r\n\t}", "public void withdraw(double withdrawalAmount) {\n if (withdrawalAmount < 0) throw new IllegalArgumentException(\"Withdrawal amount cannot be negative\");\n if (balance - withdrawalAmount < 0) throw new IllegalArgumentException(\"Cannot withdraw more than account balance\");\n balance -= withdrawalAmount;\n numWithdrawals++;\n }" ]
[ "0.62830687", "0.61854064", "0.6098351", "0.60064036", "0.5922863", "0.5882269", "0.58416003", "0.5771817", "0.576976", "0.5755885", "0.5726423", "0.57263136", "0.5711962", "0.56990373", "0.5694109", "0.56828547", "0.565784", "0.5655413", "0.5641163", "0.5618948", "0.5596072", "0.5575755", "0.5574099", "0.55368465", "0.55302596", "0.55295914", "0.5522057", "0.55116284", "0.5503373", "0.5498794", "0.549346", "0.5487468", "0.54850703", "0.54776496", "0.5475052", "0.54666203", "0.5456908", "0.54550964", "0.54270464", "0.5413551", "0.541123", "0.53693503", "0.5357055", "0.5354196", "0.5346466", "0.5338783", "0.533529", "0.53272235", "0.5325294", "0.5321961", "0.53104585", "0.5301239", "0.5287976", "0.52653825", "0.5263816", "0.5255198", "0.52503926", "0.5250055", "0.5239995", "0.5227599", "0.52241176", "0.5220499", "0.5218544", "0.5214554", "0.52131176", "0.5213039", "0.5212885", "0.520661", "0.52021456", "0.5197998", "0.5194539", "0.5194105", "0.5192333", "0.518328", "0.51794004", "0.51715165", "0.5167782", "0.51655704", "0.5158679", "0.5155315", "0.51464224", "0.51449996", "0.5136293", "0.51351774", "0.5132589", "0.5132204", "0.5126164", "0.51214653", "0.5121448", "0.5113755", "0.51132065", "0.51103145", "0.5106103", "0.5104079", "0.51015514", "0.5098151", "0.5096841", "0.50844944", "0.50823855", "0.50817883" ]
0.72655123
0
// Private Utility Fxns // // Establishes the Bank's BankProtocol (handing it a reference to the Bank) and the Bank's NotificationServer (using a port number defined elsewhere and the BankProtocol object). The corresponding NotificationServer created is then started on its own thread.
private void bankSetup() throws IOException { bankProtocol = new BankProtocol(this); notificationServer = new NotificationServer(portNumber, bankProtocol); Thread serverThread = new Thread(notificationServer); serverThread.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface BankServerOperations \n{\n boolean checkAcntNum (int acntNum);\n boolean checkAcntStatus (int acntNum);\n boolean verifyAcntPin (int acntNum, int acntPin);\n void lockAcnt (int acntNum);\n void makeDeposit (int acntNum, int amount);\n void makeWithdrawal (int acntNum, int amount);\n double checkBalance (int acntNum);\n boolean checkOverdraft (int acntNum, double amount);\n void getTransactions (int acntNum, String startDate, String endDate, String emailAddr);\n}", "public ClientMain() throws RemoteException, MalformedURLException, NotBoundException\r\n\t{\r\n\t\t//server = (IServer) Naming.lookup(\"rmi://10.152.206.74:1099/bankingServer\");\r\n\t\tserver = (IServer) Naming.lookup(\"rmi://localhost:1099/bankingServer\");\r\n\r\n\t\tmodel = new BankModel();\r\n\r\n\t\tSystem.out.println(\"Client running\");\r\n\t}", "public BankImpl() {\n persons = new ConcurrentHashMap<String, RemotePerson>();\n try {\n registry = LocateRegistry.createRegistry(8080);\n } catch (RemoteException e) {\n e.printStackTrace();\n System.exit(2);\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 }", "public Bank(BankDisplay bankDisplay) {\n this(\"bank\", \"localhost\", 1234, bankDisplay);\n }", "private Bank() {\r\n\t\tsuper();\r\n\t\tlogService = new Logger(\"driverName\");\r\n\t\tlogger = new Logger(\"driverName\");\r\n\t\tthis.balance = balance;\r\n\t\tthis.clients = new Client[100];\r\n\t}", "private void setupBTService(){\n btService = new BluetoothService(this, mHandler);\n\n // Initialize the buffer for outgoing messages\n outStringBuffer = new StringBuffer(\"\");\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test\n public void testInterestPayment ()\n {\n initializeService();\n //assertEquals(0.10, accountingService.bankInterest, \"interest set by bootstrap\")\n \n // set the interest to 12%\n accountingService.setBankInterest(0.12);\n\n // bob is in the hole\n bob.updateCash(-1000.0);\n\n // move to midnight, activate and check messages\n timeService.setCurrentTime(new DateTime(2011, 1, 27, 0, 0, 0, 0, DateTimeZone.UTC).toInstant());\n final Map<Broker, List> msgMap = new HashMap<Broker, List>();\n doAnswer(new Answer() {\n public Object answer(InvocationOnMock invocation) {\n Object[] args = invocation.getArguments();\n msgMap.put((Broker)args[0], (List)args[1]);\n return null;\n }\n }).when(mockProxy).sendMessages(isA(Broker.class), anyList());\n accountingService.activate(timeService.getCurrentTime(), 3);\n verify(mockProxy, times(2)).sendMessages(isA(Broker.class), anyList());\n\n // should have bank tx and cash position for Bob\n assertEquals(2, msgMap.get(bob).size(), \"two messages\");\n Object btx1 = findFirst(msgMap.get(bob), new Predicate<Object>() {\n public boolean apply (Object thing) {\n return (thing instanceof BankTransaction);\n }\n });\n assertNotNull(btx1, \"found bank tx\");\n assertEquals(-1000.0 * 0.12 / 365.0, ((BankTransaction)btx1).getAmount(), 1e-6, \"correct amount\");\n Object cp1 = findFirst(msgMap.get(bob), new Predicate<Object>() {\n public boolean apply (Object thing) {\n return (thing instanceof CashPosition);\n }\n });\n assertNotNull(cp1, \"found cash posn\");\n assertEquals(-1000.0 * (1.0 + 0.12 / 365.0), ((CashPosition)cp1).getBalance(), 1e-6, \"correct amount\");\n }", "public interface AccountServer {\r\n\t\r\n\t/**\r\n\t Method: newAccount\r\n\t Inputs: String type, String name, float balance\r\n\t Returns: boolean true if the account was created and stored, false otherwise\r\n\r\n\t Description: Create a new account object in the server. if an account already exists with the given name then a new account is not created and stored.\r\n\t*/\r\n\tpublic boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;\r\n\r\n\t\r\n\t/**\r\n\t Method: closeAccount\r\n\t Inputs: String\r\n\t Returns: boolean true if there was an account with this name and close was successful\r\n\r\n\t Description: Close an account \r\n\t*/\r\n\tpublic boolean\tcloseAccount(String name);\r\n\r\n\t/**\r\n\t * @param name name of the account \r\n\t * @return Account object or null if not found. \r\n\t */\r\n\tpublic Account\tgetAccount(String name);\r\n\r\n\t/** \r\n\t * @return a list of all Accounts inside the server \r\n\t */\r\n\tpublic List<Account> getAllAccounts();\r\n\r\n\t/** \r\n\t * @return a list of Accounts inside the server that are not CLOSED\r\n\t */\r\n\tpublic List<Account> getActiveAccounts();\r\n\r\n\t\r\n\t/**\r\n\t Method: saveAccounts\r\n\t Inputs: none\r\n\t Returns: void\r\n\r\n\t Description: Saves the state of the server\r\n\t*/\r\n\tpublic void\tsaveAccounts() throws IOException;\r\n}", "public interface BluetoothServerListener {\n\t\n\t/**\n\t * Called when a new connection has been received.\n\t * \n\t * @param dis - the stream to read from.\n\t * @param dos - the stream to write to.\n\t */\n\tpublic void processConnection(DataInputStream dis, DataOutputStream dos);\n\t\n\t/**\n\t * Called when an error occurs during processing.\n\t * \n\t * @param errorMessage - the error message.\n\t * @param e - the exception, if any, that did lead to this error.\n\t */\n\tpublic void errorOccured(String errorMessage, Exception e);\n}", "public void initBT() {\n\n\t\tStatusBox.setText(\"Connecting...\");\n\t\tLog.e(TAG, \"Connecting...\");\n\t\t\n\t\tif (D) {\n\t\t\tLog.e(TAG, \"+ ON RESUME +\");\n\t\t\tLog.e(TAG, \"+ ABOUT TO ATTEMPT CLIENT CONNECT +\");\n\t\t}\n\t\t\n\t\t//If Mac Address is null then stop this process and display message\n\t\tif(MAC_ADDRESS == \"\"){\n\t\t\tLog.e(TAG,\"No MAC Address Found...\");\n\t\t\tToast.makeText(getApplicationContext(), \"No Mac Address found. Please Enter using button.\",Toast.LENGTH_SHORT );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// When this returns, it will 'know' about the server,\n\t\t// via it's MAC address.\n\t\tBluetoothDevice device = null;\n\t\ttry {\n\t\t\tdevice = mBluetoothAdapter.getRemoteDevice(MAC_ADDRESS);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(getApplicationContext(), \"NOT Valid BT MAC Address\", Toast.LENGTH_SHORT);\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\t// returns firefly e350\n\t\tLog.e(TAG, \"device name: \" + device.getName());\n\n\t\t// We need two things before we can successfully connect\n\t\t// (authentication issues aside): a MAC address, which we\n\t\t// already have, and an RFCOMM channel.\n\t\t// Because RFCOMM channels (aka ports) are limited in\n\t\t// number, Android doesn't allow you to use them directly;\n\t\t// instead you request a RFCOMM mapping based on a service\n\t\t// ID. In our case, we will use the well-known SPP Service\n\t\t// ID. This ID is in UUID (GUID to you Microsofties)\n\t\t// format. Given the UUID, Android will handle the\n\t\t// mapping for you. Generally, this will return RFCOMM 1,\n\t\t// but not always; it depends what other BlueTooth services\n\t\t// are in use on your Android device.\n\t\ttry {\n\t\t\t\n\t\t\tint currentapiVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\n\t\t\t//RFCOMM connection varies depending on android version. Fixes bug in Gingerbread and newer where always asks for BT Pairing code.\n\t\t\tif (currentapiVersion >= android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android >= 2.3.3\n\t\t\t\tbtSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t} else if (currentapiVersion < android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android < 2.3.3\n\t\t\t\tbtSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t}\n\t\t\t\n\t\t\tLog.e(TAG, \"ON RESUME: Socket created!\");\n\t\t\n\t\t\n\t\t\t// Discovery may be going on, e.g., if you're running a\n\t\t\t// 'scan for devices' search from your handset's Bluetooth\n\t\t\t// settings, so we call cancelDiscovery(). It doesn't hurt\n\t\t\t// to call it, but it might hurt not to... discovery is a\n\t\t\t// heavyweight process; you don't want it in progress when\n\t\t\t// a connection attempt is made.\n\t\t\tmBluetoothAdapter.cancelDiscovery();\n\n\t\t\tmyBT = new ConnectedThread(btSocket);\n\t\t\t\n\t\t\t\n\t\t\t// don't write to the streams unless they are created\n\t\t\tif (myBT.BTconnStatus) {\n\t\t\t\t\n\t\t\t\tStatusBox.setText(\"CONNECTED\");\n\t\t\t\tLog.e(TAG, \"CONNECTED\");\n\t\t\t\t\n\t\t\t\t// ST,255 enables remote configuration forever...need this if\n\t\t\t\t// resetting\n\t\t\t\t// PIO4 is held high on powerup then toggled 3 times to reset\n\n\t\t\t\t// GPIO Commands to BT device page 15 of commands datasheet\n\t\t\t\tbyte[] cmdMode = { '$', '$', '$' };\n\t\t\t\tmyBT.write(cmdMode);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S@,8080 temp sets GPIO-7 to an output\n\t\t\t\tbyte[] cmd1 = { 'S', '@', ',', '8', '0', '8', '0', 13 };\n\n\t\t\t\t// S%,8080 perm sets GPIO-7 to an output on powerup. only done once\n\t\t\t\t// byte [] cmd1 = {'S','%',',','8','0','8','0',13};\n\n\t\t\t\tmyBT.write(cmd1);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S&,8000 drives GPIO-7 low\n\t\t\t\t// byte [] cmd2 = {'S','^',',','8','0','0','0',13};\n\n\t\t\t\t// make it so cmd mode won't timeout even after factory reset\n\t\t\t\tbyte[] cmd3 = { 'S', 'T', ',', '2', '5', '5', 13 };\n\t\t\t\tmyBT.write(cmd3);\n\t\t\t\tmyBT.run();\n\n\t\t\t} else {\n\t\t\t\t//StatusBox.setText(\"NOT Connected\");\t\n\t\t\t\tLog.e(TAG, \"NOT Connected\");\n\t\t\t}\n\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\tif (D)\n\t\t\t\tLog.e(TAG, \"ON RESUME: Socket creation failed.\", e);\n\t\t}\n\n\t\t\n\t\t\n\t}", "public Bank ()\n {\n super (\"Bank\", defaults, trans, sharedQueue);\n customer = new Source (0, defaults [0], \"Bank$Customer\", customer_es, sharedQueue);\n teller = new Facility (1, defaults [1], new LinkedList<Coroutine> (), teller_es, sharedQueue);\n exit = new Sink (2, defaults [2], null, sharedQueue);\n initModel (new DynamicNode [] { customer, teller, exit });\n \n }", "public void prepareTheBill(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(3, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }", "public BankHall(int serverNum, int ticketWindow) {\n serverThreadPool = Executors.newFixedThreadPool(serverNum);\n ticketWindowThreadPool = Executors.newFixedThreadPool(ticketWindow);\n }", "static void CreateBillboard(Billboard billboard) throws IOException, ClassNotFoundException {\n\n // Initializing connections\n Socket client = ConnectionToServer(); // User socket connection\n OutputStream outputStream = client.getOutputStream(); // Server output to user\n InputStream inputStream = client.getInputStream(); // User input to server\n\n ObjectOutputStream send = new ObjectOutputStream(outputStream);\n ObjectInputStream receiver = new ObjectInputStream(inputStream);\n\n send.writeUTF(\"CreateBillboard\");\n send.flush();\n\n send.writeUTF(loggedInUser);\n send.writeUTF(token);\n send.flush();\n\n if (WasRequestSuccessful(receiver.readBoolean(), receiver.readUTF())) {\n int val = receiver.read();\n if (val == 1) {\n send.writeObject(billboard);\n send.flush(); // Must be done before switching to reading state\n// System.out.println(receiver.readUTF());\n if (receiver.read() == 1) {\n DialogWindow.ShowInformationPane(\"Billboard finished creating.\", \"Completion of Billboard\");\n }\n } else {\n DialogWindow.ShowErrorPane(\"Sorry you don't have permission to edit\", \"Error Can't Make Billboard\");\n }\n }\n\n// End connections\n send.close();\n receiver.close();\n client.close();\n }", "BankSession(Socket s, AccountDB a, KeyPair p,Key keyLog)\r\n\tthrows IOException\r\n {\r\n \r\n\tthis.s = s;\r\n\tOutputStream out = s.getOutputStream();\r\n\tthis.os = new ObjectOutputStream(out);\r\n\tInputStream in = s.getInputStream();\r\n\tthis.is = new ObjectInputStream(in);\r\n\tthis.accts = a;\r\n\tthis.kPrivBank = p.getPrivate();\r\n\tthis.kPubBank = p.getPublic();\r\n\tthis.crypto = new Crypto();\r\n\t\r\n\tthis.parameterGenerator = new ParameterGenerator();\r\n this.kLog = keyLog;\r\n System.out.println(\"\\nWaiting for first message\");\r\n }", "void addBank(IBank bank) throws RemoteException;", "Communicator createCommunicator();", "public static void main(String[] args) {\n FundsTransfer transfer = new FundsTransfer(clientId, clientSecret, Interswitch.ENV_DEV);\n\n try {\n\n BankResponse response = transfer.fetchBanks(); // makes network call\n\n Bank[] bank = response.getBanks(); // a bank array of all banks\n\n if (bank instanceof Object) {\n\n // successful\n Bank testBank = bank[0]; // bank at index 0\n\n String cbnCode = testBank.getCbnCode(); // Central bank code\n String bankName = testBank.getBankName(); // bank name: \n String bankCode = testBank.getBankCode(); // bankcode in alphabetical form: UBA, GTB, FBN\n\n } else {\n\n // error occured\n }\n\n } catch (\n\n Exception ex) {\n // request was not completed\n }\n }", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "public interface BankAccountService\n{\n BankAccount openAccount(long accountNumber, Date timeCreated);\n\n BankAccount getAccount(long accountNumber);\n\n void deposit(long accountNumber, double amount, String description, Date time);\n\n List<Transaction> getTransactions(BankAccount bankAccount, Date startTime, Date endTime);\n\n void withdraw(long testAccountNumber, double amount, String description, Date time);\n\n List<Transaction> getAllTransactions(BankAccount bankAccount);\n\n List<Transaction> getLatestTransactions(BankAccount bankAccount, int total);\n}", "@Override\n \tpublic void connectionOpened(NetHandler netClientHandler, String server, int port, INetworkManager manager)\n \t{\n \t}", "Notification createConnectionRequestNotification(Connection conn );", "public MyBank() {\n initComponents();\n fillClients();\n }", "public interface IServer extends Remote {\n /**\n * @param auction\n * @throws RemoteException\n */\n void placeAuction(AuctionBean auction) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void register(IClient client) throws RemoteException, InterruptedException;\n\n void disconnect(IClient client) throws RemoteException;\n\n /**\n * @param client\n * @param newBid\n * @throws RemoteException\n */\n void raiseBid(IClient client, int newBid) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void timeElapsed(IClient client) throws RemoteException, InterruptedException;\n\n\tvoid registerCredentials(String username, String password) throws RemoteException, InterruptedException;\n\n\tboolean verifyCredentials(String username, String password) throws RemoteException, InterruptedException;\n\t\n}", "void setBank(shared.data.Bank bank);", "public ControlBank(Bank bank) {\r\n\t\tthis.bank = bank;\r\n\t}", "public Ice.AsyncResult begin_addObserver(ServiceObserverPrx observer, Callback_ServiceManager_addObserver __cb);", "@Override\n public void run() {\n try {\n connectionLoggerService.add(\"Connection Join: \"\n + socket.getInetAddress().getHostName());\n Message message = readMessage();\n if (message.getCommand() == Message.Command.REGISTER_CLIENT) {\n connectionType = Message.Command.REGISTER_CLIENT;\n writeMessage(new Message.Builder()\n .accountId(bank.registerClient())\n .response(Message.Response.SUCCESS)\n .command(Message.Command.REGISTER_CLIENT)\n .send(bank.getId()));\n }\n if (message.getCommand() == Message.Command.REGISTER_AH) {\n connectionType = Message.Command.REGISTER_AH;\n writeMessage(new Message.Builder()\n .accountId(bank.registerAuctionHouse(\n message.getNetInfo().get(0)))\n .response(Message.Response.SUCCESS)\n .command(Message.Command.REGISTER_AH)\n .send(bank.getId()));\n }\n while (running) {\n message = readMessage();\n switch (message.getCommand()) {\n // UUID - senderID\n // double - amount\n case DEPOSIT: {\n bank.depositFunds(message.getSender(),\n message.getAmount());\n writeMessage(new Message.Builder()\n .response(Message.Response.SUCCESS)\n .command(Message.Command.DEPOSIT)\n .amount(message.getAmount())\n .send(bank.getId()));\n break;\n }\n // UUID - accountId\n // double - amount\n case HOLD: {\n if (bank.holdFunds(message.getAccountId(),\n message.getAmount())) {\n writeMessage(new Message.Builder()\n .response(Message.Response.SUCCESS)\n .command(Message.Command.HOLD)\n .amount(message.getAmount())\n .accountId(message.getAccountId())\n .send(bank.getId()));\n System.out.println(message.getAmount());\n } else {\n writeMessage(new Message.Builder()\n .response(\n Message.Response.INSUFFICIENT_FUNDS)\n .command(Message.Command.HOLD)\n .accountId(message.getAccountId())\n .send(bank.getId()));\n }\n break;\n }\n // UUID - accountId\n // double - amount\n case RELEASE_HOLD: {\n if (bank.releaseFunds(message.getAccountId(),\n message.getAmount())) {\n writeMessage(new Message.Builder()\n .amount(message.getAmount())\n .response(Message.Response.SUCCESS)\n .command(Message.Command.RELEASE_HOLD)\n .send(bank.getId()));\n } else {\n writeMessage(new Message.Builder()\n .response(\n Message.Response.INSUFFICIENT_FUNDS)\n .command(Message.Command.RELEASE_HOLD)\n .amount(message.getAmount())\n .send(bank.getId()));\n }\n break;\n }\n // UUID - senderId\n // UUID - accountId\n // double - amount\n case TRANSFER: {\n if (bank.transferFunds(message.getSender(),\n message.getAccountId(), message.getAmount())) {\n writeMessage(new Message.Builder()\n .response(Message.Response.SUCCESS)\n .command(Message.Command.TRANSFER)\n .amount(message.getAmount())\n .accountId(message.getAccountId())\n .send(bank.getId()));\n } else {\n writeMessage(new Message.Builder()\n .response(Message.Response.ERROR)\n .command(Message.Command.TRANSFER)\n .amount(message.getAmount())\n .accountId(message.getAccountId())\n .send(bank.getId()));\n }\n break;\n }\n // UUID - senderId\n case GET_AVAILABLE: {\n writeMessage(new Message.Builder()\n .amount(bank.getAccountFunds(message.getSender()))\n .command(Message.Command.GET_AVAILABLE)\n .send(bank.getId()));\n break;\n }\n case GET_NET_INFO: {\n writeMessage(new Message.Builder()\n .command(Message.Command.GET_NET_INFO)\n .netInfo(bank.getAuctionHouseNetInfo())\n .send(bank.getId()));\n break;\n }\n // UUID - senderId\n case GET_RESERVED: {\n writeMessage(new Message.Builder()\n .command(Message.Command.GET_RESERVED)\n .amount(bank.getHeldFunds(message.getSender()))\n .send(bank.getId()));\n break;\n }\n // UUID - sender\n // List<NetInfo> netInfo\n case DEREGISTER_AH: {\n bank.deRegisterAuctionHouse(message.getNetInfo().get(0));\n connectionLoggerService.add(\"AuctionHouse Disconnected : \"\n + socket.getInetAddress().getHostName());\n this.closeThread();\n break;\n }\n // UUID - sender\n case DEREGISTER_CLIENT: {\n bank.deRegisterClient(message.getSender());\n connectionLoggerService.add(\"Client Disconnected : \"\n + socket.getInetAddress().getHostName());\n this.closeThread();\n break;\n }\n }\n }\n } catch (ClassNotFoundException |\n NullPointerException ignored) {\n try {\n writeMessage(new Message.Builder()\n .response(Message.Response.INVALID_PARAMETERS)\n .send(bank.getId()));\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n } catch (IOException e) {\n if (connectionType == Message.Command.REGISTER_AH) {\n bank.auctionHouseConnDrop(\n socket.getInetAddress().getHostAddress());\n }\n connectionLoggerService.add(\"Connection dropped : \"\n + socket.getInetAddress().getHostName());\n this.closeThread();\n }\n }", "public Ice.AsyncResult begin_addObserver(ServiceObserverPrx observer, Ice.Callback __cb);", "public HBCIServer(DataStore dataStore,ServerCallback callback)\n {\n if (dataStore==null)\n throw new NullPointerException(\"dataStore must not be zero\");\n if (callback==null)\n throw new NullPointerException(\"callback must not be zero\");\n \n // Serverdaten initialisieren\n ServerData.getInstance().setCallbackObject(callback);\n //HBCIUtils.init(null,null,new HBCICallbackInternal());\n HBCIUtils.init(new Properties(), new HBCICallbackInternal()); \n HBCIUtils.setParam(\"log.loglevel.default\",Integer.toString(dataStore.getLogLevel()));\n HBCIUtils.setParam(\"log.filter\",Integer.toString(dataStore.getFilterLevel())); \n \n ServerData.getInstance().init(dataStore);\n }", "private Bluetooth() {}", "public StockBrokerImpl() throws java.rmi.RemoteException {\n\t\tsuper();\n\t\tthis.priceUpdater = new PriceUpdater();\n\t\tthis.priceUpdater.start();\n\t}", "public interface ISessionService {\n\n /**\n * Indicates what's the current server's bank.\n * @return\n */\n shared.data.Bank getBank();\n\n /**\n * Sets the current server's bank at startup.\n * Should not be changed once server is online.\n * @param bank\n */\n void setBank(shared.data.Bank bank);\n\n /**\n * Returns a file logger where to write the logs for the server.\n * @return\n */\n IFileLogger log();\n}", "private void init()\n {\n SystrayActivator.bundleContext\n .addServiceListener(new ProtocolProviderServiceListener());\n \n ServiceReference[] protocolProviderRefs = null;\n try\n {\n protocolProviderRefs\n = SystrayActivator.bundleContext.getServiceReferences(\n ProtocolProviderService.class.getName(),null);\n }\n catch (InvalidSyntaxException ex)\n {\n // this shouldn't happen since we're providing no parameter string\n // but let's log just in case.\n logger .error(\"Error while retrieving service refs\", ex);\n return;\n }\n \n // in case we found any\n if (protocolProviderRefs != null)\n {\n \n for (int i = 0; i < protocolProviderRefs.length; i++)\n {\n ProtocolProviderService provider\n = (ProtocolProviderService) SystrayActivator.bundleContext\n .getService(protocolProviderRefs[i]);\n \n this.addAccount(provider);\n }\n }\n }", "public BBS4000PortMibBean(ISnmpProxy aSnmpProxy)\n {\n super(aSnmpProxy);\n init();\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}", "private void monitoringLicenseAndSendNotification(NotificationBean notificationBean){\n\t\t\n//System.out.println(\"execute cmd -- \" + notificationBean.getConnection() + \" --- \" + notificationBean.getNotificationLmstatCmdLoc());\t\t\n\t\t\n\t\t//download lmstat file and delete it remotely\t\t\n//\t\tNetWorkUtil.executeSCPCmdForNotification(notificationBean.getConnection(),\n//\t\t\tnotificationBean.getNotificationLmstatCmdLoc(),LicLiteData.licLiteDataTmpDir);\n\n//local one_server.log and two_server.log test\nif(isGetingOneServerFile()){\nSystem.out.println(\"downloading one_server.log ...\");\n\tNetWorkUtil.executeSCPCmdForNotification(notificationBean.getConnection(),\n\t\t\tnotificationBean.getNotificationLmstatCmdLoc(),LicLiteData.licLiteDataTmpDir);\n}else{\n\tString cmdTwoServerLog = \"cat /home/leo/Desktop/log/two_server.log > /home/leo/Desktop/log/notificationtmp\";\n\tNetWorkUtil.executeSCPCmdForNotification(notificationBean.getConnection(),\n\t\t\tcmdTwoServerLog , LicLiteData.licLiteDataTmpDir);\nSystem.out.println(\"downloading two_server.log ...\");\n}\n\t\t\n\t\t\n\t\t\n\t\t//parse file to generate notification bean\n\t\tString notificationTmpFile = LicLiteData.licLiteDataTmpDir + File.separator + LicLiteData.NOTIFICATION_TMP_FILE;\n//System.out.println(\"notificationTmpFile --> \" + notificationTmpFile);\n\t\tNotificationCmpBean notificationCmpBean = Parser.parseDownloadDataFileToNotificationCmpBean(notificationTmpFile,\n\t\t\tnotificationBean.getNotificationLicenseName(),notificationBean.getNotificationLicenseUserName());\n//System.out.println(\"notificationCmpBean --> \" + notificationCmpBean.toString());\n//System.out.println(\"notificationCmpBean --> \" + notificationTmpFile);\n//System.out.println(\"NotificationLicenseName --> \" + notificationBean.getNotificationLicenseName());\n//System.out.println(\"NotificationLicenseUserName --> \" + notificationBean.getNotificationLicenseUserName());\n//System.out.println(\"licenseName, userName, cmpbeanStr -> \" + notificationBean.getNotificationLicenseName() \n//+ \" -- \" + notificationBean.getNotificationLicenseUserName() + \"\\n\" + notificationCmpBean.toString());\t\t\n\t\tif(notificationCmpBean.getFeatureNameCmp() == null){\n\t\t\t//stop service\n\t\t\t\n\t\t\t//toast say : \"wrong feature name or user name\"\n\t\t}else {\n\t\t\tif(LicLiteData.previousNotificationBean == null){\n\t\t\t\tLicLiteData.previousNotificationBean = notificationCmpBean;\n\t\t\t} else {\n\t\t\t\t//compare previous and current bean to see if need to send notification\n\t\t\t\t//compare LicLiteData.previousNotificationBean as 1st bean with notificationCmpBean as 2nd bean\n//System.out.println(\"LicLiteData.previousNotificationBean --> \" + LicLiteData.previousNotificationBean.toString());\n//System.out.println(\"notificationCmpBean --> \" + notificationCmpBean.toString());\n\t\t\t\tArrayList<NotificationCmpResultBean> tmpCmpResultBeanList = UIUtil\n\t\t\t\t\t.comparePreviousWithSecondNotificationBean(LicLiteData.previousNotificationBean , notificationCmpBean);\n//System.out.println(\"tmpCmpResultBeanList --> \" + tmpCmpResultBeanList);\t\t\t\t\n\t\t\t\tif(tmpCmpResultBeanList.size() > 0){\n//System.out.println(\"sending notification...\");\n\t\t\t\t\tLicLiteData.notificationCmpResultBeanList = tmpCmpResultBeanList;\n\t\t\t\t\t\n\t\t\t\t\tsendNotification();\n\t\t\t\t} else {\n//System.out.println(\"not sending notification...\");\n\t\t\t\t}\n\t\t\t\t//set the ischanged file to true for future comparison\n\t\t\t\tfor(int i = 0; i < notificationCmpBean.getUserUsageListCmp().size(); i++){\n\t\t\t\t\tnotificationCmpBean.getUserUsageListCmp().get(i).setChanged(true);\n\t\t\t\t}\n\t\t\t\t//notificationCmpBean overwrite LicLiteData.previousNotificationBean\n\t\t\t\tLicLiteData.previousNotificationBean = notificationCmpBean;\n\t\t\t} \n\t\t\t\n\t\t}\n\t\t\n\t\t//delete download local lmstat file\n\t\t//this one doesn't needed anymore\n\t\t\n\t\t\n\t}", "public void testInsertCompany() throws Exception \n {\n \tassertTrue(testServlet.isRunning());\n\t\tConsoleHandler handler = new ConsoleHandler();\n\t\thandler.setLevel(Level.ALL);\n\t\tLogger.getLogger(JdyWebSocketNotification.class.getName()).addHandler(handler);\n\t\tLogger.getLogger(JdyWebSocketNotification.class.getName()).setLevel(Level.ALL);\n \t\n\t\tSimpleMetaInfoRepository repository = new SimpleMetaInfoRepository();\t\t\n\n\t\tCompanyImpl testCompany = new CompanyImpl();\n\t\ttestCompany.setCompanyId(new Integer(100));\t\t\n\t\ttestCompany.setCity(\"Roggenburg\");\t\t\n\t\ttestCompany.setCompanyName(\"Successfull living Comp.\");\t\t\n\t\ttestCompany.setStreet(\"I did it my Way\");\t\t\n\t\ttestCompany.setZip(\"D-89297\");\t\t\n\t\t\n\t\t//String serverName = \"ws://localhost:\"+PORT+\"/\";\n\t\tString destUri = \"ws://127.0.0.1:\" + PORT + \"/echo\";\n\t\tJdyWebSocketNotification notification1 = new JdyWebSocketNotification(new URI(destUri), repository);\n\t\tboolean connected = false;\n\t\tfor( int i = 0; i < 20 && !connected; i++) {\n\t\t\ttry {\n\t\t\t\tnotification1.connect();\n\t\t\t\tconnected = true;\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tJdyWebSocketNotification notification2 = new JdyWebSocketNotification(new URI(destUri), repository);\n\t\tconnected = false;\n\t\tfor( int i = 0; i < 20 && !connected; i++) {\n\t\t\ttry {\n\t\t\t\tnotification2.connect();\n\t\t\t\tconnected = true;\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tfinal List<ObjectList<PersistentOperation<TypedValueObject>>> listHolder = new ArrayList<ObjectList<PersistentOperation<TypedValueObject>>>();\n\t\tnotification2.addPersistenceListener(new JdyWebSocketNotification.PersistenceListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void persistenceChanged(\tObjectList<PersistentOperation<TypedValueObject>> changedObjects) \n\t\t\t{\n\t\t\t\tlistHolder.add(changedObjects);\n\t\t\t}\n\t\t});\n\n\t\tnotification1.sendObjectNotification(testCompany, repository.getCompanyClassInfo(), Operation.INSERT);\n\t\t\n\t\t// wait for notification\n\t\tfor(int i =0 ; i < 10 && listHolder.size() == 0; i++) {\n\t\t\tThread.sleep(2000);\n\t\t}\n\t\t\n\t\tassertEquals(1, listHolder.size());\n }", "public void testBidNotification() {\n User owner = new User();\n Thing thing1 = new Thing(owner);\n\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing1, borrower, 800);\n }catch(Exception e){\n fail();\n }\n try {\n thing1.placeBid(bid);\n } catch (ThingUnavailableException e) {\n fail();\n }\n\n //assertTrue(owner.notifiedOfBid(bid));\n\n assertTrue(false);\n }", "public interface HTTPContract {\n void getRequirementList(AnnounceDataSource.GetRequirementListCallback callback);\n void getFeelingList(AnnounceDataSource.GetFeelingListCallback callback);\n void postFeelingCommend();\n void postFeelingComment();\n// void postRequirementBook();\n// void postRequirementComment();\n\n}", "public void testBidAcceptionNotification() {\n User owner = new User();\n Thing thing1 = new Thing(owner);\n\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing1, borrower, 800);\n }catch(Exception e){\n fail();\n }\n try {\n thing1.placeBid(bid);\n } catch (ThingUnavailableException e) {\n fail();\n }\n\n //owner.acceptBid(thing1, bid);\n //assertTrue(borrower.notifiedOfAcceptedBid(bid));\n\n assertTrue(false);\n }", "public TransferMoney() {\n try {\n med = (AllMethods) Naming.lookup(\"rmi://localhost:3006/YourMoney\");\n\n } catch (MalformedURLException | NotBoundException | RemoteException ex) {\n System.out.println(ex);\n }\n initComponents();\n }", "public void setBankService(BankService bankService) {\r\n this.bankService = bankService;\r\n }", "public void setUpNetworking() throws Exception {\n this.serverSock = new ServerSocket(4242);\n\n groupChats = new HashMap<String, ArrayList<String>>();\n groupMessages = new HashMap<String, ArrayList<String>>();\n groupMessages.put(\"Global\", new ArrayList<String>());\n\n int socketOn = 0;\n\n while (true) {\n\n Socket clientSocket = serverSock.accept();\n System.out.println(\"Received connection \" + clientSocket);\n\n ClientObserver writer = new ClientObserver(clientSocket.getOutputStream());\n\n Thread t = new Thread(new ClientHandler(clientSocket, writer));\n t.start();\n System.out.println(\"Connection Established\");\n socketOn = 1;\n }\n }", "public interface TerminalServer {\n\n /**\n * Метод возвращает PIN пользователя\n * @param num - принимает номер счета\n * @return PIN\n */\n public int getPin(int num);\n /**\n * Метод возвращает количество денег на счету пользователя\n * @param num - принимает номер счета\n * @return balance\n */\n public int getBalance(int num);\n\n /**\n * @param num - принимает номер счета\n * @param balance\n */\n public void setBalance(int num, int balance);\n\n /**\n * Метод, позволяющий зачислить деньги на счет\n * @param num - принимает номер счета\n * @param sum - вносимая сумма на счет\n */\n public void deposit(int num, int sum);\n\n /**\n * Метод, позволяющий снять деньги со счет\n * @param num - принимает номер счета\n * @param sum - вносимая сумма на счет\n * @exception InvalidBalanceException() - баланс меньше запрашиваемой суммы\n */\n public void withdraw(int num, int sum);\n\n /**\n * Метод, определяющий количество обращений к серверу и в случае определенного количества выкидывающего ошибку о выполнении работ\n * @exception ServerWorkException() - превышен лимит операций\n */\n public void countConnect() throws ServerWorkException;\n\n public void setCountConnect(int countConnect);\n}", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "public Ice.AsyncResult begin_addObserver(ServiceObserverPrx observer);", "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}", "interface NotifyClient extends Remote {\n\n\t/**\n\t * An identity has been assigned to this node.\n\t * \n\t * @param id\n\t * the identity\n\t * @param oldNode\n\t * the last node the identity was assigned to, or {@code null} if\n\t * this is a new node assignment\n\t * @throws IOException\n\t * if there is a communication problem\n\t */\n\tvoid added(Identity id, Node oldNode) throws IOException;\n\n\t/**\n\t * \n\t * An identity has been removed from this node.\n\t * \n\t * @param id\n\t * the identity\n\t * @param newNode\n\t * the new node the identity is assigned to, or {@code null} if\n\t * the identity is being removed from the map\n\t * @throws IOException\n\t * if there is a communication problem\n\t */\n\tvoid removed(Identity id, Node newNode) throws IOException;\n\n\t/**\n\t * An identity has been selected for relocation from this node.\n\t * \n\t * @param id\n\t * the identity\n\t * @param newNodeId\n\t * the ID of the new node the identity will be relocated to\n\t * @throws IOException\n\t * if there is a communication problem\n\t */\n\tvoid prepareRelocate(Identity id, long newNodeId) throws IOException;\n}", "private void startServer() {\n mBluetoothGattServer = mBluetoothManager.openGattServer(this, mGattServerCallback);\n if (mBluetoothGattServer == null) {\n Log.w(TAG, \"Unable to create GATT server\");\n return;\n }\n\n mBluetoothGattServer.addService(TimeProfile.createTimeService());\n\n // Initialize the local UI\n updateLocalUi(System.currentTimeMillis());\n mBluetoothGattServer.addService(SecurityProfile.createSecurityService());\n //mBluetoothGattServer.addService(ConfigurationProfile.createConfigurationService());\n\n }", "public FileTransfer(int myPort){ //Receiver\n socket = new MySocket(ProtocolStack.getLocalhost().getLogicalID(),myPort);\n socket.bindServer();\n socket.accept();\n step = STEP_WAITING_TO_RECEIVE;\n }", "public interface Communicator {\n\n\n public void sendData(String string);\n public void sendNIDcardObject(NIDCard nidCard);\n public void startWelcomeFragment();\n public void stopWelcomeFragment();\n public void startStepOne();\n}", "public interface Notify extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npublic static abstract class Stub extends android.os.Binder implements com.jancar.media.Notify\n{\nprivate static final java.lang.String DESCRIPTOR = \"com.jancar.media.Notify\";\n/** Construct the stub at attach it to the interface. */\npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}\n/**\n * Cast an IBinder object into an com.jancar.media.Notify interface,\n * generating a proxy if needed.\n */\npublic static com.jancar.media.Notify asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.jancar.media.Notify))) {\nreturn ((com.jancar.media.Notify)iin);\n}\nreturn new com.jancar.media.Notify.Stub.Proxy(obj);\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn this;\n}\n@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException\n{\nswitch (code)\n{\ncase INTERFACE_TRANSACTION:\n{\nreply.writeString(DESCRIPTOR);\nreturn true;\n}\ncase TRANSACTION_notifyMusic:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.util.List<com.jancar.media.data.Music> _arg0;\n_arg0 = data.createTypedArrayList(com.jancar.media.data.Music.CREATOR);\nthis.notifyMusic(_arg0);\nreply.writeNoException();\nreply.writeTypedList(_arg0);\nreturn true;\n}\ncase TRANSACTION_notifyVideo:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.util.List<com.jancar.media.data.Video> _arg0;\n_arg0 = data.createTypedArrayList(com.jancar.media.data.Video.CREATOR);\nthis.notifyVideo(_arg0);\nreply.writeNoException();\nreply.writeTypedList(_arg0);\nreturn true;\n}\ncase TRANSACTION_notifyImage:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.util.List<com.jancar.media.data.Image> _arg0;\n_arg0 = data.createTypedArrayList(com.jancar.media.data.Image.CREATOR);\nthis.notifyImage(_arg0);\nreply.writeNoException();\nreply.writeTypedList(_arg0);\nreturn true;\n}\ncase TRANSACTION_notifyID3Music:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.util.List<com.jancar.media.data.Music> _arg0;\n_arg0 = data.createTypedArrayList(com.jancar.media.data.Music.CREATOR);\nthis.notifyID3Music(_arg0);\nreply.writeNoException();\nreply.writeTypedList(_arg0);\nreturn true;\n}\ncase TRANSACTION_notifyPath:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.lang.String _arg0;\n_arg0 = data.readString();\nthis.notifyPath(_arg0);\nreply.writeNoException();\nreturn true;\n}\n}\nreturn super.onTransact(code, data, reply, flags);\n}\nprivate static class Proxy implements com.jancar.media.Notify\n{\nprivate android.os.IBinder mRemote;\nProxy(android.os.IBinder remote)\n{\nmRemote = remote;\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn mRemote;\n}\npublic java.lang.String getInterfaceDescriptor()\n{\nreturn DESCRIPTOR;\n}\n/**\n * Demonstrates some basic types that you can use as parameters\n * and return values in AIDL.\n */\n@Override public void notifyMusic(java.util.List<com.jancar.media.data.Music> list) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeTypedList(list);\nmRemote.transact(Stub.TRANSACTION_notifyMusic, _data, _reply, 0);\n_reply.readException();\n_reply.readTypedList(list, com.jancar.media.data.Music.CREATOR);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void notifyVideo(java.util.List<com.jancar.media.data.Video> list) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeTypedList(list);\nmRemote.transact(Stub.TRANSACTION_notifyVideo, _data, _reply, 0);\n_reply.readException();\n_reply.readTypedList(list, com.jancar.media.data.Video.CREATOR);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void notifyImage(java.util.List<com.jancar.media.data.Image> list) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeTypedList(list);\nmRemote.transact(Stub.TRANSACTION_notifyImage, _data, _reply, 0);\n_reply.readException();\n_reply.readTypedList(list, com.jancar.media.data.Image.CREATOR);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void notifyID3Music(java.util.List<com.jancar.media.data.Music> list) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeTypedList(list);\nmRemote.transact(Stub.TRANSACTION_notifyID3Music, _data, _reply, 0);\n_reply.readException();\n_reply.readTypedList(list, com.jancar.media.data.Music.CREATOR);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void notifyPath(java.lang.String path) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeString(path);\nmRemote.transact(Stub.TRANSACTION_notifyPath, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n}\nstatic final int TRANSACTION_notifyMusic = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);\nstatic final int TRANSACTION_notifyVideo = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);\nstatic final int TRANSACTION_notifyImage = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);\nstatic final int TRANSACTION_notifyID3Music = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);\nstatic final int TRANSACTION_notifyPath = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);\n}\n/**\n * Demonstrates some basic types that you can use as parameters\n * and return values in AIDL.\n */\npublic void notifyMusic(java.util.List<com.jancar.media.data.Music> list) throws android.os.RemoteException;\npublic void notifyVideo(java.util.List<com.jancar.media.data.Video> list) throws android.os.RemoteException;\npublic void notifyImage(java.util.List<com.jancar.media.data.Image> list) throws android.os.RemoteException;\npublic void notifyID3Music(java.util.List<com.jancar.media.data.Music> list) throws android.os.RemoteException;\npublic void notifyPath(java.lang.String path) throws android.os.RemoteException;\n}", "public Ice.AsyncResult begin_addObserver(ServiceObserverPrx observer, java.util.Map<String, String> __ctx, Ice.Callback __cb);", "public static void initCommunicationServerThread(ProjectType project){\r\n try{\r\n serverSocket = new ServerSocket(Attributes.PROFILING_PORT, 2, InetAddress.getLocalHost());\r\n System.out.println(\"Server - ServerSocket created on port: \" + serverSocket.getLocalPort());\r\n }catch (UnknownHostException uhe){\r\n uhe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }\r\n new CommunicationServerThread(project);\r\n }", "public interface Notify\n\t{\n\t\t/**\n\t\t * Notifies of mailbox status change.\n\t\t * @param mb the mailbox whose status has changed.\n\t\t * @param state the state object passed in the register\n\t\t * method.\n\t\t * @param closed true if the mailbox timeout has expired and\n\t\t * the mailbox is now closed to delivery, false if a message\n\t\t * has arrived.\n\t\t */\n\t\tpublic void mailboxStatus( Mailbox mb, Object state, boolean closed );\n\t}", "public interface BankProcessingCenterOperations\n{\n\t/* constants */\n\t/* operations */\n\tboolean debit(TransactionRequest transaction) throws ebank.InsufficientBalanceException,ebank.CardNumberException, SQLException, ClassNotFoundException;\n\tboolean credit(TransactionRequest transaction) throws ebank.CardNumberException, ClassNotFoundException, SQLException;\n\tfloat getBalance(long card_number) throws ebank.CardNumberException, SQLException, ClassNotFoundException;\n}", "public Ice.AsyncResult begin_addObserver(ServiceObserverPrx observer, java.util.Map<String, String> __ctx, Callback_ServiceManager_addObserver __cb);", "@WebService(targetNamespace = \"http://hr.ibm.fmis.gw.BudgetUserLibrary/interfaces/BankManagementInterface\", name = \"BankManagementInterface\")\r\n@XmlSeeAlso({budgetuserlibrary.gw.fmis.ibm.hr.infotypes.ObjectFactory.class, ObjectFactory.class, budgetuserlibrary.gw.fmis.ibm.hr.messages.ObjectFactory.class})\r\npublic interface BankManagementInterface {\r\n\r\n @WebResult(name = \"bankResponseMsg\", targetNamespace = \"\")\r\n @RequestWrapper(localName = \"retrieveBank\", targetNamespace = \"http://hr.ibm.fmis.gw.BudgetUserLibrary/interfaces/BankManagementInterface\", className = \"budgetuserlibrary.gw.fmis.ibm.hr.interfaces.bankmanagementinterface.RetrieveBank\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"retrieveBankResponse\", targetNamespace = \"http://hr.ibm.fmis.gw.BudgetUserLibrary/interfaces/BankManagementInterface\", className = \"budgetuserlibrary.gw.fmis.ibm.hr.interfaces.bankmanagementinterface.RetrieveBankResponse\")\r\n public budgetuserlibrary.gw.fmis.ibm.hr.messages.BankResponseMsg retrieveBank(\r\n @WebParam(name = \"bankRetrieveRequestMsg\", targetNamespace = \"\")\r\n budgetuserlibrary.gw.fmis.ibm.hr.messages.BankRetrieveRequestMsg bankRetrieveRequestMsg\r\n );\r\n\r\n @WebResult(name = \"bankResponseMsg\", targetNamespace = \"\")\r\n @RequestWrapper(localName = \"changeBank\", targetNamespace = \"http://hr.ibm.fmis.gw.BudgetUserLibrary/interfaces/BankManagementInterface\", className = \"budgetuserlibrary.gw.fmis.ibm.hr.interfaces.bankmanagementinterface.ChangeBank\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"changeBankResponse\", targetNamespace = \"http://hr.ibm.fmis.gw.BudgetUserLibrary/interfaces/BankManagementInterface\", className = \"budgetuserlibrary.gw.fmis.ibm.hr.interfaces.bankmanagementinterface.ChangeBankResponse\")\r\n public budgetuserlibrary.gw.fmis.ibm.hr.messages.BankResponseMsg changeBank(\r\n @WebParam(name = \"bankChangeRequestMsg\", targetNamespace = \"\")\r\n budgetuserlibrary.gw.fmis.ibm.hr.messages.BankChangeRequestMsg bankChangeRequestMsg\r\n );\r\n\r\n @WebResult(name = \"bankResponseMsg\", targetNamespace = \"\")\r\n @RequestWrapper(localName = \"createBank\", targetNamespace = \"http://hr.ibm.fmis.gw.BudgetUserLibrary/interfaces/BankManagementInterface\", className = \"budgetuserlibrary.gw.fmis.ibm.hr.interfaces.bankmanagementinterface.CreateBank\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"createBankResponse\", targetNamespace = \"http://hr.ibm.fmis.gw.BudgetUserLibrary/interfaces/BankManagementInterface\", className = \"budgetuserlibrary.gw.fmis.ibm.hr.interfaces.bankmanagementinterface.CreateBankResponse\")\r\n public budgetuserlibrary.gw.fmis.ibm.hr.messages.BankResponseMsg createBank(\r\n @WebParam(name = \"bankCreationRequestMsg\", targetNamespace = \"\")\r\n budgetuserlibrary.gw.fmis.ibm.hr.messages.BankCreationRequestMsg bankCreationRequestMsg\r\n );\r\n}", "@Override\n public void requestPatchDump(int bankNum, int patchNum) {\n send(SYS_REQ.toSysexMessage(getChannel(), new SysexHandler.NameValue(\n \"channel\", getChannel())));\n }", "public NotificationService() {\n super(\"NotificationService\");\n }", "@SuppressWarnings(\"unused\")\npublic interface AccountI extends Remote {\n String login(String id, String passwd) throws RemoteException;\n String signUp(String id, String passwd, String secureQuestion, String answer)throws RemoteException;\n String logOut(String userName) throws RemoteException;\n String forgetPassword(String username)throws RemoteException;\n String resetPassword(String username,String answer, String password)throws RemoteException;\n void startIO()throws RemoteException;\n int getRuntimeServer()throws RemoteException;\n int getFileServer() throws RemoteException;\n int getIOUniqueNumber()throws RemoteException;\n}", "@ArchTypeComponent(\n patterns = {@Pattern(name=\"testLayered\", kind = \"Layered\", role=\"Layer{1}\")}\n )\npublic interface ServerConnector { \n \n /** Send the on-the-wire string to the server side. \n * \n * @param onTheWireFormat the observation in the adopted \n * on-the-wire format. \n * @return a future that will eventually tell the status \n * of the transmission. \n */ \n public FutureResult sendToServer(String onTheWireFormat) throws IOException; \n \n /** Send a query for a set of observations to the server. \n * \n * @param query the query for observations. Use one of \n * those defined in the forwarder.query sub package as \n * these are the ONLY ones the server understands. \n * @param reponseType define the type of the \n * returned observations, either as a list of \n * StandardTeleObserations or as PHMR documents. \n * @return a future with the query result as one big \n * string that needs deserializing before it can \n * by understood. \n * @throws IOException \n * @throws Net4CareException \n * @throws UnknownCPRException \n */ \n\tpublic FutureResultWithAnswer queryToServer(Query query) throws IOException, Net4CareException; \n\t \n }", "public static void main (String [] args)\n {\n Bank model = new Bank ();\n model.start ();\n \n }", "@Override\r\n public void start(OpProjectSession session) {\n OpBroker broker = session.newBroker();\r\n try {\r\n if (session.administrator(broker) == null) {\r\n OpUserService.createAdministrator(broker);\r\n }\r\n if (session.everyone(broker) == null) {\r\n OpUserService.createEveryone(broker);\r\n }\r\n\r\n //register system objects with Backup manager\r\n OpBackupManager.addSystemObjectIDQuery(OpUser.ADMINISTRATOR_NAME, OpUser.ADMINISTRATOR_ID_QUERY);\r\n OpBackupManager.addSystemObjectIDQuery(OpGroup.EVERYONE_NAME, OpGroup.EVERYONE_ID_QUERY);\r\n }\r\n finally {\r\n broker.closeAndEvict();\r\n }\r\n }", "interface CreateNewNetCallback {\n\n /**\n * Method is called after the net was created successfully.\n */\n void onCreateNewNetSuccess();\n\n /**\n * Method is called after something went wrong with creation of new net.\n */\n void onCreateNewNetFailure();\n\n void onApplicationMainPortUsed();\n }", "public Bank(String bankName,\n String location,\n int portNumber,\n BankDisplay bankDisplay) {\n\n this.bankName = bankName;\n this.location = location;\n this.portNumber = portNumber;\n this.bankDisplay = bankDisplay;\n\n // several lists for keeping track of account-related information\n hashMapOfAllAccts = new HashMap<>();\n hashMapOfSecretKeys = new HashMap<>();\n listOfAuctionHouseIDRecords = new ArrayList<>();\n listOfAgentIDRecords = new ArrayList<>();\n\n try {\n bankSetup();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public Object startSync(\r\n\t\t\tString serverHost,\r\n\t\t\tshort serverPort,\r\n\t\t\tbyte[] serverCertificate,\r\n\t\t\tString serverUniqueId,\r\n\t\t\tString notifyEndpoint\r\n\t\t\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}", "public interface BluetoothListener {\n\t/**\n\t * Get a description of the game, to be displayed on the BluetoothFragment layout.\n\t * @return\n\t */\n\tString getHelpString();\n\t\n\t/**\n\t * @see #onConnectedAsServer(String)\n\t */\n\tvoid onConnectedAsClient(String deviceName);\n\t\n\t/**\n\t * The 2 devices have established a bluetooth connection.\n\t * The typical action at this point is to hide the bluetooth\n\t * fragment and show the game fragment. From now on the\n\t * communication between client and server is symmetrical:\n\t * both devices can equally send and receive messages.\n\t * \n\t * Sometimes it is useful to know which device requested the\n\t * connection (the client) and which side accepted that\n\t * connection (the server).\n\t * \n\t * @param deviceName the name of the remote device\n\t */\n\tvoid onConnectedAsServer(String deviceName);\n\t\n\t/**\n\t * Typically the Activity will hide the game fragment and show\n\t * the BluetoothFragment, to allow the user to re-connect.\n\t */\n\tvoid onConnectionLost();\n\t\n\tvoid onError(String message);\n\t\n\t/**\n\t * A data message has been received from the remote device.\n\t * This corresponds to the other device performing a write().\n\t * @see BluetoothService#write(byte[] data)\n\t * \n\t * @param data\n\t */\n\tvoid onMessageRead(byte[] data);\n\t\n\t/**\n\t * A status message sent by the bluetooth service to be displayed\n\t * by the activity using Toast.\n\t * @param string\n\t */\n\tvoid onMessageToast(String string);\n\t\n\t/**\n\t * Called when the state of the bluetooth service has changed.\n\t * @see class BluetoothService.BTState for possible values.\n\t * @param state\n\t */\n\tvoid onStateChange(BluetoothService.BTState state);\n\t\n\t/**\n\t * Pass the object that will handle bluetooth communication.\n\t * Null if bluetooth not available on this device.\n\t * The main method to use in communication is write(byte[] data)\n\t * \n\t * @see BluetoothService#write(byte[] data)\n\t * @param bluetoothService\n\t */\n\tvoid setBluetoothService(BluetoothService bluetoothService);\n\n\t/**\n\t * A status message sent by the bluetooth service to be displayed\n\t * somewhere.\n\t * @param message\n\t */\n\tvoid setStatusMessage(String message);\n}", "@Test\n public void testSfsbImplementingSessionSynchronizationForDoubleCallbacks() throws Throwable\n {\n // Define JNDI Target for Lookup\n String jndiName = ImplementsSessionSynchronizationBean.class.getSimpleName() + \"/\" + \"remote\";\n\n // Get JNDI Context\n Context context = new InitialContext();\n\n // Obtain\n ImplementsSessionSynchronizationRemoteBusiness sfsb = (ImplementsSessionSynchronizationRemoteBusiness) context\n .lookup(jndiName);\n\n // Check callbacks are reset\n this.assertCallbacksReset();\n\n // Invoke\n sfsb.call();\n\n // Check callbacks have been made exactly once\n this.assertCallsExpected(1);\n \n // Invoke again\n sfsb.call();\n\n // Check callbacks have been made exactly twice\n this.assertCallsExpected(2); \n \n // Invoke again\n sfsb.call();\n\n // Check callbacks have been made exactly three times\n this.assertCallsExpected(3); \n\n // Reset\n ImplementsSessionSynchronizationBean.resetCounters();\n\n // Check callbacks are reset\n this.assertCallbacksReset();\n }", "public interface PaymentCallBackFacade {\n\n CommonResp callback(NotifyTradeStatusReq notifyTradeStatusReq);\n}", "public Notification(AGateway gateway)\r\n/* 11: */ {\r\n/* 12:31 */ setGateway(gateway);\r\n/* 13: */ }", "public interface APICallbacks\r\n{\r\n\r\n /**\r\n * <p>This is the copyright notice for this class </p>\r\n *\r\n * @copyright<br><p><B>Patsystems UK Limited 2000-2007</b></p>\r\n */\r\n public static final String COPYRIGHT = \"Copyright (c) Patsystems UK Limited 2000-2007\";\r\n\r\n /**\r\n * Host Link Status Change message ID.\r\n */\r\n public static final int MID_HOST_LINK_CHANGE = 1;\r\n\r\n /**\r\n * Price Link Status Change message ID.\r\n */\r\n public static final int MID_PRICE_LINK_CHANGE = 2;\r\n\r\n /**\r\n * Logon Status message ID.\r\n */\r\n public static final int MID_LOGON_STATUS = 3;\r\n\r\n /**\r\n * User Message message ID.\r\n */\r\n public final static int MID_MESSAGE = 4;\r\n\r\n /**\r\n * Order message ID.\r\n */\r\n public static final int MID_ORDER = 5;\r\n\r\n /**\r\n * End of Day message ID.\r\n */\r\n public static final int MID_FORCED_LOGOUT = 6;\r\n\r\n /**\r\n * Download Complete message ID.\r\n */\r\n public static final int MID_DOWNLOAD_COMPLETE = 7;\r\n\r\n /**\r\n * Price Change message ID.\r\n */\r\n public static final int MID_PRICE = 8;\r\n\r\n /**\r\n * Fill message ID.\r\n */\r\n public static final int MID_FILL = 9;\r\n\r\n /**\r\n * Status Update message ID.\r\n */\r\n public static final int MID_STATUS = 10;\r\n\r\n /**\r\n * Contract Added message ID.\r\n */\r\n public static final int MID_CONTRACT_ADDED = 11;\r\n\r\n /**\r\n * Contract Deleted message ID.\r\n */\r\n public static final int MID_CONTRACT_DELETED = 12;\r\n\r\n /**\r\n * Exchange Rate Updated message ID.\r\n */\r\n public static final int MID_EXCHANGE_RATE = 13;\r\n\r\n /**\r\n * Connectivity Status Update message ID.\r\n */\r\n public static final int MID_CONNECTIVITY_STATUS = 14;\r\n\r\n /**\r\n * Order Cancellation Timeout message ID.\r\n */\r\n public static final int MID_ORDER_CANCEL_FAILURE_ID = 15;\r\n\r\n /**\r\n * At Best message ID.\r\n */\r\n public static final int MID_AT_BEST_ID = 16;\r\n\r\n /**\r\n * Memory warning message ID.\r\n */\r\n public static final int MID_MEMORY_WARNING = 18;\r\n\r\n /**\r\n * Subscriber Depth message ID.\r\n */\r\n public static final int MID_SUBSCRIBER_DEPTH = 19;\r\n\r\n /**\r\n * DOM update message ID.\r\n */\r\n public static final int MID_DOM_UPDATE = 21;\r\n\r\n /**\r\n * Settlement Price message ID.\r\n */\r\n public static final int MID_SETTLEMENT_PRICE = 22;\r\n\r\n /**\r\n * Strategy creation successfullyReceived ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_RECEIVED = 23;\r\n\r\n /**\r\n * Strategy creation failure ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_FAILURE = 24;\r\n\r\n /**\r\n * Generic Price message ID.\r\n */\r\n public static final int MID_GENERIC_PRICE = 26;\r\n\r\n /**\r\n * Price blank message ID\r\n */\r\n public static final int MID_BLANK_PRICE = 27;\r\n\r\n /**\r\n * Order Queued Timeout ID.\r\n */\r\n public static final int MID_ORDER_QUEUED_TIMEOUT = 28;\r\n\r\n /**\r\n * Order Sent Timeout ID.\r\n */\r\n public static final int MID_ORDER_SENT_TIMEOUT = 29;\r\n\r\n /**\r\n * Order Book reset ID.\r\n */\r\n public static final int MID_RESET_ORDERBOOK = 30;\r\n\r\n /**\r\n * Exception/Error ID (Internal).\r\n */\r\n public static final int MID_ERROR = -1;\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQ = 100;\r\n\r\n /**\r\n * LOW Price Alert.\r\n */\r\n public static final int MID_LOWPRICE = 101;\r\n\r\n /**\r\n * HIGH Price Alert.\r\n */\r\n public static final int MID_HIGHPRICE = 102;\r\n\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_BID = 103;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_OFFER = 104;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_2_SIDES = 105;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_BID = 106;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_OFFER = 107;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_2_SIDES = 108;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_CROSS = 109;\r\n\r\n /**\r\n * Strategy creation strategy created event id.\r\n */\r\n public static final int MID_STRATEGY_CREATION_CREATED = 200;\r\n\r\n /**\r\n * Event ID to update order history\r\n */\r\n public static final int MID_UPDATE_ORDERHISTORY = 1000;\r\n\r\n\r\n}", "public interface NetworkConstatnts {\n\n interface ResponseCode {\n int success = 201;\n int sessionExpred = 203;\n }\n\n interface URL {\n // String BASE_URL = \"\"; //LIVE\n String BASE_URL = \"http://barber.xicom.info/\";//DEMO\n }\n\n interface KEYS {\n String secretKey = \"J3H7F9J6FG\";\n String deviceType = \"DeviceType\";\n String uniqueDeviceId = \"UniqueDeviceId\";\n // String deviceId = \"DeviceID\";\n String TimeStamp = \"TimeStamp\";\n String sessionToken = \"SessionToken\";\n String deviceToken = \"DeviceToken\";\n String userId = \"userId\";\n String sessionId = \"SessionId\";\n String ClientHash = \"ClientHash\";\n\n\n }\n\n interface API {\n String ABOUT_US = URL.BASE_URL + \"Page/AboutUs\";\n\n String loginUser = \"api/account/Login\";\n }\n\n interface Params {\n String firstName = \"firstName\";\n String email = \"Email\";\n String lastName = \"lastName\";\n String password = \"Password\";\n\n }\n\n interface RequestCode {\n int API_LOGIN = 1;\n int API_REGISTER = 2;\n int API_FORGET_PASSWORD = 3;\n\n }\n}", "public interface ServeurCORBA {\n\t\n\t// ################################ METHODE DE CREATION / ENVOI / SUPPRESSION ################################ \n\t\n\t/**\n\t * @param idee\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void creerIdee(final IIdee idee, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param idee\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void envoyerIdee(final IIdee idee, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param idee\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void supprimerIdee(final IIdee idee, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param idee\n\t * @param tache\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void creerTache(final IIdee idee, final ITache tache, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tache\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void envoyerTache(final ITache tache, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tache\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void supprimerTache(final ITache tache, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param idee\n\t * @param projet\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void creerProjet(final IIdee idee, final IProjet projet, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param projet\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void envoyerProjet(final IProjet projet, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param projet\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void supprimerProjet(final IProjet projet, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param contexte\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void creerContexte(final IObjetServeur contexte, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param contexte\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void envoyerContexte(final IObjetServeur contexte, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param contexte\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void supprimerContexte(final IObjetServeur contexte, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tag\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void creerTag(final ITag tag, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tag\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void envoyerTag(final ITag tag, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tag\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void supprimerTag(final ITag tag, final String identification, final CallBack<String> callback);\n\t\n\t\n\t// ################################ METHODE DE MODIFICATION ################################\n\t\n\t\n\tpublic void ajouterTacheAProjet(final ITache tache, final IProjet projet, final String identification, CallBack<String> callback);\n\tpublic void retirerTacheDuProjet(final ITache tache, final IProjet projet, final String identification, CallBack<String> callback);\n\n\tpublic void ajouterParticipantAuProjet(final IProjet projet, final IParticipant nom, final String identification, final CallBack<String> callback);\n\tpublic void supprimerParticipantDuProjet(final IProjet projet, final IParticipant nom, final String identification, final CallBack<String> callback);\n\n\tpublic void ajouterParticipantDuProjetATache(final IProjet projet, final IParticipant nom, final ITache tache, final String identification, final CallBack<String> callback);\n\tpublic void retirerParticipantDeLaTache(final IParticipant nom, final ITache tache, final String identification, final CallBack<String> callback);\n\t\n\t\n\t// ################################ METHODE DE RECUPERATION ################################\n\t\n\t\n\tpublic void downloadInbox(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadInbox(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadPoubelle(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadPoubelle(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadArchive(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadArchive(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadProchainesTaches(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadProchainesTaches(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadProchainesTaches(final IObjetServeur contexte, final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadProchainesTaches(final IObjetServeur contexte, final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadCalendrier(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadCalendrier(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadTacheParTag(final Date date, final ITag tag, final String identification, final CallBack<String> callback);\n\tpublic void downloadTacheParTag(final ITag tag, final String identification, final CallBack<String> callback);\n\t\n\t\n\t// ################################ METHODE DE GESTION DE COMPTE ################################\n\t\n\t\n\tpublic void creerCompte(final String username, final String password, final String pseudo, final String identification, final CallBack<String> callback);\n\tpublic void supprimerCompte(final String username, final String password, final String identification, final CallBack<String> callback);\n\n\tpublic void modifierPseudo(final String pseudo, final String identification, final CallBack<String> callback);\n\tpublic void modifierUsername(final String username, final String identification, final CallBack<String> callback);\n\tpublic void modifierMotDePasse(final String oldpPassword, final String newPassword, final String identification, final CallBack<String> callback);\n\n\tpublic void login(final String username, final String password, final String identification, final CallBack<String> callback);\n\tpublic void disconnect(final String identification, final CallBack<String> callback);\n\t\n\tpublic void downloadListeParticipant(final String identification, final CallBack<List<AbstractParticipant>> callback);\n\t\n\tpublic void downloadLog(final Date date, final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadLog(final String identification, final CallBack<List<String>> callback);\n\t\n\t\n\t// ################################ METHODE ADMINISTRATEUR ################################\n\t\n\t\n\tpublic void downloadLogAdmin(final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadInbox(final String username, final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadTaches(final String username, final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadProjets(final String username, final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadLog(final String username, final String identification, final CallBack<List<String>> callback);\n}", "public interface BrokerInterface extends Remote {\n /**\n * Subscribes to a game\n * @param subscriber the interface on which the broker calls the dispatch message method\n * @param clientId the unique id of the client to find in which game it belongs\n * @throws RemoteException\n */\n public void subscribe(SubscriberInterface subscriber, UUID clientId) throws RemoteException;\n}", "public interface IConnectionManager {\n void dial(String phoneNumber);\n\n void hangup();\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 TicketBoothClient()\n {\n Thread myThread = new Thread(this);\n myThread.start();\n }", "private NotificationClient() { }", "private static DatacenterBroker createBroker(){\n\n\t\tDatacenterBroker broker = null;\n\t\ttry {\n\t\t\tbroker = new DatacenterBroker(\"Broker\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\treturn broker;\n\t}", "public NotificationService(@Value(\"${event.notification.server.address}\") String address,\n\t\t\t@Value(\"${event.notification.server.port}\") String port,\n\t\t\t@Value(\"${event.notification.server.context}\") String context) {\n\n\t\t// building uri of the notification server\n\t\tStringBuilder notificationServerURIsb = new StringBuilder();\n\t\tnotificationServerURIsb.append(address).append(':').append(port).append(context);\n\t\tthis.notificationsServerUri = notificationServerURIsb.toString();\n\n\t\tHttpClient httpClient = HttpClient.create().wiretap(true);\n\n\t\t// configuring a webclient instance\n\t\tWebClient.Builder webClientBuilder = WebClient.builder()\n\t\t\t\t.clientConnector(new ReactorClientHttpConnector(httpClient)).baseUrl(notificationsServerUri)\n\t\t\t\t.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);\n\t\tthis.webClient = webClientBuilder.build();\n\t}", "public interface PrimaryBankService {\n\n @GET(\"/user/bank\")\n void getPrimaryBankDetail(Callback<List<BankDetail>> callback);\n\n @POST(\"/user/bank\")\n void createPrimaryBankDetail(@Body List<BankDetail> bankDetail, Callback<List<BankDetail>> callback);\n\n @POST(\"/user/netBankingperfios\")\n void uploadPerfiosTransactionStatus(@Body PerfiosService.TransactionStatusResponse perfiosTransactionResponse, Callback<PerfiosTransactionResponse> callback);\n\n @POST(\"/user/netBankingperfios\")\n PerfiosTransactionResponse uploadPerfiosTransactionStatus(@Body PerfiosService.TransactionStatusResponse perfiosTransactionResponse);\n //@PUT(\"/user/bank\")\n //void updatePrimaryBankDetail(@Body BankDetail bankDetail, Callback<BankDetail> callback);\n\n\n public static class PerfiosTransactionResponse{\n private String message;\n\n public String getMessage() {\n return message;\n }\n\n public void setMessage(String message) {\n this.message = message;\n }\n }\n\n public static class BankDetail{\n\n @SerializedName(value = \"name\")\n private String bankName;\n @SerializedName(value = \"account_no\")\n private String accountNumber;\n private boolean isPrimary = false;\n private boolean userStatementPresent = false;\n\n public boolean isUserStatementPresent() {\n return userStatementPresent;\n }\n\n public void setUserStatementPresent(boolean userStatementPresent) {\n this.userStatementPresent = userStatementPresent;\n }\n\n public String getBankName() {\n return bankName;\n }\n\n public void setBankName(String bankName) {\n this.bankName = bankName;\n }\n\n public String getAccountNumber() {\n return accountNumber;\n }\n\n public String getAccountNumberLast4Digits() {\n if(accountNumber!= null && accountNumber.length()>4)\n {\n return accountNumber.substring(accountNumber.length()-4);\n }\n return accountNumber;\n }\n\n public void setAccountNumber(String accountNumber) {\n this.accountNumber = accountNumber;\n }\n\n public boolean isPrimary() {\n return isPrimary;\n }\n\n public void setIsPrimary(boolean isPrimary) {\n this.isPrimary = isPrimary;\n }\n\n @Override\n public boolean equals(Object obj)\n {\n if(obj != null && obj instanceof BankDetail)\n {\n BankDetail second = (BankDetail)obj;\n return this.bankName.equals(second.getBankName())\n && this.getAccountNumberLast4Digits().equals(second.getAccountNumberLast4Digits());\n }\n return false;\n }\n }\n\n}", "private void initPeers() {\n this.servers.clear();\n this.clients.clear();\n\n if (SharedPrefUtils.isConnectionNfcEnabled(this)) {\n clients.add(new NFCClient(this, walletServiceBinder));\n servers.add(new NFCServerACSCLTV(this, walletServiceBinder));\n servers.add(new NFCServerCLTV(this, walletServiceBinder));\n\n }\n\n if (SharedPrefUtils.isConnectionBluetoothLeEnabled(this)) {\n clients.add(new BluetoothLEClient(this, walletServiceBinder));\n servers.add(new BluetoothLEServer(this, walletServiceBinder));\n }\n\n if (SharedPrefUtils.isConnectionWiFiDirectEnabled(this)) {\n clients.add(new WiFiClient(this, walletServiceBinder));\n servers.add(new WiFiServer(this, walletServiceBinder));\n }\n\n for (AbstractServer server : servers) {\n server.setPaymentRequestDelegate(getClientPaymentRequestDelegate());\n }\n\n for (AbstractClient client : clients) {\n client.setPaymentRequestDelegate(getClientPaymentRequestDelegate());\n if(client instanceof NFCClient) {\n client.start();\n }\n }\n\n }", "public BankingOperation(int type, Client client) {\n super(type);\n m_client = client;\n }", "@Override\n public void handleNotification(Notification ntfctn, Object o) {\n\n logger.debug(\"Received notification \" + ntfctn);\n\n discover();\n\n }", "private void startServer() throws RemoteException, AlreadyBoundException{\n\t\ttry{\n\t\t\tInsuranceImplementation impl = new InsuranceImplementation();\n\t\t\timpl.setIPAddress(ipHospital.getText());\n\t\t\timpl.setPortNumebr(Integer.parseInt(portHospital.getText()));\n\t\t\t\n\t\t\tRegistry registry = LocateRegistry.createRegistry(Integer.parseInt(portInsurance.getText()));\n\t\t\tregistry.bind(Constants.RMI_ID, impl); \n\t\t\t\n\t\t\tlogMessage(\"Insurance Server Started\");\n\t\t\t\n\t\t} catch (Exception exp)\n\t\t{\n\t\t\tlogMessage(\"ObjID already in use.\\nPlease kill the process running at port 5002\");\n\t\t\texp.printStackTrace();\n\t\t} \n\t\t\n\t}", "public void start() {\n\n // server 환경설정\n EventLoopGroup bossGroup = new NioEventLoopGroup(bossCount);\n EventLoopGroup workerGroup = new NioEventLoopGroup();\n\n try {\n\n ServerBootstrap b = new ServerBootstrap();\n b.group(bossGroup, workerGroup)\n .channel(NioServerSocketChannel.class)\n .childHandler(new ChannelInitializer<SocketChannel>() {\n @Override\n public void initChannel(SocketChannel ch) throws Exception {\n ChannelPipeline pipeline = ch.pipeline();\n pipeline.addLast(new StringDecoder(CharsetUtil.UTF_8));\n pipeline.addLast(new StringEncoder(CharsetUtil.UTF_8));\n pipeline.addLast(new LoggingHandler(LogLevel.INFO));\n pipeline.addLast(SERVICE_HANDLER);\n }\n })\n .option(ChannelOption.SO_BACKLOG, backLog)\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\n ChannelFuture channelFuture = b.bind(tcpPort).sync();\n channelFuture.channel().closeFuture().sync();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n\n }", "public interface INetworkHandler<T> extends Runnable {\n\n /**\n * The main method which starts the protocol implementation.\n * <p>\n * {@inheritDoc}\n */\n void run();\n\n /**\n * Sends the request of the network handler to all online peers of the node.\n *\n * @throws ConnectionFailedException If the other online clients can not be determined\n */\n void sendRequest(IRequest request)\n throws ConnectionFailedException;\n\n /**\n * Blocks until all notified clients have responded\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await()\n throws InterruptedException;\n\n /**\n * Blocks for the given timeout.\n *\n * @param timeout The timeout to wait\n * @param timeUnit The time unit which qualifies the timeout\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await(long timeout, TimeUnit timeUnit)\n throws InterruptedException;\n\n /**\n * Returns true once all notified clients have responded.\n *\n * @return True, if all notified clients have responded, false otherwise.\n */\n boolean isCompleted();\n\n /**\n * Returns the progress until this handler's communication\n * is considered complete (See {@link INetworkHandler#isCompleted()}).\n *\n * Returns values between 100 and 0 (inclusive).\n *\n * @return The progress\n */\n int getProgress();\n\n\n /**\n * Returns the final result of the exchange.\n * Note, that the result may be null before all clients have responded.\n *\n * @return The result once the all necessary clients responded. May be null before all clients have responded\n */\n T getResult();\n}", "pb4server.CallBossAskReq getCallBossAskReq();", "@Override\n\tpublic void actionPerformed(ActionEvent e) \n\t{\n\t\tBankAccountListener listen = new BankAccountListener(this);\n\t\tlisten.actionPerformed(e);\n\n\t}", "public boolean addObserver_async(AMI_ServiceManager_addObserver __cb, ServiceObserverPrx observer);", "static void sendNotifications() {\n\t\testablishConnection();\n\t\tSystem.out.println(\"sending multiple notificatiosn\");\n\t}", "@RemoteServiceRelativePath(\"greet\")\npublic interface MyBitService extends RemoteService {\n OrderInfoList getOrderInfoList() throws IllegalArgumentException;\n\n CoinInfoList getCoinInfoList() throws IllegalArgumentException;\n\n ExchangeInfoList getExchangeInfoList() throws IllegalArgumentException;\n\n CompareInfoList getCompareInfoList() throws IllegalArgumentException;\n\n String toggleBot() throws IllegalArgumentException;\n\n String setThreshold(Double threshold) throws IllegalArgumentException;\n\n String getThreshold() throws IllegalArgumentException;\n\n public static class App {\n private static MyBitServiceAsync ourInstance = GWT.create(MyBitService.class);\n\n public static synchronized MyBitServiceAsync getInstance() {\n return ourInstance;\n }\n }\n}", "public static void main(String[] args) throws Exception {\n BriefLogFormatter.initWithSilentBitcoinJ();\n if (args.length < 1) {\n System.err.println(\"Usage: address-to-send-back-to [regtest|testnet|evonet|palinka|devnet] [devnet-name] [devnet-sporkaddress] [devnet-port] [devnet-dnsseed...]\");\n return;\n }\n\n // Figure out which network we should connect to. Each one gets its own set of files.\n NetworkParameters params;\n String filePrefix;\n String checkpoints = null;\n if (args.length > 1 && args[1].equals(\"testnet\")) {\n params = TestNet3Params.get();\n filePrefix = \"forwarding-service-testnet\";\n checkpoints = \"checkpoints-testnet.txt\";\n } else if (args.length > 1 && args[1].equals(\"regtest\")) {\n params = RegTestParams.get();\n filePrefix = \"forwarding-service-regtest\";\n } else if (args.length > 1 && args[1].equals(\"palinka\")) {\n params = PalinkaDevNetParams.get();\n filePrefix = \"forwarding-service-palinka\";\n } else if (args.length > 1 && args[1].equals(\"mobile\")) {\n params = MobileDevNetParams.get();\n filePrefix = \"forwarding-service-mobile\";\n platform = new Platform(params);\n } else if (args.length > 1 && args[1].equals(\"evonet\")) {\n params = EvoNetParams.get();\n filePrefix = \"forwarding-service-evonet\";\n platform = new Platform(params);\n } else if( args.length > 6 && args[1].equals(\"devnet\")) {\n String [] dnsSeeds = new String[args.length - 5];\n System.arraycopy(args, 5, dnsSeeds, 0, args.length - 5);\n params = DevNetParams.get(args[2], args[3], Integer.parseInt(args[4]), dnsSeeds);\n filePrefix = \"forwarding-service-devnet\";\n }else {\n params = MainNetParams.get();\n filePrefix = \"forwarding-service\";\n checkpoints = \"checkpoints.txt\";\n }\n // Parse the address given as the first parameter.\n forwardingAddress = Address.fromBase58(params, args[0]);\n\n System.out.println(\"Network: \" + params.getId());\n System.out.println(\"Forwarding address: \" + forwardingAddress);\n\n // Start up a basic app using a class that automates some boilerplate.\n kit = new WalletAppKit(params, new File(\".\"), filePrefix) {\n @Override\n protected void onSetupCompleted() {\n if(!kit.wallet().hasAuthenticationKeyChains())\n kit.wallet().initializeAuthenticationKeyChains(kit.wallet().getKeyChainSeed(), null);\n kit.setDiscovery(new MasternodePeerDiscovery(kit.wallet().getContext().masternodeListManager.getListAtChainTip()));\n }\n };\n\n if (params == RegTestParams.get()) {\n // Regression test mode is designed for testing and development only, so there's no public network for it.\n // If you pick this mode, you're expected to be running a local \"bitcoind -regtest\" instance.\n kit.connectToLocalHost();\n }\n\n if(checkpoints != null) {\n try {\n FileInputStream checkpointStream = new FileInputStream(\"./\" + checkpoints);\n kit.setCheckpoints(checkpointStream);\n } catch (FileNotFoundException x) {\n //swallow\n }\n }\n\n // Download the block chain and wait until it's done.\n kit.startAsync();\n kit.awaitRunning();\n\n // We want to know when we receive money.\n kit.wallet().addCoinsReceivedEventListener(new WalletCoinsReceivedEventListener() {\n @Override\n public void onCoinsReceived(Wallet w, Transaction tx, Coin prevBalance, Coin newBalance) {\n // Runs in the dedicated \"user thread\" (see bitcoinj docs for more info on this).\n //\n // The transaction \"tx\" can either be pending, or included into a block (we didn't see the broadcast).\n Coin value = tx.getValueSentToMe(w);\n System.out.println(\"Received tx for \" + value.toFriendlyString() + \": \" + tx);\n System.out.println(\"Transaction will be forwarded after it confirms.\");\n // Wait until it's made it into the block chain (may run immediately if it's already there).\n //\n // For this dummy app of course, we could just forward the unconfirmed transaction. If it were\n // to be double spent, no harm done. Wallet.allowSpendingUnconfirmedTransactions() would have to\n // be called in onSetupCompleted() above. But we don't do that here to demonstrate the more common\n // case of waiting for a block.\n Context.propagate(w.getContext());\n Futures.addCallback(tx.getConfidence().getDepthFuture(2), new FutureCallback<TransactionConfidence>() {\n @Override\n public void onSuccess(TransactionConfidence result) {\n System.out.println(\"Confirmation received.\");\n forwardCoins(tx);\n }\n\n @Override\n public void onFailure(Throwable t) {\n // This kind of future can't fail, just rethrow in case something weird happens.\n throw new RuntimeException(t);\n }\n }, MoreExecutors.directExecutor());\n\n Futures.addCallback(tx.getConfidence().getDepthFuture(1), new FutureCallback<TransactionConfidence>() {\n @Override\n public void onSuccess(TransactionConfidence result) {\n System.out.println(\"Confirmation received.\");\n blockchainIdentity(tx);\n }\n\n @Override\n public void onFailure(Throwable t) {\n // This kind of future can't fail, just rethrow in case something weird happens.\n throw new RuntimeException(t);\n }\n }, MoreExecutors.directExecutor());\n\n /*Futures.addCallback(tx.getConfidence().getDepthFuture(3), new FutureCallback<TransactionConfidence>() {\n @Override\n public void onSuccess(TransactionConfidence result) {\n System.out.println(\"3 confirmations received. -- create user\");\n blockchainUser(tx);\n }\n\n @Override\n public void onFailure(Throwable t) {\n // This kind of future can't fail, just rethrow in case something weird happens.\n throw new RuntimeException(t);\n }\n }, MoreExecutors.directExecutor());*/\n }\n });\n\n Address sendToAddress = Address.fromKey(params, kit.wallet().currentReceiveKey());\n System.out.println(\"Send coins to: \" + sendToAddress);\n System.out.println(\"Waiting for coins to arrive. Press Ctrl-C to quit.\");\n\n //get this:\n String id = \"J2jWLKNWogVf1B8fdo6rxMeQgDWWi9aGd9JPcTHxNj7H\";\n //apiClient client = new DapiClient(EvoNetParams.MASTERNODES[1], true);\n //client.getIdentity(id);\n //client.shutdown();\n\n //System.out.println(kit.wallet().toString(true, true, null, true, true, null)/*.getBlockchainIdentityKeyChain()*/);\n //System.out.println(\"devnet block:\" + kit.wallet().getParams().getDevNetGenesisBlock().toString());\n List<CreditFundingTransaction> list = kit.wallet().getCreditFundingTransactions();\n for(CreditFundingTransaction tx : list) {\n System.out.println(tx.getTxId());\n String identityId = tx.getCreditBurnIdentityIdentifier().toStringBase58();\n System.out.println(\" id: \" + identityId);\n Identity identity = platform.getIdentities().get(identityId);\n if(identity != null) {\n System.out.println(\" id json: \" + identity.toJSON().toString());\n try {\n DocumentQuery options = new DocumentQuery.Builder().where(Arrays.asList(\"$userId\", \"==\", identityId)).build();\n List<Document> documents = platform.getDocuments().get(\"dpns.domain\", options);\n if (documents != null & documents.size() > 0) {\n System.out.println(\" name: \" + documents.get(0).getData().get(\"normalizedName\"));\n } else {\n System.out.println(\" no names found\");\n }\n } catch (Exception x) {\n System.out.println(\" no names found\");\n }\n }\n BlockchainIdentity blockchainIdentity = new BlockchainIdentity(platform, tx, kit.wallet(), null);\n\n List<String> names = ImmutableList.of(\"test1\", \"test2\");\n\n blockchainIdentity.watchUsernames(names, 10, 1000, RetryDelayType.LINEAR,\n new RegisterNameCallback() {\n @Override\n public void onComplete(@NotNull List<String> uniqueId) {\n System.out.println(\"names created and found\");\n }\n\n @Override\n public void onTimeout(@NotNull List<String> uniqueId) {\n System.out.println(\"names were not created:\");\n }\n }\n );\n\n System.out.println(\"blockchainIdentity: \" + blockchainIdentity.getUniqueIdString());\n }\n\n System.out.println(\"------------------------------------\\nNames found starting with hashengineering\");\n DocumentQuery options = new DocumentQuery.Builder()\n .where(Arrays.asList(\"normalizedLabel\", \"startsWith\", \"hashengineering\"))\n .where(Arrays.asList(\"normalizedParentDomainName\", \"==\", \"dash\"))\n .build();\n try {\n List<Document> documents = platform.getDocuments().get(\"dpns.domain\", options);\n for(Document document : documents) {\n System.out.println(document.getData().get(\"$userId\") + \"-> name: \" + document.getData().get(\"normalizedLabel\"));\n platform.getNames().get((String)document.getData().get(\"normalizedLabel\"));\n }\n System.out.println(documents.size() + \" names found\");\n } catch(Exception e) {\n System.out.println(e);\n }\n\n\n\n try {\n sleep(Long.MAX_VALUE);\n } catch (InterruptedException ignored) {}\n }", "public static void main(String[] args) {\n Bank bank = new Bank();\n\n bank.addAccount(new Account(\"Acc_01\", 100));\n bank.addAccount(new Account(\"Acc_02\", 120));\n bank.addAccount(new Account(\"Acc_03\", 50));\n\n Client client1 = new Client(bank, \"Acc_01\", new ArrayList<>(Arrays.asList(\"-50\", \"+20\", \"-90\", \"-50\")));\n Client client2 = new Client(bank, \"Acc_01\", new ArrayList<>(Arrays.asList(\"+10\", \"-30\", \"-45\", \"+20\")));\n\n new Thread(client1).start();\n new Thread(client2).start();\n\n }", "public interface IBluetoothHeadset\n extends IInterface {\n public static abstract class Stub extends Binder\n implements IBluetoothHeadset {\n private static class Proxy\n implements IBluetoothHeadset {\n\n public boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(13, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public boolean cancelConnectThread() throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int i;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(15, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n if(i != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(1, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(16, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(12, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(2, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(17, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(19, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(11, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getConnectedDevices() throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(3, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_64;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(5, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n parcel.writeIntArray(ai);\n mRemote.transact(4, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public String getInterfaceDescriptor() {\n return \"android.bluetooth.IBluetoothHeadset\";\n }\n\n public int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(7, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(10, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(14, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(18, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(6, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(20, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(8, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(21, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(9, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n private IBinder mRemote;\n\n Proxy(IBinder ibinder) {\n mRemote = ibinder;\n }\n }\n\n\n public static IBluetoothHeadset asInterface(IBinder ibinder) {\n Object obj;\n if(ibinder == null) {\n obj = null;\n } else {\n IInterface iinterface = ibinder.queryLocalInterface(\"android.bluetooth.IBluetoothHeadset\");\n if(iinterface != null && (iinterface instanceof IBluetoothHeadset))\n obj = (IBluetoothHeadset)iinterface;\n else\n obj = new Proxy(ibinder);\n }\n return ((IBluetoothHeadset) (obj));\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j) throws RemoteException {\n int k;\n boolean flag;\n k = 0;\n flag = true;\n i;\n JVM INSTR lookupswitch 22: default 192\n // 1: 215\n // 2: 278\n // 3: 341\n // 4: 366\n // 5: 395\n // 6: 449\n // 7: 516\n // 8: 570\n // 9: 633\n // 10: 696\n // 11: 759\n // 12: 813\n // 13: 876\n // 14: 939\n // 15: 1002\n // 16: 1036\n // 17: 1099\n // 18: 1162\n // 19: 1229\n // 20: 1283\n // 21: 1346\n // 1598968902: 206;\n goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L15 _L16 _L17 _L18 _L19 _L20 _L21 _L22 _L23\n_L1:\n flag = super.onTransact(i, parcel, parcel1, j);\n_L25:\n return flag;\n_L23:\n parcel1.writeString(\"android.bluetooth.IBluetoothHeadset\");\n continue; /* Loop/switch isn't completed */\n_L2:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice17;\n boolean flag15;\n if(parcel.readInt() != 0)\n bluetoothdevice17 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice17 = null;\n flag15 = connect(bluetoothdevice17);\n parcel1.writeNoException();\n if(flag15)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L3:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice16;\n boolean flag14;\n if(parcel.readInt() != 0)\n bluetoothdevice16 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice16 = null;\n flag14 = disconnect(bluetoothdevice16);\n parcel1.writeNoException();\n if(flag14)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L4:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list1 = getConnectedDevices();\n parcel1.writeNoException();\n parcel1.writeTypedList(list1);\n continue; /* Loop/switch isn't completed */\n_L5:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list = getDevicesMatchingConnectionStates(parcel.createIntArray());\n parcel1.writeNoException();\n parcel1.writeTypedList(list);\n continue; /* Loop/switch isn't completed */\n_L6:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice15;\n int k1;\n if(parcel.readInt() != 0)\n bluetoothdevice15 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice15 = null;\n k1 = getConnectionState(bluetoothdevice15);\n parcel1.writeNoException();\n parcel1.writeInt(k1);\n continue; /* Loop/switch isn't completed */\n_L7:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice14;\n boolean flag13;\n if(parcel.readInt() != 0)\n bluetoothdevice14 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice14 = null;\n flag13 = setPriority(bluetoothdevice14, parcel.readInt());\n parcel1.writeNoException();\n if(flag13)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L8:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice13;\n int j1;\n if(parcel.readInt() != 0)\n bluetoothdevice13 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice13 = null;\n j1 = getPriority(bluetoothdevice13);\n parcel1.writeNoException();\n parcel1.writeInt(j1);\n continue; /* Loop/switch isn't completed */\n_L9:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice12;\n boolean flag12;\n if(parcel.readInt() != 0)\n bluetoothdevice12 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice12 = null;\n flag12 = startVoiceRecognition(bluetoothdevice12);\n parcel1.writeNoException();\n if(flag12)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L10:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice11;\n boolean flag11;\n if(parcel.readInt() != 0)\n bluetoothdevice11 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice11 = null;\n flag11 = stopVoiceRecognition(bluetoothdevice11);\n parcel1.writeNoException();\n if(flag11)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L11:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice10;\n boolean flag10;\n if(parcel.readInt() != 0)\n bluetoothdevice10 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice10 = null;\n flag10 = isAudioConnected(bluetoothdevice10);\n parcel1.writeNoException();\n if(flag10)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L12:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice9;\n int i1;\n if(parcel.readInt() != 0)\n bluetoothdevice9 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice9 = null;\n i1 = getBatteryUsageHint(bluetoothdevice9);\n parcel1.writeNoException();\n parcel1.writeInt(i1);\n continue; /* Loop/switch isn't completed */\n_L13:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice8;\n boolean flag9;\n if(parcel.readInt() != 0)\n bluetoothdevice8 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice8 = null;\n flag9 = createIncomingConnect(bluetoothdevice8);\n parcel1.writeNoException();\n if(flag9)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L14:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice7;\n boolean flag8;\n if(parcel.readInt() != 0)\n bluetoothdevice7 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice7 = null;\n flag8 = acceptIncomingConnect(bluetoothdevice7);\n parcel1.writeNoException();\n if(flag8)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L15:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice6;\n boolean flag7;\n if(parcel.readInt() != 0)\n bluetoothdevice6 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice6 = null;\n flag7 = rejectIncomingConnect(bluetoothdevice6);\n parcel1.writeNoException();\n if(flag7)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L16:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n boolean flag6 = cancelConnectThread();\n parcel1.writeNoException();\n if(flag6)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L17:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice5;\n boolean flag5;\n if(parcel.readInt() != 0)\n bluetoothdevice5 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice5 = null;\n flag5 = connectHeadsetInternal(bluetoothdevice5);\n parcel1.writeNoException();\n if(flag5)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L18:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice4;\n boolean flag4;\n if(parcel.readInt() != 0)\n bluetoothdevice4 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice4 = null;\n flag4 = disconnectHeadsetInternal(bluetoothdevice4);\n parcel1.writeNoException();\n if(flag4)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L19:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice3;\n boolean flag3;\n if(parcel.readInt() != 0)\n bluetoothdevice3 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice3 = null;\n flag3 = setAudioState(bluetoothdevice3, parcel.readInt());\n parcel1.writeNoException();\n if(flag3)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L20:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice2;\n int l;\n if(parcel.readInt() != 0)\n bluetoothdevice2 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice2 = null;\n l = getAudioState(bluetoothdevice2);\n parcel1.writeNoException();\n parcel1.writeInt(l);\n continue; /* Loop/switch isn't completed */\n_L21:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice1;\n boolean flag2;\n if(parcel.readInt() != 0)\n bluetoothdevice1 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice1 = null;\n flag2 = startScoUsingVirtualVoiceCall(bluetoothdevice1);\n parcel1.writeNoException();\n if(flag2)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L22:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice;\n boolean flag1;\n if(parcel.readInt() != 0)\n bluetoothdevice = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice = null;\n flag1 = stopScoUsingVirtualVoiceCall(bluetoothdevice);\n parcel1.writeNoException();\n if(flag1)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n if(true) goto _L25; else goto _L24\n_L24:\n }\n\n private static final String DESCRIPTOR = \"android.bluetooth.IBluetoothHeadset\";\n static final int TRANSACTION_acceptIncomingConnect = 13;\n static final int TRANSACTION_cancelConnectThread = 15;\n static final int TRANSACTION_connect = 1;\n static final int TRANSACTION_connectHeadsetInternal = 16;\n static final int TRANSACTION_createIncomingConnect = 12;\n static final int TRANSACTION_disconnect = 2;\n static final int TRANSACTION_disconnectHeadsetInternal = 17;\n static final int TRANSACTION_getAudioState = 19;\n static final int TRANSACTION_getBatteryUsageHint = 11;\n static final int TRANSACTION_getConnectedDevices = 3;\n static final int TRANSACTION_getConnectionState = 5;\n static final int TRANSACTION_getDevicesMatchingConnectionStates = 4;\n static final int TRANSACTION_getPriority = 7;\n static final int TRANSACTION_isAudioConnected = 10;\n static final int TRANSACTION_rejectIncomingConnect = 14;\n static final int TRANSACTION_setAudioState = 18;\n static final int TRANSACTION_setPriority = 6;\n static final int TRANSACTION_startScoUsingVirtualVoiceCall = 20;\n static final int TRANSACTION_startVoiceRecognition = 8;\n static final int TRANSACTION_stopScoUsingVirtualVoiceCall = 21;\n static final int TRANSACTION_stopVoiceRecognition = 9;\n\n public Stub() {\n attachInterface(this, \"android.bluetooth.IBluetoothHeadset\");\n }\n }\n\n\n public abstract boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean cancelConnectThread() throws RemoteException;\n\n public abstract boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getConnectedDevices() throws RemoteException;\n\n public abstract int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException;\n\n public abstract int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n}", "protected void onBSLock() {\n\n }" ]
[ "0.5938728", "0.5786679", "0.52690274", "0.52512485", "0.5220769", "0.5218953", "0.52113336", "0.51456445", "0.51414424", "0.5127556", "0.5107444", "0.50393987", "0.5008828", "0.49879587", "0.49700746", "0.4946824", "0.49028605", "0.48843786", "0.48789713", "0.4874133", "0.4853275", "0.48272714", "0.4826543", "0.48214763", "0.48080453", "0.48033738", "0.47900945", "0.47814667", "0.4772936", "0.4758329", "0.4752347", "0.4715031", "0.4704897", "0.4704428", "0.4699243", "0.46981958", "0.46889025", "0.46869823", "0.46678454", "0.4662863", "0.46586642", "0.46460113", "0.4644969", "0.46373785", "0.46294397", "0.46245375", "0.46243554", "0.46141508", "0.46041122", "0.4596949", "0.45918018", "0.45771292", "0.4563289", "0.45596415", "0.45560324", "0.4549716", "0.4548687", "0.45430958", "0.45424557", "0.45296037", "0.45279282", "0.45277292", "0.4527028", "0.45265532", "0.4521612", "0.4518243", "0.4517692", "0.45146728", "0.4499788", "0.44995323", "0.44950148", "0.44931638", "0.44875377", "0.4486373", "0.4482298", "0.44817945", "0.44814035", "0.44807848", "0.4477291", "0.4476196", "0.44757375", "0.44721958", "0.44647333", "0.44636545", "0.44554082", "0.44509086", "0.44458032", "0.444526", "0.44405013", "0.44372407", "0.4433757", "0.44295663", "0.44285232", "0.4425958", "0.44258037", "0.4425311", "0.44225287", "0.44139835", "0.44136816", "0.44120336" ]
0.7582862
0
Private Bank utility function used internally to generate unique random integer values for account numbers. Should probably be synchronized at some point.
private int getUniqueAccountNumber () { int minInt = 100000; int maxInt = 999999; int candidateNumber = -1; Set<Integer> listOfCurrentAccountNumbers = hashMapOfAllAccts.keySet(); boolean numberIsUnique = false; while ( !numberIsUnique ) { candidateNumber = rng.nextInt(maxInt+1); // assume unique for a moment numberIsUnique = true; // verify uniqueness assumption for ( int acctNum : listOfCurrentAccountNumbers) { if (candidateNumber == acctNum) { numberIsUnique = false; break; } } // end for() loop } // end while() loop return candidateNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static long getRandAccount() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranch(bid);\n }", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "private static long getRandAccountD() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranchD(bid);\n }", "private String genNewAccountNumber(int clientId) {\r\n\t\t// keep 4 digits\r\n\t\tint acNumber = clientId * 1000 + (int) (Math.random() * 900);\r\n\t\treturn String.valueOf(acNumber);\r\n\t}", "public static int getRandomBalance(){\n return rand.nextInt(1000000);\n }", "private static int getSecretNum(int arg1) {\n Random rand = new Random();\n return rand.nextInt(UPPERBOUND)+1; //make range 1-100\n }", "public void generateNewSecret() {\r\n \r\n //Get Random Number With Correct Digits\r\n int intRand = randomNumberGenerator.nextInt((int)(Math.pow(10, numDigits) - Math.pow(10, numDigits - 1))) + (int)Math.pow(10, numDigits - 1);\r\n \r\n //Set To String\r\n String strRand = String.valueOf(intRand);\r\n \r\n //Set Value\r\n secretNumber = convertNumToDigitArray(strRand);\r\n \r\n }", "private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "private static long getRandAccountFromBranch(int bid) {\n int noa = uniqueAccounts.get(bid).size();\n int index = rand.nextInt(noa);\n return accounts.get(bid).get(index);\n }", "private int getUniqueSecretKey () {\n\n int minInt = 100000;\n int maxInt = 999999;\n int candidateNumber = -1;\n Set<Integer> listOfCurrentSecretKeys =\n hashMapOfSecretKeys.keySet();\n boolean numberIsUnique = false;\n while ( !numberIsUnique ) {\n\n candidateNumber = rng.nextInt(maxInt+1);\n // assume unique for a moment\n numberIsUnique = true;\n // verify uniqueness assumption\n for ( int theNum : listOfCurrentSecretKeys) {\n if (candidateNumber == theNum) {\n numberIsUnique = false;\n break;\n }\n } // end for() loop\n\n } // end while() loop\n\n return candidateNumber;\n }", "private int randomHelper() {\n\t\tRandom rand = new Random();\n\t\tint randomNum = rand.nextInt((10000 - 1) + 1) + 1;\n\t\treturn randomNum;\n\t}", "@Test\n public void testGetUniqueInt() {\n UniqueRandomGenerator instance = new UniqueRandomGenerator();\n \n List<Integer> extracted = new ArrayList<>();\n \n for (int i = 0; i < 1000; i++)\n {\n int extr = instance.getUniqueInt(0, 1000);\n \n if (extracted.contains(extr))\n fail();\n else\n extracted.add(extr);\n }\n }", "public static long getRandAccountFromBranchD(int branchID){\n int noa = uniqueAccounts.get(branchID).size();\n int index = rand.nextInt(noa);\n long accNo = accounts.get(branchID).get(index);\n removeAccNo(branchID, index);\n return accNo;\n\n }", "public BankAccount() {\n numberOfAccounts++;\n this.accountNumber = accountNumberGenerator(); \n }", "public static String generateRandomInteger() {\n SecureRandom random = new SecureRandom();\n int aStart = 1;\n long aEnd = 999999999;\n long range = aEnd - (long) aStart + 1;\n long fraction = (long) (range * random.nextDouble());\n long randomNumber = fraction + (long) aStart;\n return String.valueOf(randomNumber);\n }", "private int generateRandomNumber() {\n\t\treturn (int) Math.floor(Math.random() * Constants.RANDOM_NUMBER_GENERATOR_LIMIT);\n\t}", "private void setAccountNumber() // setare numar de cont\n {\n int random = ThreadLocalRandom.current().nextInt(1, 100 + 1);\n accountNumber = ID + \"\" + random + SSN.substring(0,2);\n System.out.println(\"Your account number is: \" + accountNumber);\n }", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "public static Account generate() {\n return Account.fromHexString(Util.generateRandom32BytesHex());\n }", "private void getRandomNumber() {\n\t\tRandom random = new Random();\n\t\tint randomCount = 255;\n\t\tint randNum = 0; \n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\trandNum = random.nextInt(randomCount);\n\t\t\tswitch (numberType) {\n\t\t\tcase 1:\n\t\t\t\trandomNumbers.add(Integer.toString(randNum));\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(randNum > 15)\n\t\t\t\t\trandomNumbers.add(String.format(\"%8s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\telse\n\t\t\t\t\trandomNumbers.add(String.format(\"%4s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\trandomNumbers.add(Integer.toHexString(randNum));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public String generateAccountNumber() {\n // Set First part of AccountNumber\n String accountNumberFirst = \"1398\";\n\n // To Make Second, Third part Get each date and time\n String currentTime = getCurrentTime();\n\n // Get year, month, day\n String date = currentTime.split(\" \")[0];\n int year, month, day;\n year = Integer.parseInt(date.split(\"-\")[0]);\n month = Integer.parseInt(date.split(\"-\")[1]);\n day = Integer.parseInt(date.split(\"-\")[2]);\n\n // Get hour, minute, second\n String time = currentTime.split(\" \")[1];\n int hour, minute, second;\n hour = Integer.parseInt(time.split(\":\")[0]);\n minute = Integer.parseInt(time.split(\":\")[1]);\n second = Integer.parseInt(time.split(\":\")[2]);\n\n // Set Second part of AccountNumber\n String accountNumberSecond;\n accountNumberSecond = Integer.toString((year % 10)) + Integer.toString((month * second) % 10) + Integer.toString((day * minute + hour) % 10);\n\n // Set Third part of AccountNumber\n String accountNumberThird;\n accountNumberThird = Integer.toString((second * hour + minute) % 10) + Integer.toString((second * day + hour) % 10) + Integer.toString((day * month + second) % 10) + Integer.toString((second * minute + day) % 10);\n\n // Set Forth part of AccountNumber\n String accountNumberForth;\n int count = (int)accountDataRepository.count();\n if(count % 100 < 10) {\n accountNumberForth = \"0\" + Integer.toString(count % 100);\n }\n else {\n accountNumberForth = Integer.toString(count % 100);\n }\n\n // Generate AccountNumber\n String accountNumber = accountNumberFirst + \"-\" + accountNumberSecond + \"-\" + accountNumberThird + \"-\" + accountNumberForth;\n\n return accountNumber;\n }", "private static int newSecretNumber(int min, int max)\n {\n Random rnd = new Random();\n return rnd.nextInt((max + 1 - min) + min);\n }", "public static long getNewAccountNo(int branchID){\n while(true){\n long accNo = getRandomAccountNo(branchID);\n if(!uniqueAccounts.get(branchID).contains(accNo)) {\n uniqueAccounts.get(branchID).add(accNo);\n accounts.get(branchID).add(accNo);\n return accNo;\n }\n }\n }", "public static long getRandomAccountNo(int branchID) {\n return getAccountNo(branchID, rand.nextInt((int)div));\n }", "private int randomGen(int upperBound) {\n\t\tRandom r = new Random();\n\t\treturn r.nextInt(upperBound);\n\t}", "public static int randomNext() { return 0; }", "private int IdRandom() {\n\t\tRandom random = new Random();\n\t\tint id = random.nextInt(899999) + 100000;\n\t\treturn id;\n\t}", "private static void generateMoneyTransfer(int branchID) {\n long accountNo1 = getRandAccountFromBranch(branchID), accountNo2 = getRandAccount();\n int amount = getRandomAmount();\n writeToFile(String.format(\"%d %d %d\\n\", accountNo1, accountNo2, amount));\n }", "public static String generateRandomNonce() {\n Random r = new Random();\n StringBuffer n = new StringBuffer();\n for (int i = 0; i < r.nextInt(8) + 2; i++) {\n n.append(r.nextInt(26) + 'a');\n }\n return n.toString();\n }", "public String generateAccountNumber(int ACCT_LIMIT, String CHECKING_PREFIX)\n\t{\n\n\t\tint savingsRndNum = ranNumGenerator.nextInt(ACCT_LIMIT);\n\t\t\n\t\treturn (CHECKING_PREFIX + savingsRndNum);\n\t\t\n\t}", "private int _randomCode () {\n Random random = new Random();\n code = random.nextInt(999999);\n return code;\n }", "private int getRandomNumber(int limit) {\n\t\tlong seed = System.currentTimeMillis();\n\t\tRandom rand = new Random(seed);\n\t\treturn rand.nextInt(limit) + 1;\n\t}", "public int randomNum()\r\n {\r\n Random rand = new Random();\r\n int n = rand.nextInt(52)+1;\r\n return n;\r\n }", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "public String generateNumber(int length) {\n int maxNumber = Integer.parseInt(new String(new char[length]).replace(\"\\0\", \"9\"));\n int intAccountNumber = ThreadLocalRandom.current().nextInt(0, maxNumber + 1);\n int accountNumberLength = String.valueOf(intAccountNumber).length();\n StringBuilder stringBuilder = new StringBuilder();\n if (accountNumberLength < length) {\n stringBuilder.append(new String(new char[length - accountNumberLength]).replace(\"\\0\", \"0\"));\n }\n stringBuilder.append(intAccountNumber);\n return stringBuilder.toString();\n }", "private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }", "private String getRandomPIN(int num) {\n\t\tStringBuilder randomPIN = new StringBuilder();\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\trandomPIN.append((int) (Math.random() * 10));\n\t\t}\n\t\treturn randomPIN.toString();\n\t}", "public int generateUniqueID(){\n\n int uniqueID = 100; \n int maxID =getMaxId() ;\n \n uniqueID = uniqueID + maxID;\n\n return uniqueID;\n }", "private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }", "private Integer randomBilirrubina(){\n\t\t\tint Min = 0, Max = 14;\n\t\t\treturn Min + (int)(Math.random() * ((Max - Min) + 1));\n\t\t}", "private static void generateCashWithdraw(int branchID) {\n long accountNo = getRandAccountFromBranch(branchID);\n int amount = getRandomAmount();\n writeToFile(String.format(\"%d %d\\n\", accountNo, amount));\n }", "private int randomInteger(int n) {\n return (int) (randGen.random() * (n - 1));\n }", "public void studIdGenr()\n {\n \tthis.studentID = (int)(Math.random() * (2047300 - 2047100 + 1) + 2047100);\n }", "static final int fast_rand()\n\t{\n\t\tRz = 36969 * (Rz & 65535) + (Rz >>> 16);// ((Rz >>> 16) & 65535);\n\t\tRw = 18000 * (Rw & 65535) + (Rw >>> 16);// ((Rw >>> 16) & 65535);\n\t\treturn (Rz << 16) + Rw;\n\t}", "private int randomAddress() {\n\t\tint randomAddressId = (int) (Math.random() * 603);\n\t\treturn randomAddressId;\n\t}", "private int randomNum() {\r\n\t return((int)(Math.random() * 100));\r\n\t }", "private int randomInt(int lower, int upper) {\n\t\treturn (int) ((upper - lower + 1) * Math.random()) + lower;\n\t}", "public Set<Integer> generateLotteryNumbers ()\r\n {\r\n return null;\r\n }", "protected String generateUserID() {\n Random r = new Random();\n String userID;\n do {\n int randomIDnum = r.nextInt(999999999) + 1;\n userID = String.valueOf(randomIDnum);\n } while (this.userMap.containsKey(userID));\n return userID;\n }", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}", "private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}", "public static int generateDigit() {\n\t\t\n\t\treturn (int)(Math.random() * 10);\n\t}", "private static int randInt(int lower, int upper) {\n\t\tRandom random = new Random();\n\t\treturn random.nextInt((upper - lower) + 1) + lower;\n\t}", "public static String generateId(int digitAmount) {\n\t\t\n\t\tfinal String upperAlpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\t\t\n\t\tString brokerOrderID = \"\";\n\t\tfor (int i = 0; i < digitAmount; i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tint randomAlphaIndex = ThreadLocalRandom.current().nextInt(0, 25 + 1);\n\t\t\t\tbrokerOrderID += upperAlpha.charAt(randomAlphaIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint randomInteger = ThreadLocalRandom.current().nextInt(1, 9 + 1);\n\t\t\t\tbrokerOrderID += Integer.toString(randomInteger);\n\t\t\t}\n\t\t}\n\t\treturn brokerOrderID;\n\t}", "UUID generateRandomUuid();", "public int generateRandom() {\n\t\tint random = (int)(Math.random()*((6-1)+1))+1;\n\t\treturn random;\n\t}", "private static int get() { \r\n Random r = new Random();\r\n return (r.nextInt(9));\r\n }", "private static int randomInteger(int a, int b) {\n return (int) (Math.random() * (b - a) + a);\n }", "private static String RandomCash() {\n\t\tint max = 0;\n\t\tint min = 100000;\n\t\tint range = max - min + 1;\n\t\t\n\t\tString text=null;\n\t\ttry {\n\t\t\t\n\t\t\tint random = (int) (Math.random() * (range) + min);\n\t\t\ttext = formatted(\"###,###\", random)+\" VNĐ\";\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn text;\n\t}", "private static Integer generateID() {\n Integer uniqueID = -1;\n while (setOfIDs.contains(uniqueID) || !Employee.isPositive(uniqueID)) {\n uniqueID += 1;\n }\n return uniqueID;\n }", "public static int generateRandomNumber()\n\t{\n\t\tRandom r = new Random();\n\t\treturn r.nextInt();\n\t}", "protected String generateRandomId(String prefix) {\n int nextInt = RANDOM.nextInt();\n nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);\n return prefix + \"_\" + String.valueOf(nextInt);\n }", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "public static int generarNumeroAleatorio(int limite){ //Entre 0 y limite - 1\n return (int) (Math.random()*limite);\n }", "public static String randomNumberGenerator() {\r\n\t\tint max = 999999999; // e.g. 714053349 (9 digits)\r\n\t\tRandom rand = new Random();\r\n\t\tint min = 0;\r\n\t\tint randomNum = rand.nextInt(max - min + 1) + min;\r\n\t\treturn Integer.toString(randomNum);\r\n\t}", "private int rand(int lower, int upper) {\n return lower + (int)(Math.random() * ((upper - lower) + 1));\n }", "public static int genID(){\n Random rand = new Random();\n\n int theID = rand.nextInt(999)+1;\n\n return theID;\n\n }", "private static int generateCircleId(){\n return snextCircleId.incrementAndGet();\n\n }", "public static int getRndInt(int upperBound){\n\t\tRandom randomNumber; \n\t\trandomNumber = new Random(); \n\t\tint z = randomNumber.nextInt(upperBound);\n\t\treturn z;\n\t}", "private static void generateCashDeposit(int branchID) {\n long accountNo = getRandAccountFromBranch(branchID);\n int amount = getRandomAmount();\n writeToFile(String.format(\"%d %d\\n\", accountNo, amount));\n }", "private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }", "private static void generateAddCustomer(int branchID) {\n long accountNo = getNewAccountNo(branchID);\n int balance = getRandomBalance();\n writeToFile(String.format(\"%d %d\\n\", accountNo, balance));\n }", "public static long getID() {\n int localizador = 0;\n Long min = 1000000000L;\n Long max = 9999999999L;\n\n do {\n localizador = (int) Math.floor(Math.random() * (max - min + 1) + min);\n } while (Integer.toString(localizador).length() != 10);\n return localizador;\n }", "public int getRandomsNumber(){\n Random random = new Random();\n int number = random.nextInt(12) + 1;\n return number;\n }", "public static int getRandomInt()\n {\n return ThreadLocalRandom.current().nextInt(1000000000, 2147483647);\n }", "public Set<Integer> generateLotteryNumbers ()\n {\n\t Set<Integer> randomGenerator = new HashSet<Integer>(6); \n\t Random randomnum = new Random();\n\t \n\t\n\n\t \n\t for (Integer i=0; i<6;i++) \n\t {\n\t\t //keep looping until able to add a add number into a set that does not not exist and is between 1 and49\n\t\t \n\t\t while (randomGenerator.add(1+randomnum.nextInt(49)) == false) {\n\t\t\t \n\t\t\t\n\t\t }\n\t\t \n\n\t }\n\t \n\t \n\t \n return randomGenerator;\n \n }", "public static int RandomNum(){\n\n Random random = new Random();\n int ItemPicker = random.nextInt(16);\n return(ItemPicker);\n }", "private String generateUID()\n {\n String uid;\n int nbAccounts = this.getNumberOfAccounts();\n String host = this.registration.getHost();\n int nbAccountsForHost = this.getNbAccountForHost(host);\n \n if (nbAccounts == 0 || (this.isModification() && nbAccounts == 1) ||\n nbAccountsForHost == 0 || (this.isModification() && nbAccountsForHost == 1))\n {\n // We create the first account or we edit the onlyone\n // Or we create the first account for this server or edit the onlyone\n uid = host;\n }\n else\n {\n uid = host + \":\" + this.registration.getPort();\n }\n \n return uid;\n }", "private static int newNumber()\n\t{\n\t\tdouble initial = Math.random();\n\t\tdouble rangeAdjusted = initial * (10000 - 1001) + 1000;\n\t\tint rounded = (int)Math.round(rangeAdjusted);\n\t\treturn rounded;\n\t}", "public String generateCustomer_Id() {\n\t\tString customer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkCustomerIdIfExist(customer_Id)) {\n\t\t\tcustomer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn customer_Id;\n\t}", "public static String randomNumberString() {\n\r\n Random random = new Random();\r\n int i = random.nextInt(999999);\r\n\r\n\r\n return String.format(\"%06d\", i);\r\n }", "public static int getRandomNumber(){\n int random = 0; // set variable to 0\r\n random = (int)(Math.random()*10) + 1; //generate random number between 1 and 10\r\n return random; //return random number\r\n }", "private int rand() {\n return (int)(Math.random()*(RAND_MAX + 1));\n }", "public int getRandomNumber() {\n int Random;\n Random randomize = new Random();\n Random = randomize.nextInt(3);\n return new Integer(Random);\n }", "public static int randomGet() { return 0; }", "private static int nextClientId(){\n\n\t\tint id = random.nextInt(U16_MAX +1);\n\n\t\twhile(clients.containsKey(id))\n\t\t\tid = random.nextInt(U16_MAX +1);\n\n\t\treturn id;\n\t}", "public int getRandomInt(int upper) {\n int retVal = myRandom.nextInt() % upper;\n if (retVal < 0) {\n retVal += upper;\n }\n return (retVal);\n }", "public int generatePolicyNum(){\n\t\tRandom rnd = new Random();\n\t\tint polNum = rnd.nextInt(899999) + 100000; \t\n\t\t\n\t\treturn polNum;\t\t\t\n\t}", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "public synchronized String generateBranchId() {\n long num = rand.nextLong() + Utils.counter++ + System.currentTimeMillis();\n byte bid[] = digester.digest(Long.toString(num).getBytes());\n return SIPConstants.BRANCH_MAGIC_COOKIE + Utils.toHexString(bid);\n }", "@Test\n public void createRandomNumber() throws IOException {\n Assert.assertNotNull(Utils.createRandomNumber());\n }", "long getUserCode(String username) {\n\n return (long) (Math.random() * 99999999999l);\n }", "public static String getIdBeneficio(){\n //La Clase Math tiene varios metodos que te ayudaran\n //Escoger numero aleatorio entre 100000 y 1\n int idrandom1 = (int) (Math.random() * 1000000 + 1);\n\n String idrandom = Integer.toString(idrandom1);\n\n return idrandom;\n }", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public int generateKey() {\n SecureRandom secureRandom = new SecureRandom();\n try {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return secureRandom.nextInt(26);\n }", "public int makeNewAccount(int balance){\n int generated_id = 0;\n\n try {\n accountLock.lock();\n executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection());\n accountLock.unlock();\n\n cache.add(new Account(generated_id, balance));\n\n operationLock.lock();\n logNewAccount(currentOperationId, generated_id, balance);\n currentOperationId++;\n operationLock.unlock();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return generated_id;\n }", "public String generateGUID() {\n Random randomGenerator = new Random();\n String hash = DigestUtils.shaHex(HASH_FORMAT.format(new Date())\n + randomGenerator.nextInt());\n return hash.substring(0, GUID_LEN);\n }", "private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }" ]
[ "0.73262525", "0.72265667", "0.7200366", "0.7014024", "0.6765232", "0.6723574", "0.6718331", "0.67164826", "0.66797245", "0.6621647", "0.6605637", "0.66029453", "0.65922767", "0.65839", "0.64813083", "0.6479352", "0.64786196", "0.646382", "0.64535403", "0.64051116", "0.64012617", "0.6396327", "0.6320944", "0.6301064", "0.629343", "0.62544525", "0.62298405", "0.6199448", "0.6188063", "0.6162927", "0.60999036", "0.60655487", "0.6037511", "0.60069335", "0.6006094", "0.5985798", "0.59820354", "0.597782", "0.59711903", "0.5957351", "0.5953845", "0.59525985", "0.5951017", "0.5947133", "0.59393024", "0.5919428", "0.59109217", "0.5897401", "0.587599", "0.58675635", "0.58668035", "0.5862146", "0.5860318", "0.5850381", "0.5838136", "0.5834869", "0.5820503", "0.58202463", "0.58130544", "0.5806244", "0.58058023", "0.58035034", "0.580284", "0.5788366", "0.5784993", "0.57847285", "0.57813925", "0.57801914", "0.5762827", "0.57547635", "0.5751459", "0.5742503", "0.5735581", "0.5735284", "0.5734168", "0.57320964", "0.57253027", "0.57201564", "0.57092375", "0.5708799", "0.57069546", "0.57027066", "0.570266", "0.56836134", "0.5665583", "0.56642485", "0.5661948", "0.5652315", "0.56496674", "0.56386113", "0.56362903", "0.56358737", "0.5631275", "0.56305057", "0.5626035", "0.5625667", "0.5619167", "0.5616829", "0.56147355", "0.5614735" ]
0.72770923
1
Private Bank utility function used internally to generate unique random integer values for socalled secret keys. Should probably be synchronized at some point. Note: at the time of this writing, this method uses the same process as the one for generating unique bank account numbers, but I wanted to keep it separate so we have the option for the two processes to produce different types of values.
private int getUniqueSecretKey () { int minInt = 100000; int maxInt = 999999; int candidateNumber = -1; Set<Integer> listOfCurrentSecretKeys = hashMapOfSecretKeys.keySet(); boolean numberIsUnique = false; while ( !numberIsUnique ) { candidateNumber = rng.nextInt(maxInt+1); // assume unique for a moment numberIsUnique = true; // verify uniqueness assumption for ( int theNum : listOfCurrentSecretKeys) { if (candidateNumber == theNum) { numberIsUnique = false; break; } } // end for() loop } // end while() loop return candidateNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }", "public void generateNewSecret() {\r\n \r\n //Get Random Number With Correct Digits\r\n int intRand = randomNumberGenerator.nextInt((int)(Math.pow(10, numDigits) - Math.pow(10, numDigits - 1))) + (int)Math.pow(10, numDigits - 1);\r\n \r\n //Set To String\r\n String strRand = String.valueOf(intRand);\r\n \r\n //Set Value\r\n secretNumber = convertNumToDigitArray(strRand);\r\n \r\n }", "private static int getSecretNum(int arg1) {\n Random rand = new Random();\n return rand.nextInt(UPPERBOUND)+1; //make range 1-100\n }", "private static long getRandAccount() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranch(bid);\n }", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "private static long getRandAccountD() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranchD(bid);\n }", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "private int getUniqueAccountNumber () {\n\n int minInt = 100000;\n int maxInt = 999999;\n int candidateNumber = -1;\n Set<Integer> listOfCurrentAccountNumbers =\n hashMapOfAllAccts.keySet();\n boolean numberIsUnique = false;\n while ( !numberIsUnique ) {\n\n candidateNumber = rng.nextInt(maxInt+1);\n // assume unique for a moment\n numberIsUnique = true;\n // verify uniqueness assumption\n for ( int acctNum : listOfCurrentAccountNumbers) {\n if (candidateNumber == acctNum) {\n numberIsUnique = false;\n break;\n }\n } // end for() loop\n\n } // end while() loop\n\n return candidateNumber;\n }", "public int generateKey() {\n SecureRandom secureRandom = new SecureRandom();\n try {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return secureRandom.nextInt(26);\n }", "public static int getRandomBalance(){\n return rand.nextInt(1000000);\n }", "private String genNewAccountNumber(int clientId) {\r\n\t\t// keep 4 digits\r\n\t\tint acNumber = clientId * 1000 + (int) (Math.random() * 900);\r\n\t\treturn String.valueOf(acNumber);\r\n\t}", "public static Account generate() {\n return Account.fromHexString(Util.generateRandom32BytesHex());\n }", "public static String createUniqueKey() {\r\n\r\n\t\tint iRnd;\r\n\t\tlong lSeed = System.currentTimeMillis();\r\n\t\tRandom oRnd = new Random(lSeed);\r\n\t\tString sHex;\r\n\t\tStringBuffer sUUID = new StringBuffer(32);\r\n\t\tbyte[] localIPAddr = new byte[4];\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 8 characters Code IP address of this machine\r\n\t\t\tlocalIPAddr = InetAddress.getLocalHost().getAddress();\r\n\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[0]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[1]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[2]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[3]) & 255]);\r\n\t\t}\r\n\t\tcatch (UnknownHostException e) {\r\n\t\t\t// Use localhost by default\r\n\t\t\tsUUID.append(\"7F000000\");\r\n\t\t}\r\n\r\n\t\t// Append a seed value based on current system date\r\n\t\tsUUID.append(Long.toHexString(lSeed));\r\n\r\n\t\t// 6 characters - an incremental sequence\r\n\t\tsUUID.append(Integer.toHexString(iSequence.incrementAndGet()));\r\n\r\n\t\tiSequence.compareAndSet(16777000, 1048576);\r\n\r\n\t\tdo {\r\n\t\t\tiRnd = oRnd.nextInt();\r\n\t\t\tif (iRnd>0) iRnd = -iRnd;\r\n\t\t\tsHex = Integer.toHexString(iRnd);\r\n\t\t} while (0==iRnd);\r\n\r\n\t\t// Finally append a random number\r\n\t\tsUUID.append(sHex);\r\n\r\n\t\treturn sUUID.substring(0, 32);\r\n\t}", "public static String generateRandomNonce() {\n Random r = new Random();\n StringBuffer n = new StringBuffer();\n for (int i = 0; i < r.nextInt(8) + 2; i++) {\n n.append(r.nextInt(26) + 'a');\n }\n return n.toString();\n }", "private int randomHelper() {\n\t\tRandom rand = new Random();\n\t\tint randomNum = rand.nextInt((10000 - 1) + 1) + 1;\n\t\treturn randomNum;\n\t}", "public static String generateRandomInteger() {\n SecureRandom random = new SecureRandom();\n int aStart = 1;\n long aEnd = 999999999;\n long range = aEnd - (long) aStart + 1;\n long fraction = (long) (range * random.nextDouble());\n long randomNumber = fraction + (long) aStart;\n return String.valueOf(randomNumber);\n }", "private static long getRandAccountFromBranch(int bid) {\n int noa = uniqueAccounts.get(bid).size();\n int index = rand.nextInt(noa);\n return accounts.get(bid).get(index);\n }", "private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "@Test\n public void testGetUniqueInt() {\n UniqueRandomGenerator instance = new UniqueRandomGenerator();\n \n List<Integer> extracted = new ArrayList<>();\n \n for (int i = 0; i < 1000; i++)\n {\n int extr = instance.getUniqueInt(0, 1000);\n \n if (extracted.contains(extr))\n fail();\n else\n extracted.add(extr);\n }\n }", "public static int randomNext() { return 0; }", "private static int newSecretNumber(int min, int max)\n {\n Random rnd = new Random();\n return rnd.nextInt((max + 1 - min) + min);\n }", "private void getRandomNumber() {\n\t\tRandom random = new Random();\n\t\tint randomCount = 255;\n\t\tint randNum = 0; \n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\trandNum = random.nextInt(randomCount);\n\t\t\tswitch (numberType) {\n\t\t\tcase 1:\n\t\t\t\trandomNumbers.add(Integer.toString(randNum));\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(randNum > 15)\n\t\t\t\t\trandomNumbers.add(String.format(\"%8s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\telse\n\t\t\t\t\trandomNumbers.add(String.format(\"%4s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\trandomNumbers.add(Integer.toHexString(randNum));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(SHORT_DEF_COUNT);\n }", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "private String generateSecretKey(){\n SecureRandom random = new SecureRandom();\n byte[] bytes = new byte[20];\n\n random.nextBytes(bytes);\n Base32 base32 = new Base32();\n return base32.encodeToString(bytes);\n }", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "private int generateRandomNumber() {\n\t\treturn (int) Math.floor(Math.random() * Constants.RANDOM_NUMBER_GENERATOR_LIMIT);\n\t}", "byte[] generateMasterSecret(String type, byte[]secret, int[]clientRandom, int[]serverRandom) throws NoSuchAlgorithmException, IOException{\n byte[] part1 = md5andshaprocessing(\"AA\", secret, clientRandom, serverRandom);\r\n byte[] part2 = md5andshaprocessing(\"BB\", secret, clientRandom, serverRandom);\r\n byte[] part3 = md5andshaprocessing(\"CCC\", secret, clientRandom, serverRandom);\r\n \r\n /* using ByteArrayOutputStream to concatenate the 3 parts */\r\n \r\n baos.write(part1);\r\n baos.write(part2);\r\n baos.write(part3);\r\n \r\n byte[] result = baos.toByteArray();\r\n\r\n System.out.println(\"The \" + type + \" is indeed 48 bytes: \" + result.length);\r\n System.out.println(type + \" to string: \" + Base64.getEncoder().encodeToString(result) + \"\\n\");\r\n \r\n baos.reset();\r\n \r\n return result;\r\n }", "UUID generateRandomUuid();", "public static long getRandAccountFromBranchD(int branchID){\n int noa = uniqueAccounts.get(branchID).size();\n int index = rand.nextInt(noa);\n long accNo = accounts.get(branchID).get(index);\n removeAccNo(branchID, index);\n return accNo;\n\n }", "public void generateKey() {\n\twhile(true){\n\t rsaKeyA = (int)(Math.random()*20000 + 26);\n\t if(isPrime(rsaKeyA)){\n\t\tbreak;\n\t }\n\t}\n\twhile(true){\n\t rsaKeyB = (int)(Math.random()* 20000 + 26);\n\t if(isPrime(rsaKeyB)&& rsaKeyB != rsaKeyA){\n\t\tbreak;\n\t }\n\t}\n \n }", "private static void generateMoneyTransfer(int branchID) {\n long accountNo1 = getRandAccountFromBranch(branchID), accountNo2 = getRandAccount();\n int amount = getRandomAmount();\n writeToFile(String.format(\"%d %d %d\\n\", accountNo1, accountNo2, amount));\n }", "private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }", "private String getRandomPIN(int num) {\n\t\tStringBuilder randomPIN = new StringBuilder();\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\trandomPIN.append((int) (Math.random() * 10));\n\t\t}\n\t\treturn randomPIN.toString();\n\t}", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "protected String generateUserID() {\n Random r = new Random();\n String userID;\n do {\n int randomIDnum = r.nextInt(999999999) + 1;\n userID = String.valueOf(randomIDnum);\n } while (this.userMap.containsKey(userID));\n return userID;\n }", "private int _randomCode () {\n Random random = new Random();\n code = random.nextInt(999999);\n return code;\n }", "private static int nextClientId(){\n\n\t\tint id = random.nextInt(U16_MAX +1);\n\n\t\twhile(clients.containsKey(id))\n\t\t\tid = random.nextInt(U16_MAX +1);\n\n\t\treturn id;\n\t}", "public static String generateId(int digitAmount) {\n\t\t\n\t\tfinal String upperAlpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\t\t\n\t\tString brokerOrderID = \"\";\n\t\tfor (int i = 0; i < digitAmount; i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tint randomAlphaIndex = ThreadLocalRandom.current().nextInt(0, 25 + 1);\n\t\t\t\tbrokerOrderID += upperAlpha.charAt(randomAlphaIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint randomInteger = ThreadLocalRandom.current().nextInt(1, 9 + 1);\n\t\t\t\tbrokerOrderID += Integer.toString(randomInteger);\n\t\t\t}\n\t\t}\n\t\treturn brokerOrderID;\n\t}", "private void setAccountNumber() // setare numar de cont\n {\n int random = ThreadLocalRandom.current().nextInt(1, 100 + 1);\n accountNumber = ID + \"\" + random + SSN.substring(0,2);\n System.out.println(\"Your account number is: \" + accountNumber);\n }", "long nextUniqueKey() throws IOException;", "static final int fast_rand()\n\t{\n\t\tRz = 36969 * (Rz & 65535) + (Rz >>> 16);// ((Rz >>> 16) & 65535);\n\t\tRw = 18000 * (Rw & 65535) + (Rw >>> 16);// ((Rw >>> 16) & 65535);\n\t\treturn (Rz << 16) + Rw;\n\t}", "public int generateSessionID(){\r\n SecureRandom randsession = new SecureRandom();\r\n return randsession.nextInt(1234567890);\r\n }", "private static int createSelectedKey(int bBit) {\r\n\t\tRandom random = new Random();\r\n\t\tint maxKey = (int) Math.pow(2, bBit);\r\n\t\tint randomKey = random.nextInt((maxKey - 1) + 1) + 1;\t\r\n\t\treturn randomKey;\r\n\t}", "private int randomGen(int upperBound) {\n\t\tRandom r = new Random();\n\t\treturn r.nextInt(upperBound);\n\t}", "public String generateAccountNumber() {\n // Set First part of AccountNumber\n String accountNumberFirst = \"1398\";\n\n // To Make Second, Third part Get each date and time\n String currentTime = getCurrentTime();\n\n // Get year, month, day\n String date = currentTime.split(\" \")[0];\n int year, month, day;\n year = Integer.parseInt(date.split(\"-\")[0]);\n month = Integer.parseInt(date.split(\"-\")[1]);\n day = Integer.parseInt(date.split(\"-\")[2]);\n\n // Get hour, minute, second\n String time = currentTime.split(\" \")[1];\n int hour, minute, second;\n hour = Integer.parseInt(time.split(\":\")[0]);\n minute = Integer.parseInt(time.split(\":\")[1]);\n second = Integer.parseInt(time.split(\":\")[2]);\n\n // Set Second part of AccountNumber\n String accountNumberSecond;\n accountNumberSecond = Integer.toString((year % 10)) + Integer.toString((month * second) % 10) + Integer.toString((day * minute + hour) % 10);\n\n // Set Third part of AccountNumber\n String accountNumberThird;\n accountNumberThird = Integer.toString((second * hour + minute) % 10) + Integer.toString((second * day + hour) % 10) + Integer.toString((day * month + second) % 10) + Integer.toString((second * minute + day) % 10);\n\n // Set Forth part of AccountNumber\n String accountNumberForth;\n int count = (int)accountDataRepository.count();\n if(count % 100 < 10) {\n accountNumberForth = \"0\" + Integer.toString(count % 100);\n }\n else {\n accountNumberForth = Integer.toString(count % 100);\n }\n\n // Generate AccountNumber\n String accountNumber = accountNumberFirst + \"-\" + accountNumberSecond + \"-\" + accountNumberThird + \"-\" + accountNumberForth;\n\n return accountNumber;\n }", "public String generateGUID() {\n Random randomGenerator = new Random();\n String hash = DigestUtils.shaHex(HASH_FORMAT.format(new Date())\n + randomGenerator.nextInt());\n return hash.substring(0, GUID_LEN);\n }", "private String generate_uuid() {\n\n int random_length = 12;\n int time_length = 4;\n\n byte[] output_byte = new byte[random_length+time_length];\n\n //12 byte long secure random\n SecureRandom random = new SecureRandom();\n byte[] random_part = new byte[random_length];\n random.nextBytes(random_part);\n System.arraycopy(random_part, 0, output_byte, 0, random_length);\n\n //merged with 4 less significant bytes of time\n long currentTime = System.currentTimeMillis();\n for (int i=random_length; i<output_byte.length; i++){\n output_byte[i] = (byte)(currentTime & 0xFF);\n currentTime >>= 8;\n }\n\n //Converted to base64 byte\n String output = Base64.encodeBase64String(output_byte);\n Log.debug_value(\"UUID\", output);\n return output;\n\n }", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}", "public int generateOTP(String key){\n int len =4;\n\n int OTP;\n String numbers = \"0123456789\";\n Random rndm_method = new Random();\n\n char[] otp = new char[len];\n\n for (int i = 0; i < len; i++)\n {\n otp[i] =\n numbers.charAt(rndm_method.nextInt(numbers.length()));\n }\n OTP = Integer.parseInt(String.valueOf(otp));\n otpCache.put(key, OTP);\n return OTP;\n }", "private static byte[] generateSeed() {\n try {\n ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream();\n DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer);\n seedBufferOut.writeLong(System.currentTimeMillis());\n seedBufferOut.writeLong(System.nanoTime());\n seedBufferOut.writeInt(android.os.Process.myPid());\n seedBufferOut.writeInt(Process.myUid());\n seedBufferOut.write(BUILD_FINGERPRINT_AND_DEVICE_SERIAL);\n seedBufferOut.close();\n return seedBuffer.toByteArray();\n } catch (IOException e) {\n throw new SecurityException(\"Failed to generate seed\", e);\n }\n }", "byte[] get_secure_random_bytes();", "T getRandomKey();", "private int IdRandom() {\n\t\tRandom random = new Random();\n\t\tint id = random.nextInt(899999) + 100000;\n\t\treturn id;\n\t}", "void generateSecretKey() {\n\n Random rand = new Random();\n \n // randomly generate alphabet chars\n this.secretKey.setCharAt(0, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(1, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(4, (char) (rand.nextInt(26) + 'a'));\n this.secretKey.setCharAt(5, (char) (rand.nextInt(26) + 'a'));\n\n // randomly generate special chars\n // special chars are between 33-47 and 58-64 on ASCII table\n if (rand.nextBoolean()) {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(15) + '!'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(15) + '!'));\n } else {\n this.secretKey.setCharAt(3, (char) (rand.nextInt(7) + ':'));\n this.secretKey.setCharAt(8, (char) (rand.nextInt(7) + ':'));\n }\n \n // randomly generate int between 2 and 5\n this.secretKey.setCharAt(7, (char) (rand.nextInt(4) + '2'));\n }", "private Integer randomBilirrubina(){\n\t\t\tint Min = 0, Max = 14;\n\t\t\treturn Min + (int)(Math.random() * ((Max - Min) + 1));\n\t\t}", "private String generateNonce() {\n // Get the time of day and run MD5 over it.\n Date date = new Date();\n long time = date.getTime();\n Random rand = new Random();\n long pad = rand.nextLong();\n // String nonceString = (new Long(time)).toString()\n // + (new Long(pad)).toString();\n String nonceString = Long.valueOf(time).toString()\n + Long.valueOf(pad).toString();\n byte mdbytes[] = messageDigest.digest(nonceString.getBytes());\n // Convert the mdbytes array into a hex string.\n return toHexString(mdbytes);\n }", "private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }", "private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "static Bytes96 random(Random rnd) {\n byte[] randomBytes = new byte[SIZE];\n rnd.nextBytes(randomBytes);\n return wrap(randomBytes);\n }", "private static int randomInteger(int a, int b) {\n return (int) (Math.random() * (b - a) + a);\n }", "public static int randomGet() { return 0; }", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "private static String generateSecret(Accessor accessor, Consumer consumer) {\n return generateHash(accessor.getToken() + consumer.getSecret() + System.nanoTime());\n }", "public static long getRandomAccountNo(int branchID) {\n return getAccountNo(branchID, rand.nextInt((int)div));\n }", "public int generate(int k) {\n // PUT YOUR CODE HERE\n }", "long getUserCode(String username) {\n\n return (long) (Math.random() * 99999999999l);\n }", "private static void generateCashWithdraw(int branchID) {\n long accountNo = getRandAccountFromBranch(branchID);\n int amount = getRandomAmount();\n writeToFile(String.format(\"%d %d\\n\", accountNo, amount));\n }", "public BigInteger random(int k){\r\n \tSecureRandom sr = new SecureRandom();\r\n byte[] ba = new byte[k];\r\n ba[0] = (byte) (sr.nextInt(9)+49);\r\n for (int d = 1;d<k;d++){\r\n ba[d] = (byte) (sr.nextInt(10)+48); \r\n }\r\n return new BigInteger(new String(ba));\r\n }", "public static byte[] createBytes()\n\t{\n\t\tbyte[]\t\trc = new byte[16];\n\t\tbyte[]\t\tbase;\n\t\tint\t\tid;\n\n\t\tsynchronized(itsLock)\n\t\t{\n\t\t\tid = itsCounter++;\n\n\t\t\tif (itsCounter > WRAP_AT)\n\t\t\t{\n\t\t\t\t// Periodically change the base so that we\n\t\t\t\t// we give other code the best chance of\n\t\t\t\t// generating an evenly distributed hash.\n\t\t\t\titsBase = computeBase();\n\t\t\t\titsCounter = 0;\n\t\t\t}\n\n\t\t\tbase = itsBase;\n\t\t}\n\n\t\tSystem.arraycopy(base, 0, rc, 0, 12);\n\t\trc[12] = (byte)(id & 0xff);\n\t\trc[13] = (byte)((id >> 8) & 0xff);\n\t\trc[14] = (byte)((id >> 16) & 0xff);\n\t\trc[15] = (byte)((id >> 24) & 0xff);\n\n\t\treturn rc;\n\t}", "@Test\n public void genRandom() {\n runAndWait(() -> genRandom(10_000, 500, 1), 32, 2000);\n runAndWait(() -> genRandom(10_000, 500, 100), 32, 2000);\n runAndWait(() -> genRandom(250_000, 4000, 50), 4, 5_000);\n }", "static String generateId() {\r\n\t\treturn UUID.randomUUID().toString().replaceAll(\"-\", \"\");\r\n\t}", "private String genrateOrderTrakingnumber() {\n return UUID.randomUUID().toString();\n }", "T getRandomAllowedValue();", "public int randomNum()\r\n {\r\n Random rand = new Random();\r\n int n = rand.nextInt(52)+1;\r\n return n;\r\n }", "@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }", "@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }", "public int[] randomCookieGen(){\r\n SecureRandom secrand = new SecureRandom();\r\n IntStream cookie = secrand.ints(128);\r\n return cookie.toArray();\r\n }", "public int generateUniqueID(){\n\n int uniqueID = 100; \n int maxID =getMaxId() ;\n \n uniqueID = uniqueID + maxID;\n\n return uniqueID;\n }", "public static long getNewAccountNo(int branchID){\n while(true){\n long accNo = getRandomAccountNo(branchID);\n if(!uniqueAccounts.get(branchID).contains(accNo)) {\n uniqueAccounts.get(branchID).add(accNo);\n accounts.get(branchID).add(accNo);\n return accNo;\n }\n }\n }", "public static int getRandomInt()\n {\n return ThreadLocalRandom.current().nextInt(1000000000, 2147483647);\n }", "private static int get() { \r\n Random r = new Random();\r\n return (r.nextInt(9));\r\n }", "private static SecureRandomAndPad createSecureRandom() {\n byte[] seed;\n File devRandom = new File(\"/dev/urandom\");\n if (devRandom.exists()) {\n RandomSeed rs = new RandomSeed(\"/dev/urandom\", \"/dev/urandom\");\n seed = rs.getBytesBlocking(20);\n } else {\n seed = RandomSeed.getSystemStateHash();\n }\n return new SecureRandomAndPad(new SecureRandom(seed));\n }", "public static int generateRandomNumber()\n\t{\n\t\tRandom r = new Random();\n\t\treturn r.nextInt();\n\t}", "private static int nextInstanceID()\n {\n return baseID.incrementAndGet();\n }", "public static long generateCode() {\n long code = (long) (100000 + Math.random() * 899999l);\n return code;\n }", "public static String getIdBeneficio(){\n //La Clase Math tiene varios metodos que te ayudaran\n //Escoger numero aleatorio entre 100000 y 1\n int idrandom1 = (int) (Math.random() * 1000000 + 1);\n\n String idrandom = Integer.toString(idrandom1);\n\n return idrandom;\n }", "public static void main(String[] args) {\n byte number = (byte)(Math.random()*52);\n\n\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(RESET_CODE_DIGIT_COUNT);\n }", "String generateUID();", "public BankAccount() {\n numberOfAccounts++;\n this.accountNumber = accountNumberGenerator(); \n }", "private String nextGUID() {\r\n\t\tString guidIdSQL = \"SELECT SYS_GUID() FROM DUAL\";\r\n\t\treturn namedJdbcTemplate.queryForObject(guidIdSQL, (HashMap<String, ?>) null, String.class);\r\n\t}", "public String genUserToken()\n\t{\n\t\tString token = \"\";\n\t\tfor (int i = 0; i < 16; i++)\n\t\t{\n\t\t\ttoken = token + tokenGenerator.nextInt(10);\n\t\t}\n\t\treturn token;\n\t}", "public Set<Integer> generateLotteryNumbers ()\r\n {\r\n return null;\r\n }" ]
[ "0.73508584", "0.69375", "0.6662605", "0.6654195", "0.65327305", "0.63463545", "0.6337608", "0.63046896", "0.6195871", "0.6195605", "0.6077438", "0.60590285", "0.6055082", "0.60433567", "0.5983581", "0.5976676", "0.5971502", "0.5958796", "0.59465444", "0.5936774", "0.59188", "0.5915429", "0.59148675", "0.5910295", "0.58793956", "0.587633", "0.58521354", "0.5841589", "0.58069295", "0.5798756", "0.57698625", "0.57575715", "0.57524425", "0.57396954", "0.57339317", "0.57241726", "0.57109857", "0.5707132", "0.5703882", "0.5703882", "0.5700724", "0.5663615", "0.5656706", "0.56562436", "0.56469554", "0.5645291", "0.56342626", "0.5633291", "0.5630491", "0.56179136", "0.5607036", "0.5605465", "0.5603984", "0.56030566", "0.55875814", "0.55837154", "0.55826324", "0.55574197", "0.5540935", "0.5535807", "0.55356294", "0.5532143", "0.55305624", "0.55255526", "0.551447", "0.55049825", "0.5498382", "0.54908043", "0.5486687", "0.548484", "0.5464708", "0.54599893", "0.54597026", "0.54443204", "0.54420215", "0.5437441", "0.5435249", "0.54349816", "0.5434839", "0.5434272", "0.5430561", "0.5420351", "0.5420351", "0.54195994", "0.5414683", "0.5402906", "0.53990775", "0.53892124", "0.5384721", "0.5384511", "0.53817606", "0.5376897", "0.5373801", "0.5365472", "0.53590536", "0.53574675", "0.5352324", "0.5342988", "0.53380173", "0.53365797" ]
0.7065732
1
read from a reader
public static String readerToText(Reader reader) { StringBuilder sbf = new StringBuilder(); try (BufferedReader br = new BufferedReader(reader)) { String str = null; while ((str = br.readLine()) != null) { sbf.append(str).append('\n'); } return sbf.toString(); } catch (Exception e) { logger.error("Error while reading from reader. {}", e.getMessage()); return ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doReads(Reader reader) throws IOException;", "protected abstract Reader read() throws IOException;", "public void read(DataInputStream reader) throws Exception\r\n\t{\n\r\n\t}", "protected abstract Reader getReader() throws IOException;", "StreamReader underlyingReader();", "Read createRead();", "abstract void read();", "axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }", "private static String readNextLine(BufferedReader reader) {\n\t\t\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\treturn line;\n\t\t} catch(IOException e) {\n\t\t\tGdx.app.error(TAG, \"Failed to read the file\", e);\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch(IOException ex) {\n\t\t\t\tGdx.app.error(TAG, \"Failed to close file\");\n\t\t\t\tGdx.app.exit();\n\t\t\t}\n\t\t\tGdx.app.exit();\n\t\t\treturn null;\n\t\t}\n\t}", "public Object read() throws IOException, RecordIOException;", "public FeatureData read(Reader r) throws IOException, DataFormatException;", "private static String getString(BufferedReader reader) throws IOException{\n String result=null;\n while(result==null) {\n result = reader.readLine();\n }\n return result.trim();\n }", "protected abstract Object read ();", "private static String getString(Reader reader) {\n StringBuffer buf = new StringBuffer();\n char[] buffer = new char[1024];\n int count;\n try {\n while ((count = reader.read(buffer)) != -1) {\n buf.append(buffer, 0, count);\n }\n } catch (IOException e) {\n return null;\n }\n return buf.toString();\n }", "public void readFromStream(Reader r) throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(r);\n\t\tlines=new ArrayList();\n\n\t\twhile(true) {\n\t\t\tString input=br.readLine();\n\t\t\tif(input==null)\n\t\t\t\tbreak;\n\t\t\tlines.add(input);\n\t\t}\n\t}", "public String read();", "DataReader reader();", "@Override\n\tpublic void read() {\n\n\t}", "String read();", "String read();", "abstract Object read(@NonNull JsonReader reader) throws IOException;", "public void ownRead();", "abstract protected boolean read();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "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}", "public Reader getReader() {\n return in;\n }", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;", "private static String readAll(Reader rd) throws IOException {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t int cp;\n\t\t while ((cp = rd.read()) != -1) {\n\t\t sb.append((char) cp);\n\t\t }\n\t\t return sb.toString();\n\t\t }", "T read(String identifier) throws IOException;", "@Override\r\n\tpublic void read() {\n\r\n\t}", "public Reader getReader()\n {\n return reader;\n }", "protected final Reader getReader()\n {\n return _reader;\n }", "public String read() throws IOException {\n return reader.readLine();\n }", "public Reader getReader() {\r\n return reader;\r\n }", "@Override\n\tpublic void read(Object entidade) {\n\t\t\n\t}", "@Override\n public Ini read(InputStream in) throws IOException {\n return read(new InputStreamReader(in));\n }", "public abstract void read(DataInput input) throws IOException;", "public T read() throws IOException;", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "@Override\n public Ini read(Path path) throws IOException {\n try (Reader reader = Files.newBufferedReader(path)) {\n return read(reader);\n }\n }", "private static Integer getInteger(BufferedReader reader) throws IOException{\n Integer result=null;\n while(result==null) {\n try {\n result = Integer.parseInt(reader.readLine().trim());\n } catch (NumberFormatException e) {\n throw new NumberFormatException(\"You should feed integer for this input.\");\n }\n }\n return result;\n }", "public abstract UIReader getReaderByName(String readerName);", "@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 }", "@SneakyThrows\n public Reader reader() {\n return new FileReader(this.temp);\n }", "@Override\r\n protected void readImpl() {\r\n _recipeId = readD();\r\n }", "private String readResult() throws IOException {\n return reader.readLine();\n }", "T read(int id);", "T read(int id);", "@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 }", "void read ();", "public void read() {\n\t\tthis.isRead = true;\n\t}", "public void read(DataInputStream in) throws IOException;", "public interface RecordReader {\r\n\r\n /**\r\n * Reads a single record from this input stream. The type of object\r\n * returned depends on the format of the stream.\r\n * @return the record value, or null if the end of the stream was reached.\r\n * @throws IOException if an I/O error occurs reading from the stream\r\n * @throws RecordIOException if the record is malformed and cannot\r\n * \t be parsed, but subsequent reads may still be possible\r\n */\r\n public Object read() throws IOException, RecordIOException;\r\n\r\n /**\r\n * Closes this input stream.\r\n * @throws IOException if an I/O error occurs closing the stream\r\n */\r\n public void close() throws IOException;\r\n\r\n /**\r\n * Returns the line number of the last record from this input stream. If a\r\n * record spans multiple lines, the line number at the beginning of the\r\n * record is returned. May return -1 if the end of the stream was reached,\r\n * or 0 if new lines are not used to terminate records.\r\n * @return the beginning line number of the last record read\r\n */\r\n public int getRecordLineNumber();\r\n\r\n /**\r\n * Returns the unparsed record text of the last record read.\r\n * @return the unparsed text of the last record read\r\n */\r\n public String getRecordText();\r\n\r\n}", "public Object read();", "public abstract boolean read(String line);", "public abstract void readData(DataInput din) throws IOException;", "public GenericLineByLineParser(InputStreamReader reader) {\n this.br = new BufferedReader(reader);\n }", "private void read(){\n try {\n if (c != -1) c = r.read();\n } catch (IOException e){\n throw new IOError(e);\n }\n }", "@Override\n\tpublic void readData() {\n\t\t\n\t}", "public Response unmarshal(Reader reader) throws JAXBException {\n\t\tJAXBElement<Response> resultSetElement =\n\t\t\tunmarshaller.unmarshal(new StreamSource(reader), Response.class);\n\t\t\n\t\treturn resultSetElement.getValue();\n\t}", "public void accept(final Reader reader) throws IOException {\n reader.read(this);\n }", "protected E readValue(LineReader reader, long indexElement) throws IOException {\n int length = (int) getValueLength(indexElement);\n if (length == 0) {\n return getValueConverter().bytesToValue(buffer, 0);\n }\n long valPos = getValuePosition(indexElement);\n if (log.isTraceEnabled()) {\n log.trace(\"readValue: Retrieving value of length \" + length + \" from file at position \" + valPos);\n }\n synchronized (this) {\n reader.seek(valPos);\n if (buffer.length < length) {\n buffer = new byte[length];\n }\n reader.readFully(buffer, 0, length);\n }\n/* for (int i = 0 ; i < length ; i++) {\n System.out.println(buffer[i]);\n }\n */\n return getValueConverter().bytesToValue(buffer, length);\n }", "public static String getLine(InputStreamReader reader) {\n StringBuffer b = new StringBuffer();\n int c;\n try {\n while ((c = reader.read()) != -1 && c != '\\n') {\n if (c != '\\r')\n b.append((char)c);\n }\n } catch (IOException ioe) {\n c = -1;\n }\n\n if (c == -1 && b.length() == 0)\n return null;\n else\n return b.toString();\n }", "private void readObject() {}", "private void readObject() {}", "private void readObject() {}", "private void doRead() throws IOException {\n\t\t\tvar res = sc.read(bb);\n\n\t\t\tif ( res == -1 ) {\n\t\t\t\tlogger.info(\"Connection closed with the client.\");\n\t\t\t\tclosed = true;\n\t\t\t}\n\n\t\t\tupdateInterestOps();\n\t\t}", "@Override\n\tpublic Persona decode(Reader reader) throws DecodeException, IOException {\n\t\tPersona persona = new Persona();\n\t\t\n\t\ttry {\n\t\t\tJSONStringer json = new JSONStringer();\n\t\t\t\n\t\t\tjson.object();\n\t\t\tString codigo = json.key(\"codigo\").value(persona.getCodigo()).toString();\n\t\t\tString nombre = json.key(\"nombre\").value(persona.getNombre()).toString();\n\t\t\tString apellido = json.key(\"apellido\").value(persona.getApellido()).toString();\n\t\t\tString dni = json.key(\"DNI\").value(persona.getDni()).toString();\n\t\t\t\n\t\t\tpersona.setCodigo(codigo);\n\t\t\tpersona.setNombre(nombre);\n\t\t\tpersona.setApellido(apellido);\n\t\t\tpersona.setDni(dni);\n\t\t\treturn persona;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t}", "private static void parseInput(BufferedReader reader) {\n\t\tString line = \"\";\n\t\tField f;\n\t\ttry {\n\t\t\tline = reader.readLine();\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\twhile (line != null) {\n\t\t\tf = Field.parse(line);\n\t\t\tif (dimension < f.getCoords().getX()) {\n\t\t\t\tdimension = f.getCoords().getX();\n\t\t\t}\n\t\t\tmap.put(f.getCoords(), f);\n\t\t\ttry {\n\t\t\t\tline = reader.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\n\tpublic int read() {\n\t\treturn super.read();\n\t}", "E read(K id);", "public T read(JsonReader in) throws IOException {\n\t return null;\n\t }", "public java.io.Reader getReader (URL url) throws java.io.IOException;", "int readFrom(byte[] iStream, int pos, ORecordVersion version);", "public static char[] readReaderContents(Reader reader) throws CoreException {\r\n\t\tCheck.checkArg(reader);\r\n try {\r\n char[] buf = new char[1024];\r\n StringBuffer sb = new StringBuffer();\r\n int len;\r\n while ((len = reader.read(buf)) > 0) {\r\n sb.append(buf, 0, len);\r\n }\r\n reader.close();\r\n return sb.toString().toCharArray();\r\n } catch (UnsupportedEncodingException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n } catch (IOException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n }\r\n\t}", "public Graph load(Reader reader, Graph g) throws IOException\n {\n return load(reader, g, null);\n }", "@Override\r\n\tpublic void read(DataInput in) throws IOException {\n\t\t\r\n\t}", "@Override\n\tpublic void read(InStream inStream) {\n\t}", "public Object parseAndClose(Reader reader, Type dataType) throws IOException {\n return mMapper.readValue(reader, dataType.getClass());\n }", "public void readContent(BinaryDataReader dataReader) throws IOException\n\t{\n\t\t// parse tag data\n\t\tswitch (this.type)\n\t\t{\n\t\tcase BYTE:\n\t\t\tthis.content = Integer.valueOf(value);\n\t\t\tbreak;\n\t\tcase SHORT:\n\t\t\tthis.content = Integer.valueOf(value);\n\t\t\tbreak;\n\t\tcase LONG:\n\t\t\tthis.content = Integer.valueOf(value);\n\t\t\tbreak;\n\t\tcase ASCII:\n\t\t\tthis.content = readAscii(dataReader);\n\t\t\tbreak;\n\t\tcase RATIONAL:\n\t\t\t// convert tag value to long offset for reading large buffer\n\t\t\tthis.content = readRational(dataReader);\n\t\t\tbreak;\n\t\t\t\n\t\tcase UNKNOWN:\n\t\t\tSystem.err.println(\"Could not interpret tag with code: \"\n\t\t\t\t\t+ this.code + \" (\" + this.name + \")\");\n\t\t\tbreak;\n\t\t}\t\t\n\t}", "public void read() {\n\t\tthis.jtfSoundReaderServ = new JtfSoundReaderServ(this.audioFormat, this.targetDataLine);\n\t\tthis.readerThread = new Thread(this.jtfSoundReaderServ);\n\t\tthis.readerThread.start();\n\t}", "void gobble(IReader reader) 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 int read(int i);", "public static String readFully(Reader reader) throws IOException {\n\t\ttry {\n\t\t\tStringWriter writer = new StringWriter();\n\t\t\tchar[] buffer = new char[1024];\n\t\t\tint count;\n\t\t\twhile ((count = reader.read(buffer)) != -1) {\n\t\t\t\twriter.write(buffer, 0, count);\n\t\t\t}\n\t\t\treturn writer.toString();\n\t\t} finally {\n\t\t\treader.close();\n\t\t}\n\t}", "private static void read(int r, int c) throws IOException {\n\t\tinit(r, c);\r\n\t\tfor (int i = 0; i < r; ++ i) {\r\n\t\t\tmapData[ i ] = next();\r\n\t\t}\r\n\t\tint si = nextInt();\r\n\t\tint sj = nextInt();\r\n\t\tint ti = nextInt();\r\n\t\tint tj = nextInt();\r\n\t\t\r\n\t\tastar(r, c, si, sj, ti, tj);\r\n\t\t\r\n//\t\tcin.close();\r\n\t}", "private String[] readLine(BufferedReader r) throws IOException\r\n\t{\r\n\t\tSystem.out.print(\"> \");\r\n\t\tfinal String line = r.readLine();\r\n\t\treturn line != null ? split(line) : null;\r\n\t}", "DataObject loadObject(XMLStreamReader reader) throws XMLStreamException, IllegalStateException;", "void readObject(InputSerializer in) throws java.io.IOException;", "public JournalReader read() {\n return new JournalReader(this);\n }", "public IncludeReader(BufferedReader reader) {\n\t\treaders.push(reader);\n\t\trootUri = null;\n\t\tsetupIncludePath();\n\t}", "public ReaderInputStream(Reader reader) {\n if (reader == null) {\n throw new IllegalArgumentException(\"reader must not be null\");\n }\n in = reader;\n }", "private Product readProduct(JsonReader reader) throws IOException {\n\t\tint id = 0;\n\t\tString name = null;\n\t\tfloat price = (float) 0.0;\n\n\t\treader.beginObject();\n\t\twhile(reader.hasNext()){\n\t\t\tString item = reader.nextName();\n\t\t\tif(item.equals(\"id\")){\n\t\t\t\tid = reader.nextInt();\n\t\t\t}else if(item.equals(\"name\")){\n\t\t\t\tname = reader.nextString();\n\t\t\t}else if(item.equals(\"price\")){\n\t\t\t\tprice = (float) reader.nextDouble();\n\t\t\t}\n\t\t}\n\t\treader.endObject();\n\n\t\treturn new Product(id, name, price);\n\t}", "@Override public int read() throws IOException {\r\n\t\tif (closed) throw new IOException(\"Reader closed\");\r\n\t\tint r = -1;\r\n\t\twhile (r == -1){\r\n\t\t\tReader in = getCurrentReader();\r\n\t\t\tif (in == null){\r\n\t\t\t\tif (doneAddingReaders) return -1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (InterruptedException iox){\r\n\t\t\t\t\tthrow new IOException(\"Interrupted\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr = in.read();\r\n\t\t\t\tif (r == -1) advanceToNextReader();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "public ReaderInputStream(Reader reader, String encoding) {\n this(reader);\n this.encoding = encoding;\n }", "@Override\n\tpublic ReadRecord readItem() throws Exception {\n\t\tif (failimmediate){\n\t\t\tthrow new Exception(\"read fail immediate\");\n\t\t}\n\t\telse {\n\t\t\treturn new ReadRecord();\n\t\t}\n\t}", "@Override\r\n\tprotected T doRead() throws Exception {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif (cursor.hasNext()){\r\n\t\t\treturn converter.convert(cursor.next());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public abstract void readFields(DataInput in) throws IOException;", "private void readObject() {\n }", "private void readEncoding(BufferedReader reader) throws IOException {\n String encoding = reader.readLine();\r\n if ( ! AbstractUtf8Message.UTF8_ENCODING_HEADER_STRING.equals(encoding)) {\r\n throw new IOException(\"Expected UTF-8 header when decoding UTF-8 message\");\r\n }\r\n }" ]
[ "0.77527666", "0.740972", "0.71159947", "0.70808464", "0.7038251", "0.6944839", "0.68925375", "0.65161794", "0.65006804", "0.63660014", "0.6359796", "0.6336665", "0.63311356", "0.6311364", "0.63022745", "0.6293297", "0.6278558", "0.6263555", "0.6253849", "0.6253849", "0.6251402", "0.6235019", "0.61989236", "0.6190826", "0.61884683", "0.6170948", "0.6160716", "0.6157326", "0.61393446", "0.61315507", "0.61288375", "0.6127098", "0.6086306", "0.6069953", "0.6057349", "0.6056943", "0.60550714", "0.6050995", "0.60396034", "0.60396034", "0.6004825", "0.5989261", "0.5966114", "0.59650147", "0.59556973", "0.59403753", "0.5937571", "0.5929546", "0.5929546", "0.59195393", "0.5916392", "0.59154934", "0.59088945", "0.59078187", "0.5905371", "0.590031", "0.5896879", "0.5878407", "0.58680916", "0.5866923", "0.5866797", "0.58610636", "0.58463687", "0.58439887", "0.5842971", "0.5842971", "0.5842971", "0.58368975", "0.583603", "0.5835658", "0.5820065", "0.5819427", "0.5817412", "0.58148164", "0.58135027", "0.580157", "0.5785527", "0.57826465", "0.5781855", "0.57810616", "0.5774837", "0.57543355", "0.57366616", "0.5732384", "0.57287765", "0.5724708", "0.57198805", "0.5715349", "0.57138556", "0.57080185", "0.57057416", "0.56956416", "0.569466", "0.5694613", "0.56871563", "0.5683687", "0.56834674", "0.56789076", "0.56659424", "0.56601995", "0.5657504" ]
0.0
-1
read input stream into a string
public static String streamToText(InputStream stream) { try { return readerToText(new InputStreamReader(stream, AppConventions.CHAR_ENCODING)); } catch (UnsupportedEncodingException e) { logger.error("Error while reading from reader. {}", e.getMessage()); return ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }", "static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}", "private String readStream(InputStream in) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = in.read();\n while(i != -1) {\n bo.write(i);\n i = in.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }", "private String readStream(InputStream in) throws IOException {\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder sb = new StringBuilder();\n String line;\n\n // Reads every line and stores them in sb.\n while((line = r.readLine()) != null) {\n sb.append(line);\n }\n\n // Closes the input stream.\n in.close();\n\n return sb.toString();\n }", "private static String readIt(InputStream stream) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(stream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return sb.toString();\n\t}", "private String readStream(InputStream is) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = is.read();\n while(i != -1) {\n bo.write(i);\n i = is.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }", "public static String loadStream(InputStream in) throws IOException {\r\n\t\tInputStream is = in;\r\n\t\tint ptr = 0;\r\n\t\tis = new BufferedInputStream(is);\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\ttry {\r\n\t\t\twhile ((ptr = is.read()) != -1) {\r\n\t\t\t\tbuffer.append((char) ptr);\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\t\treturn buffer.toString();\r\n\t}", "private static String read(InputStream in) throws IOException {\n StringBuilder builder = new StringBuilder();\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String line = null;\n while ((line = reader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n }", "public String readString() throws IOException {\n return WritableUtils.readString(in);\n }", "public static String readString(InputStream is) throws IOException {\n return readString(is, DEFAULT_ENCODING);\n }", "private static String ioStr(InputStream in) throws IOException {\n\t\t// Read input\n\t\tString str = new String();\n\t\tString next = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\twhile ((next = reader.readLine()) != null) {\n\t\t\tstr += next + \"\\n\";\n\t\t}\n\t\tin.close();\n\n\t\t// Convert result accordingly\n\t\tif (str.length() > 1) {\n\t\t\treturn str.substring(0, str.length() - 1);\n\t\t}\n\t\treturn str;\n\t}", "private String inputStreamToString(InputStream is) {\n Scanner scanner = new Scanner(is);\n Scanner tokenizer = scanner.useDelimiter(\"\\\\A\");\n String str = tokenizer.hasNext() ? tokenizer.next() : \"\";\n scanner.close();\n return str;\n }", "private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }", "String readString();", "private String read(InputStream in) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(in), 1000);\n for (String line = r.readLine(); line != null; line = r.readLine()) {\n sb.append(line);\n }\n in.close();\n return sb.toString();\n }", "private String _read(InputStream in, String enc) throws IOException\n {\n int ptr = 0;\n int count;\n \n while ((count = in.read(_readBuffer, ptr, _readBuffer.length - ptr)) > 0) {\n ptr += count;\n // buffer full? Need to realloc\n if (ptr == _readBuffer.length) {\n _readBuffer = Arrays.copyOf(_readBuffer, ptr + ptr);\n }\n }\n \n return new String(_readBuffer, 0, ptr, enc);\n }", "static String convertStreamToString(java.io.InputStream is) {\n java.util.Scanner s = new java.util.Scanner(is).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }", "static String convertStreamToString(java.io.InputStream is) {\n java.util.Scanner s = new java.util.Scanner(is).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }", "private String read() {\n\n String s = \"\";\n\n try {\n // Check if there are bytes available\n if (inStream.available() > 0) {\n\n // Read bytes into a buffer\n byte[] inBuffer = new byte[1024];\n int bytesRead = inStream.read(inBuffer);\n\n // Convert read bytes into a string\n s = new String(inBuffer, \"ASCII\");\n s = s.substring(0, bytesRead);\n }\n\n } catch (Exception e) {\n Log.e(TAG, \"Read failed!\", e);\n }\n\n return s;\n }", "String read();", "String read();", "public static String read(InputStream in) throws IOException {\n\t\tStringBuilder result = new StringBuilder();\n\t try {\n\t byte[] buf = new byte[1024]; int r = 0;\n\t while ((r = in.read(buf)) != -1) {result.append(new String(buf, 0, r));}\n\t } finally { in.close();}\n\t\tString text=result.toString();\n\t\treturn text;\n\t}", "public static String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(stream));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return sb.toString();\n }", "private String readString( InputStream stream ) throws IOException {\n char delimiter = (char) stream.read();\n buffer = new StringBuffer();\n while ( true ) {\n int c = stream.read();\n if ( c == delimiter ) {\n break;\n }\n else {\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n throw new TableFormatException(\n \"End of line within a string literal\" );\n case '\\\\':\n buffer.append( (char) stream.read() );\n break;\n case END:\n throw new TableFormatException(\n \"End of file within a string literal\" );\n default:\n buffer.append( (char) c );\n }\n }\n }\n return buffer.toString();\n }", "public String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {\n Reader reader = null;\n reader = new InputStreamReader(stream, \"UTF-8\");\n char[] buffer = new char[len];\n reader.read(buffer);\n return new String(buffer);\n }", "public static String readString() {\n return in.nextLine();\n }", "private static String readStr(InputStream stream, int length, boolean allowEof) throws IOException {\n byte[] b = new byte[length];\n int readBytes = stream.read(b);\n if (readBytes != length && !(allowEof && length == 0)) {\n throw new EOFException(\"Unexpected end of steam. Read bytes \" + readBytes + \"; required \" + length);\n }\n\n return new String(b, ENCODING);\n }", "private static String getStringFromInputStream(InputStream is) {\r\n\r\n BufferedReader br = null;\r\n StringBuilder sb = new StringBuilder();\r\n\r\n String line;\r\n try {\r\n\r\n br = new BufferedReader(new InputStreamReader(is));\r\n while ((line = br.readLine()) != null) {\r\n sb.append(line);\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n if (br != null) {\r\n try {\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n return sb.toString();\r\n\r\n }", "public static String read(InputStream input) throws Exception {\r\n\t\treader.setInput(input);\r\n\t\treader.setCharset(\"UTF-8\");\r\n\t\treturn reader.read();\r\n\t}", "private String streamToString(InputStream is) throws IOException {\n String str = \"\";\n \n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n \n try {\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is));\n \n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n \n reader.close();\n } finally {\n is.close();\n }\n \n str = sb.toString();\n }\n \n return str;\n }", "private static String readFromStream(InputStream inputStream) throws IOException {\n\n // Create a new empty string builder\n StringBuilder stringBuilder = new StringBuilder();\n\n // Create a bufferedReader that reads from the inputStream param\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream,\n Charset.forName(\"UTF-8\")));\n\n // Create a string that is one line of the buffered reader\n String line = bufferedReader.readLine();\n\n while (line != null) {\n // Add line to stringBuilder\n stringBuilder.append(line);\n\n // Set line to the next line in buffered reader\n line = bufferedReader.readLine();\n }\n\n // Return string builder as a string\n return stringBuilder.toString();\n }", "private static String readFromStream(InputStream inputStream) throws IOException {\n StringBuilder output = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"));\n BufferedReader reader = new BufferedReader(inputStreamReader);\n String line = reader.readLine();\n while (line != null) {\n output.append(line);\n line = reader.readLine();\n }\n }\n return output.toString();\n }", "private String convertStreamToString(InputStream is) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder builder = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n }\n return builder.toString();\n }", "public String getStringFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n } finally {\n try {\n br.close();\n } catch (Exception e) {\n }\n br = null;\n return sb.toString();\n }\n }", "public String readString() {\n byte[] byteForStream = new byte[1024];\n String message = \"\";\n\n mListener.onCarRunning();\n\n\n int bytes;\n\n while (true) {\n try {\n bytes = mInputStream.read(byteForStream);\n message = new String(byteForStream, 0, bytes);\n Log.d(TAG, \" Read from inputstream \" + message);\n\n } catch (IOException e) {\n Log.e(TAG, \" error reading from inputstream \" + e.getMessage());\n break;\n }\n }\n return message;\n }", "public static String readIt(InputStream is) throws IOException {\n BufferedReader reader = null;\n reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n StringBuilder responseStrBuilder = new StringBuilder();\n String inputStr;\n while ((inputStr = reader.readLine()) != null) {\n responseStrBuilder.append(inputStr);\n }\n return responseStrBuilder.toString();\n }", "public String readString() {\n final int BUF_SIZE = 100;\n byte[] byteDest = new byte[BUF_SIZE];\n String ret = \"\";\n int num = BUF_SIZE;\n try {\n while (!ret.contains(\"\\r\")) {\n if ((num = in.read(byteDest)) > 0) {\n ret += new String(byteDest, 0, num);\n }\n }\n } catch (IOException e) {\n print(\"Error reading String from \" + portName);\n }\n print(\"Read :\" + ret + \":\");\n return ret;\n }", "public static String convertStreamToString(InputStream is) {\n java.util.Scanner s = new java.util.Scanner(is).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }", "private String readIt(InputStream stream) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(stream, \"iso-8859-1\"), 128);\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n return sb.toString();\n }", "public String readStream(InputStream in) {\n BufferedReader reader = null;\n StringBuffer data = new StringBuffer(\"\");\n try {\n reader = new BufferedReader(new InputStreamReader(in));\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n data.append(line);\n }\n } catch (IOException e) {\n Log.e(\"Log\", \"IOException\");\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return data.toString();\n }", "public String read();", "private static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is), 8192);\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return sb.toString();\n }", "private static String readStream(InputStream is, String charsetName) throws UnsupportedEncodingException, IOException {\r\n StringBuffer sb = new StringBuffer();\r\n byte[] buffer = new byte[1024];\r\n int length = 0;\r\n while ((length = is.read(buffer)) != -1) {\r\n sb.append(new String(buffer, 0, length, charsetName));\r\n }\r\n return sb.toString();\r\n }", "private String readString(InputStream in) throws IOException {\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in, \"iso-8859-1\"));\r\n\t\tString inputLine;\r\n\t\tStringBuffer response = new StringBuffer();\r\n\t\twhile ((inputLine = reader.readLine()) != null) {\r\n\t\t\tresponse.append(inputLine);\r\n\t\t}\r\n\t\tin.close();\r\n\t\treturn response.toString();\r\n\t}", "public static String ReadData(InputStream input) throws IOException {\n BufferedReader reader = new BufferedReader(new\n InputStreamReader(input));\n StringBuilder builder = new StringBuilder();\n while (true) {\n String line = reader.readLine();\n if(line == null) {\n break;\n }\n\n builder.append(line);\n }\n\n return builder.toString();\n }", "public static String readString(InputStream is) {\r\n \t\tif (is == null)\r\n \t\t\treturn null;\r\n \t\tBufferedReader reader= null;\r\n \t\ttry {\r\n \t\t\tStringBuffer buffer= new StringBuffer();\r\n \t\t\tchar[] part= new char[2048];\r\n \t\t\tint read= 0;\r\n \t\t\treader= new BufferedReader(new InputStreamReader(is));\r\n \r\n \t\t\twhile ((read= reader.read(part)) != -1)\r\n \t\t\t\tbuffer.append(part, 0, read);\r\n \t\t\t\r\n \t\t\treturn buffer.toString();\r\n \t\t\t\r\n \t\t} catch (IOException ex) {\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\ttry {\r\n \t\t\t\t\treader.close();\r\n \t\t\t\t} catch (IOException ex) {\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public static String getStringFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return sb.toString();\n }", "public static String convertStreamToString(InputStream is) {\n String line = \"\";\n StringBuilder total = new StringBuilder();\n BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n try {\n while ((line = rd.readLine()) != null) {\n total.append(line);\n }\n } catch (Exception e) {\n\n }\n return total.toString();\n }", "private String stringFromInputStream(InputStream instream) throws IOException {\n StringBuilder sb = new StringBuilder(\"\");\n if (instream == null) {\n logger.warn(\"Input stream is null.\");\n return sb.toString();\n }\n BufferedReader bufreader = new BufferedReader(new InputStreamReader(instream));\n String line = \"\";\n while ((line = bufreader.readLine()) != null) {\n sb.append(line);\n sb.append(LINE_SEPARATOR);\n }\n return sb.toString();\n }", "@NonNull\n public static String getStringFrom(InputStream inputStream) {\n StringBuffer dataStringBuffer = new StringBuffer(\"\");\n try {\n InputStreamReader isr = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(isr);\n String readString = bufferedReader.readLine();\n while (readString != null) {\n dataStringBuffer.append(readString);\n readString = bufferedReader.readLine();\n }\n isr.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n return dataStringBuffer.toString();\n }", "public static String read(Reader in) throws IOException {\n\t\tStringBuilder result = new StringBuilder();\n\t try {\n\t \tchar[] buf = new char[1024]; int r = 0;\n\t while ((r = in.read(buf)) != -1) {result.append(new String(buf, 0, r));}\n\t } finally { in.close();}\n\t\tString text=result.toString();\n\t\treturn text;\n\t}", "public static String GetStringFromInputStream(InputStream is) {\n\t\tString line;\n\t\tStringBuilder total = new StringBuilder();\n\n\t\t// Wrap a BufferedReader around the InputStream\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is));\n\n\t\t// Read response until the end\n\t\ttry {\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\ttotal.append(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tis.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tUtilities\n\t\t\t\t\t\t.LogWarning(\"GetStringFromInputStream - could not close stream\");\n\t\t\t}\n\t\t}\n\n\t\t// Return full string\n\t\treturn total.toString();\n\t}", "private String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line).append('\\n');\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "public static String readString(){\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "public String readString() throws IOException {\n checkOpened();\n return dis.readUTF();\n }", "private static String readFromStream(InputStream inputStream) {\n StringBuilder outputString = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"));\n BufferedReader reader = new BufferedReader(inputStreamReader);\n try {\n String line = reader.readLine();\n while (line != null) {\n outputString.append(line);\n line = reader.readLine();\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error reading line from reader, readFromStream() block\", e);\n }\n }\n return outputString.toString();\n }", "private static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "public static String readFileFromInputStream(final InputStream is) throws IOException\n\t{\n\t\tfinal BufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tis, FILE_CHARSET_NAME));\n\t\ttry\n\t\t{\n\t\t\tfinal StringBuilder contents = new StringBuilder(BUFFER_SIZE);\n\n\t\t\t// copy from input stream\n\t\t\tfinal char[] charBuffer = new char[BUFFER_SIZE];\n\t\t\tint len;\n\t\t\twhile ((len = input.read(charBuffer)) > 0)\n\t\t\t{\n\t\t\t\tcontents.append(charBuffer, 0, len);\n\t\t\t}\n\n\t\t\treturn contents.toString().replaceAll(\"\\r\\n\", \"\\n\");\n\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tinput.close();\n\t\t}\n\t}", "public static String convertStreamToString(InputStream is) {\n if (is == null) return null;\n Scanner s = new Scanner(is, \"UTF-8\").useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }", "protected String readUnicodeInputStream(InputStream in) throws IOException {\n\t\tUnicodeReader reader = new UnicodeReader(in, null);\n\t\tString data = FileCopyUtils.copyToString(reader);\n\t\treader.close();\n\t\treturn data;\n\t}", "private String readInput(java.net.Socket socket) throws IOException {\n BufferedReader bufferedReader =\n new BufferedReader(\n new InputStreamReader(\n socket.getInputStream()));\n char[] buffer = new char[700];\n int charCount = bufferedReader.read(buffer, 0, 700);\n String input = new String(buffer, 0, charCount);\n return input;\n }", "private static String convertInputStreamToString(InputStream inputStream) throws IOException{\n BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));\n String line = \"\";\n String result = \"\";\n while((line = bufferedReader.readLine()) != null)\n result += line;\n\n inputStream.close();\n return result;\n\n }", "public String convertStreamToString(InputStream is) {\n try {\n if (is != null) {\n Writer writer = new StringWriter();\n\n char[] buffer = new char[1024];\n try {\n Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n int n;\n while ((n = reader.read(buffer)) != -1) {\n writer.write(buffer, 0, n);\n }\n } finally {\n is.close();\n }\n return writer.toString();\n } else {\n return \"\";\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Did not expect this one...\", e);\n }\n }", "private static String convertStreamToString(InputStream is) {\r\n\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tsb.append(line + \"\\n\");\r\n\t\t\t}\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\tis.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "private static String convertStreamToString(InputStream is)\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try\n {\n while ((line = reader.readLine()) != null)\n {\n sb.append(line + \"\\n\");\n }\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n is.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n System.out.println(sb.toString());\n return sb.toString();\n }", "public static String convertStreamToString(InputStream inputStream) {\n\n String result = \"\";\n try {\n\n Scanner scanner = new Scanner(inputStream, \"UTF-8\").useDelimiter(\"\\\\A\");\n if (scanner.hasNext()) {\n result = scanner.next();\n }\n inputStream.close();\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n return result;\n }", "private synchronized String readString(int len) throws IOException {\n\t\tread(bytes, len);\n\t\treturn readString(bytes, 0, len);\n\t}", "public static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n \n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "public static String readFile(InputStream in) throws IOException {\n final StringBuffer sBuffer = new StringBuffer();\n final BufferedReader br = new BufferedReader(new InputStreamReader(in));\n final char[] buffer = new char[1024];\n\n int cnt;\n while ((cnt = br.read(buffer, 0, buffer.length)) > -1) {\n sBuffer.append(buffer, 0, cnt);\n }\n br.close();\n in.close();\n return sBuffer.toString();\n }", "private static String convertStreamToString(InputStream is) {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t sb.append(line + \"\\n\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n try {\n\t\t\tis.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n return sb.toString();\n \n }", "private static String convertInputStreamToString(InputStream inputStream) throws IOException {\n BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));\n String line = \"\";\n String result = \"\";\n while((line = bufferedReader.readLine()) != null)\n result += line;\n\n inputStream.close();\n return result;\n\n }", "protected String readString(DataInput in) throws IOException {\n if (in.readBoolean())\n return (in.readUTF());\n return null;\n }", "public String StreamToString(InputStream is) {\r\n //Creamos el Buffer\r\n BufferedReader reader =\r\n new BufferedReader(new InputStreamReader(is));\r\n StringBuilder sb = new StringBuilder();\r\n String line = null;\r\n try {\r\n //Bucle para leer todas las líneas\r\n //En este ejemplo al ser solo 1 la respuesta\r\n //Pues no haría falta\r\n while((line = reader.readLine())!=null){\r\n sb.append(line);\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n try {\r\n is.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n //retornamos el codigo límpio\r\n return sb.toString();\r\n }", "private String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n String line;\n try {\n // building the string\n while ((line = reader.readLine()) != null) {\n sb.append(line).append('\\n');\n }\n } catch (IOException e) {\n // error occurred in the inputstream\n Log.e(TAG, \"IOException: \" + e.getMessage());\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n // error occurred closing input stream\n Log.e(TAG, \"IOException: \" + e.getMessage());\n }\n }\n return sb.toString();\n }", "private static StringBuilder receiveInputStream(InputStream input) throws IOException{\r\n\t\tStringBuilder response = new StringBuilder();\r\n\t\tint i;\r\n\t\twhile((i = input.read())!= -1){//stock the inputstream\r\n\t\t\tresponse.append((char)i); \r\n\t\t}\r\n\t\treturn response;\r\n\t}", "private String getTextLineFromStream( InputStream is ) throws IOException {\n StringBuffer buffer = new StringBuffer();\n int b;\n\n \twhile( (b = is.read()) != -1 && b != (int) '\\n' ) {\n \t\tbuffer.append( (char) b );\n \t}\n \treturn buffer.toString().trim();\n }", "public static String streamToString(InputStream is) throws IOException {\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n } finally {\n is.close();\n }\n return sb.toString();\n } else {\n return \"\";\n }\n\t}", "public static String decodeToString(InputStream in) throws IOException {\n\t\treturn new String(decodeToBytes(in));\n\t}", "public static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n try {\n is.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "public static String inputStreamToString(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n\n return null;\n\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return sb.toString();\n\n }", "private static String convertInputStreamToString(InputStream inputStream) throws IOException{\t\t\t\t\t\t\t\t\t\n\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\t\t\t\t\t\t\t\t\t\n\t\tString line = \"\";\t\t\t\t\t\t\t\t\t\n\t\tString result = \"\";\t\t\t\t\t\t\t\t\t\n\t\twhile((line = bufferedReader.readLine()) != null)\t{\t\t\t\t\t\t\t\t\n\t\t\tresult += line;\t\t\t\t\t\t\t\t\n\t\t}\t\t\t\t\t\t\t\t\t\n\n\t\tinputStream.close();\t\t\t\t\t\t\t\t\t\n\t\treturn result;\t\t\t\t\t\t\t\t\t\n\t}", "private static String convertStreamToString(InputStream is) {\n\t\tInputStreamReader isr = new InputStreamReader(is);\n BufferedReader reader = new BufferedReader(isr);\n StringBuilder sb = new StringBuilder();\n \n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n \tLog.e(TAG, e.getMessage(), e);\n } finally {\n try {\n reader.close();\n } catch (IOException e) {\n \tLog.w(TAG, e.getMessage(), e);\n }\n \n try {\n isr.close();\n } catch (IOException e) {\n \tLog.w(TAG, e.getMessage(), e);\n }\n }\n \n return sb.toString();\n }", "static String slurp(InputStream stream) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line).append(System.lineSeparator());\n }\n br.close();\n return sb.toString();\n }", "public static String readFromInputStream(InputStream inputStream) throws IOException {\n StringBuilder streamOutput = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset\n .forName(\"UTF-8\"));\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String line = bufferedReader.readLine();\n while (line != null) {\n streamOutput.append(line);\n line = bufferedReader.readLine();\n }\n }\n return streamOutput.toString();\n }", "private StringBuilder inputStreamToString(InputStream is) {\n \t String line = \"\";\n \t StringBuilder total = new StringBuilder();\n \t \n \t // Wrap a BufferedReader around the InputStream\n \t BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n \n \t // Read response until the end\n \t try {\n \t\t\twhile ((line = rd.readLine()) != null) { \n \t\t\t total.append(line); \n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t \n \t // Return full string\n \t return total;\n \t}", "private String convertStreamToString(InputStream is) throws IOException {\r\n\t\tint bufSize = 8 * 1024;\r\n\t\tif (is != null) {\r\n\t\t\tWriter writer = new StringWriter();\r\n\r\n\t\t\tchar[] buffer = new char[bufSize];\r\n\t\t\ttry {\r\n\t\t\t\tInputStreamReader ireader = new InputStreamReader(is, \"UTF-8\");\r\n\t\t\t\tReader reader = new BufferedReader(ireader, bufSize);\r\n\t\t\t\tint n;\r\n\t\t\t\twhile ((n = reader.read(buffer)) != -1) {\r\n\t\t\t\t\twriter.write(buffer, 0, n);\r\n\t\t\t\t}\r\n\t\t\t\treader.close();\r\n\t\t\t\tireader.close();\r\n\t\t\t\treturn writer.toString();\r\n\t\t\t} catch (OutOfMemoryError ex) {\r\n\t\t\t\tLog.e(\"b2evo_android\", \"Convert Stream: (out of memory)\");\r\n\t\t\t\twriter.close();\r\n\t\t\t\twriter = null;\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"\";\r\n\t\t\t} finally {\r\n\t\t\t\tis.close();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "protected static String convertStreamToString(InputStream is) {\r\n /*\r\n * To convert the InputStream to String we use the BufferedReader.readLine()\r\n * method. We iterate until the BufferedReader return null which means\r\n * there's no more data to read. Each line will appended to a StringBuilder\r\n * and returned as String.\r\n */\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n StringBuilder sb = new StringBuilder();\r\n \r\n String line = null;\r\n try {\r\n while ((line = reader.readLine()) != null) {\r\n sb.append(line + \"\\n\");\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n try {\r\n is.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n \r\n return sb.toString();\r\n }", "public static String convertStreamToString(InputStream is) throws IOException {\r\n\t\tif (is != null) {\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\tString line;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\r\n\t\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\t\tsb.append(line).append(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t} finally {\r\n\t\t\t\tis.close();\r\n\t\t\t}\r\n\t\t\treturn sb.toString();\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "protected String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n log.info(sb.toString());\n return sb.toString();\n }", "public static String inputStreamToString(InputStream in) {\r\n StringBuffer buffer = new StringBuffer();\r\n try {\r\n BufferedReader br = new BufferedReader(new InputStreamReader(in,\r\n \"UTF-8\"), 1024);\r\n String line;\r\n while ((line = br.readLine()) != null) {\r\n buffer.append(line);\r\n }\r\n } catch (IOException iox) {\r\n LOGR.warning(iox.getMessage());\r\n }\r\n return buffer.toString();\r\n }", "static String readString() throws IOException{\n return bufferedReader.readLine();\n }", "public static String from(Readable in) throws IOException {\n StringWriter out = new StringWriter();\n CharStreams.copy(in, out);\n return out.toString();\n }", "public static String convertStreamToString(InputStream is) throws Exception {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n reader.close();\n return sb.toString();\n }", "public abstract InputStream openStream(String str);", "public String readUTF() throws IOException;", "private static String convertStreamToString(InputStream inputStream) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n reader.close();\n return sb.toString();\n }", "public static String convertInputStreamToString(InputStream is)\n throws IOException {\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n try {\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is, UtilsConstants.UTF_8));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(UtilsConstants.LINE_SEPARATOR);\n }\n } finally {\n is.close();\n }\n return sb.toString();\n } else {\n return \"\";\n }\n }", "private static String stringFromInputStream(InputStream inIS) {\n\n if (inIS == null) {\n return null;\n }\n StringBuffer outBuffer = new StringBuffer();\n InputStreamReader isr = null;\n BufferedReader input = null;\n try {\n String line = null;\n isr = new InputStreamReader(inIS);\n input = new BufferedReader(isr);\n while ((line = input.readLine()) != null) {\n if (line.indexOf(\"//\") == -1) {\n outBuffer.append(line);\n outBuffer.append(System.getProperty(\"line.separator\"));\n }\n }\n } catch (IOException ioe) {\n log.error(\"Unable to read from InputStream or write to output buffer\");\n ioe.printStackTrace();\n outBuffer = null;\n }\n try {\n isr.close();\n input.close();\n inIS.close();\n } catch (IOException ioe) {\n log.error(\"InputStream could not be closed\");\n ioe.printStackTrace();\n }\n if (outBuffer == null) {\n return null;\n } else {\n return outBuffer.toString();\n }\n\n }", "public static String acceptString() {\n\t\tString stringData = null;\r\n\t\tBufferedReader input = null;\r\n\t\ttry {\r\n\t\t\t// chaining the streams\r\n\t\t\tinput = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\t\t// reading data from the reader\r\n\t\t\tstringData = input.readLine();\r\n\t\t} catch (IOException ioException) {\r\n\t\t\tSystem.out.println(\"Error in accepting data.\");\r\n\t\t} finally {\r\n\t\t\tinput = null;\r\n\t\t}\r\n\t\treturn stringData;\r\n\t}", "protected String convertStreamToString(InputStream is, String charset) {\n\t\tScanner s = new Scanner(is, charset);\n\t\ttry {\n\t\t\ts.useDelimiter(\"\\\\A\");\n\t\t\treturn s.hasNext() ? s.next() : \"\";\n\t\t} finally {\n\t\t\ts.close();\n\t\t}\n\t}" ]
[ "0.7962911", "0.783678", "0.7833194", "0.75876534", "0.7585936", "0.7584581", "0.75127864", "0.74981433", "0.74932134", "0.748034", "0.7453357", "0.7373577", "0.7359161", "0.72948086", "0.7293387", "0.7287817", "0.7264337", "0.7264337", "0.7251058", "0.7245696", "0.7245696", "0.7244452", "0.7242046", "0.72302836", "0.72235036", "0.71937037", "0.7183559", "0.71529585", "0.7143794", "0.71395767", "0.7133693", "0.71334696", "0.7131215", "0.7122613", "0.7113849", "0.7112694", "0.7100233", "0.7062847", "0.70559806", "0.70543015", "0.70466256", "0.70158017", "0.701414", "0.70041615", "0.699867", "0.6958581", "0.6937597", "0.6923535", "0.6910991", "0.69000703", "0.68998754", "0.6872631", "0.68586177", "0.6857146", "0.6853021", "0.68355185", "0.680775", "0.679761", "0.6788893", "0.6786948", "0.6782773", "0.678133", "0.67617756", "0.67590946", "0.67483056", "0.6746686", "0.6739492", "0.67358166", "0.67346984", "0.6730389", "0.67289543", "0.6710004", "0.6701944", "0.6701631", "0.6699674", "0.66912043", "0.6690186", "0.66901034", "0.6655776", "0.6651739", "0.6647684", "0.6631636", "0.66255647", "0.66211563", "0.6619711", "0.66029996", "0.6601737", "0.6599421", "0.65903825", "0.65873516", "0.6578054", "0.65623987", "0.6550315", "0.65498024", "0.65391654", "0.65321213", "0.6518476", "0.6505158", "0.65013885", "0.649775", "0.6496816" ]
0.0
-1
read a resource into text
public static String readResource(String fileOrResourceName) { try (InputStream stream = getStream(fileOrResourceName)) { if (stream != null) { return readerToText(new InputStreamReader(stream, AppConventions.CHAR_ENCODING)); } } catch (Exception e) { logger.error("Exception while reading resource {} using. Error: {}", fileOrResourceName, e.getMessage()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String readResource(String name) throws IOException {\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n try (InputStream in = cl.getResourceAsStream(name)) {\n return new String(EncodingUtils.readAll(in), StandardCharsets.US_ASCII);\n }\n }", "public static String readString(String resource) {\n byte[]\tbytes;\n\n bytes = readBytes(resource);\n if (bytes == null)\n return null;\n\n try {\n return new String(bytes);\n }\n catch (Exception e) {\n LOGGER.log(Level.SEVERE, \"Failed to read string from resource file: \" + resource, e);\n return null;\n }\n }", "public String readResource(String resourcePath) throws IOException {\n InputStream resourceStream = this.getClass().getResourceAsStream(resourcePath);\n StringBuilder builder = new StringBuilder();\n int ch;\n while ((ch = resourceStream.read()) != -1) {\n builder.append((char) ch);\n }\n return builder.toString();\n }", "private static String p_readFromResource(String path) {\n StringBuffer content = new StringBuffer();\n\n InputStream istream = NamedTemplate.class.getResourceAsStream(path);\n\n if (istream != null) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(istream));\n\n try {\n String line = reader.readLine();\n while (line != null) {\n content.append(line).append(\"\\n\");\n\n line = reader.readLine();\n }\n } catch (IOException e) {\n logger.error(\"NamedTemplate: unable to read template from \" + path, e);\n }\n } else {\n return null;\n }\n\n return content.toString();\n }", "private String readLicenseFromRawResource(int resourceid) {\n String license = \"\";\n BufferedReader in = new BufferedReader(new InputStreamReader(getResources().openRawResource(resourceid)));\n StringBuilder sb = new StringBuilder();\n try {\n while (true) {\n String line = in.readLine();\n if (line == null) {\n return sb.toString();\n }\n if (TextUtils.isEmpty(line)) {\n sb.append(\"\\n\\n\");\n } else {\n sb.append(line);\n sb.append(\" \");\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n return license;\n }\n }", "@Override\n public String getContent() throws FileNotFound, CannotReadFile\n {\n Reader input = null;\n try\n {\n input = new InputStreamReader(resource.openStream());\n String content = IOUtils.toString(input).replace(\"\\r\\n\", \"\\n\");\n\n return content;\n } catch (FileNotFoundException ex)\n {\n throw new FileNotFound();\n } catch (IOException ex)\n {\n throw new CannotReadFile();\n } finally\n {\n InternalUtils.close(input);\n }\n }", "abstract public String asString(final A resource);", "public static String readTemplate(Class c, String resourceName)\n {\n InputStream stream = c.getResourceAsStream(resourceName);\n Scanner sc = new Scanner(stream);\n String text = sc.useDelimiter(\"\\\\A\").next();\n sc.close();\n try {\n stream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return text;\n }", "public String loadTextFile(String path) throws IOException {\n File file = new File(path);\n\n // Convert the file to a string.\n String output;\n try {\n output = Files.toString(file, Charsets.UTF_8);\n } catch (IOException ex) {\n LoggerFactory.getLogger(Resources.class).error(\"Unable to locate the resource at \" + path + \".\", ex);\n throw ex;\n }\n\n return output;\n }", "String encodeResourceToString(IBaseResource theResource) throws DataFormatException;", "private String getStringFromResource(String resourcePath) {\n String str = \"\";\n ClassLoader classloader = getClass().getClassLoader();\n if (classloader == null) {\n return str;\n }\n if (logger.isTraceEnabled()) {\n URL resourceurl = classloader.getResource(resourcePath);\n logger.trace(\"URL=\" + resourceurl.toString());\n }\n InputStream instream = classloader.getResourceAsStream(resourcePath);\n if (instream == null) {\n logger.warn(\"Could not read resource from path \" + resourcePath);\n return null;\n }\n try {\n str = stringFromInputStream(instream);\n } catch (IOException ioe) {\n logger.warn(\"Could not create string from stream: \", ioe);\n return null;\n }\n return str;\n }", "static String readResource(String name) throws IOException {\n InputStream is = Server.class.getResourceAsStream(name);\n String value = new Scanner(is).useDelimiter(\"\\\\A\").next();\n is.close();\n return value;\n }", "public static String getFileInput( String resource ){\t\n\t\tString input = new String();\n\t\t\n\t\ttry { // try to catch all errors\n\t\t\t// get file path to resource\n\t\t\tString resourcePath = getResourcePath( resource );\n\t\t\t\n\t\t\t// create path object to file\n\t\t\tPath path = FileSystems.getDefault().getPath( resourcePath );\n\t\t\t\n\t\t\t// read all lines use java-7-Files to read in an efficient way\n\t\t\tList<String> inputLines = Files.readAllLines( path, Charsets.UTF_8 );\n\t\t\t\n\t\t\t// organize lines into string\n\t\t\tfor ( String line : inputLines ) {\n\t\t\t\tinput += line + \"\\n\";\n\t\t\t}\n\t\t} catch ( IllegalArgumentException iae ) { // cannot found file\n\t\t\tSystem.err.println( \"No resources found at: \" + resource );\n\t\t\tiae.printStackTrace();\n\t\t} catch ( IllegalStateException ise ) { // cannot walk through directory tree\n\t\t\tSystem.err.println( \"Cannot get resources from: \" + resource );\n\t\t\tSystem.err.println();\n\t\t\tise.printStackTrace();\n\t\t} catch ( SecurityException se ) { // absence of rights to read from file\n\t\t\tSystem.err.println( \"You need the rights to read from file: \" + resource );\n\t\t\tSystem.err.println();\n\t\t\tse.printStackTrace();\n\t\t} catch ( IOException ioe ) { // cannot read from file\n\t\t\tSystem.err.println( \"An error has occurred. Cannot read from file: \" + resource );\n\t\t\tSystem.err.println();\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\t\n\t\t// return input\n\t\treturn input;\n\t}", "String getResource();", "String read();", "String read();", "Resource getResource();", "public String read();", "private static String readResource(String resource) {\n String sresults = \"\";\n String sparql = \"SELECT DISTINCT *\\n\"\n + \"WHERE {\\n\"\n + \" GRAPH ?g {\\n\"\n + \" <\" + resource + \"> ?p ?o\\n\"\n + \" }\\n\"\n + \"}\";\n\n Query query = QueryFactory.create(sparql);\n String endpoint = \"http://localhost:3030/RDFChess/query\";\n QueryExecution qexec = QueryExecutionFactory.sparqlService(endpoint, query);\n// QueryExecution qexec = QueryExecutionFactory.create(query, model);\n ResultSet results = qexec.execSelect();\n for (; results.hasNext();) {\n QuerySolution soln = results.nextSolution();\n Resource p = soln.getResource(\"p\"); // Get a result variable by name.\n RDFNode o = soln.get(\"o\"); // Get a result variable - must be a resource\n String so = \"\";\n if (o.isLiteral()) {\n so = \"\\\"\" + o.toString() + \"\\\"\";\n } else {\n so = \"<\" + o.toString() + \">\";\n }\n\n sresults += \"<\" + resource + \"> <\" + p.toString() + \"> \" + so + \" . \\n\";\n }\n\n return sresults;\n }", "protected abstract InputStream getStream(String resource);", "private String readRawTextFile(int resId) {\r\n InputStream inputStream = main.getResources().openRawResource(resId);\r\n try {\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\r\n StringBuilder sb = new StringBuilder();\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n sb.append(line).append(\"\\n\");\r\n }\r\n reader.close();\r\n return sb.toString();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "CharSequence getResourceText(int ident) {\n\t\tTypedValue tmpValue = mValue;\n\t\tint block = loadResourceValue(ident, tmpValue, true);\n\t\tif (block >= 0) {\n\t\t\tif (tmpValue.type == TypedValue.TYPE_STRING) {\n\t\t\t\treturn mStringBlocks[block].get(tmpValue.data);\n\t\t\t}\n\t\t\treturn tmpValue.coerceToString();\n\t\t}\n\t\treturn null;\n\t}", "public static String getRawResource(Context context, int resource) {\n String res = null;\n InputStream is = context.getResources().openRawResource(resource);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n byte[] b = new byte[1];\n try {\n while (is.read(b) != -1) {\n baos.write(b);\n }\n ;\n res = baos.toString();\n is.close();\n baos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return res;\n }", "private void get_text() {\n InputStream inputStream = JsonUtil.class.getClassLoader().getResourceAsStream(\"data.txt\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n this.text = sb.toString().trim();\n }", "public static @CheckForNull\n StringBuffer readResource(IFile resource) {\n\ttry {\n\t String stringFromReader = IOUtils.toString(resource.getContents(), resource.getCharset());\n\t return new StringBuffer(stringFromReader);\n\t} catch (IOException e) {\n\t logger.error(\"Failed to read resource.\", e);\n\t} catch (CoreException e) {\n\t logger.error(\"Failed to obtain content of specified resource.\", e);\n\t}\n\treturn null;\n }", "String readText(FsPath path);", "String readString();", "private static String extractSFTextFromFile(InputStream resourceText,\n\t\t\tFormStackInfo info, String caseNum) throws IOException {\n\t\tInputStreamReader isr = new InputStreamReader(resourceText);\n\t\tBufferedReader reader = new BufferedReader(isr);\n\t\tString linetext = \"\";\n\t\tString fulltext = \"\";\n\t\t\n\t\t// We read the file line by line\n\t\twhile ((linetext = reader.readLine()) != null) {\n\t\t\tfulltext += linetext; //Appends the line to the Full Text\n\t\t}\n\t\tfulltext = fulltext.replace(\"$CourseTitle\", info.getCourseTitle())\n\t\t\t\t\t\t\t.replace(\"$Email\", info.getEmail())\n\t\t\t\t\t\t\t.replace(\"$FirstName\", info.getFirstName())\n\t\t\t\t\t\t\t.replace(\"$LastName\", info.getLastName())\n\t\t\t\t\t\t\t.replace(\"$CaseNumber\", caseNum);\n\t\treturn fulltext;\n\t}", "protected String readFile(int resourceFile) {\n Context context = getContext();\n if (context != null) {\n try {\n InputStream is = context.getResources().openRawResource(resourceFile);\n return Okio.buffer(Okio.source(is)).readString(Charset.defaultCharset());\n } catch (IOException e) {\n Log.e(TAG, \"Failed to read config\", e);\n }\n }\n return \"\";\n }", "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }", "public static String readString(String resource, Charset charset) {\n byte[]\tbytes;\n\n bytes = readBytes(resource);\n if (bytes == null)\n return null;\n\n try {\n return new String(bytes, charset);\n }\n catch (Exception e) {\n LOGGER.log(Level.SEVERE, \"Failed to read string (\" + charset + \") from resource file: \" + resource, e);\n return null;\n }\n }", "static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}", "public ResourceContent getContent() throws IOException;", "public Resource load(IFile f);", "public String getStringContent() throws IOException;", "public static String readTextStream(String filename) throws IOException {\n StringBuffer sb = new StringBuffer();\n BufferedReader fileReader = new BufferedReader(new InputStreamReader(FileHelper.class.getClassLoader().getResourceAsStream(filename)));\n FileHelper.read(sb, fileReader);\n return sb.toString();\n }", "static byte[] readResource(String name) throws IOException {\n byte[] buf = new byte[1024];\n\n InputStream in = Main.class.getResourceAsStream(name);\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n int n;\n while ((n = in.read(buf)) > 0) {\n bout.write(buf, 0, n);\n }\n try { in.close(); } catch (Exception ignored) { } \n\n return bout.toByteArray();\n }", "void openResource(String resourcePath);", "public String getText(String type) {\n String path = filePath.get(type);\n InputStream is = getClass().getResourceAsStream(path);\n\n if (is == null) {\n return \"File not found\";\n }\n return new BufferedReader(\n new InputStreamReader(is, StandardCharsets.UTF_8))\n .lines()\n .collect(Collectors.joining(\"\\n\"));\n }", "public String readtexto() {\n String texto=\"\";\n try\n {\n BufferedReader fin =\n new BufferedReader(\n new InputStreamReader(\n openFileInput(\"datos.json\")));\n\n texto = fin.readLine();\n fin.close();\n }\n catch (Exception ex)\n {\n Log.e(\"Ficheros\", \"Error al leer fichero desde memoria interna\");\n }\n\n\n\n return texto;\n }", "public static String asString(String resourcePath) {\n\t\ttry {\n\t\t\treturn StreamUtils.copyToString(new DefaultResourceLoader().getResource(resourcePath).getInputStream(),\n\t\t\t\t\tCharset.forName(\"UTF-8\"));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tthrow new RuntimeException(\"Can not load resource:\" + resourcePath, e);\n\t\t}\n\t}", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}", "public static String readSourceFile(String rs) throws Exception {\n Class<TestHelper> testHelperClass = TestHelper.class;\n ClassLoader classLoader = testHelperClass.getClassLoader();\n URI uri = classLoader.getResource(rs).toURI();\n byte[] bytes = Files.readAllBytes(Paths.get(uri));\n return new String(bytes, \"UTF-8\");\n }", "public static String getResource(String inResName) {\n\n return stringFromInputStream(getStream(inResName));\n\n }", "@Override\n public BufferedReader requestContentTxtFile(Context context) throws IOException{\n InputStream ins = context.getResources().openRawResource(R.raw.timferris);\n BufferedReader reader = new BufferedReader(new InputStreamReader(ins));\n Log.d(\"teste leitura\", \"Model return after reading has been reached\");\n\n return reader;\n }", "private void exercise4() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n long count = reader.lines()\n .count();\n System.out.println(count);\n }\n }", "public static String getRawText(Context context, int rawResId) {\n try {\n InputStream is = context.getResources().openRawResource(rawResId);\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n\n is.close();\n return sb.toString();\n } catch (Exception e) {\n return null;\n }\n }", "private String getDataFromClassResourceFile(String file) {\n\n StringBuffer sb = new StringBuffer();\n String str = \"\";\n\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n if (is != null) {\n while ((str = reader.readLine()) != null) {\n sb.append(str + \"\\n\");\n }\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (Throwable ignore) {\n }\n }\n return sb.toString();\n\n }", "private static String getText(IFile file) throws CoreException, IOException {\n\t\tInputStream in = file.getContents();\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\tbyte[] buf = new byte[1024];\n\t\tint read = in.read(buf);\n\t\twhile (read > 0) {\n\t\t\tout.write(buf, 0, read);\n\t\t\tread = in.read(buf);\n\t\t}\n\t\treturn out.toString();\n\t}", "public Resource load(String filename) throws MalformedURLException;", "public abstract ResourceInputStream getResource(String resName, HttpServletRequest request);", "public abstract T loadResource(AssetManager assetManager, String str);", "protected String getResourceScript(Resource resource, LocalContainer container)\n {\n ConfigurationBuilderFactory configurationBuilderFactory =\n new DefaultConfigurationBuilderFactory();\n ConfigurationBuilder builder =\n configurationBuilderFactory.createConfigurationBuilder(container, resource);\n String configurationEntry = builder.toConfigurationEntry(resource);\n return configurationEntry;\n }", "ResourceType getResource();", "String getCharacterVDBResource(String resourcePath) throws Exception;", "public static String loadStream(InputStream in) throws IOException {\r\n\t\tInputStream is = in;\r\n\t\tint ptr = 0;\r\n\t\tis = new BufferedInputStream(is);\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\ttry {\r\n\t\t\twhile ((ptr = is.read()) != -1) {\r\n\t\t\t\tbuffer.append((char) ptr);\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\t\treturn buffer.toString();\r\n\t}", "private String readText(NdefRecord record) throws UnsupportedEncodingException {\n\n byte[] payload = record.getPayload();\n\n // Get the Text Encoding\n String textEncoding = ((payload[0] & 128) == 0) ? \"UTF-8\" : \"UTF-16\";\n\n // Get the Language Code\n int languageCodeLength = payload[0] & 0063;\n\n // String languageCode = new String(payload, 1, languageCodeLength, \"US-ASCII\");\n // e.g. \"en\"\n\n // Get the Text\n return new String(payload, languageCodeLength + 1, payload.length - languageCodeLength - 1, textEncoding);\n }", "private static String readIt(InputStream stream) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(stream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return sb.toString();\n\t}", "java.lang.String getContents();", "java.lang.String getContents();", "private static String read(InputStream in) throws IOException {\n StringBuilder builder = new StringBuilder();\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String line = null;\n while ((line = reader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n }", "private List<String> readSrc(){\n //daclarations\n InputStream stream;\n List<String> lines;\n String input;\n BufferedReader reader;\n StringBuilder buf;\n\n //Inlezen van bestand\n stream = this.getClass().getResourceAsStream(RESOURCE);\n lines = new LinkedList<>();\n\n // laad de tekst in \n reader = new BufferedReader(new InputStreamReader(stream));\n buf = new StringBuilder();\n\n if(stream != null){\n try{\n while((input = reader.readLine()) != null){\n buf.append(input);\n System.out.println(input);\n lines.add(input);\n }\n } catch(IOException ex){\n System.out.println(ex);// anders schreeuwt hij in mijn gezicht:\n }\n }\n return lines;\n }", "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}", "private static String readAll(Reader rd) throws IOException {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t int cp;\n\t\t while ((cp = rd.read()) != -1) {\n\t\t sb.append((char) cp);\n\t\t }\n\t\t return sb.toString();\n\t\t }", "public static String read(Reader in) throws IOException {\n\t\tStringBuilder result = new StringBuilder();\n\t try {\n\t \tchar[] buf = new char[1024]; int r = 0;\n\t while ((r = in.read(buf)) != -1) {result.append(new String(buf, 0, r));}\n\t } finally { in.close();}\n\t\tString text=result.toString();\n\t\treturn text;\n\t}", "public static String getReleaseNotes() {\n\n try {\n //Open file\n ClassLoader classLoader = new ResourceLoader().getClass().getClassLoader();\n File file = new File(classLoader.getResource(RELEASE_NOTES).getFile());\n //Read File Content\n String content = new String(Files.readAllBytes(file.toPath()));\n return content;\n } catch (IOException ex) {\n Logger.getLogger(ResourceLoader.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n\n }", "private void getFileAsResourceNewLineDelineated(Class c){\n try{\n s = new Scanner(c.getResourceAsStream(resourceName)); \n while (s.hasNextLine())\n this.input.add(s.nextLine());\n\n setHeaderLine(this.input.get(0));\n \n } catch(Exception e){\n e.printStackTrace();\n }\n }", "public IResource getResource();", "public static void showContentWithData() throws IOException {\n DataInputStream dataInputStream = new DataInputStream(new FileInputStream(RESOURCES_FOLDER + \"\\\\lorem_ipsum.txt\"));\n StringBuilder builder = new StringBuilder();\n while (dataInputStream.available() > 0) {\n builder.append((char) dataInputStream.read());\n }\n System.out.println(builder);\n }", "public static String readFromFile(String filename) {\n InputStream is = ResourceUtils.class.getClassLoader().getResourceAsStream(filename);\n return convertStreamToString(is);\n\n }", "private String getInstanceFromFile() throws IOException{\n StringBuilder instance = new StringBuilder();\n boolean over = false;\n while(!over){\n char c = (char) reader.read();\n if(c == '\\n')\n over = true;\n else\n instance.append(c);\n }\n return instance.toString();\n }", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String getFileContentsAsString(String filename) {\n\n // Java uses Paths as an operating system-independent specification of the location of files.\n // In this case, we're looking for files that are in a directory called 'data' located in the\n // root directory of the project, which is the 'current working directory'.\n final Path path = FileSystems.getDefault().getPath(\"Resources\", filename);\n\n try {\n // Read all of the bytes out of the file specified by 'path' and then convert those bytes\n // into a Java String. Because this operation can fail if the file doesn't exist, we\n // include this in a try/catch block\n return new String(Files.readAllBytes(path));\n } catch (IOException e) {\n // Since we couldn't find the file, there is no point in trying to continue. Let the\n // user know what happened and exit the run of the program. Note: we're only exiting\n // in this way because we haven't talked about exceptions and throwing them in CS 126 yet.\n System.out.println(\"Couldn't find file: \" + filename);\n System.exit(-1);\n return null; // note that this return will never execute, but Java wants it there.\n }\n }", "@Test\n public void in() throws IOException {\n InputStream in = getResourceAstream(\"peizhi.xml\");\n\n //InputStream in = new FileInputStream(\"G:\\\\IDEA\\\\Java_test\\\\src\\\\main\\\\resources\\\\peizhi.xml\");\n //定义一个数组相当于缓存\n byte by[]=new byte[1024];\n int n=0;\n while((n=in.read(by))!=-1)\n {\n String s=new String(by,0,n);\n System.out.println(s);\n }\n }", "public void process(org.reuseware.air.language.abstractsyntax.resource.as.mopp.AsResource resource);", "public int getContents( Resource.Type type );", "public String readText(String _filename, String _type) {\r\n\t\treturn readText(_filename, _type, (java.net.URL) null);\r\n\t}", "String getContent() throws IOException;", "public clTranslation(String resource) {\n this.resource = resource;\n locale = Locale.getDefault();\n loadResource();\n }", "static JsonResource forString( String contents ) {\n return new JsonResource() {\n @Override\n public <T> T readFrom( ReadMethod<T> consumer ) throws IOException {\n try ( ByteArrayInputStream stream = new ByteArrayInputStream(contents.getBytes(Json.getDefaultConfig().getCharset())) ) {\n return consumer.read(stream);\n }\n }\n };\n }", "private static String open(@NonNull String path) throws Exception {\n ClassLoader loader = ClassLoader.getSystemClassLoader();\n InputStream stream = loader.getResourceAsStream(path);\n final StringBuilder stringBuilder = new StringBuilder();\n int i;\n byte[] b = new byte[4096];\n while ((i = stream.read(b)) != -1) {\n stringBuilder.append(new String(b, 0, i));\n }\n return stringBuilder.toString();\n }", "public String loadJSONFile(int resourceIdentifier) {\n if (resourceIdentifier != 0) {\n InputStream input = getResources().openRawResource(resourceIdentifier);\n java.util.Scanner s = new java.util.Scanner(input).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : null;\n } else {\n return null;\n }\n }", "public String ReadFile() throws IOException {\n File file = context.getFilesDir();\n File textfile = new File(file + \"/\" + this.fileName);\n\n FileInputStream input = context.openFileInput(this.fileName);\n byte[] buffer = new byte[(int)textfile.length()];\n\n input.read(buffer);\n\n return new String(buffer);\n }", "protected String getResourceString (String key)\n {\n try {\n if (_bundle != null) {\n return _bundle.getString(key);\n }\n \n } catch (MissingResourceException mre) {\n Log.warning(\"Missing translation message \" +\n \"[bundle=\" + _path + \", key=\" + key + \"].\");\n }\n return null;\n }", "public String readFileIntoString(String filepath) throws IOException;", "private static String extractTextFromFile(InputStream is, FormStackInfo info, \n\t\t\t\t\t\t\t\t\t\t\tString password, String title) throws IOException {\n\t\tInputStreamReader isr = new InputStreamReader(is);\n\t\tBufferedReader reader = new BufferedReader(isr);\n\t\tString linetext = \"\";\n\t\tString fulltext = \"\";\n\t\t\n\t\t// We read the file line by line\n\t\twhile ((linetext = reader.readLine()) != null) {\n\t\t\tfulltext += linetext; //Appends the line to the Full Text\n\t\t}\n\t\tfulltext = fulltext.replace(\"$CourseTitle\", title)\n\t\t\t\t\t\t\t.replace(\"$Email\", info.getEmail())\n\t\t\t\t\t\t\t.replace(\"$Password\", password);\n\t\treturn fulltext;\n\t}", "public String readString() throws IOException {\n return WritableUtils.readString(in);\n }", "String getContents();", "public String readText(String _filename) {\r\n\t\treturn readText(_filename, \"text\", (java.net.URL) null);\r\n\t}", "@Override\n\tpublic String readBlob() throws PersistBlobException {\n\t\tlog.debug(\"readString: \");\n\t\ttry {\n\t\t\tString contents = FileUtils.readFileToString(new File(full_file_name), \"UTF-8\");\n\t\t\tlog.debug(\"returned string: \"+contents);\n\t\t\treturn contents;\n\t\t} catch (IOException e) {\n\t\t\tthrow new PersistBlobException(\"can not read string\",e);\n\t\t}\n\n\t}", "public abstract String read_string();", "private String readFile(String source) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n try (Stream<String> stream = Files.lines(Paths.get(source), StandardCharsets.UTF_8)) {\n stream.forEach(s -> contentBuilder.append(s));\n }\n return contentBuilder.toString();\n }", "public String readText(String _filename, java.net.URL _codebase) {\r\n\t\treturn readText(_filename, \"text\", _codebase);\r\n\t}", "public CharSequence getResourceText(int resId) {\n synchronized (this) {\n TypedValue outValue = this.mValue;\n if (!getResourceValue(resId, 0, outValue, true)) {\n return null;\n }\n CharSequence coerceToString = outValue.coerceToString();\n return coerceToString;\n }\n }", "protected static String getResourceAsString(Class<?> clazz, String location) {\n try (InputStream resourceStream = clazz.getResourceAsStream(location)) {\n return IoUtils.toUtf8String(resourceStream);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "private String readStream(InputStream in) throws IOException {\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder sb = new StringBuilder();\n String line;\n\n // Reads every line and stores them in sb.\n while((line = r.readLine()) != null) {\n sb.append(line);\n }\n\n // Closes the input stream.\n in.close();\n\n return sb.toString();\n }", "InputStream getAsset(String asset) throws IOException;", "private String readFile(String source) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n try (Stream<String> stream = Files.lines(Paths.get(source), StandardCharsets.UTF_8)) {\n stream.forEach(s -> contentBuilder.append(s));\n }\n\n return contentBuilder.toString();\n }", "private String getStringFromFile() throws FileNotFoundException {\n String contents;\n FileInputStream fis = new FileInputStream(f);\n StringBuilder stringBuilder = new StringBuilder();\n try {\n InputStreamReader inputStreamReader = new InputStreamReader(fis, \"UTF-8\");\n BufferedReader reader = new BufferedReader(inputStreamReader);\n String line = reader.readLine();\n while (line != null) {\n stringBuilder.append(line).append('\\n');\n line = reader.readLine();\n }\n } catch (IOException e) {\n // Error occurred when opening raw file for reading.\n } finally {\n contents = stringBuilder.toString();\n }\n return contents;\n }" ]
[ "0.6900428", "0.66612077", "0.6551499", "0.653987", "0.64540875", "0.64365095", "0.6431172", "0.63921386", "0.63728344", "0.63339394", "0.63211304", "0.6305369", "0.629332", "0.6265062", "0.626062", "0.626062", "0.6258269", "0.62191445", "0.6197016", "0.6196588", "0.6166811", "0.6163794", "0.6116462", "0.6100775", "0.60306984", "0.60291517", "0.5999231", "0.5930957", "0.5930462", "0.59234565", "0.59138155", "0.5906154", "0.58644724", "0.57951534", "0.5783669", "0.5764159", "0.5763054", "0.5740826", "0.57383955", "0.57062787", "0.5668283", "0.5658091", "0.56278324", "0.5621471", "0.5616339", "0.56006324", "0.5595065", "0.55883646", "0.5571959", "0.55483955", "0.5521664", "0.5500683", "0.54937893", "0.5490909", "0.5490263", "0.54899156", "0.5480074", "0.5478468", "0.54669243", "0.54669243", "0.5463586", "0.5443912", "0.54078585", "0.54005533", "0.5391408", "0.5385759", "0.53856254", "0.5372038", "0.5358724", "0.53435934", "0.533319", "0.53329724", "0.53329724", "0.5332774", "0.5331123", "0.5326571", "0.53216636", "0.531932", "0.52727383", "0.5269837", "0.52634865", "0.52619386", "0.52555364", "0.52515805", "0.525086", "0.5243938", "0.52428967", "0.52421045", "0.52343774", "0.5233084", "0.52305776", "0.52255553", "0.52148736", "0.5214292", "0.52129865", "0.5212966", "0.5201707", "0.52010727", "0.5197255", "0.51910365" ]
0.60389453
24
creates a stream for the resource from file system or using class loader
public static InputStream getStream(String fileOrResourceName) { /* * in production, it is a resource, and hence we try that first */ InputStream stream = IoUtil.class.getClassLoader().getResourceAsStream(fileOrResourceName); if (stream != null) { return stream; } File file = new File(fileOrResourceName); if (file.exists()) { try { return new FileInputStream(file); } catch (Exception e) { logger.error( "Resource {} is intepreted as a file that was located on the file system, but error while creating stream from that file. Error: {}", fileOrResourceName, e.getMessage()); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract InputStream getStream(String resource);", "private static InputStream getStream(String inResName) {\n\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\n InputStream is = loader.getResourceAsStream(inResName);\n if (is == null) {\n log.error(\"Resource '\" + inResName + \"' not found in classpath\");\n }\n return is;\n\n }", "protected InputStream openFileStream(ResourceType type, String path) {\n // Create full path\n String fullPath = type.makePath(path);\n\n // Check overrided\n if (!ResourceOverrides.isResourceOverrided(fullPath)) {\n // =null: failed to load resource pack file\n this.handleLoad(true, false);\n if (this.archive != null) {\n try {\n InputStream stream = this.archive.openFileStream(fullPath);\n if (stream == null) {\n stream = this.archive.openFileStream(fullPath.toLowerCase(Locale.ENGLISH));\n }\n if (stream != null) {\n return stream;\n }\n } catch (IOException ex) {\n }\n }\n\n // Fallback: try the underlying resource pack (usually Vanilla)\n if (this.baseResourcePack != null) {\n InputStream stream = this.baseResourcePack.openFileStream(type, path);\n if (stream != null) {\n return stream;\n }\n }\n\n // Fallback: ask provider (if available)\n if (this.currProvider != null) {\n try {\n return this.currProvider.openResource(type, path);\n } catch (IOException ex) {\n }\n }\n }\n\n // Fallback: load from BKCommonLib built-in resources\n // This handles many block models such as signs\n InputStream bkc_stream = Common.class.getResourceAsStream(type.makeBKCPath(path));\n if (bkc_stream != null) {\n return bkc_stream;\n }\n\n // FAILED\n return null;\n }", "public static InputStream openResourceStream(String resourceName) {\n InputStream stream = null;\n ClassLoader classLoader = Utils.class.getClassLoader();\n if (classLoader != null) {\n stream = classLoader.getResourceAsStream(resourceName);\n }\n\n if (stream == null) {\n stream = ClassLoader.getSystemResourceAsStream(resourceName);\n }\n return stream;\n }", "public abstract ResourceInputStream getResource(String resName, HttpServletRequest request);", "InputStream openStream() throws IOException;", "public InputStream openStream(String str) {\n return Thread.currentThread().getContextClassLoader().getResourceAsStream(str);\n }", "public interface Resource {\n InputStream getInputStream() throws Exception;\n}", "OutputStream createStream(String location);", "private static InputStream get_resource_as_stream(String path, String res_name)\r\n throws InternalException {\n ClassLoader cl = IdeaHelpers.class.getClassLoader();\r\n InputStream is;\r\n if (path == null || path.trim().length() == 0) {\r\n // to avoid Warning\r\n // Do not request resource from classloader using path with leading slash\r\n is = cl.getResourceAsStream(res_name);\r\n } else {\r\n is = cl.getResourceAsStream(path + \"/\" + res_name);\r\n }\r\n if (is == null) {\r\n is = cl.getResourceAsStream(\"/\" + path + \"/\" + res_name);\r\n }\r\n if (is == null) {\r\n throw new InternalException(\"Resource not found: \" + res_name);\r\n }\r\n return is;\r\n }", "public static InputStream asStream(String name) throws IOException {\n ClassLoader classLoader = Reflection.getCallerClass(3).getClassLoader();\n return asStream(name, classLoader);\n }", "public static InputStream getStreamFromClassPath(String path) {\n\t\treturn ResourceUtils.class.getClassLoader().getResourceAsStream(path);\n\t}", "@Deprecated\n\tpublic static InputStream getResourceAsStream(Class<?> clazz, String resource) {\n\t\treturn getResourceAsStream(clazz.getClassLoader(), resource);\n\t}", "private static InputStream getResourceAsStream(final String filename) throws IOException {\n\t\t// Try to load resource from jar\n\t\tInputStream stream = TextureLoader.class.getResourceAsStream(filename);\n\t\t// If not found in jar, then load from disk\n\t\tif (stream == null) {\n\t\t\treturn new BufferedInputStream( new FileInputStream(filename) );\n\t\t} else {\n\t\t\treturn stream;\n\t\t}\n\t}", "public InputStream getInputStream()\n/* */ {\n/* 105 */ InputStream in = ResourceUtils.getResourceAsStream(this, this);\n/* */ \n/* 107 */ return in;\n/* */ }", "@Override\n public InputStream open() throws IOException {\n return getClass().getClassLoader().getResourceAsStream(name);\n }", "public interface InputStreamProvider {\n\n InputStream open() throws IOException;\n\n String getPath();\n}", "private void initResource(final ResourceReference ref) throws ResourceStreamNotFoundException {\n\t\tfinal boolean gzip = Application.get().getResourceSettings().getDisableGZipCompression();\n\t\ttry {\n\t\t\tApplication.get().getResourceSettings().setDisableGZipCompression(true);\n\t\t\tref.getResource().getResourceStream().getInputStream();\n\t\t} finally {\n\t\t\tApplication.get().getResourceSettings().setDisableGZipCompression(gzip);\n\t\t}\n\t}", "public Resource load(IFile f);", "void init() throws IOException {\n\t\tif (this.type==FILE){\n\t\t\tstream.init(new FileInputStream(name));\n\t\t}\n\t\telse{\n\t\t\tURL url = new URL(name);\n\t\t\tstream.init((url.openStream()));\n\t\t}\n\t}", "public StreamableClassPathResource(final String name) {\n super();\n this.name = name;\n }", "Resource createResource();", "private InputStream findStreamInClasspathOrFileSystem(String url) throws IOException {\n\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(url);\n\t\t// if not found in the CLASSPATH, load from the file system\n\t\tif (is == null)\n\t\t\tis = new FileInputStream(url);\n\t\treturn is;\n\t}", "public static InputStream getInputStream(String resource) throws URISyntaxException, IOException {\r\n\t\tString projectDirectory = DirectoryUtils.getProjectDirectory();\r\n\t\tURL url = DirectoryUtils.class.getClassLoader().getResource(resource);\r\n\r\n\t\t/**\r\n\t\t * Rank 1: Local resources path.\r\n\t\t */\r\n\t\tif (url != null && \"file\".equals(url.getProtocol())) {\r\n\t\t\tFile file = new File(url.toURI());\r\n\t\t\tString path = file.getAbsolutePath();\r\n\r\n\t\t\tif (file.exists() && path.indexOf(projectDirectory) == 0) {\r\n\t\t\t\treturn new FileInputStream(file);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Rank 2: Project directory.\r\n\t\t */\r\n\t\tPath resourcePath = Paths.get(projectDirectory, resource);\r\n\t\tFile resourceFile = resourcePath.toFile();\r\n\r\n\t\tif (resourceFile.exists()) {\r\n\t\t\treturn new FileInputStream(resourceFile);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Rank 3: Other project resources path.\r\n\t\t */\r\n\t\tif (url != null && \"file\".equals(url.getProtocol())) {\r\n\t\t\tFile file = new File(url.toURI());\r\n\r\n\t\t\tif (file.exists()) {\r\n\t\t\t\treturn new FileInputStream(file);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Rank 4: Dependent jar package file.\r\n\t\t */\r\n\t\tif (url != null && \"jar\".equals(url.getProtocol())) {\r\n\t\t\treturn url.openStream();\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public InputStream openInputStream(String path) throws SystemException;", "public abstract InputStream openStream(String str);", "private IOUtils() {\n\n }", "private IOUtils() {\n }", "protected abstract InputStream getInStreamImpl(String filename) throws IOException;", "public InputStream getInputStream() throws IOException {\n/* 521 */ return Minecraft.getMinecraft().getResourceManager().getResource(p_148612_0_).getInputStream();\n/* */ }", "@Override\n public InputStream openStream() throws IOException\n {\n return new FileInputStream(temp);\n }", "protected void openStream ()\n {\n stream = Util.stream (entry, \"Holder.java\");\n }", "public Object makeResource();", "public static final InputStream getResourceAsStream(String s) {\n\t\tif (s.startsWith(\"/\")) {\n\t\t\ts = s.substring(1);\n\t\t}\n\t\t//the name must be in lowercase always. Credits to [email protected]\n\t\tString name = s.substring(s.lastIndexOf('/')+1).toLowerCase();\n\t\t//fixed: remove extension. Credits to [email protected]\n\t\tint ext = name.indexOf('.');\n\t\tif (ext != -1)\n\t\t{\n\t\t\tname = name.substring(0, ext);\n\t\t}\n\t\tString path = s.substring(0, s.lastIndexOf('/')+1);\n\t\tString protectedRes = path + \"res_\"+name;\n\n\t\tif (debugEnabled)\n\t\t\tLog.d(\"getResourceAsStream\", \"Trying to get protected resource using forward lock. Resource: \"+ protectedRes);\n\n\t\tint ID = mContext.getResources().getIdentifier(protectedRes, \"drawable\", mContext.getPackageName());\n\t\tInputStream is = null;\n\t\tif (ID != 0) {\n\n\t\t\tif (debugEnabled)\n\t\t\t\tLog.d(\"getResourceAsStream\", \"Forward lock protection ok. Protected resource exists: \"+ protectedRes +\" with ID=\"+ ID);\n\n\t\t\tis = mContext.getResources().openRawResource(ID);\n\t\t\tif (is != null) {\n\t\t\t\treturn is;\n\t\t\t}\n\t\t}\n\t\tif (debugEnabled)\n\t\t\tLog.w(\"getResourceAsStream\", \"Resource: \"+ s +\" is not protected using forward lock\");\n\n\t\tAssetManager am = mContext.getAssets();\n\t\ttry {\n\t\t\tif (debugEnabled)\n\t\t\t\tLog.d(\"getResourceAsStream\", \"Reading asset: \"+ s);\n\n\t\t\tis = am.open(s);\n\t\t} catch (IOException e) {\n\t\t\tif (debugEnabled)\n\t\t\t\tLog.e(\"getResourceAsStream\", \"Error reading asset: \"+ s +\" :: \"+ e);\n\n\t\t\treturn null;\n\t\t}\n\t\treturn is;\n\t}", "public abstract InputStream getInputStream();", "public abstract InputStream getInputStream();", "private InputStream getFileFromResourceAsStream(String fileName) {\n\n // The class loader that loaded the class\n ClassLoader classLoader = getClass().getClassLoader();\n InputStream inputStream = classLoader.getResourceAsStream(fileName);\n\n // the stream holding the file content\n if (inputStream == null) {\n throw new IllegalArgumentException(\"file not found! \" + fileName);\n } else {\n return inputStream;\n }\n\n }", "public interface OutputStreamFactory {\n\n /**\n * Create an output stream for file location.\n * String that represents file location should be relative path, '/' is a delimiter.\n *\n * @param location sting that contains relative file location\n *\n * @return new stream instance\n */\n OutputStream createStream(String location);\n}", "Resource getResource();", "private IOUtils()\n {\n }", "private ServletInputStream getServletInputStream(String resourceName) {\n final InputStream stream = this.getClass().getResourceAsStream(resourceName);\n return new ServletInputStream() {\n\n @Override\n public int read() throws IOException {\n return stream.read();\n }\n };\n }", "public static InputStream getResourceStream(String resourceName) {\n return Utils.class.getClassLoader().getResourceAsStream(resourceName);\n }", "private InputStream getResourceAsStream(String path) throws FileNotFoundException {\n\t\tInputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);\n\t\tif (in == null) {\n\t\t\tin = getClass().getResourceAsStream(path);\n\t\t}\n\n\t\tif (in == null) {\n\t\t\tFile file = new File(path);\n\t\t\tif (file.isFile()) {\n\t\t\t\tin = new FileInputStream(file);\n\t\t\t}\n\t\t}\n\n\t\treturn in;\n\t}", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "public COSInputStream createInputStream() throws IOException\n {\n return stream.createInputStream();\n }", "public InputStream getStream();", "public ExecutableReader(ExecutableStream stream) throws Exception {\n\t\texStr = stream;\n\t\tread(stream);\n\t}", "public ClassFile(DataInput stream)\n throws IOException\n {\n load(stream);\n }", "public COSInputStream createInputStream() throws IOException {\n/* 236 */ return this.stream.createInputStream();\n/* */ }", "private InputStream getFileFromResourceAsStream(String fileName) {\n ClassLoader classLoader = getClass().getClassLoader();\n InputStream inputStream = classLoader.getResourceAsStream(fileName);\n\n // the stream holding the file content\n if (inputStream == null) {\n throw new IllegalArgumentException(\"file not found! \" + fileName);\n } else {\n return inputStream;\n }\n }", "public static InputStream getClassAsStream(Class<?> cl) {\n\t\tString resourceName = cl.getSimpleName() + \".class\";\n \t\treturn cl.getResourceAsStream(resourceName);\n \t}", "@Override\n\tpublic InputStream getResourceAsStream(String name) {\n\t\tlog.debug(\"getResourceAsStream({})\", name);\n\t\tbyte[] bytes = resources.get(name);\n\t\t\n\t\tif (bytes != null) {\n\t\t\treturn new ByteArrayInputStream(bytes);\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public interface Resource { \n /**\n * @return the time, in <code>millis</code>, at which this resource was\n * last modified.\n */\n public long lastModified();\n\n /**\n * @return the URI that this resource corresponds to.\n */\n public String getURI();\n\n /**\n * @return the <code>InputStream</code> corresponding to this resource.\n * @throws IOException\n */\n public InputStream getInputStream() throws IOException;\n \n \n /**\n * @return the <code>Resource</code> corresponding to the given relative URI.\n * @param uri a URI.\n * @throws IOException\n */ \n public Resource getRelative(String uri) throws IOException;\n \n}", "@NotNull InputStream openInputStream() throws IOException;", "static InputStream openStreamFromURL(String path) {\n\t\tClassLoader cl = PropertiesUtil.class.getClassLoader();\n\t\tURL url = cl.getResource(path);\n\t\tif (url != null) {\n\t\t\ttry {\n\t\t\t\tInputStream stream = url.openStream();\n\t\t\t\treturn stream;\n\t\t\t} catch (IOException ioex) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}", "@Override\n public Resource load(String filename, String path) {\n S3Object s3_file = this.s3client.getObject(\n this.s3_storage_properties.getBucketName(), path + \"/\" + filename\n );\n S3ObjectInputStream file_stream = s3_file.getObjectContent();\n\n Resource resource = new InputStreamResource(file_stream);\n if (resource.exists() || resource.isReadable()) {\n Application.logger.info(\"Loaded \"+path + \"/\" + filename+\" into S3\");\n return resource;\n }\n else {\n throw new StorageFileNotFoundException(\n \"Could not read file: \" + filename);\n }\n }", "public InputStream open() {\n return demoResourceLoader.getResourceAsStream(\n MessageFormat.format(\"{0}/{1}.groovy\",\n scenario.getName().toLowerCase(), name));\n }", "public static interface ResourceProvider {\n\t\t\n\t\t/**\n\t\t * Obtain an input stream pointing to a resource. The argument resource\n\t\t * file name is equivalent to the path info of the argument request,\n\t\t * but provided separately for instant access. The argument request,\n\t\t * in turn, is there to provide access to request parameters, session\n\t\t * info, etc.\n\t\t * @param resName the resource file name\n\t\t * @param request the original HTTP request asking for the resource\n\t\t * @return\n\t\t */\n\t\tpublic abstract ResourceInputStream getResource(String resName, HttpServletRequest request);\n\t}", "public interface IOFactory {\n\n public FileIO newFile(String path);\n\n}", "public ResourceFactory(){}", "public static <T extends PMessage<T>, F extends PField> Stream<T> resource(String resource,\n PSerializer serializer,\n PStructDescriptor<T, F> descriptor)\n throws IOException {\n InputStream in = MessageStreams.class.getResourceAsStream(resource);\n if(in == null) {\n throw new IOException(\"No such resource \" + resource);\n }\n return StreamSupport.stream(new StreamMessageSpliterator<>(new BufferedInputStream(in),\n serializer,\n descriptor,\n is -> {\n try {\n is.close();\n return null;\n } catch(IOException e) {\n throw new UncheckedIOException(e);\n }\n }), false);\n }", "public ResourceInputStream(InputStream in) {\n\t\t\tthis(in, System.currentTimeMillis());\n\t\t}", "public InputStream getInputStream();", "public InputStream getInputStream();", "private static InputStream getResourceAsStream(String resource)\r\n {\r\n return KuBatschTheme.class.getResourceAsStream(String.format(\"%s/%s\",\r\n RESOURCES_DIR, resource));\r\n }", "private static String open(@NonNull String path) throws Exception {\n ClassLoader loader = ClassLoader.getSystemClassLoader();\n InputStream stream = loader.getResourceAsStream(path);\n final StringBuilder stringBuilder = new StringBuilder();\n int i;\n byte[] b = new byte[4096];\n while ((i = stream.read(b)) != -1) {\n stringBuilder.append(new String(b, 0, i));\n }\n return stringBuilder.toString();\n }", "@Override\n public InputStream getInputStream(String templateName) throws IOException {\n if (templateName.contains(\"..\")) {\n throw new RuntimeException(\"templateName must not contain '..' characters\");\n }\n String templateFile = WELL_KNOWN_CONTAINER + \"/\" + templateName.replaceAll(\"^/+\", \"\"); // remove heading separator\n log.trace(\"locating template file: \" + templateFile + \"; requested template name: \" + templateName);\n try {\n Resource res = StaticResourceServlet.StaticResourceProvider.getInstance().getResource(getServletContext(), templateFile);\n if (res.notFound()) {\n throw new IOException(\"Template file not found: \" + templateName);\n }\n return new ByteArrayInputStream(res.getData());\n } catch (Exception e) {\n throw new IOException(\"Failed open template: \" + templateName, e);\n }\n }", "private static <T> InputStream getPropertiesFile(Class<T> clazz, ULocale locale) {\r\n String localeStr = \"\";\r\n if(locale != null) {\r\n localeStr = '_' + locale.getName();\r\n }\r\n String filePath = clazz.getName().replace(DOT, SLASH) + localeStr + PROPERTIES_EXT;\r\n return clazz.getClassLoader().getResourceAsStream(filePath);\r\n }", "private static InputStream getInputStream(final String filename) throws IOException, FileNotFoundException {\r\n final ResourcePatternResolver applicationContext = new ClassPathXmlApplicationContext(new String[] {});\r\n final Resource[] resource = applicationContext.getResources(\"classpath*:\" + filename);\r\n if (resource.length == 0) {\r\n throw new FileNotFoundException(\"Unable to find file '\" + filename + \"' in classpath.\");\r\n }\r\n return resource[0].getInputStream();\r\n }", "@Override\n public InputStream findResource(String filename)\n {\n InputStream resource = null;\n try\n {\n Path scriptRootPath = Files.createDirectories(getScriptRootPath(side));\n Path scriptPath = scriptRootPath.resolve(filename).toAbsolutePath();\n resource = Files.newInputStream(scriptPath, StandardOpenOption.READ);\n } catch (IOException e)\n {\n resource = super.findResource(filename);\n }\n return resource;\n }", "public InputStream getStream(String base, String fileName){\n return getClass().getClassLoader().getResourceAsStream(base + fileName);\n }", "public Resource getResource(InputStream is, MetaData parentMetaData, \r\n\t\t\tResourceContainer container) \r\n\tthrows ResourceParseException, IOException;", "public static File getFile(String resourceOrFile, Class<?> cls,\n boolean deleteTmpOnExit) throws FileNotFoundException {\n try {\n\n // jar:file:/home/.../blue.jar!/path/to/file.xml\n URI uri = getURL(resourceOrFile, cls).toURI();\n String uriStr = uri.toString();\n if (uriStr.startsWith(\"jar\")) {\n\n if (uriStr.endsWith(\"/\")) {\n throw new UnsupportedOperationException(\n \"cannot unjar directories, only files\");\n }\n\n String jarPath = uriStr.substring(4, uriStr.indexOf(\"!\"))\n .replace(\"file:\", \"\");\n String filePath = uriStr.substring(uriStr.indexOf(\"!\") + 2);\n\n JarFile jarFile = new JarFile(jarPath);\n assert (jarFile.size() > 0) : \"no jarFile at \" + jarPath;\n\n Enumeration<JarEntry> entries = jarFile.entries();\n\n while (entries.hasMoreElements()) {\n\n JarEntry jarEntry = entries.nextElement();\n if (jarEntry.toString().equals(filePath)) {\n InputStream input = jarFile.getInputStream(jarEntry);\n assert (input != null) : \"empty is for \" + jarEntry;\n return tmpFileFromStream(input, filePath,\n deleteTmpOnExit);\n }\n }\n assert (false) : \"file\" + filePath + \" not found in \" + jarPath;\n return null;\n } else {\n return new File(uri);\n }\n\n } catch (URISyntaxException e) {\n throw new FileNotFoundException(resourceOrFile);\n } catch (IOException e) {\n throw new FileNotFoundException(resourceOrFile);\n }\n }", "protected abstract OutputStream getStream() throws IOException;", "@Override\n\tpublic InputStream getResource(ResourcePackType p_195761_1_, ResourceLocation p_195761_2_) throws IOException {\n\t\treturn null;\n\t}", "Stream<In> getInputStream();", "public InputStream readStreamFromString(String url) throws IOException {\n\t\tInputStream in;\n\t\tif (url.matches(\"https?://.*\")) {\n\t\t\tURL u = new URL(url);\n\t\t\tURLConnection urlConnection = u.openConnection();\n\t\t\tin = urlConnection.getInputStream();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tin = findStreamInClasspathOrFileSystem(url);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\ttry {\n\t\t\t\t\t// Maybe this happens to be some other format of URL?\n\t\t\t\t\tURL u = new URL(url);\n\t\t\t\t\tURLConnection uc = u.openConnection();\n\t\t\t\t\tin = uc.getInputStream();\n\t\t\t\t} catch (IOException e2) {\n\t\t\t\t\t// Don't make the original exception a cause, since it is\n\t\t\t\t\t// almost certainly bogus\n\t\t\t\t\tthrow new IOException(\"Unable to resolve \\\"\" + url + \"\\\" as either \" + \"class path, filename or URL\"); // ,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// e2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// buffer this stream\n\t\tin = new BufferedInputStream(in);\n\n\t\t// gzip it if necessary\n\t\tif (url.endsWith(\".gz\"))\n\t\t\tin = new GZIPInputStream(in);\n\t\treturn in;\n\t}", "void openResource(String resourcePath);", "public ExecutableReader(InputStream is) throws Exception {\n\t\texStr = new ExecutableStream(is);\n\t\tread(exStr);\n\t}", "private static BufferedReader newReader(InputStream stream) {\n return new BufferedReader(new InputStreamReader(stream));\n }", "public static ResourceData create(\n final InputStream stream,\n final Dictionary<String, Object> props)\n throws IOException {\n if ( stream == null ) {\n final Dictionary<String, Object> result = new Hashtable<String, Object>();\n final Enumeration<String> e = props.keys();\n while (e.hasMoreElements()) {\n final String key = e.nextElement();\n result.put(key, props.get(key));\n }\n return new ResourceData(result, null);\n\n }\n final File dataFile = FileDataStore.SHARED.createNewDataFile(stream,\n null, null, null);\n return new ResourceData(null, dataFile);\n }", "static JsonResource forClasspath( ClassLoader classLoader, String name ) {\n final ClassLoader loader = classLoader == null ? Thread.currentThread().getContextClassLoader() : classLoader;\n return new JsonResource() {\n @Override\n public <T> T readFrom( ReadMethod<T> consumer ) throws IOException {\n InputStream stream = loader.getResourceAsStream(name);\n if ( stream == null )\n throw new FileNotFoundException(\"Resource \" + name + \" not found\");\n try {\n return consumer.read( stream );\n } finally {\n stream.close();\n }\n }\n };\n }", "void getFile(String path, OutputStream stream) throws NotFoundException, IOException;", "public InputStream getInputStream() throws IOException;", "public InputStream getInputStream() throws IOException;", "public interface IStreamFactory{\n Closeable getStream(Query q);\n }", "public OutputStream openOutputStream(String path) throws SystemException;", "public synchronized InputStream tryToLoadFromEverywhere(String filename) {\n InputStream result = null;\n result = System.class.getResourceAsStream(filename);\n if (result != null) {\n return result;\n }\n\n result = Thread.currentThread().getContextClassLoader().getResourceAsStream(filename);\n if (result != null) {\n return result;\n }\n\n result = Thread.currentThread().getClass().getResourceAsStream(filename);\n if (result != null) {\n return result;\n }\n\n result = ClassLoader.getSystemResourceAsStream(filename);\n if (result != null) {\n return result;\n }\n result = ClassLoader.getSystemClassLoader().getResourceAsStream(filename);\n if (result != null) {\n return result;\n }\n\n return result;\n }", "public interface CartridgeLoader {\n\n public abstract InputStream getFile(String the_target)\n throws FileNotFoundException, IOException;\n\n}", "public <T> Config.Resource<T> toResource(Path path) {\n if (this.exists(path)) {\n return new Config.Resource.Filesystem<>(path);\n }\n return new Config.Resource.NotFound<>(path, this);\n }", "public StreamReader() {}", "public static ExecutableReader create(ExecutableStream str) throws Exception {\n\t\tint identify = identify(str);\n\t\tExecutableReader reader = null;\n\t\tswitch(identify) {\n\t\t\tcase TYPEID_PE_x86:\n\t\t\t\treader = new ExecutableReader(str);\n\t\t\tbreak;\n\t\t\tcase TYPEID_PE_x64:\n\t\t\t\treader = new ExecutableReader64(str);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"[!] Arch not supported (Error: \"+identify+\")\");\n\t\t}\n\t\treturn reader;\n\t}", "public void xmlInputStream() {\n inputStream = context.getResources().openRawResource(R.raw.flowers_xml);\n //stringInputStream = convertInputStreamToString(inputStream);\n //System.out.println(\"------------ InputStream ------------\\n\" + stringInputStream);\n //------------------------------------------------------------------------------------------\n }", "public synchronized InputStream getInputStream(String hash) throws IOException {\n\t\tif (null == hash) {\n\t\t\treturn null;\n\t\t}\n\t\t// RkLog.i(\"getInputStream\",\n\t\t// \"target file exist-->\"+getFile(hash).exists());\n\n\t\tInputStream is = new FileInputStream(getFile(hash));\n\n\t\treturn is;\n\t}", "<R> Streamlet<R> newSource(SerializableSupplier<R> supplier);", "protected abstract InputStream getFile(final String path);", "Object create(InputStream in) throws IOException, SAXException, ParserConfigurationException;" ]
[ "0.7431515", "0.66465276", "0.65493244", "0.6461497", "0.63776964", "0.6373441", "0.6351597", "0.63488966", "0.6313311", "0.630935", "0.6220959", "0.62104326", "0.6131166", "0.6112338", "0.6103823", "0.6077233", "0.60528237", "0.6026589", "0.6017411", "0.5997438", "0.5957848", "0.5957484", "0.5955523", "0.59173304", "0.5915186", "0.58843786", "0.58697027", "0.5829444", "0.58123857", "0.5811309", "0.5809237", "0.5791828", "0.5787973", "0.5767547", "0.575212", "0.575212", "0.5750314", "0.57491046", "0.57416075", "0.5731936", "0.57280046", "0.57265127", "0.5717934", "0.56961995", "0.56961995", "0.56961995", "0.5682801", "0.5680016", "0.56793016", "0.567412", "0.5663546", "0.5612916", "0.56059307", "0.5592788", "0.5576593", "0.55636066", "0.5559104", "0.55582565", "0.55446863", "0.554226", "0.5541044", "0.5538564", "0.55070066", "0.5503309", "0.54986185", "0.5494275", "0.5494275", "0.5487904", "0.5481436", "0.5479411", "0.5478138", "0.5477684", "0.5476406", "0.5460167", "0.54588956", "0.5453156", "0.54530865", "0.54491115", "0.54449666", "0.54434294", "0.54426134", "0.5437622", "0.5434291", "0.54206324", "0.5417969", "0.53951603", "0.5388045", "0.5388045", "0.53818494", "0.5380459", "0.5380113", "0.5359142", "0.5345823", "0.53264916", "0.53229254", "0.5317287", "0.5316726", "0.5316598", "0.53105927", "0.530808" ]
0.6190987
12
create some sample data
@RequestMapping(method = RequestMethod.GET, params = { "pdf" }) public ModelAndView pdfMethod() { List<Book> listBooks = new ArrayList<Book>(); listBooks.add(new Book("Spring in Action", "Craig Walls", "1935182358", "June 29th 2011", 31.98F)); listBooks.add( new Book("Spring in Practice", "Willie Wheeler, Joshua White", "1935182056", "May 16th 2013", 31.95F)); listBooks.add(new Book("Pro Spring 3", "Clarence Ho, Rob Harrop", "1430241071", "April 18th 2012", 31.85F)); listBooks.add( new Book("Spring Integration in Action", "Mark Fisher", "1935182439", "September 26th 2012", 28.73F)); // return a view which will be resolved by an excel view resolver return new ModelAndView("pdfView", "listBooks", listBooks); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addSampleData() {\r\n }", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "private void createTestData() {\n for (int i = startKey; i < startKey + numKeys; i++) {\n keys.add(i);\n }\n }", "private List<Tuple2<Integer, Integer>> initSampleDataset() {\n List<Tuple2<Integer, Integer>> rawChapterData = new ArrayList<>();\n rawChapterData.add(new Tuple2<>(96, 1));\n rawChapterData.add(new Tuple2<>(97, 1));\n rawChapterData.add(new Tuple2<>(98, 1));\n rawChapterData.add(new Tuple2<>(99, 2));\n rawChapterData.add(new Tuple2<>(100, 3));\n rawChapterData.add(new Tuple2<>(101, 3));\n rawChapterData.add(new Tuple2<>(102, 3));\n rawChapterData.add(new Tuple2<>(103, 3));\n rawChapterData.add(new Tuple2<>(104, 3));\n rawChapterData.add(new Tuple2<>(105, 3));\n rawChapterData.add(new Tuple2<>(106, 3));\n rawChapterData.add(new Tuple2<>(107, 3));\n rawChapterData.add(new Tuple2<>(108, 3));\n rawChapterData.add(new Tuple2<>(109, 3));\n\n return rawChapterData;\n }", "private RandomData() {\n initFields();\n }", "public void generateData()\n {\n }", "private void generateData(){\n generateP50boys();\n generateP50girls();\n generateP97boys();\n generateP97girls();\n }", "private void generateSampleKeys()\n {\n Iterator<ArrayList<String>> di = data.iterator();\n String key2;\n\n while (di.hasNext())\n {\n ArrayList<String> row = di.next();\n\n Iterator<Integer> kci = keyCols.iterator();\n StringBuffer buf = new StringBuffer();\n while (kci.hasNext())\n {\n Integer i = kci.next();\n String value = row.get(i);\n buf.append(value + '_');\n }\n key2 = new String(StringUtils.chop(buf.toString()));\n key2 = key2.toUpperCase();\n\n SampleWithProperties s = new SampleWithProperties(key2);\n\n // now have to add properties\n Iterator<Integer> pi = spts.keySet().iterator();\n while (pi.hasNext())\n {\n Integer key3 = pi.next();\n String val = row.get(key3);\n val = val.toUpperCase();\n s.addProperty(spts.get(key3), val);\n }\n swp.add(s);\n }\n }", "static double[][] makeTestData() {\n double[][] data = new double[21][2];\n double xmax = 5;\n double xmin = -5;\n double dx = (xmax - xmin) / (data.length -1);\n for (int i = 0; i < data.length; i++) {\n double x = xmin + dx * i;\n double y = 2.5 * x * x * x - x * x / 3 + 3 * x;\n data[i][0] = x;\n data[i][1] = y;\n }\n return data;\n }", "public void create_dataset(double sampling_rate, double freq, int n) {\n double amplitude = 10.0d;\n double constant = freq/sampling_rate*2.0d*Math.PI;\n double sumTWD=0.0d;\n\n for (int i = 0; i < n; i++) {\n NavigationTools.TWD.add((Math.sin((double)i*constant)+Math.random()*0.2d)*amplitude);\n sumTWD += NavigationTools.TWD.getLast();\n }\n\n NavigationTools.TWD_longAVG=sumTWD/(double)n;\n }", "private void generateData(int popsize, int ntrials) {\n data = new double[ntrials][100];\n \n for (int i = 0; i < ntrials; i++) {\n Population pop = new Population(popsize, rand);\n for (int j = 0; j < 100; j++) {\n data[i][j] = pop.totalA();\n pop.advance();\n }\n }\n }", "private MolecularSample createTestSample() {\n testMolecularSample = new MolecularSample();\n testMolecularSample.setName(TEST_MOLECULAR_SAMPLE_NAME_CREATE);\n testMolecularSample.setMaterialSample(TEST_MATERIAL_SAMPLE_UUID);\n testMolecularSample.setSampleType(TEST_MOLECULAR_SAMPLE_SAMPLE_TYPE);\n \n persist(testMolecularSample);\n \n return testMolecularSample;\n }", "List<Pair<String, byte[]>> generateSample(Object descriptor);", "@DataProvider(name = \"test1\")\n\tpublic Object[][] createData1() {\n\t return new Object[][] {\n\t { \"Cedric\", new Integer(36) },\n\t { \"Anne\", new Integer(37)},\n\t };\n\t}", "static void createDataForGraph() {\n double x = 2;\n String fileName = \"./lab1part2docs/dataRec.csv\";\n createFile(fileName);\n writeToFile(\"k,halfCounter,oneCounter,x=\" + x + \"\\n\", fileName);\n for (int k = 1; k <= 10000; k++) {\n Raise.runBoth(x, k);\n writeToFile(k + \",\" + Raise.recHalfCounter + \",\" + Raise.recOneCounter + '\\n', fileName);\n Raise.recHalfCounter = 0;\n Raise.recOneCounter = 0;\n }\n System.out.println(\"Finished\");\n }", "@DataProvider(name = \"test1\")\n\tpublic Object [][] createData1() {\n\t\treturn new Object [][] {\n\t\t\tnew Object [] { 0, 0 },\n\t\t\tnew Object [] { 9, 2 },\n\t\t\tnew Object [] { 15, 0 },\n\t\t\tnew Object [] { 32, 0 },\n\t\t\tnew Object [] { 529, 4 },\n\t\t\tnew Object [] { 1041, 5 },\n\t\t\tnew Object [] { 65536, 0 },\n\t\t\tnew Object [] { 65537, 15 },\n\t\t\tnew Object [] { 100000, 4 }, \n\t\t\tnew Object [] { 2147483, 5 },\n\t\t\tnew Object [] { 2147483637, 1 }, //max - 10\n\t\t\tnew Object [] { 2147483646, 0 }, //max - 1\n\t\t\tnew Object [] { 2147483647, 0 } //max\n\t\t};\n\t}", "private DataSet normalDataSet(){\n //create normal distribution with mean .05 and sd .05/3 so that 99.7% of events are < .1\n NormalDistribution normalDistribution = new NormalDistribution(TARGET_MEAN, TARGET_MEAN/3D);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, normalDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "private void setTestData() {\n\t\tCollections.shuffle(input);\n\t\ttestData = new LinkedList<>();\n\t\tfor (int i = 0; i < TEST_DATA_SIZE; i++) {\n\t\t\ttestData.add(input.remove(0));\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate static void createTestData() {\n\t\t\n\t\tusers.put(\"User0\", objectHandler.createUser(25.0));\n\t\tusers.put(\"User1\", objectHandler.createUser(1.0));\n\t\t\n\t\tdocuments.put(\"Doc0\", objectHandler.createDocument(\"mydoc\", 25, '4', 'C'));\n\t\tdocuments.put(\"Doc1\", objectHandler.createDocument(\"another\", 15, '3', 'B'));\n\t\t\n\t\tusers.get(\"User0\").addDocument(documents.get(\"Doc0\"));\n\t\tusers.get(\"User1\").addDocument(documents.get(\"Doc1\"));\n\t\t\n\t\tPrinterCapability capability1 = objectHandler.createPrinterCapability(true, false, true, true);\n\t\tPrinterCapability capability2 = objectHandler.createPrinterCapability(false, true, true, false);\n\t\tPrinterCapability capability3 = objectHandler.createPrinterCapability(false, true, true, false);\n\t\t\n\t\tPrinterPricing pricing = objectHandler.createPrinterPricing(0.03, 0.14, 0.06, 0.24);\n\t\t\n\t\tPrinterCapacity capacity1 = objectHandler.createPrinterCapacity(25, 0, 10, 30);\n\t\tPrinterCapacity capacity2 = objectHandler.createPrinterCapacity(0, 10, 15, 0);\n\t\tPrinterCapacity capacity3 = objectHandler.createPrinterCapacity(0, 10, 15, 0);\n\t\t\n\t\tprinters.put(\"Printer0\", objectHandler.createPrinter(\"A4All\", capability1, pricing, capacity1, objectHandler.createPrinterStatus()));\n\t\tprinters.put(\"Printer1\", objectHandler.createPrinter(\"A3B\", capability2, pricing, capacity2, objectHandler.createPrinterStatus()));\n\t\tprinters.put(\"Printer2\", objectHandler.createPrinter(\"A3B-rip\", capability3, pricing, capacity3, objectHandler.createPrinterStatus()));\n\t\t\n\t\tVDMSet status = new VDMSet();\n\t\tstatus.add(\"needFixing\");\n\t\tprinters.get(\"Printer2\").break_(status);\n\t}", "private static void createDemoData() {\n if (userManager.user_map.isEmpty() || accountManager.account_map.isEmpty() || banknoteManager.banknotes.isEmpty()) {\n if (userManager.user_map.isEmpty()) {\n userManager.createAccount(BankManager.class.getSimpleName(), \"jen\", \"1234\");\n userManager.createAccount(Teller.class.getSimpleName(), \"pete\", \"1234\");\n userManager.createAccount(Customer.class.getSimpleName(), \"steve\", \"1234\");\n }\n\n if (accountManager.account_map.isEmpty()) {\n accountManager.addAccount(CreditCard.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Youth.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Saving.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(Chequing.class.getSimpleName(), Collections.singletonList(\"steve\"));\n accountManager.addAccount(CreditLine.class.getSimpleName(), Collections.singletonList(\"steve\"));\n }\n\n if (banknoteManager.banknotes.isEmpty()) {\n banknoteManager.banknotes = new HashMap<>();\n for (int d : banknoteManager.DENOMINATIONS) {\n banknoteManager.banknotes.put(String.valueOf(d), 50);\n }\n }\n }\n }", "org.hl7.fhir.SampledData addNewValueSampledData();", "public void prepareData(){\n\tAssert.pre( data!=null, \"data must be aquired first\");\n\t//post: creates a vector of items with a maximum size, nullifies the original data. This prevents us from having to loop through the table each time we need a random charecter (only once to prepare the table). this saves us more time if certain seeds are used very often.\n\n\t//alternate post: changes frequencies in data vector to the sum of all the frequencies so far. would have to change getrandomchar method\n\n\n\t //if the array is small, we can write out all of the Strings\n\t \n\ttable = new Vector(MAX_SIZE);\n\n\tif (total < MAX_SIZE){\n\t\t\n\t\n\t\t//steps through data, creating a new vector\n\t\tfor(int i = 0; i<data.size(); i++){\n\n\t\t count = data.get(i);\n\n\t\t Integer fr = count.getValue();\n\t\t int f = fr.intValue();\n\n\t\t if(total<MAX_SIZE){\n\t\t\tf = (f*MAX_SIZE)/total;\n\t\t }\n\t\t\t\n\t\t //ensures all are represented (biased towards small values)\n\t\t //if (f == 0){ f == 1;}\n\n\n\t\t String word = (String)count.getKey();\n\t \n\t\t for (int x = 0; x< f; x++){\n\t\t\ttable.add( word);\n\t\t }\n\n\t\t}\n\t }\n\n\t//because of division with ints, the total might not add up 100.\n\t//so we redefine the total at the end of this process\n\ttotal = table.size();\n\n\t //we've now prepared the data\n\t dataprepared = true;\n\n\t //removes data ascociations to clear memory\n\t data = null;\n\t}", "private void createTestData(OHLCSeriesCollection seriesCollection) {\n\t OHLCSeries series = seriesCollection.getSeries(0);\n\t for (int i = 0; i < 10; i++) {\n\t // Generate new bar time\n\t Calendar cal = Calendar.getInstance();\n\t cal.add(Calendar.MINUTE, i);\n\t FixedMillisecond fm = new FixedMillisecond(cal.getTime());\n\t // Add bar to the data. Let's repeat the same bar\n\t series.add(fm, 100, 110, 90, 105);\n\t }\n\t}", "public void generateRandomVaraibles() {\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (!var.getType().equals(\"LOCAL_DATA\") && !var.getType().equals(\"OUTPUT_DATA\")) {\r\n\t\t\t\tif (var.getType().equals(\"boolean\") || var.getType().equals(\"Boolean\")) {\r\n\t\t\t\t\tvar.setValue(String.valueOf(getRandomBoolean()));\r\n\r\n\t\t\t\t} else if (var.getType().equals(\"int\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(Integer.parseInt(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tInteger.parseInt(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(0, 100)));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (var.getType().equals(\"double\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(Double.parseDouble(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tDouble.parseDouble(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(0.0, 100.0)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static CategoryDataset createSampleDataset() {\n \t\n \t// row keys...\n final String series1 = \"Expected\";\n final String series2 = \"Have\";\n final String series3 = \"Goal\";\n\n // column keys...\n final String type1 = \"Type 1\";\n final String type2 = \"Type 2\";\n final String type3 = \"Type 3\";\n final String type4 = \"Type 4\";\n final String type5 = \"Type 5\";\n final String type6 = \"Type 6\";\n final String type7 = \"Type 7\";\n final String type8 = \"Type 8\";\n\n // create the dataset...\n final DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\n dataset.addValue(1.0, series1, type1);\n dataset.addValue(4.0, series1, type2);\n dataset.addValue(3.0, series1, type3);\n dataset.addValue(5.0, series1, type4);\n dataset.addValue(5.0, series1, type5);\n dataset.addValue(7.0, series1, type6);\n dataset.addValue(7.0, series1, type7);\n dataset.addValue(8.0, series1, type8);\n\n dataset.addValue(5.0, series2, type1);\n dataset.addValue(7.0, series2, type2);\n dataset.addValue(6.0, series2, type3);\n dataset.addValue(8.0, series2, type4);\n dataset.addValue(4.0, series2, type5);\n dataset.addValue(4.0, series2, type6);\n dataset.addValue(2.0, series2, type7);\n dataset.addValue(1.0, series2, type8);\n\n dataset.addValue(4.0, series3, type1);\n dataset.addValue(3.0, series3, type2);\n dataset.addValue(2.0, series3, type3);\n dataset.addValue(3.0, series3, type4);\n dataset.addValue(6.0, series3, type5);\n dataset.addValue(3.0, series3, type6);\n dataset.addValue(4.0, series3, type7);\n dataset.addValue(3.0, series3, type8);\n\n return dataset;\n \n }", "private void fillObservationsData() {\n\n // retrieve all oindex records\n// List<Oindex> oindexList = this.servicioApp.getMeasurementOindexListByStudy(workbookStudy.getStudy().getStudyid(), effectid);\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n\n int variateCount = this.workbookStudy.getVariates().size();\n\n List<Measurement> measurementList = new ArrayList<Measurement>();\n //todo quitar no se usa\n// int observationsCount = this.servicioApp.getObservationsCount(studyId);\n log.info(\"Getting Data Trial ...\");\n List<Object> dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n log.info(\"Getting Data Trial Done...\");\n \n log.info(\"Getting List of Obsunit ...\");\n List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n log.info(\"Getting List of Obsunit...\");\n for (Obsunit obsUnit : obsunits){\n Measurement measurement = new Measurement();\n\n measurement.initMeasurementData(variateCount);\n\n assignMeasurementData(measurement, obsUnit, dataList);\n\n measurementList.add(measurement);\n }\n\n\n workbookStudy.setMeasurements(measurementList);\n\n List<String> factorsReturn = getFactoresReturnList();\n log.info(\"Getting Trial Randomization ...\");\n ResultSet rst = servicioApp.getTrialRandomization(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n log.info(\"Getting Trial Randomization done\");\n fillFactorLabelData(rst, factorsReturn);\n }", "private DataSet constantDataSet(){\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate taks with all 50 mills\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n tasks[i] = new Task(TARGET_MEAN, uuid);\n }\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "private void initData() {\n\t}", "private void initData() {\n }", "@DataProvider(name = \"getRandomData\")\r\n\r\n\tpublic Object[][] getData() {\r\n\r\n\t\tString workingdirectory = System.getProperty(\"user.dir\");\r\n\r\n\t\tLinkedHashMap<String, Integer> colNameToLocation = new LinkedHashMap<String, Integer>();\r\n\r\n\t\tString s[][] = utility.getDataFromCSV(workingdirectory + \"\\\\products.csv\", colNameToLocation);// from\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// utility\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// file\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// it\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// total\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// no\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// data\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// through\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// object\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// store\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// it\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// in\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// s\r\n\r\n\t\tString random[][] = null;\r\n\r\n\t\tif (isTotalCount) // this is the boolean value declared in the basetest\r\n\r\n\t\t\trandom = utility.getRandomNoFromCSV(s, s.length, colNameToLocation);\r\n\r\n\t\telse\r\n\r\n\t\t\trandom = utility.getRandomNoFromCSV(s, count, colNameToLocation);\r\n\r\n\t\treturn random;// here it stores the no of input from the testsuite file\r\n\t\t\t\t\t\t// i.e the user input\r\n\r\n\t}", "@DataProvider(name = \"zimPageShowNotesPairs\")\n\tpublic\n\tObject[][] createData1()\n\t{\n\t\treturn new Object[][]\n\t\t\t{\n\t\t\t\t{\":UbuntuPodcast:s10:e05\", \"http://ubuntupodcast.org/2017/04/06/s10e05-supreme-luxuriant-gun/\"},\n\t\t\t};\n\t}", "private void createDummyData() {\n YangInstanceIdentifier yiid;\n // create 2 links (stored in waitingLinks)\n LeafNode<String> link1Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_1);\n LeafNode<String> link2Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_3);\n\n ContainerNode source1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link1Source).build();\n ContainerNode source2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link2Source).build();\n\n LeafNode<String> link1Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_2);\n LeafNode<String> link2Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_4);\n ContainerNode dest1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link1Dest).build();\n ContainerNode dest2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link2Dest).build();\n\n MapEntryNode link1 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_1)\n .withChild(source1Container).withChild(dest1Container).build();\n MapEntryNode link2 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_2)\n .withChild(source2Container).withChild(dest2Container).build();\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_1);\n UnderlayItem item = new UnderlayItem(link1, null, TOPOLOGY_ID, LINK_ID_1, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_2);\n item = new UnderlayItem(link2, null, TOPOLOGY_ID, LINK_ID_2, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create 2 supporting nodes under two overlay nodes\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1).build();\n Map<QName, Object> suppNode1KeyValues = new HashMap<>();\n suppNode1KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode1KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_1);\n MapEntryNode menSuppNode1 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode1KeyValues)).build();\n MapNode suppNode1List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode1).build();\n MapEntryNode overlayNode1 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1)\n .addChild(suppNode1List).build();\n item = new UnderlayItem(overlayNode1, null, TOPOLOGY_ID, OVERLAY_NODE_ID_1, CorrelationItemEnum.Node);\n // overlayNode1 is created\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2).build();\n Map<QName, Object> suppNode2KeyValues = new HashMap<>();\n suppNode2KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode2KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_2);\n MapEntryNode menSuppNode2 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode2KeyValues)).build();\n MapNode suppNode2List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode2).build();\n MapEntryNode overlayNode2 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2)\n .addChild(suppNode2List).build();\n item = new UnderlayItem(overlayNode2, null, TOPOLOGY_ID, OVERLAY_NODE_ID_2, CorrelationItemEnum.Node);\n // overlayNode2 is created and link:1 is matched\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create a third supporting node under a third overlay node\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3).build();\n Map<QName, Object> suppNode3KeyValues = new HashMap<>();\n suppNode3KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode3KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_3);\n MapEntryNode menSuppNode3 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode3KeyValues)).build();\n MapNode suppNode3List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode3).build();\n MapEntryNode node3 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3)\n .addChild(suppNode3List).build();\n item = new UnderlayItem(node3, null, TOPOLOGY_ID, OVERLAY_NODE_ID_3, CorrelationItemEnum.Node);\n\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create another matched link (link:3)\n LeafNode<String> link3Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_2);\n ContainerNode source3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link3Source).build();\n LeafNode<String> link3Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_3);\n ContainerNode dest3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link3Dest).build();\n MapEntryNode link3 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_3)\n .withChild(source3Container).withChild(dest3Container).build();\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_3);\n item = new UnderlayItem(link3, null, TOPOLOGY_ID, LINK_ID_3, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n }", "private void run() {\n\t\tfor (int i = 0; i < 1000; i++){\n\t\t\t\n\t\t\tdouble sample = Math.random()*2.0;\n\t\t\tdataset.addObservation(sample);\n\t\t\t\n\t\t\t// stats\n\t\t\tsum += sample;\n\t\t\tn++;\n\t\t\tav = sum/n;\n\n\t\t\t// create new xy dataset\n\t\t\n\t\t\ttry {Thread.sleep(1000L);} catch (Exception e) {}\n\t\t\t\n\t\t}\n\t\t\n\t\t \n\t}", "private void initData() {\n\n }", "void makeSampleGraph() {\n\t\tg.addVertex(\"a\");\n\t\tg.addVertex(\"b\");\n\t\tg.addVertex(\"c\");\n\t\tg.addVertex(\"d\");\n\t\tg.addVertex(\"e\");\n\t\tg.addVertex(\"f\");\n\t\tg.addVertex(\"g\");\n\t\tg.addEdge(\"a\", \"b\");\n\t\tg.addEdge(\"b\", \"c\");\n\t\tg.addEdge(\"b\", \"f\");\n\t\tg.addEdge(\"c\", \"d\");\n\t\tg.addEdge(\"d\", \"e\");\n\t\tg.addEdge(\"e\", \"f\");\n\t\tg.addEdge(\"e\", \"g\");\n\t}", "public abstract FastqSampleGroup create(File sampleDir) throws IOException;", "private static ArrayList<double[]> createSamples(double p, int n) {\n\t\tArrayList<double[]> result = new ArrayList<double[]>();\n\t\tint cutoff = (int) Math.round(n * p);\n\t\tfor (int i = 0; i < cutoff; i++) result.add(new double[] {1});\n\t\tfor (int i = cutoff; i < n; i++) result.add(new double[] {0});\n\t\treturn result;\n\t}", "private XYDataset createDataset() {\n\t\tfinal XYSeriesCollection dataset = new XYSeriesCollection( ); \n\t\tdataset.addSeries(trainErrors); \n\t\tdataset.addSeries(testErrors);\n\t\treturn dataset;\n\t}", "private DefaultCategoryDataset createDataset() {\n\t\t\n\t\tdataset.clear();\n\t\t\n\t\t// Query HIM to submit data for bar chart display \n\t\tHistoricalInfoMgr.getChartDataset(expNum);\n\n\n\t\treturn dataset; // add the data point (y-value, variable, x-value)\n\t}", "private void initDataset(){\n dataSet.add(\"Karin\");\n dataSet.add(\"Ingrid\");\n dataSet.add(\"Helga\");\n dataSet.add(\"Renate\");\n dataSet.add(\"Elke\");\n dataSet.add(\"Ursula\");\n dataSet.add(\"Erika\");\n dataSet.add(\"Christa\");\n dataSet.add(\"Gisela\");\n dataSet.add(\"Monika\");\n\n addDataSet.add(\"Anna\");\n addDataSet.add(\"Sofia\");\n addDataSet.add(\"Emilia\");\n addDataSet.add(\"Emma\");\n addDataSet.add(\"Neele\");\n addDataSet.add(\"Franziska\");\n addDataSet.add(\"Heike\");\n addDataSet.add(\"Katrin\");\n addDataSet.add(\"Katharina\");\n addDataSet.add(\"Liselotte\");\n }", "@Test\n public void testSetValue() throws Exception {\n\n Map<String, IMetaData<SampleMark>> name2MetaData;\n name2MetaData = factory.class2MetaDataByFullPath(Person.class);\n\n for (Person p : persons) {\n\n float weight = SampleDataGenerator.getSampleWeight(random, p.weight);\n int age = p.getAge();\n String lastName = p.getLastname();\n\n IMetaData<SampleMark> metaData =\n name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|weight\");\n metaData.setValue(p, weight);\n Person.assertPerson(p, lastName, weight, age);\n }\n\n for (Person p : persons) {\n\n float weight = p.weight;\n int age = p.getAge();\n String lastName =\n SampleDataGenerator.getSampleLastName(random, p.getLastname());\n IMetaData<SampleMark> metaData =\n name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|lastname\");\n metaData.setValue(p, lastName);\n Person.assertPerson(p, lastName, weight, age);\n }\n\n name2MetaData = factory.class2MetaDataByFullPath(Car.class);\n for (Car c : cars) {\n\n Driver driver = c.getDriver();\n String lastName = driver.getLastname();\n float weight = SampleDataGenerator.getSampleWeight(random, driver.weight);\n int age = driver.getAge();\n boolean hasDrivingLicense = driver.hasDrivingLicense;\n\n Engine engine = c.getEngine();\n String productName =\n SampleDataGenerator.getSampleProductName(random, engine.productName);\n\n Oil oil = engine.oil;\n String producentName = oil.producentName;\n String vendorName = oil.vendorName;\n\n IMetaData<SampleMark> metaData =\n name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|weight\");\n\n metaData.setValue(c, weight);\n\n metaData =\n name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|productName\");\n\n metaData.setValue(c, productName);\n\n Driver.assertDriver(driver, lastName, weight, age,\n hasDrivingLicense);\n\n Engine.assertEngine(engine, productName);\n\n Oil.assertOil(oil, vendorName, producentName);\n\n }\n\n }", "protected abstract D createData();", "private void fillObservationsDataFast() {\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n// int variateCount = this.workbookStudy.getVariates().size();\n \n List<String> factorsReturn = getFactoresReturnList();\n \n fillFactorLabelDataOptimized(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n \n// List<Measurement> measurementList = workbookStudy.getMeasurements();\n \n// log.info(\"Getting Data Trial ...\");\n// List<Object> dataList;\n// if(! workbookStudy.getVariates().isEmpty()){\n// dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n// }else{\n// dataList = new ArrayList<Object>();\n// }\n// log.info(\"Getting Data Trial Done...\");\n// \n// \n// log.info(\"Getting List of Obsunit ...\");\n// List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n// log.info(\"Getting List of Obsunit...\");\n// int rowIndex = 0;\n// for (Obsunit obsUnit : obsunits) {\n// Measurement measurement = measurementList.get(rowIndex);\n// measurement.initMeasurementData(variateCount);\n//\n// assignMeasurementData(measurement, obsUnit, dataList);\n// rowIndex++;\n// }\n }", "private void printSampleData() {\n\n System.out.println(\"Sentences: \" + sentenceList.size());\n System.out.println(\"Words before cleanup: \" + map.size());\n }", "void permutateObjects()\n {\n for (int i = 0; i < sampleObjects.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleStrings[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleNumbers[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n specialValues[r.nextInt(2)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleArrays[r.nextInt(5)]);\n }\n }\n }", "public Object clone(){\r\n\t\tSampleData obj = new SampleData(letter,getWidth(),getHeight());\r\n\t\tfor ( int y=0;y<getHeight();y++ )\r\n\t\t\tfor ( int x=0;x<getWidth();x++ )\r\n\t\t\t\tobj.setData(x,y,getData(x,y));\r\n\t\treturn obj;\r\n\t}", "public SimpleDataGenerator() {\n\n names.add(\"Anna\");\n names.add(\"Maria\");\n names.add(\"Angela\");\n names.add(\"Monika\");\n names.add(\"Agnieszka\");\n names.add(\"Agnieszka\");\n names.add(\"Natalia\");\n names.add(\"Andzrzej\");\n names.add(\"Ferdynand\");\n names.add(\"Mateusz\");\n names.add(\"Adam\");\n names.add(\"Wojciech\");\n names.add(\"Robert\");\n names.add(\"Jerzy\");\n names.add(\"Jakub\");\n names.add(\"Patryk\");\n names.add(\"Alekasnder\");\n names.add(\"Lech\");\n names.add(\"Antoni\");\n names.add(\"Marian\");\n\n surnames.add(\"Kowalski\");\n surnames.add(\"Nowak\");\n surnames.add(\"Brzozowski\");\n surnames.add(\"Kaczynski\");\n surnames.add(\"Ziobro\");\n surnames.add(\"Macierewicz\");\n surnames.add(\"Kopacz\");\n surnames.add(\"Tusk\");\n surnames.add(\"Szydlo\");\n surnames.add(\"Niesiolowski\");\n surnames.add(\"Grodzki\");\n surnames.add(\"Szpak\");\n surnames.add(\"Kiepski\");\n surnames.add(\"Aleksandrowicz\");\n surnames.add(\"Wyrostek\");\n surnames.add(\"Gibala\");\n surnames.add(\"Marcinkiewicz\");\n surnames.add(\"Mrozowicz\");\n surnames.add(\"Olechowski\");\n surnames.add(\"Duda\");\n surnames.add(\"Thrump\");\n\n products.add(\"Komputer\");\n products.add(\"Myszka\");\n products.add(\"Monitor\");\n products.add(\"Klawiatura\");\n products.add(\"Kawa\");\n products.add(\"Herbata\");\n }", "void permutateArrays()\n {\n for (int i = 0; i < sampleArrays.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToArray(sampleArrays[i], sampleStrings[r.nextInt(5)]);\n addToArray(sampleArrays[i], sampleNumbers[r.nextInt(5)]);\n addToArray(sampleArrays[i], sampleObjects[r.nextInt(5)]);\n addToArray(sampleArrays[i], specialValues[r.nextInt(2)]);\n }\n }\n }", "public void initData() {\n }", "public void initData() {\n }", "private DataSet caucyDataSet(){\n CauchyDistribution cauchyDistribution = new CauchyDistribution(TARGET_MEAN, TARGET_MEAN/10);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, cauchyDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "private List<Integer> createData() {\r\n\t\tList<Integer> data = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "private Dataset prepareDataset() {\n // create TAPIR dataset with single endpoint\n Dataset dataset = new Dataset();\n dataset.setKey(UUID.randomUUID());\n dataset.setTitle(\"Beavers\");\n dataset.addEndpoint(endpoint);\n\n // add single Contact\n Contact contact = new Contact();\n contact.setKey(1);\n contact.addEmail(\"[email protected]\");\n dataset.setContacts(Lists.newArrayList(contact));\n\n // add single Identifier\n Identifier identifier = new Identifier();\n identifier.setKey(1);\n identifier.setType(IdentifierType.GBIF_PORTAL);\n identifier.setIdentifier(\"450\");\n dataset.setIdentifiers(Lists.newArrayList(identifier));\n\n // add 2 MachineTags 1 with metasync.gbif.org namespace, and another not having it\n List<MachineTag> machineTags = Lists.newArrayList();\n\n MachineTag machineTag = new MachineTag();\n machineTag.setKey(1);\n machineTag.setNamespace(Constants.METADATA_NAMESPACE);\n machineTag.setName(Constants.DECLARED_COUNT);\n machineTag.setValue(\"1000\");\n machineTags.add(machineTag);\n\n MachineTag machineTag2 = new MachineTag();\n machineTag2.setKey(2);\n machineTag2.setNamespace(\"public\");\n machineTag2.setName(\"IsoCountryCode\");\n machineTag2.setValue(\"DK\");\n machineTags.add(machineTag2);\n\n dataset.setMachineTags(machineTags);\n\n // add 1 Tag\n Tag tag = new Tag();\n tag.setKey(1);\n tag.setValue(\"Invasive\");\n dataset.setTags(Lists.newArrayList(tag));\n\n return dataset;\n }", "private void createData() {\n//\n// tour = new Tour();\n// tour.setTitle(\"Death Valley\");\n// tour.setDescription(\"A tour to Death Valley\");\n// tour.setPrice(900);\n// tour.setImage(\"death_valley\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n//\n// tour = new Tour();\n// tour.setTitle(\"San Francisco\");\n// tour.setDescription(\"A tour to San Francisco\");\n// tour.setPrice(1200);\n// tour.setImage(\"san_francisco\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n\n ToursPullParser parser = new ToursPullParser();\n tours = parser.parseXML(this);\n\n for (Tour tour : tours) {\n dataSource.create(tour);\n }\n\n }", "public void createListData()\n {\n List<SinhVien> listSinhvien=new ArrayList<>();\n for(int i=0;i<10;i++){\n SinhVien sv=new SinhVien(i+\"\",\"123\",\"0123\",i+1.0f);\n listSinhvien.add(sv);\n }\n PresenterImplDangXuat.onLoadSucess(listSinhvien);\n }", "public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}", "private PieData generateDataPie(int cnt) {\n\n ArrayList<PieEntry> entries = new ArrayList<PieEntry>();\n\n for (int i = 0; i < 4; i++) {\n entries.add(new PieEntry((float) ((Math.random() * 70) + 30), \"Quarter \" + (i+1)));\n }\n\n PieDataSet d = new PieDataSet(entries, \"\");\n\n // space between slices\n d.setSliceSpace(2f);\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n\n PieData cd = new PieData(d);\n return cd;\n }", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "private BarData generateDataBar(int cnt) {\n\n ArrayList<BarEntry> entries = new ArrayList<BarEntry>();\n\n for (int i = 0; i < 12; i++) {\n entries.add(new BarEntry(i, (int) (Math.random() * 70) + 30));\n }\n\n BarDataSet d = new BarDataSet(entries, \"New DataSet \" + cnt);\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n d.setHighLightAlpha(255);\n\n BarData cd = new BarData(d);\n cd.setBarWidth(0.9f);\n return cd;\n }", "private void testData() {\r\n\r\n // Setup for a function of the type y = c0 + c1*exp(c2*x) + c3*exp(c4*x)\r\n\r\n xSeries[0] = 0;\r\n ySeries[0] = 1 + 2 + 3;\r\n\r\n xSeries[1] = 1;\r\n ySeries[1] = 1 + (2 * Math.exp(-0.3)) + (3*Math.exp(-0.5));\r\n\r\n xSeries[2] = 2;\r\n ySeries[2] = 1 + (2 * Math.exp(-0.6)) + (3*Math.exp(-1.0));\r\n\r\n xSeries[3] = 3;\r\n ySeries[3] = 1 + (2 * Math.exp(-0.9)) + (3 * Math.exp(-1.5));\r\n\r\n xSeries[4] = 4;\r\n ySeries[4] = 1 + (2 * Math.exp(-1.2)) + (3 * Math.exp(-2.0));\r\n }", "public void generateDemoData() {\n for (int values = 0; values < votersAmt.size(); values++) {\n int n = votersAmt.get(values),\n m = candidatesAmt.get(values);\n for (int game = 1; game <= 20; game++) {\n try {\n String gameContent = \"\";\n for (int i = 0; i < n; i++) {\n // Mapping values so that voters can vote each candidate strictly once.\n List<String> candidatesPerVoter = new ArrayList<String>();\n for (int j = 0; j < m; j++) {\n int x = ThreadLocalRandom.current().nextInt(1, m);\n while (candidatesPerVoter.contains(\"C\"+x)) x = ThreadLocalRandom.current().nextInt(1, m + 1);\n candidatesPerVoter.add(\"C\" + x);\n }\n for (String candidate : candidatesPerVoter) {\n gameContent += (candidate + \" \");\n }\n if (i < n - 1) gameContent += \"\\n\";\n }\n\n String writingPolicy = \"plurality\";\n PrintWriter pw1 = new PrintWriter(outputDataRepository + \"/game\" + game + \"_\" + n + \"_\" + m + \"_\" + writingPolicy + \"_results.txt\");\n pw1.write(writingPolicy + \"\\n\" + gameContent); pw1.flush(); pw1.close();\n\n writingPolicy = \"borda\";\n PrintWriter pw2 = new PrintWriter(outputDataRepository + \"/game\" + game + \"_\" + n + \"_\" + m + \"_\" + writingPolicy + \"_results.txt\");\n pw2.write(writingPolicy + \"\\n\" + gameContent); pw2.flush(); pw2.close();\n } catch (FileNotFoundException exc) {\n System.err.println(\"Error writing file to disk; please check relevant permissions.\");\n exc.printStackTrace();\n }\n }\n }\n }", "public static void resample(){\n System.out.println(\"Type in how many random people you want in the db\");\n String s = sc.nextLine();\n int sampleSize = getValidSampleCount(s);\n Db.getDb().resampleDb(sampleSize);\n System.out.println(\"New sample of \" + s + \" generated.\");\n }", "@BeforeClass\n\tpublic static void setup() {\n\t\tHotel hotel = new Hotel();\n\t\thotel.setName(\"Hennessy Pub\");\n\t\tfinal DateFormat formatDate = new SimpleDateFormat(\"hh:mm a\");\n\t\tTimeSlot slot = new TimeSlot();\n\t\ttry {\n\t\t\tslot.setEndTime((Date)formatDate.parse(\"2:00 am\"));\n\t\t\tslot.setStartTime((Date)formatDate.parse(\"11:30 am\"));\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tMap<Integer, TimeSlot> timeSlots = new HashMap<>(); \n\t\ttimeSlots.put(1, slot);\n\t\ttimeSlots.put(2, slot);\n\t\ttimeSlots.put(7, slot);\n\t\thotel.setTimeSlotsMap(timeSlots);\n\t\t\n\t\thotelsSampleData.add(hotel);\n\t\t\n\t}", "private void createFeatures() {\n\t\tfeatures = new Feature[NUM_FEATURES];\n\n\t\t// Create dummy feature\n\t\tfeatures[0] = new DummyFeature(width, height, 0, 0 - THRESHOLD);\n\n\t\t// Create the rest of the features\n\t\tfor (int i = 1; i < NUM_FEATURES; i++) {\n\t\t\tfeatures[i] = new Feature(width, height, i);\n\t\t}\n\t}", "private void fillData()\n {\n\n }", "void example13() {\n\t\t\n\t\t// create a list of zeroes\n\t\t\n\t\tIndexedDataSource<Float64Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.DBL.construct(), 1000);\n\n\t\t// now setup a view that will increment by 3 starting at the list[4] and steps\n\t\t// up to 100 times.\n\t\t\n\t\tIndexedDataSource<Float64Member> seqData =\n\t\t\t\tnew SequencedDataSource<Float64Member>(list, 4, 3, 100);\n\n\t\tseqData.size(); // size == 100\n\t\t\n\t\t// now set a bunch of values\n\t\t\n\t\tFloat64Member value = G.DBL.construct();\n\t\t\n\t\tfor (long i = 0; i < seqData.size(); i++) {\n\t\t\tvalue.setV(i);\n\t\t\tseqData.set(i, value);\n\t\t}\n\t\t\n\t\t// data = [0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, ...]\n\t}", "static void initSample1(){\n // put values into the sField\n sField[0][0] = \"X\";\n sField[0][1] = \"X\";\n sField[0][3] = \"X\";\n sField[0][4] = \"X\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \"O\";\n sField[1][8] = \"O\";\n }", "CreationData creationData();", "public void read_data(Connection connection, String query) throws SQLException {\n\t\tPreparedStatement pstmt = connection.prepareStatement(query);\n\t\tResultSet rs = pstmt.executeQuery();\n\t\t\n\t\t/* set feature num */\n\t\tthis.feature_num = rs.getMetaData().getColumnCount() - 1;\n\t\t/* read data */\n\t\twhile(rs.next()) {\n\t\t\tsvm_node[] sample = new svm_node[this.feature_num];\n\t\t\tfor (int i = 0; i < this.feature_num; i++) {\n\t\t\t\tsample[i] = new svm_node();\n\t\t\t\t/* set index */\n\t\t\t\tsample[i].index = i + 1;\n\t\t\t\t/* set value */\n\t\t\t\tif (rs.getObject(i + 2).getClass().getName() == \"java.lang.String\") {\n\t\t\t\t\tsample[i].value = stod(rs.getString(i + 2));\n\t\t\t\t} else if ((rs.getObject(i + 2).getClass().getName() == \"java.lang.Long\")\n\t\t\t\t\t\t|| (rs.getObject(i + 2).getClass().getName() == \"java.math.BigDecimal\")) {\n\t\t\t\t\tsample[i].value = rs.getDouble(i + 2);\n\t\t\t\t} else {\n\t\t\t\t\t// to be continued\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\toriginal_set.add(sample);\n\t\t labels.add(mklabel(stod(rs.getString(1))));\t// special_flag\n\t\t}\n\t\t\n\t\t/* set sample num */\n this.sample_num = original_set.size();\n\t \n\t /* end data preparation */\n System.out.println(\"Data preparation done! \" + this.get_sample_num() + \" samples in total\");\n\t\tif (rs != null) {\n\t\t\trs.close();\n\t\t}\n\t\tif (pstmt != null) {\n\t\t\tpstmt.close();\n\t\t}\n\t}", "public static void generateSeedData()\n\t{\n\t\teventIDCounter = 1; //set counter for ID of events to 1\n\t\t\n\t\t// generate the grid world\n\t\tfor(int i = 0; i <= (MAX_COORDS*2); i++)\n\t\t{\n\t\t\tfor(int j = 0; j <= (MAX_COORDS*2); j++)\n\t\t\t{\n\t\t\t\tgridWorld[i][j] = new Coordinate(i-MAX_COORDS,j-MAX_COORDS);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Assumption that there will be 1 event to every 10 coordinates\n\t\t// grid of 21*21=441, 441/10=44\n\t\tint numOfEvents = ((MAX_COORDS*2)+1)*((MAX_COORDS*2)+1)/10;\n\t\tEvent newEvent;\n\t\tint newXCoord;\n\t\tint newYCoord;\n\t\tTicket ticket;\n\t\tArrayList<Ticket> tickets;\n\t\t\n\t\tfor(int i = 1; i <= numOfEvents; i++)\n\t\t{\n\t\t\t// create random coordinates for new event\n\t\t\tnewXCoord = rand.nextInt(MAX_COORDS + 1 +MAX_COORDS) -MAX_COORDS;\n\t\t\tnewYCoord = rand.nextInt(MAX_COORDS + 1 +MAX_COORDS) -MAX_COORDS;\n\t\t\t\n\t\t\tnewEvent = new Event(i, gridWorld[newXCoord+MAX_COORDS][newYCoord+MAX_COORDS], \"Event \"+String.format(\"%03d\", i)); \n\t\t\t\n\t\t\t//create a random number of tickets between 0 and 5\n\t\t\ttickets = new ArrayList<Ticket>(); // clear all tickets in the arraylist\n\t\t\tfor(int j = 0; j < 4; j++)\n\t\t\t{\n\t\t\t\tint num = rand.nextInt(5000 - 1000) +1000; // create price in cents, from $10 to $50 \n\t\t\t\tdouble price = num/100.0; // convert to double\n\t\t\t\tticket = new BasicTicket((new BigDecimal(price)).setScale(2, RoundingMode.CEILING));\n\t\t\t\ttickets.add(ticket);\n\t\t\t}\n\t\t\tnewEvent.setTickets(tickets);\n\t\t\t\t\n\t\t\t// set the grid coordinate to have this event\n\t\t\tgridWorld[newXCoord+MAX_COORDS][newYCoord+MAX_COORDS].setEvent(newEvent);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// Add a couple of events hard coded first for testing\n\t\t/*Event newEvent1 = new Event(gridWorld[18][20], \"Event 001\"); //distance of 18 from 0,0\n\t\tgridWorld[18][20].setEvent(newEvent1);\n\t\t\n\t\tEvent newEvent2 = new Event(gridWorld[9][10], \"Event 002\"); //distance of 1 from 0,0\n\t\tgridWorld[9][10].setEvent(newEvent2);\n\t\t\n\t\tEvent newEvent3 = new Event(gridWorld[8][5], \"Event 003\"); //distance of 7 from 0,0\n\t\tgridWorld[8][5].setEvent(newEvent3);\n\t\t\n\t\tEvent newEvent4 = new Event(gridWorld[10][14], \"Event 004\"); //distance of 4 from 0,0\n\t\tgridWorld[10][14].setEvent(newEvent4);\n\t\t\n\t\tEvent newEvent5 = new Event(gridWorld[10][11], \"Event 005\"); //distance of 1 from 0,0\n\t\tgridWorld[10][11].setEvent(newEvent5);\n\t\t\n\t\tEvent newEvent6 = new Event(gridWorld[5][10], \"Event 006\"); //distance of 5 from 0,0\n\t\tgridWorld[5][10].setEvent(newEvent6);\n\t\t\n\t\tEvent newEvent7 = new Event(gridWorld[11][12], \"Event 007\"); //distance of 3 from 0,0\n\t\tgridWorld[11][12].setEvent(newEvent7);\n\t\t\n\t\tEvent newEvent8 = new Event(gridWorld[0][0], \"Event 008\"); //distance of 20 from 0,0\n\t\tgridWorld[0][0].setEvent(newEvent8);*/\n\t\t\n\t\t\n\t\t\n\t}", "private static List<Point> createConvergingDataset() {\r\n List<Point> data = new ArrayList<Point>();\r\n add(data, 1, 400);\r\n add(data, 5, 700);\r\n add(data, 10, 900);\r\n add(data, 15, 1000);\r\n add(data, 20, 1050);\r\n add(data, 25, 1060);\r\n add(data, 30, 1062);\r\n return data;\r\n }", "private void createTestDataSet() throws Exception {\n LOG.info(\"creating test data set...\"); \n Database db = null;\n try {\n db = this._category.getDatabase();\n db.begin();\n\n LazyEmployee person = new LazyEmployee();\n person.setFirstName(\"First\");\n person.setLastName(\"Person\");\n person.setBirthday(JDO_ORIGINAL_DATE);\n person.setStartDate(JDO_ORIGINAL_DATE);\n\n LazyAddress address1 = new LazyAddress();\n address1.setId(1);\n address1.setStreet(Integer.toString(1) + JDO_ORIGINAL_STRING);\n address1.setCity(\"First City\");\n address1.setState(\"AB\");\n address1.setZip(\"10000\");\n address1.setPerson(person);\n\n LazyAddress address2 = new LazyAddress();\n address2.setId(2);\n address2.setStreet(Integer.toString(2) + JDO_ORIGINAL_STRING);\n address2.setCity(\"Second City\");\n address2.setState(\"BC\");\n address2.setZip(\"22222\");\n address2.setPerson(person);\n\n LazyAddress address3 = new LazyAddress();\n address3.setId(3);\n address3.setStreet(Integer.toString(3) + JDO_ORIGINAL_STRING);\n address3.setCity(\"Third Ave\");\n address3.setState(\"AB\");\n address3.setZip(\"30003\");\n address3.setPerson(person);\n\n ArrayList addresslist = new ArrayList();\n addresslist.add(address1);\n addresslist.add(address2);\n addresslist.add(address3);\n\n person.setAddress(addresslist);\n\n LazyPayRoll pr1 = new LazyPayRoll();\n pr1.setId(1);\n pr1.setHoliday(15);\n pr1.setHourlyRate(25);\n pr1.setEmployee(person);\n person.setPayRoll(pr1);\n\n LazyContractCategory cc = new LazyContractCategory();\n cc.setId(101);\n cc.setName(\"Full-time slave\");\n db.create(cc);\n\n LazyContractCategory cc2 = new LazyContractCategory();\n cc2.setId(102);\n cc2.setName(\"Full-time employee\");\n db.create(cc2);\n \n ArrayList category = new ArrayList();\n category.add(cc);\n category.add(cc2);\n\n LazyContract con = new LazyContract();\n con.setPolicyNo(1001);\n con.setComment(\"80 hours a week, no pay hoilday, \"\n + \"no sick leave, arrive office at 7:30am everyday\");\n con.setContractNo(78);\n con.setEmployee(person);\n con.setCategory(category);\n person.setContract(con);\n \n db.create(person);\n \n db.commit();\n db.close();\n } catch (Exception e) {\n LOG.error(\"createTestDataSet: exception caught\", e);\n throw e;\n }\n }", "private LineData generateDataLine(int cnt) {\n\n ArrayList<Entry> e1 = new ArrayList<Entry>();\n\n for (int i = 0; i < 12; i++) {\n e1.add(new Entry(i, (int) (Math.random() * 65) + 40));\n }\n\n LineDataSet d1 = new LineDataSet(e1, \"New DataSet \" + cnt + \", (1)\");\n d1.setLineWidth(2.5f);\n d1.setCircleRadius(4.5f);\n d1.setHighLightColor(Color.rgb(244, 117, 117));\n d1.setDrawValues(false);\n\n ArrayList<Entry> e2 = new ArrayList<Entry>();\n\n for (int i = 0; i < 12; i++) {\n e2.add(new Entry(i, e1.get(i).getY() - 30));\n }\n\n LineDataSet d2 = new LineDataSet(e2, \"New DataSet \" + cnt + \", (2)\");\n d2.setLineWidth(2.5f);\n d2.setCircleRadius(4.5f);\n d2.setHighLightColor(Color.rgb(244, 117, 117));\n d2.setColor(ColorTemplate.VORDIPLOM_COLORS[0]);\n d2.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[0]);\n d2.setDrawValues(false);\n\n ArrayList<ILineDataSet> sets = new ArrayList<ILineDataSet>();\n sets.add(d1);\n sets.add(d2);\n\n LineData cd = new LineData(sets);\n return cd;\n }", "@BeforeClass\r\n\tpublic static void setupTestData() throws IOException {\r\n\r\n\t\tfinal FileOutputStream fos = new FileOutputStream(TESTFILE);\r\n\t\tbyte[] testsequence = new byte[BUFFERSIZE];\r\n\t\tfor (int i=0xF0; i<0xFA; i++) {\r\n\t\t\tArrays.fill(testsequence, (byte)i);\r\n\t\t\tfos.write(testsequence);\r\n\t\t}\r\n\t\tfos.close();\r\n\t}", "@Override\n\tpublic void insertDummyData() {\n\t\t\n\t}", "private void createTableWithTestData(final DataSource dataSource) throws Exception {\n // create table\n Connection conn = dataSource.getConnection();\n Statement st = conn.createStatement();\n st.execute(CREATE_TEST_TABLE);\n conn.commit();\n st.close();\n conn.close();\n\n // fill with values\n conn = dataSource.getConnection();\n // prevent auto commit for batching\n conn.setAutoCommit(false);\n PreparedStatement ps = conn.prepareStatement(INSERT);\n // fill with values\n for (int i = 0; i < EXPECTED_COUNT; i++) {\n ps.setString(1, String.valueOf(i));\n ps.addBatch();\n }\n ps.executeBatch();\n conn.commit();\n ps.close();\n conn.close();\n }", "@DataProvider(name = \"tasksForUserStory\")\n\tpublic Object[][] createData1() {\n\t\treturn new Object[][] {\n\t\t\t\t{\"Task 1\"}, \n\t\t\t\t{\"Task 2\"},\n\t\t\t\t{\"Task 3\"},\n\t\t\t\t{\"Task 4\"} \n\t\t};\n\t}", "private CategoryDataset createDataset() {\n\t \n\t \tvar dataset = new DefaultCategoryDataset();\n\t \n\t\t\tSystem.out.println(bic);\n\t\t\t\n\t\t\tfor(Map.Entry<String, Integer> entry : bic.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t Integer value = entry.getValue();\n\t\t\t dataset.setValue(value, \"# Bicicletas\", key);\n\t \n\t\t\t}\n\t return dataset;\n\t \n\t }", "protected abstract void initialize(List<Sample> samples, QueryGenerator queryGenerator);", "private CellSampler createSampler(EasyMockSupport support)\r\n {\r\n CellSampler sampler = support.createMock(CellSampler.class);\r\n sampler.getBeginningSampleCells();\r\n EasyMock.expectLastCall().andReturn(CsvTestUtils.createBasicData());\r\n\r\n return sampler;\r\n }", "private void initData(){\n\n }", "@Before\r\n\tpublic void setUp() {\r\n\t\tRandom r = new Random();\r\n\t\tmyID = r.nextInt(100);\r\n\t\tmyEntryData = new Entry_Database();\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\tEntry e = new Entry(myID);\r\n\t\t\te.setCat(\"Science\");\r\n\t\t\te.setEntry(new File(\"example.txt\"));\r\n\t\t\te.setName(\"Test Name\");\r\n\t\t\te.setNotes(\"\");\r\n\t\t\te.setScore(0);\r\n\t\t\tmyEntryData.addEntry(myID, e);\r\n\t\t}\r\n\t}", "private BarData generateDataBar() {\n\n ArrayList<BarEntry> entries = new ArrayList<>();\n\n for (int i = 0; i < 12; i++) {\n entries.add(new BarEntry(i, (int) (Math.random() * 70) + 30));\n }\n\n BarDataSet d = new BarDataSet(entries, \"New DataSet 1\");\n // 设置相邻的柱状图之间的距离\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n // 设置高亮的透明度\n d.setHighLightAlpha(255);\n\n BarData cd = new BarData(d);\n cd.setBarWidth(0.9f);\n return cd;\n }", "@Test\n\tpublic static void PersonTest01() {\n\t\t\tString targetTable = \"DATA_TEST\";\n\t\t\ttargetTable = \"test_sample\";\n\t\t\ttry{\n\t\t\tPriorDAO DAO = new PriorDAO();\n\t\t\tDAO.DropTempTable(targetTable);\n\t\t\tString[] inArgs ={\"CREATE_EMPTY_FACT_TABLE\",targetTable};\n\t\t\tDAO.RunProcedure(inArgs, null, null);\n\t\tGenerator Gen = new Generator();\n\t\tint crowedSize = 10000;\n\t\tcrowedSize = 1000;\n\t\tmakePop(Gen, crowedSize, targetTable);\n\t\tGeneratorType2 Gen2 = new GeneratorType2();\n\t\tmakePop(Gen2, crowedSize, targetTable);\n\t\tPrint(\"Finished\");\n\t\t\t}catch(Exception e)\n\t\t\t{\n\t\t\t\tPrint(\"Failed :\"+e.getMessage());\n\t\t\t}\n\t}", "@Test\r\n\tpublic void generateFile() {\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\t// String filePath = \"C://Users//AtifKhan//Desktop//sample-\" + i +\r\n\t\t\t// \".csv\";\r\n\t\t\tString filePath = \"C://Users//olcay tarazan//Desktop//sample-\" + i + \".csv\";\r\n\t\t\tint numberOfDataLines = 400;\r\n\t\t\ttry {\r\n\t\t\t\tgenerateCsvFile(filePath, numberOfDataLines);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"File generated : sample-\" + i + \".csv \");\r\n\t\t}\r\n\t}", "protected abstract void instantiateDataForAddNewTemplate (AsyncCallback<DATA> callbackOnSampleCreated) ;", "@BeforeClass\n public static void setUpTestData() throws Exception {\n String unwFileName = \"9192_6687.uint\";\n String hghtFileName = \"heights.raw.ORIGINAL\";\n\n unwrappedPhase = castToDouble(512, 512, readFloatFile(512, 512, testDataDir + unwFileName));\n heights = castToDouble(512, 512, readFloatFile(512, 512, testDataDir + hghtFileName));\n\n File masterResFile = new File(testResDir + \"9192.res\");\n File slaveResFile = new File(testResDir + \"6687.res\");\n\n /** Construct metadata classes */\n master = new SLCImage();\n slave = new SLCImage();\n\n master.parseResFile(masterResFile);\n slave.parseResFile(slaveResFile);\n\n masterOrbit = new Orbit();\n\n masterOrbit.parseOrbit(masterResFile);\n masterOrbit.computeCoefficients(3);\n masterOrbit.computeCoefficients(ORBIT_DEGREE);\n\n slaveOrbit = new Orbit();\n\n slaveOrbit.parseOrbit(slaveResFile);\n slaveOrbit.computeCoefficients(3);\n slaveOrbit.computeCoefficients(ORBIT_DEGREE);\n\n dataWindow = new Window(1, 26897, 1, 5167);\n\n tileWindow = new Window(15000, 15511, 3000, 3511);\n\n }", "public void generateRandomAllVaraibles() {\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (!var.getType().equals(\"INPUT_DATA\")) {\r\n\t\t\t\tif (var.getType().equals(\"boolean\") || var.getType().equals(\"Boolean\")) {\r\n\t\t\t\t\tvar.setValue(String.valueOf(getRandomBoolean()));\r\n\r\n\t\t\t\t} else if (var.getType().equals(\"int\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(Integer.parseInt(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tInteger.parseInt(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(0, 100)));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (var.getType().equals(\"double\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(Double.parseDouble(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tDouble.parseDouble(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(0.0, 100.0)));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (var.getType().equals(\"Enum\")) {\r\n\t\t\t\t\tvar.setValue(var.getValue());\r\n\t\t\t\t\t// System.out.println(\"Enum: var.getValue() = \" +\r\n\t\t\t\t\t// var.getValue());\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\r\n public void testDataBuilder_Init(){\r\n \tdataBuild.initAllData();\r\n \tassertTrue(dataBuild.getCPUList().size() > 0);\r\n \tSystem.out.println(\"Total # of CPUs: \" + dataBuild.getCPUList().size());\r\n \tassertTrue(dataBuild.getGPUList().size() > 0);\r\n \tSystem.out.println(\"Total # of GPUs: \" + dataBuild.getGPUList().size());\r\n \tassertTrue(dataBuild.getMBList().size() > 0);\r\n \tSystem.out.println(\"Total # of Motherboards: \" + dataBuild.getMBList().size());\r\n \tassertTrue(dataBuild.getMEMList().size() > 0);\r\n \tSystem.out.println(\"Total # of Memory Units: \" + dataBuild.getMEMList().size());\r\n \tassertTrue(dataBuild.getPSUList().size() > 0);\r\n \tSystem.out.println(\"Total # of PSUs: \" + dataBuild.getPSUList().size());\r\n \tassertTrue(dataBuild.getDISKList().size() > 0);\r\n \tSystem.out.println(\"Total # of Disks: \" + dataBuild.getDISKList().size());\r\n }", "static void initializeData() {\n\n if (timeLimitInHour != -1) {\n endTime = startTime + timeLimitInHour * 60 * 60 * 1000;\n }\n\n // Read the data file.\n data = new Data(dataFileName);\n\n // Build all variables.\n allVariable = data.buildAllVariable();\n\n // Read the target gene set.\n GeneSet geneSet = new GeneSet(allVariable, targetGeneSetFileName, minGeneSetSize, maxGeneSetSize, selectedCollections);\n listOfTargetGeneSets = geneSet.buildListOfGeneSets();\n\n // Read sample class labels.\n readSampleClass();\n\n // Initialize remaining fields.\n if (numberOfThreads == 0)\n numberOfThreads = getRuntime().availableProcessors();\n\n // Initialize BufferedWriter with preliminary info for log file.\n String fileInfo = \"EDDY OUTPUT FILE\\n\";\n fileInfo += (\"Data File: \" + dataFileName + \"\\n\");\n fileInfo += (\"Target Gene Set(s) File: \" + targetGeneSetFileName + \"\\n\");\n fileInfo += (\"Class Label File: \" + sampleClassInformationFileName + \"\\n\");\n fileInfo += (\"Number of Gene Sets: \" + listOfTargetGeneSets.size() + \"\\n\");\n fileInfo += (\"Number of Threads: \" + numberOfThreads + \"\\n\\n\");\n \n // log command line options, in verbatim \n fileInfo += concatStrings(commandLine) + \"\\n\\n\";\n \n fileInfo += (\"Name: \\tCollection: \\tSize: \\tURL: \\tJS Divergence: \\tP-Value: \\t#Permutations: \\tGenes: \\n\");\n try {\n \t// TODO: need to come up with a better way to assign the output file name.\n String fileName = targetGeneSetFileName.substring(0, targetGeneSetFileName.indexOf(\".gmt\")) + \"_output.txt\";\n \n File file = new File(fileName);\n \n output = new BufferedWriter(new FileWriter(file));\n output.write(fileInfo);\n } catch ( IOException e ) {\n e.printStackTrace();\n }\n\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "private void setup() {\n Collections.sort(samples);\n this.pos = 0;\n }", "private static List <Produk> buatSampleData(){\n\t\tList <Produk> hasil = new ArrayList<Produk>();\n\t\t\n\t\tProduk p1 = new Produk();\n\t\tp1.setKode(\"P-001\");\n\t\tp1.setNama(\"Mouse Logitech\");\n\t\tp1.setHarga(\"150.000,00\");\n\t\thasil.add(p1);\n\t\t\n\t\tProduk p2 = new Produk();\n\t\tp2.setKode(\"P-002\");\n\t\tp2.setNama(\"USB Flashdisk 2 GB\");\n\t\tp2.setHarga(\"50.000,00\");\n\t\thasil.add(p2);\n\t\t\n\t\tProduk p3 = new Produk();\n\t\tp3.setKode(\"P-003\");\n\t\tp3.setNama(\"Laptop Acer\");\n\t\tp3.setHarga(\"10.000.000,00\");\n\t\thasil.add(p3);\n\t\t\n\t\tProduk p4 = new Produk();\n\t\tp4.setKode(\"P-004\");\n\t\tp4.setNama(\"Harddisk 500 GB\");\n\t\tp4.setHarga(\"800.000,00\");\n\t\thasil.add(p4);\n\t\t\n\t\tProduk p5 = new Produk();\n\t\tp5.setKode(\"P-005\");\n\t\tp5.setNama(\"Printer Canon IP1980\");\n\t\tp5.setHarga(\"600.000,00\");\n\t\thasil.add(p5);\n\t\t\n\t\tProduk p6 = new Produk();\n\t\tp6.setKode(\"P-006\");\n\t\tp6.setNama(\"Joystick\");\n\t\tp6.setHarga(\"60.000,00\");\n\t\thasil.add(p6);\n\t\t\n\t\tProduk p7 = new Produk();\n\t\tp7.setKode(\"P-007\");\n\t\tp7.setNama(\"Monitor LCD Acer\");\n\t\tp7.setHarga(\"2.000.000,00\");\n\t\thasil.add(p7);\n\t\t\n\t\treturn hasil;\n\t}", "private void createTestData(String lang) {\n CreateCallback<ShoppingList> callback = new CreateCallback<ShoppingList>() {\n @Override\n public void onSuccess(ShoppingList object) {\n //refresh data\n mainFragment.setShownShoppingListsToArchived(false);\n }\n\n @Override\n public void onFailure() {\n //not used here\n }\n };\n (new TestData()).createTestData(getContentResolver(), lang, callback);\n }", "@Before\n\tpublic void setUpData() {\n\n\t\t// Make sure there is a type in the database\n\t\tType defaultType = new Type();\n\t\tdefaultType.setName(\"type\");\n\t\ttypeService.save(defaultType);\n\n\t\t// Make sure there is a seed packet in the database\n\t\tSeedPacket seedPacket = new SeedPacketBuilder()\n\t\t\t\t.withName(\"seed\")\n\t\t\t\t.withType(\"type\")\n\t\t\t\t.withPackSize(500).build();\n\n\t\tseedPacketService.save(seedPacket);\n\t}", "public ZiplineLightData() {\n\t\tsamplePoints = new int[SAMPLE_POINTS];\n\t\tArrays.fill(samplePoints, -1);\n\t}", "public void generateOutputData() {\n\t\tArrayList<String> inputDataArray = new ArrayList<String>();\n\t\tif (removeDuplicates) {\n\t\t\tinputDataArray = removeDuplicates();\n\t\t} else {\n\t\t\tinputDataArray = inputDataValues;\n\t\t}\n\t\t\n\t\toutputDataValues.clear();\n\t\tString outputDataValue = \"\";\n\t\tif (inputDataArray.isEmpty()) {\n\t\t\toutputDataValue = getOutputDataValue(\"\");\n\t\t\toutputDataValues.add(outputDataValue);\n\t\t} else {\n\t\t\tfor (String inputDataValue: inputDataArray) {\n\t\t\t\toutputDataValue = getOutputDataValue(inputDataValue);\n\t\t\t\toutputDataValues.add(outputDataValue);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testRun() {\n System.out.println(\"run\");\n FluorescenceImporter importer = null;\n try {\n FluorescenceFixture tf = new FluorescenceFixture();\n importer = new FluorescenceImporter(tf.testData());\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Importing dataset\");\n importer.setProgressHandle(ph);\n \n importer.run();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n \n //FluorescenceDataset dataset = importer.getDataset();\n Dataset<? extends Instance> plate = importer.getDataset();\n System.out.println(\"inst A1 \"+ plate.instance(0).toString());\n System.out.println(\"plate \"+plate.toString());\n Dataset<Instance> output = new SampleDataset<Instance>();\n output.setParent((Dataset<Instance>) plate);\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Analyzing dataset\");\n // AnalyzeRunner instance = new AnalyzeRunner((Timeseries<ContinuousInstance>) plate, output, ph);\n // instance.run();\n \n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public void init() {\n for (int i = 1; i <= 20; i++) {\n List<Data> dataList = new ArrayList<Data>();\n if (i % 2 == 0 || (1 + i % 10) == _siteIndex) {\n dataList.add(new Data(i, 10 * i));\n _dataMap.put(i, dataList);\n }\n }\n }", "private void populateData() {\r\n\t\tfor(int i = 0; i < this.incomeRanges.length; i++) {\r\n\t\t\tthis.addData(new Data(incomeRanges[i], 0), true);\r\n\t\t}\t// end for\r\n\t}" ]
[ "0.7250057", "0.71759725", "0.7077774", "0.6884301", "0.6660794", "0.6650549", "0.66308707", "0.6512396", "0.6339113", "0.6334081", "0.6281547", "0.6261912", "0.62409896", "0.6229431", "0.6211253", "0.6197964", "0.6197913", "0.6168602", "0.6086698", "0.60756516", "0.6066401", "0.6003605", "0.5992619", "0.5964691", "0.594369", "0.59421927", "0.5905465", "0.5903279", "0.5879087", "0.5875666", "0.587438", "0.5853397", "0.58369786", "0.5835632", "0.58250856", "0.58243626", "0.5803018", "0.57610965", "0.57587457", "0.5757954", "0.57341814", "0.5721952", "0.57206964", "0.5720256", "0.57178986", "0.5695739", "0.5692073", "0.56680286", "0.56649977", "0.56649977", "0.56604487", "0.56598413", "0.5659836", "0.5650934", "0.5650745", "0.56340533", "0.56290615", "0.562422", "0.5608645", "0.5601568", "0.5597443", "0.55970275", "0.55922145", "0.55895984", "0.5577762", "0.55720466", "0.5567502", "0.5560366", "0.555631", "0.55522853", "0.5545003", "0.5539834", "0.5534976", "0.55302477", "0.55253553", "0.5523877", "0.55190825", "0.5516721", "0.5505898", "0.55042934", "0.5503161", "0.5494346", "0.5486877", "0.5482207", "0.54809445", "0.5480682", "0.5480519", "0.5472285", "0.546991", "0.5461298", "0.5458135", "0.54538655", "0.54481554", "0.5446562", "0.5445985", "0.5445841", "0.5440275", "0.5436615", "0.5428784", "0.54275215", "0.5426038" ]
0.0
-1
Created by yanggavin on 14/12/24.
public interface RelationshipService { int add(Relationship relationship); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void poetries() {\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\tpublic void anular() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "public void mo38117a() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "private void init() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n void init() {\n }", "@Override\r\n\tpublic void init() {}", "public void mo4359a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\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}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\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 init() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "private void init() {\n\n\n\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo6081a() {\n }", "public void method_4270() {}" ]
[ "0.5932682", "0.584134", "0.58078784", "0.57833886", "0.5725276", "0.5725276", "0.5700225", "0.5664881", "0.56339335", "0.56337494", "0.5614521", "0.56119394", "0.5599627", "0.5599627", "0.5599627", "0.5599627", "0.5599627", "0.5590716", "0.55818355", "0.5577384", "0.55764997", "0.55691195", "0.5562513", "0.5555326", "0.55362916", "0.55264944", "0.5522018", "0.55036986", "0.5503379", "0.5494936", "0.5483149", "0.5480458", "0.54755545", "0.5470413", "0.54614604", "0.54614604", "0.54614604", "0.54520494", "0.5446606", "0.5446606", "0.5446606", "0.5438236", "0.5438236", "0.5435433", "0.5434736", "0.54335904", "0.5426864", "0.542563", "0.5425364", "0.54252374", "0.5423277", "0.5423277", "0.5423277", "0.5415129", "0.54077697", "0.5406015", "0.540592", "0.5401631", "0.5401631", "0.53870463", "0.5384268", "0.53839713", "0.5375946", "0.5375168", "0.5375168", "0.5375168", "0.5375168", "0.5375168", "0.5375168", "0.5375168", "0.5368817", "0.5360995", "0.53547305", "0.53506607", "0.5349837", "0.534855", "0.534855", "0.534855", "0.534855", "0.534855", "0.534855", "0.53444207", "0.5328153", "0.5322396", "0.532135", "0.532135", "0.5319543", "0.5289905", "0.5271105", "0.5260096", "0.5257197", "0.5253026", "0.5250803", "0.5248311", "0.5245348", "0.5238964", "0.52355194", "0.5233828", "0.5232367", "0.5230074", "0.5228973" ]
0.0
-1
/ / / / / / /
@Deprecated /* */ public Wool(Material type, byte data) { /* 33 */ super(type, data); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private int rightChild(int i){return 2*i+2;}", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "double passer();", "public void gored() {\n\t\t\n\t}", "public String ring();", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public abstract String division();", "public String toString(){ return \"DIV\";}", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "int getWidth() {return width;}", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public void getTile_B8();", "public double getWidth() {\n return this.size * 2.0; \n }", "double volume(){\n return width*height*depth;\n }", "@Override\n public void bfs() {\n\n }", "int width();", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "Operations operations();", "void sharpen();", "void sharpen();", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "static void pyramid(){\n\t}", "public Integer getWidth(){return this.width;}", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public int generateRoshambo(){\n ;]\n\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "void mo33732Px();", "public void skystonePos4() {\n }", "public void SubRect(){\n\t\n}", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "void walk() {\n\t\t\n\t}", "public double getWidth() { return _width<0? -_width : _width; }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public void stg() {\n\n\t}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "Parallelogram(){\n length = width = height = 0;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\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\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\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\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "double getPerimeter(){\n return 2*height+width;\n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public double getPerimiter(){return (2*height +2*width);}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "double getNewWidth();", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "double seBlesser();", "long getWidth();", "public int getWidth() {\r\n\treturn this.width;\r\n}", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "@Override\r\n public void draw()\r\n {\n\r\n }", "public void leerPlanesDietas();", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "void block(Directions dir);", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public String getRing();", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public int getEdgeCount() \n {\n return 3;\n }", "public int getWidth(){\n return width;\n }", "public int upright();", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "protected int parent(int i) { return (i - 1) / 2; }", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "public int getDireccion(Pixel p) {\r\n\t\tif (x == p.x && y < p.y)\r\n\t\t\treturn DIR_N;\r\n\t\tif (x > p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x == p.x && y > p.y)\r\n\t\t\treturn DIR_S;\r\n\t\tif (x > p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x > p.x && y == p.y)\r\n\t\t\treturn DIR_E;\r\n\t\tif (x < p.x && y == p.y)\r\n\t\t\treturn DIR_O;\r\n\t\treturn -1;\r\n\t}", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "double volume() {\n\treturn width*height*depth;\n}", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "void ringBell() {\n\n }", "public void snare();", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "public void skystonePos2() {\n }", "@Override\n\tpublic void draw3() {\n\n\t}", "public int my_leaf_count();" ]
[ "0.5455807", "0.53675425", "0.53646463", "0.5259213", "0.52139604", "0.51732713", "0.51408297", "0.5087993", "0.50741947", "0.50499314", "0.50279874", "0.49999514", "0.49748233", "0.4944576", "0.49398407", "0.4939045", "0.49119183", "0.48956218", "0.48735467", "0.48624808", "0.48612648", "0.4855708", "0.48550487", "0.48491192", "0.48464477", "0.48464477", "0.48418087", "0.48398307", "0.48339522", "0.48181453", "0.48171267", "0.48126355", "0.48098794", "0.48077607", "0.48061404", "0.48049018", "0.4800827", "0.47996235", "0.47980267", "0.47970188", "0.4791548", "0.47901922", "0.47901684", "0.47898334", "0.47855455", "0.47853303", "0.4783506", "0.4782097", "0.47800118", "0.47800118", "0.47774157", "0.47764677", "0.47635132", "0.475845", "0.47540724", "0.47536913", "0.47508323", "0.47503984", "0.4750003", "0.47486103", "0.47461182", "0.4745645", "0.47232658", "0.4714181", "0.4712731", "0.4712641", "0.47101676", "0.47090968", "0.4702379", "0.470198", "0.47014114", "0.4698952", "0.46986663", "0.4694321", "0.46909255", "0.4684761", "0.46843344", "0.46805266", "0.46764034", "0.46719524", "0.46688214", "0.46639597", "0.46614823", "0.4661261", "0.46551266", "0.46489087", "0.46479192", "0.46479192", "0.4645852", "0.46453932", "0.46413222", "0.46400273", "0.4635734", "0.4635118", "0.46347648", "0.4634544", "0.46315315", "0.463055", "0.4629904", "0.46282008", "0.46273056" ]
0.0
-1
/ / / / / / / /
public DyeColor getColor() { /* 43 */ return DyeColor.getByWoolData(getData()); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "private int rightChild(int i){return 2*i+2;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "double passer();", "public String ring();", "public void gored() {\n\t\t\n\t}", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "int getWidth() {return width;}", "public String toString(){ return \"DIV\";}", "public abstract String division();", "public void getTile_B8();", "public double getWidth() {\n return this.size * 2.0; \n }", "public Integer getWidth(){return this.width;}", "int width();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "@Override\n public void bfs() {\n\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "double volume(){\n return width*height*depth;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "Operations operations();", "public double getWidth() { return _width<0? -_width : _width; }", "public int generateRoshambo(){\n ;]\n\n }", "static void pyramid(){\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public void SubRect(){\n\t\n}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "void sharpen();", "void sharpen();", "void mo33732Px();", "void walk() {\n\t\t\n\t}", "public void skystonePos4() {\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\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\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\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\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "double getNewWidth();", "Parallelogram(){\n length = width = height = 0;\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "long getWidth();", "public int getWidth() {\r\n\treturn this.width;\r\n}", "double getPerimeter(){\n return 2*height+width;\n }", "public int getEdgeCount() \n {\n return 3;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void stg() {\n\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "double seBlesser();", "public void leerPlanesDietas();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "public int my_leaf_count();", "public String getRing();", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public int getWidth(){\n return width;\n }", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "protected int parent(int i) { return (i - 1) / 2; }", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "static int getNumPatterns() { return 64; }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "public abstract double getBaseWidth();", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public int upright();", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "public int getDireccion(Pixel p) {\r\n\t\tif (x == p.x && y < p.y)\r\n\t\t\treturn DIR_N;\r\n\t\tif (x > p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x == p.x && y > p.y)\r\n\t\t\treturn DIR_S;\r\n\t\tif (x > p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x > p.x && y == p.y)\r\n\t\t\treturn DIR_E;\r\n\t\tif (x < p.x && y == p.y)\r\n\t\t\treturn DIR_O;\r\n\t\treturn -1;\r\n\t}", "void block(Directions dir);", "int getWidth1();", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "int expand();", "int getR();", "private int right(int parent) {\n\t\treturn parent*2+2;\n\t}", "public void snare();" ]
[ "0.5505104", "0.5413729", "0.52969015", "0.52391857", "0.52056867", "0.5147029", "0.510248", "0.50758827", "0.50382483", "0.5030172", "0.5009637", "0.49822485", "0.49818277", "0.4978501", "0.49747092", "0.49631736", "0.49385124", "0.49294057", "0.49037725", "0.4894048", "0.48802105", "0.4858933", "0.4854184", "0.48481032", "0.4844484", "0.48442978", "0.48417914", "0.4829031", "0.48264083", "0.48216045", "0.4818841", "0.48039076", "0.48022062", "0.48018372", "0.48008773", "0.4796748", "0.47958007", "0.47901002", "0.47900486", "0.47891742", "0.47891742", "0.47803158", "0.4776762", "0.47755304", "0.47716892", "0.47670838", "0.47665712", "0.4764857", "0.47641283", "0.475965", "0.47590327", "0.47576004", "0.47501257", "0.47484487", "0.47478977", "0.47422385", "0.47411534", "0.4740538", "0.47317335", "0.47317335", "0.47294992", "0.47270784", "0.47227693", "0.47216168", "0.4719633", "0.4718775", "0.47115445", "0.47107053", "0.47106415", "0.47094738", "0.4708547", "0.47069407", "0.46961746", "0.46905994", "0.46903464", "0.4690153", "0.46899912", "0.46894413", "0.46870923", "0.4684759", "0.46763417", "0.46735287", "0.46734908", "0.46693304", "0.46657974", "0.4665409", "0.46627268", "0.4657025", "0.4655079", "0.4650835", "0.46480635", "0.46479663", "0.46434313", "0.4641778", "0.46413323", "0.4641187", "0.4640116", "0.4638599", "0.46375966", "0.46322778", "0.46283716" ]
0.0
-1
/ / / / / / / /
public void setColor(DyeColor color) { /* 53 */ setData(color.getWoolData()); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "private int rightChild(int i){return 2*i+2;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "double passer();", "public String ring();", "public void gored() {\n\t\t\n\t}", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "private static Object[] newPath(int length, Object[] leaf) {\n Object[] node = leaf;\n for (int i = 0; i < length; i += 5) {\n node = new Object[] { node };\n }\n return node;\n }", "int getWidth() {return width;}", "public String toString(){ return \"DIV\";}", "public abstract String division();", "public void getTile_B8();", "public double getWidth() {\n return this.size * 2.0; \n }", "public Integer getWidth(){return this.width;}", "int width();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "@Override\n public void bfs() {\n\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "double volume(){\n return width*height*depth;\n }", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "private void traverseBayeredPatternHalfSizeRGB(){\n int originalPositionX = 0;\n int originalPositionY = 1;\n\n for (int newX = 0; originalPositionX < originalImageHeight -1; newX++){\n for (int newY = 0; originalPositionY < originalImageWidth -1; newY++){\n Point newPosition = new Point(newX,newY);\n int newAbsoultPosition = getAbsolutPixelPosition(newPosition, originalImageHeight / 2, originalImageWidth / 2);\n halfSizePixRGB[newAbsoultPosition] = getAverageRGB(new Point(originalPositionX,originalPositionY));\n originalPositionY += 2;\n }\n originalPositionY = 0;\n originalPositionX += 2;\n }\n }", "@Override\npublic void processDirection() {\n\t\n}", "Operations operations();", "public double getWidth() { return _width<0? -_width : _width; }", "public int generateRoshambo(){\n ;]\n\n }", "static void pyramid(){\n\t}", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public void SubRect(){\n\t\n}", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "void sharpen();", "void sharpen();", "void mo33732Px();", "void walk() {\n\t\t\n\t}", "public void skystonePos4() {\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public double getPerimiter(){return (2*height +2*width);}", "public static void unionPathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze two = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\tSystem.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = two.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber+n) != S.findAndCompress(randomNumber)){\n\t\t\t\t\t\tS.union(randomNumber+n, randomNumber);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.union(randomNumber, randomNumber+1);\n\t\t\t\t\t\ttwo.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(two, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\ttwo.draw();\n\t\ttwo.printCellNumbers();\n\t}", "@Override\r\n\tpublic void walk() {\n\r\n\t}", "public void foundLeaf(int width, int height, int level, int currX, int currY, int location) {\n level = level +2;\n if (location == 1) {\n\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - ( (new Double(spatialHeight / Math.pow(2, level ))).intValue()),\n currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY * 2,\n Color.BLACK);\n\n\n canvas.addLine(((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue())) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n currX,\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n\n }\n\n if (location == 2) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY + (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n ( currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue()) + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n (currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY + (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.black);\n\n\n\n }\n\n if (location == 3) {\n\n canvas.addLine(currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue()) - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX - (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY,\n Color.BLACK);\n\n\n\n canvas.addLine((currX - (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n\tcurrY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), \n (currX - (new Double(spatialWidth / Math.pow(2, level ))).intValue()) + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n Color.BLACK);\n\n\n }\n\n if (location == 4) {\n\n\n canvas.addLine(currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n (currY - (new Double(spatialHeight / Math.pow(2, level))).intValue()) - (new Double(spatialHeight / Math.pow(2, level))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY,\n Color.BLACK);\n\n\n canvas.addLine((currX + (new Double(spatialWidth / Math.pow(2, level))).intValue()) - (new Double(spatialWidth / Math.pow(2, level ))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(),\n currX + (new Double(spatialWidth / Math.pow(2, level ))).intValue() + (new Double(spatialWidth / Math.pow(2, level))).intValue(),\n currY - (new Double(spatialHeight / Math.pow(2, level ))).intValue(), Color.BLACK);\n\n\n }\n\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\r\n\t\tint a=0;\r\n\t\tint count=0;\r\n System.out.println(\"enter size\");\r\n\t\ta=obj.nextInt();\r\n\t\tint m=2*a+1;\r\n\t\tint n=2*a+2;\r\n\t\tint mid=(m+1)/2;\r\n\t\tfor(int i=1;i<=m;i++)\r\n\t\t{\r\n\t\t\tcount=0;\r\n\t\t\tfor(int j=1;j<=n;j++)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tif((i==1)||(i==m)||(j==1)||(j==n))//frame begin\r\n\t\t\t\t{\r\n\t\t\t\t\tif((i==1)||(i==m))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif((j==1)||(j==n))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\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\tif((j==1)||(j==n))\r\n\t {\r\n\t\t\t\t\t\t\tSystem.out.print(\"|\");//frame left and right\r\n\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//frame end\r\n\t\t\t\telse if (i<mid)//upper-half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t for(int l=1;l<=2*i-4;l++)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t }\r\n\t\t\t\t\t else\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\tSystem.out.print(\"\\\\\");\r\n\t\t\t\t for(int k=mid;k>i;k--)\r\n\t\t\t\t {\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end of upper half\r\n\t\t\t\telse if(i>mid)//lower half\r\n\t\t\t\t{\r\n\t\t\t\t\tif(count<=2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tfor(int k=mid;k<i;k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t System.out.print(\"\\\\\");\r\n\t\t\t\t\t for(int l=2*m-6;l>2*i-4;l--)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if(i%2==0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"=\");\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t System.out.print(\"/\");\r\n\t\t\t\t\t for(int k=mid;k<i;k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t\t\t}//end of lower half\r\n\t\t\t\telse if(i==mid)//middle part\r\n\t\t\t\t{\r\n\t\t\t\t\tif(j==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\"<\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(j==n-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\">\");\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\tif(i%2==0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"=\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//end\r\n\t\t\t}//end-of-j\r\n\t\t\tSystem.out.println();\r\n\t\t}//end\r\n\r\n\t}", "double getNewWidth();", "Parallelogram(){\n length = width = height = 0;\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "long getWidth();", "public int getWidth() {\r\n\treturn this.width;\r\n}", "double getPerimeter(){\n return 2*height+width;\n }", "public int getEdgeCount() \n {\n return 3;\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void stg() {\n\n\t}", "@Override\n\tpublic void walk() {\n\t\t\n\t}", "private void e()\r\n/* 273: */ {\r\n/* 274:278 */ this.r = false;\r\n/* 275:279 */ this.s = false;\r\n/* 276:280 */ this.t = false;\r\n/* 277:281 */ this.u = false;\r\n/* 278:282 */ this.v = false;\r\n/* 279: */ }", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "double seBlesser();", "public void leerPlanesDietas();", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static String makeShapeA() {\n\tString result = \"\";\n\t\tfor (int i = 0; i < 8 ; i++) {\n\t\t\tresult+=printHash(i);\n\t\t\t\n\t\t}return result;\n\t\t\t//System.out.println(printHash(i));\n\t\t}", "public int my_leaf_count();", "public String getRing();", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "public int getWidth(){\n return width;\n }", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "int fi(int x, int y) {\n\t\treturn (x + 1) + (width + 2) * (y + 1);\n\t}", "protected int parent(int i) { return (i - 1) / 2; }", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "static int getNumPatterns() { return 64; }", "public void renderCenterBlock(int cons, int side, int end)\r\n/* 143: */ {\r\n/* 144:135 */ if (cons == 0)\r\n/* 145: */ {\r\n/* 146:136 */ this.context.setTex(end);\r\n/* 147:137 */ doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 148:138 */ return;\r\n/* 149: */ }\r\n/* 150:139 */ if (cons == 3)\r\n/* 151: */ {\r\n/* 152:140 */ this.context.setTexFlags(1773);\r\n/* 153:141 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 154:142 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 155:143 */ return;\r\n/* 156: */ }\r\n/* 157:144 */ if (cons == 12)\r\n/* 158: */ {\r\n/* 159:145 */ this.context.setTexFlags(184365);\r\n/* 160:146 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 161:147 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);\r\n/* 162:148 */ return;\r\n/* 163: */ }\r\n/* 164:149 */ if (cons == 48)\r\n/* 165: */ {\r\n/* 166:150 */ this.context.setTexFlags(187200);\r\n/* 167:151 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 168:152 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 169:153 */ return;\r\n/* 170: */ }\r\n/* 171:155 */ this.context.setTex(end);\r\n/* 172:156 */ doubleBox(0x3F ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F);\r\n/* 173:157 */ if ((cons & 0x1) > 0)\r\n/* 174: */ {\r\n/* 175:158 */ this.context.setTexFlags(1773);\r\n/* 176:159 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 177:160 */ doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F);\r\n/* 178: */ }\r\n/* 179:162 */ if ((cons & 0x2) > 0)\r\n/* 180: */ {\r\n/* 181:163 */ this.context.setTexFlags(1773);\r\n/* 182:164 */ this.context.setTex(end, end, side, side, side, side);\r\n/* 183:165 */ doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F);\r\n/* 184: */ }\r\n/* 185:167 */ if ((cons & 0x4) > 0)\r\n/* 186: */ {\r\n/* 187:168 */ this.context.setTexFlags(184365);\r\n/* 188:169 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 189:170 */ doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F);\r\n/* 190: */ }\r\n/* 191:172 */ if ((cons & 0x8) > 0)\r\n/* 192: */ {\r\n/* 193:173 */ this.context.setTexFlags(184365);\r\n/* 194:174 */ this.context.setTex(side, side, end, end, side, side);\r\n/* 195:175 */ doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F);\r\n/* 196: */ }\r\n/* 197:177 */ if ((cons & 0x10) > 0)\r\n/* 198: */ {\r\n/* 199:178 */ this.context.setTexFlags(187200);\r\n/* 200:179 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 201:180 */ doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F);\r\n/* 202: */ }\r\n/* 203:182 */ if ((cons & 0x20) > 0)\r\n/* 204: */ {\r\n/* 205:183 */ this.context.setTexFlags(187200);\r\n/* 206:184 */ this.context.setTex(side, side, side, side, end, end);\r\n/* 207:185 */ doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F);\r\n/* 208: */ }\r\n/* 209: */ }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "public abstract double getBaseWidth();", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public int upright();", "private void createPath(Direction d, int width, Point p1, Point p2) {\n\t\t// Determine how far away from the center the corners are\n\t\tint sideOneOffset = 0;\t// Top or Left depending on path direction\n\t\tint sideTwoOffset = 0;\t// Bot or Right depending on path direction\n\t\t// If the width is odd, balance the offsets\n\t\tif (width % 2 != 0) {\t\n\t\t\tsideOneOffset = sideTwoOffset = ((width / 2) + 1);\n\t\t} else {\n\t\t\t// If the width is even, the offsets will be off by 1\n\t\t\tsideOneOffset = width;\n\t\t\tsideTwoOffset = width - 1;\n\t\t}\n\t\tif (d == Direction.LEFT || d == Direction.RIGHT) {\n\t\t\t// If the direction is left then we want to swap the points\n\t\t\t// to pretend like the direction was right (so the following code works)\n\t\t\tif (d == Direction.LEFT) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p1.x, p1.y + sideTwoOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p2.x, p1.y - sideOneOffset)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x, p1.y + sideTwoOffset)));\n\t\t\t// Set the left and right walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.y is the center of the path (top to bottom)\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x, p1.y + (i - width/2))));\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p2.x, p2.y + (i - width/2))));\n\t\t\t}\n\t\t\t// Set middle path and top/bottom padding (horizontal Oreo!)\n\t\t\tfor (int col = p1.x + 1, endCol = p2.x; col < endCol; col++) {\n\t\t\t\t// Add the top wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(col, p1.y - sideOneOffset)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(col, p1.y + (i - width /2))));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the bottom wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(col, p1.y + sideTwoOffset)));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the direction is up then we want to swap the points\n\t\t\t// to pretend like the direction was down (so the following code works)\n\t\t\tif (d == Direction.UP) {\n\t\t\t\tPoint tempP = p2;\n\t\t\t\tp2 = p1;\n\t\t\t\tp1 = tempP;\n\t\t\t}\n\t\t\t// Set the four corners\n\t\t\tpathSquares.add(new PathSquare(\"top-left\", new Point(p1.x - sideOneOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-left\", new Point(p2.x - sideOneOffset, p2.y)));\n\t\t\tpathSquares.add(new PathSquare(\"top-right\", new Point(p1.x + sideTwoOffset, p1.y)));\n\t\t\tpathSquares.add(new PathSquare(\"bot-right\", new Point(p2.x + sideTwoOffset, p2.y)));\n\t\t\t// Set the top and bottom walls\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t// (i - width/2) ensures that p1.x is the center of the path (left to right)\n\t\t\t\tpathSquares.add(new PathSquare(\"top\", new Point(p1.x + (i - width /2), p1.y)));\n\t\t\t\tpathSquares.add(new PathSquare(\"bot\", new Point(p2.x + (i - width /2), p2.y)));\n\t\t\t}\n\t\t\t// Set middle path and left/right padding (vertical Oreo!)\n\t\t\tfor (int row = p1.y + 1, endRow = p2.y; row < endRow; row++) {\n\t\t\t\t// Add the left wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"left\", new Point(p1.x - sideOneOffset, row)));\t\t\t\t\n\t\t\t\t// Add the delicious cream filling\n\t\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\t\tpathSquares.add(new PathSquare(\"middle\", new Point(p1.x + (i - width /2), row)));\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// Add the right wafer\n\t\t\t\tpathSquares.add(new PathSquare(\"right\", new Point(p1.x + sideTwoOffset, row)));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private byte r() {\r\n\t\treturn (left_map == 0 ) ? (byte) 1 : 0;\r\n\t}", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "public int getDireccion(Pixel p) {\r\n\t\tif (x == p.x && y < p.y)\r\n\t\t\treturn DIR_N;\r\n\t\tif (x > p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y < p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_NO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_NO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_N;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x == p.x && y > p.y)\r\n\t\t\treturn DIR_S;\r\n\t\tif (x > p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SE;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SE;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_E;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x < p.x && y > p.y){\r\n\t\t\tdouble distancia = this.distancia(p);\r\n\t\t\tif (distancia <= 1){\r\n\t\t\t\treturn DIR_SO;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tint distanciaX = Math.abs(x - p.x);\r\n\t\t\t\tint distanciaY = Math.abs(y - p.y);\r\n\t\t\t\tif (distanciaX == distanciaY)\r\n\t\t\t\t\treturn DIR_SO;\r\n\t\t\t\telse if (distanciaX > distanciaY)\r\n\t\t\t\t\treturn DIR_O;\r\n\t\t\t\telse \r\n\t\t\t\t\treturn DIR_S;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (x > p.x && y == p.y)\r\n\t\t\treturn DIR_E;\r\n\t\tif (x < p.x && y == p.y)\r\n\t\t\treturn DIR_O;\r\n\t\treturn -1;\r\n\t}", "void block(Directions dir);", "int getWidth1();", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "int expand();", "int getR();", "private int right(int parent) {\n\t\treturn parent*2+2;\n\t}", "public void snare();" ]
[ "0.5505104", "0.5413729", "0.52969015", "0.52391857", "0.52056867", "0.5147029", "0.510248", "0.50758827", "0.50382483", "0.5030172", "0.5009637", "0.49822485", "0.49818277", "0.4978501", "0.49747092", "0.49631736", "0.49385124", "0.49294057", "0.49037725", "0.4894048", "0.48802105", "0.4858933", "0.4854184", "0.48481032", "0.4844484", "0.48442978", "0.48417914", "0.4829031", "0.48264083", "0.48216045", "0.4818841", "0.48039076", "0.48022062", "0.48018372", "0.48008773", "0.4796748", "0.47958007", "0.47901002", "0.47900486", "0.47891742", "0.47891742", "0.47803158", "0.4776762", "0.47755304", "0.47716892", "0.47670838", "0.47665712", "0.4764857", "0.47641283", "0.475965", "0.47590327", "0.47576004", "0.47501257", "0.47484487", "0.47478977", "0.47422385", "0.47411534", "0.4740538", "0.47317335", "0.47317335", "0.47294992", "0.47270784", "0.47227693", "0.47216168", "0.4719633", "0.4718775", "0.47115445", "0.47107053", "0.47106415", "0.47094738", "0.4708547", "0.47069407", "0.46961746", "0.46905994", "0.46903464", "0.4690153", "0.46899912", "0.46894413", "0.46870923", "0.4684759", "0.46763417", "0.46735287", "0.46734908", "0.46693304", "0.46657974", "0.4665409", "0.46627268", "0.4657025", "0.4655079", "0.4650835", "0.46480635", "0.46479663", "0.46434313", "0.4641778", "0.46413323", "0.4641187", "0.4640116", "0.4638599", "0.46375966", "0.46322778", "0.46283716" ]
0.0
-1
Create a file Uri for saving an image or video
private static Uri getOutputMediaFileUri(int type){ return Uri.fromFile(getOutputMediaFile(type)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Uri createImageUri() {\n \t\tUri imageFileUri;\n \t\tString folder = Environment.getExternalStorageDirectory()\n \t\t\t\t.getAbsolutePath() + \"/tmp\";\n \t\tFile folderF = new File(folder);\n \t\tif (!folderF.exists()) {\n \t\t\tfolderF.mkdir();\n \t\t}\n \n \t\tString imageFilePath = folder + \"/\"\n \t\t\t\t+ String.valueOf(System.currentTimeMillis()) + \"jpg\";\n \t\tFile imageFile = new File(imageFilePath);\n \t\timageFileUri = Uri.fromFile(imageFile);\n \n \t\treturn imageFileUri;\n \t}", "public Uri getImageFileUri()\n {\n imagePath = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"Tuxuri\");\n Log.d(tag, \"Find \" + imagePath.getAbsolutePath());\n\n\n if (! imagePath.exists())\n {\n if (! imagePath.mkdirs())\n {\n Log.d(\"CameraTestIntent\", \"failed to create directory\");\n return null;\n }else{\n Log.d(tag,\"create new Tux folder\");\n }\n }\n\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File image = new File(imagePath,\"TUX_\"+ timeStamp + \".jpg\");\n file = image;\n name = file.getName();\n path = imagePath;\n\n\n if(!image.exists())\n {\n try {\n image.createNewFile();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return Uri.fromFile(image);\n }", "private Uri getOutputMediaFileUri(int mediaType) {\n\t\t\tFile mediaStorageDir = null;\n\t\t\tif(isExternalStorageAvailable()) {\n\t\t\t\tmediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n\t\t\t Environment.DIRECTORY_PICTURES), \"SChat\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmediaStorageDir = new File(Environment.DIRECTORY_DCIM);\n\t\t\t\t//Toast.makeText(MainActivity.this, mediaStorageDir.getParent()+\"\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\t if (! mediaStorageDir.exists()){\n\t\t\t if (! mediaStorageDir.mkdirs()){\n\t\t\t Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t\t\t return null;\n\t\t\t }\n\t\t\t }\n\t\t\t\n\t\t\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t\t\t File mediaFile;\n\t\t\t if (mediaType == MEDIA_TYPE_IMAGE){\n\t\t\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t\t\t \"IMG_\"+ timeStamp + \".jpg\");\n\t\t\t Log.d(\"MyCameraApp\", mediaFile.toString());\n\t\t\t } else if(mediaType == MEDIA_TYPE_VIDEO) {\n\t\t\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t\t\t \"VID_\"+ timeStamp + \".mp4\");\n\t\t\t } else {\n\t\t\t return null;\n\t\t\t }\n\t\t\t return Uri.fromFile(mediaFile);\n\t\t}", "@SuppressLint(\"SimpleDateFormat\")\n public Uri getOutputImageFileUri(Context ctx) {\n\n String tstamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File file = new File(getTempDirectoryPath(ctx), \"IMG_\" + tstamp + \".jpg\");\n\n return Uri.fromFile(file);\n\n }", "private Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }", "private static Uri getOutputMediaFileUri(){\n return Uri.fromFile(getOutputMediaFile());\n }", "private Uri getOutputMediaFileUri(int mediaType) {\n //parvo triabva da se proveri dali ima external storage\n\n if (isExternalStorageAvailable()) {\n\n //sled tova vrashtame directoriata za pictures ili ia sazdavame\n //1.Get external storage directory\n String appName = SendMessage.this.getString(R.string.app_name);\n String environmentDirectory; //\n //ako snimame picture zapismave v papkata za kartiniki, ako ne v papkata za Movies\n\n if(mediaType == MEDIA_TYPE_IMAGE) {\n environmentDirectory = Environment.DIRECTORY_PICTURES;\n } else {\n environmentDirectory = Environment.DIRECTORY_MOVIES;\n }\n File mediaStorageDirectory = new File(\n Environment.getExternalStoragePublicDirectory(environmentDirectory),\n appName);\n\n //2.Create subdirectory if it does not exist\n if (! mediaStorageDirectory.exists()) {\n if (!mediaStorageDirectory.mkdirs()) {\n Log.e(TAG, \"failed to create directory\");\n return null;\n }\n }\n\n //3.Create file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (mediaType == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (mediaType == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"MOV_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n //4.Return the file's URI\n Log.d(TAG, \"File path: \" + Uri.fromFile(mediaFile));\n return Uri.fromFile(mediaFile);\n\n } else //ako niama external storage\n Log.d(\"Vic\",\"no external strogage, mediaUri si null\");\n return null;\n\n }", "public static Uri getOutputMediaFileUri(Point point){\r\n return Uri.fromFile(getOutputMediaFile(point));\r\n }", "public Uri getOutputMediaFileUri(int type) {\n\t\treturn Uri.fromFile(getOutputMediaFile(type));\n\t}", "public Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(getOutputMediaFile(type));\n }", "public Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(getOutputMediaFile(type));\n }", "private static Uri getOutputMediaFileUri(int type){\n\t return Uri.fromFile(getOutputMediaFile(type));\n\t}", "private Uri getOutputMediaFileUri(){\n\t\treturn Uri.fromFile( getOutputMediaFile() );\n\t}", "private static Uri getOutputMediaFileUri(int type){\r\n\t return Uri.fromFile(getOutputMediaFile(type));\r\n\t}", "private static Uri saveFileAndAddToMediaStore(SquareImageButton button, Context context, File file, Uri uri, ContentResolver resolver) {\n // This will hold the uri of the newly saved file\n Uri newUri;\n // A file descriptor of an entry in the AssetManager\n AssetFileDescriptor assetFileDescriptor;\n\n try {\n // obtain read access to the file descriptor in the Asset manager\n assetFileDescriptor = resolver.openAssetFileDescriptor(uri, \"r\");\n }\n catch (FileNotFoundException e) {\n // The sound file could not be found and needs to be saved.\n assetFileDescriptor = null;\n }\n\n saveFileToDevice(context, file, assetFileDescriptor);\n\n newUri = insertSoundFileToMediaStore(button, file, resolver);\n return newUri;\n }", "public static Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(getOutputMediaFile(type));\n }", "public static Uri getOutputMediaFileUri(int timelapse_id, int type, int image_count){\n\t return Uri.fromFile(getOutputMediaFile(timelapse_id, type, image_count));\n\t}", "private Uri getPicOutputUri(){\n String filePath = getExternalFilesDir(Environment.DIRECTORY_PICTURES) + File.separator + String.valueOf(System.currentTimeMillis())+\".jpg\";\n return Uri.fromFile(new File(filePath));\n }", "public Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(CommonUtils.getOutputMediaFile(this, type == CommonUtils.MEDIA_TYPE_IMAGE));\n }", "public static Uri getOutputMediaFileUri(Context context, int type) {\n Uri uri = null;\n //适配Android N\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n return FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + \".provider\", getOutputMediaFile(type));\n } else {\n return Uri.fromFile(getOutputMediaFile(type));\n }\n }", "private Uri getFileUriAndSetType(Intent intent, String str, String str2, String str3, int i) throws IOException {\n String str4;\n String str5;\n String str6;\n if (str2.endsWith(\"mp4\") || str2.endsWith(\"mov\") || str2.endsWith(\"3gp\")) {\n intent.setType(\"video/*\");\n } else if (str2.endsWith(\"mp3\")) {\n intent.setType(\"audio/x-mpeg\");\n } else {\n intent.setType(\"image/*\");\n }\n if (str2.startsWith(\"http\") || str2.startsWith(\"www/\")) {\n String fileName = getFileName(str2);\n String str7 = \"file://\" + str + \"/\" + fileName.replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (str2.startsWith(\"http\")) {\n URLConnection openConnection = new URL(str2).openConnection();\n String headerField = openConnection.getHeaderField(\"Content-Disposition\");\n if (headerField != null) {\n Matcher matcher = Pattern.compile(\"filename=([^;]+)\").matcher(headerField);\n if (matcher.find()) {\n fileName = matcher.group(1).replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (fileName.length() == 0) {\n fileName = \"file\";\n }\n str7 = \"file://\" + str + \"/\" + fileName;\n }\n }\n saveFile(getBytes(openConnection.getInputStream()), str, fileName);\n str2 = str7;\n } else {\n saveFile(getBytes(this.webView.getContext().getAssets().open(str2)), str, fileName);\n str2 = str7;\n }\n } else if (str2.startsWith(\"data:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring = str2.substring(str2.indexOf(\";base64,\") + 8);\n if (!str2.contains(\"data:image/\")) {\n intent.setType(str2.substring(str2.indexOf(\"data:\") + 5, str2.indexOf(\";base64\")));\n }\n String substring2 = str2.substring(str2.indexOf(\"/\") + 1, str2.indexOf(\";base64\"));\n if (notEmpty(str3)) {\n StringBuilder sb = new StringBuilder();\n sb.append(sanitizeFilename(str3));\n if (i == 0) {\n str6 = \"\";\n } else {\n str6 = \"_\" + i;\n }\n sb.append(str6);\n sb.append(\".\");\n sb.append(substring2);\n str4 = sb.toString();\n } else {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"file\");\n if (i == 0) {\n str5 = \"\";\n } else {\n str5 = \"_\" + i;\n }\n sb2.append(str5);\n sb2.append(\".\");\n sb2.append(substring2);\n str4 = sb2.toString();\n }\n saveFile(Base64.decode(substring, 0), str, str4);\n str2 = \"file://\" + str + \"/\" + str4;\n } else if (str2.startsWith(\"df:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring3 = str2.substring(str2.indexOf(\"df:\") + 3, str2.indexOf(\";data:\"));\n String substring4 = str2.substring(str2.indexOf(\";data:\") + 6, str2.indexOf(\";base64,\"));\n String substring5 = str2.substring(str2.indexOf(\";base64,\") + 8);\n intent.setType(substring4);\n saveFile(Base64.decode(substring5, 0), str, sanitizeFilename(substring3));\n str2 = \"file://\" + str + \"/\" + sanitizeFilename(substring3);\n } else if (str2.startsWith(\"file://\")) {\n intent.setType(getMIMEType(str2));\n } else {\n throw new IllegalArgumentException(\"URL_NOT_SUPPORTED\");\n }\n return Uri.parse(str2);\n }", "public Uri getOutputMediaFileUri(int type, double latitude, double longitude){\n \tSystem.out.println(\"Uri: \" + type);\n \treturn Uri.fromFile(getOutputMediaFile(type, latitude, longitude));\n }", "public static Uri saveBitmap(Bitmap b){\n\n\t\tString path = initPath();\n\t\tlong dataTake = System.currentTimeMillis();\n\t\tString jpegName = path + \"/\" + \"XiaoleTakePhoto\" + String.valueOf(dataTake) +\".png\";\n//\t\tLog.i(\"TIEJIANG\", \"saveBitmap:jpegName = \" + jpegName);\n\t\ttry {\n\t\t\tFileOutputStream fout = new FileOutputStream(jpegName);\n\t\t\tBufferedOutputStream bos = new BufferedOutputStream(fout);\n\t\t\tb.compress(Bitmap.CompressFormat.PNG, 100, bos);\n\t\t\tbos.flush();\n\t\t\tbos.close();\n\t\t\tFile temp = new File(jpegName);\n\t\t\tUri imageFileUri = Uri.fromFile(temp);\n\t\t\tLog.d(\"TIEJIANG\", \"saveBitmap:jpegName = \" + jpegName + \" ??url=\" + imageFileUri);\n\t\t\treturn imageFileUri;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.i(\"TIEJIANG\", \"saveBitmap: failed! \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public File getPhotoFileUri(String fileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES), TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\n\n return file;\n }", "private String composeUri(String mode, String botName, String kind,\n String fileName) throws URISyntaxException {\n String uri = \"https://\" + host;\n uri += sep(mode);\n uri += sep(appId);\n uri += sep(botName);\n uri += sep(kind);\n uri += sep(fileName);\n return uri;\n }", "public static final Uri getOutputMediaFileUri(int type, String fileName) {\n return Uri.fromFile(getOutputMediaFile(type, fileName));\n }", "public File getPhotoFileUri(String fileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES), APP_TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(APP_TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\n\n return file;\n }", "private Uri saveImageExternal(Bitmap image) {\n Uri uri = null;\n try {\n StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();\n StrictMode.setVmPolicy(builder.build());\n File file = new File(Objects.requireNonNull(getContext()).getExternalFilesDir(Environment.DIRECTORY_PICTURES), \"to-share.png\");\n FileOutputStream stream = new FileOutputStream(file);\n image.compress(Bitmap.CompressFormat.PNG, 90, stream);\n stream.close();\n uri = Uri.fromFile(file);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return uri;\n }", "URL toURL(FileReference fileReferece);", "public File getPhotoFileUri(String fileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getExternalFilesDir(Environment.DIRECTORY_PICTURES), APP_TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(APP_TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\n\n return file;\n }", "private File getPhotoFileUri(String photoFileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES), TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + photoFileName);\n\n return file;\n\n }", "URI getMediaURI();", "java.lang.String getPictureUri();", "public static File toFile(URI uri) {\n// if (uri.getScheme() == null) {\n// try {\n// uri = new URI(\"file\", uri.getSchemeSpecificPart(), null);\n// } catch (URISyntaxException e) {\n// // should never happen\n// Logger.getLogger(URIUtils.class).fatal(uri, e);\n// }\n// }\n\t\treturn new File((File) null, uri.getSchemeSpecificPart());\n\t}", "private Uri getImageUri(String path) {\n return Uri.fromFile(new File(path));\n }", "URI createURI();", "private File getOutputMediaFile(String s2){\n File mediaFile = null;\n try {\n\n\n assert s2 != null;\n String fileName = s2.substring(s2.lastIndexOf(\"/\") + 1);\n final String stringImageURL = s2.substring(0, fileName.length() - 1);\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + activity.getPackageName()\n + \"/Files/\" + stringImageURL, fileName);\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n // Create a media file name\n //String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmm\").format(new Date());\n\n // String mImageName=s2;\n mediaFile = new File(mediaStorageDir.getPath(), fileName);\n }catch (Exception e){\n\n }\n return mediaFile;\n }", "protected void saveVideo(final Uri uriVideo) {\n\n // click the video to save it\n mVideoView.setOnTouchListener(new View.OnTouchListener() {\n\n public boolean onTouch(View v, MotionEvent event) {\n\n boolean success = false;\n\n // make the directory\n File vidDir = new File(android.os.Environment.getExternalStoragePublicDirectory\n (Environment.DIRECTORY_MOVIES) + File.separator + \"Saved iCute Videos\");\n vidDir.mkdirs();\n // create unique identifier\n Random generator = new Random();\n int n = 100;\n n = generator.nextInt(n);\n // create file name\n String videoName = \"Video_\" + n + \".mp4\";\n File fileVideo = new File(vidDir.getAbsolutePath(), videoName);\n\n try {\n fileVideo.createNewFile();\n success = true;\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n if (success) {\n Toast.makeText(getApplicationContext(), \"Video saved!\",\n Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(),\n \"Error during video saving\", Toast.LENGTH_LONG).show();\n }\n\n return true;\n }\n });\n }", "public File String_to_File(String img_url) {\n\n try {\n File rootSdDirectory = Environment.getExternalStorageDirectory();\n\n casted_image = new File(rootSdDirectory, \"attachment.jpg\");\n if (casted_image.exists()) {\n casted_image.delete();\n }\n casted_image.createNewFile();\n\n FileOutputStream fos = new FileOutputStream(casted_image);\n\n URL url = new URL(img_url);\n HttpURLConnection connection = (HttpURLConnection) url\n .openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setDoOutput(true);\n connection.connect();\n InputStream in = connection.getInputStream();\n\n byte[] buffer = new byte[1024];\n int size = 0;\n while ((size = in.read(buffer)) > 0) {\n fos.write(buffer, 0, size);\n }\n fos.close();\n return casted_image;\n\n } catch (Exception e) {\n\n System.out.print(e);\n // e.printStackTrace();\n\n }\n return casted_image;\n }", "@Override\n public void onClick(View view) {\n Intent takeFoto = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if(takeFoto.resolveActivity(getPackageManager()) != null){\n File photoFile = null;\n try{\n photoFile = createImageFile();\n } catch (IOException ex) {\n Log.d(\"FALLO\",\"TOMAR FOTO\");\n }\n if(photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(getApplicationContext(), \"com.B3B.farmbros.android.fileprovider\", photoFile);\n takeFoto.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takeFoto, REQUEST_IMAGE_SAVE);\n }\n }\n }", "private File createImageFile() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = new File(utils.getSentImagesDirectory());\n\n File image = null;\n try {\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n // Save a file: path for use with ACTION_VIEW intents\n //LOG.info(\"test place3\");\n try {\n imageFilePath = image.getAbsolutePath();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n //LOG.info(\"test place4\");\n if (image == null) {\n LOG.info(\"image file is null\");\n } else {\n LOG.info(\"image file is not null path is:\" + imageFilePath);\n }\n return image;\n }", "private Uri transcodeSchemeFileUri(Uri uri) {\n Uri newUri = null;\n Cursor cursor = null;\n String videoPath = uri.getPath();\n Log.v(TAG, \"transcodeSchemeFileUri, videoPath \" + videoPath);\n try {\n if (videoPath != null) {\n videoPath = videoPath.replaceAll(\"'\", \"''\");\n }\n cursor = getContentResolver()\n .query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,\n new String[] { MediaStore.Video.Media._ID },\n MediaStore.Video.Media.DATA + \" = '\"\n + videoPath + \"'\", null, null);\n if (cursor != null && cursor.moveToFirst()\n && cursor.getCount() > 0) {\n int id = cursor.getInt(0);\n newUri = ContentUris.withAppendedId(\n MediaStore.Video.Media.EXTERNAL_CONTENT_URI, id);\n Log.v(TAG, \"transcodeSchemeFileUri, newUri = \" + newUri);\n } else {\n newUri = uri;\n Log.e(TAG, \"transcodeSchemeFileUri, The uri not existed in video table\");\n }\n return newUri;\n } catch (final SQLiteException ex) {\n ex.printStackTrace();\n } catch (final IllegalArgumentException ex) {\n ex.printStackTrace();\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n return null;\n }", "public static File getPhotoFileUri(String fileName, String TAG, Context context) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(context.getExternalFilesDir(Environment.DIRECTORY_PICTURES), TAG);\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(TAG, \"failed to create directory\");\n }\n // Return the file target for the photo based on filename\n return new File(mediaStorageDir.getPath() + File.separator + fileName);\n }", "private String generateTargetFileUri(String fileUri) {\n return folderName.concat(fileUri);\n }", "@Override\n public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {\n List<String> segments = uri.getPathSegments();\n String accountId = segments.get(0);\n String id = segments.get(1);\n String format = segments.get(2);\n if (FORMAT_THUMBNAIL.equals(format)) {\n int width = Integer.parseInt(segments.get(3));\n int height = Integer.parseInt(segments.get(4));\n String filename = \"thmb_\" + accountId + \"_\" + id;\n File dir = getContext().getCacheDir();\n File file = new File(dir, filename);\n if (!file.exists()) {\n Uri attachmentUri = getAttachmentUri(Long.parseLong(accountId), Long.parseLong(id));\n Cursor c = query(attachmentUri,\n new String[] { AttachmentProviderColumns.DATA }, null, null, null);\n if (c != null) {\n try {\n if (c.moveToFirst()) {\n attachmentUri = Uri.parse(c.getString(0));\n } else {\n return null;\n }\n } finally {\n c.close();\n }\n }\n String type = getContext().getContentResolver().getType(attachmentUri);\n try {\n InputStream in =\n getContext().getContentResolver().openInputStream(attachmentUri);\n Bitmap thumbnail = createThumbnail(type, in);\n thumbnail = Bitmap.createScaledBitmap(thumbnail, width, height, true);\n FileOutputStream out = new FileOutputStream(file);\n thumbnail.compress(Bitmap.CompressFormat.PNG, 100, out);\n out.close();\n in.close();\n }\n catch (IOException ioe) {\n return null;\n }\n }\n return ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);\n }\n else {\n return ParcelFileDescriptor.open(\n new File(getContext().getDatabasePath(accountId + \".db_att\"), id),\n ParcelFileDescriptor.MODE_READ_ONLY);\n }\n }", "protected Uri saveImageToInternalStorage(Bitmap bitmap){\n // Initialize ContextWrapper\n ContextWrapper wrapper = new ContextWrapper(context);\n\n // Initializing a new file\n // The bellow line return a directory in internal storage\n File file = wrapper.getDir(\"Images\",MODE_PRIVATE);\n\n // Create a file to save the image\n file = new File(file, \"check12\"+\".jpg\");\n\n try{\n // Initialize a new OutputStream\n OutputStream stream = null;\n\n // If the output file exists, it can be replaced or appended to it\n stream = new FileOutputStream(file);\n\n // Compress the bitmap\n bitmap.compress(Bitmap.CompressFormat.JPEG,100,stream);\n\n // Flushes the stream\n stream.flush();\n\n // Closes the stream\n stream.close();\n\n }catch (IOException e) // Catch the exception\n {\n e.printStackTrace();\n }\n\n // Parse the gallery image url to uri\n Uri savedImageURI = Uri.parse(file.getAbsolutePath());\n\n // Return the saved image Uri\n return savedImageURI;\n }", "private static File getOutputMediaFile(int type){\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"PanoClicks\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"NDS_\" + timeStamp + \"_\";\n //File mediaStorageDir = Environment.getExternalStoragePublicDirectory(\"/NDS images\");\n String CameraFolder = \"Camera\";\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString() + \"/\" + CameraFolder + \"/\");\n\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n\n\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n //-------------\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n mediaStorageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }", "private static File getOutputMediaFile(String namex, Context context) {\n\r\n String pathToExternalStorage = context.getFilesDir().toString();\r\n File mediaStorageDir = new File(pathToExternalStorage + \"/\" + \"eKMIS\");\r\n\r\n //if (!appDirectory.isDirectory() || !appDirectory.exists()) //Checks if the directory exists\r\n // appDirectory.mkdir();\r\n\r\n if (!mediaStorageDir.exists()) {\r\n if (!mediaStorageDir.mkdirs()) {\r\n //Log.d(\"surevy\", \"failed to create directory\");\r\n return null;\r\n }\r\n }\r\n // Create a media file name\r\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\r\n .format(new Date());\r\n File mediaFile;\r\n //mediaFile = new File(mediaStorageDir.getPath() + File.separator\r\n // + \"IMG_\" + timeStamp + \".jpg\");\r\n\r\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\r\n + \"IMG_\" + namex + \".jpg\");\r\n\r\n\r\n Log.d(\"Camera activty\", mediaStorageDir.getPath());\r\n\r\n return mediaFile;\r\n }", "private static File getOutputMediaFile(int type) {\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "protected void open_camera_and_save_image() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n // Ensure that there is a camera activity to handle the intent.\n if(intent.resolveActivity(getPackageManager()) != null) {\n // create the file where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException e) {\n // error occurred while creating the file\n result.setText(R.string.fail_in_creating_photo);\n }\n\n if(photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.example.jiankaiwang.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n\n // pass to another external activity\n startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);\n }\n }\n }", "private File getOutputMediaFile(){\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"reliant\");\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n return mediaFile;\n }", "private static File getOutputMediaFile(int type){\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE){\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n } else if(type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\"+ timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n Uri.fromFile(image);\n mCurrentPhotoPath = Uri.fromFile(image).getPath();\n\n // Save a file: path for use with ACTION_VIEW intents\n return image;\n }", "private File createVideoFile() throws IOException {\n Date d = new Date();\n String nameDate = new SimpleDateFormat(\"ddMMyyyy_HHmmss\").format(d);\n this.date = new SimpleDateFormat(\"dd/MM/yyyy\").format(d);\n this.time = nameDate.substring(9,13);\n String videoFileName = \"MP4_\" + nameDate + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n videoFileName, /* prefix */\n \".mp4\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentVideoPath = image.getAbsolutePath();\n return image;\n }", "private Uri transcodeSchemeContentFileUri(Uri uri) {\n Uri newUri = null;\n Cursor cursor = null;\n try {\n // get file id\n long id = ContentUris.parseId(uri);\n // check file whether has existed in video table\n cursor = getContentResolver()\n .query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, null,\n MediaStore.Video.Media._ID + \" = '\" + id + \"'\", null, null);\n if (cursor != null && cursor.moveToFirst()\n && cursor.getCount() > 0) {\n newUri = ContentUris.withAppendedId(\n MediaStore.Video.Media.EXTERNAL_CONTENT_URI, id);\n Log.v(TAG, \"transcodeSchemeContentFileUri, newUri \" + newUri);\n } else {\n newUri = uri;\n Log.e(TAG, \"transcodeSchemeContentFileUri, The uri not existed in video table\");\n }\n return newUri;\n } catch (final SQLiteException ex) {\n ex.printStackTrace();\n } catch (final IllegalArgumentException ex) {\n ex.printStackTrace();\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n return null;\n }", "@SuppressLint(\"SimpleDateFormat\")\n\tprivate static File getOutputMediaFile() {\n\n\t\t// Create Folder\n\t\tFile folder = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t.toString() + \"/JuzFood/image\");\n\t\tfolder.mkdirs();\n\n\t\tif (!folder.exists()) {\n\t\t\tif (!folder.mkdirs()) {\n\t\t\t\tLog.v(\"MyCameraApp\", \"failed to create directory\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// Create a media file name\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\n\t\t.format(new Date());\n\n\t\t// Save the path as a string value\n\t\tString extStorageDirectory = folder.toString();\n\n\t\tSystem.out.println(\"Folder Path ===== \" + extStorageDirectory);\n\n\t\tFile mediaFile = new File(extStorageDirectory + File.separator\n\t\t\t\t+ \"JUZFOOD_\" + timeStamp + \".jpg\");\n\n\t\treturn mediaFile;\n\t}", "public static String/*File*/ convertImageUriToFile(Context context, Uri imageUri) {\n Cursor cursor = null;\n try {\n String[] projection = {MediaStore.Images.Media.DATA, MediaStore.Images.Media._ID/*, MediaStore.Images.ImageColumns.ORIENTATION*/};\n cursor = context.getContentResolver().query(\n imageUri,\n projection, // Which columns to return\n null, // WHERE clause; which rows to return (all rows)\n null, // WHERE clause selection arguments (none)\n null); // Order-by clause (ascending by name)\n\n int file_ColumnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n //int orientation_ColumnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.ORIENTATION);\n\n if (cursor.moveToFirst()) {\n //String orientation = cursor.getString(orientation_ColumnIndex);\n return cursor.getString(file_ColumnIndex)/*new File(cursor.getString(file_ColumnIndex))*/;\n }\n return null;\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n }", "public String getPhotoFileUri(String fileName) {\n // Only continue if the SD Card is mounted\n if (isExternalStorageAvailable()) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(\n getExternalFilesDir(Environment.DIRECTORY_PICTURES), APP_TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(APP_TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n return mediaStorageDir.getPath()+File.separator+fileName+\".JPG\";\n }\n return null;\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static File createVideoFile3gp() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = VIDEO_FILE_PREFIX + timeStamp + F3GP_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }", "private void storeimageinfirestorage(Uri imageuri)\n {\n final StorageReference filepath=mfirebasestorage.child(Current_user +\".jpg\");\n filepath.putFile(imageuri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(getApplicationContext(),\"image uploaded succesfully\",LENGTH_SHORT).show();\n filepath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n profileimageurl= uri.toString();\n savetodatabase();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n }\n });\n\n\n }\n\n });\n\n\n }", "private static File getOutputMediaFile(int type) {\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n Log.e(\"Derp1\", \"Media File Created\");\n return null;\n }\n\n return mediaFile;\n }", "private static File getOutputMediaFile(int type) {\n\n // External sdcard location\n //If no sdcard, the picture is stored at the directory /storage/sdcard0/Pictures/Android File Upload\n File mediaStorageDir = new File(\n Environment\n .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n Config.IMAGE_DIRECTORY_NAME);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) { //checks if it exists\n if (!mediaStorageDir.mkdirs()) { //mkdir makes a directory and returns if it was created\n Log.d(\"Gallery\", \"Oops! Failed create \"\n + Config.IMAGE_DIRECTORY_NAME + \" directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n Locale.getDefault()).format(new Date());\n File mediaFile;\n //Currently only have it for making image types, not video types\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\n + \"IMG_\" + timeStamp + \".jpg\");\n// } else if (type == MEDIA_TYPE_VIDEO) {\n// mediaFile = new File(mediaStorageDir.getPath() + File.separator\n// + \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "public static File getOutputMediaFile(int type, String name) {\n File Test = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File Test1 = Environment.getExternalStorageDirectory();\n Log.d(\"Environment\", \"Environment path \" + Test.getAbsolutePath().toString());\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory(), \"RateMe\");\n Log.d(\"Environment\", \"Environment path \" + mediaStorageDir.getAbsolutePath().toString());\n if (!mediaStorageDir.exists()) {\n /*if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t\t\t return null;\n\t\t\t }*/\n mediaStorageDir.mkdir();\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == 20) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + name.toLowerCase() + timeStamp + \".jpg\");\n } else\n return null;\n\n return mediaFile;\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static File createVideoFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = VIDEO_FILE_PREFIX + timeStamp + MP4_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = SettingsHelper.getPrivateImageFolder(this);\n if (!storageDir.exists()) {\n storageDir.mkdirs();\n }\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n imageUri = Uri.fromFile(image);\n return image;\n }", "private static File getOutputMediaFile(int type) {\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"homework\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.e(\"--------\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private void takeAndSave(){\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Ensure there's a camera\n if(takePictureIntent.resolveActivity(getPackageManager())!=null){\n File photoFile = null;\n try{\n photoFile = createImageFile();\n }catch (IOException e){\n //Error message, maybe print out\n exit();\n }\n if(photoFile != null){\n Uri photoURI = FileProvider.getUriForFile(this, \"com.example.android.fileprovider\",photoFile);\n takePictureIntent.putExtra(MediaStore.Extra_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }\n }", "public static Uri getPhotoUri() {\n Logger.d(TAG, \"getPhotoUri() entry\");\n Cursor cursor = null;\n int imageId = 0;\n try {\n cursor =\n mContext.getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null, null);\n cursor.moveToFirst();\n imageId = cursor.getInt(cursor.getColumnIndex(MediaStore.Images.ImageColumns._ID));\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n Uri photoUri = Uri.parse(PREFER_PHOTO_URI + imageId);\n Logger.d(TAG, \"getPhotoUri() exit with the uri \" + photoUri);\n return photoUri;\n }", "protected Uri getOutputUri() {\n Uri outputUri = mOptions.outputUri;\n if (outputUri.equals(Uri.EMPTY)) {\n try {\n String ext = mOptions.outputCompressFormat == Bitmap.CompressFormat.JPEG ? \".jpg\" :\n mOptions.outputCompressFormat == Bitmap.CompressFormat.PNG ? \".png\" : \".wepb\";\n outputUri = Uri.fromFile(File.createTempFile(\"cropped\", ext, getCacheDir()));\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to create temp file for output image\", e);\n }\n }\n return outputUri;\n }", "private void saveAndUpload(String name, String email, Uri photoUri){\n\n // TODO implement save to local DB\n // TODO implement safe upload to Server\n }", "@Override\n public URI createUri(String url) {\n try {\n this.uri = new URI(url);\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n return uri;\n }", "private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"Picko_JPEG\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOCUMENTS),\"Whatsapp\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n\n\n }", "public String savePhoto(byte[] resource, String fileName){\n File file = getPhotoFile(fileName);\n if (file==null||!file.exists()){\n Log.e(LOG_TAG, \"savePhoto getPhotoFile fail fileName=\"+fileName);\n return null;\n }\n try {\n BufferedOutputStream s = new BufferedOutputStream(new FileOutputStream(file));\n s.write(resource);\n s.flush();\n s.close();\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n //store image file on media store provider\n addImageToGallery(file.getAbsolutePath());\n\n // 20161213\n return file.getAbsolutePath();\n }", "@RequiresApi(api = Build.VERSION_CODES.FROYO)\n private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n imageFileName = timeStamp + \"_\" + \".jpg\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n Log.e(\"Getpath\", \"Cool\" + mCurrentPhotoPath);\n return image;\n }", "private static File getOutputMediaFile(int type){\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE){\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n } else if(type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\"+ timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private File getOutputMediaFile() {\n\r\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory().getPath() + File.separator + \"ImageUpload\" + File.separator + \"Pictures\");\r\n if (!mediaStorageDir.exists()) {\r\n if (!mediaStorageDir.mkdirs()) {\r\n Log.d(\"ImageUpload\", \"failed to create external directory\");\r\n Log.d(\"ImageUpload\", \"creating to internal directory\");\r\n mediaStorageDir = getFilesDir();\r\n }\r\n }\r\n\r\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n return new File(mediaStorageDir.getPath() + File.separator + \"IMG_\" + timeStamp + \".jpg\");\r\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getParentFragment().getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String imageFileName = new SimpleDateFormat(\"yyyyMMdd-HHmmss\", Locale.ENGLISH).format(new Date());\n String storageDir = Environment.getExternalStorageDirectory() + \"/DokuChat\";\n File dir = new File(storageDir);\n if (!dir.exists())\n dir.mkdir();\n\n image = new File(storageDir + \"/\" + imageFileName + \".jpg\");\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "public void save(View view){\n if(shouldAskPermissions()) {\n askPermissions();\n }\n\n if(bitmap == null){\n bitmap = Bitmap.createBitmap(content.getWidth(), content.getHeight(), Bitmap.Config.RGB_565);\n }\n Canvas canvas = new Canvas(bitmap);\n try{\n //asking permissions for creating directory\n if(shouldAskPermissions()) {\n askPermissions();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(currentPhotoPath);\n\n view.draw(canvas);\n\n String url = MediaStore.Images.Media.insertImage(getContentResolver(), bitmap, imgName, null);\n\n bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fileOutputStream);\n fileOutputStream.flush();\n fileOutputStream.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n }", "private File getOutputMediaFile(int type) {\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = null;\n File mediaFile;\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"memreas\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(\"memreas\", \"failed to create directory\");\n return null;\n }\n }\n // Create a media file name\n String filename;\n if (type == MEDIA_TYPE_IMAGE) {\n filename = \"IMG_\" + timeStamp + \".jpg\";\n } else if (type == MEDIA_TYPE_VIDEO) {\n filename = \"VID_\" + timeStamp + \".mp4\";\n } else {\n return null;\n }\n\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n filename);\n\n return mediaFile;\n }", "public static void saveFile(final Context context, Uri uri, final String oldFilename) {\n\n Target target = new Target() {\n\n @Override\n public void onBitmapLoaded(final Bitmap bitmap, LoadedFrom from) {\n\n new Thread(() -> {\n\n SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault());\n String currentTimeStamp = format.format(new Date());\n String filename = oldFilename;\n\n if (oldFilename.isEmpty()) {\n filename = \"assi_\" + currentTimeStamp;\n\n Log.d(TAG, \"new user pic filename: \" + filename);\n }\n\n PreferenceUtils.setUserPicFilename(context, filename);\n\n Log.e(TAG, Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n\n File file = new File(Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n FileOutputStream oStream = null;\n try {\n file.createNewFile();\n\n oStream = new FileOutputStream(file);\n\n bitmap.compress(CompressFormat.JPEG, 80, oStream);\n\n } catch (Exception e) {\n Log.e(TAG, \"Cannot save image to internal file storage! Error: \" + e.getMessage());\n } finally {\n try {\n if (oStream != null) {\n oStream.close();\n }\n } catch (IOException e) {\n Log.e(TAG, \"Cannot close output stream! Error: \" + e.getMessage());\n }\n }\n }).start();\n }\n\n @Override\n public void onBitmapFailed(Drawable errorDrawable) {\n }\n\n @Override\n public void onPrepareLoad(Drawable placeHolderDrawable) {\n }\n };\n\n // save file to internal storage\n Picasso.with(context)\n .load(uri)\n .into(target);\n }", "private static File getOutputMediaFile(Context context, String extension, String type) {\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir;\n\n if(type.equals(\"save\")) {\n mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Pictures/Artisto\");\n }\n else {\n mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + context.getApplicationContext().getPackageName()\n + \"/cache\");\n }\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmmss\", Locale.US).format(new Date());\n File mediaFile;\n\n String mImageName = \"IMG_\" + timeStamp + extension;\n mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);\n\n //path = mediaStorageDir.getPath() + File.separator + mImageName;\n\n return mediaFile;\n }", "public abstract void share(String content, Uri imageOrVideo);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n //\"/storage/emulated/0/IRON-HID/captures\" <== can open~!!\n //\"file:///mnt/sdcard/Download/20141025_170314.jpg\"\n if (requestCode == CHOOSE_FILE_TO_UPLOAD)\n {\n if (resultCode == RESULT_OK)\n {\n Uri uri = data.getData();\n if (uri != null)\n {\n // Send file\n String filePath = uri.getPath();\n filePath = filePath.replace(\"file://\", \"\");\n mPutCommand += \" \" + filePath;\n mCommandManager.SendCommand(mPutCommand);\n }\n }\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "Uri getRecordingUri(Uri channelUri);", "public File getOutputMediaFile(int type){\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n Log.d(\"asda\", mediaStorageDir.getPath());\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE){\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n } else if(type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\"+ timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private static File getOutputMediaFile(int type){\r\n\t // To be safe, you should check that the SDCard is mounted\r\n\t // using Environment.getExternalStorageState() before doing this.\r\n\r\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\r\n\t Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\r\n\t // This location works best if you want the created images to be shared\r\n\t // between applications and persist after your app has been uninstalled.\r\n\r\n\t // Create the storage directory if it does not exist\r\n\t if (! mediaStorageDir.exists()){\r\n\t if (! mediaStorageDir.mkdirs()){\r\n\t Log.d(\"MyCameraApp\", \"failed to create directory\");\r\n\t return null;\r\n\t }\r\n\t }\r\n\r\n\t // Create a media file name\r\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n\t File mediaFile;\r\n\t if (type == MEDIA_TYPE_IMAGE){\r\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\r\n\t \"IMG_\"+ timeStamp + \".jpg\");\r\n\t } else if(type == MEDIA_TYPE_VIDEO) {\r\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\r\n\t \"VID_\"+ timeStamp + \".mp4\");\r\n\t } else {\r\n\t return null;\r\n\t }\r\n\r\n\t return mediaFile;\r\n\t}", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new java.util.Date());\n String imageFileName = \"WILDLIFE_JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private static File getOutputMediaFile(int type) {\n\n // External sdcard location\n File mediaStorageDir = new File(\n Environment\n .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n Constants.IMAGE_DIRECTORY_NAME);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n Locale.getDefault()).format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\n + \"IMG_\" + timeStamp + \".jpg\");\n }else {\n return null;\n }\n\n return mediaFile;\n }", "private Uri getMedia(String mediaName) {\n if (URLUtil.isValidUrl(mediaName)) {\n // Media name is an external URL.\n return Uri.parse(mediaName);\n } else {\n\n // you can also put a video file in raw package and get file from there as shown below\n\n return Uri.parse(\"android.resource://\" + getPackageName() +\n \"/raw/\" + mediaName);\n\n\n }\n }", "@Override\n\t\t\tprotected URI toUriImpl(String path) throws URISyntaxException {\n\t\t\t\treturn toFileToURI(path);\n\t\t\t}", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.CANADA).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = mActivity.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName,\n \".jpg\",\n storageDir\n );\n\n cameraFilePath = image.getAbsolutePath();\n return image;\n }", "private void post(Uri uri, int type) {\n SingleAttatchment singleAttatchment = null;\nif(type==GALLERY_TYPE) {\n try {\n singleAttatchment = new SingleAttatchment(type, getStrPath(this,uri));\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n}\nelse if(type==CAMERA_TYPE) {\n Uri uri2 = Uri.fromFile(photoFile);\n singleAttatchment = new SingleAttatchment(type, uri2.getPath());\n}\nelse if(type==VIDEO_TYPE){\nLog.e(\"pathFetched\",getPath(uri));\n singleAttatchment = new SingleAttatchment(type, getPath(uri));\n}\nelse if(type==AUDIO_TYPE){\n singleAttatchment = new SingleAttatchment(type, (uri).getPath());\n}\nelse if(type==FILE_TYPE){\n Log.e(\"data\",String.valueOf(uri));\n Log.e(\"data\",String.valueOf(uri.getPath()));\n Log.e(\"data\",String.valueOf(uri.getEncodedPath()));\n Log.e(\"data\",String.valueOf(uri.getLastPathSegment()));\n\n singleAttatchment = new SingleAttatchment(type,uri.getPath());\n\n}\nelse if(type==RECORD_TYPE){\n singleAttatchment = new SingleAttatchment(type,uri.getPath());\n\n}\n\n //Log.e(\"Uri\",String.valueOf(uri.getPath()));\n// Log.e(\"file\",String.valueOf(file.getPath()));\n\n list.add(singleAttatchment);\n attatchmentAdapter.notifyDataSetChanged();\n save();\n\n }", "private static File getOutputMediaFile(int type){\n\t // To be safe, you should check that the SDCard is mounted\n\t // using Environment.getExternalStorageState() before doing this.\n\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n\t Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\t\t\n\t\t\n\t // This location works best if you want the created images to be shared\n\t // between applications and persist after your app has been uninstalled.\n\n\t // Create the storage directory if it does not exist\n\t if (! mediaStorageDir.exists()){\n\t if (! mediaStorageDir.mkdirs()){\n\t \n\t return null;\n\t }\n\t }\n\n\t // Create a media file name\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t File mediaFile;\n\t if (type == MEDIA_TYPE_IMAGE){\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"IMG_\"+ timeStamp + \".jpg\");\n\t } else if(type == MEDIA_TYPE_VIDEO) {\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"VID_\"+ timeStamp + \".mp4\");\n\t } else {\n\t return null;\n\t }\n\n\t return mediaFile;\n\t}", "private static File getOutputMediaFile(int type){\n\t // To be safe, you should check that the SDCard is mounted\n\t // using Environment.getExternalStorageState() before doing this.\n\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\t // This location works best if you want the created images to be shared\n\t // between applications and persist after your app has been uninstalled.\n\n\t // Create the storage directory if it does not exist\n\t if (! mediaStorageDir.exists()){\n\t if (! mediaStorageDir.mkdirs()){\n\t Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t return null;\n\t }\n\t }\n\n\t // Create a media file name\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t File mediaFile;\n\t if (type == MEDIA_TYPE_IMAGE){\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"IMG_\"+ timeStamp + \".jpg\");\n\t } else if(type == MEDIA_TYPE_VIDEO) {\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"VID_\"+ timeStamp + \".mp4\");\n\t } else if(type == MEDIA_TYPE_AUDIO) {\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"AUD_\"+ timeStamp + \".mp3\");\n\t } else {\n\t return null;\n\t }\n\n\t return mediaFile;\n\t}", "private File getOutputMediaFile(){\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + App.getActiveActivity().getPackageName()\n + \"/Files\");\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmm\").format(new Date());\n File mediaFile;\n String mImageName=\"MI_\"+ timeStamp +\".jpg\";\n mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);\n return mediaFile;\n }", "public static File getRealFile(final Context context, final Uri uri) {\n if (null == uri) return null;\n final String scheme = uri.getScheme();\n String data = null;\n if (scheme == null)\n data = uri.getPath();\n else if (ContentResolver.SCHEME_FILE.equals(scheme)) {\n data = uri.getPath();\n } else if (ContentResolver.SCHEME_CONTENT.equals(scheme)) {\n Cursor cursor = context.getContentResolver().query(uri, new String[]{MediaStore.Images.ImageColumns.DATA}, null, null, null);\n if (null != cursor) {\n if (cursor.moveToFirst()) {\n int index = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);\n if (index > -1) {\n data = cursor.getString(index);\n }\n }\n cursor.close();\n }\n }\n File f = new File(data);\n return f;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".png\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }" ]
[ "0.6863434", "0.6610163", "0.6576866", "0.65007365", "0.64809257", "0.6456981", "0.6450858", "0.64354545", "0.642604", "0.642495", "0.642495", "0.63895655", "0.63811964", "0.6378601", "0.63679206", "0.63678765", "0.629617", "0.6234564", "0.61508834", "0.6141853", "0.61321735", "0.6111915", "0.58898526", "0.5868747", "0.5852504", "0.583823", "0.58382106", "0.5814983", "0.581171", "0.5810644", "0.5790545", "0.5779307", "0.5778296", "0.57738036", "0.5763787", "0.5755479", "0.57171327", "0.56940794", "0.5684751", "0.5663501", "0.5635693", "0.56194687", "0.5615945", "0.56126654", "0.5602156", "0.5587293", "0.5585148", "0.5572195", "0.55634594", "0.55535585", "0.5549184", "0.5542509", "0.5542411", "0.5541744", "0.55399865", "0.55376595", "0.55324554", "0.55299205", "0.5526081", "0.5525633", "0.5524363", "0.5520973", "0.55134755", "0.5508906", "0.55054146", "0.54985696", "0.5494466", "0.54915315", "0.5489477", "0.5489446", "0.5488725", "0.5482677", "0.54791206", "0.54542375", "0.54522294", "0.545073", "0.5450682", "0.5447302", "0.54452837", "0.54364777", "0.5425884", "0.5425769", "0.54225343", "0.542207", "0.5422045", "0.5421812", "0.54170203", "0.54121935", "0.5411839", "0.53981495", "0.5398015", "0.53975075", "0.5396395", "0.5394977", "0.53927976", "0.5391928", "0.5389197", "0.5387203", "0.5382414" ]
0.641093
12
To be safe, you should check that the SDCard is mounted using Environment.getExternalStorageState() before doing this.
private static File getOutputMediaFile(int type){ File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES), "MyCameraApp"); // This location works best if you want the created images to be shared // between applications and persist after your app has been uninstalled. // Create the storage directory if it does not exist if (! mediaStorageDir.exists()){ if (! mediaStorageDir.mkdirs()){ Log.d("MyCameraApp", "failed to create directory"); return null; } } // Create a media file name String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); File mediaFile; if (type == MEDIA_TYPE_IMAGE){ mediaFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_"+ timeStamp + ".jpg"); } else if(type == MEDIA_TYPE_VIDEO) { mediaFile = new File(mediaStorageDir.getPath() + File.separator + "VID_"+ timeStamp + ".mp4"); } else { return null; } return mediaFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean hasWritableSd(Context context){\n File[] paths = context.getExternalFilesDirs(null);\n if(paths.length > 1){\n String state = Environment.getExternalStorageState(paths[1]);\n return state.equals(Environment.MEDIA_MOUNTED);\n }\n return false;\n }", "public static boolean isSdcardExist() {\n return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);\n }", "public static boolean checkSDCard() {\n\t\ttry {\n\t\t\tfinal String status = Environment.getExternalStorageState();\n\t\t\tif (status.equals(Environment.MEDIA_MOUNTED)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "private void updateStatusSDCard(){\n\t\tString status = StorageUtils.getSDcardState();\n\t\tString readOnly = \"\";\n\t\tif (status.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) {\n\t\t\tstatus = Environment.MEDIA_MOUNTED;\n\t\t\treadOnly = getResources().getString(R.string.read_only);\n\t\t}\n\n\t\t// Calculate the space of SDcard\n\t\tif (status.equals(Environment.MEDIA_MOUNTED)) {\n\t\t\ttry {\n\t\t\t\tString path = StorageUtils.getSDcardDir();\n\t\t\t\tStatFs stat = new StatFs(path);\n\t\t\t\tlong blockSize = stat.getBlockSize();\n\t\t\t\tlong totalBlocks = stat.getBlockCount();\n\t\t\t\tlong availableBlocks = stat.getAvailableBlocks();\n\t\t\t\tmSdTotalSpace=formatSize(totalBlocks * blockSize);\n\t\t\t\tmSdAvailableSpace=formatSize(availableBlocks * blockSize) + readOnly;\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tstatus = Environment.MEDIA_REMOVED;\n\t\t\t}\n\t\t}else{\n\t\t\tmSdTotalSpace=getResources().getString(R.string.sd_unavailable);\n\t\t\tmSdAvailableSpace=getResources().getString(R.string.sd_unavailable);\n\t\t}\n\t}", "public boolean checkSDCard() {\n String isSDSupportedDevice = Environment.getExternalStorageState(new File(EXTERNAL_SD_CARD));\n if(isSDSupportedDevice.equals(\"mounted\")) {\n return true;\n }\n else {\n return false;\n }\n }", "private boolean isStorageAvailable(){\n return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());\n }", "public boolean checkSDCard(File path) {\n String isSDSupportedDevice = Environment.getExternalStorageState(path);\n if(isSDSupportedDevice.equals(\"mounted\")) {\n return true;\n }\n else {\n return false;\n }\n }", "private boolean ensureSDCardAccess() {\n File file = new File(mScreenshotPath);\n if (file.exists()) {\n return true;\n } else if (file.mkdirs()) {\n return true;\n }\n return false;\n }", "public static boolean checkSDCardAvailable() {\n return Environment.getExternalStorageState().equals(\n Environment.MEDIA_MOUNTED);\n }", "private void checkState() {\n\tstate=Environment.getExternalStorageState();\n // now cheak what state is if we can access to sd card or not\n if (state.equals(Environment.MEDIA_MOUNTED))//MEDIA_MOUNTED it mean we can read and write\n {\t\n\t CanR=CanW=true;\n }\n else if (state.equals(Environment.MEDIA_MOUNTED_READ_ONLY))\n { // read but not write\n \t\n\t\tCanW=false;\n\t\tCanR=true;}\n\t\telse \n\t\t\t//it can't read or write\n\t\t{\n\t\tCanR=CanW=false;}\n\t\n}", "private static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public static List<SDCardInfo> getSDCardInfo(Context context) {\n List<SDCardInfo> paths = new ArrayList<>();\n StorageManager sm = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);\n if (sm == null) return paths;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n List<StorageVolume> storageVolumes = sm.getStorageVolumes();\n try {\n //noinspection JavaReflectionMemberAccess\n Method getPathMethod = StorageVolume.class.getMethod(\"getPath\");\n for (StorageVolume storageVolume : storageVolumes) {\n boolean isRemovable = storageVolume.isRemovable();\n String state = storageVolume.getState();\n String path = (String) getPathMethod.invoke(storageVolume);\n paths.add(new SDCardInfo(path, state, isRemovable));\n }\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n return paths;\n\n } else {\n try {\n Class<?> storageVolumeClazz = Class.forName(\"android.os.storage.StorageVolume\");\n //noinspection JavaReflectionMemberAccess\n Method getPathMethod = storageVolumeClazz.getMethod(\"getPath\");\n Method isRemovableMethod = storageVolumeClazz.getMethod(\"isRemovable\");\n //noinspection JavaReflectionMemberAccess\n Method getVolumeStateMethod = StorageManager.class.getMethod(\"getVolumeState\", String.class);\n //noinspection JavaReflectionMemberAccess\n Method getVolumeListMethod = StorageManager.class.getMethod(\"getVolumeList\");\n Object result = getVolumeListMethod.invoke(sm);\n final int length = Array.getLength(result);\n for (int i = 0; i < length; i++) {\n Object storageVolumeElement = Array.get(result, i);\n String path = (String) getPathMethod.invoke(storageVolumeElement);\n boolean isRemovable = (Boolean) isRemovableMethod.invoke(storageVolumeElement);\n String state = (String) getVolumeStateMethod.invoke(sm, path);\n paths.add(new SDCardInfo(path, state, isRemovable));\n }\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return paths;\n }\n }", "public static boolean isSDCardAvailable() {\n return android.os.Environment.\n getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);\n }", "private boolean isExternalStorageAvailable() {\n String state = Environment.getExternalStorageState();\n return state.equals(Environment.MEDIA_MOUNTED);\n }", "void fixMediaDir(){\n File sdcard = Environment.getExternalStorageDirectory();\n if (sdcard != null) {\n File mediaDir = new File(sdcard, \"DCIM/Camera\");\n if (!mediaDir.exists()) {\n mediaDir.mkdirs();\n }\n }\n }", "public boolean isSDCardPresent() {\n if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n return true;\n }\n return false;\n }", "private boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "private boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "private boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public static boolean isSDcardExist() {\n\t\tboolean isExist = false;\n\t\ttry {\n\t\t\tif (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n\t\t\t\tisExist = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn isExist;\n\n\t}", "private static boolean checkFsWritable() {\n String directoryName = Environment.getExternalStorageDirectory().toString() + \"/DCIM\";\n File directory = new File(directoryName);\n if (!directory.isDirectory()) {\n if (!directory.mkdirs()) {\n return false;\n }\n }\n return directory.canWrite();\n }", "private boolean isExternalStorageWritable(){\r\n if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {\r\n Log.i(\"State\", \"Yes, it is writable!\");\r\n return true;\r\n } else{\r\n return false;\r\n }\r\n }", "public boolean isExternalStorageWritable(){\n String state = Environment.getExternalStorageState();\n if(Environment.MEDIA_MOUNTED.equals(state)){\n return true;\n }\n return false;\n }", "private boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "private boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "private boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "private boolean prepare() {\r\n\t\tif (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {\r\n\t\t\tLog.e(TAG,\"External media not ready.\");\r\n\t\t\tisReady = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tisReady = true;\t\t\r\n\t\tdirectory = parent.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\r\n\t\treturn true;\r\n\t}", "public boolean isStorageCardValid() {\n return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);\n }", "public boolean isExternalStorageWritable() {\r\n\t String state = Environment.getExternalStorageState();\r\n\t if (Environment.MEDIA_MOUNTED.equals(state)) {\r\n\t return true;\r\n\t }\r\n\t return false;\r\n\t}", "private static File getRemovableStorage() {\n final String value = System.getenv(\"SECONDARY_STORAGE\");\n if (!TextUtils.isEmpty(value)) {\n final String[] paths = value.split(\":\");\n for (String path : paths) {\n File file = new File(path);\n if (file.isDirectory() && path.toLowerCase().contains(\"sd\")) {\n return file;\n }\n }\n }\n return null;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public static boolean isExternalStorageWritable() {\n try {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n else\n {\n return false;\n }\n\n }\n catch (Exception ex)\n {\n return false;\n }\n }", "public boolean isStorageCardReadOnly() {\n return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED_READ_ONLY);\n }", "public boolean isExternalStorageReadable(){\n String state = Environment.getExternalStorageState();\n if(Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)){\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isMounted();", "public static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state))\n return true;\n\n return false;\n }", "public static boolean isExternalStorageReadable() {\r\n\t String state = Environment.getExternalStorageState();\r\n\t if (Environment.MEDIA_MOUNTED.equals(state) ||\r\n\t Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\r\n\t return true;\r\n\t }\r\n\t return false;\r\n\t}", "public static boolean sdAvailableWrite() {\n\t\tboolean sdAccessWrite = false;\n\n\t\t// Comprobamos el estado de la memoria externa (tarjeta SD)\n\t\tString state = Environment.getExternalStorageState();\n\n\t\tif (state.equals(Environment.MEDIA_MOUNTED)) {\n\t\t\tsdAccessWrite = true;\n\t\t} else if (state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) {\n\t\t\tsdAccessWrite = false;\n\t\t} else {\n\t\t\tsdAccessWrite = false;\n\t\t}\n\t\treturn sdAccessWrite;\n\t}", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state);\n }", "public boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n return (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state));\n }", "public static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public void startWatchingExternalStorage() {\n\t updateExternalStorageState(Environment.getExternalStorageState());\n\t\tmExternalStorageReceiver = new BroadcastReceiver() {\n\t\t\t@Override\n\t\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\t String action = intent.getAction();\n\t\t\t\tupdateExternalStorageState(action);\n\t\t synchronized (mObservers) {\n\t\t for (SdcardObserver observer : mObservers)\n\t\t observer.onSdcardChanged();\n\t\t }\n\t\t\t}\n\t\t};\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(Intent.ACTION_MEDIA_MOUNTED);\n\t\tfilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);\n\t\tfilter.addDataScheme(\"file\");\n\t\tmApplicationContext.registerReceiver(mExternalStorageReceiver, filter);\n\t}", "public boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public static boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n return (Environment.MEDIA_MOUNTED.equals(state) || Environment.MEDIA_MOUNTED_READ_ONLY.equals(state));\n }", "@SuppressLint(\"NewApi\")\n\tpublic static boolean isExternalStorageRemovable() {\n\t\t// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {\n\t\t// return Environment.isExternalStorageRemovable();\n\t\t// }\n\t\treturn true;\n\t}", "public static boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state);\n }", "public static boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state);\n }", "private static File getStorageDir(Context context) {\n File file = new File(context.getExternalFilesDir(\n Environment.MEDIA_MOUNTED), \"ZhouImage\");\n if (!file.exists()) {\n if (!file.mkdirs()) {\n Log.e(\"TAG\", \"Directory not created\");\n }\n }\n\n return file;\n }", "public static boolean isExternalStorageWritable()\n\t{\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean isExternalStorageReadable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state) ||\n Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public void verifyStoragePermissions() {\n int permission = ActivityCompat.checkSelfPermission(ChatActivity.this, android.Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n if (permission != PackageManager.PERMISSION_GRANTED) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n ChatActivity.this,\n PERMISSIONS_STORAGE,\n REQUEST_EXTERNAL_STORAGE\n );\n } else {\n // we already have permission, lets go ahead and call camera intent\n dispatchTakePictureIntent();\n }\n }", "static public boolean hasStorage(boolean requireWriteAccess) {\n String state = Environment.getExternalStorageState();\n Log.v(TAG, \"storage state is \" + state);\n\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n if (requireWriteAccess) {\n boolean writable = checkFsWritable();\n Log.v(TAG, \"storage writable is \" + writable);\n return writable;\n } else {\n return true;\n }\n } else if (!requireWriteAccess && Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isExternalStorageWritable() {\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkPermissionStorage() {\n\n boolean isPermissionGranted = true;\n\n int permissionStorage = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n if (permissionStorage != PackageManager.PERMISSION_GRANTED)\n {\n isPermissionGranted = false;\n }\n\n return isPermissionGranted;\n }", "public boolean isExternalStorageReadable() {\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state)\n\t\t\t\t|| Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isExternalStorageReadable() {\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state)\n\t\t\t\t|| Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void testExternalStoragePermissions() throws FileNotFoundException, IOException {\n File file = null;\n try {\n // If there's no storage available, this test is moot\n if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n return;\n }\n file = Utility.createUniqueFile(Environment.getExternalStorageDirectory(),\n \"write-test\");\n OutputStream out = new FileOutputStream(file);\n out.write(1);\n out.close();\n } finally {\n try {\n if (file != null) {\n if (file.exists()) {\n file.delete();\n }\n }\n } catch (Exception e) {\n // ignore cleanup error - it still throws the original\n }\n }\n }", "private void writeToSDFile() {\n File root = android.os.Environment.getExternalStorageDirectory();\n //Environment.getExternalStoragePublicDirectory()\n File dir = root.getAbsoluteFile();\n // See http://stackoverflow.com/questions/3551821/android-write-to-sd-card-folder\n //dir = new File (root.getAbsolutePath() + \"../extSdCard/FieldImages\"); //wrote to internal directory\n\n File dirnew = new File(dir.getParent());\n File dirfinal = new File(dirnew.getParent() + \"/extSdCard/FieldImages/mydata.txt\");\n Log.d(\"Files\", \"Path: \" + dirfinal.getPath());\n// String path = dirnew.getParent();\n File file[] = new File(dirnew.getParentFile() + \"/extSdCard/FieldImages\").listFiles();\n Log.d(\"Files\", \"Size: \" + file.length);\n for (int i = 0; i < file.length; i++) {\n Log.d(\"Files\", \"FileName:\" + file[i].getName());\n }\n\n// String pathnew = dir.getParent() + \"/legacy\";\n// Log.d(\"Files\", \"Pathnew: \" + pathnew);\n// File fnew = new File(pathnew);\n// File filenew[] = f.listFiles();\n// Log.d(\"Files\", \"Size: \"+ filenew.length);\n// for (int i=0; i < filenew.length; i++)\n// {\n// Log.d(\"Files\", \"FileName:\" + filenew[i].getName());\n// }\n //dir.mkdirs();\n //File file = new File(dir, \"myData.txt\");\n\n// try {\n// FileOutputStream f = new FileOutputStream(dirfinal);\n// PrintWriter pw = new PrintWriter(f);\n// pw.println(\"Hi , How are you\");\n// pw.println(\"Hello\");\n// pw.flush();\n// pw.close();\n// f.close();\n// } catch (FileNotFoundException e) {\n// e.printStackTrace();\n// Log.i(TAG, \"******* File not found. Did you\" +\n// \" add a WRITE_EXTERNAL_STORAGE permission to the manifest?\");\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n\n //Get the text file\n File filetest = dirfinal;\n\n //Read text from file\n StringBuilder text = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(filetest));\n String line;\n\n while ((line = br.readLine()) != null) {\n text.append(line);\n text.append('\\n');\n }\n br.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n Log.i(TAG, \"******* File not found. Did you\" +\n \" add a WRITE_EXTERNAL_STORAGE permission to the manifest?\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n Log.v(null,text.toString());\n\n }", "public long getStorageCardAvail() {\n long size = 0;\n String status = Environment.getExternalStorageState();\n\n if (status.equals(Environment.MEDIA_MOUNTED)) {\n try {\n File path = Environment.getExternalStorageDirectory();\n StatFs stat = new StatFs(path.getPath());\n long blockSize = stat.getBlockSize();\n long availableBlocks = stat.getAvailableBlocks();\n\n size = availableBlocks * blockSize;\n\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n }\n }\n return size;\n }", "private void requestStoragePermission() {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n PERMISSION_REQUEST_STORAGE);\n }", "public void uploadPhoto(boolean isCheckDeviceAssocation) {\n\n String stSdcardState = Environment.getExternalStorageState();\n\n if (stSdcardState.equals(Environment.MEDIA_SHARED)) {\n\n Toast.makeText(this, getString(R.string.error_msg_sdcard_write), Toast.LENGTH_LONG)\n .show();\n finish();\n return;\n\n } else if (stSdcardState.equals(Environment.MEDIA_REMOVED)) {\n Toast.makeText(this, getString(R.string.error_msg_sdcard), Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n\n finish();\n }", "public void manageFile() {\n long seconds = System.currentTimeMillis();\n filename = \"sdcard/LocationWise/LocationWiseImages/\" + seconds + \".png\";\n path_to_file = new File(filename);\n if (path_to_file.exists()) {\n boolean delete = path_to_file.delete();\n if (delete == true) {\n writeFile();\n // Toast.makeText(this, \"Deleted Successfully\", Toast.LENGTH_SHORT).show();\n\n } else {\n\n // Toast.makeText(this, \"Deletion Failed\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n writeFile();\n\n }\n }", "private void checkPermission() {\n if (ContextCompat.checkSelfPermission(MainActivity.this,\n Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);\n }\n }", "public static boolean writeSD(String data, String fileName) {\n\n try {\n\n String state = Environment.getExternalStorageState();\n if (state.equals(Environment.MEDIA_MOUNTED)) {\n\n File ext = Environment.getExternalStorageDirectory();\n\n FileOutputStream fos = new FileOutputStream(new File(ext, fileName), true);\n fos.write(data.getBytes());\n fos.close();\n\n return true;\n\n }\n\n return false;\n\n\n } catch (Exception e) {\n\n // TODO Auto-generated catch block\n\n e.printStackTrace();\n\n return false;\n\n }\n\n }", "public void rescanSdcard(){\n }", "public void verifyStoragePermissions(Activity activity) {\n int permission = ActivityCompat.checkSelfPermission(activity,\n Manifest.permission.WRITE_EXTERNAL_STORAGE);\n if (permission != PackageManager.PERMISSION_GRANTED) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(activity, PERMISSIONS_STORAGE,\n REQUEST_EXTERNAL_STORAGE);\n }\n }", "boolean isMountedDiskImageReadOnly() {\n return (isDiskImageMounted() && isMountedDiskImageReadOnly);\n }", "public static void verifyStoragePermissions(Activity activity) {\n int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n int permission1 = ActivityCompat.checkSelfPermission(activity, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n if (permission != PackageManager.PERMISSION_GRANTED) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n activity,\n PERMISSIONS_STORAGE,\n REQUEST_EXTERNAL_STORAGE\n );\n }\n }", "boolean isDiskImageMounted() {\n return (getMountedDiskImageFileUri() != null);\n }", "public static void verifyStoragePermissions(Activity activity) {\r\n // Check if we have write permission\r\n int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);\r\n\r\n if (permission != PackageManager.PERMISSION_GRANTED) {\r\n // We don't have permission so prompt the user\r\n ActivityCompat.requestPermissions(\r\n activity,\r\n PERMISSIONS_STORAGE,\r\n REQUEST_EXTERNAL_STORAGE\r\n );\r\n }\r\n }", "public static void verifyStoragePermissions(Activity activity) {\r\n // Check if we have write permission\r\n int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);\r\n\r\n if (permission != PackageManager.PERMISSION_GRANTED) {\r\n // We don't have permission so prompt the user\r\n ActivityCompat.requestPermissions(\r\n activity,\r\n PERMISSIONS_STORAGE,\r\n REQUEST_EXTERNAL_STORAGE\r\n );\r\n }\r\n }", "private boolean checkPermissions() {\n\n if (!isExternalStorageReadable() || !isExternalStorageReadable()) {\n Toast.makeText(this, \"This app only works on devices with usable external storage.\",\n Toast.LENGTH_SHORT).show();\n return false;\n }\n\n int permissionCheck = ContextCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE);\n if (permissionCheck != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_PERMISSION_WRITE);\n return false;\n } else {\n return true;\n }\n }", "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 }", "public static MountInfo getExternalStorageInfo() {\n if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n return null;\n };\n try {\n MountInfo mountInfo = new MountInfo();\n mountInfo.mpoint = Environment.getExternalStorageDirectory().getAbsolutePath();\n StatFs statFs = new StatFs(mountInfo.mpoint);\n long total = ((long) statFs.getBlockCount() * (long) statFs.getBlockSize());\n long free = (statFs.getAvailableBlocks() * (long) statFs.getBlockSize());\n mountInfo.used = total - free;\n mountInfo.free = free;\n mountInfo.total = total;\n return mountInfo;\n } catch (Exception e){\n e.printStackTrace();\n return null;\n }\n }", "private boolean checkSelfPermission() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}, MainActivity.PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE);\n return false;\n }\n return true;\n }", "public static void verifyStoragePermissions(Activity activity) {\n // Check if we have write permission\n int permission = ActivityCompat.checkSelfPermission(activity, android.Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n if (permission != PackageManager.PERMISSION_GRANTED) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n activity,\n PERMISSIONS_STORAGE,\n REQUEST_EXTERNAL_STORAGE\n );\n }\n }", "public static boolean canWriteOnExternalStorage() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public static void verifyStoragePermissions(Activity activity) {\n int writePermission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n int readPermission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n if (writePermission != PackageManager.PERMISSION_GRANTED || readPermission != PackageManager.PERMISSION_GRANTED) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n activity,\n PERMISSIONS_STORAGE,\n REQUEST_EXTERNAL_STORAGE\n );\n }\n }", "public static void verifyStoragePermissions(Activity activity) {\n int writePermission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n int readPermission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n if (writePermission != PackageManager.PERMISSION_GRANTED || readPermission != PackageManager.PERMISSION_GRANTED) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n activity,\n PERMISSIONS_STORAGE,\n REQUEST_EXTERNAL_STORAGE\n );\n }\n }", "private boolean isReadStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "public static void verifyStoragePermissions(Activity activity) {\n // Check if we have write permission\n int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n if (permission != PackageManager.PERMISSION_GRANTED) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n activity,\n PERMISSIONS_STORAGE,\n REQUEST_EXTERNAL_STORAGE\n );\n }\n }", "public static void verifyStoragePermissions(Activity activity) {\n // Check if we have write permission\n int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n if (permission != PackageManager.PERMISSION_GRANTED) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n activity,\n PERMISSIONS_STORAGE,\n REQUEST_EXTERNAL_STORAGE\n );\n }\n }", "public static void verifyStoragePermissions(Activity activity) {\n // Check if we have write permission\n int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n if (permission != PackageManager.PERMISSION_GRANTED) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n activity,\n PERMISSIONS_STORAGE,\n REQUEST_EXTERNAL_STORAGE\n );\n }\n }" ]
[ "0.75056946", "0.747401", "0.7208841", "0.7179138", "0.7170261", "0.71404856", "0.71324986", "0.7099447", "0.6957272", "0.67885524", "0.6788406", "0.67299986", "0.6722587", "0.67149085", "0.6708022", "0.6667349", "0.66560274", "0.66560274", "0.66560274", "0.66390985", "0.6635811", "0.66212857", "0.65304446", "0.65043116", "0.65043116", "0.65043116", "0.65029573", "0.6498014", "0.6466822", "0.6449332", "0.6441336", "0.6437598", "0.6421127", "0.64186853", "0.6365163", "0.6365163", "0.6365163", "0.6365163", "0.6365163", "0.6360153", "0.6358954", "0.6355893", "0.6351674", "0.633609", "0.63184094", "0.63184094", "0.63184094", "0.6315591", "0.63109905", "0.6290186", "0.6290186", "0.6290186", "0.6286442", "0.6281068", "0.62736124", "0.62736124", "0.62736124", "0.62736124", "0.62736124", "0.62736124", "0.6263077", "0.62347317", "0.6223411", "0.6223411", "0.622217", "0.6219052", "0.61935234", "0.61878663", "0.61822903", "0.61688817", "0.61688817", "0.6163552", "0.6161048", "0.6161048", "0.61480343", "0.6137138", "0.61230236", "0.6117845", "0.61011755", "0.609252", "0.6086688", "0.60778517", "0.60534185", "0.5991145", "0.5989258", "0.59781915", "0.5973634", "0.5972922", "0.5972922", "0.5967265", "0.5954874", "0.59461385", "0.59445065", "0.5937421", "0.5930858", "0.5926424", "0.5926424", "0.5925068", "0.5923202", "0.5923202", "0.5923202" ]
0.0
-1
Cancel the post on failure.
@Override public void onFailure(Call call, IOException e) { call.cancel(); System.out.println("FAILED"+ e.getMessage()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean cancelPost(Post post) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tif(postDao.delete(post)>0)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\t\r\n\t}", "@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }", "@Override\n public void onCancel() {\n Log.w(tag, \"post cancel\" + this.getRequestURI());\n cancelmDialog();\n super.onCancel();\n }", "protected abstract void onCancel();", "public void onCancel();", "@Override\n public void cancel() {\n }", "protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }", "@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}", "@Override\n protected void onCancel() {\n }", "private void cancel() {\n\t\tfinish();\n\t}", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}", "@Override\n public void cancel() {\n }", "@Override\n\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n public void onCancel() {\n }", "public void cancel() {\n\t\tcancelled = true;\n\t}", "@Override\n public void cancel() {\n\n }", "void onCancel();", "@Override\n public void cancel() {\n\n }", "@Override\n\t\t\t\t public void onCancel() {\n\t\t\t\t\t errorMessage = \"You cancelled Operation\";\n\t\t\t\t\t getResponse();\n\t\t\t\t }", "public void cancel(){\n cancelled = true;\n }", "public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}", "public synchronized void cancel() {\n }", "public void cancel( String reason );", "@Override\n\tpublic void cancel() {\n\t\t\n\t}", "@Override\n protected void onCancel(@CancelReason int cancelReason, @Nullable Throwable throwable) {\n }", "@Override\n protected void onCancel(@CancelReason int cancelReason, @Nullable Throwable throwable) {\n }", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "public void cancel() {\n\t\tcancel(false);\n\t}", "@Override\r\n\t\t\t\t\tpublic void onCancel() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n public void onCancel() {\n }", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "@Override\n public void onCancel() {\n\n }", "@Override\n public void onCancel() {\n\n }", "@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\t\n\t\t\t}", "public void cancel() {\n request.disconnect();\n }", "public void cancel() {\n\t}", "@Override\r\n\t\tpublic void onCancel() {\n\t\t}", "protected abstract void handleCancel();", "protected abstract void handleCancel() throws Exception;", "@Override\n\t\tpublic void onCancel() {\n \n \t}", "public void cancel()\n\t{\n\t}", "public void onCancel() {\n\t\t\t\t\t}", "public boolean cancel();", "public void cancel()\n {\n this.controller.cancelDownloads();\n\n // Synchronised to avoid a race condition\n synchronized(this.cancelledMonitor)\n {\n // Set the cancelled field to true\n this.cancelled = true;\n }\n theLogger.info(\"Cancel request recieved from UI\");\n }", "@Override\n public void onCancel() {\n\n }", "private void onCancel() {\n cancelDisposalProcess();\n }", "private void onCancel() {\n data.put(\"cerrado\",true);\n dispose();\n }", "public void cancel() {\n btCancel().push();\n }", "public void onCancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "public void onCancel() {\n }", "@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\tfinish();\n\t\t\t}", "private void onCancel()\r\n {\n dispose();\r\n }", "@Override\n public void onCancel() {\n\n }", "public abstract boolean cancel();", "public void cancel();", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\n }", "private void onCancel() {\n dispose();\r\n }", "public void onAbort() {\n releaseInitialRef.run();\n }", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "@Override\n public boolean isCancelled() {\n return false;\n }", "@Override\n public void onCancel() {\n\n }", "public void onCancel() {\n\n }", "@Override\n public void onTosRejected() {\n finish();\n }", "protected boolean reallyCancel() throws Exception { return true; }", "public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}", "private void cancel() {\n mFuture.cancel(mMayInterruptIfRunning);\n }", "@Override\n\t\t\t\tpublic boolean onCancel() {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n protected void onFailure(Throwable e) {\n // terminate thread\n terminate(false);\n }", "protected void onCancelled()\n {\n Update activity = (Update)m_ctx;\n activity.DeploymentFinished(false, m_ErrorCode);\n }", "public void cancel() {\n\t\tinterrupt();\n\t}", "protected void onPdCancel(){\r\r\t}", "void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }" ]
[ "0.6474391", "0.6434497", "0.63247514", "0.6260446", "0.62596667", "0.6228484", "0.62215054", "0.62182635", "0.6216263", "0.61932564", "0.6188827", "0.6188827", "0.6188827", "0.61713195", "0.61556405", "0.61413753", "0.6140468", "0.6108965", "0.6103515", "0.60948634", "0.60909456", "0.608725", "0.6085295", "0.60731727", "0.6068294", "0.6066936", "0.60655904", "0.60601616", "0.6053024", "0.6053024", "0.60481447", "0.60481447", "0.60481447", "0.60157037", "0.6008482", "0.60030174", "0.59897506", "0.59897506", "0.59897506", "0.59897506", "0.59897506", "0.59897506", "0.59734285", "0.59734285", "0.59668165", "0.59638506", "0.595263", "0.59373206", "0.59328127", "0.59298116", "0.59205544", "0.58947754", "0.58839977", "0.58698624", "0.58682185", "0.586217", "0.58480155", "0.58479524", "0.5838312", "0.58365303", "0.58248335", "0.58095384", "0.5803053", "0.58009136", "0.5798697", "0.57960016", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5785771", "0.5773662", "0.57680523", "0.57594913", "0.57594913", "0.57594913", "0.57594913", "0.57594913", "0.5749501", "0.57449186", "0.573937", "0.57186526", "0.5707758", "0.5697712", "0.56887126", "0.5680865", "0.5667828", "0.56629306", "0.56566346", "0.56489354", "0.56438875" ]
0.0
-1
In order to access the TextView inside the UI thread, the code is executed inside runOnUiThread()
@Override public void onResponse(Call call, final Response response) throws IOException { runOnUiThread(new Runnable() { @Override public void run() { try { responseString = response.body().string(); textView.setText("Request: " + requestString + "\nResponse: "+responseString); tts.speak(responseString); } catch (IOException e) { e.printStackTrace(); tts.speak("Failed to contact the server"); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}", "@Override\n public void run() {\n receivedTextView1.setText(str);\n }", "private void setText(final String text) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n TextView textView = findViewById(R.id.loading_text);\n if (textView != null) {\n textView.setText(textView.getText() + \"\\n\" + formatDate(System.currentTimeMillis()) + \": \" + text);\n }\n }\n });\n }", "@Override\n public void run() {\n receivedTextView6.setText(str5);\n receivedTextView5.setText(str4);\n receivedTextView4.setText(str3);\n receivedTextView3.setText(str2);\n receivedTextView2.setText(str1);\n receivedTextView1.setText(str0);\n }", "@Override\n public void run() {\n recieveView.setText(recvInput);\n }", "@Override\n public void run() {\n \tstatusTextView.setText(statusText(s));\n }", "@Override\n public void run() {\n if (mToast == null) {\n mToast = Toast.makeText(getApplicationContext(), text,\n Toast.LENGTH_SHORT);\n } else {\n mToast.setText(text);\n }\n mToast.show();\n }", "@Override\n public void runOnUiThread(Runnable r) {\n }", "public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n TextView tdate=(TextView)findViewById(R.id.textview_time);\n long date=System.currentTimeMillis();\n SimpleDateFormat sdf=new SimpleDateFormat(\"hh-mm a\");\n String dateString=sdf.format(date);\n tdate.setText(dateString);\n }\n });\n }", "private void runThread(String msg) {\n\n new Thread() {\n public void run() {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n ((TextView)findViewById(R.id.Resultext)).setText(msg);\n }\n });\n\n }\n }.start();\n }", "@Override\n public void run() {\n text_tracking.setText(tt);\n }", "@Override\n public void run() {\n text_tracking.setText(tt);\n }", "public void updateTextView(final String text)\n\t{\n\t\tmHandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tt.setText(text);\n\t\t\t}\n\t\t});\n\t}", "public void textRcvDataThread() {\n new Thread() {\n public void run() {\n while(isTextRcvData) {\n androidcontrolinterfaceVariable = (androidcontrolinterface) getApplication();\n rcvData = androidcontrolinterfaceVariable.getReceiveData();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n textRcvData.setText((int) rcvData[1] + \" \" + (int) rcvData[2]);\n }\n });\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }", "public void run() {\n textView.setText(Html.fromHtml(title));\n textView.append(\"\\n\");\n textView.append(\" \" + message + \" \\n\");\n }", "@Override\n public void run() {\n mTextView.setText(String.valueOf(co));\n }", "public static void text(final String sender, final String nachricht)\n {\n act.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n\n i=-i;\n String text=\"<br />\";\n text+=sender + \": \" + nachricht+\"\";\n RelativeLayout rel = new RelativeLayout(act.getApplicationContext());\n TextView textview=new TextView(act.getApplicationContext());\n textview.setTextSize(17);\n textview.setTextColor(Color.parseColor(\"#131313\"));\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);\n params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT,1);\n\n RelativeLayout.LayoutParams params2=params;\n params2.setMargins(5,5,5,0);\n rel.setLayoutParams(params2);\n textview.setWidth(layout.getWidth()/2);\n textview.setLayoutParams(params);\n textview.setId(chatid);\n if(sender.equals(name))\n {\n rel.setGravity(Gravity.RIGHT);\n if(i==1)\n {\n textview.setBackgroundResource(R.drawable.rounded_corner2);\n }\n else\n {\n textview.setBackgroundResource(R.drawable.rounded_corner);\n }\n }\n else\n {\n rel.setGravity(Gravity.LEFT);\n if(i==1)\n {\n textview.setBackgroundResource(R.drawable.rounded_corner2);\n }\n else\n {\n textview.setBackgroundResource(R.drawable.rounded_corner);\n }\n\n }\n textview.append(Html.fromHtml((text)));\n textview.append(Html.fromHtml((\"<br />\")));\n\n rel.addView(textview);\n layout.addView(rel);\n\n final ScrollView scroll = (ScrollView) vi.findViewById(R.id.chatscroll);\n scroll.post(new Runnable() {\n @Override\n public void run() {\n scroll.fullScroll(View.FOCUS_DOWN);\n }\n });\n\n chatid=chatid+1;\n }\n });\n\n }", "@Override\n\tpublic void run() {\n\t\t((Activity)context).runOnUiThread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tString string = context.getString(R.string.message_timer, MainActivity.TIMER_TASK_PERIOD / 1000);\n\t\t\t\tToast.makeText(context, string, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}", "private void updateCounterView(String text) {\n final String txt = text;\n main.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if(txt!=null) {\n pointsLeftView.setText(txt);\n } else {\n pointsLeftView.setText(Integer.toString(counter));\n }\n }\n });\n }", "private void update(String text, TextView view) {\r\n handler.post(new TextUpdater(text, view));\r\n }", "public void run() {\n mTextView.setTranslationY(-mTextView.getHeight());\n mTextView.animate().setDuration(duration / 2).translationY(0).alpha(1)\n .setInterpolator(sDecelerator);\n }", "@Override\n public void call(Object... args) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n //edit.setText(\"Success!!!!!\");\n Toast.makeText(getApplicationContext(),\"Success send Test \",Toast.LENGTH_LONG).show();\n }\n });\n }", "abstract TextView getTextView();", "@Override\n\t\tpublic void run() {\n\t\t\tmytv.setText(String.valueOf(randomDouble));\n\t\t\tLog.d(\"runable\",\"settext\");\n\t\t}", "public void run() {\n barcodeInfo.setText( // Update the TextView\n barcodes.valueAt(0).displayValue\n );\n }", "public void MonitorTextView()\n {\n TextView textview = (TextView) findViewById(R.id.textViewDelayLength);\n textview.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View v) {\n EditText editText = (EditText) findViewById(R.id.editTextMessageDelay);\n SeekBar seek = (SeekBar) findViewById(R.id.seekBarMessageDelay);\n if (editText.getVisibility() == View.GONE)\n {\n editText.setVisibility(View.VISIBLE);\n seek.setVisibility(View.GONE);\n }\n else if (editText.getVisibility() == View.VISIBLE)\n {\n editText.setVisibility(View.GONE);\n seek.setVisibility(View.VISIBLE);\n }\n }\n });\n }", "private void update_text() {\n\n if(i < text_data.length) {\n i++;\n // text_data.setText(String.valueOf(i)); = avoid the RunTime error\n myHandler.post(myRunnable); // relate this to a Runnable\n } else {\n myTimer.cancel(); // stop the timer\n return;\n }\n }", "@Override\n public void onClick(View view) {\n\n runOnUiThread(\n new Runnable() {\n @Override\n public void run() {\n MainActivity\n .this\n .connectionManager.getTo().println(\n MainActivity\n .this\n .send_text.getText().toString()\n );\n }\n }\n );\n\n }", "public abstract void runOnUiThread(Runnable runnable);", "@Override\r\n\tpublic void setupView() {\n\t\ttv = (TextView) findViewById(R.id.mjson_layout_text);\r\n\t}", "@Override\n public void run() {\n \tBTstatusTextView.setText(s);\n \t\n \tif(s.equals(\"BT-Ready\") && !(poll.getVisibility() == View.VISIBLE)){\n \t\tLog.d(\"poll buttion\", \"setting visible\");\n \t//Ready to poll\n \t\tpoll.setVisibility(View.VISIBLE);\n \t\n }\n }", "@Override\n protected void onPostExecute(String result) {\n // tvResult.setText(result);\n }", "@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}", "private void m50364C() {\n m50412n().runOnUiThread(new C11092g(this));\n }", "@Override\n public void run() {\n result.setText(\"\"+res);\n }", "@Override\n public void run() { // This is running in the UI Thread so updating the label\n ourLabel.setText(\"We did something\");\n }", "private void setText(View view, String text) {\n\t\t((TextView) view.findViewById(android.R.id.text1)).setText(text);\n\t}", "protected void updateUI() {\n this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n xWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro X:\\n\"\n + mWakeupUncalibratedGyroData[0]);\n yWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Y:\\n\"\n + mWakeupUncalibratedGyroData[1]);\n zWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Z:\\n\"\n + mWakeupUncalibratedGyroData[2]);\n }\n });\n }", "public TextView getTextView() {\n\n return (TextView) findViewById(R.id.sendToLogin);\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\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\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\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\t});\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() {\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\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\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\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\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}", "private void updateText(final String info, final String caller) {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\n\t\t\t\tinfoText.setText(info);\n\t\t\t\tcallerText.setText(caller);\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onFailure(Call call, IOException e) {\n call.cancel();\n\n // In order to access the TextView inside the UI thread, the code is executed inside runOnUiThread()\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// TextView responseText = findViewById(R.id.responseText);\n// responseText.setText(\"Failed to Connect to Server\");\n Log.d(\"Flask Server\",\"Failed to connect to server\");\n }\n });\n }", "public void receiveMyMessage(String msg) {\n \t\n final String str = msg;\n \n mHandler.post(new Runnable() {\n @Override\n public void run() {\n // This gets executed on the UI thread so it can safely modify Views\n receivedTextView1.setText(str);\n }\n });\n }", "@Override\n protected void onPostExecute(String result) {\n tvContenidoTarea.setText(result); // txt.setText(result);\n // might want to change \"executed\" for the returned string passed\n // into onPostExecute() but that is upto you\n }", "public void fillText(View view){\n if(running==true){\n\n\n latestOp=false;\n for(int i = 0; i<9; i++)\n if(i==win&&idOfViews[i]==view.getId()) {\n score++;\n sec=sec+3;\n latestOp=true;\n }\n\n //Defining the score\n total++;\n scoret.setText(\" \"+score+\" /\"+total);\n\n //Setting the message about the latest one.\n resultT.setText(\"Missed\");\n if(latestOp==true)\n resultT.setText(\"Correct!\");\n\n\n //Calling a new screen\n newScreen();\n }\n\n\n }", "private void updateOutputText() {\r\n UiApplication.getUiApplication().invokeLater(new Runnable() {\r\n public void run() {\r\n _outputText.setText(_output);\r\n }\r\n });\r\n }", "@Override\n public void onFailure(Call call, final IOException e) {\n activity.runOnUiThread(() -> {\n textView.setText(e.getMessage());\n Toast.makeText(activity, \"fail\", Toast.LENGTH_SHORT).show();\n });\n }", "private void updateLabelText() {\n /*\n r18 = this;\n android.view.View r13 = r18.getNativeView()\n android.widget.TextView r13 = (android.widget.TextView) r13\n if (r13 != 0) goto L_0x0009\n L_0x0008:\n return\n L_0x0009:\n boolean r7 = r18.isSingleLine()\n r0 = r18\n float r0 = r0.minimumFontSizeInPixels\n r16 = r0\n r17 = 1036831949(0x3dcccccd, float:0.1)\n int r16 = (r16 > r17 ? 1 : (r16 == r17 ? 0 : -1))\n if (r16 < 0) goto L_0x00f6\n r3 = 1\n L_0x001b:\n r8 = r3\n r13.setSingleLine(r7)\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x00f9\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n r13.setLines(r0)\n L_0x0032:\n if (r7 == 0) goto L_0x0102\n r16 = 1\n r0 = r16\n r13.setMaxLines(r0)\n L_0x003b:\n r0 = r18\n java.lang.CharSequence r11 = r0.originalText\n if (r11 != 0) goto L_0x0135\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n java.lang.String r16 = \"\"\n r0 = r16\n r11.<init>(r0)\n r12 = r11\n L_0x004b:\n if (r8 == 0) goto L_0x0132\n int r16 = r12.length()\n if (r16 <= 0) goto L_0x0132\n r2 = 0\n L_0x0054:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x006c\n char r10 = r12.charAt(r2)\n r16 = 13\n r0 = r16\n if (r10 == r0) goto L_0x006c\n r16 = 10\n r0 = r16\n if (r10 != r0) goto L_0x012b\n L_0x006c:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x0132\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n r16 = 0\n r0 = r16\n r11.<init>(r12, r0, r2)\n L_0x007d:\n boolean r0 = r11 instanceof android.text.Spannable\n r16 = r0\n if (r16 != 0) goto L_0x0089\n android.text.SpannableStringBuilder r12 = new android.text.SpannableStringBuilder\n r12.<init>(r11)\n r11 = r12\n L_0x0089:\n r1 = 0\n r0 = r18\n int r0 = r0.autoLinkFlags\n r16 = r0\n if (r16 == 0) goto L_0x00a0\n r16 = r11\n android.text.Spannable r16 = (android.text.Spannable) r16\n r0 = r18\n int r0 = r0.autoLinkFlags\n r17 = r0\n boolean r1 = android.text.util.Linkify.addLinks(r16, r17)\n L_0x00a0:\n if (r1 == 0) goto L_0x012f\n android.text.method.MovementMethod r9 = android.text.method.LinkMovementMethod.getInstance()\n L_0x00a6:\n android.text.method.MovementMethod r16 = r13.getMovementMethod()\n r0 = r16\n if (r9 == r0) goto L_0x00c6\n boolean r5 = r13.isFocusable()\n boolean r4 = r13.isClickable()\n boolean r6 = r13.isLongClickable()\n r13.setMovementMethod(r9)\n r13.setFocusable(r5)\n r13.setClickable(r4)\n r13.setLongClickable(r6)\n L_0x00c6:\n r0 = r18\n android.text.TextUtils$TruncateAt r14 = r0.ellipsize\n if (r9 == 0) goto L_0x00da\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.START\n r0 = r16\n if (r14 == r0) goto L_0x00d8\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MIDDLE\n r0 = r16\n if (r14 != r0) goto L_0x00da\n L_0x00d8:\n android.text.TextUtils$TruncateAt r14 = android.text.TextUtils.TruncateAt.END\n L_0x00da:\n r13.setEllipsize(r14)\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MARQUEE\n r0 = r16\n if (r14 != r0) goto L_0x00ea\n r16 = 1\n r0 = r16\n r13.setSelected(r0)\n L_0x00ea:\n android.widget.TextView$BufferType r16 = android.widget.TextView.BufferType.NORMAL\n r0 = r16\n r13.setText(r11, r0)\n r13.requestLayout()\n goto L_0x0008\n L_0x00f6:\n r3 = 0\n goto L_0x001b\n L_0x00f9:\n r16 = 0\n r0 = r16\n r13.setMinLines(r0)\n goto L_0x0032\n L_0x0102:\n r0 = r18\n int r0 = r0.maxLines\n r16 = r0\n if (r16 <= 0) goto L_0x0129\n r0 = r18\n int r15 = r0.maxLines\n L_0x010e:\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x0124\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n if (r15 <= r0) goto L_0x0124\n r0 = r18\n int r15 = r0.viewHeightInLines\n L_0x0124:\n r13.setMaxLines(r15)\n goto L_0x003b\n L_0x0129:\n r15 = 1\n goto L_0x010e\n L_0x012b:\n int r2 = r2 + 1\n goto L_0x0054\n L_0x012f:\n r9 = 0\n goto L_0x00a6\n L_0x0132:\n r11 = r12\n goto L_0x007d\n L_0x0135:\n r12 = r11\n goto L_0x004b\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p006ti.modules.titanium.p007ui.widget.TiUILabel.updateLabelText():void\");\n }", "@Override\r\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\t\tactivityContext,\r\n\t\t\t\t\t\t\t\tR.string.unable_to_fetch_the_details,\r\n\t\t\t\t\t\t\t\t2000);\r\n\r\n\t\t\t\t\t\t }", "@Override\n public void onClick(View v) {\n TextView activityText = getActivity().findViewById(R.id.text_view_activity);\n if (activityText == null) {\n Log.i(MainActivity.TAG, \"TextView in activity not found\");\n } else {\n activityText.setText(\"got from down fragment\");\n Log.i(MainActivity.TAG, \"TextView in activity edited successfully\");\n }\n }", "private void fillTextViewContent(){\n if(mPhotoInfo != null){\n if(mPhotoInfo.getOwner().getRealname()!= null){\n mOwner = mPhotoInfo.getOwner().getRealname();\n }else if(mPhotoInfo.getOwner().getUsername() != null){\n mOwner = mPhotoInfo.getOwner().getUsername();\n }\n\n if(mOwner != null && mOwner.length() > 0){\n mOwnerTv.setText(mOwner);\n }else{\n mOwnerTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getTitle() != null){\n mTitle = mPhotoInfo.getTitle().getContent();\n }\n\n if(mTitle != null && mTitle.length() > 0){\n if(mTitle.length() > 120){\n mTitle = mTitle.substring(0,120) + \"...\";\n }\n mTitleTv.setText(mTitle);\n }else{\n mTitleTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getDescription() != null){\n mDesc = mPhotoInfo.getDescription().getContent();\n }\n\n if(mDesc != null && mDesc.length() > 0){\n if(mDesc.length() > 120){\n mDesc = mDesc.substring(0,120) + \"...\";\n }\n mDescTv.setText(mDesc);\n }else{\n mDescTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getDateuploaded() != null){\n mDates = mPhotoInfo.getDateuploaded();\n }\n\n if(mDates != null && mDates.length() > 0){\n SimpleDateFormat simpleDateFormat =\n new SimpleDateFormat(\"MM/dd/yyyy\", Locale.getDefault());\n Date date = new Date(System.currentTimeMillis() - Long.parseLong(mDates));\n mDatesTv.setText(simpleDateFormat.format(date));\n }else{\n mDatesTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getViews() != null){\n mViews = mPhotoInfo.getViews();\n }\n\n if(mViews != null && mViews.length() > 0){\n mViewsTv.setText(mViews);\n }else{\n mViewsTv.setText(R.string.info_not_available);\n }\n }\n }", "@Override\n public void run() {\n descriptionActivity.mReadingScore.setText(\"Reading: \"+ read);\n descriptionActivity.mMathScore.setText(\"Math: \" + math);\n descriptionActivity.mWritingScore.setText(\"Writing: \" + writing);\n }", "@Override\r\n public void onClick(View v) {\n String iptext = setIP.getText().toString();\r\n new Thread(new TestHandler(iptext)).start();\r\n }", "public void tvUpdate(final TextView tv, final String msg) {\n\t\tthis.runOnUiThread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttv.setText(msg);\n\t\t\t}\n\t\t});\n\t}", "@Override\n\t \t\tpublic void handleMessage(Message msg) {\n\t \t\treceive();\n\t \t\t\t// myTextView.setText(String.valueOf(cnt));\n\t \t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n txtV.setText(\"AsyncTask Start \");\n }", "@Override\n public void onClick(View v) {\n RequestTask requestTask = new RequestTask();\n requestTask.execute();\n //SystemClock.sleep(5000);\n // textView.setText(htmldata);\n }", "@Override\n public void initView() throws Exception {\n mGrowSeedlingsTimeTextView = (TextView) findViewById(R.id.GrowSeedlingsTime_TextView);\n mGrowSeedlingsTimeRecyclerView = (RecyclerView) findViewById(R.id.GrowSeedlingsTime_RecyclerView);\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tMusicPlayerContainer.this.adjustInfoTextViewAlpha();\r\n\t\t}", "@Override\n public void run() {\n TextView tempDoe = (TextView) findViewById(R.id.tempMonitor);\n TextView humid = (TextView) findViewById(R.id.humidMonitor);\n TextView noisePol = (TextView) findViewById(R.id.noisePolMonitor);\n TextView carMon = (TextView) findViewById(R.id.coMonitor);\n float value = new BigInteger(tokens[0], 16).longValue();\n //System.out.println(value);\n float temp = (value * 50) / 65535;\n //System.out.println(temp);\n double tempFah = temp * 1.8000 + 32.00;\n String tempFahStr = String.valueOf(tempFah);\n //System.out.println(tempFah);\n int humidity = (Integer.parseInt(tokens[1],16) * 100) / 65535;\n String humidityDoe = String.valueOf(humidity);\n double noiseLev = Integer.parseInt(tokens[2],16);\n noiseLev = 20*(Math.log10(noiseLev/1024));\n String noiseLevStr = String.valueOf(noiseLev);\n int methane = Integer.parseInt(tokens[3],16);\n String methaneStr = String.valueOf(methane);\n tempDoe.setText(tempFahStr);\n humid.setText(humidityDoe);\n noisePol.setText(noiseLevStr);\n carMon.setText(methaneStr);\n }", "@Override\r\n\t\t\t\tpublic void run()\r\n\t\t\t\t{\n\t\t\t\t\tsendMessage(UPDATE_TEXTVIEW);\r\n\t\t\t\t\tdo\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(count == size)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmHandler.sendEmptyMessage(PLAY_END);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Log.i(\"\", \"sleep(1000)...\");\r\n\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch (InterruptedException e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile(isPause);\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}", "interface View extends BaseView {\n void onTextLoaded(String text);\n }", "@Override\n public void run() {\n Toast.makeText(rootView.getContext(), mensaje,\n Toast.LENGTH_LONG).show();\n }", "void noDataFoundTextView();", "public void fillTextView(){\n\n data += \"Distance: \" + Math.round(distanceValue * 1000) / 1000.0 + \"\\n\";\n data += \"minSpeed: \" + minSpeed +\"\\n\";\n data += \"maxSpeed: \" + maxSpeed +\"\\n\";\n data += \"Avg Speed: \"+ Math.round(averageSpeed * 1000) / 1000.0 +\"\\n\";\n data += \"minAltitude: \"+minAlt +\"\\n\";\n data += \"maxAltitude: \"+maxAlt+\"\\n\";\n data += \"Avg Alt: \"+Math.round(averageAlt * 1000) / 1000.0 +\"\\n\";\n\n textView.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n textView.setText(data);\n\n }", "protected TextView textView( final int childViewIndex )\n {\n return updater.textView( childViewIndex );\n }", "@Override\n public void run() {\n try {\n FileInputStream is = new FileInputStream(f);\n InputStreamReader isr = new InputStreamReader(is);\n BufferedReader br = new BufferedReader(isr);\n String s = null;\n s = br.readLine();\n String rs = s;\n while (s != null) {\n rs = rs + s;\n s = br.readLine();\n }\n Log.e(\"htmle\", rs);\n TextView t1 = (TextView) findViewById(R.id.textView);\n t1.setText(\"\" + rs);\n // le scroll a ete fait grace a la dock sur stackoverflow url:http://stackoverflow.com/questions/1748977/making-textview-scrollable-in-android\n t1.setMovementMethod(new ScrollingMovementMethod());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n\n tv2.setText(response);\n\n int nTop = tv2.getLayout().getLineTop(tv2.getLineCount());\n int nScrollY = nTop - tv2.getHeight();\n if(nScrollY > 0){\n tv2.scrollTo(0, nScrollY);\n }else {\n tv2.scrollTo(0, 0);\n }\n\n progressDialog.dismiss();\n //context.startActivity(new Intent(context, MainActivity.class));\n //((Activity) context).finish();\n }", "public void inputText(View v) {\n EditText textIn = (EditText) findViewById(R.id.waitingTime);\n\n TextView textOut = (TextView) findViewById(R.id.question);\n textOut.setText(textIn.getText());\n }", "private void updateUI(String msg){\n if(msg != null) {\n textViewStatus.setText(msg);\n }\n }", "protected void onPostExecute(String page) {\n textView.setText(page);\n }", "public void TextView_Config(){\n textviewBaro=(TextView) findViewById(R.id.textviewGravity);\n textviewAcceleration=(TextView) findViewById(R.id.textviewAcceleration);\n textviewGyro=(TextView) findViewById(R.id.textviewGyro);\n display=(TextView)findViewById(R.id.textView1);\n }", "private void displayTextView() {\n wellnessEntryErrorTextView.setText(\"This is an error message e.g no data\");\n wellnessEntryErrorTextView.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.GONE);\n }", "private void setupTextView() {\n painterTextViewMoves = findViewById(R.id.painterTextView1);\n painterTextViewTime = findViewById(R.id.painterTextView2);\n painterTextViewPoints = findViewById(R.id.painterTextView3);\n painterTextViewInstructions = findViewById(R.id.painterInstructionsView);\n }", "private void updateUI() {\n// if (mCurrentLocation != null) {\n// mLatitudeTextView.setText(String.valueOf(mCurrentLocation.getLatitude()));\n// mLongitudeTextView.setText(String.valueOf(mCurrentLocation.getLongitude()));\n// mLastUpdateTimeTextView.setText(mLastUpdateTime);\n// }\n }", "@Override\n protected void onPostExecute(String result) {\n temptext.setText(result+data);\n }", "@Override\n\t\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\ttextView_setpsd_info.setText(str);\n\t\t\t\t}", "private TextView getTextView(String content) {\n TextView textView = new TextView(this.getContext());\n textView.setEms(30);\n textView.setTextColor(getResources().getColor(R.color.ldstools_black));\n if(content != null && !content.isEmpty()) {\n textView.setText(content);\n }\n return textView;\n }", "@Override\r\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\r\n\t\t\tshowtalk.setText(result);\r\n\t\t}", "@Override\n\tpublic void SuccessText(String text) {\n\t\tLog.i(TAG, \"==-->text:=\"+text);\n\t\tmain_one.setText(text);\n\t}", "@Override\n public void run() {\n Utils.runOnUIThread(new Runnable() {\n @Override\n public void run() {\n updateUI(symbolField.getText().toString());\n }\n });\n }", "public void tongOnUI(final String msg) {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void tingOnUI(final String msg) {\r\n\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "private void setInfo(String info) {\n// TextView textView = (TextView) findViewById(R.id.info);\n// textView.setText(info);\n }", "private void updateUI() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n if(timer_count==5) {\n\n //Animation Starts by Singing Si\n animateReceiveMoney();\n animateSendMoney();\n PlayIntoSound(siID);\n\n tvSiOut.setVisibility(View.VISIBLE);\n tvSiIn.setVisibility(View.VISIBLE);\n tvDoIn.setVisibility(View.VISIBLE);\n tvDoOut.setVisibility(View.VISIBLE);\n tvSIDO.setVisibility(View.VISIBLE);\n tvSIDO.setText(\"SI\");\n }\n\n else if(timer_count==20){\n //Animation Ends by Singing Do\n PlayIntoSound(doID);\n\n //dISPLAY DO TEXT\n tvSIDO.setText(\"SIDO\");\n\n\n }\n\n else if(timer_count==25){\n\n //DISPLAY mONEY TRANSFER TEXT\n tvMoneyTransfer.setVisibility(View.VISIBLE);\n\n }\n\n }\n });\n }", "@Override\r\n public void onResult(byte[] data)\r\n {\n StringBuffer sb = new StringBuffer();\r\n sb.append(getString(R.string.external_device_recv_data)).append(\"\\n\");\r\n sb.append(new String(data)).append(\"\\n\");\r\n \r\n McRecvOnBoard = sb.toString();\r\n \r\n MainControllerDemoActivity.this.runOnUiThread(new Runnable(){\r\n\r\n @Override\r\n public void run() \r\n { \r\n mRecvTextView.setText(McRecvOnBoard);\r\n }\r\n });\r\n }", "void setText(CharSequence s) {\n if (mNextView == null) {\n throw new RuntimeException(\"This Toast was not created with Toast.makeText()\");\n }\n\n final TextView textView = mNextView.findViewById(R.id.message);\n\n if (textView == null) {\n throw new RuntimeException(\"This Toast was not created with Toast.makeText()\");\n }\n\n textView.setText(s);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n textViewServices = (TextView) findViewById(R.id.displayConnected2);\n recievedTextString = (TextView) findViewById(R.id.recievedString);\n\n mNsdHelperClient = new NsdHelperClient(this);\n mNsdHelperClient.initializeNsd();\n mNsdHelperClient.discoverServices();\n\n\n Button btn = (Button) findViewById(R.id.button1);\n\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mNsdHelperClient.receivedServices != null) {\n new Thread(runUdpClient).start();\n }\n }\n });\n\n }", "public void updateView(String message) {\n output.setText(message);\n \n }", "@Override\n public void run() {\n SimpleDateFormat todayFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\n String todayKey = todayFormat.format(Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault()).getTime());\n contactsToday.setText(\"Today's exposure score: \" + prefs.getInt(todayKey, 0));\n if (isVisible) {\n chartView.loadUrl(generateChartString(prefs.getInt(\"chartMode\", 2))); //update the chart\n }\n\n //show the devices contirbuting--this is not visible by default because the textView that holds it is set to GONE but can be turned pn\n String dispResult = \"\";\n for (String i : scanData.getInstance().getData().keySet()) {\n ScanResult temp = scanData.getInstance().getData().get(i);\n if (temp.getRssi() > LIST_THRESH) {\n dispResult = dispResult + temp.getDevice().getAddress() + \" : \" + temp.getDevice().getName() + \" \" + temp.getRssi() + \"\\n\";\n }\n }\n status.setText(dispResult);\n\n handler.postDelayed(this, 30000);\n\n }", "@Override\n public void run() {\n FileInputStream fis = null;\n try {\n fis = new FileInputStream(f);\n InputStreamReader fisr = new InputStreamReader(fis);\n BufferedReader fbr = new BufferedReader(fisr);\n String fs = fbr.readLine();\n String rfs = fs;\n while (fs != null) {\n rfs = rfs + fs;\n fs = fbr.readLine();\n }\n Log.e(\"html\", rfs);\n TextView t1 = (TextView) findViewById(R.id.textView);\n t1.setText(\"\"+rfs);\n // le scroll a ete fait grace a la dock sur stackoverflow url:http://stackoverflow.com/questions/1748977/making-textview-scrollable-in-android\n t1.setMovementMethod(new ScrollingMovementMethod());\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void run()\n {\n angleText.setText(data);\n turnText.setText(Integer.toString(turnAngle));\n }", "@Override\n public void onResponse(String response) {\n mTextView.setText(\"Response is: \" + response);\n }", "@Override\n\tpublic void runOnUiThread( final Runnable action ) {\n\t\tif ( mContext != null ) ( (Activity) mContext ).runOnUiThread( action );\n\t}", "@Override\n public void onResponse(Call call, final Response response) throws IOException {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// TextView responseText = findViewById(R.id.responseText);\n try {\n// responseText.setText(response.body().string());\n Log.d(\"Flask Server\",response.body().string());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_myo_control);\n textRcvData = (TextView) findViewById(R.id.textReceiveData);\n isTextRcvData = true;\n }", "public void updateView(String message)\n {\n Log.w(\"MainActivity\",\"In updateview: \" + message);\n\n TextView messageTV = findViewById(R.id.messageTextView);\n\n messageTV.setText(message);\n\n }", "protected void setUpTextView(TextView textView, String text) {\n textView.setText(text);\n textView.setVisibility(text.isEmpty() ? View.GONE : View.VISIBLE);\n }", "public void updateViews() {\n textView.setText(contactName);\n\n }" ]
[ "0.7408931", "0.71110296", "0.69718766", "0.67851746", "0.67799693", "0.67282355", "0.6704073", "0.6703086", "0.6700727", "0.6657189", "0.6639182", "0.6639182", "0.6589413", "0.6575342", "0.6570395", "0.6525181", "0.6457177", "0.6447624", "0.6436697", "0.64345914", "0.63987124", "0.63418734", "0.6310888", "0.6276633", "0.62060475", "0.61965424", "0.61936265", "0.6170578", "0.61509156", "0.61227417", "0.611029", "0.61101264", "0.6091298", "0.6089737", "0.6049434", "0.60412645", "0.6024876", "0.6018103", "0.6005125", "0.5999344", "0.5954574", "0.5954574", "0.59492606", "0.5947426", "0.5940496", "0.5939684", "0.59375143", "0.59310603", "0.59140974", "0.59072787", "0.59035015", "0.5889336", "0.58846873", "0.5867886", "0.5864802", "0.58616376", "0.58585346", "0.5852709", "0.58509034", "0.5850459", "0.58503693", "0.58478427", "0.58443975", "0.5838781", "0.5837851", "0.5834513", "0.5833896", "0.5829306", "0.5818267", "0.57841915", "0.5781259", "0.5775482", "0.5772219", "0.5772206", "0.5772105", "0.57720697", "0.57715994", "0.5768661", "0.5764647", "0.57557964", "0.57514817", "0.5750265", "0.5747285", "0.57454515", "0.5724745", "0.5721958", "0.5721384", "0.5718006", "0.5711001", "0.57054406", "0.57002914", "0.5695324", "0.5679483", "0.5678999", "0.5677457", "0.5659835", "0.5657081", "0.5656126", "0.5654148", "0.5651767", "0.5642998" ]
0.0
-1
E11.6 Cannot read files on my comp due to some technical issue which I can not figure out regardless of how much I try I will simulate this problem with arrays instead
public void E11_6() { double[] row1 = {7.5, 3.6}; double[] row2 = {4.2, 9.7}; double[] row3 = {6.1, 8.0}; double column1Sum = row1[0] + row2[0] + row3[0]; double column2Sum = row1[1] + row2[1] + row3[1]; System.out.println("Column 1 average: " + (column1Sum/3)); System.out.println("Column 2 average: " + (column2Sum/3)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void readFiles(Boolean smart) \n\t//throws IOException// more here for safety\n\t{\n\t\tint i;\n\t\tfor (i = 0; i<165; ++i)\n\t\tfor (int j = 0; j<11; ++j)\n\t\t{\t//if(smart)memoryFile.readInt(board(i,j));\n\t\t\t//else \n\t\t\t\tboard[i][j] = 0;\n\t\t}\n\t\t//try memoryFileStream.close(); catch (IOException e);\n\t}", "private List a(File var1_1) {\n var2_7 = dq.a().a();\n var2_7 = var2_7 == null ? \"\" : var2_7.a();\n var3_8 = TextUtils.isEmpty((CharSequence)var2_7);\n var4_9 = 0;\n var5_10 = null;\n if (var3_8) {\n return null;\n }\n var6_11 = new ArrayList<Object>();\n var7_12 = 4;\n var8_13 = new byte[var7_12];\n var9_14 = dv.a;\n synchronized (var9_14) {\n block37: {\n block36: {\n block38: {\n var11_16 = this.a;\n var11_16 = var11_16.getExternalFilesDir(null);\n var12_17 = \"push_cdata.lock\";\n var10_15 = new File((File)var11_16, (String)var12_17);\n y.a((File)var10_15);\n var12_17 = \"rw\";\n var11_16 = new RandomAccessFile((File)var10_15, (String)var12_17);\n var10_15 = var11_16.getChannel();\n var10_15 = var10_15.lock();\n try {\n var12_17 = new FileInputStream((File)var1_1);\n }\n catch (Throwable var1_3) {\n var12_17 = null;\n }\n while (true) {\n block34: {\n var13_18 = var12_17.read(var8_13);\n if (var13_18 == var7_12 && (var14_19 = var12_17.read((byte[])(var5_10 = (Object)new byte[var13_18 = ac.a(var8_13)]))) == var13_18) break block34;\n if (var10_15 != null && (var13_18 = (int)var10_15.isValid()) != 0) {\n var10_15.release();\n }\nlbl34:\n // 4 sources\n\n while (true) {\n y.a((Closeable)var12_17);\nlbl36:\n // 2 sources\n\n while (true) {\n y.a((Closeable)var11_16);\n return var6_11;\n }\n break;\n }\n }\n var1_1 = du.a((String)var2_7, (byte[])var5_10);\n if (var1_1 == null || (var4_9 = ((Object)var1_1).length) == 0) continue;\n var5_10 = new hu();\n iw.a((ix)var5_10, (byte[])var1_1);\n var6_11.add(var5_10);\n continue;\n break;\n }\n catch (Throwable var1_2) {\n }\n var5_10 = var10_15;\n break block38;\n catch (Exception v0) {\n var12_17 = null;\nlbl57:\n // 2 sources\n\n while (true) {\n var5_10 = var10_15;\n break block36;\n break;\n }\n }\n catch (Throwable var1_6) {\n var11_16 = null;\n var12_17 = null;\n }\nlbl64:\n // 1 sources\n\n while (true) {\n var11_16 = null;\n var12_17 = null;\n break block36;\n break;\n }\n catch (Exception v1) {\n ** continue;\n }\n catch (Throwable var1_5) {\n var12_17 = null;\n }\n catch (Exception v2) {\n var12_17 = null;\n break block36;\n }\n }\n if (var5_10 != null && (var15_20 = var5_10.isValid())) {\n var5_10.release();\n }\nlbl80:\n // 4 sources\n\n while (true) {\n y.a(var12_17);\n y.a((Closeable)var11_16);\n throw var1_4;\n }\n }\n if (var5_10 != null && (var13_18 = var5_10.isValid()) != 0) {\n ** try [egrp 9[TRYBLOCK] [54 : 388->393)] { \nlbl87:\n // 1 sources\n\n break block37;\n } else lbl-1000:\n // 3 sources\n\n {\n while (true) {\n y.a((Closeable)var12_17);\n ** continue;\n break;\n }\n }\nlbl91:\n // 1 sources\n\n catch (IOException v3) {\n ** GOTO lbl-1000\n }\n catch (IOException v4) {\n ** continue;\n }", "public static List<double[]> readAlpha(File f)\n/* */ throws Exception\n/* */ {\n/* 89 */ throw new Error(\"Unresolved compilation problem: \\n\");\n/* */ }", "public static ArrayList B() {\n int n10;\n ArrayList<String[]> arrayList = new ArrayList<String[]>();\n Object object = Environment.getRootDirectory().getAbsoluteFile();\n ((StringBuilder)((Object)arrayList)).append(object);\n object = File.separator;\n ((StringBuilder)((Object)arrayList)).append((String)object);\n Object object2 = \"etc\";\n ((StringBuilder)((Object)arrayList)).append((String)object2);\n ((StringBuilder)((Object)arrayList)).append((String)object);\n object = \"vold.fstab\";\n ((StringBuilder)((Object)arrayList)).append((String)object);\n arrayList = ((StringBuilder)((Object)arrayList)).toString();\n Object object3 = new File((String)((Object)arrayList));\n arrayList = new ArrayList<String[]>();\n boolean bl2 = ((File)object3).exists();\n if (!bl2) {\n return arrayList;\n }\n object = new ArrayList();\n try {\n object.clear();\n Object object4 = new FileReader((File)object3);\n object2 = new BufferedReader((Reader)object4);\n while ((object3 = ((BufferedReader)object2).readLine()) != null) {\n object4 = \"dev_mount\";\n n10 = ((String)object3).startsWith((String)object4);\n if (n10 == 0) continue;\n object.add(object3);\n }\n ((BufferedReader)object2).close();\n object.trimToSize();\n }\n catch (IOException iOException) {}\n object3 = object.iterator();\n while (bl2 = object3.hasNext()) {\n int n11;\n object = (String)object3.next();\n if (object == null || (object = object.split((String)(object2 = \" \"))) == null || (n11 = ((String[])object).length) < (n10 = 4) || (object = object[n11 = 2]) == null || (n11 = (int)(((File)(object2 = new File((String)object))).exists() ? 1 : 0)) == 0) continue;\n arrayList.add((String[])object);\n }\n return arrayList;\n }", "@Test\n public void testLoadArrayDesign() throws PlatformLoadingException, AffymetrixCdfReadException {\n checkLoadArrayDesign(TestArrayDesignFiles.HG_U133_PLUS_2_CDF_FILE,\n TestArrayDesignFiles.HG_U133_PLUS_2_ANNOTATION_FILE);\n }", "private void testReadFile() {\n System.out.println(\"------ TESTING : readFile(String filename) ------\");\n try{\n if(iTestFileList.readFile(sFile)){\n //throw exception if the values are not copied correctly\n if(iTestFileList.get(0) != 42175){\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n if(iTestFileList.get(5) != 45545){\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n if(iTestFileList.get(10) != 86908) {\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n }\n else{\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }", "private void getArquivo()\n {\n /*** Obtem o conteudo do pacote através do diretorio ***/\n File file = new File(caminho_origem);\n if (file.isFile())\n {\n try\n {\n /*** Lê o pacote e põe em um array de bytes ***/\n DataInputStream diStream = new DataInputStream(new FileInputStream(file));\n long len = (int) file.length();\n if (len > Utils.tamanho_maximo_arquivo)\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_muito_grande);\n System.exit(0);\n }\n Float numero_pacotes_ = ((float)len / Utils.tamanho_util_pacote);\n int numero_pacotes = numero_pacotes_.intValue();\n int ultimo_pacote = (int) len - (Utils.tamanho_util_pacote * numero_pacotes);\n int read = 0;\n /***\n 1500\n fileBytes[1500]\n p[512]\n p[512]\n p[476]len - (512 * numero_pacotes.intValue())\n ***/\n byte[] fileBytes = new byte[(int)len];\n while (read < fileBytes.length)\n {\n fileBytes[read] = diStream.readByte();\n read++;\n }\n int i = 0;\n int pacotes_feitos = 0;\n while ( pacotes_feitos < numero_pacotes)\n {\n byte[] mini_pacote = new byte[Utils.tamanho_util_pacote];\n for (int k = 0; k < Utils.tamanho_util_pacote; k++)\n {\n mini_pacote[k] = fileBytes[i];\n i++;\n }\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(mini_pacote);\n this.pacotes.add(pacote_);\n pacotes_feitos++;\n }\n byte[] ultimo_mini_pacote = new byte[ultimo_pacote];\n int ultimo_indice = ultimo_mini_pacote.length;\n for (int j = 0; j < ultimo_mini_pacote.length; j++)\n {\n ultimo_mini_pacote[j] = fileBytes[i];\n i++;\n }\n byte[] ultimo_mini_pacote2 = new byte[512];\n System.arraycopy(ultimo_mini_pacote, 0, ultimo_mini_pacote2, 0, ultimo_mini_pacote.length);\n for(int h = ultimo_indice; h < 512; h++ ) ultimo_mini_pacote2[h] = \" \".getBytes()[0];\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(ultimo_mini_pacote2);\n this.pacotes.add(pacote_);\n this.janela = new HashMap<>();\n for (int iterator = 0; iterator < this.pacotes.size(); iterator++) janela.put(iterator, new Estado());\n } catch (Exception e)\n {\n System.out.println(Utils.prefixo_cliente + Utils.erro_na_leitura);\n System.exit(0);\n }\n } else\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_inexistente);\n System.exit(0);\n }\n }", "public static void createArrays() {\n\t\tinitArrays();\n\t\tcreateNodeTable();\n\t\tcreateEdgeTables();\n\t\t// Helper.Time(\"Read File\");\n\t\tcreateOffsetTable();\n\t}", "public static double[] readRHat(File f)\n/* */ throws Exception\n/* */ {\n/* 78 */ throw new Error(\"Unresolved compilation problem: \\n\");\n/* */ }", "public static void processData() {\n\t\tString dirName = \"C:\\\\research_data\\\\mouse_human\\\\homo_b47_data\\\\\";\r\n\t//\tString GNF1H_fName = \"GNF1H_genes_chopped\";\r\n\t//\tString GNF1M_fName = \"GNF1M_genes_chopped\";\r\n\t\tString GNF1H_fName = \"GNF1H\";\r\n\t\tString GNF1M_fName = \"GNF1M\";\r\n\t\tString mergedValues_fName = \"GNF1_merged_expression.txt\";\r\n\t\tString mergedPMA_fName = \"GNF1_merged_PMA.txt\";\r\n\t\tString discretizedMI_fName = \"GNF1_discretized_MI.txt\";\r\n\t\tString discretizedLevels_fName = \"GNF1_discretized_levels.txt\";\r\n\t\tString discretizedData_fName = \"GNF1_discretized_data.txt\";\r\n\t\t\r\n\t\tboolean useMotifs = false;\r\n\t\tMicroArrayData humanMotifs = null;\r\n\t\tMicroArrayData mouseMotifs = null;\r\n\t\t\r\n\t\tMicroArrayData GNF1H_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1H_PMA = new MicroArrayData();\r\n\t\tGNF1H_PMA.setDiscrete();\r\n\t\tMicroArrayData GNF1M_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1M_PMA = new MicroArrayData();\r\n\t\tGNF1M_PMA.setDiscrete();\r\n\t\t\r\n\t\ttry {\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma\"); */\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.txt.homob44\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.txt.homob44\"); */\r\n\t\t\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.sn.txt\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.sn.txt\");\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\tif (useMotifs) {\r\n\t\t\thumanMotifs = new MicroArrayData();\r\n\t\t\tmouseMotifs = new MicroArrayData();\r\n\t\t\tloadMotifs(humanMotifs,GNF1H_value.geneNames,mouseMotifs,GNF1M_value.geneNames);\r\n\t\t}\r\n\t\t\r\n\t\t// combine replicates in PMA values\r\n\t\tint[][] H_PMA = new int[GNF1H_PMA.numRows][GNF1H_PMA.numCols/2];\r\n\t\tint[][] M_PMA = new int[GNF1M_PMA.numRows][GNF1M_PMA.numCols/2];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tint k = 0;\r\n\t\tint v = 0;\r\n\t\tk = 0;\r\n\t\tj = 0;\r\n\t\twhile (j<GNF1H_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<H_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1H_PMA.dvalues[i][j] > 0 & GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0 | GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tH_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tj = 0;\r\n\t\tk = 0;\r\n\t\twhile (j<GNF1M_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<M_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1M_PMA.dvalues[i][j] > 0 & GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0 | GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tM_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tint numMatched = 31;\r\n\t\t\r\n\t/*\tGNF1H_value.numCols = numMatched;\r\n\t\tGNF1M_value.numCols = numMatched; */\r\n\t\t\r\n\t\tint[][] matchPairs = new int[numMatched][2];\r\n\t\tfor(i=0;i<numMatched;i++) {\r\n\t\t\tmatchPairs[i][0] = i;\r\n\t\t\tmatchPairs[i][1] = i + GNF1H_value.numCols;\r\n\t\t}\r\n\t\t\r\n\t//\tDiscretizeAffyData H_discretizer = new DiscretizeAffyData(GNF1H_value.values,H_PMA,0);\r\n\t//\tH_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1H_value.values,H_PMA,GNF1H_value.numCols);\r\n\t\t\r\n\t//\tDiscretizeAffyData M_discretizer = new DiscretizeAffyData(GNF1M_value.values,M_PMA,0);\r\n\t//\tM_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1M_value.values,M_PMA,GNF1M_value.numCols);\r\n\t\t\r\n\t\tdouble[][] mergedExpression = new double[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[][] mergedPMA = new int[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[] species = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1H_value.values[i],0,mergedExpression[i],0,GNF1H_value.numCols);\r\n\t\t\tSystem.arraycopy(H_PMA[i],0,mergedPMA[i],0,GNF1H_value.numCols);\t\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1M_value.values[i],0,mergedExpression[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t\tSystem.arraycopy(M_PMA[i],0,mergedPMA[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t}\r\n\t\t\r\n\t\t// concatenate experiment and gene names\r\n\t\tfor (i=0;i<GNF1H_value.numCols;i++) {\r\n\t\t\tGNF1H_value.experimentNames[i] = \"h_\" + GNF1H_value.experimentNames[i];\r\n\t\t\tspecies[i] = 1;\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numCols;i++) {\r\n\t\t\tGNF1M_value.experimentNames[i] = \"m_\" + GNF1M_value.experimentNames[i];\r\n\t\t\tspecies[i+GNF1H_value.numCols] = 2;\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedExperimentNames = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\tSystem.arraycopy(GNF1H_value.experimentNames,0,mergedExperimentNames,0,GNF1H_value.numCols);\r\n\t\tSystem.arraycopy(GNF1M_value.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\tif (useMotifs) {\r\n\t\t\tSystem.arraycopy(humanMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols,humanMotifs.numCols);\r\n\t\t\tSystem.arraycopy(mouseMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols+humanMotifs.numCols,mouseMotifs.numCols);\r\n\t\t\tfor (i=0;i<humanMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols] = 3;\r\n\t\t\t}\r\n\t\t\tfor (i=0;i<mouseMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols] = 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedGeneNames = new String[GNF1H_value.numRows];\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tmergedGeneNames[i] = GNF1H_value.geneNames[i] + \"|\" + GNF1M_value.geneNames[i];\r\n\t\t}\r\n\t\t\r\n\t\tint[] filterList = new int[GNF1M_value.numRows];\r\n\t\tint numFiltered = 0;\r\n\t\tdouble maxExpressedPercent = 1.25;\r\n\t\tint maxExpressed_H = (int) Math.floor(maxExpressedPercent*((double) GNF1H_value.numCols));\r\n\t\tint maxExpressed_M = (int) Math.floor(maxExpressedPercent*((double) GNF1M_value.numCols));\r\n\t\tint numExpressed_H = 0;\r\n\t\tint numExpressed_M = 0;\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tnumExpressed_H = 0;\r\n\t\t\tfor (j=0;j<GNF1H_value.numCols;j++) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1H_value.values[i][j])) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t\t\tnumExpressed_H++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnumExpressed_M = 0;\r\n\t\t\tfor (j=0;j<GNF1M_value.numCols;j++) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1M_value.values[i][j])) {\r\n\t\t\t\t\tnumExpressed_M++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (numExpressed_M >= maxExpressed_M | numExpressed_H >= maxExpressed_H) {\r\n\t\t\t\tfilterList[i] = 1;\r\n\t\t\t\tnumFiltered++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tGNF1H_value = null;\r\n\t\tGNF1H_PMA = null;\r\n\t\tGNF1M_value = null;\r\n\t\tGNF1M_PMA = null;\r\n\t\t\r\n\t\tdouble[][] mergedExpression2 = null;\r\n\t\tif (numFiltered > 0) {\r\n\t\t\tk = 0;\r\n\t\t\tint[][] mergedPMA2 = new int[mergedPMA.length-numFiltered][mergedPMA[0].length];\r\n\t\t\tif (!useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length];\r\n\t\t\t} else {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t}\r\n\t\t\tString[] mergedGeneNames2 = new String[mergedGeneNames.length-numFiltered];\r\n\t\t\tfor (i=0;i<filterList.length;i++) {\r\n\t\t\t\tif (filterList[i] == 0) {\r\n\t\t\t\t\tmergedPMA2[k] = mergedPMA[i];\r\n\t\t\t\t\tif (!useMotifs) {\r\n\t\t\t\t\t\tmergedExpression2[k] = mergedExpression[i];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[k],0,mergedExpression[i].length);\r\n\t\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[k],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[k],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmergedGeneNames2[k] = mergedGeneNames[i];\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmergedPMA = mergedPMA2;\r\n\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\tmergedGeneNames = mergedGeneNames2;\r\n\t\t} else {\r\n\t\t\tif (useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t\tfor (i=0;i<mergedExpression.length;i++) {\r\n\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[i],0,mergedExpression[i].length);\r\n\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[i],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[i],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t}\r\n\t\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tDiscretizeAffyPairedData discretizer = new DiscretizeAffyPairedData(mergedExpression,mergedPMA,matchPairs,20);\r\n\t\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = discretizer.expression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = discretizer.numExperiments;\r\n\t\tmergedData.numRows = discretizer.numGenes;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tdiscretizer.discretizeDownTree(dirName+discretizedMI_fName);\r\n\t\t\tdiscretizer.mergeDownLevels(3,dirName+discretizedLevels_fName);\r\n\t\t\tdiscretizer.transposeDExpression();\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t\tmergedData.dvalues = discretizer.dExpression;\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t/*\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = mergedExpression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = mergedExpression[0].length;\r\n\t\tmergedData.numRows = mergedExpression.length;\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t//\tmergedData.dvalues = simpleDiscretization(mergedExpression,mergedPMA);\r\n\t\t\tmergedData.dvalues = simpleDiscretization2(mergedExpression,species);\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t} */\r\n\t\t\r\n\t}", "public List<String> getFileLines() {\n\t\tspeciesByExperiment = new TIntObjectHashMap<List<String>>();\n\t\ttissuesByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tcellTypesByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tdiseaseByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tquantificationByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tinstrumentByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tmodificationByExperiment = new TIntObjectHashMap<List<String>>();\n\t\texperimental_factorByExperiment = new TIntObjectHashMap<List<String>>();\n\n\t\tfinal List<String> ret = new ArrayList<String>();\n\t\tfinal Map<String, PexFileMapping> fileLocationsMapping = new THashMap<String, PexFileMapping>();\n\t\tfinal List<PexFileMapping> totalFileList = new ArrayList<PexFileMapping>();\n\t\tint fileCounter = 1;\n\t\t// organize the files by experiments\n\t\tfor (final Experiment experiment : experimentList.getExperiments()) {\n\n\t\t\tfinal File prideXmlFile = experiment.getPrideXMLFile();\n\t\t\tif (prideXmlFile != null) {\n\t\t\t\t// FILEMAPPINGS\n\t\t\t\t// PRIDE XML\n\t\t\t\tfinal int resultNum = fileCounter;\n\t\t\t\tfinal PexFileMapping prideXMLFileMapping = new PexFileMapping(\"result\", fileCounter++,\n\t\t\t\t\t\tprideXmlFile.getAbsolutePath(), null);\n\n\t\t\t\ttotalFileList.add(prideXMLFileMapping);\n\t\t\t\tfileLocationsMapping.put(prideXMLFileMapping.getPath(), prideXMLFileMapping);\n\n\t\t\t\t// Iterate over replicates\n\t\t\t\tfinal List<Replicate> replicates = experiment.getReplicates();\n\t\t\t\tfor (final Replicate replicate : replicates) {\n\t\t\t\t\t// sample metadatas\n\t\t\t\t\taddSampleMetadatas(resultNum, replicate);\n\n\t\t\t\t\t// PEak lists\n\t\t\t\t\tfinal List<PexFileMapping> peakListFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// raw files\n\t\t\t\t\tfinal List<PexFileMapping> rawFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// search engine output lists\n\t\t\t\t\tfinal List<PexFileMapping> outputSearchEngineFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// MIAPE MS and MSI reports\n\t\t\t\t\tfinal List<PexFileMapping> miapeReportFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// RAW FILES\n\t\t\t\t\tfinal List<PexFile> rawFiles = getReplicateRawFiles(replicate);\n\n\t\t\t\t\tif (rawFiles != null) {\n\t\t\t\t\t\tfor (final PexFile rawFile : rawFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(rawFile.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping rawFileMapping = new PexFileMapping(\"raw\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\trawFile.getFileLocation(), null);\n\t\t\t\t\t\t\t\trawFileMappings.add(rawFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(rawFile.getFileLocation(), rawFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> RAW file\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(rawFileMapping.getId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// PEAK LISTS\n\t\t\t\t\tfinal List<PexFile> peakListFiles = getPeakListFiles(replicate);\n\t\t\t\t\tfinal List<PexFileMapping> replicatePeakListFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\tif (peakListFiles != null) {\n\t\t\t\t\t\tfor (final PexFile peakList : peakListFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(peakList.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping peakListFileMapping = new PexFileMapping(\"peak\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\tpeakList.getFileLocation(), null);\n\t\t\t\t\t\t\t\tpeakListFileMappings.add(peakListFileMapping);\n\t\t\t\t\t\t\t\treplicatePeakListFileMappings.add(peakListFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(peakList.getFileLocation(), peakListFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> PEAK LIST file\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(peakListFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> PEAK LIST file\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(peakListFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// prideXMLFileMapping\n\t\t\t\t\t\t\t\t// .addRelationship(peakListFileMapping\n\t\t\t\t\t\t\t\t// .getId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// MIAPE MS REPORTS\n\t\t\t\t\tfinal List<PexFile> miapeMSReportFiles = getMiapeMSReportFiles(replicate);\n\t\t\t\t\tif (miapeMSReportFiles != null)\n\t\t\t\t\t\tfor (final PexFile miapeMSReportFile : miapeMSReportFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(miapeMSReportFile.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping miapeReportFileMapping = new PexFileMapping(\"other\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\tmiapeMSReportFile.getFileLocation(), null);\n\t\t\t\t\t\t\t\tmiapeReportFileMappings.add(miapeReportFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(miapeMSReportFile.getFileLocation(), miapeReportFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> MIAPE MS report\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> MIAPE MS report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// PEAK LIST file -> MIAPE MS report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping peakListFileMapping : replicatePeakListFileMappings) {\n\t\t\t\t\t\t\t\t\tpeakListFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// SEARCH ENGINE OUTPUT FILES\n\t\t\t\t\tfinal List<PexFile> searchEngineOutputFiles = getSearchEngineOutputFiles(replicate);\n\t\t\t\t\tfinal List<PexFileMapping> replicatesearchEngineOutputFilesMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\tif (searchEngineOutputFiles != null) {\n\t\t\t\t\t\tfor (final PexFile peakList : searchEngineOutputFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(peakList.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping searchEngineOutputFileMapping = new PexFileMapping(\"search\",\n\t\t\t\t\t\t\t\t\t\tfileCounter++, peakList.getFileLocation(), null);\n\t\t\t\t\t\t\t\toutputSearchEngineFileMappings.add(searchEngineOutputFileMapping);\n\t\t\t\t\t\t\t\treplicatesearchEngineOutputFilesMappings.add(searchEngineOutputFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(peakList.getFileLocation(), searchEngineOutputFileMapping);\n\t\t\t\t\t\t\t\t// PRIDE XML -> SEARCH ENGINE OUTPUT file\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(searchEngineOutputFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> SEARCH ENGINE OUTPUT file\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(searchEngineOutputFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// PEAK LIST FILE -> SEARCH ENGINE OUTPUT file\n\t\t\t\t\t\t\t\tfor (final PexFileMapping peakListFileMapping : replicatePeakListFileMappings) {\n\t\t\t\t\t\t\t\t\tpeakListFileMapping.addRelationship(searchEngineOutputFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// MIAPE MSI REPORTS\n\t\t\t\t\tfinal List<PexFile> miapeMSIReportFiles = getMiapeMSIReportFiles(replicate);\n\t\t\t\t\tif (miapeMSIReportFiles != null)\n\t\t\t\t\t\tfor (final PexFile miapeMSIReportFile : miapeMSIReportFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(miapeMSIReportFile.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping miapeReportFileMapping = new PexFileMapping(\"other\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\tmiapeMSIReportFile.getFileLocation(), null);\n\t\t\t\t\t\t\t\tmiapeReportFileMappings.add(miapeReportFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(miapeMSIReportFile.getFileLocation(), miapeReportFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> MIAPE MSI report\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> MIAPE MSI report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// PEAK LIST FILE -> MIAPE MSI report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping peakListFileMapping : replicatePeakListFileMappings) {\n\t\t\t\t\t\t\t\t\tpeakListFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// SEARCH ENGINE OUTPUT file -> MIAPE MSI report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping searchEngineOutputFileMapping : replicatesearchEngineOutputFilesMappings) {\n\t\t\t\t\t\t\t\t\tsearchEngineOutputFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t// Add all to the same list and then sort by id\n\t\t\t\t\ttotalFileList.addAll(outputSearchEngineFileMappings);\n\t\t\t\t\ttotalFileList.addAll(miapeReportFileMappings);\n\t\t\t\t\ttotalFileList.addAll(peakListFileMappings);\n\t\t\t\t\ttotalFileList.addAll(rawFileMappings);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Sort the list of files\n\t\tCollections.sort(totalFileList, new Comparator<PexFileMapping>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(PexFileMapping o1, PexFileMapping o2) {\n\n\t\t\t\treturn Integer.valueOf(o1.getId()).compareTo(Integer.valueOf(o2.getId()));\n\n\t\t\t}\n\n\t\t});\n\t\tfor (final PexFileMapping pexFileMapping : totalFileList) {\n\t\t\tret.add(pexFileMapping.toString());\n\t\t}\n\t\treturn ret;\n\t}", "public void readAll() throws FileNotFoundException{ \n b = new BinaryIn(this.filename);\n this.x = b.readShort();\n this.y = b.readShort();\n \n int count = (x * y) / (8 * 8);\n this.blocks = new double[count][8][8][3];\n \n Node juuri = readTree();\n readDataToBlocks(juuri);\n }", "private void readSourceData() throws Exception {\n\t\tthis.fileDataList = new ArrayList<String>();\n\t\tReader reader = new Reader(this.procPath);\n\t\treader.running();\n\t\tthis.fileDataList = reader.getFileDataList();\n\t}", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, (String) null);\n byte[] byteArray0 = new byte[8];\n byteArray0[1] = (byte)0;\n byteArray0[2] = (byte)121;\n byteArray0[3] = (byte)0;\n byteArray0[4] = (byte)121;\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, (String) null);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, (String) null);\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.shouldAllThrowIOExceptions();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n SimpleNode simpleNode0 = new SimpleNode((byte)121);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"H{m/_aaA?_\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"UnryExpressio\");\n FileSystemHandling fileSystemHandling1 = new FileSystemHandling();\n simpleNode0.setIdentifier(\"UnryExpressio\");\n StringWriter stringWriter0 = new StringWriter();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"UnryExpressio\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling fileSystemHandling2 = new FileSystemHandling();\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"*l\");\n // Undeclared exception!\n try { \n simpleNode0.dump(\"*l\", stringWriter0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public static void main(String[] args) throws IOException {\n\t String FinalContigWritePath=args[0];\n\t\tString ContigAfterPath=args[1];\n\t\tString ContigSPAdesPath=args[2];\n\t\tString MUMmerFile1=args[3];\n\t\tString MUMmerFile2=args[4];\n\t\tint SizeOfContigAfter=CommonClass.getFileLines(ContigAfterPath)/2;\n\t String ContigSetAfterArray[]=new String[SizeOfContigAfter];\n\t int RealSizeOfContigSetAfter=CommonClass.FastaToArray(ContigAfterPath,ContigSetAfterArray); \n\t System.out.println(\"The real size of ContigSetAfter is:\"+RealSizeOfContigSetAfter);\n\t\t//low.\n\t\tint SizeOfContigSPAdes=CommonClass.getFileLines(ContigSPAdesPath);\n\t String ContigSetSPAdesArray[]=new String[SizeOfContigSPAdes+1];\n\t int RealSizeOfContigSetSPAdes=CommonClass.FastaToArray(ContigSPAdesPath,ContigSetSPAdesArray); \n\t System.out.println(\"The real size of ContigSetSPAdes is:\"+RealSizeOfContigSetSPAdes);\n\t\t//Loading After.\n\t\tint LoadingContigAfterCount=0;\n\t\tString LoadingContigAfterArray[]=new String[RealSizeOfContigSetAfter]; \n\t\tfor(int r=0;r<RealSizeOfContigSetAfter;r++)\n\t\t{\n\t\t\t if(ContigSetAfterArray[r].length()>=64)\n\t\t\t {\n\t\t\t\t LoadingContigAfterArray[LoadingContigAfterCount++]=ContigSetAfterArray[r];\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(\"File After loading process end!\");\n\t\t//Alignment1.\n\t\tint SizeOfMUMmerFile1 = CommonClass.getFileLines(MUMmerFile1);\n\t\tString MUMerArray1[] = new String[SizeOfMUMmerFile1];\n\t\tint RealSizeMUMmer1 = CommonClass.FileToArray(MUMmerFile1, MUMerArray1);\n\t\tSystem.out.println(\"The real size of MUMmer1 is:\" + RealSizeMUMmer1);\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile2 = CommonClass.getFileLines(MUMmerFile2);\n\t\tString MUMerArray2[] = new String[SizeOfMUMmerFile2];\n\t\tint RealSizeMUMmer2 = CommonClass.FileToArray(MUMmerFile2, MUMerArray2);\n\t\tSystem.out.println(\"The real size of MUMmer2 is:\" + RealSizeMUMmer2);\n\t\t//Get ID1.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor(int f=4;f<RealSizeMUMmer1;f++)\n\t\t{\n\t\t\tString[] SplitLine1 = MUMerArray1[f].split(\"\\t|\\\\s+\");\n\t\t\tif(SplitLine1.length==14 && (SplitLine1[13].equals(\"[CONTAINS]\") || SplitLine1[13].equals(\"[BEGIN]\") || SplitLine1[13].equals(\"[END]\")))\n\t\t\t{\n\t\t\t\tString[] SplitLine2 = SplitLine1[11].split(\"_\");\n\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine2[1]);\n\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t}\n\t\t}\n\t\t//Get ID2.\n\t\tfor(int g=4;g<RealSizeMUMmer2;g++)\n\t\t{\n\t\t\tString[] SplitLine11 = MUMerArray2[g].split(\"\\t|\\\\s+\");\n\t\t\tString[] SplitLine12 = SplitLine11[12].split(\"_\");\n\t\t\tint SPAdes_id = Integer.parseInt(SplitLine12[1]);\n\t\t\thashSet.add(SPAdes_id);\n\t\t}\n\t //Write.\n\t\tint LineNum1=0;\n\t for(int x=0;x<LoadingContigAfterCount;x++)\n\t {\n\t\t\t FileWriter writer1= new FileWriter(FinalContigWritePath+\"contig.AfterMerge.fa\",true);\n\t writer1.write(\">\"+(LineNum1++)+\":\"+LoadingContigAfterArray[x].length()+\"\\n\"+LoadingContigAfterArray[x]+\"\\n\");\n\t writer1.close();\n\t }\n\t //Filter.\n\t\tint CountAdd=0;\n\t\tSet<String> HashSetSave = new HashSet<String>();\n\t for(int k=0;k<RealSizeOfContigSetSPAdes;k++)\n\t {\n\t \tif(!hashSet.contains(k))\n\t \t{\n\t \t\tHashSetSave.add(ContigSetSPAdesArray[k]);\n\t \t}\n\t }\n\t\tSystem.out.println(\"The real size of un-useded contigs is:\" + HashSetSave.size());\n\t\t//Write.\n\t\tIterator<String> it = HashSetSave.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tString SPAdesString = it.next();\n\t\t\tint Flag=1;\n\t\t for(int x=0;x<LoadingContigAfterCount;x++)\n\t\t {\n\t\t \tif((LoadingContigAfterArray[x].length()>=SPAdesString.length())&&(LoadingContigAfterArray[x].contains(SPAdesString)))\n\t\t \t{\n\t\t \t\tFlag=0;\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n\t\t\tif(Flag==1)\n\t\t\t{\n\t\t\t\tFileWriter writer = new FileWriter(FinalContigWritePath+\"contig.AfterMerge.fa\",true);\n\t\t\t\twriter.write(\">Add:\"+(LineNum1++)+\"\\n\"+SPAdesString+\"\\n\");\n\t\t\t\twriter.close();\n\t\t\t\tCountAdd++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The real size of add Complementary contigs is:\" + CountAdd);\n\t\tSystem.out.println(\"File write process end!\");\n }", "public static void buildShapesFromFile(String fileName, Shape [] cArray, Shape [] sArray , Shape [] rArray , Shape [] pArray, Shape [] tArray) {\n\r\n\t String path = System.getProperty(\"user.dir\");\r\n\t Shape sp = null; //buffer shape used to append into arrays from file\r\n\t String s; //holds line in file\r\n\r\n\t //try (BufferedReader br = new BufferedReader(new FileReader(\"./Root/\" + fileName))) { // code board\r\n\t // if you run locally on your environment use: new FileReader(path + \"/src/\" + fileName)\r\n\t \r\n\t try (BufferedReader br = new BufferedReader(new FileReader(path + \"/src/package1/\" + fileName))) {\r\n\t \t \r\n int circleIndex = 0;//Stores current available array index & used to count successful shapes created\r\n int squareIndex = 0;\r\n int rectangleIndex = 0;\r\n int parallelogramIndex = 0;\r\n int triangleIndex = 0;\r\n int badLine = 0;\r\n int badShape = 0;\r\n \r\n\t while ((s = br.readLine()) != null) {\r\n\t \t //System.out.println(s); //prints file contents for testing\r\n\t String[] tok = s.split(\",\"); //Split string \"s\" into tok string array using \",\" as delimiter\r\n\t \r\n\t // Second tryblock used to prevent entire method from terminating upon a single invalid line\r\n\t // Could replace second tryblock by catching exceptions within shape constructor instead, but wanted specify practice\r\n\t try{ \r\n\t\t switch(tok[0]){\r\n\t\t \r\n\t\t case \"Circle\": \r\n\t\t sp = new Circle( Double.parseDouble(tok[1]) ); //create shape\r\n\t\t cArray[circleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(cArray[circleIndex]); //print recently appended shape\r\n\t\t circleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Square\": \r\n\t\t sp = new Square( Double.parseDouble(tok[1]) ); //create shape\r\n\t\t sArray[squareIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(sArray[squareIndex]); //print recently appended shape\r\n\t\t squareIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Rectangle\": \r\n\t\t sp = new Rectangle( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]) ); //create shape\r\n\t\t rArray[rectangleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(rArray[rectangleIndex]); //print recently appended shape\r\n\t\t rectangleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Parallelogram\":\r\n\t\t sp = new Parallelogram( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]) ); //create shape\r\n\t\t pArray[parallelogramIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(pArray[parallelogramIndex]); //print recently appended shape\r\n\t\t parallelogramIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Triangle\":\r\n\t\t sp = new Triangle( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]), Double.parseDouble(tok[3]) ); //create shape\r\n\t\t tArray[triangleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(tArray[triangleIndex]); //print recently appended shape\r\n\t\t triangleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t default: System.out.println(tok[0] + \" is not a valid shape\");\r\n\t\t \t \t\tbadShape++;\r\n\t\t break; \r\n\t\t }//End of Switch(tok[0])\r\n\t\t \r\n\t\t //prevent entire method from terminating by just reporting a bad line \r\n\t }catch(IllegalArgumentException e){\r\n\t \t badLine++;\r\n\t \t System.out.println(e.getMessage()); \r\n\t }\r\n\t \r\n\t }//While there are lines still being read \r\n\t \r\n\t System.out.println(\"Number of Circle's Created: \" + circleIndex);\r\n\t System.out.println(\"Number of Square's Created: \" + squareIndex);\r\n\t System.out.println(\"Number of Retangle's Created: \" + rectangleIndex);\r\n\t System.out.println(\"Number of Parallelogram's Created: \" + parallelogramIndex);\r\n\t System.out.println(\"Number of Triangle's Created: \" + triangleIndex);\r\n\t System.out.println(\"Number of Incorrect Arguments : \" + badLine);\r\n\t System.out.println(\"Number of Incorrect Shapes : \" + badShape);\r\n\t \r\n\t //catch exceptions related to BufferedReader and FileReader\r\n\t } catch (IOException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\r\n\t //void return\r\n\t}", "private static java.lang.String readStringFromFile(java.io.File r9) {\n /*\n r5 = 0\n r3 = 0\n java.io.FileReader r4 = new java.io.FileReader // Catch:{ FileNotFoundException -> 0x0059, IOException -> 0x0038 }\n r4.<init>(r9) // Catch:{ FileNotFoundException -> 0x0059, IOException -> 0x0038 }\n r7 = 128(0x80, float:1.794E-43)\n char[] r0 = new char[r7] // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n r6.<init>() // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n L_0x0010:\n int r1 = r4.read(r0) // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n if (r1 <= 0) goto L_0x002a\n r7 = 0\n r6.append(r0, r7, r1) // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n goto L_0x0010\n L_0x001b:\n r2 = move-exception\n r3 = r4\n L_0x001d:\n java.lang.String r7 = \"PluginNativeHelper\"\n java.lang.String r8 = \"cannot find file to read\"\n com.tencent.component.utils.log.LogUtil.d(r7, r8, r2) // Catch:{ all -> 0x0048 }\n if (r3 == 0) goto L_0x0029\n r3.close() // Catch:{ IOException -> 0x004f }\n L_0x0029:\n return r5\n L_0x002a:\n java.lang.String r5 = r6.toString() // Catch:{ FileNotFoundException -> 0x001b, IOException -> 0x0056, all -> 0x0053 }\n if (r4 == 0) goto L_0x005b\n r4.close() // Catch:{ IOException -> 0x0035 }\n r3 = r4\n goto L_0x0029\n L_0x0035:\n r7 = move-exception\n r3 = r4\n goto L_0x0029\n L_0x0038:\n r2 = move-exception\n L_0x0039:\n java.lang.String r7 = \"PluginNativeHelper\"\n java.lang.String r8 = \"error occurs while reading file\"\n com.tencent.component.utils.log.LogUtil.d(r7, r8, r2) // Catch:{ all -> 0x0048 }\n if (r3 == 0) goto L_0x0029\n r3.close() // Catch:{ IOException -> 0x0046 }\n goto L_0x0029\n L_0x0046:\n r7 = move-exception\n goto L_0x0029\n L_0x0048:\n r7 = move-exception\n L_0x0049:\n if (r3 == 0) goto L_0x004e\n r3.close() // Catch:{ IOException -> 0x0051 }\n L_0x004e:\n throw r7\n L_0x004f:\n r7 = move-exception\n goto L_0x0029\n L_0x0051:\n r8 = move-exception\n goto L_0x004e\n L_0x0053:\n r7 = move-exception\n r3 = r4\n goto L_0x0049\n L_0x0056:\n r2 = move-exception\n r3 = r4\n goto L_0x0039\n L_0x0059:\n r2 = move-exception\n goto L_0x001d\n L_0x005b:\n r3 = r4\n goto L_0x0029\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.component.plugin.PluginNativeHelper.readStringFromFile(java.io.File):java.lang.String\");\n }", "public static void main(String[] args) {\n FilesParser filesParser = new FilesParser();\r\n ArrayList<Double> time = filesParser.get_timeList();\r\n Map<Double, ArrayList<Double>> expFile = new HashMap<>();\r\n ArrayList<Map<Double, ArrayList<Double>>> theorFiles = new ArrayList<>();\r\n\r\n try {\r\n expFile = filesParser.trimStringsAndGetData(0,\r\n filesParser.getDirectories()[0],\r\n filesParser.get_expFiles()[2]);\r\n List<String> fileList = filesParser.get_theorFileList();\r\n for (int i = 0; i < fileList.size(); i++) {\r\n theorFiles.add(filesParser.trimStringsAndGetData(1,\r\n filesParser.getDirectories()[1],\r\n filesParser.get_theorFileList().get(i)));\r\n }\r\n //System.out.println(expFile.get(0.00050));\r\n //System.out.println(expFile.get(-0.25));\r\n //System.out.println(expFile);\r\n //System.out.println(theorFiles.get(0.00050));\r\n //System.out.println(theorFiles);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n /*for (int i = 0; i < theorFiles.size(); i++) {\r\n Map<Double, ArrayList<Double>> theorFile = theorFiles.get(i);\r\n for (int ik = 0; ik < time.size(); ik++) {\r\n ArrayList<Double> theorFileLine = theorFile.get(time.get(ik));\r\n if (theorFileLine != null) {\r\n for (int j = 0; j < theorFileLine.size(); j++) {\r\n double theord = theorFileLine.get(j);\r\n for (int k = 0; k < expFile.size(); k++) {\r\n ArrayList<Double> expFileLine = expFile.get(time.get(ik));\r\n if (expFileLine != null) {\r\n for (int l = 0; l < expFileLine.size(); l++) {\r\n double expd = expFileLine.get(l);\r\n\r\n double div = expd / theord;\r\n if (div == 1) System.out.println(i);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n }", "public String[] buildEntries(String a) {\n try {\n File file = new File(a);\n Scanner input = new Scanner(file);\n while (input.hasNextLine()) {\n String line=input.nextLine();\n String name=line.substring(line.indexOf(\"\\t\"));\n name=name.substring(0,name.lastIndexOf(\"H\"));\n name=name.substring(0,name.lastIndexOf(\"\\t\"));\n int entries=Integer.parseInt(line.substring(line.lastIndexOf(\"\\t\")+1,line.lastIndexOf(\"E\")));\n while (entries>0) {\n entryList.add(name);\n entries--;\n System.out.println(\"Added: \"+name);\n }\n}\n return drawBE(entryList,a);\n }\n catch(FileNotFoundException b) {\n System.out.println(\"Error, no entries\"); \n String ret[] = new String[6];\n ret[0]=\"NOFILE\";\n return ret;\n }\n }", "private void initializeFileArrays(){\n File downloadedFilesFolder = new File(MainActivity.DB_PATH);\n File[] files = downloadedFilesFolder.listFiles();\n System.out.println(\"*** \" + files.length + \" ***\");\n if(files != null){\n System.out.println(\"*** \" + files.length + \" ***\");\n for(File f : files){\n if(f != null){\n System.out.println(\"***\\n FILE FOUND - \" + f.getAbsolutePath()+\"\\nSIZE - \" +\n f.length() + \" BYTES \\n***\");\n fileNames.add(f.getName());\n fileSizes.add(f.length()+\"\");\n this.files.add(f);\n }\n }\n }\n }", "private void readFileToArray(FileInputStream fis, Warship[] wsArr) throws Exception {\n\t\tScanner scanner = null;\n\t\ttry {\n\t\t\tscanner = new Scanner(fis);\n\t\t\tint i = 0;\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\twsArr[i] = this.getWarship(scanner.nextLine());\n\t\t\t\ti++;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t} finally {\n\t\t\tif (scanner != null) {\n\t\t\t\tscanner.close();\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n ArrayList<Integer> arrayList0 = new ArrayList<Integer>();\n arrayList0.spliterator();\n fileUtil0.getAccessories(\"\", arrayList0);\n fileUtil0.fetchKeywordSearchFile(\"\", \"\", \"\", \"\");\n fileUtil0.downloadThirdPartySearchFile(\"\", \"net.kencochrane.a4j.util.LoadProperties\", \"\", \"T||]%|~ZG.LC(6mb~A\");\n fileUtil0.fetchKeywordSearchFile(\"\", \"T||]%|~ZG.LC(6mb~A\", (String) null, \"\");\n fileUtil0.getBrowseNodeFile(\"net.kencochrane.a4j.util.LoadProperties\", \"@>-=6JQ%t&fx,L\", \"net.kencochrane.a4j.util.LoadProperties\");\n fileUtil0.fetchBlendedSearchFile(\"AGmeJ)4qdg_/\", \"a_\");\n Integer integer0 = new Integer(7);\n arrayList0.add(integer0);\n fileUtil0.downloadAccessoriesFile(\"3rd_\", arrayList0, \"I~-|SH-#r+.Olx\");\n FileInputStream fileInputStream0 = fileUtil0.fetchGenericSearchFile(\"\", \"\", \"]RHe['l4y{\", \"]RHe['l4y{\", \"I~-|SH-#r+.Olx\", \"\\\"-q6AW$MO[2+kQ/Sl.g\");\n assertNull(fileInputStream0);\n }", "public void mo83570c() {\n File[] listFiles;\n File file = new File(this.f60297d);\n if (file.isDirectory() && (listFiles = file.listFiles()) != null && listFiles.length >= this.f60294a) {\n Arrays.sort(listFiles, this.f60295b);\n for (int i = 0; i < listFiles.length && listFiles.length >= this.f60294a; i++) {\n File file2 = listFiles[i];\n if (!this.f60299f.contains(file2)) {\n ArgusLogger.m85574b(String.format(C6969H.m41409d(\"G4D8AC619BE22AF20E809D047FEE1C6C47DC3D008AD3FB969E71DD05BE6EAD1D26DC3D008AD3FB969EA079D41E6A5D1D26880DD1FBB70E36CF547\"), file2.getPath()));\n mo83569b(Collections.singleton(file2));\n }\n }\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n Solution45 sol1 = new Solution45();\n //declare ArrayList, strings, and Arrays for processing\n ArrayList<String> text = new ArrayList<String>();\n String fileName = \"\";\n String[][] arrOfstr = new String[3][15];\n\n //scan information into ArrayList from input file\n try (Scanner input = new Scanner(Paths.get(\"data/exercise45_input.txt\"))) {\n while (input.hasNext()) {\n text.add(input.nextLine());\n }\n } catch (IOException | NoSuchElementException | IllegalStateException e) {\n e.printStackTrace();\n }\n\n //call data parser to turn arraylist into 2d array and copy it to main's array\n System.arraycopy(sol1.dataParser(text), 0, arrOfstr,\n 0, arrOfstr.length);\n\n //loop through 2d array and replace \"utilize\" with \"use\"\n for (int counter2 = 0; counter2 < arrOfstr.length; counter2++) {\n for (int counter3 = 0; counter3 < arrOfstr[counter2].length; counter3++) {\n if (arrOfstr[counter2][counter3].equals(\"\\\"utilize\\\"\")) {\n arrOfstr[counter2][counter3] = \"\\\"use\\\"\";\n }\n if (arrOfstr[counter2][counter3].equals(\"utilize\")) {\n arrOfstr[counter2][counter3] = \"use\";\n }\n if (arrOfstr[counter2][counter3].equals(\"utilizes\")) {\n arrOfstr[counter2][counter3] = \"uses\";\n }\n }\n }\n //new scanner for output file name entry\n Scanner input = new Scanner(System.in);\n System.out.println(\"Enter file or directory name:\");\n fileName = input.nextLine();\n\n //call output method to take array and output it to text file in specified directory\n sol1.fileOutput(arrOfstr, fileName);\n }", "String [][] importData (String path);", "public static void Load(String filename) throws IOException {\n\t\tLineNumberReader lnr = new LineNumberReader(new FileReader(filename));\r\n\t\t linenumber = 0;\r\n\t\t while (lnr.readLine() != null){\r\n\t\t\t linenumber++;\r\n\t\t }\r\n lnr.close();\r\n \tarrr=new String[linenumber][5];\r\n\t\tarr=arrr;\r\n\t\tBufferedReader br=new BufferedReader(new FileReader(filename));\r\n\t\t Scanner sc1=new Scanner(br);\r\n\t\t String ss=sc1.nextLine();\r\n\t\t String[] str1 = ss.split(\",\") ;\r\n\t\t String r=str1[0];\r\n\t\t String t=str1[1];\r\n\t\t String[] str2 = r.split(\":\") ;\r\n\t\t round= Integer.parseInt(str2[1]);\r\n\t\t String[] str3 = t.split(\":\") ;\r\n\t\t who=Integer.parseInt(str3[1]);\r\n\t\t arr=new String[linenumber][5];\r\n\t\t int num=0;\r\n\t\t while(sc1.hasNextLine()) {\t\r\n\t\t\t int i=0;\r\n\t\t\t num++;\r\n\t\t\t String x=sc1.nextLine();\r\n\t\t\tString[] str = x.split(\",\") ;\r\n\t\t\twhile(i<5) {\r\n\t\t\t\tarr[num][i]=str[i];\r\n\t\t\t\ti++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t int c=1;\r\n\t ch=new Character[linenumber];\r\n\r\n\t\t\twhile(c<(linenumber)) {\r\n\t\t\t\t\r\n\t\t\t\tch[c]=new Character(Integer.parseInt(arr[c][0]),Integer.parseInt(arr[c][1]),Integer.parseInt(arr[c][2]),Integer.parseInt(arr[c][3]),arr[c][4]);\t\t\t\t\t\t\t\r\n\t\t\t\tc++;\r\n\t\t\t}\t\r\n\t\t\r\n\t\t sc1.close();\r\n\t\t String file=\"Land.txt\";\r\n\t\t\tBufferedReader br2=new BufferedReader(new FileReader(file));\r\n\t\t\tland=new String[20][2];\r\n\t\t\tland2=new String[20][2];\r\n\t\t\tland=land2;\r\n\t\t\tScanner sc2=new Scanner(br2);\r\n\t\t\tString strr=sc2.nextLine();\r\n\t\t\tnum=0;\r\n\t\t\t while(sc2.hasNextLine()) {\t\r\n\t\t\t\t int i=0;\r\n\t\t\t\t num++;\r\n\t\t\t\t String x=sc2.nextLine();\t\t\t\r\n\t\t\t\tString[] str = x.split(\",\") ;\r\n\t\t\t\twhile(i<2) {\r\n\t\t\t\t\tland[num][i]=str[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t }\t\t\t\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t String url = \"//localhost:3306/checkpoint?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT\";\r\n\t\t // String url=\"//140.127.220.220/\";\r\n\t\t // String dbname=\"CHECKPOINT\";\r\n\t\t\t Connection conn = null;\r\n\t\t try{\r\n\t\t conn = DriverManager.getConnection(protocol + url,username,passwd);\r\n\t\t Statement s = conn.createStatement();\r\n\t\t String sql = \"SELECT PLACE_NUMBER,LAND_PRICE,TOLLS FROM LAND\";\r\n\t\t rs=s.executeQuery(sql);\r\n\t\t p_number=new int[20];\r\n\t\t l_price=new int[20];\r\n\t\t tolls=new int[20];\r\n\t\t grid=0;\r\n\t\t while(rs.next()){\r\n\t\t \tgrid++;\r\n\t\t \tp_number[grid]=rs.getInt(\"PLACE_NUMBER\");\r\n\t\t \tl_price[grid]=rs.getInt(\"LAND_PRICE\");\r\n\t\t \ttolls[grid]=rs.getInt(\"TOLLS\");\t \t\t \t\r\n\t\t }\t\t \t\t \r\n\t\t rs.close();\r\n\t\t conn.close();\r\n\t\t } catch(SQLException err){\r\n\t\t System.err.println(\"SQL error.\");\r\n\t\t err.printStackTrace(System.err);\r\n\t\t System.exit(0);\r\n\t\t }\r\n\t\t\t Land=new Land[20];\r\n\t\t\t Land2=new Land[20];\r\n\t\t\t Land=Land2;\t\t\t \r\n\t\t \tfor(int i=1;i<=grid;i++) {\r\n\t\t \t\tLand[i]=new Land(p_number[i],Integer.parseInt(land[i][1]),l_price[i],tolls[i]);\t \t\t\r\n\t\t \t}\r\n\t\t\t sc2.close();\r\n\t}", "private boolean m21866j() {\n /*\n r12 = this;\n r0 = 2\n java.io.File[] r0 = new java.io.File[r0]\n java.io.File r1 = new java.io.File\n java.lang.String r2 = \"/proc/tty/drivers\"\n r1.<init>(r2)\n r2 = 0\n r0[r2] = r1\n java.io.File r1 = new java.io.File\n java.lang.String r3 = \"/proc/cpuinfo\"\n r1.<init>(r3)\n r3 = 1\n r0[r3] = r1\n int r1 = r0.length\n r4 = r2\n L_0x0019:\n if (r4 >= r1) goto L_0x007d\n r5 = r0[r4]\n boolean r6 = r5.exists()\n if (r6 == 0) goto L_0x007a\n boolean r6 = r5.canRead()\n if (r6 == 0) goto L_0x007a\n r6 = 1024(0x400, float:1.435E-42)\n char[] r6 = new char[r6]\n java.lang.StringBuilder r7 = new java.lang.StringBuilder\n r7.<init>()\n r8 = 0\n java.io.BufferedReader r9 = new java.io.BufferedReader // Catch:{ Exception -> 0x0074, all -> 0x006d }\n java.io.InputStreamReader r10 = new java.io.InputStreamReader // Catch:{ Exception -> 0x0074, all -> 0x006d }\n java.io.FileInputStream r11 = new java.io.FileInputStream // Catch:{ Exception -> 0x0074, all -> 0x006d }\n r11.<init>(r5) // Catch:{ Exception -> 0x0074, all -> 0x006d }\n r10.<init>(r11) // Catch:{ Exception -> 0x0074, all -> 0x006d }\n r9.<init>(r10) // Catch:{ Exception -> 0x0074, all -> 0x006d }\n L_0x0042:\n int r5 = r9.read(r6) // Catch:{ Exception -> 0x006b, all -> 0x0068 }\n r8 = -1\n if (r5 == r8) goto L_0x004d\n r7.append(r6, r2, r5) // Catch:{ Exception -> 0x006b, all -> 0x0068 }\n goto L_0x0042\n L_0x004d:\n if (r9 == 0) goto L_0x0052\n r9.close() // Catch:{ IOException -> 0x0052 }\n L_0x0052:\n java.lang.String r5 = r7.toString()\n java.lang.String[] r6 = f16401e\n int r7 = r6.length\n r8 = r2\n L_0x005a:\n if (r8 >= r7) goto L_0x007a\n r9 = r6[r8]\n boolean r9 = r5.contains(r9)\n if (r9 == 0) goto L_0x0065\n return r3\n L_0x0065:\n int r8 = r8 + 1\n goto L_0x005a\n L_0x0068:\n r0 = move-exception\n r8 = r9\n goto L_0x006e\n L_0x006b:\n r8 = r9\n goto L_0x0074\n L_0x006d:\n r0 = move-exception\n L_0x006e:\n if (r8 == 0) goto L_0x0073\n r8.close() // Catch:{ IOException -> 0x0073 }\n L_0x0073:\n throw r0\n L_0x0074:\n if (r8 == 0) goto L_0x0079\n r8.close() // Catch:{ IOException -> 0x0079 }\n L_0x0079:\n return r2\n L_0x007a:\n int r4 = r4 + 1\n goto L_0x0019\n L_0x007d:\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.startapp.android.p163a.C5073a.m21866j():boolean\");\n }", "void mo80454a(File file, long j);", "public void readFile() throws NumberFormatException,FileNotFoundException {\n Scanner scanStar, scanMessier, scanPlanet;\n String raw_data;\n String[] values;\n Set<String> identifyName = new HashSet<>();\n // Create scanner to scan file\n scanStar = new Scanner(new File(filename[0]));\n scanMessier = new Scanner(new File(filename[1]));\n scanPlanet = new Scanner(new File(filename[2]));\n\n // Read data about Star and store\n Star star;\n while (scanStar.hasNext()){\n raw_data = scanStar.nextLine();\n values = processData(raw_data, 1);\n // Check whether there is the same object or the data is wrong\n if (values.length != 7 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Star file\");\n System.exit(1);\n }\n star = new Star();\n star.setNumber(values[0]);\n star.setRa(Double.parseDouble(values[1]));\n star.setDecl(Double.parseDouble(values[2]));\n star.setMagn(Double.parseDouble(values[3]));\n star.setDistance(Double.parseDouble(values[4]));\n star.setType(values[5]);\n star.setConstellation(values[6]);\n // Add object to collection\n aos.add(star);\n identifyName.add(star.getNumber());\n }\n scanStar.close();\n\n // Read data about Messier and store\n Messier messier;\n while (scanMessier.hasNext()){\n raw_data = scanMessier.nextLine();\n values = processData(raw_data, 1);\n if (values.length < 6 || identifyName.contains('M' + values[0])){\n System.out.println(\"There are some mistakes in Messier file\");\n System.exit(1);\n }\n messier = new Messier();\n messier.setNumber(\"M\" + values[0]);\n messier.setRa(Double.parseDouble(values[1]));\n messier.setDecl(Double.parseDouble(values[2]));\n messier.setMagn(Double.parseDouble(values[3]));\n messier.setDistance(Double.parseDouble(values[4]));\n messier.setConstellation(values[5]);\n if (values.length == 7){\n messier.setDescription(values[6]);\n }else {\n messier.setDescription(\"-\");\n }\n // Add object to collection\n aos.add(messier);\n identifyName.add(messier.getNumber());\n }\n scanMessier.close();\n\n // Read data about Planet and store\n Planet planet;\n while (scanPlanet.hasNext()){\n raw_data = scanPlanet.nextLine();\n values = processData(raw_data, 0);\n if (values.length != 6 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Planet file\");\n System.exit(1);\n }\n planet = new Planet();\n planet.setName(values[0]);\n planet.setRa(Double.parseDouble(values[1]));\n planet.setDecl(Double.parseDouble(values[2]));\n planet.setMagn(Double.parseDouble(values[3]));\n planet.setDistance(Double.parseDouble(values[4]));\n planet.setAlbedo(Double.parseDouble(values[5]));\n // Add object to collection\n aos.add(planet);\n identifyName.add(planet.getName());\n }\n scanPlanet.close();\n }", "private static ArrayList<File> buildFilesArray() {\n ArrayList<File> result = new ArrayList<>();\n rAddFilesToArray(workingDirectory, result);\n return result;\n }", "public Vector loadExpressionFiles() throws IOException {\r\n \tif(isAnnotationSelected()) {\r\n \t\t\r\n \t\tthis.mav.getData().setAnnotationLoaded(true);\r\n\t\t\tFile annoFile=new File(getAnnotationFilePath());\r\n\t\t\tString extension=(annoFile.getName()).substring((annoFile.getName()).lastIndexOf('.')+1, annoFile.getName().length());\r\n\t\t\t\r\n\t\t\tif(annoFile.getName().endsWith(\"annot.csv\")){\r\n\t\t\t\t//System.out.println(\"Ends with annot.csv\");\r\n\t\t\t\tAffymetrixAnnotationParser aafp = AffymetrixAnnotationParser.createAnnotationFileParser(new File(getAnnotationFilePath()));\r\n\t\t\t\t_tempAnno = aafp.getAffyAnnotation();\r\n\t\t\t\t//chipAnno = aafp.getAffyChipAnnotation();\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif(extension.equalsIgnoreCase(\"txt\")){\r\n\t\t\tAnnotationFileReader afr = AnnotationFileReader.createAnnotationFileReader(new File(getAnnotationFilePath()));\r\n\t\t\t_tempAnno = afr.getAffyAnnotation();\r\n\t\t\tchipAnno = afr.getAffyChipAnnotation();\r\n\t\t\t}\r\n \t\t \t\r\n }\r\n\r\n return loadAffyGCOSExpressionFile(new File(this.sflp.selectedFiles.getText()));\r\n }", "public Files(){\n this.fileNameArray.add(\"bridge_1.txt\");\n this.fileNameArray.add(\"bridge_2.txt\");\n this.fileNameArray.add(\"bridge_3.txt\");\n this.fileNameArray.add(\"bridge_4.txt\");\n this.fileNameArray.add(\"bridge_5.txt\");\n this.fileNameArray.add(\"bridge_6.txt\");\n this.fileNameArray.add(\"bridge_7.txt\");\n this.fileNameArray.add(\"bridge_8.txt\");\n this.fileNameArray.add(\"bridge_9.txt\");\n this.fileNameArray.add(\"ladder_1.txt\");\n this.fileNameArray.add(\"ladder_2.txt\");\n this.fileNameArray.add(\"ladder_3.txt\");\n this.fileNameArray.add(\"ladder_4.txt\");\n this.fileNameArray.add(\"ladder_5.txt\");\n this.fileNameArray.add(\"ladder_6.txt\");\n this.fileNameArray.add(\"ladder_7.txt\");\n this.fileNameArray.add(\"ladder_8.txt\");\n this.fileNameArray.add(\"ladder_9.txt\");\n }", "@SuppressWarnings(\"unchecked\")\n public ArrBag( String infileName ) throws Exception\n {\n count = 0; // i.e. logical size, actual number of elems in the array\n BufferedReader infile = new BufferedReader( new FileReader( infileName ) );\n while ( infile.ready() )\n this.add( (T) infile.readLine() );\n infile.close();\n }", "private boolean compareFile(java.io.FileInputStream r25, java.io.FileInputStream r26) {\n /*\n r24 = this;\n r7 = 5;\n r8 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r2 = 0;\n r21 = r25.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r0 = (int) r0;\t Catch:{ IOException -> 0x00ce }\n r19 = r0;\n r21 = r26.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r9 = (int) r0;\n r0 = r19;\n if (r0 != r9) goto L_0x002e;\n L_0x0020:\n r21 = 1;\n r0 = r19;\n r1 = r21;\n if (r0 < r1) goto L_0x002e;\n L_0x0028:\n r21 = 1;\n r0 = r21;\n if (r9 >= r0) goto L_0x003c;\n L_0x002e:\n r21 = 0;\n r25.close();\t Catch:{ IOException -> 0x0037 }\n r26.close();\t Catch:{ IOException -> 0x0037 }\n L_0x0036:\n return r21;\n L_0x0037:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x0036;\n L_0x003c:\n r21 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r0 = r19;\n r1 = r21;\n if (r0 > r1) goto L_0x00b4;\n L_0x0044:\n r6 = r19;\n L_0x0046:\n r20 = r19 / r6;\n r21 = 5;\n r0 = r20;\n r1 = r21;\n if (r0 < r1) goto L_0x00b7;\n L_0x0050:\n r14 = 5;\n L_0x0051:\n r21 = r6 * r14;\n r20 = r19 - r21;\n r15 = r20 / r14;\n r3 = 1;\n r5 = 0;\n r4 = 0;\n r16 = 0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r18 = r0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r17 = r0;\n r5 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r25;\n r5.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r4 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r26;\n r4.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r12 = 0;\n L_0x0073:\n if (r12 >= r14) goto L_0x00bf;\n L_0x0075:\n if (r3 == 0) goto L_0x00bf;\n L_0x0077:\n r21 = 0;\n r0 = r18;\n r1 = r21;\n r5.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = 0;\n r0 = r17;\n r1 = r21;\n r4.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = r6 + r15;\n r16 = r16 + r21;\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r5.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r4.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r13 = 0;\n L_0x00a2:\n if (r13 >= r6) goto L_0x00bc;\n L_0x00a4:\n if (r3 == 0) goto L_0x00bc;\n L_0x00a6:\n r21 = r18[r13];\t Catch:{ IOException -> 0x00ce }\n r22 = r17[r13];\t Catch:{ IOException -> 0x00ce }\n r0 = r21;\n r1 = r22;\n if (r0 != r1) goto L_0x00ba;\n L_0x00b0:\n r2 = 1;\n L_0x00b1:\n r13 = r13 + 1;\n goto L_0x00a2;\n L_0x00b4:\n r6 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n goto L_0x0046;\n L_0x00b7:\n r14 = r20;\n goto L_0x0051;\n L_0x00ba:\n r2 = 0;\n goto L_0x00b1;\n L_0x00bc:\n r12 = r12 + 1;\n goto L_0x0073;\n L_0x00bf:\n r25.close();\t Catch:{ IOException -> 0x00c9 }\n r26.close();\t Catch:{ IOException -> 0x00c9 }\n L_0x00c5:\n r21 = r2;\n goto L_0x0036;\n L_0x00c9:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00ce:\n r10 = move-exception;\n r10.printStackTrace();\t Catch:{ all -> 0x00df }\n r2 = 0;\n r25.close();\t Catch:{ IOException -> 0x00da }\n r26.close();\t Catch:{ IOException -> 0x00da }\n goto L_0x00c5;\n L_0x00da:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00df:\n r21 = move-exception;\n r25.close();\t Catch:{ IOException -> 0x00e7 }\n r26.close();\t Catch:{ IOException -> 0x00e7 }\n L_0x00e6:\n throw r21;\n L_0x00e7:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00e6;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.sec.clipboard.data.list.ClipboardDataBitmap.compareFile(java.io.FileInputStream, java.io.FileInputStream):boolean\");\n }", "public static boolean[] readAlerts(String path) {\n boolean[] stockArray = new boolean[5];\n\n try {\n File file = new File(sourcePath + path);\n BufferedReader br = new BufferedReader(new FileReader(file));\n\n String line;\n\n while ((line = br.readLine()) != null) {\n int tempLine = Integer.parseInt(line.trim());\n\n switch (tempLine) {\n case 5:\n stockArray[0] = true;\n break;\n case 10:\n stockArray[1] = true;\n break;\n case 20:\n stockArray[2] = true;\n break;\n case 50:\n stockArray[3] = true;\n break;\n case 100:\n stockArray[4] = true;\n break;\n default:\n break;\n }\n }\n\n if (file.delete())\n if (file.createNewFile())\n System.out.println(\"Successful file creation!\");\n else\n System.out.println(\"File already exists!\");\n else\n System.out.println(\"File not deleted!\");\n\n br.close();\n } catch (IOException e) {\n System.out.print(\"File not found!\");\n e.printStackTrace();\n }\n\n return stockArray;\n }", "protected String[] readInFile(String filename) {\n Vector<String> fileContents = new Vector<String>();\n try {\n InputStream gtestResultStream1 = getClass().getResourceAsStream(File.separator +\n TEST_TYPE_DIR + File.separator + filename);\n BufferedReader reader = new BufferedReader(new InputStreamReader(gtestResultStream1));\n String line = null;\n while ((line = reader.readLine()) != null) {\n fileContents.add(line);\n }\n }\n catch (NullPointerException e) {\n CLog.e(\"Gest output file does not exist: \" + filename);\n }\n catch (IOException e) {\n CLog.e(\"Unable to read contents of gtest output file: \" + filename);\n }\n return fileContents.toArray(new String[fileContents.size()]);\n }", "void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }", "public void plzreadDataFiles(){\n\n //This line opens the file and returns an Input Stream data type\n InputStream itemIs = getResources().openRawResource(R.raw.card_data);\n\n //Read the file line by line\n BufferedReader reader = new BufferedReader(new InputStreamReader(itemIs, Charset.forName(\"UTF-8\")));\n\n //Initialize a var to track the line of the file being read in\n String line =\"\";\n\n // error proofing if the file is weird\n try {\n int i = 0;\n int k = 0;\n while ((line = reader.readLine()) != null){\n //split data by commas into an array of strings\n String[] token = line.split(\",\");\n\n itemArray[i] = new itemInfo();\n\n //Read the data\n itemArray[i].setCardType(token[0]);\n itemArray[i].setCardName(token[1]);\n itemArray[i].setItemType(token[2]);\n itemArray[i].setFrontText(token[3]);\n itemArray[i].setRearText(token[4]);\n itemArray[i].setDuration(token[5]);\n\n\n // Create a list of ITEM names for the autocomplete\n if ((itemArray[i].getCardType().intern()) == (\"Common Item\")){\n //itemSearchArray[i] = token[1];\n itemsOnlyList[k] = token[1];\n k = k + 1;\n }\n\n else if ((itemArray[i].getCardType().intern()) == (\"Unique Item\")){\n //itemSearchArray[i] = token[1];\n itemsOnlyList[k] = token[1];\n k = k + 1;\n }\n\n else if ((itemArray[i].getCardType().intern()) == (\"Spell\")){\n //itemSearchArray[i] = token[1];\n itemsOnlyList[k] = token[1];\n k = k + 1;\n }\n\n //Check that the damage column has a number in it, and write it in\n if (token[5].intern() != \"-\"){\n itemArray[i].setDamage(Integer.parseInt(token[5]));\n }\n else{\n //Set it to zero if the dash is detected\n itemArray[i].setDamage(0);\n }\n itemArray[i].setDuration(token[6]);\n\n i = i + 1;\n\n Log.d(\"My Activity\", \"Just added: \"+itemArray[i]);\n }\n\n } catch (IOException e) {\n Log.wtf(\"MyActivity\",\"Error reading data file on line\"+line,e);\n e.printStackTrace();\n }\n }", "private static void tokenFiles() throws IOException\r\n\t{\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br1 = new BufferedReader(fr);\r\n\t\t\r\n\t\tDouble[] salaries = new Double[10];//array for salary\r\n\t\tInteger[] id = new Integer[10];//array for id\r\n\t\tInteger[] age = new Integer[10];//array for age\r\n\t\tString[] fName = new String[10];//array for first name\r\n\t\tString[] lName = new String[10];//array for last name\r\n\t\tString[] status = new String[10];//array for status\r\n\t\tDouble[] raises = new Double[10];//array for the raised salary\r\n\t\tString s1;//string for readLine of files\r\n\t\tint i = 0;//index for loop of arrays\r\n\t\t\r\n\t\tSystem.out.println(\"\\nWith a 2% raise\\n\");\r\n\t\t//while loop to convert to proper type\r\n\t\twhile ((s1 = br1.readLine())!=null && i<10)\r\n\t\t{\r\n\t\t\tStringTokenizer st = new StringTokenizer(s1);//create new obj tokenizer\r\n\t\t\tfName[i] = st.nextToken();\r\n\t\t\tlName[i] = st.nextToken();\r\n\t\t\tid[i] = Integer.parseInt(st.nextToken());\r\n\t\t\tage[i] = Integer.parseInt(st.nextToken());\t\t\t\t\r\n\t\t\tsalaries[i] = Double.parseDouble(st.nextToken());\r\n\t\t\tstatus[i] = st.nextToken();\r\n\t\t\t\r\n\t\t\tSystem.out.println(fName[i]+\" \"+ lName[i]+\" \"+ id[i]+\r\n\t\t\t\t\t\t\" \"+ age[i]+\" \"+salaries[i]+\" \"+status[i]);\t\r\n\t\t\t\r\n\t\t\traises[i]= (salaries[i]*.02) +salaries[i];//calculate new salaries\r\n\t\t\tSystem.out.println(\"Salary with raise: \" +raises[i]);//print raise amount\r\n\t\t\ti++;\r\n\t\t}//end while loop convert to proper type\r\n\t\tbr1.close();//close this buffered reader\r\n\t}", "public void readFromFileStartP(String nameFile, int lStart, int cStart, int lAmount, int cAmount)\n {\n //definir dados\n int lin;\n int col;\n int i, j;\n FILE arquivo;\n String linha;\n\n //abrir arquivo\n arquivo = new FILE(FILE.INPUT, nameFile);\n\n //verificar se arquivo e' valido\n if( arquivo == null )\n {\n IO.println(\"ERRO: Arquivo invalido. \");\n } //end\n else\n {\n //tentar ler a primeira linha do arquivo\n linha = arquivo.readln( );\n\n //verificar se ha' dados na linha\n if( linha == null )\n {\n IO.println(\"ERRO: Arquivo vazio. \");\n } //end\n else\n {\n lin = IO.getint(linha);\n\n //verificar se lin e' valida\n if( lin <= 0 )\n {\n IO.println(\"ERRO: Quantidade de linhas invalida. \");\n } //end\n else\n {\n linha = arquivo.readln();\n col = IO.getint(linha);\n\n //verificar se coluna e' valida\n if( col <= 0 )\n {\n IO.println(\"ERRO: Quantidade de colunas invalida. \");\n } //end\n else\n {\n //verificar se quantidade e' valida\n if( lAmount <= 0 || lAmount > lin || cAmount <= 0 || cAmount > col )\n {\n IO.println(\"ERRO: Quantidade de colunas/linhas invalida(s).\");\n } //end\n else\n {\n if( lStart < 0 || lStart > lin || cStart < 0 || cStart > col ||\n lStart > (lin - lAmount) || cStart > (col - cAmount) )\n {\n IO.println(\"ERRO: Posicoe(s) iniciais invalida(s). \");\n } //end\n else\n {\n //repetir para cada posicao\n for(i = lStart; i < lAmount; i++)\n {\n for(j = cStart; j < cAmount; j++)\n {\n linha = arquivo.readln();\n table[ i ][ j ] = linha;\n } //end repetir\n } //end repetir\n //fechar arquivo (indispensavel)\n arquivo.close();\n } //end se\n } //end se\n } //end se\n } //end se\n } //end se\n } //end se\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"QZkj>P.|?`(ZTS\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"fe?i;td7q\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"Error in readFilej) : \";\n stringArray0[5] = \"\";\n EvoSuiteFile evoSuiteFile1 = new EvoSuiteFile(\"QZkj>P.|?`(ZTS\");\n FileSystemHandling.appendLineToFile(evoSuiteFile1, \"\");\n FileSystemHandling.appendStringToFile(evoSuiteFile1, \"\");\n stringArray0[7] = \"\";\n stringArray0[8] = \"\";\n StringReader stringReader0 = new StringReader(\"\");\n char[] charArray0 = new char[2];\n charArray0[0] = 'u';\n charArray0[1] = ']';\n stringReader0.read(charArray0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n JSJshop jSJshop0 = null;\n try {\n jSJshop0 = new JSJshop(\"QZkj>P.|?`(ZTS\", \"Error in readFilej) : \");\n fail(\"Expecting exception: System.SystemExitException\");\n \n } catch(System.SystemExitException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.evosuite.runtime.System\", e);\n }\n }", "private int[][][] readData(int startElement, int startLine, int endElement, int endLine) throws AreaFileException {\r\n// int[][][]myData = new int[numBands][dir[AD_NUMLINES]][dir[AD_NUMELEMS]];\r\n int numLines = endLine - startLine;\r\n int numEles = endElement - startElement;\r\n// System.out.println(\"linePrefixLength: \" + linePrefixLength);\r\n int[][][] myData = new int[numBands][numLines][numEles];\r\n \r\n if (! fileok) {\r\n throw new AreaFileException(\"Error reading AreaFile data\");\r\n }\r\n\r\n short shdata;\r\n int intdata;\r\n boolean isBrit = \r\n areaDirectory.getCalibrationType().equalsIgnoreCase(\"BRIT\"); \r\n long newPos = 0;\r\n\r\n for (int i = 0; i<numLines; i++) {\r\n newPos = datLoc + linePrefixLength + lineLength * (i + startLine) + startElement * dir[AD_DATAWIDTH];\r\n position = newPos;\r\n// System.out.println(position);\r\n try {\r\n af.seek(newPos);\r\n } catch (IOException e1) {\r\n e1.printStackTrace();\r\n }\r\n \r\n for (int k=0; k<numEles; k++) {\r\n for (int j = 0; j<numBands; j++) {\r\n try {\r\n if (dir[AD_DATAWIDTH] == 1) {\r\n myData[j][i][k] = (int)af.readByte();\r\n if (myData[j][i][k] < 0 && isBrit) {\r\n myData[j][i][k] += 256;\r\n } \r\n// position = position + 1;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 2) {\r\n shdata = af.readShort();\r\n if (flipwords) {\r\n myData[j][i][k] = (int) ( ((shdata >> 8) & 0xff) | \r\n ((shdata << 8) & 0xff00) );\r\n } else {\r\n myData[j][i][k] = (int) (shdata);\r\n }\r\n// position = position + 2;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 4) {\r\n intdata = af.readInt();\r\n if (flipwords) {\r\n myData[j][i][k] = ( (intdata >>> 24) & 0xff) | \r\n ( (intdata >>> 8) & 0xff00) | \r\n ( (intdata & 0xff) << 24 ) | \r\n ( (intdata & 0xff00) << 8);\r\n } else {\r\n myData[j][i][k] = intdata;\r\n }\r\n// position = position + 4;\r\n } \r\n } \r\n catch (IOException e) {\r\n myData[j][i][k] = 0;\r\n }\r\n }\r\n }\r\n }\r\n return myData;\r\n }", "private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException 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\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\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\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\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};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\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\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}", "private static long m133353n() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n long j = 0;\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"undeleted.name\");\n if (!C7634n.m23721b(name, \"synthetise_\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"undeleted.name\");\n if (!C7634n.m23723c(name2, \"-concat-v\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"undeleted.name\");\n if (!C7634n.m23723c(name3, \"-concat-a\", false)) {\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"undeleted.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n j += file2.length();\n }\n }\n }\n }\n return j;\n }", "public void readFromFile() {\n\n\t}", "private void initializeFileSystem() \r\n \t /*@ requires identityFile |-> _ &*& identityFileSignature |-> _ &*& addressFile |-> _ &*& addressFileSignature |-> _\r\n\t\t\t &*& caRoleIDFile |-> _ &*& preferencesFile |-> _ &*& idDirectory |-> _\r\n\t\t\t &*& certificateDirectoryFile |-> _ &*& privateKeyDirectoryFile |-> _ &*& authenticationObjectDirectoryFile |-> _ &*& objectDirectoryFile |-> _\r\n\t\t\t &*& tokenInfo |-> _ &*& belpicDirectory |-> _ &*& dirFile |-> _\r\n\t\t\t &*& masterFile |-> _ &*& selectedFile |-> _;\r\n\t @*/\r\n \t/*@ ensures dirFile |-> ?theDirFile &*& theDirFile.ElementaryFile(_, _, ?dirFileData, _, _, _) &*& theDirFile != null \r\n \t &*& dirFileData != null &*& dirFileData.length == 0x25\r\n\t &*& belpicDirectory |-> ?theBelpicDirectory &*& theBelpicDirectory.DedicatedFile(_, _, _, ?belpic_siblings, _) &*& theBelpicDirectory != null\r\n\t &*& tokenInfo |-> ?theTokenInfo &*& theTokenInfo.ElementaryFile(_, _, ?tokenInfoData, _, _, _) &*& theTokenInfo != null\r\n\t &*& tokenInfoData != null &*& tokenInfoData.length == 0x30\r\n\t &*& objectDirectoryFile |-> ?theObjectDirectoryFile &*& theObjectDirectoryFile.ElementaryFile(_, _, ?objectDirectoryFileData, _, _, _) &*& theObjectDirectoryFile != null\r\n\t &*& objectDirectoryFileData != null &*& objectDirectoryFileData.length == 40\r\n\t &*& authenticationObjectDirectoryFile |-> ?theAuthenticationObjectDirectoryFile &*& theAuthenticationObjectDirectoryFile.ElementaryFile(_, _, ?authenticationObjectDirectoryFileData, _, _, _) &*& theAuthenticationObjectDirectoryFile != null\r\n\t &*& authenticationObjectDirectoryFileData != null &*& authenticationObjectDirectoryFileData.length == 0x40\r\n\t &*& privateKeyDirectoryFile |-> ?thePrivateKeyDirectoryFile &*& thePrivateKeyDirectoryFile.ElementaryFile(_, _, ?privateKeyDirectoryFileData, _, _, _) &*& thePrivateKeyDirectoryFile != null\r\n\t &*& privateKeyDirectoryFileData != null &*& privateKeyDirectoryFileData.length == 0xB0\r\n\t &*& certificateDirectoryFile |-> ?theCertificateDirectoryFile &*& theCertificateDirectoryFile.ElementaryFile(_, _, ?certificateDirectoryFileData, _, _, _) &*& theCertificateDirectoryFile != null\r\n\t &*& certificateDirectoryFileData != null &*& certificateDirectoryFileData.length == 0xB0\r\n\t &*& idDirectory |-> ?theIdDirectory &*& theIdDirectory.DedicatedFile(_, _, _, ?idDirectory_siblings, _) &*& theIdDirectory != null\r\n\t &*& identityFile |-> ?theIdentityFile &*& theIdentityFile.ElementaryFile(_, _, ?identityData, _, _, _) &*& theIdentityFile != null\r\n\t &*& identityData != null &*& identityData.length == 0xD0\r\n\t &*& identityFileSignature |-> ?theIdentityFileSignature &*& theIdentityFileSignature.ElementaryFile(_, _, ?identitySignatureData, _, _, _) &*& theIdentityFileSignature != null\r\n\t &*& identitySignatureData != null &*& identitySignatureData.length == 0x80\r\n\t &*& addressFile |-> ?theAddressFile &*& theAddressFile.ElementaryFile(_, _, ?addressFileData, _, _, _) &*& theAddressFile != null\r\n\t &*& addressFileData != null &*& addressFileData.length == 117\r\n\t &*& addressFileSignature |-> ?theAddressFileSignature &*& theAddressFileSignature.ElementaryFile(_, _, ?addressFileSignatureData, _, _, _) &*& theAddressFileSignature != null\r\n\t &*& addressFileSignatureData != null &*& addressFileSignatureData.length == 128\r\n\t &*& caRoleIDFile |-> ?theCaRoleIDFile &*& theCaRoleIDFile.ElementaryFile(_, _, ?caRoldIDFileData, _, _, _) &*& theCaRoleIDFile != null\r\n\t &*& caRoldIDFileData != null &*& caRoldIDFileData.length == 0x20\r\n\t &*& preferencesFile |-> ?thePreferencesFile &*& thePreferencesFile.ElementaryFile(_, _, ?preferencesFileData, _, _, _) &*& thePreferencesFile != null\r\n\t &*& preferencesFileData != null &*& preferencesFileData.length == 100\r\n\t &*& masterFile |-> ?theMasterFile &*& theMasterFile.MasterFile(0x3F00, null, _, ?master_siblings, _) &*& theMasterFile != null\r\n\t &*& master_siblings == cons<File>(theDirFile, cons(theBelpicDirectory, cons(theIdDirectory, nil)))\r\n\t &*& belpic_siblings == cons<File>(theTokenInfo, cons(theObjectDirectoryFile, cons(theAuthenticationObjectDirectoryFile, cons(thePrivateKeyDirectoryFile, cons(theCertificateDirectoryFile,nil)))))\r\n\t &*& idDirectory_siblings == cons<File>(theIdentityFile, cons(theIdentityFileSignature, cons(theAddressFile, cons(theAddressFileSignature, cons(theCaRoleIDFile, cons(thePreferencesFile, nil))))))\r\n\t &*& selectedFile |-> theMasterFile &*& theBelpicDirectory.getClass() == DedicatedFile.class &*& theIdDirectory.getClass() == DedicatedFile.class;\r\n\t @*/\r\n\t{\r\n\t\tmasterFile = new MasterFile();\r\n\t\t/*\r\n\t\t * initialize PKCS#15 data structures see\r\n\t\t * \"5. PKCS#15 information details\" for more info\r\n\t\t */\r\n\t\t\r\n\t\t//@ masterFile.castMasterToDedicated();\r\n\t\t\r\n\t\tdirFile = new ElementaryFile(EF_DIR, masterFile, (short) 0x25);\r\n\t\tbelpicDirectory = new DedicatedFile(DF_BELPIC, masterFile);\r\n\t\ttokenInfo = new ElementaryFile(TOKENINFO, belpicDirectory, (short) 0x30);\r\n\t\tobjectDirectoryFile = new ElementaryFile(ODF, belpicDirectory, (short) 40);\r\n\t\tauthenticationObjectDirectoryFile = new ElementaryFile(AODF, belpicDirectory, (short) 0x40);\r\n\t\tprivateKeyDirectoryFile = new ElementaryFile(PRKDF, belpicDirectory, (short) 0xB0);\r\n\t\tcertificateDirectoryFile = new ElementaryFile(CDF, belpicDirectory, (short) 0xB0);\r\n\t\tidDirectory = new DedicatedFile(DF_ID, masterFile);\r\n\t\t/*\r\n\t\t * initialize all citizen data stored on the eID card copied from sample\r\n\t\t * eID card 000-0000861-85\r\n\t\t */\r\n\t\t// initialize ID#RN EF\r\n\t\tidentityFile = new ElementaryFile(IDENTITY, idDirectory, (short) 0xD0);\r\n\t\t// initialize SGN#RN EF\r\n\t\tidentityFileSignature = new ElementaryFile(SGN_IDENTITY, idDirectory, (short) 0x80);\r\n\t\t// initialize ID#Address EF\r\n\t\t// address is 117 bytes, and should be padded with zeros\r\n\t\taddressFile = new ElementaryFile(ADDRESS, idDirectory, (short) 117);\r\n\t\t// initialize SGN#Address EF\r\n\t\taddressFileSignature = new ElementaryFile(SGN_ADDRESS, idDirectory, (short) 128);\r\n\t\t// initialize PuK#7 ID (CA Role ID) EF\r\n\t\tcaRoleIDFile = new ElementaryFile(CA_ROLE_ID, idDirectory, (short) 0x20);\r\n\t\t// initialize Preferences EF to 100 zero bytes\r\n\t\tpreferencesFile = new ElementaryFile(PREFERENCES, idDirectory, (short) 100);\r\n\t\t\r\n\t\tselectedFile = masterFile;\r\n\t\t//@ masterFile.castDedicatedToMaster();\r\n\t}", "private static void m133350k() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"filesToDelete.name\");\n if (!C7634n.m23723c(name, \"-concat-v\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"filesToDelete.name\");\n if (!C7634n.m23723c(name2, \"-concat-a\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"filesToDelete.name\");\n if (!C7634n.m23723c(name3, \"_synthetise\", false)) {\n }\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"filesToDelete.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n file2.delete();\n }\n }\n }\n }", "public Vector loadAffyGCOSExpressionFile(File f) throws IOException {\r\n \tthis.setTMEVDataType();\r\n final int preSpotRows = this.sflp.getXRow()+1;\r\n final int preExperimentColumns = this.sflp.getXColumn();\r\n int numLines = this.getCountOfLines(f);\r\n int spotCount = numLines - preSpotRows;\r\n\r\n if (spotCount <= 0) {\r\n JOptionPane.showMessageDialog(superLoader.getFrame(), \"There is no spot data available.\", \"TDMS Load Error\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n \r\n int[] rows = new int[] {0, 1, 0};\r\n int[] columns = new int[] {0, 1, 0};\r\n //String value,pvalue;\r\n String detection;\r\n\r\n float cy3, cy5;\r\n\r\n String[] moreFields = new String[1];\r\n String[] extraFields=null;\r\n final int rColumns = 1;\r\n final int rRows = spotCount;\r\n \r\n ISlideData slideDataArray[]=null;\r\n AffySlideDataElement sde=null;\r\n FloatSlideData slideData=null;\r\n \r\n BufferedReader reader = new BufferedReader(new FileReader(f));\r\n StringSplitter ss = new StringSplitter((char)0x09);\r\n String currentLine;\r\n int counter, row, column,experimentCount=0;\r\n counter = 0;\r\n row = column = 1;\r\n this.setFilesCount(1);\r\n this.setRemain(1);\r\n this.setFilesProgress(0);\r\n this.setLinesCount(numLines);\r\n this.setFileProgress(0);\r\n float[] intensities = new float[2];\r\n \r\n while ((currentLine = reader.readLine()) != null) {\r\n if (stop) {\r\n return null;\r\n }\r\n// fix empty tabbs appending to the end of line by wwang\r\n while(currentLine.endsWith(\"\\t\")){\r\n \tcurrentLine=currentLine.substring(0,currentLine.length()-1);\r\n }\r\n ss.init(currentLine);\r\n \r\n if (counter == 0) { // parse header\r\n \t\r\n \tif(sflp.onlyIntensityRadioButton.isSelected()) \r\n \t\texperimentCount = ss.countTokens()- preExperimentColumns;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/2;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/3;\r\n \t\r\n \t\r\n \tslideDataArray = new ISlideData[experimentCount];\r\n \tSampleAnnotation sampAnn=new SampleAnnotation();\r\n \tslideDataArray[0] = new SlideData(rRows, rColumns, sampAnn);//Added by Sarita to include SampleAnnotation model.\r\n \r\n slideDataArray[0].setSlideFileName(f.getPath());\r\n for (int i=1; i<experimentCount; i++) {\r\n \tsampAnn=new SampleAnnotation();\r\n \tslideDataArray[i] = new FloatSlideData(slideDataArray[0].getSlideMetaData(),spotCount, sampAnn);//Added by Sarita \r\n \tslideDataArray[i].setSlideFileName(f.getPath());\r\n \t//System.out.println(\"slideDataArray[i].slide file name: \"+ f.getPath());\r\n }\r\n if(sflp.onlyIntensityRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[1];\r\n \t//extraFields = new String[1];\r\n \tfieldNames[0]=\"AffyID\";\r\n \tslideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[2];\r\n \textraFields = new String[1];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else{\r\n \tString [] fieldNames = new String[3];\r\n \textraFields = new String[2];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n fieldNames[2]=\"P-value\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n \r\n }\r\n ss.nextToken();//parse the blank on header\r\n for (int i=0; i<experimentCount; i++) {\r\n \tString val=ss.nextToken();\r\n\t\t\t\t\tslideDataArray[i].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\tslideDataArray[i].getSampleAnnotation().setAnnotation(\"Default Slide Name\", val);\r\n\t\t\t\t\tslideDataArray[i].setSlideDataName(val);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.mav.getData().setSampleAnnotationLoaded(true);\r\n\t\t\t \t \r\n if(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection\r\n ss.nextToken();//parse the pvalue\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection \r\n } \r\n }\r\n \r\n } else if (counter >= preSpotRows) { // data rows\r\n \trows[0] = rows[2] = row;\r\n \tcolumns[0] = columns[2] = column;\r\n \tif (column == rColumns) {\r\n \t\tcolumn = 1;\r\n \t\trow++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t} else {\r\n \t\tcolumn++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t}\r\n\r\n \t//affy ID\r\n \tmoreFields[0] = ss.nextToken();\r\n \r\n \t\r\n \t\r\n String cloneName = moreFields[0];\r\n if(_tempAnno.size()!=0) {\r\n \t \r\n \t \t \r\n \t if(((MevAnnotation)_tempAnno.get(cloneName))!=null) {\r\n \t\t MevAnnotation mevAnno = (MevAnnotation)_tempAnno.get(cloneName);\r\n\r\n \t\t sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields, mevAnno);\r\n \t }else {\r\n \t /**\r\n \t * Sarita: clone ID explicitly set here because if the data file\r\n \t * has a probe (for eg. Affy house keeping probes) for which Resourcerer\r\n \t * does not have annotation, MeV would still work fine. NA will be\r\n \t * appended for the rest of the fields. \r\n \t * \r\n \t * \r\n \t */\r\n \t\tMevAnnotation mevAnno = new MevAnnotation();\r\n \t\tmevAnno.setCloneID(cloneName);\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields, mevAnno);\r\n \t \t\t \r\n }\r\n }\r\n /* Added by Sarita\r\n * Checks if annotation was loaded and accordingly use\r\n * the appropriate constructor.\r\n * \r\n * \r\n */\r\n \r\n else {\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields);\r\n }\r\n \r\n \t\r\n \t//sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields);\r\n\r\n \tslideDataArray[0].addSlideDataElement(sde);\r\n \tint i=0;\r\n\r\n \tfor ( i=0; i<slideDataArray.length; i++) { \r\n \t\ttry {\t\r\n\r\n \t\t\t// Intensity\r\n \t\t\tintensities[0] = 1.0f;\r\n \t\t\tintensities[1] = ss.nextFloatToken(0.0f);\r\n \t\t\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t\textraFields[1]=ss.nextToken();//p-value\r\n \t\t\t\t\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t}\r\n\r\n \t\t} catch (Exception e) {\r\n \t\t\t\r\n \t\t\tintensities[1] = Float.NaN;\r\n \t\t}\r\n \t\tif(i==0){\r\n \t\t\t\r\n \t\t\tslideDataArray[i].setIntensities(counter - preSpotRows, intensities[0], intensities[1]);\r\n \t\t\t//sde.setExtraFields(extraFields);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t\tsde.setPvalue(new Float(extraFields[1]).floatValue());\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t}\r\n \t\t}else{\r\n \t\t\tif(i==1){\r\n \t\t\t\tmeta = slideDataArray[0].getSlideMetaData(); \t\r\n \t\t\t}\r\n \t\t\tslideDataArray[i].setIntensities(counter-preSpotRows,intensities[0],intensities[1]);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setPvalue(counter-preSpotRows,new Float(extraFields[1]).floatValue());\r\n \t\t\t}\r\n \t\t\tif(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n\r\n } else {\r\n //we have additional sample annoation\r\n \r\n \tfor (int i = 0; i < preExperimentColumns - 1; i++) {\r\n\t\t\t\t\tss.nextToken();\r\n\t\t\t\t}\r\n\t\t\t\tString key = ss.nextToken();\r\n\r\n\t\t\t\tfor (int j = 0; j < slideDataArray.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(slideDataArray[j].getSampleAnnotation()!=null){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tString val=ss.nextToken();\r\n\t\t\t\t\t\tslideDataArray[j].getSampleAnnotation().setAnnotation(key, val);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tSampleAnnotation sampAnn=new SampleAnnotation();\r\n\t\t\t\t\t\t\tsampAnn.setAnnotation(key, ss.nextToken());\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotation(sampAnn);\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n \t}\r\n \t\r\n this.setFileProgress(counter);\r\n \tcounter++;\r\n \t//System.out.print(counter);\r\n \t}\r\n reader.close();\r\n \r\n \r\n Vector data = new Vector(slideDataArray.length);\r\n \r\n for(int j = 0; j < slideDataArray.length; j++)\r\n \tdata.add(slideDataArray[j]);\r\n \r\n this.setFilesProgress(1);\r\n return data;\r\n }", "public void partialFromFile(String nameFile, int lAmount, int cAmount)\n {\n //definir dados\n int i, j;\n int lin;\n int col;\n FILE arquivo;\n String linha;\n\n //verificar se matriz (table) e' valida\n if( table == null )\n {\n IO.println(\"ERRO: Matriz invalida. \");\n } //end\n else\n {\n //obter dimensoes\n lin = lines();\n col = columns();\n\n //verificar se ambas dimensoes sao validas\n if( lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Tamanho(s) invalido(s). \");\n } //end\n else\n {\n arquivo = new FILE(FILE.INPUT, nameFile);\n\n //verificar se arquivo e' valido\n if (arquivo == null) {\n IO.println(\"ERRO: Arquivo invalido. \");\n } //end\n else\n {\n //tentar ler a primeira linha do arquivo\n linha = arquivo.readln();\n\n //verificar se a linha e' valida\n if( linha == null )\n {\n IO.println(\"ERRO: Arquivo vazio. \");\n } //end\n else\n {\n lin = IO.getint(linha);\n linha = arquivo.readln();\n col = IO.getint(linha);\n\n //verificar se coluna e' valida\n if( col <= 0 )\n {\n IO.println(\"ERRO: Quantidade de colunas invalida. \");\n } //end\n else\n {\n //verificar quantidade\n if( lAmount <= 0 || lAmount > lin ||\n cAmount <= 0 || cAmount > col )\n {\n IO.println(\"ERRO: Quantidade(s) de col/lin invalida(s). \");\n } //end\n else\n {\n for( i = 0; i < lAmount; i++)\n {\n for( j = 0; j < cAmount; j++)\n {\n linha = arquivo.readln();\n table[ i ][ j ] = linha;\n } //end repetir\n } //end repetir\n //fechar arquivo (indispensavel)\n arquivo.close();\n } //end se\n } //end se\n } //end se\n } //end se\n }// end se\n } //end se\n }", "private String[] readFile(String path) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new FileReader(new File(path))));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \" + path + \":\" + exception.getMessage());\r\n }\r\n }", "private void initializeEmptyLargeFiles() \r\n\t /*@ requires belpicDirectory |-> ?bpd &*& bpd != null &*& bpd.DedicatedFile(_, _, _, ?belpic_sibs, _) &*& \r\n\t \t\tlength(belpic_sibs) < 6 &*&\r\n\t \t\tidDirectory |-> ?idd &*& idd != null &*& idd.DedicatedFile(_, _, _, ?iddir_sibs, _) &*& \r\n\t \t\tlength(iddir_sibs) < 7 &*&\r\n\t \t\tcaCertificate |-> _ &*& rrnCertificate |-> _ &*& rootCaCertificate |-> _ &*& \r\n\t \t\tphotoFile |-> _ &*& authenticationCertificate |-> _ &*& nonRepudiationCertificate |-> _; @*/\r\n \t /*@ ensures belpicDirectory |-> bpd &*& \r\n\t \t\tidDirectory |-> idd &*&\r\n\t \t\tcaCertificate |-> ?cac &*& cac.ElementaryFile(CA_CERTIFICATE, bpd, ?d1, true, 0, _) &*& d1 != null &*& d1.length == 1200 &*&\r\n\t \t\trrnCertificate |-> ?rrnc &*& rrnc.ElementaryFile(RRN_CERTIFICATE, bpd, ?d2, true, 0, _) &*& d2 != null &*& d2.length == 1200 &*&\r\n\t \t\trootCaCertificate |-> ?rootcac &*& rootcac.ElementaryFile(ROOT_CA_CERTIFICATE, bpd, ?d3, true, 0, _) &*& d3 != null &*& d3.length == 1200 &*&\r\n\t \t\tphotoFile |-> ?pf &*& pf.ElementaryFile(PHOTO, idd, ?d4, true, 0, _) &*& d4 != null &*& d4.length == 3584 &*&\r\n\t \t\tauthenticationCertificate |-> ?ac &*& ac.ElementaryFile(AUTH_CERTIFICATE, bpd, ?d5, true, 0, _) &*& d5 != null &*& d5.length == 1200 &*&\r\n\t \t\tnonRepudiationCertificate |-> ?nrc &*& nrc.ElementaryFile(NONREP_CERTIFICATE, bpd, ?d6, true, 0, _) &*& d6 != null &*& d6.length == 1200 &*&\r\n\t \t\tidd.DedicatedFile(_, _, _, append(iddir_sibs, cons(pf, nil)), _) &*& \r\n\t \t\tbpd.DedicatedFile(_, _, _, append(append(append(append(append(belpic_sibs, cons(cac, nil)), cons(rrnc, nil)), cons(rootcac, nil)), cons(ac, nil)), cons(nrc, nil)), _); @*/\r\n\t{\r\n\t\t/*\r\n\t\t * these 3 certificates are the same for all sample eid card applets\r\n\t\t * therefor they are made static and the data is allocated only once\r\n\t\t */\r\n\t\tcaCertificate = new ElementaryFile(CA_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t\trrnCertificate = new ElementaryFile(RRN_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t\t\r\n\t\trootCaCertificate = new ElementaryFile(ROOT_CA_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t\t/*\r\n\t\t * to save some memory we only support 1 photo for all subclasses\r\n\t\t * ideally this should be applet specific and have max size 3584 (3.5K)\r\n\t\t */\r\n\t\tphotoFile = new ElementaryFile(PHOTO, idDirectory, (short) 3584);\r\n\t\t/*\r\n\t\t * certificate #2 and #3 are applet specific allocate enough memory\r\n\t\t */\r\n\t\tauthenticationCertificate = new ElementaryFile(AUTH_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t\tnonRepudiationCertificate = new ElementaryFile(NONREP_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t}", "public static List<String> mainReadFile(String[] args) throws IOException, URISyntaxException {\n List<String> exmp = new ArrayList<>();\n File initialFile = resolveFileFromResources(args[0]);\n // System.out.println(initialFile);\n ObjectMapper obM = getObjectMapper();\n Trades[] exmpTrade = obM.readValue(initialFile, Trades[].class);\n for (Trades trade : exmpTrade) {\n exmp.add(trade.getSymbol());\n }\n printJsonObject(exmp);\n //return Collections.emptyList();\n return exmp;\n }", "private static byte[] m136428a(File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[((int) file.length())];\n int i = 0;\n while (i < bArr.length) {\n int read = fileInputStream.read(bArr, i, bArr.length - i);\n if (read < 0) {\n break;\n }\n i += read;\n }\n if (i >= bArr.length) {\n fileInputStream.close();\n return bArr;\n }\n StringBuilder sb = new StringBuilder(\"Could not completely read file \");\n sb.append(file.getName());\n throw new IOException(sb.toString());\n }", "private int readFlatFile(String expositionDirPath, String flatFilename, int expoYear){\n String badgeID, expoValue, line = \"\";\n int lineCounter = 0, idx = 0, expoMonth = 0;\n\n try{\n // set up a logger\n Logger.setOutputFile(expositionDirPath+\"/\"+flatFilename.substring(0,flatFilename.length()-4)+\".log\");\n Logger.setAppend(false);\n\n // exposite -> expoSiteId\n String expoSite = flatFilename.substring(0,3);\n int expoSiteId = 0;\n if(expoSite.equalsIgnoreCase(\"DOE\")) expoSiteId = 1;\n else if(expoSite.equalsIgnoreCase(\"TIH\")) expoSiteId = 2;\n else if(expoSite.equalsIgnoreCase(\"IRE\")) expoSiteId = 3;\n else if(expoSite.equalsIgnoreCase(\"OTH\")) expoSiteId = 4;\n\n openInputFile(expositionDirPath+\"/\"+flatFilename);\n\n // run thru lines in file\n while((line = lineNumberReader.readLine()) != null){\n lineCounter++;\n idx = 0;\n\n if(line.length() > 0){\n badgeID = line.substring(idx,idx+BADGEID_LEN).trim(); idx+=BADGEID_LEN;\n expoMonth = Integer.parseInt(line.substring(idx,idx+BADGEID_LEN).trim()); idx+=EXPOMONTH_LEN+5; // 5 = redundant chars\n expoValue = line.substring(idx).trim();\n\n // date range in which the expositions took place (1 whole month)\n Calendar expoDate = new GregorianCalendar(expoYear,expoMonth-1,1,0,0,0);\n Date expoDateBegin = expoDate.getTime();\n expoDate.add(Calendar.MONTH,1);\n Date expoDateEnd = expoDate.getTime();\n\n if(Debug.enabled){\n Debug.println(\"\\n###### [\"+badgeID+\", \"+expoMonth+\", \"+expoValue+\"] ######\");\n Debug.println(\"expoDateBegin : \"+dateFormat.format(expoDateBegin));\n Debug.println(\"expoDateEnd : \"+dateFormat.format(expoDateEnd)+\"\\n\");\n }\n\n saveExpositionInDB(badgeID,expoSiteId,expoMonth,expoYear,expoDateBegin,expoDateEnd,expoValue);\n }\n else{\n Logger.log(\"Empty line in flatfile '\"+flatFilename+\"'.\",Logger.ERROR_LEVEL_INFO,\"\"+lineCounter);\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n Logger.close();\n\n try{\n closeInputFile();\n }\n catch(IOException ioe){\n ioe.printStackTrace();\n }\n }\n\n if(Debug.enabled) Debug.println(\"\\n=======================================================\");\n if(Debug.enabled) Debug.println(\"flat file '\"+flatFilename+\"' read.\\n\\n\");\n\n return lineCounter;\n }", "private String[] readFile(InputStream stream) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new InputStreamReader(stream)));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \");\r\n }\r\n }", "private static java.io.File c(java.lang.String r8, java.lang.String r9) {\n /*\n r0 = 0;\n r1 = 0;\n r2 = new java.io.File;\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r2.<init>(r8);\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r8 = r2.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r8 != 0) goto L_0x001d;\n L_0x000d:\n r8 = \"DecryptUtils\";\n r9 = \"unZipSingleFile file don't exist\";\n r3 = new java.lang.Object[r0];\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.d.e(r8, r9, r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r1);\n r2.delete();\n return r1;\n L_0x001d:\n r8 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.<init>();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = java.io.File.separator;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = \"unzip\";\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8 = r8.toString();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = new java.io.File;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r8);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = r9.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r3 != 0) goto L_0x0044;\n L_0x0041:\n r9.mkdirs();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x0044:\n r9 = new java.util.zip.ZipInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3.<init>(r2);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x004e:\n r3 = r9.getNextEntry();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x00f4;\n L_0x0054:\n r4 = r3.getName();\t Catch:{ Exception -> 0x00dc }\n r3 = r3.isDirectory();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x0085;\n L_0x005e:\n r3 = r4.length();\t Catch:{ Exception -> 0x00dc }\n r3 = r3 + -1;\n r3 = r4.substring(r0, r3);\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r3);\t Catch:{ Exception -> 0x00dc }\n r3 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00dc }\n r4.mkdirs();\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x0085:\n r3 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r4);\t Catch:{ Exception -> 0x00dc }\n r4 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r3.<init>(r4);\t Catch:{ Exception -> 0x00dc }\n r3.createNewFile();\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r5 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r5 = new byte[r5];\t Catch:{ Exception -> 0x00c2 }\n L_0x00aa:\n r6 = r9.read(r5);\t Catch:{ Exception -> 0x00c2 }\n r7 = -1;\n if (r6 == r7) goto L_0x00b8;\n L_0x00b1:\n r4.write(r5, r0, r6);\t Catch:{ Exception -> 0x00c2 }\n r4.flush();\t Catch:{ Exception -> 0x00c2 }\n goto L_0x00aa;\n L_0x00b8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r3;\n L_0x00c2:\n r3 = move-exception;\n goto L_0x00c9;\n L_0x00c4:\n r8 = move-exception;\n r4 = r1;\n goto L_0x00d8;\n L_0x00c7:\n r3 = move-exception;\n r4 = r1;\n L_0x00c9:\n r5 = \"DecryptUtils\";\n r6 = \"unZipSingleFile unZip hotfix patch file error\";\n r7 = new java.lang.Object[r0];\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.d.a(r5, r6, r3, r7);\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x00d7:\n r8 = move-exception;\n L_0x00d8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n throw r8;\t Catch:{ Exception -> 0x00dc }\n L_0x00dc:\n r8 = move-exception;\n goto L_0x00eb;\n L_0x00de:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00fc;\n L_0x00e1:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00eb;\n L_0x00e4:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n goto L_0x00fc;\n L_0x00e8:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n L_0x00eb:\n r3 = \"DecryptUtils\";\n r4 = \"unZipSingleFile unZip hotfix patch file error\";\n r0 = new java.lang.Object[r0];\t Catch:{ all -> 0x00fb }\n com.taobao.sophix.e.d.a(r3, r4, r8, r0);\t Catch:{ all -> 0x00fb }\n L_0x00f4:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r1;\n L_0x00fb:\n r8 = move-exception;\n L_0x00fc:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n throw r8;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.c(java.lang.String, java.lang.String):java.io.File\");\n }", "public static void main(String[] args) throws IOException {\n\t\tString MUMmerFile = args[0];\n\t\tString ErrorEPGAcontigFile = args[1];\n\t\tString ErrorFreeEPGAcontigFile = args[2];\n\t\tString SPAdescontigFile = args[3];\n\t\tString DataName = args[4];\n\t\tString FinalEPGAcontigPath = args[5];\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile = CommonClass.getFileLines(MUMmerFile);\n\t\tString MUMerArray[] = new String[SizeOfMUMmerFile];\n\t\tint RealSizeMUMmer = CommonClass.FileToArray(MUMmerFile, MUMerArray);\n\t\tSystem.out.println(\"The real size of MUMmer is:\" + RealSizeMUMmer);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorEPGAFile = CommonClass.getFileLines(ErrorEPGAcontigFile);\n\t\tString ErrorEPGAcontigArray[] = new String[SizeOfErrorEPGAFile];\n\t\tint RealSizeErrorEPGAcontig = CommonClass.FastaToArray(ErrorEPGAcontigFile, ErrorEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error EPGA assembly is:\" + RealSizeErrorEPGAcontig);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorFreeEPGAFile = CommonClass.getFileLines(ErrorFreeEPGAcontigFile);\n\t\tString ErrorFreeEPGAcontigArray[] = new String[SizeOfErrorFreeEPGAFile];\n\t\tint RealSizeErrorFreeEPGAcontig = CommonClass.FastaToArray(ErrorFreeEPGAcontigFile, ErrorFreeEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error Free EPGA assembly is:\" + RealSizeErrorFreeEPGAcontig);\n\t\t//Load SPAdes.\n\t\tint SizeOfSPAdesFile = CommonClass.getFileLines(SPAdescontigFile);\n\t\tString SPAdescontigArray[] = new String[SizeOfSPAdesFile];\n\t\tint RealSizeSPAdescontig = CommonClass.FastaToArray(SPAdescontigFile, SPAdescontigArray);\n\t\tSystem.out.println(\"The real size of SPAdes assembly is:\" + RealSizeSPAdescontig);\n\t\t//Process.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor (int w = 4; w < RealSizeMUMmer; w++) {\n\t\t\tif (MUMerArray[w].charAt(0) != '#') {\n\t\t\t\tint CountSave = 0;\n\t\t\t\tString SaveTempArray[] = new String[RealSizeMUMmer];\n\t\t\t\tString[] SplitLine1 = MUMerArray[w].split(\"\\t|\\\\s+\");\n\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[w];\n\t\t\t\tMUMerArray[w] = \"#\" + MUMerArray[w];\n\t\t\t\tfor (int e = w + 1; e < RealSizeMUMmer; e++) {\n\t\t\t\t\tif (MUMerArray[e].charAt(0) != '#') {\n\t\t\t\t\t\tString[] SplitLine2 = MUMerArray[e].split(\"\\t|\\\\s+\");\n\t\t\t\t\t\tif (SplitLine1[11].equals(SplitLine2[11])) {\n\t\t\t\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[e];\n\t\t\t\t\t\t\tMUMerArray[e] = \"#\" + MUMerArray[e];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Mark read.\n\t\t\t\tfor (int r = 0; r < CountSave; r++) {\n\t\t\t\t\tString[] SplitLine31 = SaveTempArray[r].split(\"\\t|\\\\s+\");\n\t\t\t\t\tString[] SplitLine41 = SplitLine31[12].split(\"_\");\n\t\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine41[1]);\n\t\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tint CountCorrEPGA=0;\n\t\tString CorrEPGAContigArray[]=new String[2*(RealSizeErrorFreeEPGAcontig+RealSizeSPAdescontig)];\n\t\tint EPId = 0;\n\t\tfor (int w = 0; w < RealSizeErrorFreeEPGAcontig; w++) {\n CorrEPGAContigArray[CountCorrEPGA++]=ErrorFreeEPGAcontigArray[w];\n\t\t}\n\t\tIterator<Integer> it = hashSet.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tint EPGAIndex = it.next();\n CorrEPGAContigArray[CountCorrEPGA++]=SPAdescontigArray[EPGAIndex];\n\t\t}\n\t\t//Sort process.\n\t\tString exch=\"\";\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t\t\tif(CorrEPGAContigArray[w].length()<CorrEPGAContigArray[h].length())\n\t\t\t\t{\n\t\t\t\t\texch=CorrEPGAContigArray[w];\n\t\t\t\t\tCorrEPGAContigArray[w]=CorrEPGAContigArray[h];\n\t\t\t\t\tCorrEPGAContigArray[h]=exch;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Delete duplicate records.\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t \tif(CorrEPGAContigArray[w].equals(CorrEPGAContigArray[h])||CorrEPGAContigArray[w].equals(CommonClass.reverse(CorrEPGAContigArray[h])))\n\t\t\t\t{\n\t\t\t\t\tCorrEPGAContigArray[h]=\"%\"+CorrEPGAContigArray[h];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int j=0;j<CountCorrEPGA;j++)\n\t\t{\n\t\t\tif(CorrEPGAContigArray[j].charAt(0)!='%')\n\t\t\t{\n\t\t\t\t FileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/CorrEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\t writer.write(\">\" + (EPId++) + \"\\n\" + CorrEPGAContigArray[j] + \"\\n\");\n\t\t\t writer.close();\n\t\t\t}\n\t\t}\n\t\t//Free.\n\t\tMUMerArray=null;\n\t\tErrorEPGAcontigArray=null;\n\t\tErrorFreeEPGAcontigArray=null;\n\t\tSPAdescontigArray=null;\n\t\tCorrEPGAContigArray=null;\n\t}", "public String[] getInfoFile(){\n String [] values = new String[4];\n values[0]= _file.getName(); //nombre\n values[1]= cities.size()+\"\";//ciudades\n values[2]= paths.length+\"\";\n return values;\n }", "private void readInFile()\n {\n try\n {\n file = new File(fileAddress);//Create new file from the given file name\n fileScanner = new Scanner(file);//Create a file scanner to scan for all the integers\n }\n catch(FileNotFoundException e) //Throws a FileNotFountException if the given file name doesn't exist\n {\n System.out.println(\"The file \" + fileAddress + \" could not be found\");\n }\n\n int i = 0;\n\n for(int j = 0; j < 1000; j++)\n {\n integerList[j] = fileScanner.nextInt();//Store the next integer from the file in to the integerList\n\n //Check to see if the index is at the end of the array and the file still has more integers,\n //then we reallocate more space for the array.\n\n /* if(i > (integerList.length - 1) && fileScanner.hasNextInt())\n resizeArray();\n i++;*/\n }\n\n /*while(fileScanner.hasNextInt())//Iterate through the file until there are no more integers\n {\n integerList[i] = fileScanner.nextInt();//Store the next integer from the file in to the integerList\n\n //Check to see if the index is at the end of the array and the file still has more integers,\n //then we reallocate more space for the array.\n\n if(i >= (integerList.length - 1) && fileScanner.hasNextInt())\n resizeArray();\n i++;\n }*/\n\n fileScanner.close();//close the scanner\n }", "private void prepareAssignmentFiles() {\n for (Assignment assignment : assignments) {\n //---------- initialize the assignmentFiles array list ----------\n assignment.assignmentFiles = new ArrayList<>();\n\n //create a temporary assignment files array list\n ArrayList<File> assignmentFiles = new ArrayList<>();\n\n //---------- call the recursive findAssignmentFiles method ----------\n findAssignmentFiles(assignmentFiles, assignment.assignmentDirectory);\n\n //---------- set the language for the assignment ----------\n if (language.equals( IAGConstant.LANGUAGE_AUTO) ) {\n assignment.language = autoDetectLanguage(assignmentFiles);\n }\n else {\n assignment.language = language;\n }\n\n String[] extensions;\n\n switch (assignment.language) {\n case IAGConstant.LANGUAGE_PYTHON3:\n extensions = IAGConstant.PYTHON_EXTENSIONS;\n break;\n case IAGConstant.LANGUAGE_CPP:\n extensions = IAGConstant.CPP_EXTENSIONS;\n break;\n default: //unable to determine the language\n extensions = new String[] {};\n }\n\n //add only files of the right type to the assignment file list\n for (File f: assignmentFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(extensions).contains(f_extension)){\n //---------- if the extension on the file matches\n // one of the extension in the extensions list, add\n // it to the programming files list. ----------\n assignment.assignmentFiles.add(f);\n }\n }\n assignment.bAutoGraded = false; //indicate the assignment has not yet been auto-graded\n }\n\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n ArrayList<String> arrayList0 = new ArrayList<String>();\n FileInputStream fileInputStream0 = fileUtil0.fetchAccessories(\"bq,4~/{MxS* Ht9k\", arrayList0);\n assertNull(fileInputStream0);\n }", "public int[] readBasicInfo() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Creates a new array to read the first line of data to (is an array because need to convert to int list)\n\t\tString textData;\n\t\t\n\t\t//Reads the first line of the text file into the array\n\t\ttextData = textReader.readLine();\n\t\t\n\t\tint[] data = new int[5];\n\t\t//Create a holding variable that will help to convert the String list over to an int list\n\t\tString[] tempList = new String[6];\n\t\t//List of deliminations that will be parsed out of the read strings in the string list that the function is passed\n\t\tString delims = \"[,()]+\";\n\t\t//Splits the strings from the file by the parenthesis and the commas\n\t\ttempList = textData.split(delims);\n\t\tfor (int i = 1; i < tempList.length; i++)\n\t\t\tdata[i-1] = Integer.parseInt(tempList[i]);\n\t\t\n\t\t//Returns the array containing the first line of the text file\n\t\treturn data;\n\t}", "public void readInputFile(){\n no_of_videos = 5;\n video_size = new int [no_of_videos];\n\n }", "private Point[] readTestFile(String filename) {\n In in = new In(filename);\n int N = in.readInt();\n Point[] points = new Point[N];\n for (int i = 0; i < N; i++) {\n int x = in.readInt();\n int y = in.readInt();\n points[i] = new Point(x, y);\n }\n return points;\n }", "public static int longArray() {\r\n\t\tString sCarp = System.getProperty(\"user.dir\");//Obtenemos la carpeta actual desde donde ejecutamos el código(de la carpeta del proyecto)\r\n\t\tFile carpeta = new File(sCarp); //Con este File obtenemos información de la carpeta\r\n\t\tFile[] listado = carpeta.listFiles();//Asi nos devuelven objetos file y podemos sacar mas info de ellos\r\n\r\n\t\tint longi=0;\r\n\t\t\r\n\t\tif(listado==null || listado.length == 0) {\r\n\t\t\tSystem.out.println(\"No hay elementos en la carpeta actual\");\r\n\t\t}else {\r\n\t\t\tlongi++;//solo ponemos un longi++ ya que si tiene archivos solo nos va a extraer uno que es la pos que guardamos\r\n\t\t\tfor(int i=0; i<listado.length;i++) {\r\n\t\t\t\tFile archivo = listado[i];\r\n\t\t\t\tif(archivo.isDirectory()==true) {\r\n\t\t\t\t\tFile[] listado2 = archivo.listFiles();\r\n\t\t\t\t\tif(listado2==null || listado2.length == 0) {\r\n\t\t\t\t\t\tSystem.out.println(\"No hay elementos en la carpeta actual\");\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tlongi++;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn longi;\r\n\t}", "private static ArrayList m5336a(File[] fileArr) {\n ArrayList arrayList = new ArrayList();\n int i = 0;\n while (i < fileArr.length) {\n if (fileArr[i].isFile() && fileArr[i].getName().length() == 10 && TextUtils.isDigitsOnly(fileArr[i].getName())) {\n arrayList.add(fileArr[i]);\n }\n i++;\n }\n return arrayList;\n }", "public static void readLocations() throws ProgressionException\n\t{\n\t\t//File file = GeoDis_GUI.inputfile;\n\t\t//infilename = file.getPath();\n\t\t//System.err.println(file.getPath());\n\t\t//infile = new TextInputStream(file.getPath());\n\t\tlogfile.print(\"\\nReading geographical locations ...\");\n\t\tinfile = new TextInputStream(GeoDis.infilename);\n\t\t\n\t\tdataName = infile.readLine(); \n\t\t//System.err.println (dataName);\n \t\n\t\tnumLocations = infile.readInt(); \n\t\t//System.err.println(numLocations);\n\t\n\t\n\t\tlocationName = new String[numLocations]; \n\t\tsampleSize = new int[numLocations]; \n\t\tLatitude = new double[numLocations]; \n\t\tLongitude = new double[numLocations]; \n\t\t\n\t\tfor(j = 0; j < numLocations; j++)\n\t\t{\n\t\t\t//trash = infile.readLine(); // read the \\n character in PC's\n\t\t\t\n\t\t\tlocationName[j] = infile.readLine(); \n\n\t\t\tif (locationName[j].length() == 0)\t\t\t\n\t\t\t\tlocationName[j] = infile.readLine(); \n\t\t\t\n\t\t\tsampleSize[j] = infile.readInt();\n\n\n\t\t\tif (usingDecimalDegrees) \n\t\t\t{\n\t\t\t\tLatitude[j] = infile.readFloat();\n\t\t\t\tLongitude[j] = infile.readFloat();\n\t\t\t}\t\n\n\t\t\telse\n\t\t\t{\n\t\t\t\tlat_deg = infile.readInt();\n\t\t\t\tlat_min = infile.readInt();\n\t\t\t\tlat_sec = infile.readInt();\n\t\t\t\tlat_coor = infile.readWord();\n\t\t\t\tlon_deg = infile.readInt();\n\t\t\t\tlon_min = infile.readInt();\t\t\t\t\n\t\t\t\tlon_sec = infile.readInt();\n\t\t\t\tlon_coor = infile.readWord();\n\t\t\t\n\t\t\t\t//System.err.println (sampleSize[j] + \" \" + lat_deg + \" \" + lat_min + \" \" + lat_sec + \" \" + lat_coor + \" \" + \n\t\t\t\t //lon_deg + \" \" + lon_min + \" \" + lon_sec + \" \" + lon_coor);\n\t\t\t\t\n\t\t\t\tdec_lat = (double)lat_deg + ((double)lat_min/60.0) + ((double)lat_sec/3600.0);\n\t\t\t\tdec_lon = (double)lon_deg + ((double)lon_min/60.0) + ((double)lon_sec/3600.0);\n\t\t\t\t\n\n\t\t\t\tif (lat_coor.equalsIgnoreCase(\"N\"))\n\t\t\t\t\tLatitude[j] = dec_lat;\n\t\t\t\telse if (lat_coor.equalsIgnoreCase(\"S\"))\n\t\t\t\t\tLatitude[j] = -1.0 * dec_lat; \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tStringBuffer str = new StringBuffer();\n\t\t\t\t\tstr.append(\"The letter for the latitude is neither N nor S.\");\n\t\t\t\t\tstr.append(\"\\nNote that latitude should come before longitude.\");\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame,\"The letter for the latitude is neither N nor S.\" + \n\t\t \t\t\t\"\\n Note that latitude should come before longitude\",\n \t\t\t\"GeoDis warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t \t\t//frame.dispose();\t\t\t\t\n\t\t\t\t\t\t//System.exit(0);\n\t\t\t\t\t\tthrow new ProgressionException(str.toString());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr.append(\"[GeoDis]\\n\");\n\t\t\t\t\t\tMediator.writeError(str.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tif (lon_coor.equalsIgnoreCase(\"E\"))\n\t\t\t\t\tLongitude[j] = dec_lon;\n\t\t\t\telse if (lon_coor.equalsIgnoreCase(\"W\"))\n\t\t\t\t\tLongitude[j] = -1.0 * dec_lon;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tStringBuffer str = new StringBuffer();\n\t\t\t\t\tstr.append(\"The letter for the longitude is neither E nor W.\");\n\t\t\t\t\tstr.append(\"\\nNote that latitude should come before longitude.\");\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame,\"The letter for the longitude is neither E nor W.\" + \n\t\t \t\t\t\"\\n See that latitude come first than longitude\",\n \t\t\t\"GeoDis warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t \t\t//frame.dispose();\t\t\t\t\n\t\t\t\t\t\t//System.exit(0);\n\t\t\t\t\t\tthrow new ProgressionException(str.toString());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr.append(\"[GeoDis]\\n\");\n\t\t\t\t\t\tMediator.writeError(str.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (locationName[i] == null || sampleSize[i] <= 0 || Latitude[j] > 90 || Latitude[j]< -90 || Longitude[j] < -180 || Longitude[j] > 180) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (locationName[i] == null)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nlocationName [i] == null\");\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (sampleSize[i] <= 0)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nsampleSize[i] <= 0\");\n\t\t\t\t\t}\n\n\t\t\t\tif (Latitude[j] > 90)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nLatitude[j] > 90\");\n\t\t\t\t\t}\n\n\t\t\t\tif (Latitude[j]< -90)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nLatitude[j]< -90\");\n\t\t\t\t\t}\n\n\t\t\t\tif (Longitude[j] < -180)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nLongitude[j] < -180\");\n\t\t\t\t\t}\n\n\t\t\t\tif (Longitude[j] > 180)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nLongitude[j] > 180\");\n\t\t\t\t\t}\n\n\t\t\t\tStringBuffer str = new StringBuffer();\n\t\t\t\tstr.append(\"There was an error reading the population description\");\n\t\t\t\tstr.append(\"\\nor its coordinates. If your coordinates are in decimal degrees, have you checked that box?\");\n\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\tJOptionPane.showMessageDialog(frame,\"There was an error reading the population description\" +\n\t\t\t\t\t\t\"\\nor its coordinates. If your coordinates are in decimal degrees, have you checked that box?\",\n \"GeoDis warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t//frame.dispose();\t\t\t\t\n\t\t\t\t\t//System.exit(0);\n\t\t\t\t\tthrow new ProgressionException(str.toString());\n\t\t\t\t} else {\n\t\t\t\t\tstr.append(\"[GeoDis]\\n\");\n\t\t\t\t\tMediator.writeError(str.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\tlogfile.print(\"\\nreading \" + locationName[j] + \" \" + sampleSize[j] + \" \");\n\t\t\tlogfile.printf(\" %6.4f\",Latitude[j]);\n\t\t\tlogfile.printf(\" %6.4f\",Longitude[j]);\n\t\t\t//System.err.println (locationName[j]);\n\t\t\t//System.err.println(sampleSize[j] + \" \" + Latitude[j] + \" \" + Longitude[j]);\t\t\t\n\t\t}\n\n\t \t/* TRANSFORM DEGREES TO RADIANS */\n\t\tfor(j = 0; j < numLocations; j++)\n\t\t{\n\t\t\tLatitude[j] *= D2R;\n\t\t\tLongitude[j] *= D2R;\n\t\t} \n\t\tlogfile.println(\"\\nOK\");\n\n \t}", "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "private static void readFileIntoArray (String inputFileName) {\n Path path = Paths.get(inputFileName);\n array = new int[countLines(inputFileName)];\n try {\n Scanner sc = new Scanner(path);\n int i = 0;\n while (sc.hasNextLine()) {\n array[i] = Integer.parseInt(sc.nextLine());\n i++;\n }\n sc.close();\n //sort the array\n MergeSort.mergeSort(array);\n }\n catch(FileNotFoundException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n catch(IOException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n }", "static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }", "public static void main(String[] args) throws IOException {\n\t\tString MUMmerFile = args[0];\n\t\tString ErrorFreeEPGAcontigFile = args[1];\n\t\tString SPAdescontigFile = args[2];\n\t\tString DataName = args[3];\n\t\tString FinalEPGAcontigPath = args[4];\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile = CommonClass.getFileLines(MUMmerFile);\n\t\tString MUMerArray[] = new String[SizeOfMUMmerFile];\n\t\tint RealSizeMUMmer = CommonClass.FileToArray(MUMmerFile, MUMerArray);\n\t\tSystem.out.println(\"The real size of MUMmer is:\" + RealSizeMUMmer);\n\t\t//Load Error Free EPGA.\n\t\tint SizeOfErrorFreeEPGAFile = CommonClass.getFileLines(ErrorFreeEPGAcontigFile);\n\t\tString ErrorFreeEPGAcontigArray[] = new String[SizeOfErrorFreeEPGAFile];\n\t\tint RealSizeErrorFreeEPGAcontig = CommonClass.FastaToArray(ErrorFreeEPGAcontigFile, ErrorFreeEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error Free EPGA assembly is:\" + RealSizeErrorFreeEPGAcontig);\n\t\t//Load SPAdes.\n\t\tint SizeOfSPAdesFile = CommonClass.getFileLines(SPAdescontigFile);\n\t\tString SPAdescontigArray[] = new String[SizeOfSPAdesFile];\n\t\tint RealSizeSPAdescontig = CommonClass.FastaToArray(SPAdescontigFile, SPAdescontigArray);\n\t\tSystem.out.println(\"The real size of SPAdes assembly is:\" + RealSizeSPAdescontig);\n\t\t//Process.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor (int w = 4; w < RealSizeMUMmer; w++) \n\t\t{\n\t\t\tString[] SplitLine1 = MUMerArray[w].split(\"\\t|\\\\s+\");\n\t\t\tif(SplitLine1.length==14 && (SplitLine1[13].equals(\"[CONTAINS]\") || SplitLine1[13].equals(\"[BEGIN]\") || SplitLine1[13].equals(\"[END]\")))\n\t\t\t{\n\t\t\t\tString[] SplitLine2 = SplitLine1[11].split(\"_\");\n\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine2[1]);\n\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t\tint EPGA_id = Integer.parseInt(SplitLine1[12]);\n\t\t\t\tSystem.out.println(\"SplitLine1[13]:\"+SplitLine1[13]+\"\\t\"+\"Spades:\"+SPAdes_id+\"\\t\"+\"epga:\"+EPGA_id);\n\t\t\t\tErrorFreeEPGAcontigArray[EPGA_id]=\"#\"+ErrorFreeEPGAcontigArray[EPGA_id];\t\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tfor (int w = 0; w < RealSizeErrorFreeEPGAcontig; w++) \n\t\t{\n\t\t\tif(ErrorFreeEPGAcontigArray[w].charAt(0)!='#')\n\t\t\t{\n\t\t\t\tFileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/ReplaceEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\" + ErrorFreeEPGAcontigArray[w] + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\t\tIterator<Integer> it = hashSet.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tint SPAdesIndex = it.next();\n\t\t\tFileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/ReplaceEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\twriter.write(\">Add:\" + (SPAdesIndex) + \"\\n\" + SPAdescontigArray[SPAdesIndex] + \"\\n\");\n\t\t\twriter.close();\n\t\t}\n\t\t//Free.\n\t\tMUMerArray=null;\n\t\tErrorFreeEPGAcontigArray=null;\n\t\tSPAdescontigArray=null;\n\t}", "public static void main(String args[]) {\n Scanner input = new Scanner(System.in);\n Scanner fileReader = null;\n String fileName = null;\n StudentQueue studentQueue = new StudentQueue();\n boolean run = true;\n\n System.out.println(\"Welcome to the Office Hours Simulation.\");\n\n while (run) {\n System.out.println(\"Please enter a file name: \");\n fileName = input.nextLine();\n File myText = new File(fileName);\n try {\n fileReader = new Scanner(myText);\n if (!validSpecs(myText)) {\n System.out.println(\"This file has invalid specifications.\");\n } run = false;\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Error 404 File not found!\");\n\n }\n }\n int[] courseNumbers = new int[numCourses];\n double[] arrProbility = new double[numCourses];\n Course[] courses = new Course[numCourses];\n BooleanSource[] bSources = new BooleanSource[numCourses];\n Helper[] helpers = new Helper[numTAs+1];\n helpers[0] = new Helper(true);\n\n System.out.println(\"File \" + fileName + \" loaded.\");\n\n curLine = fileReader.nextLine();\n curLine = fileReader.nextLine();\n curLine = curLine.substring(curLine.indexOf(\":\") + 1);\n //adds data to the Course object array with the names of the courses\n //adds data to the int array of course numbers\n String[] array = curLine.split(\" \");\n for (int i = 0; i < numCourses; i++) {\n courses[i] = new Course(0,0);\n courseNumbers[i] = 0;\n courses[i].setCourseNumber(Integer.parseInt(array[i]));\n courseNumbers[i] = Integer.parseInt(array[i]);\n }\n\n curLine = fileReader.nextLine();\n curLine = curLine.substring(curLine.indexOf(\":\") + 1);\n //adds data to the Course object array with the arrival probability of the courses\n //adds data to the arrProbility array and the BooleanSources array\n array = curLine.split(\" \");\n for (int i = 0; i < numCourses; i++) {\n courses[i].setArrivalProbability(Double.parseDouble(array[i]));\n arrProbility[i] = Double.parseDouble(array[i]);\n bSources[i] = new BooleanSource(Double.parseDouble(array[i]));\n }\n\n //take an array of all the courses and sort it and then add the difficulty to the course object\n Arrays.sort(courses);\n for (int i = 0; i < courses.length; i++) {\n courses[i].setCourseDifficulty(numCourses - (i + 1));\n }\n\n System.out.printf(\"%-10s%-13s\", \"Course\", \"Probability\");\n System.out.println();\n System.out.println(\"-----------------------\");\n for (int i = 0; i < numCourses; i++) {\n System.out.printf(\"%-10d%f\", courses[i].getCourseNumber(), courses[i].getArrivalProbability());\n System.out.println();\n }\n System.out.println(\"Number of TAs: \" + numTAs);\n System.out.println(\"Coffee cups: \" + numCups);\n System.out.println(\"Base time interval \" + minTime + \"-\" + maxTime + \" minutes.\");\n System.out.println(\"Time: \" + simTime + \" minutes.\");\n System.out.println(\"Begin simulation: \");\n System.out.println(\"__________________________________________________\");\n simulate(simTime, arrProbility, courses, minTime, maxTime, numCups, numTAs);\n }", "public NSMutableArray<Pair> formattedFiles()\n {\n if ( formattedFiles == null )\n {\n formattedFiles = new NSMutableArray<Pair>();\n Pair[] rawPairs = (Pair[])task.result();\n if (rawPairs != null && rawPairs.length > 0)\n {\n EOEditingContext taskContext =\n rawPairs[0].file.editingContext();\n try\n {\n taskContext.lock();\n for (int i = 0; i < rawPairs.length; i++)\n {\n Pair pair = new Pair();\n formattedFiles.addObject(pair);\n pair.file = rawPairs[i].file\n .localInstance(localContext());\n pair.html = rawPairs[i].html;\n }\n }\n finally\n {\n taskContext.unlock();\n }\n }\n task.resultNoLongerNeeded();\n }\n return formattedFiles;\n }", "protected abstract void readFile();", "private static boolean a(java.io.File r8, defpackage.edw r9) {\n /*\n r0 = 0\n r2 = 0\n long r4 = r8.length() // Catch:{ all -> 0x003c }\n r6 = 0\n int r1 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))\n if (r1 <= 0) goto L_0x0033\n r6 = 2147483647(0x7fffffff, double:1.060997895E-314)\n int r1 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))\n if (r1 >= 0) goto L_0x0033\n int r3 = (int) r4 // Catch:{ all -> 0x003c }\n byte[] r4 = new byte[r3] // Catch:{ all -> 0x003c }\n java.io.FileInputStream r1 = new java.io.FileInputStream // Catch:{ all -> 0x003c }\n r1.<init>(r8) // Catch:{ all -> 0x003c }\n L_0x001b:\n if (r0 >= r3) goto L_0x0025\n int r2 = r3 - r0\n int r2 = r1.read(r4, r0, r2) // Catch:{ all -> 0x0044 }\n int r0 = r0 + r2\n goto L_0x001b\n L_0x0025:\n r0 = 0\n defpackage.dmf.a(r9, r4, r0, r3) // Catch:{ all -> 0x0044 }\n L_0x0029:\n boolean r0 = r8.delete() // Catch:{ all -> 0x0044 }\n if (r1 == 0) goto L_0x0032\n r1.close()\n L_0x0032:\n return r0\n L_0x0033:\n r0 = 1\n java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0) // Catch:{ all -> 0x003c }\n r9.a = r0 // Catch:{ all -> 0x003c }\n r1 = r2\n goto L_0x0029\n L_0x003c:\n r0 = move-exception\n r1 = r2\n L_0x003e:\n if (r1 == 0) goto L_0x0043\n r1.close()\n L_0x0043:\n throw r0\n L_0x0044:\n r0 = move-exception\n goto L_0x003e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.chn.a(java.io.File, edw):boolean\");\n }", "@Test(timeout = 4000)\n public void test32() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n File file0 = fileUtil0.getASINFile(\"\", \"v<B(aXlp#d/?cL2Q??\", \"i@\", \"g_\");\n assertNull(file0);\n }", "public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.hasNextLine())\n {\n input.add(contacts.nextLine());\n }\n contacts.close();\n }\n }catch (Exception ex)\n {\n //debug(\"read file contents failure\");\n debug = \"test read failure\";\n }\n return input.toArray(new String[1]);\n }", "List readFile(String pathToFile);", "XfvhdlAntecedentMemFiles() {\r\n \t error = new XfvhdlError();\r\n \t }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.renameFile(\"\", \"d{0#Y4%ee!;Yw.9xr>V\");\n fileUtil0.downloadBrowseNodeFile(\"\", \"d{0#Y4%ee!;Yw.9xr>V\", \"d{0#Y4%ee!;Yw.9xr>V\", \"\");\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/R_VMO[__]'%9WQBNDWET<QJK.XML\");\n FileSystemHandling.appendLineToFile(evoSuiteFile0, \"4}~$2!H+!GA n\");\n fileUtil0.downloadKeywordSearchFile(\"'HhfAcFk9,$-jk-Y\", \"\", \"_m76\", \"FQKwgc<irS^!|aiNk S\");\n fileUtil0.downloadCart(\"\");\n fileUtil0.downloadBlendedSearchFile(\"Qqq3JV&a\", \"d{0#Y4%ee!;Yw.9xr>V\");\n fileUtil0.downloadGenericSearchFile(\"net.kencochrane.a4j.util.LoadProperties\", \"]'%9wqBNDWet<qjK\", \"\", \"d{0#Y4%ee!;Yw.9xr>V\", \"Qqq3JV&a\", (String) null);\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n arrayList0.add((Object) null);\n fileUtil0.downloadAccessoriesFile((String) null, arrayList0, \"\");\n fileUtil0.downloadBlendedSearchFile(\"'HhfAcFk9,$-jk-Y\", \"_m76\");\n fileUtil0.downloadSimilaritesFile(\"]'%9wqBNDWet<qjK\", \"ey\\\"(\\\"aT]CwLwd[\", \"ey\\\"(\\\"aT]CwLwd[\");\n fileUtil0.downloadThirdPartySearchFile(\"FQKwgc<irS^!|aiNk S\", \"'HhfAcFk9,$-jk-Y\", \"\", \"JBq\");\n fileUtil0.downloadAccessoriesFile(\"FQKwgc<irS^!|aiNk S\", arrayList0, \"d{0#Y4%ee!;Yw.9xr>V\");\n FileInputStream fileInputStream0 = fileUtil0.fetchBNFile(\"r_vmO[\", \"\", \"]'%9wqBNDWet<qjK\");\n assertEquals(14, fileInputStream0.available());\n }", "public static void readArray(String fileName, int[] newArray) throws Exception{\n\n // Create DataInputStream object to read from binary file.\n // Use fileName from demo file and read into newArray in demo file.\n DataInputStream input = new DataInputStream(new FileInputStream(fileName));\n\n // Create boolean variable to determine End Of File\n boolean EOF = false;\n\n // While it's not the End Of File\n while(!EOF){\n\n // Try Catch Statement\n try{\n\n // for Loop to go through each integer in the binary file\n for(int i = 0; i < newArray.length; i++){\n\n // read the number and place it in the newArray\n newArray[i] = input.readInt();\n }\n }catch(EOFException e){ // Catch clause to find end of file\n // Change EOF to True\n EOF = true;\n }\n\n }\n // Close the file\n input.close();\n }", "public static int[] buildArray() throws IOException {\r\n\r\n //Variable initializations\r\n int[] intArray = {};\r\n int sumOfElements = 0;\r\n int index = 0;\r\n \r\n //Initialization of File and Scanner objects\r\n \r\n File sumOfIntegers = new File(fileInput);\r\n Scanner elementScanner = new Scanner(sumOfIntegers);\r\n\r\n //Loop that increases the num of array elements by 1 every time\r\n //it acknowledges an integer value within the file and subtracts\r\n //1 from the array elements when the sentinel value is reached.\r\n while (elementScanner.hasNextInt()) {\r\n sumOfElements++;\r\n \r\n \r\n //Assign next int scanner method to x variable\r\n //Used to process if boolean condition\r\n int x = elementScanner.nextInt();\r\n\r\n //When -999 sentinel value is reached reduce num of array elements\r\n //by 1 since we do not want it included\r\n if (x == -999) {\r\n sumOfElements = sumOfElements - 1;\r\n intArray = new int[sumOfElements];\r\n }\r\n //Assign sumOfElements as num of array elements\r\n intArray = new int[sumOfElements]; \r\n\r\n }\r\n\r\n //new scanner to reset abstract cursor of file\r\n elementScanner = new Scanner(sumOfIntegers);\r\n for (index = 0; index < sumOfElements; index++) {\r\n int x = elementScanner.nextInt();\r\n\r\n if (x != -999) {\r\n intArray[index] = x;\r\n }\r\n\r\n }\r\n\r\n //Closes the file/scanner\r\n elementScanner.close();\r\n\r\n return intArray;\r\n }", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/A_X-0;;JLT_;1IJDVA.XML\");\n FileSystemHandling.createFolder(evoSuiteFile0);\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n File file0 = fileUtil0.getAccessories(\"X-0;;JLT_;1iJdvA\", arrayList0);\n assertNotNull(file0);\n assertTrue(file0.canWrite());\n assertEquals(\"A_X-0;;JLT_;1IJDVA.XML\", file0.getName());\n }", "protected void initFile(String id) throws FormatException, IOException {\n super.initFile(id);\n in = new RandomAccessInputStream(id);\n\n String endian = in.readString(2);\n boolean little = endian.equals(\"II\");\n in.order(little);\n\n in.seek(98);\n int seriesCount = in.readInt();\n\n in.seek(192);\n while (in.read() == 0);\n String description = in.readCString();\n addGlobalMeta(\"Description\", description);\n\n while (in.readInt() == 0);\n\n long fp = in.getFilePointer();\n if ((fp % 2) == 0) fp -= 4;\n else fp--;\n\n offsets = new long[seriesCount];\n core = new CoreMetadata[seriesCount];\n for (int i=0; i<seriesCount; i++) {\n in.seek(fp + i*256);\n core[i] = new CoreMetadata();\n core[i].littleEndian = little;\n core[i].sizeX = in.readInt();\n core[i].sizeY = in.readInt();\n int numBits = in.readInt();\n core[i].sizeC = in.readInt();\n core[i].sizeZ = in.readInt();\n core[i].sizeT = in.readInt();\n\n core[i].imageCount = core[i].sizeZ * core[i].sizeC * core[i].sizeT;\n int nBytes = numBits / 8;\n core[i].pixelType =\n FormatTools.pixelTypeFromBytes(nBytes, false, nBytes == 8);\n\n core[i].dimensionOrder = \"XYCZT\";\n core[i].rgb = false;\n\n in.skipBytes(4);\n\n long pointer = in.getFilePointer();\n String name = in.readCString();\n\n if (i == 0) {\n in.skipBytes((int) (92 - in.getFilePointer() + pointer));\n while (true) {\n int check = in.readInt();\n if (check > in.getFilePointer()) {\n offsets[i] = (long) check + LUT_SIZE;\n break;\n }\n in.skipBytes(92);\n }\n }\n else {\n offsets[i] = offsets[i - 1] + core[i - 1].sizeX * core[i - 1].sizeY *\n core[i - 1].imageCount *\n FormatTools.getBytesPerPixel(core[i - 1].pixelType);\n }\n offsets[i] += 352;\n in.seek(offsets[i]);\n while (in.getFilePointer() + 116 < in.length() && in.read() == 3 &&\n in.read() == 37)\n {\n in.skipBytes(114);\n offsets[i] = in.getFilePointer();\n }\n in.seek(in.getFilePointer() - 1);\n byte[] buf = new byte[3 * 1024 * 1024];\n int n = in.read(buf, 0, 1);\n boolean found = false;\n while (!found && in.getFilePointer() < in.length()) {\n n += in.read(buf, 1, buf.length - 1);\n for (int q=0; q<buf.length - 1; q++) {\n if ((buf[q] & 0xff) == 192 && (buf[q + 1] & 0xff) == 46) {\n offsets[i] = in.getFilePointer() - n + q;\n found = true;\n break;\n }\n }\n buf[0] = buf[buf.length - 1];\n n = 1;\n }\n if (found) offsets[i] += 16063;\n if (i == offsets.length - 1 && !compressed && i > 0) {\n offsets[i] = (int) (in.length() -\n (core[i].sizeX * core[i].sizeY * core[i].imageCount * (numBits / 8)));\n }\n }\n\n MetadataStore store = makeFilterMetadata();\n MetadataTools.populatePixels(store, this);\n MetadataTools.setDefaultCreationDate(store, id, 0);\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"Error in readFilej) : \");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"Error in readFilej) : \";\n stringArray0[5] = \"\";\n EvoSuiteFile evoSuiteFile1 = new EvoSuiteFile(\"QZkj>P.|?`(ZTS\");\n FileSystemHandling.appendLineToFile(evoSuiteFile1, \"\");\n FileSystemHandling.appendStringToFile(evoSuiteFile1, \"\");\n stringArray0[7] = \"\";\n stringArray0[8] = \"\";\n StringReader stringReader0 = new StringReader(\"\");\n char[] charArray0 = new char[2];\n charArray0[0] = 'u';\n charArray0[1] = ']';\n stringReader0.read(charArray0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n JSJshop jSJshop0 = new JSJshop(\"QZkj>P.|?`(ZTS\", \"Error in readFilej) : \");\n JSTasks jSTasks0 = null;\n try {\n jSTasks0 = new JSTasks(streamTokenizer0);\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSTasks\", e);\n }\n }", "private void readBinary(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t////@ open [1/2]valid(); // auto\r\n\t\t// check if access to this file is allowed\r\n\t\tif (!fileAccessAllowed(READ_BINARY))\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// use P1 and P2 as offset\r\n\t\tshort offset = Util.makeShort(buffer[ISO7816.OFFSET_P1], buffer[ISO7816.OFFSET_P2]);\r\n\t\tif (offset < 0)\r\n\t\t\tISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);\r\n\t\t// inform the JCRE that the applet has data to return\r\n\t\tshort le = apdu.setOutgoing();\r\n\t\t// impossible to start reading from offset large than size of file\t\t\t\t\r\n\t\tif (selectedFile == masterFile)\r\n\t\t\tISOException.throwIt(ISO7816.SW_FILE_INVALID); //~allow_dead_code Dead because fileAccessAllowed() checks that selectedFile instanceof ElementaryFile and masterFile is not an ElementaryFile.\r\n\t\t//@ open selected_file_types(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _);\r\n\t\tshort size = ((ElementaryFile) selectedFile).getCurrentSize();\r\n\t\tif (offset > size)\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t// number of bytes in file starting from offset\r\n\t\tshort remaining = (short) (size - offset);\r\n\t\tif (le == 0) {\r\n\t\t\tif (remaining < 256) {\r\n\t\t\t\t// wrong Le field\r\n\t\t\t\t// SW2 encodes the exact number of available data bytes\r\n\t\t\t\tshort sw = (short) (ISO7816.SW_CORRECT_LENGTH_00 | remaining);\r\n\t\t\t\tISOException.throwIt(sw);\r\n\t\t\t} else\r\n\t\t\t\t// Le = 0 is interpreted as 256 bytes\r\n\t\t\t\tle = 256;\r\n\t\t}\r\n\t\t// only read out the remaining bytes\r\n\t\tif (le > remaining) {\r\n\t\t\tle = remaining;\r\n\t\t}\r\n\t\t// set the actual number of outgoing data bytes\r\n\t\tapdu.setOutgoingLength(le);\r\n\t\t// write selected file in APDU\r\n\t\t//VF bug; was apdu.sendBytesLong(((ElementaryFile) selectedFile).getData(), offset, le);\r\n\t\t//VF probleem: originele lijn was apdu.sendBytesLong(ef.getData(), offset, le);\r\n\t\t// het probleem hiermee is dat de getData()-methode een ElementaryFile nodig heeft, en dat\r\n\t\t// sendBytesLong vereist dat het resultaat niet null is. De niet-null vereiste zit geencodeerd\r\n\t\t// in ElementaryFile, dus als je dat predicaat opent, dan weet VF dat de data niet-null is, maar\r\n\t\t// dan werkt de call op getData niet. Als je de ElementaryFile gesloten laat, dan lukt de call naar\r\n\t\t// getData, maar weet je niet dat het niet-null is.\r\n\t\tElementaryFile ef = (ElementaryFile)selectedFile;\r\n\t\tbyte[] bf = ef.getData();\r\n\t\t//@ open [1/2]ef.ElementaryFile(?d1, ?d2, ?d3, ?d4, ?d5, ?info); // hard to eliminate\r\n\t\tapdu.sendBytesLong(bf, offset, le);\r\n\t\t////@ close [1/2]ef.ElementaryFile(d1, d2, d3, d4, d5, info); // auto\r\n\t\t////@ close [1/2]valid(); // auto\r\n\t}", "private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/A_X-0;;JLT_;1IJDVA.XML\");\n byte[] byteArray0 = new byte[5];\n FileSystemHandling.appendDataToFile(evoSuiteFile0, byteArray0);\n FileUtil fileUtil0 = new FileUtil();\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n File file0 = fileUtil0.getAccessories(\"X-0;;JLT_;1iJdvA\", arrayList0);\n assertEquals(5L, file0.length());\n assertNotNull(file0);\n }", "private void m20202a(boolean checkCache) throws IOException {\n C8469e nextSpan;\n C8489j nextDataSpec;\n C8469e nextSpan2;\n C8487i nextDataSource;\n long length;\n long length2;\n if (this.f18665u) {\n nextSpan = null;\n } else if (this.f18651g) {\n try {\n nextSpan = this.f18645a.mo25946c(this.f18660p, this.f18661q);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n throw new InterruptedIOException();\n }\n } else {\n nextSpan = this.f18645a.mo25944b(this.f18660p, this.f18661q);\n }\n if (nextSpan == null) {\n nextDataSource = this.f18648d;\n Uri uri = this.f18656l;\n int i = this.f18658n;\n long j = this.f18661q;\n C8489j jVar = new C8489j(uri, i, null, j, j, this.f18662r, this.f18660p, this.f18659o);\n nextDataSpec = jVar;\n nextSpan2 = nextSpan;\n } else if (nextSpan.f18671d) {\n Uri fileUri = Uri.fromFile(nextSpan.f18672e);\n long filePosition = this.f18661q - nextSpan.f18669b;\n long length3 = nextSpan.f18670c - filePosition;\n long j2 = this.f18662r;\n if (j2 != -1) {\n length2 = Math.min(length3, j2);\n } else {\n length2 = length3;\n }\n C8489j nextDataSpec2 = new C8489j(fileUri, this.f18661q, filePosition, length2, this.f18660p, this.f18659o);\n nextDataSource = this.f18646b;\n nextDataSpec = nextDataSpec2;\n nextSpan2 = nextSpan;\n } else {\n if (nextSpan.mo25963f()) {\n length = this.f18662r;\n } else {\n length = nextSpan.f18670c;\n long j3 = this.f18662r;\n if (j3 != -1) {\n length = Math.min(length, j3);\n }\n }\n Uri uri2 = this.f18656l;\n int i2 = this.f18658n;\n long j4 = this.f18661q;\n nextDataSpec = new C8489j(uri2, i2, null, j4, j4, length, this.f18660p, this.f18659o);\n if (this.f18647c != null) {\n nextSpan2 = nextSpan;\n nextDataSource = this.f18647c;\n } else {\n C8487i nextDataSource2 = this.f18648d;\n this.f18645a.mo25939a(nextSpan);\n nextSpan2 = null;\n nextDataSource = nextDataSource2;\n }\n }\n this.f18667w = (this.f18665u || nextDataSource != this.f18648d) ? Long.MAX_VALUE : this.f18661q + 102400;\n if (checkCache) {\n C8514e.m20490b(m20206c());\n if (nextDataSource != this.f18648d) {\n try {\n m20204b();\n } catch (Throwable th) {\n Throwable e2 = th;\n if (nextSpan2.mo25962e()) {\n this.f18645a.mo25939a(nextSpan2);\n }\n throw e2;\n }\n } else {\n return;\n }\n }\n if (nextSpan2 != null && nextSpan2.mo25962e()) {\n this.f18663s = nextSpan2;\n }\n this.f18654j = nextDataSource;\n this.f18655k = nextDataSpec.f18720g == -1;\n long resolvedLength = nextDataSource.mo25917a(nextDataSpec);\n C8475k mutations = new C8475k();\n if (this.f18655k && resolvedLength != -1) {\n this.f18662r = resolvedLength;\n C8474j.m20259a(mutations, this.f18661q + this.f18662r);\n }\n if (m20208e()) {\n this.f18657m = this.f18654j.getUri();\n if (true ^ this.f18656l.equals(this.f18657m)) {\n C8474j.m20260a(mutations, this.f18657m);\n } else {\n C8474j.m20258a(mutations);\n }\n }\n if (m20209f()) {\n this.f18645a.mo25942a(this.f18660p, mutations);\n }\n }", "void readData(String fileName){ \r\n\t\ttry{ \r\n\t\t\tScanner sc = new Scanner(new File(fileName), \"UTF-8\");\r\n\t\t\t\r\n\t\t\t// input grid dimensions and simulation duration in timesteps\r\n\t\t\tdimt = sc.nextInt();\r\n\t\t\tdimx = sc.nextInt(); \r\n\t\t\tdimy = sc.nextInt();\r\n\t\t\t//System.out.println(dimt+\" \"+dimx + \" \"+dimy);\r\n\t\t\t// initialize and load advection (wind direction and strength) and convection\r\n\t\t\tadvection = new Vector[dimt][dimx][dimy];\r\n\t\t\tconvection = new float[dimt][dimx][dimy];\r\n\t\t\tfor(int t = 0; t < dimt; t++)\r\n\t\t\t\tfor(int x = 0; x < dimx; x++)\r\n\t\t\t\t\tfor(int y = 0; y < dimy; y++){\r\n\t\t\t\t\t\tadvection[t][x][y] = new Vector();\r\n\t\t\t\t\t\tadvection[t][x][y].x = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\tadvection[t][x][y].y = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\tconvection[t][x][y] = Float.parseFloat(sc.next());\r\n\t\t\t\t\t\t//System.out.println(advection[t][x][y].x+\" \"+advection[t][x][y].y + \" \"+convection[t][x][y]);\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\tclassification = new int[dimt][dimx][dimy];\r\n\t\t\tsc.close(); \r\n\t\t} \r\n\t\tcatch (IOException e){ \r\n\t\t\tSystem.out.println(\"Unable to open input file \"+fileName);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch (InputMismatchException e){ \r\n\t\t\tSystem.out.println(\"Malformed input file \"+fileName);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static INodeFile[] verifySrcFiles(FSDirectory fsd, String[] srcs,\n INodesInPath targetIIP, FSPermissionChecker pc) throws IOException {\n Set<INodeFile> si = new LinkedHashSet<>();\n final INodeFile targetINode = targetIIP.getLastINode().asFile();\n final INodeDirectory targetParent = targetINode.getParent();\n // now check the srcs\n for (String src : srcs) {\n final INodesInPath iip = fsd.getINodesInPath4Write(src);\n // permission check for srcs\n if (pc != null) {\n fsd.checkPathAccess(pc, iip, FsAction.READ); // read the file\n fsd.checkParentAccess(pc, iip, FsAction.WRITE); // for delete\n }\n\n final INode srcINode = iip.getLastINode();\n final INodeFile srcINodeFile = INodeFile.valueOf(srcINode, src);\n // make sure the src file and the target file are in the same dir\n if (srcINodeFile.getParent() != targetParent) {\n throw new HadoopIllegalArgumentException(\"Source file \" + src\n + \" is not in the same directory with the target \"\n + targetIIP.getPath());\n }\n // source file cannot be the same with the target file\n if (srcINode == targetINode) {\n throw new HadoopIllegalArgumentException(\"concat: the src file \" + src\n + \" is the same with the target file \" + targetIIP.getPath());\n }\n\n if(srcINodeFile.getStoragePolicyID() == HdfsConstants.DB_STORAGE_POLICY_ID) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is stored in DB.\");\n }\n\n // source file cannot be under construction or empty\n if(srcINodeFile.isUnderConstruction() || srcINodeFile.numBlocks() == 0) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is invalid or empty or underConstruction\");\n }\n // source file's preferred block size cannot be greater than the target\n // file\n if (srcINodeFile.getPreferredBlockSize() >\n targetINode.getPreferredBlockSize()) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" has preferred block size \" + srcINodeFile.getPreferredBlockSize()\n + \" which is greater than the target file's preferred block size \"\n + targetINode.getPreferredBlockSize());\n }\n si.add(srcINodeFile);\n }\n \n // make sure no two files are the same\n if (si.size() < srcs.length) {\n // it means at least two files are the same\n throw new HadoopIllegalArgumentException(\n \"concat: at least two of the source files are the same\");\n }\n return si.toArray(new INodeFile[si.size()]);\n }", "public static void getListOfAllFileVarianta2() {\n\t\tPath pathToSrc = Paths.get(\"D:\\\\TorrentsMd\");\r\n\t\ttry {\r\n\t\t\t//cu method references\r\n//\t\t\tFiles.walk(pathToSrc)\r\n//\t\t\t\t.map(Path::toFile)\r\n//\t\t\t\t.filter(File::isFile)\r\n//\t\t\t\t.map(File::getName)\r\n//\t\t\t\t.sorted()\r\n//\t\t\t\t.forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t//cu lambda, dar dpdv semantic sunt identice\r\n\t\t\tFiles.walk(pathToSrc)\r\n\t\t\t\t .map(path -> path.toFile()) //trasnform fiecare Path din stream intr-un File\r\n\t\t\t\t .filter(file -> file.isFile()) //filtrez doar fisierele\r\n\t\t\t\t .map(file -> file.getName())//transform fiecare File din stream intr-un String, care e numele sau\r\n\t\t\t\t .sorted()\r\n\t\t\t\t .forEach(file -> System.out.println(file));\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"Error in readFilej) : \";\n stringArray0[5] = \"\";\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"QZkj>P.|?`(ZTS\");\n FileSystemHandling.appendLineToFile(evoSuiteFile0, \"\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"\");\n stringArray0[7] = \"\";\n stringArray0[8] = \"\";\n StringReader stringReader0 = new StringReader(\"\");\n char[] charArray0 = new char[2];\n charArray0[0] = 'u';\n charArray0[1] = ']';\n stringReader0.read(charArray0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n JSJshop jSJshop0 = null;\n try {\n jSJshop0 = new JSJshop(\"QZkj>P.|?`(ZTS\", \"Error in readFilej) : \");\n fail(\"Expecting exception: System.SystemExitException\");\n \n } catch(System.SystemExitException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.evosuite.runtime.System\", e);\n }\n }", "private File[] arrayDosArquivos() {\r\n\t\tFile file = new File(CAMINHO);\r\n\t\tfile.mkdirs();\r\n\t\treturn file.listFiles();\r\n\t}", "private boolean readFile(String fileName) {\n Message msg = new Message();\n FileInputStream fis;\n InputStreamReader isr;\n BufferedReader br;\n int depCount = 0;\n int depIndex = 0;\n float xIndex = 0;\n float yIndex = 0;\n int dist = 0;\n int capacity = 0;\n File file = new File(fileName);\n\n try {\n //open the requested file\n fis = new FileInputStream(file);\n isr = new InputStreamReader(fis);\n br = new BufferedReader(isr);\n } catch (Exception e) {\n System.err.println(\"File is not present \" + file);\n\n return false;\n }\n\n String line;\n StringTokenizer st = null;\n\n try {\n br.readLine(); // skip text labels\n line = br.readLine(); // depot constraints\n st = new StringTokenizer(line);\n\n // skip text labels\n br.readLine();\n } catch (IOException ex) {\n System.err.println(\"Error reading depot file: \" + fileName + \": \" +\n ex);\n }\n\n try {\n depCount = Integer.parseInt(st.nextToken().trim());\n dist = Integer.parseInt(st.nextToken().trim());\n capacity = Integer.parseInt(st.nextToken().trim());\n } catch (NumberFormatException ex) {\n System.err.println(\"Error processing depot constraint info: \" + ex);\n }\n\n //process depots\n for (int i = 0; i < depCount; i++) {\n try {\n line = br.readLine();\n st = new StringTokenizer(line);\n } catch (IOException ex) {\n System.err.println(\"Error reading depot file: \" + fileName +\n \": \" + ex);\n }\n\n //read the depot information\n try {\n depIndex = Integer.parseInt(st.nextToken().trim());\n xIndex = Float.parseFloat(st.nextToken().trim());\n yIndex = Float.parseFloat(st.nextToken().trim());\n } catch (NumberFormatException ex) {\n System.err.println(\"Error processing depot coordinate info: \" +\n ex);\n }\n\n // build the message\n msg.addArgument(IndexTag, \"\" + depIndex);\n msg.addArgument(XCoordTag, \"\" + xIndex);\n msg.addArgument(YCoordTag, \"\" + yIndex);\n }\n\n //save max distance and capacity\n if (dist == 0) { //if no max distance, set to a large number...\n dist = 999999999;\n }\n\n if (capacity == 0) { //if there is no maximum capacity, set it to a very large number\n capacity = 999999999;\n }\n\n // build the message\n msg.addArgument(NumberOfDepotsTag, \"\" + depCount);\n msg.addArgument(MaxCapacityTag, \"\" + capacity);\n msg.addArgument(MaxDistanceTag, \"\" + dist);\n msg.addArgument(FileNameTag, fileName);\n\n zAdapt.setProblemConstraints(msg);\n\n return true;\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n File file0 = fileUtil0.getAccessories(\"YP=8V~@ch)3vts}p8\", arrayList0);\n assertNull(file0);\n }", "private boolean readSym(String filePath) throws FileNotFoundException {\n Scanner fileScan;\n int numSymbols = 0;\n try {\n fileScan = new Scanner(new FileReader(filePath + \".sym\"));\n while (fileScan.hasNextLine()) {\n fileScan.nextLine();\n numSymbols++;\n }\n fileScan.close();\n symbols = new String[numSymbols];\n addresses = new int[numSymbols];\n fileScan = new Scanner(new FileReader(filePath + \".sym\"));\n for (int i = 0; i < symbols.length; i++) {\n symbols[i] = fileScan.next();\n addresses[i] = fileScan.nextInt();\n }\n fileScan.close();\n } catch (IOException ex) {\n print(filePath + \".sym not found\");\n return true;\n }\n return false;\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.downloadBrowseNodeFile(\">RY@\\\"d8cDm4\", \"gIeuBfO{y#\", \"\", \">RY@\\\"d8cDm4\");\n fileUtil0.fetchThirdPartySearchFile(\"net.kencochrane.a4j.file.FileUtil\", \"g!n_C$F8\\\"D4 e)e\", \"b_\", \"net.kencochrane.a4j.file.FileUtil\");\n ArrayList<Integer> arrayList0 = new ArrayList<Integer>();\n Integer integer0 = new Integer((-977));\n arrayList0.add(integer0);\n fileUtil0.cacheDir = \"\";\n fileUtil0.fetchAccessories(\"\", arrayList0);\n fileUtil0.getBrowseNodeFile(\"\", \"\", \"\");\n fileUtil0.downloadCart(\"4[EG]r,0beUTj1 \");\n FileInputStream fileInputStream0 = fileUtil0.fetchBlendedSearchFile(\"4[EG]r,0beUTj1 \", \"\");\n assertNull(fileInputStream0);\n }", "public void creat() throws Exception{\n\t\n\t\tString filePath = new File(\"\").getAbsolutePath();\n\t\t// read file Q(i,j) \n\t\t Scanner sc = new Scanner(new BufferedReader(new FileReader(filePath+\"/src/planningoptimization115657k62/daohoainam/Q.txt\")));\n\t\t while(sc.hasNextLine()) {\n\t\t \t Q = new int[N][M];\n\t\t for (int i = 0; i < Q.length; i++) {\n\t\t String[] line = sc.nextLine().trim().split(\" \");\n\t\t for (int j = 0; j < line.length; j++) {\n\t\t Q[i][j] = Integer.parseInt(line[j]);\n\t\t }\n\t\t }\n\t\t }\n\t\t sc.close();\n\t\t \n\t\t // read file d(i, j)\n\t\t d = new int[M+1][M+1];\n\t\t Scanner sc_d = new Scanner(new BufferedReader(new FileReader(filePath+\"/src/planningoptimization115657k62/daohoainam/distance.txt\")));\n\t\t while(sc_d.hasNextLine()) {\n\t\t for (int i = 0; i < d.length; i++) {\n\t\t String[] line = sc_d.nextLine().trim().split(\" \");\n\t\t for (int j = 0; j < line.length; j++) {\n\t\t d[i][j] = Integer.parseInt(line[j]);\n\t\t }\n\t\t }\n\t\t }\n\t\t sc_d.close();\n\t\t \n\t\t // read file q(k)\n\t\t q = new int[N];\n\t\t Scanner sc_q = new Scanner(new File(filePath+\"/src/planningoptimization115657k62/daohoainam/need.txt\"));\n\t\t int i = 0;\n\t\t while(sc_q.hasNextInt()){\n\t\t q[i++] = sc_q.nextInt();\n\t\t }\n\t\t sc_q.close();\n\t}", "private void readGraphsFromFiles() {\n\n\n \t\ttry {\t\n\t\t\t// where to find SN files\n\t\t\tString fileName = \"./networks/SN_20000\";\n\t\t\tint numberSNs = 5;\n\t\t\t\n\t\t\t// TODO CHANGE! IT IS JUST FOR TESTING. OUT OF MEMORY\n\t\t\tfileNamesGraphs = new String[numberSNs];\n\t\t\tfileNamesGraphs [0]= fileName + \"_0.001.dgs\";\n\t\t\tfileNamesGraphs [1]= fileName + \"_0.002.dgs\";\n\t\t\tfileNamesGraphs [2]= fileName + \"_0.003.dgs\";\n\t\t\tfileNamesGraphs [3]= fileName + \"_0.004.dgs\";\n\t\t\tfileNamesGraphs [4]= fileName + \"_0.005.dgs\";\n\t\t\t//files [5]= fileName + \"_0.001.dgs\";\n\t\t\t//files [6]= fileName + \"_0.001.dgs\";\n\t\t\t//files [7]= fileName + \"_0.001.dgs\";\n\t\t\t//files [8]= fileName + \"_0.001.dgs\";\n\t\t\t//files [9]= fileName + \"_0.001.dgs\";\n\n\t long time1 = System.currentTimeMillis( );\n\n\t\t\t// first create a list of Graphs\n\t\t\tthis.graphsFromFiles = new ArrayList<Graph>();\t\n\t\t\t\n\t\t\tfor (int i = 0; i < numberSNs; i++) {\n\t\t\t\tGraph graphFromFile;\n\t\t\t\tgraphFromFile = new SingleGraph(\"SN\" + i);\n\t\t\t\tthis.graphsFromFiles.add(graphFromFile);\n\t\t\t}\n\t\t\n\t\t\tFileSourceDGS fileSource = new FileSourceDGS();\n\t\t\t\t\t\n\t\t\tfor (int i = 0; i < numberSNs; i++) {\n\t\t\t\tfileSource.addSink(this.graphsFromFiles.get(i));\t\t\t\t\n\t\t\t\tfileSource.readAll(fileNamesGraphs[i]);\n\t\t\t\tfileSource.removeSink(this.graphsFromFiles.get(i));\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tlong time2 = System.currentTimeMillis( );\n\t\t\tSystem.out.println(\"readGraphsFromFiles: \" + (double)(time2 - time1)/1000 \n\t\t\t\t\t+ \"s for reading the SN files\");\n\t \n\t\t\t\n\t\t} catch (IOException e) {\n\t\t \tSystem.out.println(\"Error when reading SN files\");\n\t\t}\n\t\t\t\t\t\n\t}", "private void readFileList() throws IOException {\n\t\tint entries = metadataFile.readInt();\n\n\t\tfor (int i = 0; i < entries; i++) {\n\t\t\tint hash = metadataFile.readInt();\n\t\t\tlong dataOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tlong dataSize = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathListIndex = metadataFile.readInt();\n\n\t\t\tlong position = metadataFile.getPosition();\n\t\t\tmetadataFile.setPosition(pathListOffset + 8 + (pathListIndex * 8));\n\n\t\t\tlong pathOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathSize = metadataFile.readInt();\n\n\t\t\tmetadataFile.setPosition(pathListOffset + pathOffset);\n\t\t\tString path = metadataFile.readString(pathSize).trim();\n\n\t\t\tif (hash == hash(path)) \n\t\t\t\tfileEntries.add(new RAFFileEntry(dataOffset, dataSize, path));\n\t\t\telse\n\t\t\t\tthrow new IOException(\"Invalid hash for item '\" + path + \"'.\");\n\n\t\t\tmetadataFile.setPosition(position);\n\t\t}\n\t}" ]
[ "0.64370394", "0.61791766", "0.6130725", "0.5985025", "0.59672976", "0.5811364", "0.5805575", "0.5803846", "0.5700143", "0.56903654", "0.5681623", "0.56713545", "0.5661464", "0.5638676", "0.56114304", "0.5596005", "0.55900735", "0.5572667", "0.55671567", "0.5557443", "0.5541791", "0.5535632", "0.5534226", "0.55208594", "0.55143833", "0.5492001", "0.54865634", "0.5486189", "0.54613376", "0.54526335", "0.54524916", "0.545118", "0.54468215", "0.5431609", "0.5426093", "0.5425016", "0.5423271", "0.5416013", "0.5415979", "0.5414849", "0.5414089", "0.5406405", "0.540045", "0.5398118", "0.5394767", "0.5394407", "0.5383829", "0.53756654", "0.5373992", "0.5371904", "0.536336", "0.5342878", "0.53413886", "0.5336251", "0.53319985", "0.533047", "0.53286546", "0.5323181", "0.53203076", "0.5292561", "0.52924216", "0.52905893", "0.5288926", "0.52848524", "0.5284803", "0.52832276", "0.52809024", "0.52778757", "0.5277245", "0.52761877", "0.5271669", "0.52709055", "0.5269369", "0.52609557", "0.52575856", "0.52399063", "0.5228555", "0.5222422", "0.52196443", "0.5215774", "0.52122563", "0.52105165", "0.5210308", "0.5209928", "0.5207495", "0.5206432", "0.51995635", "0.5195467", "0.51947135", "0.5190111", "0.5186877", "0.5185474", "0.51782197", "0.51697934", "0.51691246", "0.5163833", "0.51628935", "0.5162571", "0.51566154", "0.5154398", "0.5153334" ]
0.0
-1
/ To convert the InputStream to String we use the BufferedReader.readLine() method. We iterate until the BufferedReader return null which means there's no more data to read. Each line will appended to a StringBuilder and returned as String.
private static String convertStreamToString(InputStream is) { InputStreamReader isr = new InputStreamReader(is); BufferedReader reader = new BufferedReader(isr); StringBuilder sb = new StringBuilder(); String line = null; try { while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } } catch (IOException e) { Log.e(TAG, e.getMessage(), e); } finally { try { reader.close(); } catch (IOException e) { Log.w(TAG, e.getMessage(), e); } try { isr.close(); } catch (IOException e) { Log.w(TAG, e.getMessage(), e); } } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private StringBuilder inputStreamToString(InputStream is) {\n \t String line = \"\";\n \t StringBuilder total = new StringBuilder();\n \t \n \t // Wrap a BufferedReader around the InputStream\n \t BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n \n \t // Read response until the end\n \t try {\n \t\t\twhile ((line = rd.readLine()) != null) { \n \t\t\t total.append(line); \n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t \n \t // Return full string\n \t return total;\n \t}", "private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }", "private static String getStringFromInputStream(InputStream is) {\r\n\r\n BufferedReader br = null;\r\n StringBuilder sb = new StringBuilder();\r\n\r\n String line;\r\n try {\r\n\r\n br = new BufferedReader(new InputStreamReader(is));\r\n while ((line = br.readLine()) != null) {\r\n sb.append(line);\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n if (br != null) {\r\n try {\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n return sb.toString();\r\n\r\n }", "public String getStringFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n } finally {\n try {\n br.close();\n } catch (Exception e) {\n }\n br = null;\n return sb.toString();\n }\n }", "private StringBuilder inputStreamToString(InputStream is) {\n String rLine = \"\";\n StringBuilder answer = new StringBuilder();\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\n try {\n while ((rLine = br.readLine()) != null) {\n answer.append(rLine);\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return answer;\n }", "private static String readFromStream(InputStream inputStream) throws IOException {\n\n // Create a new empty string builder\n StringBuilder stringBuilder = new StringBuilder();\n\n // Create a bufferedReader that reads from the inputStream param\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream,\n Charset.forName(\"UTF-8\")));\n\n // Create a string that is one line of the buffered reader\n String line = bufferedReader.readLine();\n\n while (line != null) {\n // Add line to stringBuilder\n stringBuilder.append(line);\n\n // Set line to the next line in buffered reader\n line = bufferedReader.readLine();\n }\n\n // Return string builder as a string\n return stringBuilder.toString();\n }", "private static String readIt(InputStream stream) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(stream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return sb.toString();\n\t}", "public static String getStringFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return sb.toString();\n }", "private String read(InputStream in) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(in), 1000);\n for (String line = r.readLine(); line != null; line = r.readLine()) {\n sb.append(line);\n }\n in.close();\n return sb.toString();\n }", "private String streamToString(InputStream is) throws IOException {\n String str = \"\";\n \n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n \n try {\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is));\n \n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n \n reader.close();\n } finally {\n is.close();\n }\n \n str = sb.toString();\n }\n \n return str;\n }", "private static String read(InputStream in) throws IOException {\n StringBuilder builder = new StringBuilder();\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String line = null;\n while ((line = reader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n }", "private String readStream(InputStream in) throws IOException {\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder sb = new StringBuilder();\n String line;\n\n // Reads every line and stores them in sb.\n while((line = r.readLine()) != null) {\n sb.append(line);\n }\n\n // Closes the input stream.\n in.close();\n\n return sb.toString();\n }", "public static String inputStreamToString(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n\n return null;\n\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return sb.toString();\n\n }", "private String getTextLineFromStream( InputStream is ) throws IOException {\n StringBuffer buffer = new StringBuffer();\n int b;\n\n \twhile( (b = is.read()) != -1 && b != (int) '\\n' ) {\n \t\tbuffer.append( (char) b );\n \t}\n \treturn buffer.toString().trim();\n }", "private String convertStreamToString(InputStream is) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder builder = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n }\n return builder.toString();\n }", "private static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is), 8192);\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return sb.toString();\n }", "private static String readFromStream(InputStream inputStream) {\n StringBuilder outputString = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"));\n BufferedReader reader = new BufferedReader(inputStreamReader);\n try {\n String line = reader.readLine();\n while (line != null) {\n outputString.append(line);\n line = reader.readLine();\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error reading line from reader, readFromStream() block\", e);\n }\n }\n return outputString.toString();\n }", "public static String GetStringFromInputStream(InputStream is) {\n\t\tString line;\n\t\tStringBuilder total = new StringBuilder();\n\n\t\t// Wrap a BufferedReader around the InputStream\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is));\n\n\t\t// Read response until the end\n\t\ttry {\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\ttotal.append(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tis.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tUtilities\n\t\t\t\t\t\t.LogWarning(\"GetStringFromInputStream - could not close stream\");\n\t\t\t}\n\t\t}\n\n\t\t// Return full string\n\t\treturn total.toString();\n\t}", "private static String convertInputStreamToString(InputStream inputStream) throws IOException{\n BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));\n String line = \"\";\n String result = \"\";\n while((line = bufferedReader.readLine()) != null)\n result += line;\n\n inputStream.close();\n return result;\n\n }", "private static String convertStreamToString(InputStream is) {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t sb.append(line + \"\\n\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n try {\n\t\t\tis.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n return sb.toString();\n \n }", "private static String convertInputStreamToString(InputStream inputStream) throws IOException{\t\t\t\t\t\t\t\t\t\n\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\t\t\t\t\t\t\t\t\t\n\t\tString line = \"\";\t\t\t\t\t\t\t\t\t\n\t\tString result = \"\";\t\t\t\t\t\t\t\t\t\n\t\twhile((line = bufferedReader.readLine()) != null)\t{\t\t\t\t\t\t\t\t\n\t\t\tresult += line;\t\t\t\t\t\t\t\t\n\t\t}\t\t\t\t\t\t\t\t\t\n\n\t\tinputStream.close();\t\t\t\t\t\t\t\t\t\n\t\treturn result;\t\t\t\t\t\t\t\t\t\n\t}", "public static String readIt(InputStream is) throws IOException {\n BufferedReader reader = null;\n reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n StringBuilder responseStrBuilder = new StringBuilder();\n String inputStr;\n while ((inputStr = reader.readLine()) != null) {\n responseStrBuilder.append(inputStr);\n }\n return responseStrBuilder.toString();\n }", "private static String readFromStream(InputStream inputStream) throws IOException {\n StringBuilder output = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"));\n BufferedReader reader = new BufferedReader(inputStreamReader);\n String line = reader.readLine();\n while (line != null) {\n output.append(line);\n line = reader.readLine();\n }\n }\n return output.toString();\n }", "private String readStream(InputStream is) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = is.read();\n while(i != -1) {\n bo.write(i);\n i = is.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }", "private static String convertStreamToString(InputStream is)\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try\n {\n while ((line = reader.readLine()) != null)\n {\n sb.append(line + \"\\n\");\n }\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n is.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n System.out.println(sb.toString());\n return sb.toString();\n }", "public static String convertStreamToString(InputStream is) {\n String line = \"\";\n StringBuilder total = new StringBuilder();\n BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n try {\n while ((line = rd.readLine()) != null) {\n total.append(line);\n }\n } catch (Exception e) {\n\n }\n return total.toString();\n }", "private static String convertStreamToString(InputStream is) {\r\n\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tsb.append(line + \"\\n\");\r\n\t\t\t}\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\tis.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "private static String convertInputStreamToString(InputStream inputStream) throws IOException {\n BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));\n String line = \"\";\n String result = \"\";\n while((line = bufferedReader.readLine()) != null)\n result += line;\n\n inputStream.close();\n return result;\n\n }", "public String StreamToString(InputStream is) {\r\n //Creamos el Buffer\r\n BufferedReader reader =\r\n new BufferedReader(new InputStreamReader(is));\r\n StringBuilder sb = new StringBuilder();\r\n String line = null;\r\n try {\r\n //Bucle para leer todas las líneas\r\n //En este ejemplo al ser solo 1 la respuesta\r\n //Pues no haría falta\r\n while((line = reader.readLine())!=null){\r\n sb.append(line);\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n try {\r\n is.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n //retornamos el codigo límpio\r\n return sb.toString();\r\n }", "static String slurp(InputStream stream) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line).append(System.lineSeparator());\n }\n br.close();\n return sb.toString();\n }", "private static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "private String stringFromInputStream(InputStream instream) throws IOException {\n StringBuilder sb = new StringBuilder(\"\");\n if (instream == null) {\n logger.warn(\"Input stream is null.\");\n return sb.toString();\n }\n BufferedReader bufreader = new BufferedReader(new InputStreamReader(instream));\n String line = \"\";\n while ((line = bufreader.readLine()) != null) {\n sb.append(line);\n sb.append(LINE_SEPARATOR);\n }\n return sb.toString();\n }", "public static String convertInputStreamToString(InputStream is)\n throws IOException {\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n try {\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is, UtilsConstants.UTF_8));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(UtilsConstants.LINE_SEPARATOR);\n }\n } finally {\n is.close();\n }\n return sb.toString();\n } else {\n return \"\";\n }\n }", "@NonNull\n public static String getStringFrom(InputStream inputStream) {\n StringBuffer dataStringBuffer = new StringBuffer(\"\");\n try {\n InputStreamReader isr = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(isr);\n String readString = bufferedReader.readLine();\n while (readString != null) {\n dataStringBuffer.append(readString);\n readString = bufferedReader.readLine();\n }\n isr.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n return dataStringBuffer.toString();\n }", "public static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n \n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "private String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line).append('\\n');\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "protected static String convertStreamToString(InputStream is) {\r\n /*\r\n * To convert the InputStream to String we use the BufferedReader.readLine()\r\n * method. We iterate until the BufferedReader return null which means\r\n * there's no more data to read. Each line will appended to a StringBuilder\r\n * and returned as String.\r\n */\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n StringBuilder sb = new StringBuilder();\r\n \r\n String line = null;\r\n try {\r\n while ((line = reader.readLine()) != null) {\r\n sb.append(line + \"\\n\");\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n try {\r\n is.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n \r\n return sb.toString();\r\n }", "public static String ReadData(InputStream input) throws IOException {\n BufferedReader reader = new BufferedReader(new\n InputStreamReader(input));\n StringBuilder builder = new StringBuilder();\n while (true) {\n String line = reader.readLine();\n if(line == null) {\n break;\n }\n\n builder.append(line);\n }\n\n return builder.toString();\n }", "private String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n String line;\n try {\n // building the string\n while ((line = reader.readLine()) != null) {\n sb.append(line).append('\\n');\n }\n } catch (IOException e) {\n // error occurred in the inputstream\n Log.e(TAG, \"IOException: \" + e.getMessage());\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n // error occurred closing input stream\n Log.e(TAG, \"IOException: \" + e.getMessage());\n }\n }\n return sb.toString();\n }", "public String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "protected String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n log.info(sb.toString());\n return sb.toString();\n }", "public static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n try {\n is.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }", "public static String streamToString(InputStream is) throws IOException {\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n } finally {\n is.close();\n }\n return sb.toString();\n } else {\n return \"\";\n }\n\t}", "private String readStream(InputStream in) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = in.read();\n while(i != -1) {\n bo.write(i);\n i = in.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }", "public static String convertStreamToString(InputStream is) throws Exception {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n reader.close();\n return sb.toString();\n }", "private String inputStreamToString(InputStream is) {\n Scanner scanner = new Scanner(is);\n Scanner tokenizer = scanner.useDelimiter(\"\\\\A\");\n String str = tokenizer.hasNext() ? tokenizer.next() : \"\";\n scanner.close();\n return str;\n }", "public static String read(InputStream in) throws IOException {\n\t\tStringBuilder result = new StringBuilder();\n\t try {\n\t byte[] buf = new byte[1024]; int r = 0;\n\t while ((r = in.read(buf)) != -1) {result.append(new String(buf, 0, r));}\n\t } finally { in.close();}\n\t\tString text=result.toString();\n\t\treturn text;\n\t}", "public static String readFromInputStream(InputStream inputStream) throws IOException {\n StringBuilder streamOutput = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset\n .forName(\"UTF-8\"));\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String line = bufferedReader.readLine();\n while (line != null) {\n streamOutput.append(line);\n line = bufferedReader.readLine();\n }\n }\n return streamOutput.toString();\n }", "private static final String convertStreamToString(InputStream is) {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is));\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tString line = null;\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tis.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "private static String convertStreamToString(InputStream is) {\r\n\t\t/*\r\n\t\t * To convert the InputStream to String we use the\r\n\t\t * BufferedReader.readLine() method. We iterate until the BufferedReader\r\n\t\t * return null which means there's no more data to read. Each line will\r\n\t\t * appended to a StringBuilder and returned as String.\r\n\t\t */\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tsb.append(line + \"\\n\");\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n//\t\t\tLog.e(\"HTTP\", \"HTTP::convertStreamToString IOEX\",e);\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tis.close();\r\n\t\t\t} catch (IOException e) {\r\n//\t\t\t\tLog.e(Constants.TAG, \"HTTP::convertStreamToString, finally catch IOEX\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public static String readString(InputStream is) {\r\n \t\tif (is == null)\r\n \t\t\treturn null;\r\n \t\tBufferedReader reader= null;\r\n \t\ttry {\r\n \t\t\tStringBuffer buffer= new StringBuffer();\r\n \t\t\tchar[] part= new char[2048];\r\n \t\t\tint read= 0;\r\n \t\t\treader= new BufferedReader(new InputStreamReader(is));\r\n \r\n \t\t\twhile ((read= reader.read(part)) != -1)\r\n \t\t\t\tbuffer.append(part, 0, read);\r\n \t\t\t\r\n \t\t\treturn buffer.toString();\r\n \t\t\t\r\n \t\t} catch (IOException ex) {\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\ttry {\r\n \t\t\t\t\treader.close();\r\n \t\t\t\t} catch (IOException ex) {\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public static String readFileFromInputStream(final InputStream is) throws IOException\n\t{\n\t\tfinal BufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tis, FILE_CHARSET_NAME));\n\t\ttry\n\t\t{\n\t\t\tfinal StringBuilder contents = new StringBuilder(BUFFER_SIZE);\n\n\t\t\t// copy from input stream\n\t\t\tfinal char[] charBuffer = new char[BUFFER_SIZE];\n\t\t\tint len;\n\t\t\twhile ((len = input.read(charBuffer)) > 0)\n\t\t\t{\n\t\t\t\tcontents.append(charBuffer, 0, len);\n\t\t\t}\n\n\t\t\treturn contents.toString().replaceAll(\"\\r\\n\", \"\\n\");\n\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tinput.close();\n\t\t}\n\t}", "private static String ioStr(InputStream in) throws IOException {\n\t\t// Read input\n\t\tString str = new String();\n\t\tString next = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\twhile ((next = reader.readLine()) != null) {\n\t\t\tstr += next + \"\\n\";\n\t\t}\n\t\tin.close();\n\n\t\t// Convert result accordingly\n\t\tif (str.length() > 1) {\n\t\t\treturn str.substring(0, str.length() - 1);\n\t\t}\n\t\treturn str;\n\t}", "public String readStream(InputStream in) {\n BufferedReader reader = null;\n StringBuffer data = new StringBuffer(\"\");\n try {\n reader = new BufferedReader(new InputStreamReader(in));\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n data.append(line);\n }\n } catch (IOException e) {\n Log.e(\"Log\", \"IOException\");\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return data.toString();\n }", "private static String convertStreamToString(InputStream inputStream) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n reader.close();\n return sb.toString();\n }", "public static String convertStreamToString(InputStream is) throws IOException {\r\n\t\tif (is != null) {\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\tString line;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\r\n\t\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\t\tsb.append(line).append(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t} finally {\r\n\t\t\t\tis.close();\r\n\t\t\t}\r\n\t\t\treturn sb.toString();\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "private static String m658b(InputStream inputStream) {\n String str = \"\";\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\n while (true) {\n String readLine = bufferedReader.readLine();\n if (readLine == null) {\n return str;\n }\n str = str + readLine + \"\\n\";\n }\n }", "public String inputStreamToString(InputStream inputStreamFromServer) throws IOException{\r\n //create bufferedReader from inputStream\r\n BufferedReader bufferedReader = new BufferedReader(\r\n new InputStreamReader(inputStreamFromServer));\r\n\r\n //hold variables\r\n String inputLine;\r\n StringBuffer responseAsString = new StringBuffer();\r\n\r\n //reading with buffer\r\n while((inputLine = bufferedReader.readLine()) != null){\r\n responseAsString.append(inputLine);\r\n }\r\n\r\n return responseAsString.toString();\r\n\r\n }", "public static String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(stream));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return sb.toString();\n }", "protected String readFullyAsString(InputStream inputStream)\n\t\t\tthrows IOException {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = inputStream.read(buffer)) != -1) {\n\t\t\tbaos.write(buffer, 0, length);\n\t\t}\n\t\treturn baos.toString(StandardCharsets.UTF_8.name());\n\t}", "public static String streamToString(InputStream is) {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder stringBuilder = new StringBuilder();\n String line = null;\n\n try {\n\n while ((line = reader.readLine()) != null) {\n stringBuilder.append(line);\n }\n\n reader.close();\n\n } catch (IOException e) {\n // obsłuż wyjątek\n Log.d(WebServiceHandler.class.getSimpleName(), e.toString());\n }\n\n return stringBuilder.toString();\n }", "public String responsetoString(InputStream in) throws IOException{\n\t\tBufferedReader br = new BufferedReader( new InputStreamReader(in));\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString line = null;\n\t\twhile((line = br.readLine())!= null){\n\t\t\tsb.append(line);\t\t\t\n\t\t}\n\t\tin.close();\n\t\treturn sb.toString();\n\t}", "private static String convertStreamToString(InputStream inputStream) {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tinputStream));\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tString line = null;\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"EXCEPTION\", e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tinputStream.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tLog.i(\"##sb#\", sb.toString());\n\t\treturn sb.toString();\n\t}", "private static String stringFromInputStream(InputStream inIS) {\n\n if (inIS == null) {\n return null;\n }\n StringBuffer outBuffer = new StringBuffer();\n InputStreamReader isr = null;\n BufferedReader input = null;\n try {\n String line = null;\n isr = new InputStreamReader(inIS);\n input = new BufferedReader(isr);\n while ((line = input.readLine()) != null) {\n if (line.indexOf(\"//\") == -1) {\n outBuffer.append(line);\n outBuffer.append(System.getProperty(\"line.separator\"));\n }\n }\n } catch (IOException ioe) {\n log.error(\"Unable to read from InputStream or write to output buffer\");\n ioe.printStackTrace();\n outBuffer = null;\n }\n try {\n isr.close();\n input.close();\n inIS.close();\n } catch (IOException ioe) {\n log.error(\"InputStream could not be closed\");\n ioe.printStackTrace();\n }\n if (outBuffer == null) {\n return null;\n } else {\n return outBuffer.toString();\n }\n\n }", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }", "private static String getString(BufferedReader reader) throws IOException{\n String result=null;\n while(result==null) {\n result = reader.readLine();\n }\n return result.trim();\n }", "public static String readFile(InputStream in) throws IOException {\n final StringBuffer sBuffer = new StringBuffer();\n final BufferedReader br = new BufferedReader(new InputStreamReader(in));\n final char[] buffer = new char[1024];\n\n int cnt;\n while ((cnt = br.read(buffer, 0, buffer.length)) > -1) {\n sBuffer.append(buffer, 0, cnt);\n }\n br.close();\n in.close();\n return sBuffer.toString();\n }", "static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}", "private String eatLine( InputStream stream ) throws IOException {\n buffer = new StringBuffer();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\n':\n case '\\r':\n case END:\n done = true;\n break;\n default:\n buffer.append( (char) c );\n }\n }\n return buffer.toString();\n }", "public String convertStreamToString(InputStream instream) throws Exception {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(instream));\n\t\t StringBuilder sb = new StringBuilder();\n\t\t String line = null;\n\n\t\t while ((line = reader.readLine()) != null) {\n\t\t \t\n\t\t sb.append(line);\n\t\t }\n\t\t instream.close();\n\t\t return sb.toString();\n\t\t \n\t\t}", "private static String readStream(InputStream is, String charsetName) throws UnsupportedEncodingException, IOException {\r\n StringBuffer sb = new StringBuffer();\r\n byte[] buffer = new byte[1024];\r\n int length = 0;\r\n while ((length = is.read(buffer)) != -1) {\r\n sb.append(new String(buffer, 0, length, charsetName));\r\n }\r\n return sb.toString();\r\n }", "public static String read(Reader in) throws IOException {\n\t\tStringBuilder result = new StringBuilder();\n\t try {\n\t \tchar[] buf = new char[1024]; int r = 0;\n\t while ((r = in.read(buf)) != -1) {result.append(new String(buf, 0, r));}\n\t } finally { in.close();}\n\t\tString text=result.toString();\n\t\treturn text;\n\t}", "public static String convertStreamToString(InputStream is) {\n java.util.Scanner s = new java.util.Scanner(is).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "static String convertStreamToString(java.io.InputStream is) {\n java.util.Scanner s = new java.util.Scanner(is).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }", "static String convertStreamToString(java.io.InputStream is) {\n java.util.Scanner s = new java.util.Scanner(is).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }", "public static String convertInputStreamToString(InputStream in) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tList<String> lines = null;\n\t\ttry {\n\t\t\tlines = IOUtils.readLines(in);\n\t\t} catch (IOException e) {\n\t\t\te.toString();\n\t\t}\n\t\tif (lines != null) {\n\t\t\tfor (String line : lines) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\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}", "private String readIt(InputStream stream) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(stream, \"iso-8859-1\"), 128);\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n return sb.toString();\n }", "public static String readString(InputStream is) throws IOException {\n return readString(is, DEFAULT_ENCODING);\n }", "public static String loadStream(InputStream in) throws IOException {\r\n\t\tInputStream is = in;\r\n\t\tint ptr = 0;\r\n\t\tis = new BufferedInputStream(is);\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\ttry {\r\n\t\t\twhile ((ptr = is.read()) != -1) {\r\n\t\t\t\tbuffer.append((char) ptr);\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\t\treturn buffer.toString();\r\n\t}", "private static String readAll(Reader rd) throws IOException {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t int cp;\n\t\t while ((cp = rd.read()) != -1) {\n\t\t sb.append((char) cp);\n\t\t }\n\t\t return sb.toString();\n\t\t }", "public static String getAsString(InputStream is) {\n\t\treturn head(is, null);\n\t}", "static String readString() throws IOException{\n return bufferedReader.readLine();\n }", "public String convertStreamToString(InputStream is) throws IOException {\r\n /*\r\n * To convert the InputStream to String we use the Reader.read(char[]\r\n * buffer) method. We iterate until the Reader return -1 which means\r\n * there's no more data to read. We use the StringWriter class to\r\n * produce the string.\r\n */\r\n if (is != null) {\r\n Writer writer = new StringWriter();\r\n char[] buffer = new char[1024];\r\n try {\r\n Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\r\n int n;\r\n while ((n = reader.read(buffer)) != -1) {\r\n writer.write(buffer, 0, n);\r\n }\r\n } finally {\r\n is.close();\r\n }\r\n return writer.toString();\r\n } else {\r\n return \"\";\r\n }\r\n }", "private String convertStreamToString(InputStream is) throws IOException {\r\n\t\tint bufSize = 8 * 1024;\r\n\t\tif (is != null) {\r\n\t\t\tWriter writer = new StringWriter();\r\n\r\n\t\t\tchar[] buffer = new char[bufSize];\r\n\t\t\ttry {\r\n\t\t\t\tInputStreamReader ireader = new InputStreamReader(is, \"UTF-8\");\r\n\t\t\t\tReader reader = new BufferedReader(ireader, bufSize);\r\n\t\t\t\tint n;\r\n\t\t\t\twhile ((n = reader.read(buffer)) != -1) {\r\n\t\t\t\t\twriter.write(buffer, 0, n);\r\n\t\t\t\t}\r\n\t\t\t\treader.close();\r\n\t\t\t\tireader.close();\r\n\t\t\t\treturn writer.toString();\r\n\t\t\t} catch (OutOfMemoryError ex) {\r\n\t\t\t\tLog.e(\"b2evo_android\", \"Convert Stream: (out of memory)\");\r\n\t\t\t\twriter.close();\r\n\t\t\t\twriter = null;\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"\";\r\n\t\t\t} finally {\r\n\t\t\t\tis.close();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public String convertStreamToString(InputStream is) {\n try {\n if (is != null) {\n Writer writer = new StringWriter();\n\n char[] buffer = new char[1024];\n try {\n Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n int n;\n while ((n = reader.read(buffer)) != -1) {\n writer.write(buffer, 0, n);\n }\n } finally {\n is.close();\n }\n return writer.toString();\n } else {\n return \"\";\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Did not expect this one...\", e);\n }\n }", "public static String inputStreamToString(InputStream in) {\r\n StringBuffer buffer = new StringBuffer();\r\n try {\r\n BufferedReader br = new BufferedReader(new InputStreamReader(in,\r\n \"UTF-8\"), 1024);\r\n String line;\r\n while ((line = br.readLine()) != null) {\r\n buffer.append(line);\r\n }\r\n } catch (IOException iox) {\r\n LOGR.warning(iox.getMessage());\r\n }\r\n return buffer.toString();\r\n }", "private static String readLine(ResettableInputStream in, int maxLength)\n throws IOException {\n\n StringBuilder s = new StringBuilder();\n int c;\n int i = 1;\n while ((c = in.readChar()) != -1) {\n // FIXME: support \\r\\n\n if (c == '\\n') {\n break;\n }\n //System.out.printf(\"seen char val: %c\\n\", (char)c);\n s.append((char)c);\n\n if (i++ > maxLength) {\n System.out.println(\"Output: >\" + s + \"<\");\n throw new RuntimeException(\"Too far!\");\n }\n }\n if (s.length() > 0) {\n s.append('\\n');\n return s.toString();\n } else {\n return null;\n }\n }", "private String readString(InputStream in) throws IOException {\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in, \"iso-8859-1\"));\r\n\t\tString inputLine;\r\n\t\tStringBuffer response = new StringBuffer();\r\n\t\twhile ((inputLine = reader.readLine()) != null) {\r\n\t\t\tresponse.append(inputLine);\r\n\t\t}\r\n\t\tin.close();\r\n\t\treturn response.toString();\r\n\t}", "private String _read(InputStream in, String enc) throws IOException\n {\n int ptr = 0;\n int count;\n \n while ((count = in.read(_readBuffer, ptr, _readBuffer.length - ptr)) > 0) {\n ptr += count;\n // buffer full? Need to realloc\n if (ptr == _readBuffer.length) {\n _readBuffer = Arrays.copyOf(_readBuffer, ptr + ptr);\n }\n }\n \n return new String(_readBuffer, 0, ptr, enc);\n }", "private String getResponse(InputStream input) throws IOException {\n\t\ttry (BufferedReader buffer = new BufferedReader(new InputStreamReader(input))) {\n\t\t\treturn buffer.lines().collect(Collectors.joining(\"\\n\"));\n\t\t}\n\t}", "public static String readLine(InputStream inputStream, String charset,\n boolean includeCR) throws IOException {\n byte[] line = readLine(inputStream, includeCR);\n return (null == line) ? null : new String(line, charset);\n }", "public static String getText(BufferedReader reader) throws IOException {\n StringBuilder answer = new StringBuilder();\n // reading the content of the file within a char buffer\n // allow to keep the correct line endings\n char[] charBuffer = new char[8192];\n int nbCharRead /* = 0*/;\n try {\n while ((nbCharRead = reader.read(charBuffer)) != -1) {\n // appends buffer\n answer.append(charBuffer, 0, nbCharRead);\n }\n Reader temp = reader;\n reader = null;\n temp.close();\n } finally {\n closeWithWarning(reader);\n }\n return answer.toString();\n }", "public static String readFully(Reader reader) throws IOException {\n\t\ttry {\n\t\t\tStringWriter writer = new StringWriter();\n\t\t\tchar[] buffer = new char[1024];\n\t\t\tint count;\n\t\t\twhile ((count = reader.read(buffer)) != -1) {\n\t\t\t\twriter.write(buffer, 0, count);\n\t\t\t}\n\t\t\treturn writer.toString();\n\t\t} finally {\n\t\t\treader.close();\n\t\t}\n\t}", "private static StringBuilder receiveInputStream(InputStream input) throws IOException{\r\n\t\tStringBuilder response = new StringBuilder();\r\n\t\tint i;\r\n\t\twhile((i = input.read())!= -1){//stock the inputstream\r\n\t\t\tresponse.append((char)i); \r\n\t\t}\r\n\t\treturn response;\r\n\t}", "public static String convertStreamToString(InputStream is) {\n if (is == null) return null;\n Scanner s = new Scanner(is, \"UTF-8\").useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }", "static String readLine(InputStream in, boolean ignoreEmpty) throws IOException {\n\t\tByteArrayOutputStream buffer = new ByteArrayOutputStream(1024 * 8);\n\t\tdo {\n\t\t\tint ch;\n\t\t\twhile ((ch = in.read()) != -1) {\n\t\t\t\tif (ch == '\\r') {\n\t\t\t\t\tin.read(); // discard next '\\n'\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbuffer.write(ch);\n\t\t\t}\n\t\t\tif (ch == -1) {\n\t\t\t\tthrow new EOFException();\n\t\t\t}\n\t\t} while (ignoreEmpty && buffer.size() == 0);\n\t\treturn buffer.toString();\n\t}" ]
[ "0.80718434", "0.8007354", "0.78850275", "0.7817398", "0.7814369", "0.7809983", "0.77270705", "0.76836944", "0.7650521", "0.7629824", "0.76019275", "0.7586726", "0.7557694", "0.7440257", "0.7418864", "0.740184", "0.73975986", "0.7387699", "0.73246837", "0.73027086", "0.7298979", "0.72911507", "0.72895503", "0.7286852", "0.7281693", "0.7278577", "0.7274377", "0.7271007", "0.727075", "0.7269981", "0.72483987", "0.72453284", "0.72328824", "0.72265464", "0.72029036", "0.71839064", "0.7177836", "0.71534437", "0.71530336", "0.71420634", "0.710038", "0.7063141", "0.70525163", "0.7051675", "0.7038068", "0.70246", "0.7020024", "0.6994213", "0.6976464", "0.6974313", "0.69609386", "0.6960072", "0.6957296", "0.694847", "0.6943043", "0.69350654", "0.6932296", "0.69029725", "0.6873433", "0.686826", "0.686496", "0.6819199", "0.68188345", "0.6793688", "0.67861885", "0.6778195", "0.67756885", "0.6752792", "0.6740087", "0.6712727", "0.6697805", "0.6693484", "0.6691686", "0.6674133", "0.66669816", "0.66669816", "0.6660806", "0.6660806", "0.6654279", "0.66507995", "0.66502947", "0.6631395", "0.660126", "0.6589163", "0.65712345", "0.6564086", "0.6492753", "0.6490766", "0.64885443", "0.6487916", "0.6469002", "0.64497614", "0.6435443", "0.64316046", "0.6429915", "0.64097947", "0.6385271", "0.63819355", "0.6377846", "0.6375062" ]
0.735457
18
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
public static boolean addUser(UserDetailspojo user) throws SQLException { Connection conn=DBConnection.getConnection(); String qry="insert into users1 values(?,?,?,?,?)"; System.out.println(user); PreparedStatement ps=conn.prepareStatement(qry); ps.setString(1,user.getUserid()); ps.setString(4,user.getPassword()); ps.setString(5,user.getUserType()); ps.setString(3,user.getEmpid()); ps.setString(2,user.getUserName()); //ResultSet rs=ps.executeQuery(); int rs=ps.executeUpdate(); return rs==1; //String username=null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "public void remove()\n/* */ {\n/* 99 */ throw new UnsupportedOperationException();\n/* */ }", "public void remove()\n/* */ {\n/* 110 */ throw new UnsupportedOperationException();\n/* */ }", "@Override\n public boolean isSupported() {\n return true;\n }", "@Override\n public String toString() {\n throw new UnsupportedOperationException(\"implement me!\");\n }", "private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "private void HargaKamera() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException(); \n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}", "@Override\n public boolean isSupported() {\n return true;\n }", "private static UnsupportedOperationException getModificationUnsupportedException()\n {\n throw new UnsupportedOperationException(\"Illegal operation. Specified list is unmodifiable.\");\n }", "@Override\r\n public void remove() throws UnsupportedOperationException {\r\n throw new UnsupportedOperationException(\"Me ei poisteta\");\r\n }", "Boolean mo1305n() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public boolean isEnabled() {\n/* 945 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\r\n\t\t\tpublic void remove() {\r\n\t\t\t\tthrow new UnsupportedOperationException();\r\n\t\t\t}", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}", "void Salvar(String nome) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "protected void input_back(){\n throw new UnsupportedOperationException();\n }", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public UnsupportedCycOperationException() {\n super();\n }", "public int getListSelection() {\n/* 515 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void remove(){\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}", "@SuppressWarnings(\"static-method\")\n\tpublic void open() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n\t\t\t}", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "private void atualizar_tbl_pro_profs() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n//To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\t/**\n\t * feature is not supported\n\t */\n\tpublic void remove() {\n\t}", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException(\"Myö ei poisteta\");\n\t\t}", "private String printStackTrace() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n public void makeVisible() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "public void _reportUnsupportedOperation() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Operation not supported by parser of type \");\n sb.append(getClass().getName());\n throw new UnsupportedOperationException(sb.toString());\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "public void remove() {\r\n \r\n throw new UnsupportedOperationException();\r\n }", "public void showDropDown() {\n/* 592 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public int zzef() {\n throw new UnsupportedOperationException();\n }", "@Override\n public String toString() {\n throw new UnsupportedOperationException();\n //TODO: Complete this method!\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void refresh() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "@Override\npublic boolean isEnabled() {\n\treturn false;\n}", "@Override\n public String writeToString() {\n throw new UnsupportedOperationException();\n }", "public boolean isImportantForAccessibility() {\n/* 1302 */ throw new RuntimeException(\"Stub!\");\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}", "private String getText() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Deprecated\n/* */ public int getActions() {\n/* 289 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tprotected Object clone() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public String getDisplayVariant() {\n/* 656 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public boolean getObsolete()\n {\n return false;\n }", "@Override\n public void close() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }", "public String getName() {\n/* 341 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\npublic boolean isEnabled() {\n\treturn true;\n}", "public int mo1265e() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "public MissingMethodArgumentException() {\n }", "public ListAdapter getAdapter() {\n/* 431 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public CollectionItemInfo getCollectionItemInfo() {\n/* 1114 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void cancel() {\n throw new UnsupportedOperationException();\n }", "public CharSequence getContentDescription() {\n/* 1531 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void remove() {\n throw new UnsupportedOperationException();\r\n }", "@Override\n public final void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\r\n throw new UnsupportedOperationException();\r\n }", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "public void remove() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException( \"remove() Not implemented.\" );\n\t\t}", "public boolean isSelected() {\n/* 3021 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }", "public void remove() {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}", "@Override\n\tpublic void e() {\n\n\t}", "public boolean isEditable() {\n/* 1014 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "private void m50366E() {\n }", "@Deprecated\n\tprivate void oldCode()\n\t{\n\t}", "public boolean mo1266f() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void actionPerformed(ActionEvent ae) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "public void remove() {\n throw new UnsupportedOperationException();\n }", "private CollectionUtils() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "default boolean isDeprecated() {\n return false;\n }", "public String formNotImplemented()\r\n {\r\n return formError(\"501 Method not implemented\",\"Service not implemented, programer was lazy\");\r\n }", "@Override\n\tpublic String getMoreInformation() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void m23075a() {\n }", "private void setText() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public int getObjectPropCode() {\n/* 108 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void toggle() {\n/* 135 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String getSuggestSelection() {\n/* 113 */ throw new RuntimeException(\"Stub!\");\n/* */ }" ]
[ "0.77443457", "0.7373967", "0.6966467", "0.69094384", "0.67967474", "0.6772981", "0.6770611", "0.66534495", "0.6639043", "0.66233534", "0.6609316", "0.6609316", "0.6591667", "0.65871775", "0.65558785", "0.6499027", "0.64613366", "0.64500856", "0.6429774", "0.6419923", "0.63821", "0.6381803", "0.63796437", "0.6376284", "0.63641495", "0.63602275", "0.63592255", "0.6354011", "0.6334751", "0.6334751", "0.6334751", "0.63308305", "0.63247657", "0.6323549", "0.6323549", "0.63145983", "0.62895745", "0.627907", "0.6277435", "0.6272607", "0.62644887", "0.6246259", "0.6225688", "0.6225688", "0.6219494", "0.62021047", "0.62018913", "0.6199497", "0.61989784", "0.6193036", "0.61926675", "0.6178645", "0.6178645", "0.6164314", "0.61621976", "0.61607975", "0.61449283", "0.6125639", "0.6125443", "0.61227936", "0.61217606", "0.61135685", "0.6111885", "0.6108101", "0.61020064", "0.6090956", "0.6090679", "0.6088764", "0.6087082", "0.6085988", "0.6085988", "0.6080176", "0.6058971", "0.6057445", "0.6049156", "0.60460013", "0.6042613", "0.6023227", "0.60215026", "0.6015257", "0.6015121", "0.6013932", "0.60080487", "0.6007118", "0.5996487", "0.59942967", "0.59863853", "0.59863853", "0.5985854", "0.5985854", "0.59827286", "0.5980721", "0.5977992", "0.59701407", "0.5966106", "0.59658045", "0.59634286", "0.5962733", "0.59564614", "0.5951892", "0.595095" ]
0.0
-1
/ renamed from: OooO00o reason: collision with other method in class
public C6777llL1 m16297OooO00o() { return this.OooO00o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_4270() {}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract void mo70713b();", "@Override\n public void perish() {\n \n }", "public abstract Object mo1771a();", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public abstract Object mo26777y();", "@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\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "protected abstract Set method_1559();", "@Override\n\tpublic void einkaufen() {\n\t}", "public abstract Object mo1185b();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract void mo56925d();", "public void m20445OooO00o() {\n OooO0OO();\n }", "public void mo21825b() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public void method_191() {}", "public abstract void mo35054b();", "protected void mo6255a() {\n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "public void method_201() {}", "public abstract Member mo23408O();", "public void method_202() {}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void mo27464a();", "public void mo55254a() {\n }", "@Override\n protected void prot() {\n }", "public void mo5382o() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "public void method_6349() {\r\n super.method_6349();\r\n }", "public void mo1531a() {\n }", "public abstract void mo30696a();", "public void mo38117a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override // com.zhihu.android.sugaradapter.SugarHolder\n /* renamed from: a */\n public void mo56529a(Object obj) {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public abstract void mo6549b();", "public void mo21793R() {\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected FanisamBato(){\n\t}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "private stendhal() {\n\t}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_115() {}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public abstract void mo27386d();", "public void method_203() {}", "public abstract void mo27385c();", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void mo115188a() {\n }", "public abstract void mo42331g();", "public abstract String mo118046b();", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void mo21791P() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public void method_6191() {\r\n super.method_6191();\r\n }", "public void mo21782G() {\n }", "public abstract void mo20899UO();", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo21779D() {\n }", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "public void mo21877s() {\n }", "protected OpinionFinding() {/* intentionally empty block */}", "public abstract void mo1184a(Object obj);", "public void mo23813b() {\n }", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public abstract String mo13682d();" ]
[ "0.6363965", "0.632822", "0.6304954", "0.62867093", "0.6281007", "0.62537473", "0.6218344", "0.62128186", "0.6190183", "0.6182411", "0.61757296", "0.61748046", "0.6163686", "0.6155949", "0.6141848", "0.60880125", "0.6073878", "0.605578", "0.60325474", "0.6011859", "0.6005259", "0.59988433", "0.5992559", "0.5992559", "0.5988503", "0.59763676", "0.59701216", "0.5969182", "0.5960087", "0.5958611", "0.5948828", "0.5937814", "0.5936659", "0.59342575", "0.59233135", "0.5920945", "0.5917373", "0.590794", "0.59039813", "0.59039813", "0.5902189", "0.58987623", "0.5897935", "0.58977085", "0.5895817", "0.5894357", "0.589307", "0.58838403", "0.5881423", "0.5881423", "0.5878953", "0.5878166", "0.5877789", "0.58708566", "0.58703834", "0.58686006", "0.5865812", "0.58633226", "0.5855055", "0.5853499", "0.5851589", "0.58510804", "0.5850339", "0.58470863", "0.58470863", "0.58470863", "0.58470863", "0.58470863", "0.58470863", "0.58470863", "0.5833793", "0.5832846", "0.5832268", "0.5830222", "0.5818842", "0.58171713", "0.58130085", "0.58022314", "0.58022314", "0.58022314", "0.5799598", "0.57929486", "0.57915384", "0.57905287", "0.57905287", "0.57879174", "0.5785324", "0.5784416", "0.5782691", "0.5779139", "0.57756627", "0.57689863", "0.5768607", "0.5766106", "0.5765819", "0.5764267", "0.5759078", "0.5753287", "0.5752708", "0.5742935", "0.57396215" ]
0.0
-1
/ renamed from: OooO00o reason: collision with other method in class
public C97411 m16298OooO00o() { return this.OooO00o.m17898OooO00o(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_4270() {}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract void mo70713b();", "@Override\n public void perish() {\n \n }", "public abstract Object mo1771a();", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public abstract Object mo26777y();", "@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\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "protected abstract Set method_1559();", "@Override\n\tpublic void einkaufen() {\n\t}", "public abstract Object mo1185b();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract void mo56925d();", "public void m20445OooO00o() {\n OooO0OO();\n }", "public void mo21825b() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public void method_191() {}", "public abstract void mo35054b();", "protected void mo6255a() {\n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "public void method_201() {}", "public abstract Member mo23408O();", "public void method_202() {}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void mo27464a();", "public void mo55254a() {\n }", "@Override\n protected void prot() {\n }", "public void mo5382o() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "public void method_6349() {\r\n super.method_6349();\r\n }", "public void mo1531a() {\n }", "public abstract void mo30696a();", "public void mo38117a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override // com.zhihu.android.sugaradapter.SugarHolder\n /* renamed from: a */\n public void mo56529a(Object obj) {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public abstract void mo6549b();", "public void mo21793R() {\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected FanisamBato(){\n\t}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "private stendhal() {\n\t}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_115() {}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public abstract void mo27386d();", "public void method_203() {}", "public abstract void mo27385c();", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void mo115188a() {\n }", "public abstract void mo42331g();", "public abstract String mo118046b();", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void mo21791P() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public void method_6191() {\r\n super.method_6191();\r\n }", "public void mo21782G() {\n }", "public abstract void mo20899UO();", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo21779D() {\n }", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "public void mo21877s() {\n }", "public abstract void mo1184a(Object obj);", "protected OpinionFinding() {/* intentionally empty block */}", "public void mo23813b() {\n }", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public abstract String mo13682d();" ]
[ "0.63641334", "0.63286257", "0.6304679", "0.62867224", "0.62807745", "0.62540233", "0.6218609", "0.6212809", "0.61900246", "0.6181775", "0.6175643", "0.61745036", "0.6163922", "0.6155593", "0.6142321", "0.6088296", "0.6074178", "0.6055275", "0.60324985", "0.60114914", "0.60059077", "0.5998847", "0.5992572", "0.5992572", "0.5989481", "0.5976325", "0.5969788", "0.59693295", "0.596034", "0.5958763", "0.59479374", "0.5937843", "0.59360904", "0.59339225", "0.592322", "0.5921219", "0.5916743", "0.59078866", "0.59038395", "0.59038395", "0.59024584", "0.5899537", "0.5898758", "0.58977324", "0.5896446", "0.58939207", "0.58929545", "0.5884189", "0.58813095", "0.58813095", "0.5878434", "0.58779883", "0.58773077", "0.58706975", "0.58699703", "0.5868917", "0.58652824", "0.58634895", "0.58551204", "0.58537054", "0.5851825", "0.5851232", "0.5851232", "0.58474183", "0.58474183", "0.58474183", "0.58474183", "0.58474183", "0.58474183", "0.58474183", "0.58336794", "0.5832906", "0.5832021", "0.5830936", "0.5819233", "0.58165604", "0.58127445", "0.58027035", "0.58027035", "0.58027035", "0.5799634", "0.57931346", "0.5791746", "0.57901406", "0.57901406", "0.5788083", "0.5785677", "0.57840323", "0.57821053", "0.5779305", "0.5775511", "0.57689625", "0.5768548", "0.5765874", "0.5765716", "0.57646614", "0.5759343", "0.5754064", "0.5752913", "0.57419544", "0.57394564" ]
0.0
-1
/ renamed from: OooO00o reason: collision with other method in class
public boolean m16299OooO00o() { return this.OooO00o.OooO00o().m16143OooO00o() != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_4270() {}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract void mo70713b();", "@Override\n public void perish() {\n \n }", "public abstract Object mo1771a();", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public abstract Object mo26777y();", "@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\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "protected abstract Set method_1559();", "@Override\n\tpublic void einkaufen() {\n\t}", "public abstract Object mo1185b();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract void mo56925d();", "public void m20445OooO00o() {\n OooO0OO();\n }", "public void mo21825b() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public void method_191() {}", "public abstract void mo35054b();", "protected void mo6255a() {\n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "public void method_201() {}", "public abstract Member mo23408O();", "@Override\n\tprotected void getExras() {\n\n\t}", "public void method_202() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void mo27464a();", "public void mo55254a() {\n }", "@Override\n protected void prot() {\n }", "public void mo5382o() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "public void mo1531a() {\n }", "public abstract void mo30696a();", "public void method_6349() {\r\n super.method_6349();\r\n }", "public void mo38117a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override // com.zhihu.android.sugaradapter.SugarHolder\n /* renamed from: a */\n public void mo56529a(Object obj) {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public abstract void mo6549b();", "public void mo21793R() {\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected FanisamBato(){\n\t}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "private stendhal() {\n\t}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "public void method_115() {}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public abstract void mo27386d();", "public abstract void mo27385c();", "public void method_203() {}", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void mo115188a() {\n }", "public abstract void mo42331g();", "public abstract String mo118046b();", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void mo21791P() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public void method_6191() {\r\n super.method_6191();\r\n }", "public void mo21782G() {\n }", "public abstract void mo20899UO();", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo21779D() {\n }", "public void mo21877s() {\n }", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "protected OpinionFinding() {/* intentionally empty block */}", "public abstract void mo1184a(Object obj);", "public void mo23813b() {\n }", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public abstract String mo13682d();" ]
[ "0.6362375", "0.63285166", "0.6305003", "0.6286241", "0.62810403", "0.6253446", "0.6215956", "0.6212772", "0.6189105", "0.61816686", "0.6175335", "0.617423", "0.61632466", "0.615604", "0.6142312", "0.6086865", "0.60743415", "0.60552585", "0.60319257", "0.60118306", "0.60070497", "0.59985334", "0.5991886", "0.5991886", "0.5989149", "0.5975164", "0.5970319", "0.5970102", "0.5959243", "0.5956719", "0.59481287", "0.59358793", "0.5935728", "0.59340954", "0.592354", "0.592136", "0.591589", "0.59084886", "0.5901999", "0.5901999", "0.59005713", "0.58990246", "0.5898137", "0.5898048", "0.58963704", "0.5893483", "0.5893274", "0.5884083", "0.5880495", "0.5880495", "0.5878951", "0.5877588", "0.5876505", "0.58705944", "0.58703977", "0.58668077", "0.586522", "0.5861403", "0.58546704", "0.58530474", "0.5851736", "0.5851408", "0.58496857", "0.58477443", "0.58477443", "0.58477443", "0.58477443", "0.58477443", "0.58477443", "0.58477443", "0.58336824", "0.5831925", "0.5830727", "0.5828963", "0.5818563", "0.5816866", "0.5812815", "0.58016783", "0.58016783", "0.58016783", "0.57991284", "0.5792131", "0.57914674", "0.578931", "0.578931", "0.5788207", "0.57850295", "0.5783992", "0.5782837", "0.57789385", "0.57751614", "0.5768202", "0.57670736", "0.5766028", "0.5765488", "0.5764026", "0.5757609", "0.5753468", "0.5750264", "0.574334", "0.57393736" ]
0.0
-1
/ Support/Healer, decent in melee.
public static Unit will(){ Unit unit = new Unit("Will", "P_U_KnightsErrant", 12, 5, 10, 17, 7); // P_U_KnightsErrant // C_U_PrecursorKnightOfficer unit.addWep(new Weapon("Longsword",9,5)); unit.addActive(ActiveType.HEAL); unit.addPassive(PassiveType.AURA); return unit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "private void selfHeal() {\n\t\t\n\t\t//IF the Droid is carrying an item...\n\t\tif (this.getItemCarried() != null){\n\t\t\t\n\t\t\t//If the item is an oil can...\n\t\t\tif (this.getItemCarried().getShortDescription() == \"an oil can\" ) {\n\t\t\t\n\t\t\t\t//If the Droids health is LOWER than half...\n\t\t\t\tif((this.getInitialHP()/2) > this.getHitpoints()) {\n\t\t\t\t\tsay(this.getShortDescription() + \" is at or below half HP. \"\n\t\t\t\t\t\t\t+ \" Healing itself...\");\n\t\t\t\t\t\n\t\t\t\t\t//Implementing a new HealDroid method (Droid heals on itself)\n\t\t\t\t\t//public HealDroid(SWEntityInterface theTarget, MessageRenderer m) {\n\t\t\t\t\tHealDroid droidHeal = new HealDroid(this, messageRenderer);\n\t\t\t\t\t\n\t\t\t\t\tscheduler.schedule(droidHeal, this, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "private RewardItem calculateRewardItem(final L2PcInstance lastAttacker, final L2DropData drop, final int levelModifier, final boolean isSweep)\n\t{\n\t\t// Get default drop chance\n\t\tif (Config.HIGH_RATE_SERVER_DROPS && !drop.isQuestDrop() && drop.getItemId() != 57)\n\t\t{ // it's not adena-->check if drop has an epic jewel\n\t\t\t\n\t\t\t// ant queen,orfen,core,frintezza,baium,antharas,valakas,zaken,stones\n\t\t\tif (drop.getItemId() == 6660 || drop.getItemId() == 6661 || drop.getItemId() == 6662 || drop.getItemId() == 8191 || drop.getItemId() == 6658 || drop.getItemId() == 6656 || drop.getItemId() == 6657 || drop.getItemId() == 6659 || drop.getItemId() >= 6360 && drop.getItemId() <= 6362 || drop.getItemId() >= 8723 && drop.getItemId() <= 8762)\n\t\t\t{\n\t\t\t\t// if epic jewel, seal stones or life stone, continue\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfloat dropChance = 0;\n\t\t\n\t\tswitch (drop.getItemId())\n\t\t{\n\t\t\tcase 6662:\n\t\t\t{ // core ring\n\t\t\t\tif (Config.CORE_RING_CHANCE > 0)\n\t\t\t\t{\n\t\t\t\t\tdropChance = (float) 10000 * Config.CORE_RING_CHANCE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdropChance = drop.getChance();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6661:\n\t\t\t{ // orfen earring\n\t\t\t\tif (Config.ORFEN_EARRING_CHANCE > 0)\n\t\t\t\t{\n\t\t\t\t\tdropChance = (float) 10000 * Config.ORFEN_EARRING_CHANCE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdropChance = drop.getChance();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6659:\n\t\t\t{ // zaken earring\n\t\t\t\tif (Config.ZAKEN_EARRING_CHANCE > 0)\n\t\t\t\t{\n\t\t\t\t\tdropChance = (float) 10000 * Config.ZAKEN_EARRING_CHANCE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdropChance = drop.getChance();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6660:\n\t\t\t{ // aq ring\n\t\t\t\tif (Config.QA_RING_CHANCE > 0)\n\t\t\t\t{\n\t\t\t\t\tdropChance = (float) 10000 * Config.QA_RING_CHANCE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdropChance = drop.getChance();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tdropChance = drop.getChance();\n\t\t\t}\n\t\t}\n\t\t\n\t\tint deepBlueDrop = 1;\n\t\t\n\t\tif (Config.DEEPBLUE_DROP_RULES)\n\t\t{\n\t\t\tif (levelModifier > 0)\n\t\t\t{\n\t\t\t\t// We should multiply by the server's drop rate, so we always get a low chance of drop for deep blue mobs.\n\t\t\t\t// NOTE: This is valid only for adena drops! Others drops will still obey server's rate\n\t\t\t\tdeepBlueDrop = 3;\n\t\t\t\t\n\t\t\t\tif (drop.getItemId() == 57)\n\t\t\t\t{\n\t\t\t\t\tdeepBlueDrop *= isRaid() ? 1 : Config.RATE_DROP_ITEMS;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (deepBlueDrop == 0)\n\t\t{\n\t\t\tdeepBlueDrop = 1;\n\t\t}\n\t\t\n\t\t// Check if we should apply our maths so deep blue mobs will not drop that easy\n\t\tif (Config.DEEPBLUE_DROP_RULES)\n\t\t{\n\t\t\tdropChance = (drop.getChance() - drop.getChance() * levelModifier / 100) / deepBlueDrop;\n\t\t}\n\t\t\n\t\t// Applies Drop rates\n\t\tif (drop.getItemId() == 57)\n\t\t{\n\t\t\tif (this instanceof L2RaidBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ADENA_RAID;\n\t\t\t}\n\t\t\telse if (this instanceof L2GrandBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ADENA_BOSS;\n\t\t\t}\n\t\t\telse if (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ADENA_MINON;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdropChance *= Config.RATE_DROP_ADENA;\n\t\t\t\t\n\t\t\t\tif (lastAttacker.isVIP())\n\t\t\t\t{\n\t\t\t\t\tdropChance *= Config.VIP_ADENA_RATE;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (isSweep)\n\t\t{\n\t\t\tif (this instanceof L2RaidBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.SPOIL_RAID;\n\t\t\t}\n\t\t\telse if (this instanceof L2GrandBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.SPOIL_BOSS;\n\t\t\t}\n\t\t\telse if (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.SPOIL_MINON;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdropChance *= Config.RATE_DROP_SPOIL;\n\t\t\t\t\n\t\t\t\tif (lastAttacker.isVIP())\n\t\t\t\t{\n\t\t\t\t\tdropChance *= Config.VIP_SPOIL_RATE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this instanceof L2RaidBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ITEMS_RAID;\n\t\t\t}\n\t\t\telse if (this instanceof L2GrandBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ITEMS_BOSS;\n\t\t\t}\n\t\t\telse if (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ITEMS_MINON;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdropChance *= Config.RATE_DROP_ITEMS;\n\t\t\t\t\n\t\t\t\tif (lastAttacker.isVIP())\n\t\t\t\t{\n\t\t\t\t\tdropChance *= Config.VIP_DROP_RATE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Config.L2JMOD_CHAMPION_ENABLE && isChampion())\n\t\t{\n\t\t\tdropChance *= Config.L2JMOD_CHAMPION_REWARDS;\n\t\t}\n\t\t\n\t\t// Round drop chance\n\t\tdropChance = Math.round(dropChance);\n\t\t\n\t\t// Set our limits for chance of drop\n\t\tif (dropChance < 1)\n\t\t{\n\t\t\tdropChance = 1;\n\t\t}\n\t\t\n\t\t// If item is adena, dont drop multiple time\n\t\t// if (drop.getItemId() == 57 && dropChance > L2DropData.MAX_CHANCE)\n\t\t// dropChance = L2DropData.MAX_CHANCE;\n\t\t\n\t\t// Get min and max Item quantity that can be dropped in one time\n\t\tfinal int minCount = drop.getMinDrop();\n\t\tfinal int maxCount = drop.getMaxDrop();\n\t\tint itemCount = 0;\n\t\t\n\t\tif (!Config.MULTIPLY_QUANTITY_BY_CHANCE && dropChance > L2DropData.MAX_CHANCE && drop.getItemId() != 57)\n\t\t{\n\t\t\tdropChance = L2DropData.MAX_CHANCE;\n\t\t}\n\t\t\n\t\t// Count and chance adjustment for high rate servers\n\t\tif (dropChance > L2DropData.MAX_CHANCE && !Config.PRECISE_DROP_CALCULATION)\n\t\t{\n\t\t\tfinal int multiplier = (int) dropChance / L2DropData.MAX_CHANCE;\n\t\t\t\n\t\t\tif (minCount < maxCount)\n\t\t\t{\n\t\t\t\titemCount += Rnd.get(minCount * multiplier, maxCount * multiplier);\n\t\t\t}\n\t\t\telse if (minCount == maxCount)\n\t\t\t{\n\t\t\t\titemCount += minCount * multiplier;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\titemCount += multiplier;\n\t\t\t}\n\t\t\t\n\t\t\tdropChance = dropChance % L2DropData.MAX_CHANCE;\n\t\t}\n\t\t\n\t\t// Check if the Item must be dropped\n\t\tfinal int random = Rnd.get(L2DropData.MAX_CHANCE);\n\t\t\n\t\twhile (random < dropChance)\n\t\t{\n\t\t\t// Get the item quantity dropped\n\t\t\tif (minCount < maxCount)\n\t\t\t{\n\t\t\t\titemCount += Rnd.get(minCount, maxCount);\n\t\t\t}\n\t\t\telse if (minCount == maxCount)\n\t\t\t{\n\t\t\t\titemCount += minCount;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\titemCount++;\n\t\t\t}\n\t\t\t\n\t\t\t// Prepare for next iteration if dropChance > L2DropData.MAX_CHANCE\n\t\t\tdropChance -= L2DropData.MAX_CHANCE;\n\t\t}\n\t\tif (Config.L2JMOD_CHAMPION_ENABLE)\n\t\t{\n\t\t\tif ((drop.getItemId() == 57 || drop.getItemId() >= 6360 && drop.getItemId() <= 6362) && isChampion())\n\t\t\t{\n\t\t\t\titemCount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (drop.getItemId() >= 6360 && drop.getItemId() <= 6362)\n\t\t{\n\t\t\titemCount *= Config.RATE_DROP_SEAL_STONES;\n\t\t}\n\t\t\n\t\tif (itemCount > 0)\n\t\t{\n\t\t\treturn new RewardItem(drop.getItemId(), itemCount);\n\t\t}\n\t\telse if (itemCount == 0 && Config.DEBUG)\n\t\t{\n\t\t\tLOGGER.debug(\"Roll produced 0 items to drop...\");\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w4);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w4);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w4.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w4.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n }", "public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }", "public TransactionResponse buyEnchant() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\tNotification not = hc.getNotify();\r\n \t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\ttry {\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tString nenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tint shopstock = 0;\r\n \t\t\tshopstock = (int) hyperObject.getStock();\r\n \t\t\tif (shopstock >= 1) {\r\n \t\t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\t\tdouble price = hyperObject.getCost(EnchantmentClass.fromString(mater));\r\n \t\t\t\tprice = price + hyperObject.getPurchaseTax(price);\r\n \t\t\t\tif (price != 123456789) {\r\n \t\t\t\t\tif (!im.containsEnchantment(p.getItemInHand(), ench)) {\r\n \t\t\t\t\t\tif (acc.checkFunds(price, p)) {\r\n \t\t\t\t\t\t\tif (im.canAcceptEnchantment(p.getItemInHand(), ench) && p.getItemInHand().getAmount() == 1) {\r\n \t\t\t\t\t\t\t\thyperObject.setStock(shopstock - 1);\r\n \t\t\t\t\t\t\t\tacc.withdraw(price, p);\r\n \t\t\t\t\t\t\t\tacc.depositShop(price);\r\n \t\t\t\t\t\t\t\tif (hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\")) {\r\n \t\t\t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tint l = hyperObject.getName().length();\r\n \t\t\t\t\t\t\t\tString lev = hyperObject.getName().substring(l - 1, l);\r\n \t\t\t\t\t\t\t\tint level = Integer.parseInt(lev);\r\n \t\t\t\t\t\t\t\tim.addEnchantment(p.getItemInHand(), ench, level);\r\n \t\t\t\t\t\t\t\tboolean stax;\r\n \t\t\t\t\t\t\t\tstax = Boolean.parseBoolean(hyperObject.getIsstatic());\r\n \t\t\t\t\t\t\t\tdouble taxrate;\r\n \t\t\t\t\t\t\t\tif (!stax) {\r\n \t\t\t\t\t\t\t\t\ttaxrate = hc.getYaml().getConfig().getDouble(\"config.enchanttaxpercent\");\r\n \t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\ttaxrate = hc.getYaml().getConfig().getDouble(\"config.statictaxpercent\");\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tdouble taxpaid = price - (price / (1 + taxrate / 100));\r\n \t\t\t\t\t\t\t\ttaxpaid = calc.twoDecimals(taxpaid);\r\n \t\t\t\t\t\t\t\tprice = calc.twoDecimals(price);\r\n \t\t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"ENCHANTMENT_PURCHASE_MESSAGE\"), 1, price, hyperObject.getName(), calc.twoDecimals(taxpaid)), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tlog.writeSQLLog(p.getName(), \"purchase\", hyperObject.getName(), 1.0, price, taxpaid, playerecon, type);\r\n \r\n \t\t\t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\t\t\tnot.setNotify(hyperObject.getName(), mater, playerecon);\r\n \t\t\t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\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\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_ALREADY_HAS_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"THE_SHOP_DOESNT_HAVE_ENOUGH\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction buyEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "public TransactionResponse sellEnchant() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\tNotification not = hc.getNotify();\r\n \t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\ttry {\r\n \t\t\tString nenchant = \"\";\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tnenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tint lvl = Integer.parseInt(hyperObject.getName().substring(hyperObject.getName().length() - 1, hyperObject.getName().length()));\r\n \t\t\tint truelvl = im.getEnchantmentLevel(p.getItemInHand(), ench);\r\n \t\t\tif (im.containsEnchantment(p.getItemInHand(), ench) && lvl == truelvl) {\r\n \t\t\t\tdouble dura = p.getItemInHand().getDurability();\r\n \t\t\t\tdouble maxdura = p.getItemInHand().getType().getMaxDurability();\r\n \t\t\t\tdouble duramult = (1 - dura / maxdura);\r\n \t\t\t\tif (p.getItemInHand().getType().equals(Material.ENCHANTED_BOOK)) {\r\n \t\t\t\t\tduramult = 1;\r\n \t\t\t\t}\r\n \t\t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\t\tdouble price = hyperObject.getValue(EnchantmentClass.fromString(mater));\r\n \t\t\t\tdouble fprice = duramult * price;\r\n \t\t\t\tboolean sunlimited = hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\");\r\n \t\t\t\tif (acc.checkshopBalance(fprice) || sunlimited) {\r\n \t\t\t\t\tim.removeEnchantment(p.getItemInHand(), ench);\r\n \t\t\t\t\tdouble shopstock = hyperObject.getStock();\r\n \t\t\t\t\thyperObject.setStock(shopstock + duramult);\r\n \t\t\t\t\tdouble salestax = hp.getSalesTax(fprice);\r\n \t\t\t\t\tacc.deposit(fprice - salestax, p);\r\n \t\t\t\t\tacc.withdrawShop(fprice - salestax);\r\n \t\t\t\t\tif (sunlimited) {\r\n \t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tfprice = calc.twoDecimals(fprice);\r\n \t\t\t\t\tresponse.addSuccess(L.f(L.get(\"ENCHANTMENT_SELL_MESSAGE\"), 1, calc.twoDecimals(fprice), hyperObject.getName(), calc.twoDecimals(salestax)), calc.twoDecimals(fprice - salestax), hyperObject);\r\n \t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t}\r\n \t\t\t\t\tlog.writeSQLLog(p.getName(), \"sale\", hyperObject.getName(), 1.0, fprice - salestax, salestax, playerecon, type);\r\n \r\n \t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\tnot.setNotify(hyperObject.getName(), mater, playerecon);\r\n \t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"SHOP_NOT_ENOUGH_MONEY\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"ITEM_DOESNT_HAVE_ENCHANTMENT\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction sellEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "public int getHealthGain();", "private void functionalInterface1() {\n\t\tcharmander.heal();\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psMinimalDamage); // -10\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psHugeDamage); // -20\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\t}", "public void decreaseHealingNumber() {\n healingNumber--;\n }", "public StarAbilityHeal() {\n\t\t\n\t\tthis.setMaxLevel(4);\n\t\tthis.setEffectable(Effectable.Heal);\n\t\t\n\t}", "public void heal() {\n delegate.heal();\n }", "public int giveDamage();", "public int attack(boolean weakness){\r\n\t\tint damage = 0;\r\n\t\t\r\n\t\tif (energy <= 0) {\r\n\t\t\tSystem.out.println(\"no energy to attack\");\r\n\t\t\tenergy = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (weakness == true) {\r\n\t\t\t\tenergy -= 2;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tenergy -= 1;\r\n\t\t\t}\r\n\t\t\texp += 1;\r\n\t\t\tdamage = 1;\r\n\t\t}\r\n\t\treturn damage;\r\n\t}", "public void penalize(int[] fighter, int grade) {\n//choose which skill to penalize\n Random rnd = new Random();\n int penalty = ATTACK;\n if (rnd.nextBoolean()) {\n penalty = DEFENSE;\n }\n//It is penalized. Low minimum up to 1\n fighter[penalty] -= grade;\n if (fighter[penalty] < 1) {\n fighter[penalty] = 1;\n }\n }", "public void buyFuel() {\n this.fuelMod++;\n fuelMax += +750 * fuelMod;\n }", "public void buyDecreaseDamage() {\n this.decreaseDamage++;\n }", "public void buyhouse(int cost){\n\t\n}", "public short getSiegeWeaponDamage();", "private int heavyAttack() {\n return attack(6, 2);\n }", "public void heal()\n {\n\tif (potions <= 0) {\n\t System.out.println(\"Out of potions. :(\");\n\t}\n\telse {\n\t HP += 1300/4;\n\t if (HP > 1300 ){\n\t\tHP = 1300;\n\t }\n System.out.println(\"Your HP is now \" + HP + \".\");\n\t potions -= 1;\n\t}\n }", "private static void berserkerMelee(Player player) {\n\t\tbankInventoryAndEquipment(player);\n\t\tspawnInventory(player, BerserkerMelee.inventory);\n\t\tspawnEquipment(player, BerserkerMelee.equipmentSet(player));\n\t\tupdateEquipment(player);\n\t\theal(player, true, true);\n\t\tsetCombatSkills(player, \"BERSERKER\", false, null);\n\t\tsetPrayerAndMagicBook(player, \"LUNAR\");\n\t\tPresets.isPresetFlagged(player, player.bankIsFullWhileUsingPreset);\n\t}", "public static double getWeaponDamage(Item weapon, Skill attStrength) {\n/* 2348 */ if (weapon.isBodyPart() && weapon.getAuxData() != 100) {\n/* */ \n/* */ try {\n/* */ \n/* 2352 */ float f = Server.getInstance().getCreature(weapon.getOwnerId()).getCombatDamage(weapon);\n/* */ \n/* 2354 */ return (f + Server.rand.nextFloat() * f * 2.0F);\n/* */ }\n/* 2356 */ catch (NoSuchCreatureException nsc) {\n/* */ \n/* 2358 */ logger.log(Level.WARNING, \"Could not find Creature owner of weapon: \" + weapon + \" due to \" + nsc.getMessage(), (Throwable)nsc);\n/* */ \n/* */ }\n/* 2361 */ catch (NoSuchPlayerException nsp) {\n/* */ \n/* 2363 */ logger.log(Level.WARNING, \"Could not find Player owner of weapon: \" + weapon + \" due to \" + nsp.getMessage(), (Throwable)nsp);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2368 */ float base = 6.0F;\n/* 2369 */ if (weapon.isWeaponSword()) {\n/* */ \n/* 2371 */ base = 24.0F;\n/* */ }\n/* 2373 */ else if (weapon.isWeaponAxe()) {\n/* 2374 */ base = 30.0F;\n/* 2375 */ } else if (weapon.isWeaponPierce()) {\n/* 2376 */ base = 12.0F;\n/* 2377 */ } else if (weapon.isWeaponSlash()) {\n/* 2378 */ base = 18.0F;\n/* 2379 */ } else if (weapon.isWeaponCrush()) {\n/* 2380 */ base = 36.0F;\n/* 2381 */ } else if (weapon.isBodyPart() && weapon.getAuxData() == 100) {\n/* */ \n/* 2383 */ base = 6.0F;\n/* */ } \n/* 2385 */ if (weapon.isWood()) {\n/* 2386 */ base *= 0.1F;\n/* 2387 */ } else if (weapon.isTool()) {\n/* 2388 */ base *= 0.3F;\n/* */ } \n/* 2390 */ base = (float)(base * (1.0D + attStrength.getKnowledge(0.0D) / 100.0D));\n/* */ \n/* 2392 */ float randomizer = (50.0F + Server.rand.nextFloat() * 50.0F) / 100.0F;\n/* */ \n/* 2394 */ return base + (randomizer * base * 4.0F * weapon.getQualityLevel() * weapon.getDamagePercent()) / 10000.0D;\n/* */ }", "private void strengthen(float hp) {\n this.hp += hp;\n if (this.hp > MAX_HP) {\n this.hp = MAX_HP;\n }\n }", "public void takedmg(int dmg){\n curHp -= dmg;\n }", "void heal(Heros h);", "public void buyHullUpgrade()\n {\n if(play_state.getMoney() >= hull_upgrade_cost) {\n play_state.setMoney(play_state.getMoney() - hull_upgrade_cost);\n hull_upgrade_cost += 100;\n play_state.getDriller().addMax_health(10);\n\n }\n }", "private void takeDamage(int damage){ health -= damage;}", "public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }", "public void heal2()\r\n {\r\n this.health = 900;\r\n Story.healText2();\r\n }", "public int healHero(int i) {\n int heal;\n switch (i) {\n case 1:\n heal = rand.nextInt(4) + 1;\n HP.replenish(heal);\n return heal;\n case 2:\n heal = rand.nextInt(5) + 2;\n HP.replenish(heal);\n return heal;\n case 3:\n heal = rand.nextInt(6) + 3;\n HP.replenish(heal);\n return heal;\n case 4:\n heal = rand.nextInt(9) + 5;\n HP.replenish(heal);\n return heal;\n case 5: // healing hero to full\n HP.replenish(100);\n default:\n return 0;\n }\n }", "void hurt(int strength) {\n life -= strength;\n if (life < 0)\n life = 0;\n }", "static void healing_challenge3() { //this is where the player will be able to heal himself/herself in boss challenge\n System.out.println(\" You open up the bag to check your inventory...\");\n enter = next.nextLine();\n if(potions <= zero) {\n System.out.println(username + \" feels something in the bag...\");\n System.out.println(\"\\n\");\n System.out.println(\"There is a large object inside, but turns out to be your spell book\");\n enter = next.nextLine();\n System.out.println(\"UH! OH! You ran out of potions. GUESS YOUR ON YOUR OWN!!!\");\n System.out.println(\"\\n\");\n }else if(potions > zero && playerhealth != 3500) { //this makes sure their aren't any loop holes in the game for cheats\n System.out.println(username + \" found a potion in the bag.\");\n System.out.println(username + \" takes the new blue potion and consumes it entirely...\");\n System.out.println(username + \" gained 300 HP points.\");\n playerhealth = playerhealth + 300; //player's health is healed\n potions--;//put it like this, not potions = potions--; This would break the game...\n if(playerhealth > 3500){ //in case that player heals and adds 300 and health goes higher than maixmum\n playerhealth = 3500;\n }\n //in case if player tries to cheat with the maximum health\n }else if (playerhealth == 3500) {\n System.out.println(\"You are at your maximum health...You can't raise it any higher than that...\");\n System.out.println(\"NICE TRY!\");\n } \n }", "public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}", "private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }", "public void OnDamage(AI ai, int aTK, float f) {\n\tif(DamagedTimer < 0.8f)\n\t\treturn;\n\tvel.x = f;\n\tvel.y = 3;\n\tDamagedTimer = 0;\n\tgrounded = false;\n\taTK -= (getDEF()*0.8f);\n\tif(aTK <= 0)\n\t\taTK = 1;\n\tHP -= aTK;\n\tInventory.CurrentInventory.dmgTxts.add(new dmgText(pos.x, pos.y+1, aTK));\n\t\n\tSoundManager.PlaySound(\"playerHurt\",3);\n\t\n\t\n}", "public Melee(ScrGame game, Player player){\n super();\n this.game = game;\n this.player = player;\n isPlayer = true;\n\n nSpray = 0;\n nShotsPerFire = 1;\n nAmmo = 1;\n nAmmoMax = nAmmo;\n }", "protected abstract float _getGrowthChance();", "public short getHandThrowDamage();", "void evadeAttack(IUnit attacker, int incomingDamage);", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public void heal(int healAmt) {\r\n\t\thealth += healAmt;\r\n\t\tif (health >= maxHealth)\r\n\t\t\thealth = maxHealth;\r\n\t\t_checkInvariant();\r\n\t}", "public int getHealthCost();", "public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}", "public boolean use(int value){durability -= value; if(durability == 0) return true; return false;}", "@Deprecated\n/* */ protected static boolean performAttack(int pos, boolean aiming, Creature performer, Skills performerSkills, Item attWeapon, Item target, double attBonus, Skill attackerFightSkill, int counter) {\n/* 3189 */ if (!performer.hasLink())\n/* 3190 */ return true; \n/* 3191 */ boolean done = false;\n/* 3192 */ Skill primWeaponSkill = null;\n/* 3193 */ int skillnum = -10;\n/* 3194 */ performer.getStatus().modifyStamina(-1000.0F);\n/* 3195 */ if (attWeapon != null) {\n/* */ \n/* */ try {\n/* */ \n/* 3199 */ skillnum = attWeapon.getPrimarySkill();\n/* 3200 */ primWeaponSkill = performerSkills.getSkill(skillnum);\n/* */ }\n/* 3202 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 3204 */ if (skillnum != -10) {\n/* 3205 */ primWeaponSkill = performerSkills.learn(skillnum, 1.0F);\n/* */ }\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 3215 */ Skill attStrengthSkill = performerSkills.getSkill(102);\n/* */ }\n/* 3217 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 3219 */ Skill attStrengthSkill = performerSkills.learn(102, 1.0F);\n/* 3220 */ logger.log(Level.WARNING, performer.getName() + \" had no strength. Weird.\");\n/* */ } \n/* */ \n/* 3223 */ double bonus = 0.0D;\n/* 3224 */ if (primWeaponSkill != null) {\n/* */ \n/* 3226 */ boolean dryrun = (primWeaponSkill.getKnowledge(0.0D) >= 20.0D);\n/* 3227 */ bonus = Math.max(0.0D, primWeaponSkill\n/* */ \n/* 3229 */ .skillCheck((attWeapon.getCurrentQualityLevel() + 10.0F), attBonus, dryrun, \n/* 3230 */ Math.max(1, counter / 2)));\n/* */ } \n/* */ \n/* 3233 */ if (aiming) {\n/* */ \n/* 3235 */ int rand = 10;\n/* 3236 */ if (pos == 1) {\n/* */ \n/* 3238 */ rand = Server.rand.nextInt(100);\n/* 3239 */ bonus = -60.0D;\n/* 3240 */ if (rand < 50) {\n/* 3241 */ pos = 17;\n/* */ }\n/* 3243 */ } else if (pos == 29) {\n/* */ \n/* 3245 */ rand = Server.rand.nextInt(100);\n/* 3246 */ bonus = -80.0D;\n/* 3247 */ if (rand < 98) {\n/* 3248 */ pos = 29;\n/* 3249 */ } else if (rand < 99) {\n/* 3250 */ pos = 18;\n/* 3251 */ } else if (rand < 100) {\n/* 3252 */ pos = 19;\n/* */ } \n/* 3254 */ } else if (pos == 2) {\n/* */ \n/* 3256 */ rand = Server.rand.nextInt(20);\n/* 3257 */ bonus = -40.0D;\n/* 3258 */ if (rand < 5) {\n/* 3259 */ pos = 21;\n/* 3260 */ } else if (rand < 7) {\n/* 3261 */ pos = 27;\n/* 3262 */ } else if (rand < 9) {\n/* 3263 */ pos = 26;\n/* 3264 */ } else if (rand < 12) {\n/* 3265 */ pos = 32;\n/* 3266 */ } else if (rand < 14) {\n/* 3267 */ pos = 23;\n/* 3268 */ } else if (rand < 18) {\n/* 3269 */ pos = 24;\n/* 3270 */ } else if (rand < 20) {\n/* 3271 */ pos = 25;\n/* */ } \n/* 3273 */ } else if (pos == 3) {\n/* */ \n/* 3275 */ rand = Server.rand.nextInt(10);\n/* 3276 */ bonus = -30.0D;\n/* 3277 */ if (rand < 5) {\n/* 3278 */ pos = 5;\n/* 3279 */ } else if (rand < 9) {\n/* 3280 */ pos = 9;\n/* */ } else {\n/* 3282 */ pos = 13;\n/* */ } \n/* 3284 */ } else if (pos == 4) {\n/* */ \n/* 3286 */ rand = Server.rand.nextInt(10);\n/* 3287 */ bonus = -30.0D;\n/* 3288 */ if (rand < 5) {\n/* 3289 */ pos = 6;\n/* 3290 */ } else if (rand < 9) {\n/* 3291 */ pos = 10;\n/* */ } else {\n/* 3293 */ pos = 14;\n/* */ } \n/* 3295 */ } else if (pos == 34) {\n/* */ \n/* 3297 */ rand = Server.rand.nextInt(20);\n/* 3298 */ bonus = -30.0D;\n/* 3299 */ if (rand < 5) {\n/* 3300 */ pos = 7;\n/* 3301 */ } else if (rand < 9) {\n/* 3302 */ pos = 11;\n/* 3303 */ } else if (rand < 10) {\n/* 3304 */ pos = 15;\n/* 3305 */ } if (rand < 15) {\n/* 3306 */ pos = 8;\n/* 3307 */ } else if (rand < 19) {\n/* 3308 */ pos = 12;\n/* */ } else {\n/* 3310 */ pos = 16;\n/* */ } \n/* */ } \n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* 3317 */ pos = PracticeDollBehaviour.getRandomWoundPos();\n/* */ }\n/* 3319 */ catch (Exception ex) {\n/* */ \n/* 3321 */ logger.log(Level.WARNING, \"Could not get random wound position on \" + target\n/* 3322 */ .getName() + \" due to \" + ex.getMessage(), ex);\n/* */ } \n/* */ } \n/* 3325 */ double attCheck = 0.0D;\n/* */ \n/* */ \n/* 3328 */ if (primWeaponSkill != null) {\n/* */ \n/* 3330 */ boolean dryrun = (attackerFightSkill.getKnowledge(0.0D) >= 20.0D);\n/* 3331 */ attCheck = attackerFightSkill.skillCheck(10.0D, attWeapon, bonus, dryrun, Math.max(1, counter / 2));\n/* */ } else {\n/* */ \n/* 3334 */ attCheck = attackerFightSkill.skillCheck(10.0D, attWeapon, bonus, true, Math.max(1, counter));\n/* 3335 */ } String attString = getAttackString(performer, attWeapon);\n/* 3336 */ if (attCheck > 0.0D) {\n/* */ \n/* */ \n/* */ \n/* 3340 */ double damage = Math.max(0.1F, Server.rand.nextFloat() * Weapon.getBaseDamageForWeapon(attWeapon) / 10.0F);\n/* */ \n/* */ \n/* */ \n/* 3344 */ if (primWeaponSkill != null) {\n/* 3345 */ attWeapon.setDamage(attWeapon.getDamage() + 0.05F * Weapon.getBaseDamageForWeapon(attWeapon));\n/* */ }\n/* */ \n/* */ \n/* 3349 */ String broadCastString = performer.getNameWithGenus() + \" \" + attString + \"s \" + target.getNameWithGenus() + \" \" + getStrengthString(damage) + \" in the \" + PracticeDollBehaviour.getWoundLocationString(pos) + \".\";\n/* */ \n/* 3351 */ performer.getCommunicator().sendSafeServerMessage(\"You \" + attString + \" \" + target\n/* 3352 */ .getNameWithGenus() + \" \" + getStrengthString(damage) + \" in the \" + \n/* 3353 */ PracticeDollBehaviour.getWoundLocationString(pos) + \".\");\n/* 3354 */ Server.getInstance().broadCastAction(broadCastString, performer, 3);\n/* */ \n/* 3356 */ done = target.setDamage(target.getDamage() + (float)damage * target.getDamageModifier());\n/* */ \n/* 3358 */ int tilex = (int)target.getPosX() >> 2;\n/* 3359 */ int tiley = (int)target.getPosY() >> 2;\n/* */ \n/* 3361 */ String sstring = \"sound.combat.parry1\";\n/* 3362 */ int x = Server.rand.nextInt(3);\n/* 3363 */ if (x == 0) {\n/* 3364 */ sstring = \"sound.combat.parry2\";\n/* 3365 */ } else if (x == 1) {\n/* 3366 */ sstring = \"sound.combat.parry3\";\n/* 3367 */ } SoundPlayer.playSound(sstring, target, 1.6F);\n/* 3368 */ performer.playAnimation(\"practice_cut\", false, target.getWurmId());\n/* 3369 */ if (done)\n/* */ {\n/* 3371 */ broadCastString = target.getNameWithGenus() + \" is no more.\";\n/* 3372 */ Server.getInstance().broadCastMessage(broadCastString, tilex, tiley, performer.isOnSurface(), 3);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 3377 */ String sstring = \"sound.combat.miss.light\";\n/* 3378 */ if (attCheck < -80.0D) {\n/* 3379 */ sstring = \"sound.combat.miss.heavy\";\n/* 3380 */ } else if (attCheck < -40.0D) {\n/* 3381 */ sstring = \"sound.combat.miss.med\";\n/* 3382 */ } SoundPlayer.playSound(sstring, target, 1.6F);\n/* 3383 */ if (performer.spamMode()) {\n/* */ \n/* 3385 */ if (aiming) {\n/* 3386 */ performer.getCommunicator().sendNormalServerMessage(\"You miss.\");\n/* */ } else {\n/* 3388 */ performer.getCommunicator().sendNormalServerMessage(\"You try to \" + attString + \" \" + target\n/* 3389 */ .getNameWithGenus() + \" in the \" + \n/* 3390 */ PracticeDollBehaviour.getWoundLocationString(pos) + \" but \" + \n/* 3391 */ getMissString(true, attCheck));\n/* */ } \n/* 3393 */ } else if (aiming) {\n/* 3394 */ performer.getCommunicator().sendNormalServerMessage(\"You miss.\");\n/* */ } \n/* */ } \n/* 3397 */ return done;\n/* */ }", "@Deprecated\n/* */ protected static boolean performAttack(int pos, boolean aiming, Creature performer, Skills performerSkills, Creature defender, Skills defenderSkills, Item attWeapon, Item defPrimWeapon, double attBonus, double defBonus, Skill attackerFightSkill, Skill defenderFightSkill, int counter) {\n/* 829 */ boolean shieldBlocked = false;\n/* 830 */ boolean done = false;\n/* 831 */ Skill primWeaponSkill = null;\n/* 832 */ Skill defPrimWeaponSkill = null;\n/* 833 */ Item defShield = null;\n/* 834 */ Skill defShieldSkill = null;\n/* 835 */ int skillnum = -10;\n/* 836 */ boolean dryrun = false;\n/* */ \n/* 838 */ if (performer.isPlayer()) {\n/* */ \n/* 840 */ if (defender.isPlayer() || defender.isReborn()) {\n/* */ \n/* */ \n/* 843 */ dryrun = true;\n/* */ }\n/* 845 */ else if (defender.isKingdomGuard() || (defender\n/* 846 */ .isSpiritGuard() && defender.getKingdomId() == performer.getKingdomId())) {\n/* 847 */ dryrun = true;\n/* */ } \n/* 849 */ } else if (performer.isKingdomGuard() || (performer\n/* 850 */ .isSpiritGuard() && defender.getKingdomId() == performer.getKingdomId())) {\n/* 851 */ dryrun = true;\n/* 852 */ } if ((defender.isPlayer() && !defender.hasLink()) || (performer.isPlayer() && !performer.hasLink()))\n/* 853 */ dryrun = true; \n/* 854 */ if (defender.getStatus().getStunned() > 0.0F) {\n/* */ \n/* 856 */ defBonus -= 20.0D;\n/* 857 */ attBonus += 20.0D;\n/* */ } \n/* 859 */ if (attWeapon != null)\n/* */ {\n/* 861 */ if (attWeapon.isBodyPart()) {\n/* */ \n/* */ \n/* */ try {\n/* 865 */ skillnum = 10052;\n/* 866 */ primWeaponSkill = performerSkills.getSkill(skillnum);\n/* */ }\n/* 868 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 870 */ if (skillnum != -10)\n/* 871 */ primWeaponSkill = performerSkills.learn(skillnum, 1.0F); \n/* */ } \n/* 873 */ if (performer.isPlayer() && defender.isPlayer())\n/* */ {\n/* 875 */ if (primWeaponSkill.getKnowledge(0.0D) >= 20.0D) {\n/* 876 */ dryrun = true;\n/* */ }\n/* */ }\n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* 883 */ skillnum = attWeapon.getPrimarySkill();\n/* 884 */ primWeaponSkill = performerSkills.getSkill(skillnum);\n/* */ }\n/* 886 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 888 */ if (skillnum != -10) {\n/* 889 */ primWeaponSkill = performerSkills.learn(skillnum, 1.0F);\n/* */ }\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 896 */ skillnum = -10;\n/* 897 */ if (defPrimWeapon != null)\n/* */ {\n/* 899 */ if (defPrimWeapon.isBodyPart()) {\n/* */ \n/* */ \n/* */ try {\n/* 903 */ skillnum = 10052;\n/* 904 */ defPrimWeaponSkill = defenderSkills.getSkill(skillnum);\n/* */ }\n/* 906 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 908 */ if (skillnum != -10)\n/* 909 */ defPrimWeaponSkill = defenderSkills.learn(skillnum, 1.0F); \n/* */ } \n/* 911 */ if (performer.isPlayer() && defender.isPlayer())\n/* */ {\n/* 913 */ if (defPrimWeaponSkill.getKnowledge(0.0D) >= 20.0D) {\n/* 914 */ dryrun = true;\n/* */ }\n/* */ }\n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* 921 */ skillnum = defPrimWeapon.getPrimarySkill();\n/* 922 */ defPrimWeaponSkill = defenderSkills.getSkill(skillnum);\n/* */ }\n/* 924 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 926 */ if (skillnum != -10) {\n/* 927 */ defPrimWeaponSkill = defenderSkills.learn(skillnum, 1.0F);\n/* */ }\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 939 */ Skill attStrengthSkill = null;\n/* */ \n/* */ try {\n/* 942 */ attStrengthSkill = performerSkills.getSkill(102);\n/* */ }\n/* 944 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 946 */ attStrengthSkill = performerSkills.learn(102, 1.0F);\n/* 947 */ logger.log(Level.WARNING, performer.getName() + \" had no strength. Weird.\");\n/* */ } \n/* */ \n/* 950 */ double bonus = 0.0D;\n/* 951 */ if (primWeaponSkill != null) {\n/* */ \n/* 953 */ float mod = getMod(performer, defender, primWeaponSkill);\n/* 954 */ bonus = Math.max(-20.0D, primWeaponSkill.skillCheck(\n/* 955 */ Math.abs(primWeaponSkill.getKnowledge(0.0D) - attWeapon.getCurrentQualityLevel()), attBonus, (mod == 0.0F || dryrun), \n/* 956 */ (float)(long)Math.max(1.0F, counter * mod)));\n/* */ } \n/* */ \n/* */ \n/* 960 */ skillnum = -10;\n/* 961 */ defShield = defender.getShield();\n/* 962 */ if (defShield != null) {\n/* */ \n/* */ try {\n/* */ \n/* 966 */ skillnum = defShield.getPrimarySkill();\n/* 967 */ defShieldSkill = defenderSkills.getSkill(skillnum);\n/* */ }\n/* 969 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 971 */ if (skillnum != -10) {\n/* 972 */ defShieldSkill = defenderSkills.learn(skillnum, 1.0F);\n/* */ }\n/* */ } \n/* */ }\n/* 976 */ if (aiming) {\n/* */ \n/* 978 */ if (pos == 1) {\n/* */ \n/* 980 */ bonus = -60.0D;\n/* */ }\n/* 982 */ else if (pos == 29) {\n/* */ \n/* 984 */ bonus = -80.0D;\n/* */ }\n/* 986 */ else if (pos == 2) {\n/* */ \n/* 988 */ bonus = -40.0D;\n/* */ }\n/* 990 */ else if (pos == 3) {\n/* */ \n/* 992 */ bonus = -30.0D;\n/* */ }\n/* 994 */ else if (pos == 4) {\n/* */ \n/* 996 */ bonus = -30.0D;\n/* */ }\n/* 998 */ else if (pos == 34) {\n/* */ \n/* 1000 */ bonus = -30.0D;\n/* */ } \n/* 1002 */ pos = getRealPosition(pos);\n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* */ \n/* 1008 */ pos = defender.getBody().getRandomWoundPos();\n/* */ }\n/* 1010 */ catch (Exception ex) {\n/* */ \n/* 1012 */ logger.log(Level.WARNING, \"Problem getting a Random Wound Position for \" + defender.getName() + \": due to \" + ex\n/* 1013 */ .getMessage(), ex);\n/* */ } \n/* */ } \n/* 1016 */ if (performer.getEnemyPresense() > 1200 && defender.isPlayer())\n/* 1017 */ bonus += 20.0D; \n/* 1018 */ double attCheck = 0.0D;\n/* 1019 */ boolean defFumbleShield = false;\n/* 1020 */ boolean defFumbleParry = false;\n/* */ \n/* 1022 */ boolean crit = false;\n/* */ \n/* 1024 */ if (defender.isPlayer()) {\n/* */ \n/* 1026 */ int critChance = attWeapon.getDamagePercent();\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1032 */ if (Server.rand.nextInt(100 - Math.min(3, critChance)) == 0)\n/* */ {\n/* 1034 */ crit = true;\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 1039 */ if (attWeapon.isBodyPartAttached()) {\n/* */ \n/* 1041 */ float mod = getMod(performer, defender, attackerFightSkill);\n/* */ \n/* 1043 */ attCheck = attackerFightSkill.skillCheck(defenderFightSkill\n/* 1044 */ .getKnowledge(defBonus) / Math.min(5, defender.getAttackers()), bonus, (mod == 0.0F || dryrun), \n/* 1045 */ (float)(long)Math.max(1.0F, counter * mod));\n/* */ }\n/* */ else {\n/* */ \n/* 1049 */ float mod = getMod(performer, defender, attackerFightSkill);\n/* 1050 */ attCheck = attackerFightSkill.skillCheck(defenderFightSkill\n/* 1051 */ .getKnowledge(defBonus) / Math.min(5, defender.getAttackers()), attWeapon, bonus, (mod == 0.0F || dryrun), \n/* 1052 */ (float)(long)Math.max(1.0F, counter * mod));\n/* */ } \n/* 1054 */ byte type = (performer.getTemplate()).combatDamageType;\n/* 1055 */ if (attWeapon.isWeaponSword()) {\n/* */ \n/* 1057 */ if (Server.rand.nextInt(2) == 0) {\n/* 1058 */ type = 1;\n/* */ } else {\n/* 1060 */ type = 2;\n/* */ } \n/* 1062 */ } else if (attWeapon.isWeaponSlash()) {\n/* 1063 */ type = 1;\n/* 1064 */ } else if (attWeapon.isWeaponPierce()) {\n/* 1065 */ type = 2;\n/* 1066 */ } else if (attWeapon.isBodyPart()) {\n/* */ \n/* 1068 */ if (attWeapon.getTemplateId() == 17) {\n/* 1069 */ type = 3;\n/* 1070 */ } else if (attWeapon.getTemplateId() == 12) {\n/* 1071 */ type = 0;\n/* */ } \n/* */ } \n/* 1074 */ String attString = getAttackString(performer, attWeapon, type);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1079 */ double defCheck = 0.0D;\n/* 1080 */ double damage = getWeaponDamage(attWeapon, attStrengthSkill);\n/* */ \n/* 1082 */ if (performer.getDeity() != null && performer.getDeity().isWarrior() && \n/* 1083 */ performer.getFaith() >= 40.0F && performer.getFavor() >= 20.0F)\n/* 1084 */ damage = Math.min(4000.0D, damage * 1.25D); \n/* 1085 */ if (performer.getEnemyPresense() > 1200 && defender.isPlayer()) {\n/* 1086 */ damage *= Math.min(4000.0F, 1.15F);\n/* */ }\n/* */ \n/* 1089 */ if (defShield != null || crit) {\n/* */ \n/* 1091 */ if (!crit)\n/* */ {\n/* 1093 */ if (pos == 9) {\n/* */ \n/* 1095 */ shieldBlocked = true;\n/* */ }\n/* 1097 */ else if (defender.getStatus().getStamina() >= 300 && !defender.isMoving()) {\n/* */ \n/* 1099 */ defCheck = 0.0D;\n/* 1100 */ if (defShieldSkill != null) {\n/* */ \n/* 1102 */ float mod = getMod(performer, defender, defShieldSkill);\n/* 1103 */ defCheck = defShieldSkill.skillCheck(attCheck, defShield, defBonus, (mod == 0.0F || dryrun), (float)(long)mod);\n/* */ } \n/* */ \n/* */ \n/* 1107 */ defCheck += (defShield.getSizeY() + defShield.getSizeZ()) / 10.0D;\n/* */ \n/* */ \n/* 1110 */ defender.getStatus().modifyStamina(-300.0F);\n/* */ } \n/* */ }\n/* 1113 */ if (defCheck > 0.0D || shieldBlocked) {\n/* */ \n/* 1115 */ shieldBlocked = true;\n/* 1116 */ if (defender.isPlayer()) {\n/* 1117 */ defShield.setDamage(defShield.getDamage() + 0.001F * (float)damage * defShield.getDamageModifier());\n/* */ }\n/* */ }\n/* 1120 */ else if (defCheck < -90.0D) {\n/* */ \n/* 1122 */ defFumbleShield = true;\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1134 */ if (!shieldBlocked || crit) {\n/* */ \n/* 1136 */ boolean parryPrimWeapon = true;\n/* 1137 */ defCheck = 0.0D;\n/* 1138 */ if (!crit && !defender.isMoving()) {\n/* */ \n/* 1140 */ int parryTime = 100;\n/* 1141 */ if (defender.getFightStyle() == 2) {\n/* 1142 */ parryTime = 40;\n/* 1143 */ } else if (defender.getFightStyle() == 1) {\n/* 1144 */ parryTime = 160;\n/* */ } \n/* 1146 */ if (WurmCalendar.currentTime > defender.lastParry + Server.rand.nextInt(parryTime) && \n/* 1147 */ defPrimWeapon != null && !defPrimWeapon.isWeaponAxe())\n/* */ {\n/* 1149 */ if (!defPrimWeapon.isBodyPart() || defPrimWeapon.getAuxData() == 100) {\n/* */ \n/* 1151 */ if (defender.getStatus().getStamina() >= 300) {\n/* */ \n/* 1153 */ if (defPrimWeaponSkill != null) {\n/* */ \n/* 1155 */ float mod = getMod(performer, defender, defPrimWeaponSkill);\n/* 1156 */ defCheck = defPrimWeaponSkill.skillCheck((attCheck * defender\n/* 1157 */ .getAttackers() + defPrimWeapon.getWeightGrams() / 200.0D) / \n/* 1158 */ getWeaponParryBonus(defPrimWeapon), defPrimWeapon, defBonus, (mod == 0.0F || dryrun), (float)(long)mod);\n/* */ \n/* 1160 */ defender.lastParry = WurmCalendar.currentTime;\n/* 1161 */ defender.getStatus().modifyStamina(-300.0F);\n/* */ } \n/* 1163 */ if (defCheck < -90.0D)\n/* */ {\n/* 1165 */ defFumbleParry = true;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1182 */ else if (defCheck < 0.0D && Server.rand.nextInt(50) == 0)\n/* */ {\n/* 1184 */ defCheck = secondaryParry(performer, attCheck, defender, defenderSkills, defCheck, defBonus, dryrun);\n/* */ \n/* 1186 */ if (defCheck < -90.0D) {\n/* */ \n/* 1188 */ defFumbleParry = true;\n/* */ }\n/* 1190 */ else if (defCheck > 0.0D) {\n/* 1191 */ parryPrimWeapon = false;\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ } \n/* 1197 */ } else if (defender.getStatus().getStamina() >= 300) {\n/* */ \n/* 1199 */ if (defPrimWeaponSkill != null) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1204 */ float mod = getMod(performer, defender, defPrimWeaponSkill);\n/* 1205 */ defCheck = defPrimWeaponSkill.skillCheck(Math.min(100, 80 * defender.getAttackers()), defBonus, (mod == 0.0F || dryrun), (float)(long)mod);\n/* */ \n/* 1207 */ defender.lastParry = WurmCalendar.currentTime;\n/* 1208 */ defender.getStatus().modifyStamina(-300.0F);\n/* */ } \n/* 1210 */ if (defCheck < 0.0D && Server.rand.nextInt(50) == 0) {\n/* */ \n/* 1212 */ defCheck = secondaryParry(performer, attCheck, defender, defenderSkills, defCheck, defBonus, dryrun);\n/* */ \n/* 1214 */ if (defCheck < -90.0D) {\n/* */ \n/* 1216 */ defFumbleParry = true;\n/* */ }\n/* 1218 */ else if (defCheck > 0.0D) {\n/* 1219 */ parryPrimWeapon = false;\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* */ } \n/* 1225 */ if (defCheck <= 0.0D || defFumbleShield || crit) {\n/* */ \n/* */ \n/* */ \n/* 1229 */ if (!defFumbleShield && !defFumbleParry && !crit)\n/* */ {\n/* 1231 */ if (defender.getStatus().getStamina() >= 300) {\n/* */ \n/* 1233 */ defender.getStatus().modifyStamina(-300.0F);\n/* 1234 */ Skill defenderBodyControl = null;\n/* */ \n/* */ try {\n/* 1237 */ defenderBodyControl = defenderSkills.getSkill(104);\n/* */ }\n/* 1239 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 1241 */ defenderBodyControl = defenderSkills.learn(104, 1.0F);\n/* 1242 */ logger.log(Level.WARNING, defender.getName() + \" no body control?\");\n/* */ } \n/* 1244 */ if (defenderBodyControl != null) {\n/* */ \n/* 1246 */ float mod = getMod(performer, defender, defenderBodyControl);\n/* 1247 */ defCheck = defenderBodyControl.skillCheck(attCheck, 0.0D, (mod == 0.0F || dryrun), (float)(long)mod);\n/* */ } else {\n/* */ \n/* 1250 */ logger.log(Level.WARNING, defender.getName() + \" has no body control!\");\n/* */ } \n/* */ } } \n/* 1253 */ if (defCheck <= 0.0D || crit) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1261 */ Item armour = null;\n/* */ \n/* */ \n/* 1264 */ float armourMod = defender.getArmourMod();\n/* 1265 */ float evasionChance = ArmourTemplate.calculateGlanceRate(defender.getArmourType(), armour, type, armourMod);\n/* 1266 */ if (!performer.isPlayer() && !defender.isPlayer() && !defender.isUnique())\n/* 1267 */ armourMod = 1.0F; \n/* 1268 */ if (armourMod == 1.0F) {\n/* */ \n/* */ try {\n/* */ \n/* 1272 */ byte bodyPosition = ArmourTemplate.getArmourPosition((byte)pos);\n/* 1273 */ armour = defender.getArmour(bodyPosition);\n/* 1274 */ armourMod = ArmourTemplate.calculateDR(armour, type);\n/* 1275 */ if (defender.isPlayer())\n/* 1276 */ armour.setDamage(armour.getDamage() + \n/* 1277 */ Math.min(1.0F, (float)(damage * armourMod / 80.0D) * armour\n/* */ \n/* 1279 */ .getDamageModifier() * \n/* 1280 */ ArmourTemplate.getArmourDamageModFor(armour, type))); \n/* 1281 */ checkEnchantDestruction(attWeapon, armour, defender);\n/* 1282 */ evasionChance = ArmourTemplate.calculateGlanceRate(null, armour, type, armourMod);\n/* */ }\n/* 1284 */ catch (NoArmourException nsi) {\n/* */ \n/* */ \n/* 1287 */ evasionChance = 1.0F - defender.getArmourMod();\n/* */ }\n/* 1289 */ catch (NoSpaceException nsp) {\n/* */ \n/* 1291 */ logger.log(Level.WARNING, defender.getName() + \" no armour space on loc \" + pos);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1299 */ if (!attWeapon.isBodyPart() || attWeapon.getAuxData() == 100)\n/* */ {\n/* 1301 */ if (performer.isPlayer())\n/* 1302 */ attWeapon.setDamage(attWeapon.getDamage() + (float)(damage * (2.1D - armourMod) / 1000.0D) * attWeapon\n/* 1303 */ .getDamageModifier()); \n/* */ }\n/* 1305 */ if (defender.isUnique()) {\n/* */ \n/* 1307 */ evasionChance = 0.5F;\n/* 1308 */ damage *= armourMod;\n/* */ } \n/* 1310 */ if (Server.rand.nextFloat() < evasionChance) {\n/* */ \n/* 1312 */ if (aiming || performer.spamMode())\n/* 1313 */ performer.getCommunicator().sendNormalServerMessage(\"Your attack glances off \" + defender\n/* 1314 */ .getNameWithGenus() + \"'s armour.\"); \n/* 1315 */ if (defender.spamMode()) {\n/* 1316 */ defender.getCommunicator().sendNormalServerMessage(\"The attack to the \" + defender\n/* 1317 */ .getBody().getWoundLocationString(pos) + \" glances off your armour.\");\n/* */ }\n/* */ }\n/* 1320 */ else if (damage > (5.0F + Server.rand.nextFloat() * 5.0F) || crit) {\n/* */ \n/* 1322 */ if (crit)\n/* */ {\n/* 1324 */ armourMod = 1.0F;\n/* */ }\n/* */ \n/* */ \n/* 1328 */ Battle battle = performer.getBattle();\n/* 1329 */ boolean dead = false;\n/* 1330 */ if (defender.getStaminaSkill().getKnowledge(0.0D) < 2.0D) {\n/* */ \n/* 1332 */ defender.die(false, \"Combat Stam Check Fail\");\n/* 1333 */ dead = true;\n/* */ } else {\n/* */ \n/* 1336 */ dead = addWound(performer, defender, type, pos, damage, armourMod, attString, battle, 0.0F, 0.0F, false, false, false, false);\n/* */ } \n/* 1338 */ if (!dead && attWeapon.getSpellDamageBonus() > 0.0F)\n/* */ {\n/* 1340 */ if (damage * attWeapon.getSpellDamageBonus() / 300.0D > (Server.rand.nextFloat() * 5.0F) || crit) {\n/* 1341 */ dead = defender.addWoundOfType(performer, (byte)4, (byte)pos, false, armourMod, false, damage * attWeapon\n/* 1342 */ .getSpellDamageBonus() / 300.0D, 0.0F, 0.0F, false, false);\n/* */ }\n/* */ }\n/* 1345 */ if (!dead && attWeapon.getWeaponSpellDamageBonus() > 0.0F)\n/* */ {\n/* 1347 */ if (damage * attWeapon.getWeaponSpellDamageBonus() / 300.0D > (Server.rand.nextFloat() * 5.0F))\n/* */ {\n/* 1349 */ dead = defender.addWoundOfType(performer, (byte)6, 1, true, armourMod, false, damage * attWeapon\n/* 1350 */ .getWeaponSpellDamageBonus() / 300.0D, Server.rand\n/* 1351 */ .nextInt((int)attWeapon.getWeaponSpellDamageBonus()), 0.0F, false, false);\n/* */ }\n/* */ }\n/* 1354 */ if (armour != null)\n/* */ {\n/* 1356 */ if (armour.getSpellPainShare() > 0.0F)\n/* */ {\n/* 1358 */ if (performer.isUnique()) {\n/* 1359 */ defender.getCommunicator().sendNormalServerMessage(performer\n/* 1360 */ .getNameWithGenus() + \" ignores the effects of the \" + armour.getName() + \".\");\n/* */ \n/* */ \n/* */ }\n/* 1364 */ else if (damage * armour.getSpellPainShare() / 300.0D > 5.0D) {\n/* */ \n/* 1366 */ addBounceWound(defender, performer, type, pos, damage * armour\n/* 1367 */ .getSpellPainShare() / 300.0D, armourMod, 0.0F, 0.0F, false, true);\n/* */ } \n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 1374 */ if (dead) {\n/* */ \n/* 1376 */ performer.getCommunicator().sendSafeServerMessage(defender.getNameWithGenus() + \" is dead!\");\n/* 1377 */ if (battle != null)\n/* 1378 */ battle.addCasualty(performer, defender); \n/* 1379 */ done = true;\n/* */ \n/* */ \n/* */ }\n/* 1383 */ else if (!defender.hasNoServerSound()) {\n/* 1384 */ SoundPlayer.playSound(defender.getHitSound(), defender, 1.6F);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 1389 */ if (aiming || performer.spamMode())\n/* */ {\n/* 1391 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1392 */ .getNameWithGenus() + \" takes no real damage from the hit to the \" + defender\n/* 1393 */ .getBody().getWoundLocationString(pos) + \".\");\n/* */ }\n/* 1395 */ if (defender.spamMode()) {\n/* 1396 */ defender.getCommunicator().sendNormalServerMessage(\"You take no real damage from the blow to the \" + defender\n/* */ \n/* 1398 */ .getBody().getWoundLocationString(pos) + \".\");\n/* */ }\n/* */ } \n/* */ } else {\n/* */ \n/* 1403 */ String sstring = \"sound.combat.miss.light\";\n/* 1404 */ if (attCheck < -80.0D) {\n/* 1405 */ sstring = \"sound.combat.miss.heavy\";\n/* 1406 */ } else if (attCheck < -40.0D) {\n/* 1407 */ sstring = \"sound.combat.miss.med\";\n/* 1408 */ } SoundPlayer.playSound(sstring, defender, 1.6F);\n/* 1409 */ if (aiming || performer.spamMode())\n/* */ {\n/* 1411 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1412 */ .getNameWithGenus() + \" \" + getParryString(defCheck) + \" evades the blow to the \" + defender\n/* 1413 */ .getBody().getWoundLocationString(pos) + \".\");\n/* */ }\n/* 1415 */ if (defender.spamMode()) {\n/* 1416 */ defender.getCommunicator().sendNormalServerMessage(\"You \" + \n/* 1417 */ getParryString(defCheck) + \" evade the blow to the \" + defender\n/* 1418 */ .getBody().getWoundLocationString(pos) + \".\");\n/* */ }\n/* */ } \n/* */ } else {\n/* */ \n/* 1423 */ defender.lastParry = WurmCalendar.currentTime;\n/* 1424 */ Item weapon = defPrimWeapon;\n/* 1425 */ if (!parryPrimWeapon)\n/* 1426 */ weapon = defender.getLefthandWeapon(); \n/* 1427 */ if (aiming || performer.spamMode())\n/* */ {\n/* 1429 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1430 */ .getNameWithGenus() + \" \" + getParryString(defCheck) + \" parries with \" + weapon.getNameWithGenus() + \".\");\n/* */ }\n/* */ \n/* */ \n/* 1434 */ if (defender.spamMode())\n/* */ {\n/* 1436 */ defender.getCommunicator().sendNormalServerMessage(\"You \" + \n/* 1437 */ getParryString(defCheck) + \" parry with your \" + weapon.getName() + \".\");\n/* */ }\n/* */ \n/* 1440 */ if (!weapon.isBodyPart() || weapon.getAuxData() == 100) {\n/* */ \n/* 1442 */ if (defender.isPlayer())\n/* */ {\n/* 1444 */ if (weapon.isWeaponSword()) {\n/* 1445 */ weapon.setDamage(weapon.getDamage() + 0.001F * (float)damage * weapon.getDamageModifier());\n/* */ } else {\n/* 1447 */ weapon.setDamage(weapon.getDamage() + 0.005F * (float)damage * weapon.getDamageModifier());\n/* */ } } \n/* 1449 */ if (performer.isPlayer())\n/* */ {\n/* 1451 */ if (!attWeapon.isBodyPart() || attWeapon.getAuxData() == 100) {\n/* 1452 */ attWeapon\n/* 1453 */ .setDamage(attWeapon.getDamage() + 0.001F * (float)damage * attWeapon.getDamageModifier());\n/* */ }\n/* */ }\n/* */ } \n/* 1457 */ String sstring = \"sound.combat.parry1\";\n/* 1458 */ int x = Server.rand.nextInt(3);\n/* 1459 */ if (x == 0) {\n/* 1460 */ sstring = \"sound.combat.parry2\";\n/* 1461 */ } else if (x == 1) {\n/* 1462 */ sstring = \"sound.combat.parry3\";\n/* 1463 */ } SoundPlayer.playSound(sstring, defender, 1.6F);\n/* 1464 */ checkEnchantDestruction(attWeapon, weapon, defender);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 1469 */ if (performer.spamMode()) {\n/* */ \n/* 1471 */ if (aiming) {\n/* 1472 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1473 */ .getNameWithGenus() + \" raises \" + defender.getHisHerItsString() + \" shield and parries.\");\n/* */ } else {\n/* 1475 */ performer.getCommunicator().sendNormalServerMessage(\"You try to \" + attString + \" \" + defender\n/* 1476 */ .getNameWithGenus() + \" but \" + defender.getHeSheItString() + \" raises \" + defender\n/* 1477 */ .getHisHerItsString() + \" shield and parries.\");\n/* */ } \n/* 1479 */ } else if (aiming) {\n/* 1480 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1481 */ .getNameWithGenus() + \" raises \" + defender.getHisHerItsString() + \" shield and parries.\");\n/* 1482 */ } if (defender.spamMode())\n/* 1483 */ defender.getCommunicator().sendNormalServerMessage(performer\n/* 1484 */ .getNameWithGenus() + \" tries to \" + attString + \" you but you raise your shield and parry.\"); \n/* 1485 */ if (defShield.isWood()) {\n/* 1486 */ Methods.sendSound(defender, \"sound.combat.shield.wood\");\n/* */ } else {\n/* 1488 */ Methods.sendSound(defender, \"sound.combat.shield.metal\");\n/* 1489 */ } checkEnchantDestruction(attWeapon, defShield, defender);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1510 */ return done;\n/* */ }", "@Override\n\tpublic void heal() {\n\t\tboolean canHeal;\n\t\tint healPoints;\n\n\t\tcanHeal = (Math.random() <= chanceToHeal) && (hitPoints > 0);\n\n\t\tif (canHeal) {\n\t\t\thealPoints = (int) (Math.random() * (maxHeal - minHeal + 1)) + minHeal;\n\t\t\taddHitPoints(healPoints);\n\t\t\tSystem.out.println(name + \" healed itself for \" + healPoints + \" points.\\n\"\n\t\t\t\t\t+ \"Total hit points remaining are: \" + hitPoints);\n\t\t\tSystem.out.println();\n\t\t} // end can heal\n\n\t}", "private void functionalInterface2() {\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psRestoreHp // 100\n\t\t\t\t.and(psMinimalDamage) // -10\n\t\t\t\t.and(psIncreaseHp) // +25\n\t\t\t\t.and(psMinimalDamage) // -10\n\t\t\t\t.and(psHugeDamage) // -20\n\t\t);\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\t}", "void bust() {\n\t\t_loses++;\n\t\t//_money -= _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "@Override\n\tprotected void ExecutePrimary() {\n\t\tgameContext.generateHeal(value);\n\t}", "@Override\r\n\tpublic void heal() {\n\t\tSystem.out.println(\"Paladin \" + super.getName() + \" heals for 50 points.\");\r\n\t\tsuper.setHitPoints(super.getHitPoints() + 50);\r\n\t}", "Float attack();", "public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}", "public void hit(int melee_dmg,int range_dmg) {\n melee_dmg=this.current_atk-30;\n range_dmg=this.current_atk-60;\n }", "int steamPerDurability();", "public void gainHealth()\n\t{\n\t\tSystem.out.println(\"1 heart gained\");\n\t}", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "public static byte calcShldUse(L2Character attacker, L2Character target, L2Skill skill, boolean sendSysMsg)\n\t{\n\t\tif (skill != null && (skill.ignoreShield() || skill.isMagic()))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\tL2Item item = target.getSecondaryWeaponItem();\n\t\tif (item == null || !(item instanceof L2Armor) || ((L2Armor) item).getItemType() == L2ArmorType.SIGIL)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\tdouble shldRate = target.calcStat(Stats.SHIELD_RATE, 0, attacker, null) * BaseStats.DEX.calcBonus(target);\n\t\tif (shldRate == 0.0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\tint degreeside = (int) target.calcStat(Stats.SHIELD_DEFENCE_ANGLE, 120, null, null);\n\t\tif (degreeside < 360 && !target.isFacing(attacker, degreeside))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Tenkai custom: Make shields way less effective on non-sigel awakened classes\n\t\t/*if (target instanceof L2PcInstance\n\t\t\t\t&& ((L2PcInstance)target).getClassId() > 139)\n\t\t\tshldRate *= 0.1;*/\n\n\t\tbyte result = SHIELD_DEFENSE_FAILED;\n\t\t// if attacker use bow and target wear shield, shield block rate is multiplied by 1.3 (30%)\n\t\tL2Weapon at_weapon = attacker.getActiveWeaponItem();\n\t\tif (at_weapon != null && at_weapon.getItemType() == L2WeaponType.BOW)\n\t\t{\n\t\t\tshldRate *= 1.3;\n\t\t}\n\n\t\tint rnd = Rnd.get(100);\n\t\tif (shldRate * (Config.ALT_PERFECT_SHLD_BLOCK / 100.0) > rnd)\n\t\t{\n\t\t\tresult = SHIELD_DEFENSE_PERFECT_BLOCK;\n\t\t}\n\t\telse if (shldRate > rnd)\n\t\t{\n\t\t\tresult = SHIELD_DEFENSE_SUCCEED;\n\t\t}\n\n\t\tif (sendSysMsg && target instanceof L2PcInstance)\n\t\t{\n\t\t\tL2PcInstance enemy = (L2PcInstance) target;\n\t\t\tswitch (result)\n\t\t\t{\n\t\t\t\tcase SHIELD_DEFENSE_SUCCEED:\n\t\t\t\t\tenemy.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.SHIELD_DEFENCE_SUCCESSFULL));\n\t\t\t\t\tbreak;\n\t\t\t\tcase SHIELD_DEFENSE_PERFECT_BLOCK:\n\t\t\t\t\tenemy.sendPacket(SystemMessage\n\t\t\t\t\t\t\t.getSystemMessage(SystemMessageId.YOUR_EXCELLENT_SHIELD_DEFENSE_WAS_A_SUCCESS));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (result >= 1)\n\t\t{\n\t\t\t// ON_SHIELD_BLOCK\n\t\t\tif (target.getChanceSkills() != null)\n\t\t\t{\n\t\t\t\ttarget.getChanceSkills().onBlock(target);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "void gainHealth(int points) {\n this.health += points;\n }", "int getBonusHP();", "@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker, final boolean awake)\n\t{\n\t\t/*\n\t\t * if ((this instanceof L2SiegeGuardInstance) && (attacker instanceof L2SiegeGuardInstance)) //if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return; if ((this instanceof L2MonsterInstance)&&(attacker instanceof\n\t\t * L2MonsterInstance)) if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return;\n\t\t */\n\t\t\n\t\tif (isRaid() && attacker != null && attacker.getParty() != null && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this))\n\t\t{\n\t\t\tif (firstCommandChannelAttacked == null) // looting right isn't set\n\t\t\t{\n\t\t\t\tsynchronized (this)\n\t\t\t\t{\n\t\t\t\t\tif (firstCommandChannelAttacked == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfirstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t\t\t\t\tif (firstCommandChannelAttacked != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcommandChannelTimer = new CommandChannelTimer(this);\n\t\t\t\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis();\n\t\t\t\t\t\t\tThreadPoolManager.getInstance().scheduleGeneral(commandChannelTimer, 10000); // check for last attack\n\t\t\t\t\t\t\tfirstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\", \"You have looting rights!\")); // TODO: retail msg\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\telse if (attacker.getParty().getCommandChannel().equals(firstCommandChannelAttacked)) // is in same channel\n\t\t\t{\n\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis(); // update last attack time\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * // CommandChannel if(commandChannelTimer == null && isRaid() && attacker != null) { if(attacker.isInParty() && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this)) { firstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t * commandChannelTimer = new CommandChannelTimer(this, attacker.getParty().getCommandChannel()); ThreadPoolManager.getInstance().scheduleGeneral(_commandChannelTimer, 300000); // 5 min firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\",\n\t\t * \"You have looting rights!\")); } }\n\t\t */\n\t\tif (isEventMob)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add damage and hate to the attacker AggroInfo of the L2Attackable aggroList\n\t\tif (attacker != null)\n\t\t{\n\t\t\taddDamage(attacker, (int) damage);\n\t\t}\n\t\t\n\t\t// If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle\n\t\tif (this instanceof L2MonsterInstance)\n\t\t{\n\t\t\tL2MonsterInstance master = (L2MonsterInstance) this;\n\t\t\t\n\t\t\tif (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tmaster = ((L2MinionInstance) this).getLeader();\n\t\t\t\t\n\t\t\t\tif (!master.isInCombat() && !master.isDead())\n\t\t\t\t{\n\t\t\t\t\tmaster.addDamage(attacker, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (master.hasMinions())\n\t\t\t{\n\t\t\t\tmaster.callMinionsToAssist(attacker);\n\t\t\t}\n\t\t\t\n\t\t\tmaster = null;\n\t\t}\n\t\t\n\t\t// Reduce the current HP of the L2Attackable and launch the doDie Task if necessary\n\t\tsuper.reduceCurrentHp(damage, attacker, awake);\n\t}", "public void buyFuelUpgrades()\n {\n if(play_state.getMoney() >= fuel_upgrade_cost) {\n play_state.setMoney(play_state.getMoney() - fuel_upgrade_cost);\n fuel_upgrade_cost += 100;\n play_state.getDriller().addMax_fuel(10);\n }\n }", "private void heal(){\n\t\tfinal long rowID = getSelectedRowID();\n\n\t\t// reset the selection\n\t\tresetSelection();\n\n\t\t// show the dialog\n\t\tQuickDialogs.showHealDialog(getActivity(), new IInputCallback() {\n\n\t\t\t@Override\n\t\t\tpublic void onInput(String input) {\n\t\t\t\tint damage;\n\t\t\t\t// convert the string to int\n\t\t\t\ttry{\n\t\t\t\t\tdamage = Integer.valueOf(input);\n\t\t\t\t}catch(NumberFormatException e){\n\t\t\t\t\t// TODO display incorrect input dialog\n\t\t\t\t\tdamage = 0;\n\t\t\t\t}\n\n\t\t\t\t// heal it up!\n\t\t\t\tEncountersTable.changeHP(GameSQLDataSource.getDatabase(getActivity()), rowID, damage);\t\n\n\t\t\t\trefreshList();\n\t\t\t}\n\t\t});\n\t}", "public void heal1()\r\n {\r\n this.health = 700;\r\n Story.healText1();\r\n }", "public interface WeaponBehavior {\n\n int useWeapon(int strong);\n\n int getDamageValue(int strong);\n}", "public int heal(int amount) {\n\n // Dead Pokemon can't heal\n if (hasStatus(StatusNamesies.FAINTED)) {\n return 0;\n }\n\n int prev = hp;\n setHP(hp + amount);\n return hp - prev;\n }", "@Override\n\tpublic double attack() {\n\t\treturn 12.5;\n\t}", "void givePlayerExp(BPlayer bPlayer, int exp);", "public float getHungerDamage();", "void eat(Edible anEdible, int amount);", "public void heal(int[] fighter, int points) {\n fighter[LIFE] = fighter[LIFE] + points;\n if (fighter[LIFE] > fighter[MAX_LIFE]) {\n fighter[LIFE] = fighter[MAX_LIFE];\n }\n }", "public void takeHeal(double amount)\n\t{\n\t\tif(healthHardCap == -1)\n\t\t{\n\t\t\tthis.maxHealth += amount;\n\t\t}\n\t\tthis.health = Math.min(this.health + amount, this.maxHealth);\n\t}", "public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }", "public static void bullyAttack(){\n int punch = player.getHealth() - bullyHitPoints ;\n player.setHealth(punch);\n //Step 2: Conditional dialogue\n if(bullyHitPoints > 50) {\n System.out.println(textparser.getMassiveDamage() + bullyHitPoints + textparser.getToYou());\n }else if(bullyHitPoints > 25){\n System.out.println(textparser.getPunch() + bullyHitPoints + textparser.getToYou());\n }else{\n System.out.println(textparser.getDidntHurtMuch() + bullyHitPoints + textparser.getToYou());\n }\n }", "public void consumeFuel(double amount);", "private String heal(Human human) {\n human.healthLvl += this.healLvl;\n return \"Doctor \" + this.getName() + \" heals \" + human.getName() + \" to \" + human.getHealthLvl() + \" health lvl\";\n }", "public boolean whatNow (String action, player friday, player you){ // Method which will allow the ia to choose his action\n\t\tString testAction = \"Tank\"; // Create a String we will use a lot to test other string\n\t\tint actionIa; // If the ia is a Tank, forbid him to use his special attack. The purpose is to prevent him from useless turns\n\t\tif (friday.getName().equals(testAction)){ // If the name of the ia's class is Tank\n\t\t\t actionIa = (int)(Math.random() * 2); // His random will be between 0 or 1\n\t\t}\n\t\t\n\t\telse {\n\t\t\t actionIa = (int)(Math.random() * 3); // Else, his random will be between 0, 1 and 2\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Will be use to test if you attacked\n\t\t\n\t\t\n\t\tswitch (actionIa){ // Test ia's action\n\t\t\tcase 0: // 0, the enemy attack\n\t\t\t\tfriday.setSprite(\"attack\");\n\t\t\t\tSystem.out.println(\"The enemy attack\\n\"); // Warns the user\n\t\t\t\ttestAction = \"block\"; // Will be use to test if you block\n\t\t\t\tif (action.equals(testAction)){ // If you block\n\t\t\t\t\tSystem.out.println(\"You blocked the enemy's attack.\"); // Warns the user\n\t\t\t\t\tyou.setHp(you.getHp() - you.getDp()); // You loose as much hp as your dp\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tyou.setHp(you.getHp() - friday.getAp()); // Else, you loose as much hp as your enemy's ap\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: // 1, the enemy block\n\t\t\t\tfriday.setSprite(\"block\");\n\t\t\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\t\t\tfriday.setHp(friday.getHp() - friday.getDp()); // The enemy loose as much hp as his dp\n\t\t\t\t\taction = \"\"; // Prevent you from attack a second time\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The enemy blocked your attack\\n\"); // Warns the user\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: // 2, the enemy use his special power if he isn't a tank\n\t\t\t\tfriday.setSprite(\"special\");\n\t\t\t\tSystem.out.println(\"The enemy uses his special power.\"); // Warns the user\n\t\t\t\tfriday.special(); // Execute ia's special attack\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Reset testAction\n\t\t\n\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\tfriday.setHp(friday.getHp() - you.getAp()); // The enemy loose as much hp as your ap\n\t\t} // Nota Bene : if the enemy blocked your attack, this won't be executed because 'action = \"\";'\n\t\t\n\t\tSystem.out.println(\"You have \" + you.getHp() + \" HP left.\"); // Warns the user\n\t\tSystem.out.println(\"The ennemy have \" + friday.getHp() + \" HP left.\\n\"); // Warns the user\n\t\t\n\t\tif(you.getHp() <= 0){ // If you or the ia has no hp left, warn the system that the fight is over by setting 'end' on true and tell who died\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You died!\");\n\t\t\tyou.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse if(friday.getHp() <= 0){\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You killed the ennemy!\");\n\t\t\tfriday.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse { // Else, it just asks you what you want to do\n\t\t\tSystem.out.println(\"What do you want to do, attack, block or use your special power ?\"); // Asks what you want to do\n\t\t}\n\t\treturn end;\n\t}", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "@Test\n\tvoid testDealBackDamage() {\n\t\tthis.miner.shoot();\n\t\tassertEquals(mRUtil.dwarfMiner_hp - (mRUtil.pickaxe_damage/mRUtil.saphir_returnedDamageRatio), this.miner.getHp(), \"Case: Damage taken by the Miner from saphir\");\n\n\t\tthis.saphir.setHp(50); // reset hp to 50\n\t\tthis.soldier.shoot();\n\t\tassertEquals(mRUtil.dwarfSoldier_hp - (mRUtil.rocket_damage/mRUtil.saphir_returnedDamageRatio),this.soldier.getHp(), \"Case: Damage taken by the Soldier from saphir\");\n\n\t\tthis.saphir.setHp(50);\n\t\tthis.demolitionist.shoot();\n\t\tassertEquals(mRUtil.dwarfDemolitionist_hp - (mRUtil.dynamite_damage/mRUtil.saphir_returnedDamageRatio),this.demolitionist.getHp(), \"Case: Damage taken by the Demolitionist from saphir\");\n\n\t\tthis.saphir.setHp(50);\n\t\tthis.scientist.shoot();\n\t\tassertEquals(mRUtil.dwarfScientist_hp - (mRUtil.potion_damage/mRUtil.saphir_returnedDamageRatio),this.scientist.getHp(), \"Case: Damage taken by the Scientist from saphir\");\n\t}", "public void updateHp(double amount);", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "public void takeDamage(int dmg){\r\n this.currHP -= dmg;\r\n }", "void defendAttack(IUnit attacker, int incomingDamage);", "public int attack(Character target){ //hw3E#0 //hw46#moreThinking\n lowerHP((int)(strength * attack / 10)); //hw3E#0 //hw46#moreThinking\n return super.attack(target); //hw3E#0 //hw44#3,4 //hw46#moreThinking\n }", "private void haveFun() {\n\t\tint action = inputPrompt.funActivities(money);\r\n\t\tthis.money -= action;\r\n\t\t//has better effect depending on how much money you have spent\r\n\t\tthis.mentalHealth += FUNHEALTH + action;\r\n\t\tdailyTime--;\r\n\t\tinputPrompt.mainInfo(energy, physHealth, mentalHealth, money);\r\n\t\t\r\n\t}", "@Deprecated\n/* */ public static boolean attack(Creature performer, Item target, float counter, int pos, Action act) {\n/* 3027 */ boolean done = false;\n/* 3028 */ boolean dead = false;\n/* 3029 */ boolean aiming = false;\n/* 3030 */ Item primWeapon = performer.getPrimWeapon();\n/* */ \n/* 3032 */ if (primWeapon == null || primWeapon.isBodyPart()) {\n/* */ \n/* */ \n/* 3035 */ performer.getCommunicator().sendNormalServerMessage(\"You have no weapon to attack \" + target.getNameWithGenus() + \" with.\");\n/* 3036 */ return true;\n/* */ } \n/* 3038 */ if (primWeapon.isShield()) {\n/* */ \n/* */ \n/* 3041 */ performer.getCommunicator().sendNormalServerMessage(\"You cannot practice attacks with shields on \" + target\n/* 3042 */ .getNameWithGenus() + \".\");\n/* 3043 */ return true;\n/* */ } \n/* 3045 */ if (primWeapon.isWeaponBow() || primWeapon.isBowUnstringed()) {\n/* */ \n/* */ \n/* 3048 */ performer.getCommunicator().sendNormalServerMessage(\"You cannot practice attacks with bows on \" + target\n/* 3049 */ .getNameWithGenus() + \". You need to use an archery target instead.\");\n/* */ \n/* 3051 */ return true;\n/* */ } \n/* */ \n/* 3054 */ BlockingResult result = Blocking.getBlockerBetween(performer, target, 4);\n/* 3055 */ if (result != null) {\n/* */ \n/* 3057 */ performer.getCommunicator()\n/* 3058 */ .sendCombatNormalMessage(\"You fail to reach the \" + target\n/* 3059 */ .getNameWithGenus() + \" because of the \" + result\n/* 3060 */ .getFirstBlocker().getName() + \".\");\n/* 3061 */ return true;\n/* */ } \n/* */ \n/* 3064 */ if (Creature.rangeTo(performer, target) > Actions.actionEntrys[114].getRange()) {\n/* */ \n/* 3066 */ performer.getCommunicator().sendNormalServerMessage(\"You are now too far away to \" + Actions.actionEntrys[114]\n/* 3067 */ .getActionString().toLowerCase() + \" \" + target\n/* 3068 */ .getNameWithGenus() + \".\");\n/* 3069 */ return true;\n/* */ } \n/* 3071 */ int speed = 10;\n/* 3072 */ speed = primWeapon.getWeightGrams() / 1000 + 3;\n/* 3073 */ if (pos != -1) {\n/* */ \n/* 3075 */ aiming = true;\n/* 3076 */ speed++;\n/* */ } \n/* 3078 */ if (!done) {\n/* */ \n/* */ \n/* 3081 */ if (act.justTickedSecond())\n/* 3082 */ performer.decreaseFatigue(); \n/* 3083 */ if (counter == 1.0F)\n/* */ {\n/* 3085 */ if (aiming) {\n/* */ \n/* 3087 */ String bodypartname = PracticeDollBehaviour.getWoundLocationString(pos);\n/* 3088 */ performer.getCommunicator().sendSafeServerMessage(\"You try to \" + \n/* 3089 */ getAttackString(performer, primWeapon) + \" \" + target.getNameWithGenus() + \" in the \" + bodypartname + \".\");\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 3094 */ performer.getCommunicator().sendSafeServerMessage(\"You try to \" + \n/* 3095 */ getAttackString(performer, primWeapon) + \" \" + target.getNameWithGenus() + \".\");\n/* */ } \n/* */ }\n/* */ \n/* 3099 */ if (act.currentSecond() % speed == 0) {\n/* */ \n/* 3101 */ Skill attackerFightSkill = null;\n/* 3102 */ Skills performerSkills = performer.getSkills();\n/* */ \n/* 3104 */ double attBonus = 0.0D;\n/* */ \n/* */ \n/* 3107 */ int attSknum = 1023;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 3122 */ attackerFightSkill = performerSkills.getSkill(1023);\n/* */ }\n/* 3124 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 3126 */ attackerFightSkill = performerSkills.learn(1023, 1.0F);\n/* */ } \n/* 3128 */ dead = performAttack(pos, false, performer, performerSkills, primWeapon, target, 0.0D, attackerFightSkill, speed);\n/* */ \n/* */ \n/* 3131 */ if (aiming)\n/* 3132 */ done = true; \n/* 3133 */ if (dead)\n/* 3134 */ done = true; \n/* */ } \n/* 3136 */ if (!done && !aiming) {\n/* */ \n/* 3138 */ Item[] secondaryWeapons = performer.getSecondaryWeapons();\n/* 3139 */ for (int x = 0; x < secondaryWeapons.length; x++) {\n/* */ \n/* 3141 */ if (!secondaryWeapons[x].isBodyPart()) {\n/* */ \n/* 3143 */ speed = Server.rand.nextInt(secondaryWeapons[x].getWeightGrams() / 1000 + 7) + 2;\n/* 3144 */ if (act.currentSecond() % speed == 0) {\n/* */ \n/* 3146 */ Skill attackerFightSkill = null;\n/* 3147 */ Skills performerSkills = performer.getSkills();\n/* */ \n/* 3149 */ double attBonus = 0.0D;\n/* */ \n/* */ \n/* */ \n/* 3153 */ int attSknum = 1023;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 3168 */ attackerFightSkill = performerSkills.getSkill(1023);\n/* */ }\n/* 3170 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 3172 */ attackerFightSkill = performerSkills.learn(1023, 1.0F);\n/* */ } \n/* 3174 */ done = performAttack(pos, false, performer, performerSkills, secondaryWeapons[x], target, 0.0D, attackerFightSkill, speed);\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* 3181 */ return done;\n/* */ }", "private WeightedSampler<String> getPossibleLethalActions(int team) {\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n Player p = this.b.getPlayer(team);\n WeightedSampler<String> poss = new WeightedOrderedSampler<>();\n List<Minion> minions = this.b.getMinions(team, false, true).collect(Collectors.toList());\n for (Minion m : minions) {\n if (p.canUnleashCard(m)) {\n double totalWeight = UNLEASH_TOTAL_WEIGHT + UNLEASH_WEIGHT_PER_PRESENCE * m.getTotalEffectValueOf(e -> e.getPresenceValue(5));\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(m.getUnleashTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new UnleashMinionAction(p, m, targets).toString().intern(), totalWeight / targetSearchSpace.size());\n }\n }\n }\n if (this.b.getMinions(team * -1, false, true).anyMatch(m -> m.finalStats.get(Stat.WARD) > 0)) {\n // find ways to break through the wards\n for (Minion m : minions) {\n if (m.canAttack()) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n List<Minion> searchSpace = m.getAttackableTargets().collect(Collectors.toList());\n double weight = totalWeight / searchSpace.size();\n for (Minion target : searchSpace) {\n double overkillMultiplier = Math.pow(ATTACK_WEIGHT_OVERKILL_PENALTY, Math.max(0, m.finalStats.get(Stat.ATTACK) - target.health));\n poss.add(new OrderAttackAction(m, target).toString().intern(), overkillMultiplier * weight);\n }\n }\n }\n } else {\n // just go face\n this.b.getPlayer(team * -1).getLeader().ifPresent(l -> {\n for (Minion m : minions) {\n if (m.canAttack(l)) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n poss.add(new OrderAttackAction(m, l).toString().intern(), totalWeight);\n }\n }\n });\n }\n poss.add(new EndTurnAction(team).toString().intern(), END_TURN_WEIGHT);\n return poss;\n }", "protected boolean IsHighExplosive()\r\n {\r\n \t// Wrapper function to make code a little cleaner.\r\n // isInvulnerable() is wrongly named and instead represents the specific\r\n // skull type the wither has launched\r\n \t\r\n \treturn isInvulnerable();\r\n }", "public static void Beriberi(EntityPlayer player){\n HealthEffect.effectSlowness(player, 1);\n }", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "public void func_180430_e(float distance, float damageMultiplier) {}", "@EventHandler(priority = EventPriority.MONITOR)\n\tvoid onPlayerInteract(PlayerInteractEntityEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\tisHealingOther = true;\n\t\t\n\t\t//Check that the player right-clicked on another player.\n\t\tif (!(event.getRightClicked() instanceof Player))\n\t\t\treturn;\n\n \t//Check if the item in hand fits any of the items specified in the configuration file.\t\t\n \tSet <String> items;\n \ttry { items = config.getConfigurationSection(\"healing.\").getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tString item = null;\n \tfor (String i: items)\n \t\tif (player.getItemInHand().getType().toString().equalsIgnoreCase(i))\n \t\t\titem = i;\n \t\n \t//If the item isn't found, it's not a healing item.\n \tif (item == null)\n \t\treturn;\n \t\n\t\t//Check if the amount to heal is in the config\n \tSet<String> professionsRequired;\n \ttry { professionsRequired = config.getConfigurationSection(\"healing.\" + item).getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tfor (String p: professionsRequired)\n \t{\n \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n \t\t\n \t\tif (p == null)\n \t\t\tcontinue;\n \t\t\n \tProfessionHandler profHandler = new ProfessionHandler(perms, data, config);\n \t\n \tdouble amountToHeal = config.getInt(\"healing.\" + item + \".\" + p + \".\"\n\t\t\t\t\t+ profHandler.getTierName(prof.getTier(p)));\n \tif (amountToHeal == 0)\n \t{\n \t\tplayer.sendMessage(ChatColor.RED + \"You do not have the skill required to do this!\");\n \t\treturn;\n \t}\n \t\n \t//Check that the recipient has missing health.\n \t\tPlayer recipient = (Player) event.getRightClicked();\n \t\tif (recipient.getHealth() >= 20)\n \t\t{\n \t\t\tplayer.sendMessage(ChatColor.YELLOW + recipient.getName() + \" does not need bandaging!\");\n \t\t\treturn;\n \t\t} \n \t\t\n \t//Check that it won't take you over the maximum amount of health.\n \tif (recipient.getHealth() + amountToHeal > 20)\n \t\tamountToHeal = 20 - recipient.getHealth();\n \t\t\n \t\tplayer.sendMessage(ChatColor.YELLOW + \"Bandaging...\");\n \t\tString name = player.getCustomName();\n \t\tif (name == null)\n \t\t\tname = player.getName();\n \t\trecipient.sendMessage(ChatColor.YELLOW + name + \" is bandaging you...\");\n \t\t\n \t\t//Schedule the task in one second.\n \t\tmakeDelayedTask(player, recipient, amountToHeal, item, p, player.getLocation(), recipient.getLocation());\n \t}\n\t}", "boolean takeDamage(int dmg);" ]
[ "0.69523734", "0.6945832", "0.6702514", "0.656211", "0.64553535", "0.6405447", "0.63677466", "0.6342291", "0.63323176", "0.63217086", "0.6313258", "0.6292253", "0.62899804", "0.6261138", "0.62526584", "0.62382656", "0.6224851", "0.62086076", "0.6205719", "0.6199739", "0.61970955", "0.6195718", "0.6193293", "0.6192602", "0.6189075", "0.6187353", "0.617132", "0.6164272", "0.6144554", "0.61442554", "0.61296123", "0.61231065", "0.61067724", "0.6100001", "0.60984063", "0.6071936", "0.6053197", "0.6046687", "0.6044608", "0.6040414", "0.60322505", "0.603191", "0.6031898", "0.6030231", "0.60283375", "0.60191286", "0.60172534", "0.60128665", "0.5996544", "0.5996045", "0.5993695", "0.5986708", "0.59849256", "0.59670615", "0.5964117", "0.5949356", "0.5945429", "0.59409887", "0.59396464", "0.5937666", "0.5932318", "0.5924329", "0.5922111", "0.59158254", "0.5915326", "0.5914477", "0.5904776", "0.5904107", "0.5901776", "0.5892918", "0.58851576", "0.5882845", "0.58825827", "0.587746", "0.58755344", "0.5874834", "0.58657795", "0.5865519", "0.58636737", "0.58602613", "0.5856403", "0.58547765", "0.58545125", "0.58539337", "0.58532524", "0.5848273", "0.5846904", "0.5845139", "0.58447355", "0.5844251", "0.58391804", "0.58317834", "0.5828482", "0.5828482", "0.5828482", "0.5828482", "0.5828482", "0.5828482", "0.58279365", "0.58239204", "0.5820254" ]
0.0
-1
/ Slow but steady. Send after high armor.
public static Unit siege(){ Unit unit = new Unit("Siege", "C_W_Siege", 15, 5, 12, 14, 4); unit.addWep(new Weapon("Warhammer",10,5)); unit.addActive(ActiveType.SLAM); unit.addActive(ActiveType.POWER); unit.addPassive(PassiveType.ALERT); return unit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public void h() {\n long currentTimeMillis = System.currentTimeMillis();\n this.m.sendEmptyMessageDelayed(48, q.c(currentTimeMillis));\n this.m.sendEmptyMessageDelayed(49, q.d(currentTimeMillis));\n }", "@Override\n\tpublic double sendbid() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double sendbid() {\n\t\treturn 0;\n\t}", "private static void SendToAuctioneer(BigInteger msg) {\r\n\t\tmsg=auctioneer_pk.encrypt(msg)[0];\r\n\t\tsendToClient(auctioneer,msg);\r\n\t}", "@Override\n\tpublic void EmergencySend(byte[] data) {\n\t\t\n\t}", "private void snack() {\n\t\t\tsynchronized (left) {\n\t\t\t\tsynchronized (right) {\n\t\t\t\t\tSystem.out.println(this.name + \" start to snack\");\n\t\t\t\t\tUtils.pause(1_000);\n\t\t\t\t\t// System.out.println(this.name + \" finished to snack\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(this.name + \" is not hungry\");\n\t\t}", "public void send() {\n\t}", "protected void handleBuy(Message m) {\n return;\n }", "public void sendBye() throws IOException {\n if (_out != null) {\n writeHeader();\n _dos.writeBytes(\"BYE\\0\");\n _dos.writeInt(0);\n _baos.writeTo(_out);\n cleanup();\n }\n }", "public void deliverStone5() {\n }", "public void sleep() {\n \t\thealth = maxHealthModifier;\n \t\ttoxicity = 0;\n \t}", "public void sendPowerUpdate()\n\t{\n\t\tif (!this.worldObj.isRemote)\n\t\t{\n\t\t\tPacketHandler.sendPacketToClients(ResonantInduction.PACKET_TILE.getPacket(this, SimplePacketTypes.RUNNING.name, this, this.functioning), worldObj, new Vector3(this), 64);\n\t\t}\n\t}", "@Override\r\n\tpublic void uniqueOnStartInteraction() {\n\t\tif (Main.clientPlayer.getNumWood() < cost) {\r\n\t\t\tMain.clientPlayer.stopInteraction();\r\n\t\t}\r\n\r\n\t}", "protected void wash() throws InterruptedException {\n\t\t// Lock hatch\n\t\tmyMachine.setLock(true);\n\n\t\tpreWash();\n\t\tmainWash();\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\trinse();\n\t\t}\n\t\tcentrifuge();\n\t\t// Unlock\n\t\tmyMachine.setLock(false);\n\t}", "@Override\r\n\tpublic void send() throws Exception {\n\t\t\r\n\t}", "public synchronized void intentionSell(String goodId) {\n\t\tGood goodToSell = goods.get(goodId);\n\t\tif (goodToSell == null) {\n\t\t\tSystem.err.println(\"ERROR: Good not found!\");\n\t\t\tSystem.out.println(\"Result: FALSE\\n------------------\");\n\t\t\treturn;\n\t\t}\n\n\t\t//writer increments timestamp\n\t\tfinal int writeTimeStamp = goodToSell.getWriteTimestamp() + 1;\n\n\t\tif (verbose) {\n\t\t\tSystem.out.println(\"WriteTimeStamp: \" + writeTimeStamp);\n\t\t}\n\n\t\tConcurrentHashMap<String, Result> acksList = new ConcurrentHashMap<>();\n\t\tConcurrentHashMap<String, Result> failedAcksList = new ConcurrentHashMap<>();\n\n\t\tCountDownLatch awaitSignal = new CountDownLatch((NUM_NOTARIES + NUM_FAULTS) / 2 + 1);\n\n\t\tint test = 0;\n\t\tAtomicInteger demo4 = new AtomicInteger(0);\n\n\t\t// if demo is Read while Write, delay two writes\n\t\t// if demo is Byzantine Client, send one wrong value to notaries each IntentionToSell\n\t\tfor (String notaryID : notaryServers.keySet()) {\n\t\t\tNotaryInterface notary = notaryServers.get(notaryID);\n\t\t\tif (demo == 2) {\n\t\t\t\ttest++;\n\t\t\t\ttry {\n\n\t\t\t\t\tif (test == 1) {\n\t\t\t\t\t\tSystem.out.println(\"Sleeping\");\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t} else if (test == 3) {\n\t\t\t\t\t\tSystem.out.println(\"Sleeping\");\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tservice.execute(() -> {\n\n\t\t\t\ttry {\n\t\t\t\t\t//send signed message\n\t\t\t\t\tboolean modify = false;\n\t\t\t\t\tif(demo == 4) {\n\t\t\t\t\t\tmodify = demo4.incrementAndGet() == 2;\n\t\t\t\t\t\tSystem.out.println(\"Sending wrong timeStamp\");\n\t\t\t\t\t}\n\n\t\t\t\t\tString nonce = notary.getNonce(this.id);\n\t\t\t\t\tString cnonce = cryptoUtils.generateCNonce();\n\t\t\t\t\tString data = nonce + cnonce + this.id + goodId + writeTimeStamp;\n\t\t\t\t\tResult result = notary.intentionToSell(this.id, goodId, modify ? 1000 : writeTimeStamp, cnonce,\n\t\t\t\t\t\tcryptoUtils.signMessage(data));\n\n\t\t\t\t\t//verify signature of receive message\n\t\t\t\t\tif (!cryptoUtils\n\t\t\t\t\t\t.verifySignature(notaryID, data + result.getContent().hashCode(),\n\t\t\t\t\t\t\tresult.getSignature())) {\n\t\t\t\t\t\tthrow new InvalidSignatureException(notaryID);\n\t\t\t\t\t}\n\t\t\t\t\tif (verbose) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"Received WriteTimeStamp: \" + result.getWriteTimestamp());\n\t\t\t\t\t}\n\n\t\t\t\t\t//check if timestamp matches\n\t\t\t\t\tif ((Boolean) result.getContent()\n\t\t\t\t\t\t&& result.getWriteTimestamp() == writeTimeStamp) {\n\t\t\t\t\t\tacksList.put(notaryID, result);\n\t\t\t\t\t\tawaitSignal.countDown();\n\t\t\t\t\t\tif (verbose) {\n\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\"NotaryID: \" + notaryID + \"\\nResult: \" + (Boolean) result\n\t\t\t\t\t\t\t\t\t.getContent());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfailedAcksList.put(notaryID,\n\t\t\t\t\t\t\tnew Result(new Boolean(false), cryptoUtils.signMessage(\"false\")));\n\t\t\t\t\t\tawaitSignal.countDown();\n\t\t\t\t\t\tSystem.out.println(\"Result: Invalid good\");\n\t\t\t\t\t}\n\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\trebind();\n\t\t\t\t} catch (InvalidSignatureException e) {\n\t\t\t\t\tfailedAcksList.put(notaryID,\n\t\t\t\t\t\tnew Result(new Boolean(false), cryptoUtils.signMessage(\"false\")));\n\t\t\t\t\tawaitSignal.countDown();\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\n\t\t//waits for notaries replies\n\t\ttry {\n\t\t\tawaitSignal.await(TIMEOUT, TimeUnit.SECONDS);\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(\"Result: FALSE\\n------------------\");\n\t\t\treturn;\n\t\t}\n\n\t\t// checks if quorum was reached\n\t\tif (acksList.size() + failedAcksList.size() > (NUM_NOTARIES + NUM_FAULTS) / 2) {\n\t\t\tif (verbose) {\n\t\t\t\tSystem.out.println(\"--> AcksList: \" + acksList.size());\n\t\t\t}\n\t\t\tSystem.out.println(\"--> Quorum Reached\");\n\n\t\t\tif (acksList.size() > failedAcksList.size()) {\n\t\t\t\tgoods.get(goodId).setForSale();\n\t\t\t\tgoodToSell.setWriteTimestamp(writeTimeStamp);\n\t\t\t\tSystem.out.println(\"Result: TRUE\\n------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Result: FALSE\\n------------------\");\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"--> Quorum not reached...\");\n\t\t\tSystem.out.println(\"Result: FALSE\\n------------------\");\n\n\t\t}\n\t}", "private void performHandShake() {\n try {\n boolean OK = false;\n // String rsp= new String( this.defaultComTool.WriteAndRead((String) command.get(\"restore_defaults\")));\n // while(!OK) { }\n this.defaultComTool.WriteAndRead((String) command.get(\"disable_echo\"));\n this.defaultComTool.WriteAndRead((String) command.get(\"disable_linefeed\"));\n this.defaultComTool.WriteAndRead((String) command.get(\"disable_headers\"));\n this.defaultComTool.WriteAndRead((String) command.get(\"disable_spaces\"));\n this.defaultComTool.WriteAndRead((String) command.get(\"protocol auto set\"));\n Thread.sleep(3000);\n\n this.CheckRequiredCommands_Availability(FIRSTLEVEL_CHECK);\n //Thread.sleep(2000);\n\n this.CheckRequiredCommands_Availability(SECONDLEVEL_CHECK);\n for (int i = 1; i < 6; i++) {\n switch (i) {\n case 1:\n if (av_commands[i] == false) {\n Kernel.interfc.sim.log.append(\"WARNING: RPM Reading is NOT SUPPORTED\\n APP forcestopped!!\\n\");\n synchronized (this) {\n Kernel.forcedstopped = true;\n\n }\n\n }\n break;\n case 2:\n if (av_commands[i] == false) {\n Kernel.interfc.sim.log.append(\"WARNING: SPEED Reading is NOT SUPPORTED\\n APP forcestopped!!\\n\");\n synchronized (this) {\n Kernel.forcedstopped = true;\n\n }\n\n }\n break;\n case 3:\n if (av_commands[i] == false) {\n Kernel.interfc.sim.log.append(\"WARNING: COOLANT TEMP Reading is NOT SUPPORTED\\n APP forcestopped!!\\n\");\n synchronized (this) {\n Kernel.forcedstopped = true;\n\n }\n\n }\n break;\n case 4:\n if (av_commands[i] == false) {\n int arbFuel;\n Random rnd = new Random();\n arbFuel = rnd.nextInt(100) + 1;\n Kernel.interfc.sim.log.append(\"WARNING: FUEL LVL Reading is NOT SUPPORTED\\n Arbitrary value (\" + arbFuel + \") set!! \\n\");\n\n }\n break;\n case 5:\n if (av_commands[i] == false) {\n int arbCheck;\n Random rnd = new Random();\n arbCheck = rnd.nextInt(2);\n Kernel.interfc.sim.log.append(\"WARNING: CheckEngine Light Reading is NOT SUPPORTED\\n Arbitrary value (\" + arbCheck + \") set!! \\n\");\n\n }\n break;\n\n }\n }\n {\n Kernel.interfc.sim.log.append(\"HANDSHAKE PERFORMED...Awaiting for SelfTest\\n\");\n\n }\n\n } catch (Exception e) {\n System.out.println(\"PERFORM HANDSHAKE:\" + e.getMessage() + \" \" + e.getLocalizedMessage());\n }\n }", "void send();", "public void deliverStone4() {\n }", "private final void maintain(){\n\t\tif(host.getStrength()>MAINTENANCE_COST){\n\t\t\thost.expend(MAINTENANCE_COST);\n\t\t}\n\t\telse{\n\t\t\tkill();\n\t\t}\n\t}", "public void doPack() {\n this._sendData = new byte[2];\n this._sendData[0] = (byte) this.expMode;\n if (this.expMode == 6) {\n this._sendData[1] = (byte) this.senceMode;\n }\n }", "@Override\n public void handleMessage(Message msg) {\n sendEmptyMessageDelayed(0, 3000);\n if (resClient.getSendBufferFreePercent() <= 0.05) {\n Toast.makeText(StreamingActivity.this, \"sendbuffer is full,netspeed is low!\", Toast.LENGTH_SHORT).show();\n }\n }", "public void deliverStone6() {\n }", "protected synchronized void sendLifeSign() {\n if (socketLayer.isConnected() && nextLifeSignToSend < System.currentTimeMillis()) {\n int oldTimeOut = 0;\n try {\n oldTimeOut = socketLayer.getSocketToPartner().getSoTimeout();\n socketLayer.getSocketToPartner().setSoTimeout(5000);\n socketLayer.writeMsg(BaseCommTag.REQ_LIFE_SIGN.name());\n // exactly one read - the response should be\n // BaseCommTag.RESP_LIFE_SIGN\n // if not the server has ignored the REQ_LIFE_SIGN message\n // in this version this circumstance is ignored\n LocalLog.info(\"LifeTimer sendLifeSign\");\n socketLayer.readMsg(true);\n } catch (ActionFailedException afx) {\n LocalLog.error(\"Senden des LifeSigns. Verbindung zu Service wird unterbrochen.\", afx);\n stopped = true;\n } catch (SocketException sx) {\n LocalLog.error(\"Senden des LifeSigns. Verbindung zu Service wird unterbrochen.\", sx);\n stopped = true;\n }\n\n try {\n // error case\n if (stopped) {\n closedByLifeSignSystem = true;\n socketLayer.close();\n } else {\n // ok - timeout reset to original value\n socketLayer.getSocketToPartner().setSoTimeout(oldTimeOut);\n }\n } catch (Exception e) {\n // nothing to do\n }\n }\n }", "private synchronized void m16565c() {\n if (!(this.f14719b || this.f14723f.hasMessages(this.f14724g))) {\n this.f14723f.sendMessageDelayed(this.f14723f.obtainMessage(this.f14724g), 2000);\n }\n }", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }", "@Override\n public void summonHorsesToPaddock(){\n rl.lock();\n try{\n System.out.println(\"B : Trying to summon horse...\");\n //change broker state\n// MyThreadBroker broker = (MyThreadBroker) Thread.currentThread();\n// broker.broker_states = MyThreadBroker.Broker_States.ANNOUNCING_NEXT_RACE;\n //change log\n log.setBrokerState(MyThreadBroker.Broker_States.ANNOUNCING_NEXT_RACE);\n log.changeLog();\n keep_waiting = false;\n stable_horses.signal(); \n }finally{\n rl.unlock();\n }\n \n }", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "protected void send(InternalCommunicationNetwork tank){\n\t\ttank.put(0,this.rain_level);\n\t}", "@Override\n\tpublic void msgGoToSleep() {\n\t\t\n\t}", "public void run() \n\t\t\t{\n\t\t\t\tif (Math.abs(player.getLocation().getX() - playerLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getY() - playerLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getZ() - playerLoc.getZ()) > 1)\n\t\t\t\t{\n\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot move while bandaging!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString name = player.getCustomName();\n\t\t\t\tif (name == null)\n\t\t\t\t\tname = player.getName();\n\t\t\t\t\n\t\t\t\t//Check that the recipient is still in roughly the same location\n\t\t\t\t//Skip if self-heal\n\t\t\t\tif (!player.equals(recipient))\n\t\t\t\t\tif (Math.abs(recipient.getLocation().getX() - recipientLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getY() - recipientLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getZ() - recipientLoc.getZ()) > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot bandage your patient while they are moving!\");\n\t\t\t\t\t\trecipient.sendMessage(ChatColor.YELLOW + name + \" cannot bandage you while you are moving!\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Remove item from player's inventory.\n\t \t\tplayer.getInventory().removeItem(new ItemStack(Material.getMaterial(item.toUpperCase()), 1));\n\t \t\tplayer.updateInventory();\n\t \t\t\t\n\t \t\t//Heal the other player.\n\t \t\trecipient.setHealth(recipient.getHealth() + amountToHeal);\n\n\t \t\t//Award experience.\n\t \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n\t \t\t\n\t \t\tif (!prof.isPracticeFatigued(profession))\n\t \t\t\taddExperience(player, profession, config.getInt(\"healing.\" + item + \".exp\"));\n\t \t\t\t\n\t \t\t//Notify both parties.\n\t \t\tif (!player.equals(recipient))\n\t \t\t{\t \t\t\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged \" + recipient.getName() + \"'s wounds.\");\n\t \t\t\trecipient.sendMessage(ChatColor.YELLOW + player.getName() + \" bandaged your wounds.\");\n\t \t\t}\n\t \t\telse\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged your wounds.\");\n\t\t\t }", "public TransactionResponse buyEnchant() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\tNotification not = hc.getNotify();\r\n \t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\ttry {\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tString nenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tint shopstock = 0;\r\n \t\t\tshopstock = (int) hyperObject.getStock();\r\n \t\t\tif (shopstock >= 1) {\r\n \t\t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\t\tdouble price = hyperObject.getCost(EnchantmentClass.fromString(mater));\r\n \t\t\t\tprice = price + hyperObject.getPurchaseTax(price);\r\n \t\t\t\tif (price != 123456789) {\r\n \t\t\t\t\tif (!im.containsEnchantment(p.getItemInHand(), ench)) {\r\n \t\t\t\t\t\tif (acc.checkFunds(price, p)) {\r\n \t\t\t\t\t\t\tif (im.canAcceptEnchantment(p.getItemInHand(), ench) && p.getItemInHand().getAmount() == 1) {\r\n \t\t\t\t\t\t\t\thyperObject.setStock(shopstock - 1);\r\n \t\t\t\t\t\t\t\tacc.withdraw(price, p);\r\n \t\t\t\t\t\t\t\tacc.depositShop(price);\r\n \t\t\t\t\t\t\t\tif (hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\")) {\r\n \t\t\t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tint l = hyperObject.getName().length();\r\n \t\t\t\t\t\t\t\tString lev = hyperObject.getName().substring(l - 1, l);\r\n \t\t\t\t\t\t\t\tint level = Integer.parseInt(lev);\r\n \t\t\t\t\t\t\t\tim.addEnchantment(p.getItemInHand(), ench, level);\r\n \t\t\t\t\t\t\t\tboolean stax;\r\n \t\t\t\t\t\t\t\tstax = Boolean.parseBoolean(hyperObject.getIsstatic());\r\n \t\t\t\t\t\t\t\tdouble taxrate;\r\n \t\t\t\t\t\t\t\tif (!stax) {\r\n \t\t\t\t\t\t\t\t\ttaxrate = hc.getYaml().getConfig().getDouble(\"config.enchanttaxpercent\");\r\n \t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\ttaxrate = hc.getYaml().getConfig().getDouble(\"config.statictaxpercent\");\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tdouble taxpaid = price - (price / (1 + taxrate / 100));\r\n \t\t\t\t\t\t\t\ttaxpaid = calc.twoDecimals(taxpaid);\r\n \t\t\t\t\t\t\t\tprice = calc.twoDecimals(price);\r\n \t\t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"ENCHANTMENT_PURCHASE_MESSAGE\"), 1, price, hyperObject.getName(), calc.twoDecimals(taxpaid)), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tlog.writeSQLLog(p.getName(), \"purchase\", hyperObject.getName(), 1.0, price, taxpaid, playerecon, type);\r\n \r\n \t\t\t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\t\t\tnot.setNotify(hyperObject.getName(), mater, playerecon);\r\n \t\t\t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\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\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_ALREADY_HAS_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"THE_SHOP_DOESNT_HAVE_ENOUGH\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction buyEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "public void hang() {\n // WRITE CODE BETWEEN THESE LINES -------------------------------------------------------- //\n // TODO: run the intake motor to both extend and pull in hanger\n // Note: only enable running motor when the m_extended flag is true\n\n // ^^-----------------------------------------------------------------------------------^^ //\n }", "@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker, final boolean awake)\n\t{\n\t\t/*\n\t\t * if ((this instanceof L2SiegeGuardInstance) && (attacker instanceof L2SiegeGuardInstance)) //if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return; if ((this instanceof L2MonsterInstance)&&(attacker instanceof\n\t\t * L2MonsterInstance)) if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return;\n\t\t */\n\t\t\n\t\tif (isRaid() && attacker != null && attacker.getParty() != null && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this))\n\t\t{\n\t\t\tif (firstCommandChannelAttacked == null) // looting right isn't set\n\t\t\t{\n\t\t\t\tsynchronized (this)\n\t\t\t\t{\n\t\t\t\t\tif (firstCommandChannelAttacked == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfirstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t\t\t\t\tif (firstCommandChannelAttacked != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcommandChannelTimer = new CommandChannelTimer(this);\n\t\t\t\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis();\n\t\t\t\t\t\t\tThreadPoolManager.getInstance().scheduleGeneral(commandChannelTimer, 10000); // check for last attack\n\t\t\t\t\t\t\tfirstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\", \"You have looting rights!\")); // TODO: retail msg\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\telse if (attacker.getParty().getCommandChannel().equals(firstCommandChannelAttacked)) // is in same channel\n\t\t\t{\n\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis(); // update last attack time\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * // CommandChannel if(commandChannelTimer == null && isRaid() && attacker != null) { if(attacker.isInParty() && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this)) { firstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t * commandChannelTimer = new CommandChannelTimer(this, attacker.getParty().getCommandChannel()); ThreadPoolManager.getInstance().scheduleGeneral(_commandChannelTimer, 300000); // 5 min firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\",\n\t\t * \"You have looting rights!\")); } }\n\t\t */\n\t\tif (isEventMob)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add damage and hate to the attacker AggroInfo of the L2Attackable aggroList\n\t\tif (attacker != null)\n\t\t{\n\t\t\taddDamage(attacker, (int) damage);\n\t\t}\n\t\t\n\t\t// If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle\n\t\tif (this instanceof L2MonsterInstance)\n\t\t{\n\t\t\tL2MonsterInstance master = (L2MonsterInstance) this;\n\t\t\t\n\t\t\tif (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tmaster = ((L2MinionInstance) this).getLeader();\n\t\t\t\t\n\t\t\t\tif (!master.isInCombat() && !master.isDead())\n\t\t\t\t{\n\t\t\t\t\tmaster.addDamage(attacker, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (master.hasMinions())\n\t\t\t{\n\t\t\t\tmaster.callMinionsToAssist(attacker);\n\t\t\t}\n\t\t\t\n\t\t\tmaster = null;\n\t\t}\n\t\t\n\t\t// Reduce the current HP of the L2Attackable and launch the doDie Task if necessary\n\t\tsuper.reduceCurrentHp(damage, attacker, awake);\n\t}", "public static /* synthetic */ void DistributeHyperSP(int a, MapleClient a, MapleCharacter a, boolean a) {\n block3: {\n var4_4 = SkillFactory.getSkill(a);\n if (var4_4 == null || !var4_4.isHyperSkill() && !var4_4.isHyperStat()) ** GOTO lbl17\n if (a != 0) break block3;\n a = a.getRemainingHSp(var4_4.getHyper() - 1);\n if (a >= 1 && a.getLevel() >= var4_4.getReqLevel() && var4_4.canBeLearnedBy(a.getJob()) && a.getSkillLevel(var4_4) == 0) {\n v0 = a;\n v0.setRemainingHSp(var4_4.getHyper() - 1, a - 1);\n v0.changeSkillLevel(a, 1, var4_4.getMaxLevel());\n }\n ** GOTO lbl17\n }\n if (a.getSkillLevel(var4_4) >= var4_4.getMaxLevel()) ** GOTO lbl17\n if (a == 80000406 && !JobConstants.is\\u60e1\\u9b54\\u6bba\\u624b(a.getJob()) && !JobConstants.is\\u795e\\u4e4b\\u5b50(a.getJob())) {\n v1 = a;\n a.dropMessage(1, DumpMapName.ALLATORIxDEMO(\"\\u8a44\\u62d3\\u80cb\\u53b9\\u673f\\u60b2\\u9b62\\u6be9\\u627d|\\u7968\\u4e18\\u5b66\\u53bc\\u4ed3\\u4f2c\\u751e}\"));\n } else {\n a.changeSkillLevel(a, a.getSkillLevel(var4_4) + 1, var4_4.getMaxLevel());\nlbl17:\n // 4 sources\n\n v1 = a;\n }\n v1.sendPacket(MaplePacketCreator.enableActions());\n }\n\n /*\n * Enabled aggressive block sorting\n */\n public static final /* synthetic */ void AutoAssignAP(LittleEndianAccessor a2, MapleClient a3, MapleCharacter a4) {\n long l2;\n LittleEndianAccessor littleEndianAccessor;\n LittleEndianAccessor littleEndianAccessor2 = a2;\n a4.updateTick(littleEndianAccessor2.readInt());\n int n2 = littleEndianAccessor2.readInt();\n if (littleEndianAccessor2.available() < (long)(GameSetConstants.MAPLE_VERSION >= 147 ? n2 * 12 : 16)) {\n return;\n }\n long l3 = 0L;\n if (GameSetConstants.MAPLE_VERSION >= 138) {\n LittleEndianAccessor littleEndianAccessor3 = a2;\n littleEndianAccessor = littleEndianAccessor3;\n l3 = littleEndianAccessor3.readLong();\n } else {\n LittleEndianAccessor littleEndianAccessor4 = a2;\n littleEndianAccessor = littleEndianAccessor4;\n l3 = littleEndianAccessor4.readInt();\n }\n int n3 = littleEndianAccessor.readInt();\n long l4 = 0L;\n l4 = GameSetConstants.MAPLE_VERSION >= 138 ? (n2 > 1 ? (long)((int)a2.readLong()) : 0L) : (long)a2.readInt();\n int n4 = 0;\n if (GameSetConstants.MAPLE_VERSION >= 138) {\n n4 = n2 > 1 ? a2.readInt() : 0;\n l2 = l3;\n } else {\n n4 = a2.readInt();\n l2 = l3;\n }\n MapleStat mapleStat = MapleStat.getByValue(l2);\n MapleStat mapleStat2 = MapleStat.getByValue(l4);\n if (n3 < 0 || n4 < 0) {\n a3.sendPacket(MaplePacketCreator.enableActions());\n return;\n }\n if (a4.getRemainingAp() < 1) {\n a3.sendPacket(MaplePacketCreator.enableActions());\n return;\n }\n if (!StatsHandling.checkAssignAp(a4, mapleStat, mapleStat2, n3, n4)) {\n a3.sendPacket(MaplePacketCreator.enableActions());\n return;\n }\n MapleCharacter mapleCharacter = a4;\n PlayerStats playerStats = mapleCharacter.getStat();\n ArrayList<Pair<MapleStat, Integer>> arrayList = new ArrayList<Pair<MapleStat, Integer>>(2);\n a3.sendPacket(MaplePacketCreator.updatePlayerStats(arrayList, true, a4));\n if (mapleCharacter.getRemainingAp() == n3 + n4) {\n MapleCharacter mapleCharacter2;\n switch (mapleStat) {\n case STR: {\n if (playerStats.getStr() + n3 > GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats2 = playerStats;\n playerStats2.setStr((short)(playerStats2.getStr() + n3));\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.STR, Integer.valueOf(playerStats.getStr())));\n break;\n }\n case DEX: {\n if (playerStats.getDex() + n3 > GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats3 = playerStats;\n playerStats3.setDex((short)(playerStats3.getDex() + n3));\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.DEX, Integer.valueOf(playerStats.getDex())));\n break;\n }\n case INT: {\n if (playerStats.getInt() + n3 > GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats4 = playerStats;\n playerStats4.setInt((short)(playerStats4.getInt() + n3));\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.INT, Integer.valueOf(playerStats.getInt())));\n break;\n }\n case LUK: {\n if (playerStats.getLuk() + n3 > GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats5 = playerStats;\n playerStats5.setLuk((short)(playerStats5.getLuk() + n3));\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.LUK, Integer.valueOf(playerStats.getLuk())));\n break;\n }\n default: {\n a3.sendPacket(MaplePacketCreator.updatePlayerStats(MaplePacketCreator.EMPTY_STATUPDATE, true, a4));\n return;\n }\n }\n switch (mapleStat2) {\n case STR: {\n if (playerStats.getStr() + n4 > GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats6 = playerStats;\n playerStats6.setStr((short)(playerStats6.getStr() + n4));\n mapleCharacter2 = a4;\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.STR, Integer.valueOf(playerStats.getStr())));\n break;\n }\n case DEX: {\n if (playerStats.getDex() + n4 > GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats7 = playerStats;\n playerStats7.setDex((short)(playerStats7.getDex() + n4));\n mapleCharacter2 = a4;\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.DEX, Integer.valueOf(playerStats.getDex())));\n break;\n }\n case INT: {\n if (playerStats.getInt() + n4 > GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats8 = playerStats;\n playerStats8.setInt((short)(playerStats8.getInt() + n4));\n mapleCharacter2 = a4;\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.INT, Integer.valueOf(playerStats.getInt())));\n break;\n }\n case LUK: {\n if (playerStats.getLuk() + n4 > GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats9 = playerStats;\n playerStats9.setLuk((short)(playerStats9.getLuk() + n4));\n mapleCharacter2 = a4;\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.LUK, Integer.valueOf(playerStats.getLuk())));\n break;\n }\n default: {\n a3.sendPacket(MaplePacketCreator.updatePlayerStats(MaplePacketCreator.EMPTY_STATUPDATE, true, a4));\n return;\n }\n }\n mapleCharacter2.setRemainingAp((short)(a4.getRemainingAp() - (n3 + n4)));\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.AVAILABLEAP, Integer.valueOf(a4.getRemainingAp())));\n MapleClient mapleClient = a3;\n mapleClient.sendPacket(MaplePacketCreator.updatePlayerStats(arrayList, true, a4));\n mapleClient.sendPacket(MaplePacketCreator.enableActions());\n }\n }\n\n /*\n * Enabled aggressive block sorting\n */\n public static final /* synthetic */ void DistributeAP(MapleClient a2, MapleCharacter a3, MapleStat a42) {\n ArrayList<Pair<MapleStat, Integer>> arrayList = new ArrayList<Pair<MapleStat, Integer>>(2);\n if (a3 != null) {\n a2.sendPacket(MaplePacketCreator.updatePlayerStats(arrayList, true, a3));\n MapleCharacter mapleCharacter = a3;\n PlayerStats playerStats = mapleCharacter.getStat();\n short s2 = a3.getJob();\n if (mapleCharacter.getRemainingAp() > 0 && a42 != null) {\n MapleCharacter mapleCharacter2;\n switch (1.ALLATORIxDEMO[a42.ordinal()]) {\n case 1: {\n if (playerStats.getStr() >= GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats2 = playerStats;\n playerStats2.setStr((short)(playerStats2.getStr() + 1));\n mapleCharacter2 = a3;\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.STR, Integer.valueOf(playerStats.getStr())));\n break;\n }\n case 2: {\n if (playerStats.getDex() >= GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats3 = playerStats;\n playerStats3.setDex((short)(playerStats3.getDex() + 1));\n mapleCharacter2 = a3;\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.DEX, Integer.valueOf(playerStats.getDex())));\n break;\n }\n case 3: {\n if (playerStats.getInt() >= GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats4 = playerStats;\n playerStats4.setInt((short)(playerStats4.getInt() + 1));\n mapleCharacter2 = a3;\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.INT, Integer.valueOf(playerStats.getInt())));\n break;\n }\n case 4: {\n if (playerStats.getLuk() >= GameSetConstants.MAX_STAT) {\n return;\n }\n PlayerStats playerStats5 = playerStats;\n playerStats5.setLuk((short)(playerStats5.getLuk() + 1));\n mapleCharacter2 = a3;\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.LUK, Integer.valueOf(playerStats.getLuk())));\n break;\n }\n case 5: {\n int a42 = playerStats.getMaxHp();\n if (a3.getHpMpApUsed() >= 10000 || a42 >= 30000) {\n return;\n }\n if (s2 == 0) {\n a42 += Randomizer.rand(8, 12);\n } else if (s2 >= 100 && s2 <= 132 || s2 >= 3200 && s2 <= 3212) {\n ISkill iSkill = SkillFactory.getSkill(1000001);\n int n2 = a2.getPlayer().getSkillLevel(iSkill);\n a42 += Randomizer.rand(20, 25);\n if (n2 >= 1) {\n a42 += iSkill.getEffect(n2).getX();\n }\n } else if (s2 >= 200 && s2 <= 232) {\n a42 += Randomizer.rand(10, 20);\n } else if (s2 >= 300 && s2 <= 322 || s2 >= 400 && s2 <= 434 || s2 >= 1300 && s2 <= 1312 || s2 >= 1400 && s2 <= 1412 || s2 >= 3300 && s2 <= 3312) {\n a42 += Randomizer.rand(16, 20);\n } else if (s2 >= 500 && s2 <= 522 || s2 >= 3500 && s2 <= 3512) {\n ISkill iSkill = SkillFactory.getSkill(5100000);\n int n3 = a2.getPlayer().getSkillLevel(iSkill);\n a42 += Randomizer.rand(18, 22);\n if (n3 >= 1) {\n a42 += iSkill.getEffect(n3).getY();\n }\n } else if (s2 >= 1500 && s2 <= 1512) {\n ISkill iSkill = SkillFactory.getSkill(15100000);\n int n4 = a2.getPlayer().getSkillLevel(iSkill);\n a42 += Randomizer.rand(18, 22);\n if (n4 >= 1) {\n a42 += iSkill.getEffect(n4).getY();\n }\n } else if (s2 >= 1100 && s2 <= 1112) {\n ISkill iSkill = SkillFactory.getSkill(11000000);\n int n5 = a2.getPlayer().getSkillLevel(iSkill);\n a42 += Randomizer.rand(36, 42);\n if (n5 >= 1) {\n a42 += iSkill.getEffect(n5).getY();\n }\n } else {\n a42 = s2 >= 1200 && s2 <= 1212 ? (a42 += Randomizer.rand(15, 21)) : (s2 >= 2000 && s2 <= 2112 ? (a42 += Randomizer.rand(40, 50)) : (a42 += Randomizer.rand(50, 100)));\n }\n a42 = (short)Math.min(30000, Math.abs(a42));\n mapleCharacter2 = a3;\n MapleCharacter mapleCharacter3 = a3;\n mapleCharacter3.setHpMpApUsed((short)(mapleCharacter3.getHpMpApUsed() + 1));\n playerStats.setMaxHp(a42);\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.MAXHP, a42));\n break;\n }\n case 6: {\n int n6 = playerStats.getMaxMp();\n if (a3.getHpMpApUsed() >= 10000 || playerStats.getMaxMp() >= 30000) {\n return;\n }\n if (s2 == 0) {\n n6 += Randomizer.rand(6, 8);\n } else if (s2 >= 100 && s2 <= 132) {\n n6 += Randomizer.rand(2, 4);\n } else if (s2 >= 200 && s2 <= 232 || s2 >= 3200 && s2 <= 3212) {\n ISkill iSkill = SkillFactory.getSkill(2000001);\n int a42 = a2.getPlayer().getSkillLevel(iSkill);\n n6 += Randomizer.rand(18, 20);\n if (a42 >= 1) {\n n6 += iSkill.getEffect(a42).getY() * 2;\n }\n } else if (s2 >= 300 && s2 <= 322 || s2 >= 400 && s2 <= 434 || s2 >= 500 && s2 <= 522 || s2 >= 3200 && s2 <= 3212 || s2 >= 3500 && s2 <= 3512 || s2 >= 1300 && s2 <= 1312 || s2 >= 1400 && s2 <= 1412 || s2 >= 1500 && s2 <= 1512) {\n n6 += Randomizer.rand(10, 12);\n } else if (s2 >= 1100 && s2 <= 1112) {\n n6 += Randomizer.rand(6, 9);\n } else if (s2 >= 1200 && s2 <= 1212) {\n ISkill iSkill = SkillFactory.getSkill(12000000);\n int a42 = a2.getPlayer().getSkillLevel(iSkill);\n n6 += Randomizer.rand(18, 20);\n if (a42 >= 1) {\n n6 += iSkill.getEffect(a42).getY() * 2;\n }\n } else {\n n6 = s2 >= 2000 && s2 <= 2112 ? (n6 += Randomizer.rand(6, 9)) : (n6 += Randomizer.rand(50, 100));\n }\n n6 = (short)Math.min(30000, Math.abs(n6));\n mapleCharacter2 = a3;\n MapleCharacter mapleCharacter4 = a3;\n mapleCharacter4.setHpMpApUsed((short)(mapleCharacter4.getHpMpApUsed() + 1));\n playerStats.setMaxMp(n6);\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.MAXMP, n6));\n break;\n }\n default: {\n a2.sendPacket(MaplePacketCreator.updatePlayerStats(MaplePacketCreator.EMPTY_STATUPDATE, true, a3));\n return;\n }\n }\n mapleCharacter2.setRemainingAp((short)(a3.getRemainingAp() - 1));\n arrayList.add(new Pair<MapleStat, Integer>(MapleStat.AVAILABLEAP, Integer.valueOf(a3.getRemainingAp())));\n a2.sendPacket(MaplePacketCreator.updatePlayerStats(arrayList, true, a3));\n }\n }\n }\n\n public /* synthetic */ StatsHandling() {\n StatsHandling a2;\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public void saluteTheClient(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(0, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n\t\t\t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n \t}\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }", "public void deliverStone3() {\n }", "private void offer() {\n\t\t\t\n\t\t}", "private void sendCommand(CommandItem command) {\n sendCommand(command.data, command.advTimeout);\n }", "@Override\n public void run() {\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e2) {\n // TODO Auto-generated catch block\n e2.printStackTrace();\n }\n if(isTmp!=-1 && MainActivity2.linkLose==-1){\n Message message=new Message();\n message.what=15;\n MainActivity.hReceiver.sendMessage(message);\n\n }\n }", "void beginSendData(){\n stopSendThread = false;\n final Thread thread = new Thread(new Runnable() {\n\n public void run() {\n while(!Thread.currentThread().isInterrupted() && !stopSendThread){\n try{\n try {\n Thread.currentThread().sleep(100);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String string = \":1\" + (char)speedLeft + (char)speedRight + \"@\";\n try {\n os.write(string.getBytes());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } catch (Exception e){\n e.printStackTrace();\n stopSendThread = true;\n }\n\n\n }\n\n }\n });\n thread.start();\n System.out.println(\"koniec funkcji startsend\");\n }", "@Override\n public void use(AbstractPlayer p, AbstractMonster m) {\n //give player plated armor\n AbstractDungeon.actionManager.addToBottom( // 2.Gain plated armor\n new com.megacrit.cardcrawl.actions.common.ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player,\n new com.megacrit.cardcrawl.powers.PlatedArmorPower(AbstractDungeon.player, 3), 3));\n }", "public void doPack() {\n this._sendData = new byte[2];\n this._sendData[0] = 1;\n this._sendData[1] = (byte) (this.iOIndex & 15);\n }", "public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}", "private void buy() {\n if (asset >= S_I.getPirce()) {\n Item item = S_I.buy();\n asset -= item.getPrice();\n S_I.setAsset(asset);\n } else {\n System.out.println(\"cannot afford\");\n }\n }", "@Override\n\tpublic void msgGotHungry() {\n\t\t\n\t}", "@Override\r\n\tpublic void makeDeliveryFree() {\n\t\t\r\n\t}", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "private void sendReceiveRes(){\n\t}", "private void fullRepaired() { //full life\n this.active = true;\n this.damageState = DamageState.FULL;\n }", "public void sleep() {\n hunger += 1;\n fatigue = 0;\n\n if (isHungry()) {\n mood -= 1;\n } else {\n mood += 1;\n }\n\n if (!muted) {\n System.out.println(\"sleep\\t|\\tzzzZZZ *sheep*\");\n }\n }", "private void send(String p)\t{\t\t\t\r\n\t\ttry{\r\n\t\t\tif(isThisMyTurn){\r\n\t\t\t\toOutStream.writeObject(p);\r\n\t\t\t\toOutStream.flush();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(SocketException e){\r\n\t\t\tif(isThisMyTurn){\r\n\t\t\t\tisThisMyTurn = false;\r\n\t\t\t\tturnOffStream();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e) { \r\n\t\t\tif(isThisMyTurn){\r\n\t\t\t\tisThisMyTurn = false;\r\n\t\t\t\tturnOffStream();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void bust() {\n\t\t_loses++;\n\t\t//_money -= _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}", "public void send_message(){\n logical_clock++;\n System.out.println(\"Send Message Clock:\" +logical_clock);\n encrypt(logical_clock);\n\n }", "public void handleBuyEggCommand(){\n if(Aquarium.money >= EGGPRICE) {\n Aquarium.money -= EGGPRICE;\n Aquarium.egg++;\n }\n }", "public void blockingReceiveSenderSide() throws OOBException {\n \t}", "@Override\n\tpublic void sleep() {\n\t\t((Application) application()).unlockEC();\n\t\tsuper.sleep();\n\t}", "public void forceSend() {\n if(!isAsync()) {\n NoXray.log(Level.WARNING, \"Attempted to force send a sync packet, unnecesaary\");\n Thread.dumpStack();\n return;\n }\n\n while(_event.getAsyncMarker().getProcessingDelay() > 0) {\n decrementAsyncProcessingCountAndSendIfZero();\n }\n }", "void doNegativeEffect(Skill castSkill, double power, Creature performer, Item target) {\n/* 200 */ performer.getCommunicator().sendNormalServerMessage(\"The \" + target\n/* 201 */ .getName() + \" emits a deep worrying sound of resonance, but stays intact.\", (byte)3);\n/* */ }", "public synchronized void send() {\n if (AudioUtil.getIs()) {\n LogUtil.d(Tag, \"VR stop\");\n this.mPCMPackageHead.m4053c(CommonParams.bB);\n this.mPCMPackageHead.m4047a(0);\n writeVR(this.mPCMPackageHead.m4048a(), this.mPCMPackageHead.m4049b());\n }\n }", "@Benchmark\n @BenchmarkMode(Mode.Throughput)\n public void send()\n {\n _sender1.send(_account);\n }", "public void procesarTramaEasyFuel(){\n switch (bufferRecepcion[4]){\n //TRAMA DE CONFIGURACION\n case 0x06:\n if(bufferRecepcion[5] == 0x01 || bufferRecepcion[5] == 0x02){\n //TRAMA DE CONFIGURACION\n //Log.v(\"NOMBRE EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(bufferRecepcion,bufferRecepcion.length)));\n //Log.v(\"NOMBRE EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(tramaNombreEmbedded,tramaNombreEmbedded.length)));\n //Log.v(\"TRAMA EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(tramaMACEmbedded,tramaMACEmbedded.length)));\n //Log.v(\"PING HOST EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(tramaPingHost,tramaPingHost.length)));\n //Log.v(\"NÚMERO DE BOMBAS\", \"\" + byteArrayToHexInt(numeroBombas,1));\n\n llenarDatosConfiguracion();\n insertarMaestrosSQLite();\n agregarImagenEstaciones();\n //inicializarMangueras();\n clientTCPThread.write(EmbeddedPtcl.b_ext_configuracion); //0x06\n\n //inicializarMangueras();\n /*try {\n Thread.sleep(3000);\n } catch (InterruptedException ie) {\n ie.printStackTrace();\n }*/\n\n //cambiarEstadoIniciaAbastecimiento(1);\n\n }\n break;\n\n //CAMBIO DE ESTADO\n case 0x01:\n int indiceLayoutHose=0;\n //Capturar idBomba\n int[] arrayIdBomba = new int[1];\n int idBomba = 0;\n arrayIdBomba[0] = bufferRecepcion[7];\n idBomba = Integer.parseInt(byteArrayToHexIntGeneral(arrayIdBomba,1));\n\n for(int i=0;i<hoseEntities.size();i++ ){\n if(hoseEntities.get(i).idBomba==idBomba) {\n indiceLayoutHose = i;\n break;\n }\n }\n\n switch (bufferRecepcion[5]){\n case 0x01:\n //Cambio de estado\n if(hoseEntities.size() > 0){\n cambioEstado(indiceLayoutHose, bufferRecepcion[8]);\n }\n clientTCPThread.write(EmbeddedPtcl.b_ext_cambio_estado);//0x01\n break;\n case 0x02:\n //Estado actual de Mangueras\n cambioEstado(indiceLayoutHose, bufferRecepcion[8]);\n clientTCPThread.write(EmbeddedPtcl.b_ext_cambio_estado);//0x01\n //mConnectedThread.write(EmbeddedPtcl.b_ext_cambio_estado); //0x01\n break;\n case 0x03:\n //Cambio de Pulsos\n switch (bufferRecepcion[9]){\n case 0x01:\n // FLUJO\n if(hoseEntities.size() > 0){\n cambiarPulsos(indiceLayoutHose);\n }\n break;\n case 0x02:\n // INICIO NO FLUJO\n if(hoseEntities.size() > 0){\n cambiarEstadoSinFlujo(indiceLayoutHose);\n }\n break;\n case 0x03:\n // NO FLUJO\n if(hoseEntities.size() > 0){\n cambiarEstadoCierreHook(indiceLayoutHose);\n }\n break;\n }\n break;\n case 0x04:\n //Vehiculo Leido\n if(hoseEntities.size() > 0){\n cambiarPlaca(indiceLayoutHose);\n }\n\n clientTCPThread.write(EmbeddedPtcl.b_ext_cambio_estado);//0x01\n break;\n case 0x07:\n //Ultima transaccion\n\n if(hoseEntities.size() > 0){\n\n /*for(int j = 0; j< hoseEntities.size(); j++){\n if(hoseEntities.get(j).idBomba == idBomba){\n //llenarDatosTransaccion(hoseEntities.get(j));\n break;\n }\n }*/\n\n llenarDatosTransaccion(hoseEntities.get(indiceLayoutHose),indiceLayoutHose);\n\n }\n clientTCPThread.write(EmbeddedPtcl.b_ext_cambio_estado);//0x01\n //mConnectedThread.write(EmbeddedPtcl.b_ext_cambio_estado); //0x01\n break;\n }\n break;\n\n case 0x07:\n switch(bufferRecepcion[5]){\n case 0x01:\n break;\n }\n break;\n }\n changeFragment=true;\n }", "void send() throws ImsException;", "public void doPack() {\n this._sendData = new byte[1];\n this._sendData[0] = 1;\n }", "public void send0(){\n digitalWrite(data0, LOW);\n delayMicroseconds(34);\n digitalWrite(data0, HIGH);\n}", "private void sendEntry(Entry entry, int maxSendAttempts) {\n\t\tlogger.debug(\"Sending: {}\", entry);\n\t\tbyte[] data = Data.write.fromEntry(entry);\n\t\tint attempts = 0;\n\t\twhile (attempts++ < maxSendAttempts) {\n\t\t\ttry {\n\t\t\t\tout.write(data);\n\t\t\t\tout.flush();\n\t\t\t\tawait(Data.checksum(data), maxSendAttempts);\n\t\t\t\tout.write(Protocol.OK.value);\n\t\t\t\tout.flush();\n\t\t\t\tawait(Protocol.READY.value, maxSendAttempts);\n\t\t\t\treturn;\n\t\t\t} catch (IoTimeoutException e) {\n\t\t\t\tLevel level = attempts < maxSendAttempts ? Level.INFO : Level.ERROR;\n\t\t\t\tlogger.catching(level, e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tLevel level = attempts < maxSendAttempts ? Level.WARN : Level.ERROR;\n\t\t\t\tlogger.catching(level, e);\n\t\t\t}\n\t\t}\n\t}", "public TransactionResponse sellEnchant() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\tNotification not = hc.getNotify();\r\n \t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\ttry {\r\n \t\t\tString nenchant = \"\";\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tnenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tint lvl = Integer.parseInt(hyperObject.getName().substring(hyperObject.getName().length() - 1, hyperObject.getName().length()));\r\n \t\t\tint truelvl = im.getEnchantmentLevel(p.getItemInHand(), ench);\r\n \t\t\tif (im.containsEnchantment(p.getItemInHand(), ench) && lvl == truelvl) {\r\n \t\t\t\tdouble dura = p.getItemInHand().getDurability();\r\n \t\t\t\tdouble maxdura = p.getItemInHand().getType().getMaxDurability();\r\n \t\t\t\tdouble duramult = (1 - dura / maxdura);\r\n \t\t\t\tif (p.getItemInHand().getType().equals(Material.ENCHANTED_BOOK)) {\r\n \t\t\t\t\tduramult = 1;\r\n \t\t\t\t}\r\n \t\t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\t\tdouble price = hyperObject.getValue(EnchantmentClass.fromString(mater));\r\n \t\t\t\tdouble fprice = duramult * price;\r\n \t\t\t\tboolean sunlimited = hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\");\r\n \t\t\t\tif (acc.checkshopBalance(fprice) || sunlimited) {\r\n \t\t\t\t\tim.removeEnchantment(p.getItemInHand(), ench);\r\n \t\t\t\t\tdouble shopstock = hyperObject.getStock();\r\n \t\t\t\t\thyperObject.setStock(shopstock + duramult);\r\n \t\t\t\t\tdouble salestax = hp.getSalesTax(fprice);\r\n \t\t\t\t\tacc.deposit(fprice - salestax, p);\r\n \t\t\t\t\tacc.withdrawShop(fprice - salestax);\r\n \t\t\t\t\tif (sunlimited) {\r\n \t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tfprice = calc.twoDecimals(fprice);\r\n \t\t\t\t\tresponse.addSuccess(L.f(L.get(\"ENCHANTMENT_SELL_MESSAGE\"), 1, calc.twoDecimals(fprice), hyperObject.getName(), calc.twoDecimals(salestax)), calc.twoDecimals(fprice - salestax), hyperObject);\r\n \t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t}\r\n \t\t\t\t\tlog.writeSQLLog(p.getName(), \"sale\", hyperObject.getName(), 1.0, fprice - salestax, salestax, playerecon, type);\r\n \r\n \t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\tnot.setNotify(hyperObject.getName(), mater, playerecon);\r\n \t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"SHOP_NOT_ENOUGH_MONEY\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"ITEM_DOESNT_HAVE_ENCHANTMENT\"), hyperObject.getName()), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction sellEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "private int heavyAttack() {\n return attack(6, 2);\n }", "public void youWinByAbandonment() {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEndedByAbandonment(\"YOU WON BECAUSE YOUR OPPONENTS HAVE ABANDONED!!\");\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending ended by abandonment error\");\n }\n }", "@Override\n\tpublic void msgPartsLow() {\n\t\t\n\t}", "public synchronized void send(Object obj)\r\n\t{\r\n\t\tclientQueue.offer(obj);\r\n\t}", "protected final void hit() throws InsufficientCardsException {\n hand.add(deck.deal());\n update();\n }", "public TransactionResponse buyEnchantFromItem() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\ttry {\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tString nenchant = \"\";\r\n \t\t\tnenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\tdouble price = hyperObject.getValue(EnchantmentClass.fromString(mater));\r\n \t\t\tif (price != 123456789) {\r\n \t\t\t\tif (!im.containsEnchantment(p.getItemInHand(), ench)) {\r\n \t\t\t\t\tif (im.canAcceptEnchantment(p.getItemInHand(), ench) && p.getItemInHand().getAmount() == 1) {\r\n \t\t\t\t\t\tif (acc.checkFunds(price, p)) {\r\n \t\t\t\t\t\t\tacc.withdraw(price, p);\r\n \t\t\t\t\t\t\tacc.depositAccount(price, tradePartner.getName());\r\n \t\t\t\t\t\t\tint l = hyperObject.getName().length();\r\n \t\t\t\t\t\t\tString lev = hyperObject.getName().substring(l - 1, l);\r\n \t\t\t\t\t\t\tint level = Integer.parseInt(lev);\r\n \t\t\t\t\t\t\tim.addEnchantment(p.getItemInHand(), ench, level);\r\n \t\t\t\t\t\t\tim.removeEnchantment(giveItem, ench);\r\n \t\t\t\t\t\t\tprice = calc.twoDecimals(price);\r\n \t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"PURCHASE_ENCHANTMENT_CHEST_MESSAGE\"), 1, calc.twoDecimals(price), hyperObject.getName(), tradePartner.getName()), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\tlog.writeSQLLog(p.getName(), \"purchase\", hyperObject.getName(), 1.0, price, 0.0, tradePartner.getName(), \"chestshop\");\r\n \t\t\t\t\t\t\ttradePartner.sendMessage(L.f(L.get(\"CHEST_ENCHANTMENT_BUY_NOTIFICATION\"), 1, calc.twoDecimals(price), hyperObject.getName(), p));\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"ITEM_ALREADY_HAS_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction buyChestEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', owner='\" + tradePartner.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "private void sendCustomMessage(String message, String alli) {\n String frontA = \"V\" + alli;\n String gobbleDeGuck = \"<ID 0><CLR><WIN 0 0 287 31><POS 0 0><SL><S S><BL N><CS 3><GRN><T>\";\n String mid = message;\n String ender = \"</T>\";\n String sendableMsgString = frontA + gobbleDeGuck + mid + ender;\n //\n sendRawMessage(sendableMsgString);\n }", "synchronized void endCriticalUse(){\nSC = false;\nJeton=false;\n\nif (procId==0){\n\tSyncMessage sm = new SyncMessage(MsgType.JETON, 0, procId);\n\tsendTo(0, sm);\n}else{\n\tSyncMessage sm = new SyncMessage(MsgType.JETON, 1, procId);\n\tsendTo(1, sm);\n}\n\n}", "public void deliverStone2() {\n }", "public void buyFuel() {\n this.fuelMod++;\n fuelMax += +750 * fuelMod;\n }", "@Override\n\tpublic void send(String msg) {\n\t}", "public void mo1610b() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 4).sendToTarget();\r\n }\r\n }", "public int onLoop() throws InterruptedException{\n \tif(inventory.isFull()) {\r\n\t\t\tinventory.dropAll(\"Logs\");\r\n\t\t\tsleep(random(2500,4000));\r\n\t\t\tshortTermAntiban();\r\n\t\t}else {\r\n\t\t\tcutTree();\r\n\t\t\tsleep(random(500,1000));\r\n\t\t}\r\n \t\r\n\r\n \t\r\n \t\r\n return 500;\r\n }", "public void sendHearBeat() {\n try {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"type\", WsMessage.MessageType.HEART_BEAT_REQ);\n this.wsManager.sendMessage(WsMessage.MessageType.HEART_BEAT_REQ, jsonObject.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void rushToSecurity() {\n int priority = Thread.currentThread().getPriority();\n Thread.currentThread().setPriority(priority + 1);\n\n //sleep for a random time\n try {\n Thread.sleep((long) Math.random() * 50000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //setPriority back to default\n Thread.currentThread().setPriority(priority);\n }", "@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}", "public void sendTurno() throws RemoteException, InterruptedException, IOException ;", "@ReactMethod\n public void sendRandom() {\n long maxPayloadLength = chirpConnect.maxPayloadLength();\n long size = (long) new Random().nextInt((int) maxPayloadLength) + 1;\n byte[] payload = chirpConnect.randomPayload((byte)size);\n\n ChirpError error = chirpConnect.send(payload);\n if (error.getCode() > 0) {\n onError(context, error.getMessage());\n }\n }", "public void startExecuting() {\n this.attackTime = 20;\n ShulkerEntity.this.updateArmorModifier(100);\n }", "public void doLogicBuy() {\n\t\tif (!player.isHuman) {\n\t\t\tif (player.money > estimatedFee * 1.5) //\n\t\t\t{\n\t\t\t\tint free = (int) (player.money - estimatedFee * 1.5);\n\t\t\t\tCell c = board.getCells().get(player.position);\n\t\t\t\tif (c instanceof TradeableCell) {\n\t\t\t\t\tTradeableCell tc = (TradeableCell) c;\n\t\t\t\t\tif (tc.getOwner() == null && tc.getPrice() < free) {\n\t\t\t\t\t\ttc.buy(player);\n\t\t\t\t\t\tboard.addMessage(\"Just bought\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void sendRequirementMessages(Player player) {\n\t\tfor (int i = 1; i < 310; i++)\n\t\t\tinter(player, i, \"\");\n\t\tplayer.getInterfaceManager().sendInterface(275);\n\t\tinter(player, 1, \"<col=FF0000><shad=000000>Distinction cape requirements</col>\");\n\n\t\tinter(player, 10, \"<col=046DB3><shad=000000><u>Max cape requirements</u></col>\");\n\t\tinter(player, 11, (isWorthyMaxCape(player) ? \"<str>\" : \"\")+\"Every stat level 99\");\n\t\tinter(player, 12, (isWorthyMaxCape(player) ? \"<col=1BD12A><shad=000000>You are worthy enough to claim this cape!</col>\"\n\t\t\t\t\t\t: \"<col=ff0000><shad=000000>You are not worthy enough to claim this cape!\"));\n\n\t\tinter(player, 14, \"<col=046DB3><shad=000000><u>Completionist cape requirements</u></col>\");\n\t\tinter(player, 15, ((isMaxed(player) && player.getSkills().getLevelForXp(Skills.DUNGEONEERING) == 120) ? \"<str>\" : \"\")+\"Every stat level 99 & 120 Dungeoneering\");\n\t\tinter(player, 16, (player.isKilledQueenBlackDragon() ? \"<str>\" : \"\")+\"Killed the Queen Black Dragon\");\n\t\tinter(player, 17, (player.isCompletedFightCaves() ? \"<str>\" : \"\")+\"Completed the Fight Caves minigame\");\n\t\tinter(player, 18, (player.isCompletedFightKiln() ? \"<str>\" : \"\")+\"Completed the Fight Kiln minigame\");\n\t\tinter(player, 19, (player.isKilledCulinaromancer() ? \"<str>\" : \"\")+\"Completed the Recipe for Disaster minigame\");\n\t\tinter(player, 20, (player.getQuestManager().completedQuest(Quests.NOMADS_REQUIEM) ? \"<str>\" : \"\")+\"Completed the Nomad's mini-quest\");\n\t\tinter(player, 21, (isWorthyCompCape(player) ? \"<col=1BD12A><shad=000000>You are worthy enough to claim this cape!</col>\"\n\t\t\t\t\t\t: \"<col=ff0000><shad=000000>You are not worthy enough to claim this cape!\"));\n\n\t\tinter(player, 23, \"<col=046DB3><shad=000000><u>Completionist cape (t) requirements</u></col>\");\n\t\tinter(player, 24, ((isWorthyCompCape(player)) ? \"<str>\" : \"\")+\"Have completed all of the above\");\n\t\tinter(player, 25, ((player.getOresMined() >= 5000) ? \"<str>\" : \"\")+\"Mine a total of 5'000 ores (\"+Utils.getFormattedNumber(player.getOresMined())+\")\");\n\t\tinter(player, 26, ((player.getBarsSmelt() >= 5000) ? \"<str>\" : \"\")+\"Smith a total of 5'000 bars (\"+Utils.getFormattedNumber(player.getBarsSmelt())+\")\");\n\t\tinter(player, 27, ((player.getLogsChopped() >= 5000) ? \"<str>\" : \"\")+\"Chop a total of 5'000 logs (\"+Utils.getFormattedNumber(player.getLogsChopped())+\")\");\n\t\tinter(player, 28, ((player.getLogsBurned() >= 5000) ? \"<str>\" : \"\")+\"Burn a total of 5'000 logs (\"+Utils.getFormattedNumber(player.getLogsBurned())+\")\");\n\t\tinter(player, 29, ((player.getLapsRan() >= 1000) ? \"<str>\" : \"\")+\"Complete a total of 1'000 agility laps (\"+Utils.getFormattedNumber(player.getLapsRan())+\")\");\n\t\tinter(player, 30, ((player.getBonesOffered() >= 5000) ? \"<str>\" : \"\")+\"Offer a total of 5'000 bones (\"+Utils.getFormattedNumber(player.getBonesOffered())+\")\");\n\t\tinter(player, 31, ((player.getPotionsMade() >= 5000) ? \"<str>\" : \"\")+\"Make a total of 5'000 potions (\"+Utils.getFormattedNumber(player.getPotionsMade())+\")\");\n\t\tinter(player, 32, ((player.getTimesStolen() >= 5000) ? \"<str>\" : \"\")+\"Steal a total of 5'000 times (\"+Utils.getFormattedNumber(player.getTimesStolen())+\")\");\n\t\tinter(player, 33, ((player.getItemsMade() >= 5000) ? \"<str>\" : \"\")+\"Craft a total of 5'000 items (\"+Utils.getFormattedNumber(player.getItemsMade())+\")\");\n\t\tinter(player, 34, ((player.getItemsFletched() >= 5000) ? \"<str>\" : \"\")+\"Fletch a total of 5'000 items (\"+Utils.getFormattedNumber(player.getItemsFletched())+\")\");\n\t\tinter(player, 35, ((player.getCreaturesCaught() >= 3000) ? \"<str>\" : \"\")+\"Catch a total of 3'000 creatures (\"+Utils.getFormattedNumber(player.getCreaturesCaught())+\")\");\n\t\tinter(player, 36, ((player.getFishCaught() >= 5000) ? \"<str>\" : \"\")+\"Catch a total of 5'000 fish (\"+Utils.getFormattedNumber(player.getFishCaught())+\")\");\n\t\tinter(player, 37, ((player.getFoodCooked() >= 5000) ? \"<str>\" : \"\")+\"Cook a total of 5'000 food (\"+Utils.getFormattedNumber(player.getFoodCooked())+\")\");\n\t\tinter(player, 38, ((player.getProduceGathered() >= 3000) ? \"<str>\" : \"\")+\"Farm a total of 3'000 produce (\"+Utils.getFormattedNumber(player.getProduceGathered())+\")\");\n\t\tinter(player, 39, ((player.getPouchesMade() >= 2500) ? \"<str>\" : \"\")+\"Infuse a total of 2'500 pouches (\"+Utils.getFormattedNumber(player.getPouchesMade())+\")\");\n\t\tinter(player, 40, ((player.getMemoriesCollected() >= 5000) ? \"<str>\" : \"\")+\"Harvest a total of 5'000 memories (\"+Utils.getFormattedNumber(player.getMemoriesCollected())+\")\");\n\t\tinter(player, 41, ((player.getRunesMade() >= 5000) ? \"<str>\" : \"\")+\"Runecraft a total of 5'000 runes (\"+Utils.getFormattedNumber(player.getRunesMade())+\")\");\n\t\tinter(player, 42, ((isWorthyCompCapeT(player)) ? \"<col=1BD12A><shad=000000>You are worthy enough to claim this cape!</col>\"\n\t\t\t\t\t\t: \"<col=ff0000><shad=000000>You are not worthy enough to claim this cape!\"));\n\t}", "public void suffer(int hits)\r\n {\r\n health = health - hits;\r\n if (health < 0)\r\n health = 0;\r\n if (hits == 0)\r\n say(\"Hahaha! I defened myself with \" + armor.getName() + \" and still have \" + health + \" left!\");\r\n else\r\n say(\"Ouch! \" + hits + \" hits is more than I want! I only have \" + health + \" left!\");\r\n if (health <= 0)\r\n die();\r\n }", "private static void sendToBidder(int clientNo, BigInteger msg) {\r\n\t\tmsg=pk[clientNo].encrypt(msg)[0];\r\n\t\tsendToClient(bidders.get(clientNo),msg);\r\n\t}", "public void sendBack(SelectionKey key, String message) {\r\n\t\tsocketChannel = (SocketChannel) key.channel(); \r\n\t\tmessage += \"\\r\\n\";\r\n\t\tbuffer = CharBuffer.wrap(message);\r\n\t\twhile (buffer.hasRemaining()) {\r\n\t\t\ttry {\r\n\t\t\t\tsocketChannel.write(Charset.defaultCharset().encode(buffer));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong x = System.nanoTime();\r\n\t\tserviceTime = x - pollTime;\r\n\t\tresponseTime = x - currentJob.queueEntranceTime;\r\n\t\ttimeInSystem = x - currentJob.timeOfArrival;\r\n\t\t\r\n\t\ttimes.add(myNumber + \"\\t\" + type + \"\\t\" + queueTime + \"\\t\" + workerTime +\"\\t\" + processingTime +\"\\t\" + serviceTime +\"\\t\" + responseTime +\"\\t\" + timeInSystem );\r\n\t\tnumOfRequests.incrementAndGet();\r\n\t\tmyNumOfRequests++;\r\n\t}", "public boolean spam() {\n\t\tsynchronized (this) {\n\t\t\tif (!canUse() || !start())\n\t\t\t\treturn false;\n\t\t\tfinal TimedCondition tc = new TimedCondition(1000) {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean isDone() {\n\t\t\t\t\treturn !canUse() || BarNode.this.isDone();\n\t\t\t\t}\n\t\t\t};\n\t\t\tdo {\n\t\t\t\tsend();\n\t\t\t\tTask.sleep(300, 400);\n\t\t\t} while (tc.isRunning());\n\t\t\treturn tc.isDone();\n\t\t}\n\t}", "private static void berserkerMelee(Player player) {\n\t\tbankInventoryAndEquipment(player);\n\t\tspawnInventory(player, BerserkerMelee.inventory);\n\t\tspawnEquipment(player, BerserkerMelee.equipmentSet(player));\n\t\tupdateEquipment(player);\n\t\theal(player, true, true);\n\t\tsetCombatSkills(player, \"BERSERKER\", false, null);\n\t\tsetPrayerAndMagicBook(player, \"LUNAR\");\n\t\tPresets.isPresetFlagged(player, player.bankIsFullWhileUsingPreset);\n\t}", "@Override\n\tpublic void msgAtBed() {\n\t\t\n\t}", "private void pump_water() {\n\t\t\r\n\t}", "private void sendNextBroadcast() {\n synchronized (this.mLock) {\n if (this.mBroadcastedInteractiveState == 0) {\n this.mPendingWakeUpBroadcast = false;\n this.mBroadcastedInteractiveState = 1;\n } else if (this.mBroadcastedInteractiveState == 1) {\n if (!(this.mPendingWakeUpBroadcast || this.mPendingGoToSleepBroadcast)) {\n if (this.mPendingInteractiveState != 2) {\n finishPendingBroadcastLocked();\n return;\n }\n }\n this.mPendingGoToSleepBroadcast = false;\n this.mBroadcastedInteractiveState = 2;\n } else {\n if (!(this.mPendingWakeUpBroadcast || this.mPendingGoToSleepBroadcast)) {\n if (this.mPendingInteractiveState != 1) {\n finishPendingBroadcastLocked();\n return;\n }\n }\n this.mPendingWakeUpBroadcast = false;\n this.mBroadcastedInteractiveState = 1;\n }\n this.mBroadcastStartTime = SystemClock.uptimeMillis();\n int powerState = this.mBroadcastedInteractiveState;\n }\n }", "@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\r\n public void onPlayerDamagedByPlayer(final EntityDamageByEntityEvent event) {\n if (!(event.getEntity() instanceof Player)) {\r\n return;\r\n }\r\n if (!(event.getDamager() instanceof Player)) {\r\n return;\r\n }\r\n \r\n final Player target = (Player)event.getEntity();\r\n final Player attacker = (Player)event.getDamager();\r\n final ItemStack is = attacker.getItemInHand();\r\n \r\n if (is != null){\r\n switch (is.getType()){\r\n case EMERALD:\r\n attacker.setItemInHand(ItemUtil.decrementItem(is, 1));\r\n \r\n // 体力・空腹回復、燃えてたら消化\r\n target.setHealth(target.getMaxHealth());\r\n target.setFoodLevel(20);\r\n target.setFireTicks(0);\r\n \r\n // ポーション効果付与\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 45 * 20, 0)); // 45 secs\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 7 * 60 * 20, 0)); // 7 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 9 * 60 * 20, 1)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 9 * 60 * 20, 0)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 5 * 60 * 20, 1)); // 5 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 3 * 60 * 20, 0)); // 3 mins\r\n \r\n // effect, messaging\r\n target.getWorld().playEffect(target.getLocation(), Effect.ENDER_SIGNAL, 0, 10);\r\n Util.message(target, PlayerManager.getPlayer(attacker).getName() + \" &aから特殊効果を与えられました!\");\r\n Util.message(attacker, PlayerManager.getPlayer(target).getName() + \" &aに特殊効果を与えました!\");\r\n \r\n event.setCancelled(true);\r\n event.setDamage(0);\r\n break;\r\n default: break;\r\n }\r\n }\r\n }", "@Override\r\n\tpublic void run() {\n\t\twhile(true){\r\n\t\t\ttry{\r\n\t\t\t\tint playerTurn;\r\n\t\t\t\twhile(((playerTurn = in.readInt())&128)==0 && playerTurn>=0);\r\n\t\t\t\tclient.playerTurn = (playerTurn-128)&7;\r\n\t\t\t\tif((playerTurn&56)==56)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tclient.playerTurn=playerTurn&63;\r\n\t\t\t\t\tSystem.out.println(\"Game Over\");\r\n\t\t\t\t\tThread.sleep(100000);\r\n\t\t\t\t}\r\n\t\t\t\tif(client.playerid==client.playerTurn)\r\n\t\t\t\t{\r\n\t\t\t\t\tclient.chance=1;\r\n\t\t\t\t\twhile(client.send!=1)\r\n\t\t\t\t\t\tThread.sleep(500);\r\n\t\t\t\t\tint cardTemp=client.cardVal+512;\r\n\t\t\t\t\tint valIncprr=-1;\r\n\t\t\t\t\tint i=0;\r\n\t\t\t\t\tfor(i=0;client.cprr[i]!=-1;i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(client.cprr[i]==client.cardVal)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvalIncprr = i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tclient.cprr[valIncprr]=client.cprr[i-1];\r\n\t\t\t\t\tclient.cprr[i-1]=-1;\r\n\t\t\t\t\tclient.out.writeInt(cardTemp);\r\n\t\t\t\t\tclient.send=0;\r\n\t\t\t\t}\r\n\t\t\t\tint cVal;\r\n\t\t\t\twhile(((cVal = in.readInt())&512)==0 && cVal>=0)\r\n\t\t\t\t\t;\r\n\t\t\t\tclient.cardVal=cVal-512;\r\n\t\t\t\tclient.d[client.noc_on_desk].cardV=client.cardVal;\r\n\t\t\t\tclient.d[client.noc_on_desk].playerNo=client.playerTurn;\r\n\t\t\t\tclient.noc_on_desk++;\r\n\t\t\t\tif(client.currentSuit==-1)\r\n\t\t\t\t{\r\n\t\t\t\t\tclient.currentSuit=client.cardVal/13;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif(client.currentSuit==client.cardVal/13 || client.d[0].cardV==51)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t;\t\t// if card is of same suit then do nothing...........\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\tint max=-1;\r\n\t\t\t\t\t\t\tint maxPlayerTurn=-1;\r\n\t\t\t\t\t\t\tfor(int i=0;i<client.noc_on_desk-1;i++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(max<client.d[i].cardV)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tmax=client.d[i].cardV;\r\n\t\t\t\t\t\t\t\t\tmaxPlayerTurn=client.d[i].playerNo;\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(client.playerid==maxPlayerTurn)\t\t\t// so aas to add the cards to the player who has the largest \r\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t// card.\r\n\t\t\t\t\t\t\t\tint i=0;\r\n\t\t\t\t\t\t\t\twhile(client.cprr[i]!=-1)\r\n\t\t\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t\t\tfor(int k=0;k<client.noc_on_desk;k++)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tclient.cprr[i++]=client.d[k].cardV;\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\tThread.sleep(2000);\r\n\t\t\t\t\t\t\tfor(int i=0;i<client.noc_on_desk;i++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tclient.d[i].cardV=-1;\r\n\t\t\t\t\t\t\t\tclient.d[i].playerNo=-1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclient.noc_on_desk=0;\r\n\t\t\t\t\t\t\tclient.currentSuit=-1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tint count=0;\r\n\t\t\r\n\t\t\t\tclient.no_of_players=((playerTurn-128)&127)>>3;\r\n\t\t\t\tif(client.noc_on_desk==client.no_of_players)\r\n\t\t\t\t{\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tfor(int i=0;i<client.noc_on_desk;i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tclient.d[i].cardV=-1;\r\n\t\t\t\t\t\tclient.d[i].playerNo=-1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tclient.noc_on_desk=0;\r\n\t\t\t\t\tclient.currentSuit=-1;\r\n\t\t\t\t}\r\n\t\t\t\tThread.sleep(200);\r\n\t\t\t} catch(IOException e){\r\n\t\t\t\tSystem.out.println(\"error\");\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\te.printStackTrace();\r\n\t}\r\n\t\t}\r\n\t}" ]
[ "0.641758", "0.6257522", "0.61405164", "0.61405164", "0.60537595", "0.5954501", "0.59326506", "0.58996624", "0.5899588", "0.5892227", "0.5880658", "0.587093", "0.5841924", "0.5836044", "0.5817279", "0.5803316", "0.5799492", "0.5786763", "0.5784742", "0.57800263", "0.57693946", "0.57405126", "0.5703576", "0.56970644", "0.569651", "0.56914735", "0.5662156", "0.5642018", "0.5633081", "0.5626504", "0.5621168", "0.56116605", "0.5601999", "0.55988216", "0.55858725", "0.55855674", "0.5579677", "0.5559844", "0.555331", "0.5540011", "0.5537434", "0.55299497", "0.5527142", "0.55241716", "0.55124736", "0.5507119", "0.5503878", "0.55010396", "0.54923177", "0.54902625", "0.548777", "0.54847246", "0.54728097", "0.5470607", "0.5470272", "0.54681766", "0.5467374", "0.5463899", "0.5453462", "0.5452955", "0.54498345", "0.54498166", "0.5448006", "0.54462945", "0.5442298", "0.5441929", "0.54404724", "0.5431643", "0.5429673", "0.54234225", "0.54184973", "0.54159355", "0.54114544", "0.5402166", "0.53992116", "0.5398729", "0.5397044", "0.53954846", "0.53936666", "0.53934556", "0.5392557", "0.53895265", "0.53816223", "0.53813505", "0.53811973", "0.538039", "0.5376747", "0.53740895", "0.53692997", "0.5362382", "0.53613067", "0.5359916", "0.5359266", "0.5350548", "0.53455335", "0.53438365", "0.534254", "0.534225", "0.5340423", "0.5336847", "0.53346056" ]
0.0
-1
/ Tough and deadly. Good at clearing minions.
public static Unit fang(){ Unit unit = new Unit("Fang", "O_S_WhiteMane", 15, 5, 12, 14, 4); unit.base=2; unit.addWep(new Weapon("Greataxe",11,4)); unit.addActive(ActiveType.CLEAVE); unit.addPassive(PassiveType.TOUGH); return unit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isClearingMines();", "private void purgeAllOverflowEM_EM() {\n float mass = 0;\n for (GT_MetaTileEntity_Hatch_InputElemental tHatch : eInputHatches) {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {\n tHatch.updateSlots();\n }\n mass += tHatch.overflowMatter;\n tHatch.overflowMatter = 0;\n }\n for (GT_MetaTileEntity_Hatch_OutputElemental tHatch : eOutputHatches) {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {\n tHatch.updateSlots();\n }\n mass += tHatch.overflowMatter;\n tHatch.overflowMatter = 0;\n }\n cleanMassEM_EM(mass);\n }", "void unsetSingleBetMinimum();", "void unsetWagerMinimum();", "public void youBrokeSon(){\n\t\tcoinList.clear();\n\t}", "public void setClearMines(boolean b);", "public void resetEmpty() {\n\t /*reset the mineField with no mines*/\n mineField = blankField(this.row, this.col);\n }", "void unsetMultipleBetMinimum();", "private void clearStragglers() {\n for (int i = 0; i < game.gridPieces.length; i++) {\n GridPiece piece = game.gridPieces[i];\n\n if (piece.state == game.STATE_TEMP) {\n piece.restoreState();\n //restoreState(piece);\n } else if (piece.state == game.STATE_TEMP_NOTOUCH) {\n piece.setState(game.STATE_FINAL);\n }\n }\n }", "@Override\n public void bankrupt() {\n this.mortgaged = false;\n }", "private void cleaningBallot() {\n\t\tturnLeft();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t\tturnAround();\n\t\tmove();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t}", "void nuke() {\n\t\tfor (int a = 0; a < height; a++) {\n\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\tEZ.removeEZElement(FWorld[a][b]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tEZ.removeEZElement(background);\n\t\tEZ.removeEZElement(explosion);\n\t\tturtle.kill();\n\t}", "public void vergissAlles() {\n\t\tmerker.clear();\n\t}", "public void removeMissiles(){\n nunMissiles--;\n }", "@Override\r\n\tpublic final void purge() {\r\n\t\tthis.members.clear();\r\n\t\tthis.age++;\r\n\t\tthis.gensNoImprovement++;\r\n\t\tthis.spawnsRequired = 0;\r\n\r\n\t}", "private void notEligibleForRealMin() {\n eligibleForRealMin = false;\n }", "public void clear() {\n head = null;\n tail = null;\n size = 0;\n String name = \"aweseome Frok from Father of MC :) :) :) :) :) :): ): ): ):): ):):): :))::):):)\";\n String smileie = ENOUGH SMILES?;\n }", "@Override\n\tpublic int vanish() {\n\t\treturn 1;\n\t}", "abstract protected boolean clearSquareHitMine(Location m);", "void unsetStraight();", "protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }", "public void resetWall() {\r\n\tbustedWall = false;\r\n}", "private void condenseSteam() {\n if (getPressure()> Constants.ATMOSPHERIC_PRESSURE) {\n double boilingPoint = Water.getBoilingTemperature(getPressure());\n if (boilingPoint > steam.getTemperature()) { // remove steam such that it equalizes to the boiling point\n double newSteamPressure = Math.max(Water.getBoilingPressure(steam.getTemperature()), Constants.ATMOSPHERIC_PRESSURE);\n \n\n int newQuantity = steam.getParticlesAtState(newSteamPressure, getCompressibleVolume());\n int deltaQuantity = steam.getParticleNr() - newQuantity;\n if (deltaQuantity < 0) {\n System.out.println(\"BAD\");\n }\n steam.remove(deltaQuantity);\n getWater().add(new Water(steam.getTemperature(), deltaQuantity));\n }\n } \n }", "void removeAllSpawn();", "void fullReset();", "private void heroHoreZoneMFix(){\n\t\tif(heroHoreZone && oldMonsterX==monster.getBX()){\n\t\t\theroHoreZoneMFix = true;\n\t\t}else{\n\t\t\theroHoreZoneMFix = false;\n\t\t}\n\t}", "void unsetQuick();", "private void nullify() {\n paint = null;\n bg1 = null;\n bg2 = null;\n madafacka = null;\n for(int i=0; i<enemies.size(); i++){\n enemies.remove(i);\n i--;\n }\n currentSprite = null;\n ship = null;\n shipleft1 = null;\n shipleft2 = null;\n shipright1 = null;\n shipright2 = null;\n basicInv1 = null;\n basicInv2 = null;\n badBoyAnim = null;\n\n // Call garbage collector to clean up memory.\n System.gc();\n }", "public void coMina(){\n espM=true;\r\n }", "public final synchronized void mo47208b() {\n this.f49753d.clear();\n C18331bb.m60419a(this.f49751b);\n this.f49750a.edit().clear().commit();\n }", "@Override\n public void run() {\n System.out.println(\"Cleaning room\");\n numJunkPiles = 0;\n }", "public void NPSShot()\n\t{\n\t\t//can only occur if a friendly missile and \n\t\t//a NPS are spawned\n\t\tif(gameObj[2].size() > 0 && gameObj[4].size() > 0)\n\t\t{\n\t\t\tint nps = new Random().nextInt(gameObj[2].size());\n\t\t\tint mis = new Random().nextInt(gameObj[4].size());\n\t\t\tgameObj[2].remove(nps);\n\t\t\tgameObj[4].remove(mis);\n\t\t\tscore += 500;\n\t\t\tSystem.out.println(\"A player misile has struck a NPS! +500 points\");\n\t\t}else\n\t\t\tSystem.out.println(\"An NPS and a friendly missile are not spawned\");\n\t}", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "void clean(Player p);", "void emptyManaPools(Ability source);", "public void clear() {\n/* 103 */ this.texturesLinear.clear();\n/* 104 */ this.texturesNearest.clear();\n/* */ }", "void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }", "void unset() {\n size = min = pref = max = UNSET;\n }", "@Override\n\tpublic void remove()\n\t{\n\t\tsuper.remove();\n\t\tgetMyPlayer().getGoldMines().remove(this);\n\t}", "public void mo4313a() {\n this.f3129a.clear();\n }", "public void clearAreaReset() {\n for(int x = 0; x < buildSize; x++) {\n for(int y = 4; y < 7; y++) {\n for(int z = 0; z < buildSize; z++) {\n myIal.removeBlock(x, y, z);\n }\n }\n }\n\n myIal.locx = 0; myIal.locy = 0; myIal.locz = 0;\n my2Ial.locx = 0; my2Ial.locy = 0; my2Ial.locz = 0;\n }", "@Override\n\tpublic void swim() {\n\t\t\n\t}", "public void clear() {\n for (int i = 0; i < if_you_items.length; i++) {\n if_you_items[i].setEnabled(true);\n }\n for (int i = 0; i < then_we_items.length; i++) {\n then_we_items[i].setEnabled(true);\n }\n non_promised_ministries.clear();\n non_promised_ministries.addAll(all_ministries);\n // if not at war, can't ask/offer peace\n if (game.getDiplomacy().getDiplomaticState(game.getTurn(), faction) != C.DS_WAR) {\n if_you_items[IfYouWill.PEACE.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.PEACE.ordinal()].setEnabled(false);\n }\n if (faction > C.HOUSE5) { // non-house\n non_promised_ministries.clear();\n if_you_items[IfYouWill.TECH.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.TECH.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n return;\n }\n // search for promised votes and ministries in pending contracts of sender\n for (Contract con : game.getDiplomacy().getSentContracts()) {\n for (Term term : con.getTerms()) {\n if (term.getDonor() == game.getTurn()) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n if (term.getDonor() == faction) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n }\n }\n // search for promised votes and ministries for sender and for receiver\n // those that are made with sender\n if (game.getRegency().getVotes()[game.getTurn()][Regency.CANDIDATE_IDX] > -1\n || game.getRegency().getVotes()[faction][Regency.CANDIDATE_IDX] == game.getTurn()) {\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n }\n int[] promises = game.getDiplomacy().getMinistryPromises(game.getTurn());\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] > -1) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n promises = game.getDiplomacy().getMinistryPromises(faction);\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] == game.getTurn()) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n if (non_promised_ministries.isEmpty()) {\n then_we_items[ThenWeWill.MINISTRY.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.MINISTRY.ordinal()].setEnabled(false);\n }\n }", "public void swim() {\n\t\tSystem.out.println(\"All the ducks can swim. This is an unchanged behavior for all ducks\");\n\t}", "public void puke(){\r\n top = null;\r\n size = 0;\r\n \r\n }", "public void clearGotoFloor();", "private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }", "public void cleanUp(){\n\t\t//offset(-1*bounds.left, -1*bounds.top);\n\t}", "public void clearTombstones(Player p) {\n\t\tSet<Tile> tombstoneTiles = getTombstoneTiles(p);\n\t\tfor (Tile t : tombstoneTiles) {\n\t\t\t//Destroy tombstone and update land type to grass\n\t\t\tt.destroyStructure();\n\t\t\tt.updateLandType(LandType.Tree);\n\t\t}\n\t}", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "private void clearMhos(Graphics g){\n\t\tfor(Mho mho:b.mhos){\n\t\t\tg.clearRect(mho.getxOld(),mho.getyOld(),Mho.SIZE,Mho.SIZE);\n\t\t}\n\t\tfor(Mho mho:discardMhos) {\n\t\t\tg.clearRect(mho.getX(), mho.getY(), Mho.SIZE, Mho.SIZE);\n\t\t}\n\t\tdiscardMhos.clear();\n\t}", "private void resetMass() {\n\t\tsetOperation(\"\");\n\t}", "public void emptyPot() {\r\n\t\ttotalPot = 0;\r\n\t}", "public void d()\r\n/* 223: */ {\r\n/* 224:234 */ this.j.clear();\r\n/* 225: */ }", "private void pump_water() {\n\t\t\r\n\t}", "private void b()\r\n/* 67: */ {\r\n/* 68: 73 */ this.c.clear();\r\n/* 69: 74 */ this.e.clear();\r\n/* 70: */ }", "private void m3933P() {\n this.f3123L.clear();\n this.f3124M.clear();\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "public void mo2480e() {\n List k = mo2625k();\n if (k != null) {\n k.clear();\n }\n }", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "void removeBomb();", "private void m87324c() {\n this.f61230w = -1;\n this.f61216i = false;\n this.f61217j = false;\n this.f61229v = 0.0f;\n this.f61228u = 0.0f;\n this.f61227t = 0.0f;\n this.f61223p.clear();\n }", "public void resetFuelWarning();", "private void clear() {\n }", "void removeNearbyPixels(Stroke theStroke){\n\t\tint index;\n\t\tint CurvIndex;\n\t\tint SpeedIndex;\n\t\tVector ptList = theStroke.getM_ptList();\n\t\tfor(index=0; index < CommonSegmentPts.size(); index++){\n\t\t\tPoint CommonPt = (PixelInfo)ptList.get((Integer)CommonSegmentPts.get(index));\n\t\t\tfor(CurvIndex = 0; CurvIndex < CurvVector.size(); CurvIndex++){\n\t\t\t\tPoint CurvPt = (PixelInfo)ptList.get((Integer)CurvVector.get(CurvIndex));\n\t\t\t\tif(CommonPt.distance(CurvPt) <= TolerantDistance){\n\t\t\t\t\tCurvVector.remove(CurvIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(SpeedIndex = 0; SpeedIndex < SpeedVector.size(); SpeedIndex++){\n\t\t\t\tPoint SpeedPt = (PixelInfo)ptList.get((Integer)SpeedVector.get(SpeedIndex));\n\t\t\t\tif(CommonPt.distance(SpeedPt) <= TolerantDistance){\n\t\t\t\t\tSpeedVector.remove(SpeedIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void deleteMin();", "public void crunch(){\n cpuBurstTime--;\n rem--;\n }", "@Override\n public void clear() {\n beginMyTurn();\n }", "private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }", "private final void kill() {\n\t\tgrown=false;\t\t\n\t}", "private void clearBlocked() {\n\n blocked_ = false;\n }", "void unsetLegs();", "@Override\n public void reset() {\n Material[] materials = sortBlockValues();\n for(int y = getMinY(); y <= getMaxY(); y++){\n for(int z = getMinZ(); z <= getMaxZ(); z++){\n for(int x = getMinX(); x <= getMaxX(); x++){\n for(Material mat : materials){\n int percent = blockValues.get(mat);\n if(random.nextInt(100) + 1 <= percent){\n final int xf = x;\n final int yf = y;\n final int zf = z;\n Bukkit.getScheduler().scheduleSyncDelayedTask(QuadPrison.getInstance(), ()->\n getWorld().getBlockAt(xf,yf,zf).setType(mat)\n );\n }\n }\n }\n }\n }\n for(Player player : Bukkit.getOnlinePlayers()){\n if(isInsideRegion(player.getLocation())) {\n Location loc = player.getLocation();\n loc.setY(getMaxY() + 1);\n player.teleport(loc);\n player.sendMessage(ChatColor.AQUA + \"The mine reset! You were teleported to the top!\");\n }\n }\n }", "@Override\n\tpublic void resetCamps() {\n\t\t\n\t}", "public void unleash() {\n\t\tlocked = false;\n\t\tfloat percent = framesAccelerated/60.0f;\n\t\tif (percent > 1) percent = 2 - percent;\n\t\tif (percent < 0) percent = 0;\n\t\t\n\t\tif (player.aiControlled()) {\n\t\t\tpercent = AIcontroller.randomStartBoost();\n\t\t}\n\t\t\n\t\tspeed = MAX_SPEED * percent;\n\t}", "void clear() ;", "void clearFunds() {\n\t\tbalance += cheque;\n\t\tcheque = 0;\n\t}", "public void mine() {\n mined = true;\n }", "public void mo14070E() {\n this.f15664t0.onGatheringCleared();\n }", "private void m57235e() {\n if (this.f41223d != null) {\n this.f41223d.sendEmptyMessage(1);\n }\n }", "private void setMines(){\n Random random = new Random();\r\n int counter = mines;\r\n while(counter>0){\r\n int rx = random.nextInt(this.x); //without +1 because it can be 0\r\n int ry = random.nextInt(this.y);\r\n if( ! this.grid[rx][ry].isMine() ){\r\n this.grid[rx][ry].setMine();\r\n counter--; \r\n }\r\n }\r\n \r\n }", "private void m50367F() {\n }", "void m63702c() {\n for (C17455a c17455a : this.f53839c) {\n c17455a.f53844b.clear();\n }\n }", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public void reset() {\n/* 54 */ this.count = 0;\n/* 55 */ this.totalTime = 0L;\n/* */ }", "public void makesNotHere(){this.piece.unAffect();}", "private void check4voteAndClean()\n\t{\n\t\tif( noBeepersPresent())\n\t\t{\tturnLeft();\n\t\t\tmove();\n\t\t\tpickAll();\n\t\t\tturnAround();\n\t\t\tmove();\n\t\t\tmove();\n\t\t\tpickAll();\n\t\t\tturnAround();\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t}\n\t}", "@Override\r\n\tpublic void reset() {\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++)\r\n\t\t\t\tgame[i][j].Clear();\r\n\t\t}\r\n\t\tcomputerTurn();\r\n\t\tcomputerTurn();\r\n\t\tfreeCells = rows_size*columns_size - 2;\r\n\t\ttakenCells = 2;\r\n\t}", "public static void clearInventoryCrafting(Player player)\n\t{\n\t\tPlayerInventory inv = player.getInventory();\n\t\tfor(int i = 0; i < 4; i++)\n\t\t\tinv.setItem(1 + i, null);\n\t}", "void unsetMaximum();", "public abstract void swim() {}", "public void mo23340c() {\n super.mo23340c();\n this.f13125b.f13127a.remove(this.f13201f);\n this.f13125b.f13130d.remove(this.f13203h);\n m16205g();\n this.f13199d.mo23479b(this.f13202g);\n }", "private void nullify() {\n\t\tpaint = null;\n\t\tup = null;\n\t\tdown = null;\n\t\tleft = null;\n\t\tright = null;\n\t\tg_up = null;\n\t\tg_down = null;\n\t\tg_left = null;\n\t\tg_right = null;\n\t\tgrass = null;\n\t\tcake = null;\n\n\t\t// Call garbage collector to clean up memory.\n\t\tSystem.gc();\n\n\t}", "public final synchronized void mo27313a() {\n this.f10289c.clear();\n this.f10287a.edit().clear().commit();\n }", "final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}", "void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }", "public final void mo102896d() {\n mo102893b().clear();\n this.f80953d.clear();\n this.f80950a.mo102897a();\n }", "public void hollow(){\n isFull=false;\n type=null;\n return;\n }", "@Override\n\t\tpublic void onTrimMemory(int level) {\n\t\t\t\n\t\t}", "public void clear() {\n\t\tcopy(problem, player);\n\t}", "public void reset() {\n if (id.equals(new ResourceLocation(\"minecraft:planks\"))) {\n whitelist(Range.closed(0, 5));\n } else\n whitelist(Range.closed(0, 15));\n }" ]
[ "0.6861246", "0.64614356", "0.645033", "0.6397067", "0.63776267", "0.6306155", "0.6300484", "0.6277731", "0.62521845", "0.62437963", "0.622455", "0.6222652", "0.61879253", "0.6179418", "0.61701584", "0.6132324", "0.6098175", "0.6088606", "0.60881174", "0.6079154", "0.6073641", "0.60723275", "0.6062956", "0.6031045", "0.59953135", "0.59920275", "0.5985953", "0.5975429", "0.5970954", "0.59673", "0.5961331", "0.594989", "0.59485745", "0.59466696", "0.5936857", "0.5932675", "0.59304166", "0.59300464", "0.592035", "0.59133893", "0.58989525", "0.5879728", "0.58619714", "0.5844921", "0.58367246", "0.5834684", "0.58316666", "0.58143497", "0.5807911", "0.5797323", "0.5790608", "0.5789602", "0.57710975", "0.57702774", "0.5769837", "0.5766624", "0.5766063", "0.5758602", "0.5757647", "0.57567215", "0.5753924", "0.57525676", "0.57479703", "0.57476044", "0.5744301", "0.5735491", "0.57287645", "0.57256085", "0.5724514", "0.5723807", "0.5723652", "0.572288", "0.5721084", "0.57202977", "0.5710197", "0.570632", "0.5705306", "0.5692955", "0.5691881", "0.56901515", "0.5687863", "0.5683937", "0.56820244", "0.5679614", "0.56733364", "0.5670828", "0.56697965", "0.56647", "0.56646234", "0.5661077", "0.5655003", "0.56526256", "0.56519264", "0.56485045", "0.56470954", "0.5644313", "0.56420535", "0.5639751", "0.56394774", "0.5636969", "0.56364614" ]
0.0
-1
Return percentage value from fracture.
public static int percent(int nom, int den) { return (int) Math.round(100 * ((double) nom / den)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPercentage();", "public float getPercentage() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn percentage;\r\n\t}", "Float getFedAnimalsPercentage();", "public float getPercent() {\n return percent;\n }", "public Double getProgressPercent();", "int getRemainderPercent();", "public int getPercentage() {\r\n return Percentage;\r\n }", "public double getPercent() { return this.percentage; }", "public double percentage(double value) {\n return basicCalculation(value, 100, Operator.DIVIDE);\n }", "private float getPercentage(int count, int total) {\n return ((float) count / total) * 100;\n }", "int getPercentageHeated();", "public double getPercentage() {\n\t\treturn this.percentage;\n\t}", "public Float percentComplete() {\n return this.percentComplete;\n }", "public Number getPercentage() {\n return (Number) getAttributeInternal(PERCENTAGE);\n }", "public float getGoodPercentage(){\n float result;\n try {\n result = ((float)(goodFrameCount)) / (goodFrameCount + badFrameCount)*100;\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n } catch(ArithmeticException ex){\n result = 100;\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n }\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n if(Float.isNaN(result)){\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n result=100;\n Log.d(\"PROCESSING_SERVICE\", \"goodTimePercentage = \"+result);\n }\n return result;\n }", "public double toPercent(double x){\n\t\treturn x/ 100;\n\t}", "public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }", "public java.lang.String getPercentage() {\n java.lang.Object ref = percentage_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n percentage_ = s;\n }\n return s;\n }\n }", "public int percent() {\n\t\tdouble meters = meters();\n\t\tif (meters < MIN_METERS) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn (int) (Math.pow((meters - MIN_METERS)\n\t\t\t\t/ (MAX_METERS - MIN_METERS) * Math.pow(100, CURVE),\n\t\t\t\t1.000d / CURVE));\n\t}", "public float getPercentInFrequency(int frequency) {\n\t\t\tMap<Integer, Float> percents = getPercentInFrequency();\n\t\t\tif (percents == null || percents.size() == 0) return 0;\n\n\t\t\tfor (int f : percents.keySet()) {\n\t\t\t\tif (f == frequency) return percents.get(f);\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "public double getValueAsPercentInPage(double fltValueAsPercentInTimeline) {\n double fltTimeLineRangeInRmsFrames = intPageAmount * intPageSizeInRmsFrames;\n double fltPageHorStartPositionInTimeline = ((pageValue.fltPageNum - 1) * intPageSizeInRmsFrames);\n double fltPageHorEndPositionInTimeline = (pageValue.fltPageNum * intPageSizeInRmsFrames);\n double fltItemPositionInTimeline = (fltValueAsPercentInTimeline/100.0f) * fltTimeLineRangeInRmsFrames;\n\n double fltValue = 0;\n if ((fltItemPositionInTimeline >= fltPageHorStartPositionInTimeline) && (fltItemPositionInTimeline <= fltPageHorEndPositionInTimeline)) {\n // Selected position is inside display page\n fltValue = ((fltItemPositionInTimeline - fltPageHorStartPositionInTimeline) * 100.0f)/intPageSizeInRmsFrames;\n } else if (fltItemPositionInTimeline < fltPageHorStartPositionInTimeline){\n // Selected position is outside on left of page\n fltValue = 0;\n } else if (fltItemPositionInTimeline > fltPageHorEndPositionInTimeline){\n // Selected position is outside on right of page\n fltValue = 100;\n }\n return fltValue;\n }", "public double getPercent() {\r\n\t\treturn percent;\r\n\t}", "public void percentualGordura(){\n\n s0 = 4.95 / denscorp;\n s1 = s0 - 4.50;\n percentgord = s1 * 100;\n\n }", "double redPercentage();", "public java.lang.String getPercentage() {\n java.lang.Object ref = percentage_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n percentage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "double getpercentage() {\n return this.percentage;\n }", "int getLum(){\n return getPercentageValue(\"lum\");\n }", "float getPercentHealth();", "private float valOf(SeekBar bar) {\n return (float) bar.getProgress() / bar.getMax();\n }", "@FloatRange(from = 0, to = 1) float getProgress();", "@Override\n public double getAlcoholPercent() {\n return (getAlcoholVolume() / getVolume()) * 100.0;\n }", "public float convert(float f)\n {\n return (f/150);\n }", "int getLumMod(){\n return getPercentageValue(\"lumMod\");\n }", "public int getPercentage() {\r\n\r\n\t\treturn (getAmount() - offeredQuantity) / 100;\r\n\r\n\t}", "public float getAsFloat(){\n return (new Float(getAsCents()) / 100);\n }", "public static double calculateValueInPercentage(double value) {\r\n return value * 0.01;\r\n }", "public double getPercentComplete() {\n\t\tthis.percent_complete = ((double) lines_produced / (double) height) * 100.0;\n\t\treturn this.percent_complete;\n\t}", "public abstract float perimetro();", "public String percentComplete() {\r\n\tdouble percent = ((double) bytesRead / (double) bytesLength);\r\n\tpercent *= 100;\r\n\treturn fmt.format(percent);\r\n }", "public synchronized float getProgressFloat() {\n BigDecimal bigDecimal = BigDecimal.valueOf(mProgress);\n return bigDecimal.setScale(mScale, BigDecimal.ROUND_HALF_UP).floatValue();\n }", "double greenPercentage();", "public double getMainPercentage(){return mainPercentage;}", "@Override\n public String getFormattedValue(float value, AxisBase axis) {\n String percent=Float.toString(value);\n percent = percent.substring(0,percent.length()-2);\n return percent+\"%\";\n }", "public com.google.protobuf.ByteString\n getPercentageBytes() {\n java.lang.Object ref = percentage_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n percentage_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String get_fraction_part();", "float getValue();", "float getValue();", "float getValue();", "public BigDecimal getPercentageProfitPStd();", "private double gradeQuiz() {\n int numCorrect = getNumberCorrect();\n double percentage = (numCorrect / numQuestions) * 100;\n return percentage;\n }", "public String toString() {\n return String.format(\"%.1f%%\", getPercentage());\n }", "int getLumOff(){\n return getPercentageValue(\"lumOff\");\n }", "public float getProgressPct() {\n return (float) currentCompactedKVs / getTotalCompactingKVs();\n }", "com.google.protobuf.ByteString\n getPercentageBytes();", "public com.google.protobuf.ByteString\n getPercentageBytes() {\n java.lang.Object ref = percentage_;\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 percentage_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public float toFloat() {\n return (float) numerator/(float) denominator;\n }", "public double floatValue() {\n\treturn numerator/(double)denominator;\n }", "public double calculateHpPercent();", "public Number getPercentageComplete()\r\n {\r\n return (m_percentageComplete);\r\n }", "public BigDecimal getPercentageProfitPLimit();", "public String getPercentageformat() {\n\t\treturn this.percentageFormat = Math.round(this.percentage) + \"%\";\n\t}", "public Double percentComplete() {\n return this.percentComplete;\n }", "public static float calculatePercent(float numOfSpecificTrees, float totalTrees){\n\t\tfloat percent= numOfSpecificTrees/totalTrees*100;\n\t\treturn percent;\n\t\t\n\t}", "private int getPercentageValue(String elem){\n String query = \"declare namespace a='http://schemas.openxmlformats.org/drawingml/2006/main' $this//a:\" + elem;\n\n XmlObject[] obj;\n\n // first ask the context color and if not found, ask the actual color bean\n if(_phClr != null){\n obj = _phClr.selectPath(query);\n if(obj.length == 1){\n Node attr = obj[0].getDomNode().getAttributes().getNamedItem(\"val\");\n if(attr != null) {\n return Integer.parseInt(attr.getNodeValue()) / 1000;\n }\n }\n }\n\n obj = _xmlObject.selectPath(query);\n if(obj.length == 1){\n Node attr = obj[0].getDomNode().getAttributes().getNamedItem(\"val\");\n if(attr != null) {\n return Integer.parseInt(attr.getNodeValue()) / 1000;\n }\n }\n\n\n return -1;\n }", "public Float completionPercent() {\n return this.completionPercent;\n }", "int calcPlagiarismPercent() throws ParserException;", "public double getUnitsPerPercent()\n {\n return unitsPerPercent;\n }", "Double getTotalFloat();", "org.hl7.fhir.Ratio getValueRatio();", "public double getHitsPercentual()\n\t{\n\t\t//Convert int to double values\n\t\tdouble doubleHits = hits;\n\t\tdouble doubleTotalProcessedStops = totalProcessedStops;\n\t\t\n\t\t//Hits percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (doubleHits / doubleTotalProcessedStops));\n\t}", "boolean hasPercentage();", "public static String getFormattedPercentage(double value) {\n return NumberFormat.getPercentInstance().format(value);\n }", "public BigDecimal getVAT_CHARGE_INSUR_PERCENT() {\r\n return VAT_CHARGE_INSUR_PERCENT;\r\n }", "@Override\n public String getSavingsPercentage() {\n\n final String savingsPercent = getElement(getDriver(), By.className(SAVINGS_PERCENTAGE),\n TINY_TIMEOUT).getText();\n setLogString(\"Savings Percentage:\" + savingsPercent + \"%\", true, CustomLogLevel.HIGH);\n return savingsPercent + \"%\";\n }", "public float getProgress() {\r\n if (start == end) {\r\n return 0.0f;\r\n } else {\r\n return Math.min(1.0f, (pos - start) / (float)(end - start));\r\n }\r\n }", "public float carga(){\n return (this.capacidade/this.tamanho);\n }", "public abstract float calculateFraction(Parallax parallax);", "double getRatio();", "int getRed(){\n return getPercentageValue(\"red\");\n }", "public float getPercentage(int n, int total) {\n\n float proportion = ((float) n) / ((float) total);\n\n return proportion * 100;\n }", "double getChangePercent() {\n\t return 100 - (currentPrice * 100 / previousClosingPrice);\n\t }", "int getGreen(){\n return getPercentageValue(\"green\");\n }", "public void setPercent(float value) {\n this.percent = value;\n }", "public float getPressure() {\n\t\treturn (float) getRawPressure() / 100f;\n\t}", "int getPulsePercentage();", "public double getPercent(char type)\n\t{\n\t\tdouble dPercent;\n\t\tswitch(type)\n\t\t{\n\t\t\tcase 'q':\n\t\t\tcase 'Q':\n\t\t\t\tdPercent=pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 'p':\n\t\t\tcase 'P':\n\t\t\t\tdPercent=pctP;\n\t\t\t\tbreak;\n\t\t\tcase 't':\n\t\t\tcase 'T':\n\t\t\t\tdPercent=pctT;\n\t\t\t\tbreak;\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\t\tdPercent=pctF;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdPercent= -1;\n\t\t}\n\t\treturn dPercent;\n\t\t\n\t}", "private String changeToPercent(String value, int AVG){\n String result;\n double d = Double.parseDouble(value)*100;\n double r = (d/AVG)*100;\n result = String.valueOf(round(r));\n return result;\n }", "public double getF();", "public int getOverallProgressPercent() {\n return overallProgressPercent;\n }", "int getAlpha(){\n return getPercentageValue(\"alpha\"); \n }", "public float getProgress() throws IOException {\r\n\t\tif (start == totalend) {\r\n\t\t\treturn 0.0f;\r\n\t\t} else {\r\n\t\t\treturn Math.min(1.0f, ((getFilePosition() - start) + finishLen) / (float) totalend);\r\n\t\t}\r\n\t}", "public SimpleDoubleProperty getTotalAbsencePercentageProperty() {\n return totalAbsencePercentageProperty;\n }", "public final flipsParser.percentValue_return percentValue() throws RecognitionException {\n flipsParser.percentValue_return retval = new flipsParser.percentValue_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal537=null;\n Token string_literal538=null;\n flipsParser.numericValue_return numericValue536 = null;\n\n\n CommonTree char_literal537_tree=null;\n CommonTree string_literal538_tree=null;\n RewriteRuleTokenStream stream_338=new RewriteRuleTokenStream(adaptor,\"token 338\");\n RewriteRuleTokenStream stream_339=new RewriteRuleTokenStream(adaptor,\"token 339\");\n RewriteRuleSubtreeStream stream_numericValue=new RewriteRuleSubtreeStream(adaptor,\"rule numericValue\");\n try {\n // flips.g:802:2: ( numericValue ( '%' | 'percent' ) -> numericValue PERCENT )\n // flips.g:802:4: numericValue ( '%' | 'percent' )\n {\n pushFollow(FOLLOW_numericValue_in_percentValue4802);\n numericValue536=numericValue();\n\n state._fsp--;\n\n stream_numericValue.add(numericValue536.getTree());\n // flips.g:802:17: ( '%' | 'percent' )\n int alt212=2;\n int LA212_0 = input.LA(1);\n\n if ( (LA212_0==338) ) {\n alt212=1;\n }\n else if ( (LA212_0==339) ) {\n alt212=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 212, 0, input);\n\n throw nvae;\n }\n switch (alt212) {\n case 1 :\n // flips.g:802:18: '%'\n {\n char_literal537=(Token)match(input,338,FOLLOW_338_in_percentValue4805); \n stream_338.add(char_literal537);\n\n\n }\n break;\n case 2 :\n // flips.g:802:22: 'percent'\n {\n string_literal538=(Token)match(input,339,FOLLOW_339_in_percentValue4807); \n stream_339.add(string_literal538);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: numericValue\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 803:2: -> numericValue PERCENT\n {\n adaptor.addChild(root_0, stream_numericValue.nextTree());\n adaptor.addChild(root_0, (CommonTree)adaptor.create(PERCENT, \"PERCENT\"));\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "private double calcScorePercent() {\n\t\tdouble adjustedLab = totalPP * labWeight;\n\t\tdouble adjustedProj = totalPP * projWeight;\n\t\tdouble adjustedExam = totalPP * examWeight;\n\t\tdouble adjustedCodeLab = totalPP * codeLabWeight;\n\t\tdouble adjustedFinal = totalPP * finalWeight;\n\n\t\tlabScore = (labScore / labPP) * adjustedLab;\n\t\tprojScore = (projScore / projPP) * adjustedProj;\n\t\texamScore = (examScore / examPP) * adjustedExam;\n\t\tcodeLabScore = (codeLabScore / codeLabPP) * adjustedCodeLab;\n\t\tfinalExamScore = (finalExamScore / finalExamPP) * adjustedFinal;\n\n//\t\tdouble labPercent = labScore / adjustedLab;\n//\t\tdouble projPercent = projScore / adjustedProj;\n//\t\tdouble examPercent = examScore / adjustedExam;\n//\t\tdouble codeLabPercent = codeLabScore / adjustedCodeLab;\n//\t\tdouble finalPercent = finalExamScore / adjustedFinal;\n\n\t\tdouble totalPercent = (labScore + projScore + examScore + codeLabScore + finalExamScore) / totalPP;\n\t\t\n\t\tscorePercent = totalPercent;\n\t\t\n\t\treturn totalPercent;\n\t}", "public static Percentage of(double percentage) {\n return of(Decimal.of(percentage));\n }", "public int getQualifyingPercentage() {\n return qualifyingPercentage;\n }", "public int getPercentageComplete() {\n\t\tlong rawPercentage = (100*(System.currentTimeMillis() - startingTime))/(duration);\n\t\treturn rawPercentage >= 100 ? 100 : (int) rawPercentage;\n\t}", "float getBonusPercentHP();", "private double calculateDiscountPercent(Amount discountAmount) {\n Amount runningTotalBeforeDiscount = saleState.getRunningTotal();\n double totalBeforeDiscount = \n runningTotalBeforeDiscount.getAmount().doubleValue();\n double totalDiscount = \n discountAmount.getAmount().doubleValue();\n double totalsQuotient = totalDiscount / totalBeforeDiscount;\n double discountPercent = totalsQuotient * 100;\n return discountPercent;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getRedCarFaultPercentage();", "public abstract double getPercentDead();" ]
[ "0.75318676", "0.73157734", "0.713459", "0.6963245", "0.690162", "0.6853511", "0.68064296", "0.67603767", "0.6743531", "0.6734233", "0.6696663", "0.6645652", "0.6637014", "0.66251343", "0.6623631", "0.6620224", "0.6605159", "0.65802664", "0.6574535", "0.65630907", "0.65592986", "0.65502", "0.65113735", "0.6499773", "0.6498976", "0.6441543", "0.6421496", "0.64139116", "0.64066833", "0.6405512", "0.63951075", "0.63900554", "0.6364641", "0.6356109", "0.6331673", "0.6323177", "0.6322497", "0.62962943", "0.6275063", "0.62746227", "0.62644273", "0.6261434", "0.6249357", "0.62434024", "0.6219968", "0.6218046", "0.6218046", "0.6218046", "0.6211296", "0.6207332", "0.620005", "0.6187377", "0.61839855", "0.61724025", "0.6157141", "0.6151762", "0.61495334", "0.6141879", "0.61338747", "0.61306685", "0.61013323", "0.6094144", "0.6084032", "0.6067181", "0.6066546", "0.6066272", "0.6064467", "0.6061926", "0.60381025", "0.60248643", "0.60224247", "0.6021152", "0.6002217", "0.5992821", "0.59827495", "0.5981976", "0.5961706", "0.594546", "0.59445775", "0.594218", "0.5940782", "0.59377015", "0.59372735", "0.59348667", "0.59322214", "0.5930518", "0.5929805", "0.59266853", "0.5924891", "0.59236354", "0.59210277", "0.59207475", "0.5920187", "0.5915041", "0.59137625", "0.59052205", "0.5903966", "0.5888478", "0.58802086", "0.58770543", "0.58649844" ]
0.0
-1
Return sum of the ith row.
public static int rowSum(int[][] a, int rowIndex) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i == rowIndex) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumRow(Label l){\n\t\tint sum = 0;\n\n\t\tint rowIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(rowIx).get(i);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "public static int sumRow1( int r, int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t//initialize variable to store sum of a row\n\n\t for ( int i = 0; i < a[r].length; i++) {\t//loop through the specific \"row\" (array) given\n\n\t\t\tsum += a[r][i];\t\t\t\t\t\t//add each value to our sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t//return the sum variable\n }", "public static int sumRow( int r, int[][] a )\n {\n int sum = 0; //initialize sum\n for (int i = 0; i < a[r].length; i++) { //for the width of an array...\n\t sum += a[r][i]; //add the point to the sum\n }\n return sum; //return sum, an int\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int sum()\n {\n return sum(0,0,size);\n }", "public static int sumRow2(int r, int[][] m)\n {\n int sum = 0; //initialize sum\n for ( int i : m[r]) { //for each value of a certain row of m...\n\t sum += m[r][i]; //set sum as the addition of the previous sum and\n\t //the point in question\n }\n return sum; //return the sum\n }", "public static int sumRow2(int r, int[][] m)\t//same concept as above but with FOREACH loop\n {\n\t int sum = 0;\n\n\t for ( int i : m[r]) {\n\n\t\t sum += i;\n\n\t }\n\n\t return sum;\n }", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "public static int sum(int[] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tsum += a[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "public int[] getRowSums() {\n\t\treturn this.rowSums;\n\t}", "public int row();", "private int getRow() {\n return binaryPartition(row);\n }", "@Override\n\tpublic IDoubleVector sumRows() {\n\t\treturn null;\n\t}", "int totalRows(){\n return row;\n }", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "int getRow();", "public double elementSum() {\n return ops.elementSum(mat);\n }", "int getRowsAmount();", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "public int getRow(){\r\n // return statement\r\n return row;\r\n }", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "public int getRowNo() {\n return rowIndex+1;\n }", "public int getRow() {\n\t\treturn i;\n\t}", "protected int sumColumn(Label l){\n\t\tint sum = 0;\n\n\t\tint colIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(i).get(colIx);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "public int getSum() {\n\t\t\treturn 0;\r\n\t\t}", "public long getSum()\n {\n long sum = 0;\n\n for(int i = 0; i < integerList.length; i++)\n {\n sum = sum + integerList[i];\n }\n\n return sum;\n }", "public static int partOfRowSum(int[][] a, int rowIndex, int startCol,\r\n\t\t\tint endCol) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == rowIndex && j >= startCol && j <= endCol) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int getRow()\r\n {\r\n return row;\r\n }", "public Integer getSum() {\n return sum;\n }", "public List<Integer> getRow(int rowIndex) {\n List<Integer> res = new ArrayList<>(rowIndex + 1);\n for (int i = 0; i <= rowIndex; i++) {\n int size = res.size();\n for (int j = 0; j < size - 1; j++) {\n //res.get(j) += res.get(j + 1); -->WRONG\n res.set(j, res.get(j) + res.get(j + 1));\n }\n res.add(0, 1);\n }\n return res;\n }", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "public int sum() {\n\t\treturn (x + y);\n\t}", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "public int getRow()\n {\n return row;\n }", "public int row() {\r\n\t\treturn row;\r\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\r\n\t{\r\n\t\treturn this.row;\r\n\t}", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "public int getRow(){\r\n\t\treturn this.row;\r\n\t}", "public int getRow() { return _row; }", "int atRow();", "@Override\n\t\t\tpublic Integer call(Integer sum, Integer i) throws Exception {\n\t\t\t\treturn sum+i;\n\t\t\t}", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "double getSum();", "double getSum();", "public int getRow() {\r\n return row;\r\n }", "public int getRow() {\n\t\treturn row; \n\t}", "public int get_sum_e() {\n return (int)getSIntBEElement(offsetBits_sum_e(), 32);\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "@Override\r\n protected BigDecimal getSum() {\r\n boolean handleOutOfMemoryError = false;\r\n BigDecimal sum = BigDecimal.ZERO;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n sum = sum.add(new BigDecimal(value));\r\n }\r\n }\r\n }\r\n }\r\n return sum;\r\n }", "public int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public int getRow() {\n\t\treturn row;\n\t}", "public int getRow() {\n\t\treturn row;\n\t}", "public int getRow()\n\t\t{\n\t\t\treturn m_row;\n\t\t}", "public int getSum(int index) {\n if (index >= TABLE_MIN && index <= TABLE_MAX)\n return timesTables[table][index];\n else {\n System.out.println(table + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n \n }", "public int getRow() {\r\n return this.row;\r\n }", "@Override\n\tpublic int sum() {\n\t\treturn this.first + this.second + this.third;\n\t}", "public int getRow() {\n return this.row;\n }", "public int getRow() {\n return this.row;\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "public int get_sum_a() {\n return (int)getSIntBEElement(offsetBits_sum_a(), 32);\n }", "public int getRow() {\n\t\t\treturn row;\n\t\t}", "public int getRow() {\n\t\t\treturn row;\n\t\t}", "public int getRow() {\n return mRow;\n }", "public int getTotalRows();", "public int getRow()\n {\n return row;\n }", "public List <Integer> getRow (int rowIndex) {\n List <Integer> result = new ArrayList <> ();\n if (rowIndex == 1) {\n return Arrays.asList (1);\n }\n List <Integer> bList = getRow (rowIndex - 1);\n result.add (1);\n for (int i = 0; i < bList.size () - 1; i++) {\n result.add (bList.get (i) + bList.get (i + 1));\n }\n result.add (1);\n return result;\n }", "public int getRow() throws SQLException {\n\n try {\n debugCodeCall(\"getRow\");\n checkClosed();\n int rowId = result.getRowId();\n if (rowId >= result.getRowCount()) { return 0; }\n return rowId + 1;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "private static int getBoardSum(Game2048Board board) {\n int boardSum = 0;\n for (Game2048Tile tile : board.getItems()) {\n boardSum += Math.pow(tile.getValue().VAL, SCORE_SUM_POWER);\n }\n return boardSum;\n }", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "protected int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "public static int getRowTotal(int[][] numbers, int a) {\n int total = 0;\n for (int i = 0; i < numbers[a].length; i++) {\n total += numbers[a][i];\n }\n return total;\n }", "public int getRow(){ return (Integer)args[0]; }", "private void getSum() {\n\t\tint sum =0;\r\n\t\t\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i] != null)\r\n\t\t\t\tsum += products[i].getPrice();\r\n\t\t}\r\n\t\tSystem.out.println(sum);\r\n\t}", "public int getRow() {\n // YOUR CODE HERE\n return this.row;\n }", "public int getValue(int row, int column);", "public int getNrow(){\r\n \treturn this.nrow;\r\n \t}", "@Override\r\n public int getRow() {\r\n return this.row;\r\n }", "public long iterativeSum(long n){\n long result = 0;\n for(long i = 1L; i <= n; i++){\n result += i;\n }\n return result;\n }", "public int CalculateValue(int row, int index){\n int diagonal = row - index;\n\n //All arrays start at 0, so you need to add one to get the value at that index\n int offSet = 1;\n\n /*\n * The diagonal tells us how much we have to multiply the index by to get the value of our number.\n * (since the diagonals have a pattern of (* 0 + 1), (* 1 + 1), (* 2 + 1), etc.)\n * We then add one to offset starting from 0.\n */\n\n int val = diagonal * index + offSet;\n return val;\n }", "@Override\n\t\t\tpublic int getRow() {\n\t\t\t\treturn count;\n\t\t\t}", "public Integer rollAndSum() {\n return null;\n }", "public static void LargestSumRow(int[][] array) {\n\n }", "public int addRow() {\n\t\t// Create a new row with nothing in it\n\t\tList row = new ArrayList();\n\t\treturn(addRow(row));\n\t}" ]
[ "0.70685637", "0.68082654", "0.6801045", "0.6700831", "0.65994745", "0.6560627", "0.6510306", "0.6465065", "0.6454168", "0.64113283", "0.6253443", "0.62373114", "0.6138883", "0.6126706", "0.60737175", "0.60185444", "0.6013205", "0.5973034", "0.5972282", "0.5968899", "0.59655184", "0.5961522", "0.5953206", "0.5950552", "0.5937035", "0.59224355", "0.5921401", "0.5915722", "0.5897943", "0.58912814", "0.5885472", "0.5883638", "0.58787405", "0.5874274", "0.5865689", "0.5830257", "0.5817738", "0.5817101", "0.58146286", "0.579926", "0.57970035", "0.5793954", "0.57899386", "0.57899386", "0.57899386", "0.5783894", "0.57773817", "0.57700837", "0.57641363", "0.5762725", "0.5747153", "0.57464975", "0.57464975", "0.5746295", "0.5746295", "0.5741004", "0.5738554", "0.5736171", "0.5730984", "0.5730984", "0.5730984", "0.5730984", "0.5730984", "0.5730984", "0.5727224", "0.57266384", "0.57245183", "0.57245183", "0.5723071", "0.57207596", "0.5711616", "0.5692958", "0.56910783", "0.56910783", "0.5685948", "0.56838334", "0.56706434", "0.56706434", "0.56660414", "0.56586003", "0.5658445", "0.5630087", "0.5576204", "0.55637234", "0.5526375", "0.5524005", "0.5523768", "0.5515074", "0.5503346", "0.54988915", "0.5485946", "0.54856193", "0.54781526", "0.5476293", "0.5464526", "0.54628104", "0.5461943", "0.54465425", "0.543784", "0.5437614" ]
0.6549009
6
Return sum of values in a sub matrix.
public static int subMatrixSum(int[][] a, int startCol, int endCol, int startRow, int endRow) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i >= startRow && i <= endRow && j >= startCol && j <= endCol) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "static long subArraySum(int[] data) {\n\n long result = 0;\n\n // computing sum of sub array using formula\n int n = data.length;\n for (int i = 0; i < n; i++) {\n // x * (x at first index) + (x at other indices)\n result += (data[i] * (i * (n - i) + (n - i)));\n//\t\t\tresult += (data[i] * (i + 1) * (n - i));\n }\n\n // return all sub array sum\n return result;\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public int[][] subSum(int[] list){\n\tint n=list.length;\n\tS=new int[n][n];\n\t//initialize S from list values\n\tfor (int i = 0; i < n; i++) {\n\t\tS[i][i]=list[i];\n\t}\n\t//calculate the values by bottom up fashion\n\tfor (int k = 1; k < n; k++) {\n\t\tint i=0;\n\t\tint j=i+k;\n\t\twhile(j<n && i<j){\n\t\t if(i!=j)\n\t\t\tS[i][j]=S[i][i]+S[i+1][j];\n\t\t i=i+1;\n\t\t j=i+k;\n\t\t}\n\t}\n\treturn S;\n}", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int maxSumSubmatrix(int[][] matrix, int target) {\n int row = matrix.length;\n if(row==0)return 0;\n int col = matrix[0].length;\n int m = Math.min(row,col);\n int n = Math.max(row,col);\n //indicating sum up in every row or every column\n boolean colIsBig = col>row;\n int res = Integer.MIN_VALUE;\n for(int i = 0;i<m;i++){\n int[] array = new int[n];\n // sum from row j to row i\n for(int j = i;j>=0;j--){\n int val = 0;\n TreeSet<Integer> set = new TreeSet<Integer>();\n set.add(0);\n //traverse every column/row and sum up\n for(int k = 0;k<n;k++){\n array[k]=array[k]+(colIsBig?matrix[j][k]:matrix[k][j]);\n val = val + array[k];\n //use TreeMap to binary search previous sum to get possible result \n Integer subres = set.ceiling(val-target);\n if(null!=subres){\n res=Math.max(res,val-subres);\n }\n set.add(val);\n }\n }\n }\n return res;\n}", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "private float getSubSum(){\n float sum = 0;\n for(int i = 0; i < subList.size(); i++){\n sum = sum + subList.get(i).getCost();\n }\n return sum;\n }", "public int sum()\n {\n return sum(0,0,size);\n }", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int c1=0; c1<cols; c1++){\n for(int r2=r1; r2<rows; r2++){\n for(int c2=c1; c2<cols; c2++){\n int sec=areas[r2][c2];\n if(r1>0) sec-=areas[r1-1][c2];\n if(c1>0) sec-=areas[r2][c1-1];\n if(r1>0 && c1>0) sec+= areas[r1-1][c1-1];\n if(sec<=k) res=Math.max(sec, res);\n }\n }\n }\n }\n return res;\n }", "public static void subArraySum(int[] input, int sum) {\n System.out.println(\"Evaluating: \");\n for(int i : input) {\n System.out.print(i + \" \");\n }\n System.out.println(\"\\nTarget Sum: \" + sum + \"\\n\");\n \n Map<Integer, Integer> subArrayMap = new HashMap<Integer, Integer>();\n for (int i : input) {\n int diff = sum - i;\n if (subArrayMap.containsKey(diff)) {\n System.out.println(\"Pair of subArray adding upto the sum: [\" + i + \", \" + diff + \"]\");\n return;\n }\n if (diff > 0) {\n subArrayMap.put(i, diff);\n }\n }\n \n }", "public static int sumRow2(int r, int[][] m)\n {\n int sum = 0; //initialize sum\n for ( int i : m[r]) { //for each value of a certain row of m...\n\t sum += m[r][i]; //set sum as the addition of the previous sum and\n\t //the point in question\n }\n return sum; //return the sum\n }", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int r2=r1; r2<rows; r2++){\n TreeSet<Integer> set=new TreeSet<Integer>();\n set.add(0);\n for(int c=0; c<cols; c++){\n int sec=areas[r2][c];\n if(r1>0) sec-= areas[r1-1][c];\n Integer ceiling=set.ceiling(sec-k);\n if(ceiling!=null)\n res=Math.max(res, sec-ceiling);\n set.add(sec);\n }\n }\n }\n return res;\n }", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "public static double[][] integralMatrix (double[][] in) {\n\t\tint rows = in.length;\n\t\tint cols = in[0].length;\n\t\t\n\t\t\n\t\t// store submatrix sums, indexed by bottom-right corner of sub-matrix.\n\t\tdouble[][] integral = new double[rows][cols];\n\t\t\n\t\t// store column sums, indexed by bottom entry\n\t\tdouble[][] columnSums = new double[rows][cols];\n\t\t\n\t\t// initialize in[0][0]\n\t\tintegral[0][0] = in[0][0];\n\t\tcolumnSums[0][0] = in[0][0];\n\t\t\n\t\t// initialize left edge\n\t\tfor (int i = 1; i < rows; i++) {\n\t\t\tintegral[i][0] = in[i][0] + integral[i-1][0];\n\t\t\tcolumnSums[i][0] = columnSums[i-1][0];\n\t\t}\n\t\t\n\t\t// initialize top edge\n\t\tfor (int j = 1; j < cols; j++) {\n\t\t\tintegral[0][j] = in[0][j] + integral[0][j-1];\n\t\t\tcolumnSums[0][j] = in[0][j];\n\t\t}\n\n\t\tfor (int i = 1; i < rows; i++) {\n\t\t\tfor (int j = 1; j < cols; j++) {\n\t\t\t\tintegral[i][j] = in[i][j] + integral[i][j-1] + columnSums[i-1][j];\n\t\t\t\tcolumnSums[i][j] = in[i][j] + columnSums[i-1][j];\n\t\t\t}\n\t\t}\t\n\t\treturn integral;\n\t}", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "private static void sum(int[][] first, int[][] second) {\r\n\t\tint row = first.length;\r\n\t\tint column = first[0].length;\r\n\t\tint[][] sum = new int[row][column];\r\n\r\n\t\tfor (int r = 0; r < row; r++) {\r\n\t\t\tfor (int c = 0; c < column; c++) {\r\n\t\t\t\tsum[r] = first[r] + second[r];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"\\nSum of Matrices:\\n\");\r\n\t\tprint2dArray(sum);\r\n\t}", "public int sumRegion(int row1, int col1, int row2, int col2) {\n int ret = 0;\n\n for (int j = row1; j <= row2; j++){\n if (col1 == 0) \n ret += rowSums[j][col2];\n else \n ret += rowSums[j][col2] - rowSums[j][col1 - 1];\n }\n\n return ret;\n }", "double getSum();", "double getSum();", "public static void SumRowsColumns(int[][] array) {\n\n }", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "public static int sumRow( int r, int[][] a )\n {\n int sum = 0; //initialize sum\n for (int i = 0; i < a[r].length; i++) { //for the width of an array...\n\t sum += a[r][i]; //add the point to the sum\n }\n return sum; //return sum, an int\n }", "public static int diagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int[][] sumOfMatrices(int row, int col, int array1[][], int array2[][]) {\n int[][] sum = new int[row][col];\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n sum[i][j] = array1[i][j] + array2[i][j];\n }\n }\n return sum;\n }", "private int[][] matrixSum(int[][] a, int[][]b) {\n\t\tint row = a.length;\n\t\tint col = a[0].length;\n\t\t// creat a matrix array to store sum of a and b\n\t\tint[][] sum = new int[row][col];\n\t\t\n\t\t// Add elements at the same position in a matrix array\n\t\tfor (int r = 0; r < row; r++) {\n\t\t\tfor (int c = 0; c < col; c++) {\n\t\t\t\tsum[r][c] = a[r][c] + b[r][c]; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static int sumRow2(int r, int[][] m)\t//same concept as above but with FOREACH loop\n {\n\t int sum = 0;\n\n\t for ( int i : m[r]) {\n\n\t\t sum += i;\n\n\t }\n\n\t return sum;\n }", "static int countOfSubsetsOfSum(int[] arr,int sum){\n int n = arr.length;\n int[][] dp = new int[n + 1][sum + 1];\n\n for (int j = 0;j<=sum; j++){\n dp[0][j] = 0;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = 1;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public static int partOfRowSum(int[][] a, int rowIndex, int startCol,\r\n\t\t\tint endCol) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == rowIndex && j >= startCol && j <= endCol) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int diagonalSum(int[][] mat) {\r\n\r\n int rows = mat.length;\r\n int cols = mat[0].length;\r\n int sum = 0;\r\n for (int r = 0; r < rows; r++) {\r\n //sum of right diagonal\r\n sum += mat[r][cols - r - 1];\r\n for (int c = 0; c < cols; c++) {\r\n //sum of left diagonal\r\n if (r == c) {\r\n sum += mat[r][c];\r\n }\r\n }\r\n }\r\n //If N is odd, deduct the duplicate count\r\n return rows % 2 == 1 ? sum - mat[rows / 2][cols / 2] : sum;\r\n }", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "private static int getBoardSum(Game2048Board board) {\n int boardSum = 0;\n for (Game2048Tile tile : board.getItems()) {\n boardSum += Math.pow(tile.getValue().VAL, SCORE_SUM_POWER);\n }\n return boardSum;\n }", "static int subArraySum(int arr[], int sum) {\n int n = arr.length;\n int curr_sum = arr[0], start = 0, i;\n\n // Pick a starting point\n for (i = 1; i <= n; i++) {\n // If curr_sum exceeds the sum, then remove the starting elements\n while (curr_sum > sum && start < i - 1) {\n curr_sum = curr_sum - arr[start];\n start++;\n }\n\n // If curr_sum becomes equal to sum, then return true\n if (curr_sum == sum) {\n int p = i - 1;\n System.out.println(\"Sum found between indexes \" + start\n + \" and \" + p);\n return 1;\n }\n\n // Add this element to curr_sum\n if (i < n)\n curr_sum = curr_sum + arr[i];\n\n }\n\n System.out.println(\"No subarray found\");\n return 0;\n }", "private static void subarraysum(int[] a, int target) {\n\t\t\n\t\t\tint cursum=0;\n\t\t\tfor(int i=0;i<a.length;i++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tcursum=0;\n\t\t\t\tfor(int j=i;j<a.length;j++)\n\t\t\t\t{\n\t\t\t\t\tcursum+=a[j];\n\t\t\t\t\t//System.out.println(i+\" \"+(j));\n\t\t\t\t\t\n\t\t\t\t\t\tif(cursum==target)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(i+\" \"+(j));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(cursum>target)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(i+\" \"+j+\" \");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(cursum);\n\t\t\t}\n\t\t}", "public double getTotal(){\n\t\tBigDecimal total =BigDecimal.valueOf(0);\n\t\tfor(CartItem cartItem : map.values()){\n\t\t\ttotal = total.add(BigDecimal.valueOf(cartItem.getSubtotal())) ;\n\t\t}\t\t\n\t\treturn total.doubleValue();\n\t}", "public static double getTotal(int[][] numbers) {\n int totalValue = 0;\n for (int i = 0; i < numbers.length; i++) {\n for (int j = 0; j < numbers[i].length; j++) {\n totalValue = totalValue + numbers[i][j];\n }\n }\n return totalValue;\n }", "private int getSumV(int[][] a, int jv) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][jv];\n }\n return sum;\n }", "int subArraySum(int arr[], int n, int sum) \r\n { \r\n int curr_sum, i, j; \r\n \r\n // Pick a starting point \r\n for (i = 0; i < n; i++) \r\n { \r\n curr_sum = arr[i]; \r\n \r\n // try all subarrays starting with 'i' \r\n for (j = i + 1; j <= n; j++) \r\n { \r\n if (curr_sum == sum) \r\n { \r\n int p = j - 1; \r\n System.out.println(\"Sum found between indexes \" + i \r\n + \" and \" + p); \r\n return 1; \r\n } \r\n if (curr_sum > sum || j == n) \r\n break; \r\n curr_sum = curr_sum + arr[j]; \r\n } \r\n } \r\n \r\n System.out.println(\"No subarray found\"); \r\n return 0; \r\n }", "static boolean subSetSumProblem(int[] arr,int sum){\n// init\n int n = arr.length;\n boolean[][] dp = new boolean[n+1][sum+1];\n\n for (int j = 0;j<=sum;j++){\n dp[0][j] = false;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = true;\n }\n\n for (int i = 1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] || dp[i-1][j-arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public static void main(String[] args) {\n int[][] array = new int[6][6];\n int sum=0, result=0, sub=0;\n Scanner sc = new Scanner(System.in);\n //System.out.println(\"Enter array elements\")\n for(int x=0 ; x < 6; x++){\n for( int y=0; y < 6; y++) {\n array[x][y]= sc.nextInt();\n }\n }\n //System.out.println(\"Desired Sum : \")\n for( int k=0; k < 4; k++){\n for( int m=0; m < 4; m++){\n for ( int i=k; i < k+3; i++ ){\n int j=0; \n for ( j=m; j < m+3; j++){\n if( i != k+1){\n sum += array[i][j];\n }\n else{\n sum += array[i][j+1];\n break;\n }\n }\n }\n result = Math.max(result, sum);\n sum = 0; \n }\n }\n System.out.println(result);\n \n }", "private static void findMaxSumMatrix(int[][] matrix) {\n int maxSum = Integer.MIN_VALUE;\n int row = 0;\n int col = 0;\n for (int rows = 0; rows <matrix.length - 2; rows++) {\n for (int column = 0; column <matrix[rows].length - 2; column++) {\n int currentItem = matrix[rows][column];\n int neighborItem = matrix[rows][column + 1];\n int nextNeighborItem = matrix[rows][column + 2];\n\n int currentDownNeighborItem = matrix[rows + 1][column];\n int downNeighborItem = matrix[rows + 1][column + 1];\n int nextDownNeighborItem = matrix[rows + 1][column + 2];\n\n int lastItem = matrix[rows + 2][column];\n int lastNeighborItem = matrix[rows + 2][column + 1];\n int nextLastNeighborItem = matrix[rows + 2][column + 2];\n\n int sum = getSum(currentItem, neighborItem, nextNeighborItem, currentDownNeighborItem, downNeighborItem, nextDownNeighborItem, lastItem, lastNeighborItem, nextLastNeighborItem);\n\n if(maxSum <=sum){\n maxSum = sum;\n row = rows;\n col = column;\n }\n }\n }\n System.out.println(\"Sum = \" + maxSum);\n System.out.printf(\"%s %s %s\\n\",matrix[row][col], matrix[row][col + 1],matrix[row][col + 2]);\n System.out.printf(\"%s %s %s\\n\",matrix[row + 1][col],matrix[row + 1][col + 1], matrix[row + 1][col + 2]);\n System.out.printf(\"%s %s %s\",matrix[row + 2][col], matrix[row + 2][col + 1], matrix[row + 2][col + 2]);\n }", "@Override\r\n protected BigDecimal getSum() {\r\n boolean handleOutOfMemoryError = false;\r\n BigDecimal sum = BigDecimal.ZERO;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n sum = sum.add(new BigDecimal(value));\r\n }\r\n }\r\n }\r\n }\r\n return sum;\r\n }", "public int subarraySum(int[] nums, int k) {\n if (nums == null) {\n return 0;\n }\n\n int count = 0;\n\n for (int i = 0; i < nums.length; i++) {\n int delta = k;\n\n int j = i;\n while (j < nums.length) {\n delta = delta - nums[j];\n if (delta == 0) {\n count++;\n }\n j++;\n }\n }\n\n return count;\n }", "public int total() {\n int summation = 0;\n for ( int value : map.values() ) {\n summation += value;\n }\n return summation;\n }", "public static int sumRow1( int r, int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t//initialize variable to store sum of a row\n\n\t for ( int i = 0; i < a[r].length; i++) {\t//loop through the specific \"row\" (array) given\n\n\t\t\tsum += a[r][i];\t\t\t\t\t\t//add each value to our sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t//return the sum variable\n }", "public static int sum(int[] mainArray) {\r\n\t\tint sum = 0;\r\n\t\tfor (int counter = 0; counter < mainArray.length; counter ++) {\r\n\t\t\tsum += mainArray[counter];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "static ArrayList<Integer> subarraySum(int[] arr, int n, int s) {\n ArrayList<Integer> res = new ArrayList<>();\n int i = 0;\n int j = 1;\n int sum = arr[0];\n while(i < n) {\n if(sum < s && j < n) {\n sum += arr[j++];\n }\n else if(sum == s) {\n res.add(i + 1);\n res.add(j);\n return res;\n }\n else {\n sum -= arr[i++];\n }\n }\n res.add(-1);\n return res;\n }", "public void add(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] += skalar;\r\n }\r\n }\r\n }", "public static int sum(int[] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tsum += a[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "public static double sumMajorDiagonal(double[][] m) {\n double total = 0;\n for (int i = 0; i < m.length; i++) {\n total += m[i][i];\n }\n return total;\n }", "public static int partOfColSum(int[][] a, int colIndex, int startRow,\r\n\t\t\tint endRow) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (j == colIndex && i >= startRow && i <= endRow) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int rowSum(int[][] a, int rowIndex) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == rowIndex) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public double getSUM() {\n return sum;\n }", "protected int sumRow(Label l){\n\t\tint sum = 0;\n\n\t\tint rowIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(rowIx).get(i);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "static ArrayList<Integer> subarraySum(int[] arr, int n, int S){\r\n \r\n ArrayList<Integer> list = new ArrayList<>();\r\n \r\n int first = 0;\r\n int last = 0;\r\n int sum = 0;\r\n \r\n while(last < n || first < n){\r\n \r\n if(sum < S && last < n){\r\n sum = sum + arr[last]; \r\n ++last;\r\n }\r\n else if(sum == S){\r\n list.add(first+1);\r\n list.add(last);\r\n return list;\r\n }\r\n else if(first < n){\r\n sum = sum - arr[first];\r\n ++first;\r\n }\r\n }\r\n \r\n if(list.isEmpty()){\r\n list.add(-1);\r\n }\r\n return list;\r\n \r\n }", "public int subarraySum(int[] nums, int k) {\n\t\tMap<Integer, Integer> sumCount = new HashMap<Integer, Integer>();\n\t\tsumCount.put(0, 1);\n\t\tint prefix = 0;\n\t\tint result = 0;\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tprefix += nums[i];\n\t\t\tresult += sumCount.getOrDefault(prefix - k, 0);\n\t\t\tsumCount.put(prefix, sumCount.getOrDefault(prefix, 0) + 1);\n\t\t}\n\t\treturn result;\n\t}", "public double getTotal(){\n double total = 0;\n for(int i=0;i<array.length; i++){\n total += array[i].doubleValue();\n }\n return total;\n }", "public static int noDiagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i != j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public double totalQuantity() {\r\n\t\tdouble t = 0;\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) t += quantity[i][j][k];\r\n\t\treturn t;\r\n\t}", "static void maxSubArraySum1(int a[], int size)\n {\n int max_so_far = Integer.MIN_VALUE,\n max_ending_here = 0,start = 0,\n end = 0, s = 0;\n\n for (int i = 0; i < size; i++)\n {\n max_ending_here += a[i];\n\n if (max_so_far < max_ending_here)\n {\n max_so_far = max_ending_here;\n start = s;\n end = i;\n }\n\n if (max_ending_here < 0)\n {\n max_ending_here = 0;\n s = i + 1;\n }\n }\n System.out.println(\"Maximum contiguous sum is \" + max_so_far);\n System.out.println(\"Starting index \" + start);\n System.out.println(\"Ending index \" + end);\n }", "public double sum()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += c;\r\n\r\n return sum;\r\n }", "public double getSumXX() { \n\t\treturn sumX1X1; \n\t}", "private static int LargestSubArraySum(int[] array) {\n\t\tint maximumSum=0;\n\t\tfor(int i=0; i< array.length; i++) {\n\t\t\tfor(int j=i; j < array.length; j++) {\n\t\t\t\t\n\t\t\t\tint sum=0;\n\t\t\t\tfor(int k=i; k<= j; k++) \n\t\t\t\t\tsum += array[k];\n\t\t\t\t\n\t\t\t\tmaximumSum=Math.max(maximumSum, sum);\n\t\t\t} \n\t\t}\n\t\treturn maximumSum;\n\t}", "public int sumDescendants() {\n if (left == null && right == null) {\n int oldVal = value;\n /* fill code*/\n value = 0;\n return oldVal;\n\n } else {\n int oldVal = value;\n\n /* fill code*/\n value = left.sumDescendants()+ right.sumDescendants();\n\n return oldVal + value;\n\n }\n }", "public double sum() {\n double sum = x;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n sum += iter.next.x;\n iter = iter.next;\n }\n return sum;\n }", "public Matrix add(Matrix matrix) {\n if (check(matrix)) {\n Matrix sum = new Matrix(this.getWidth(), this.getHeight());\n for (int i = 0; i < this.getHeight(); i++) {\n for (int j = 0; j < this.getWidth(); j++) {\n sum.setEntry(j, i, this.getEntry(j, i) + matrix.getEntry(j, i));\n }\n }\n return sum;\n } else {\n return null;\n }\n }", "public int getSum() {\n\t\t\treturn 0;\r\n\t\t}", "private static int subarraySum(int[] nums, int target) {\n\n\t\tint count = 0;\n\n\t\tfor (int start = 0; start < nums.length; start++) {\n\n\t\t\tint sum = 0;\n\n\t\t\tfor (int end = start; end < nums.length; end++) {\n\t\t\t\tsum += nums[end];\n\t\t\t\t\n\t\t\t\tif(sum == target) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\n\t}", "public void update(int row, int col, int val) {\n int n = matrix[0].length;\n \n for(int i = col; i < n; i++){\n rowSums[row][i] = rowSums[row][i] - matrix[row][col] + val;\n }\n\n matrix[row][col] = val;\n }", "private int getSumH(int[][] a, int jh) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[jh][j];\n }\n return sum;\n }", "public static int[][] horizontalSums(int[][] a, int sumToFind){\r\n\t\tint [][]b = new int[a.length][a[0].length] ;\r\n\t\tfor (int r=0;r<a.length;r++) {\r\n\t\t\tfor(int c=0;c<a[0].length;c++){\r\n\t\t\tint sum=0;\r\n\t\t\t//int temp=0;\r\n\t\t\tint temp;\r\n\t\t\t\r\n\t\t\t//int column=0;\r\n\t\t\tfor (temp=c; temp<a[r].length && sum!=sumToFind;temp++){\r\n\t\t\t\tsum=sum+a[r][temp] ; \r\n\t\t\t}\r\n\t\t\tif(sum==sumToFind){\r\n\t\t\t\tfor (int i=c; i<temp;i++) {\r\n\t\t\t\t\tb[r][i]=a[r][i] ;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\treturn b ;\r\n\t}", "public int sum(int[] bit, int index) {\n index = index + 1;\n int sum = 0;\n while (index > 0) {\n sum += bit[index];\n index = getParent(index);\n }\n return sum;\n }", "public int sumOfElements(){\n\t\tint sum = 0;\n\t\tNode temp = this.head;\n\t\twhile(temp != null){\n\t\t\tsum += temp.data;\n\t\t\ttemp = temp.next;\n\t\t}\n\t\treturn sum;\n\t}", "public int sumNumbers(TreeNode root) {\n\t if(null == root) return 0;\n\t int bsum = 0;\n\t int tsum = 0;\n\t return sum (root, bsum, tsum);\n\t \n\t }", "public static int binarySum(int[] data, int low, int high) {\n if (low > high) // zero elements in subarray\n return 0;\n else if (low == high) // one element in subarray\n return data[low];\n else {\n int mid = (low + high) / 2;\n return binarySum(data, low, mid) + binarySum(data, mid + 1, high);\n }\n }", "public static void findSubarrays(int[] arr, int sum)\n {\n for (int i = 0; i < arr.length; i++)\n {\n int sum_so_far = 0;\n \n // consider all sub-arrays starting from i and ending at j\n for (int j = i; j < arr.length; j++)\n {\n // sum of elements so far\n sum_so_far += arr[j];\n \n // if sum so far is equal to the given sum\n if (sum_so_far == sum) {\n print(arr, i, j);\n }\n }\n }\n }", "public double sum() {\n final int size = size();\n double sum = 0.0;\n\n // Compute the average of all values\n for (int i = 0; i < size; i++) {\n final Number number = get(i);\n if (number == null) continue;\n if (Double.isNaN(number.doubleValue())) continue;\n\n sum += number.doubleValue();\n }\n\n return sum;\n }", "public boolean hasSubMatrixEqualToTarget(int[][] nums, int target) {\n int m = nums.length, n = nums[0].length;\n int[][] partialSum = new int[m][n];\n for (int i = 0; i < m; ++i) {\n for (int j = 0; j < n; ++j) {\n if (i == 0 && j == 0) {\n partialSum[i][j] = nums[i][j];\n } else if (i == 0) {\n partialSum[i][j] = partialSum[i][j-1] + nums[i][j];\n } else if (j == 0) {\n partialSum[i][j] = partialSum[i-1][j] + nums[i][j];\n } else {\n partialSum[i][j] = partialSum[i-1][j] + partialSum[i][j-1] - partialSum[i-1][j-1] + nums[i][j];\n }\n }\n }\n\n int[] partialRowSum = new int[m];\n SubarraySumTarget1D app = new SubarraySumTarget1D();\n for (int leftCol = 0; leftCol < n; ++leftCol) {\n for (int rightCol = leftCol; rightCol < n; ++rightCol) {\n for (int i = 0; i < m; ++i) {\n partialRowSum[i] = (leftCol == 0 ? partialSum[i][rightCol]\n : partialSum[i][rightCol] - partialSum[i][leftCol - 1]);\n if (i > 0) {\n partialRowSum[i] = (leftCol == 0? partialSum[i][rightCol]-partialSum[i-1][rightCol]\n : partialSum[i][rightCol]-partialSum[i-1][rightCol]\n -partialSum[i][leftCol-1]+partialSum[i-1][leftCol-1]);\n }\n }\n if (app.hasSubarraySumEqualToTarget(partialRowSum, target)) return true;\n }\n }\n return false;\n }", "public double getTotalSumSquares() {\n if (n < 2) {\n return Double.NaN;\n }\n return sumYY;\n }", "public static int getRowTotal(int[][] numbers, int a) {\n int total = 0;\n for (int i = 0; i < numbers[a].length; i++) {\n total += numbers[a][i];\n }\n return total;\n }", "public int cumulativeSum() {\n int sum = 0;\n EquationList p_eqn = eqn;\n while (p_eqn != null) {\n sum = sum + p_eqn.result;\n p_eqn = p_eqn.next;\n }\n if (p_eqn == null) {\n sum = sum;\n }\n return sum;\n }", "@Override\n\tpublic IDoubleVector sumRows() {\n\t\treturn null;\n\t}", "public int sumNumbers(TreeNode root) {\n if(root == null)\n return 0;\n res = 0;\n sumnum(root,0);\n return res;\n }", "public Matrix calculate();", "int maxSubarraySum(int arr[], int n){\n \n // Your code here\n int cursum = arr[0];\n int osum = arr[0];\n \n for(int i=1;i<n;i++){\n if(cursum>=0){\n cursum+=arr[i];\n }else{\n cursum=arr[i];\n }\n if(cursum>osum){\n osum=cursum;\n }\n }\n return osum;\n \n }", "public static double sumColumn(double[][] m, int columnIndex) {\n\t\t\n\t\tdouble sum = 0;\n\t\t\n\t\tfor (int i=0; i < m.length; i++) {\n\t\t\tsum += m[i][columnIndex]; \n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static int getNumberOfOnesInSubMatrix(int[][] matrix, int[] topLeft, int[] bottomRight) {\n if (null == matrix || matrix.length == 0) {\n return -1;\n }\n if (null == topLeft || topLeft.length == 0 || null == bottomRight || bottomRight.length == 0) {\n return -1;\n }\n if (topLeft.length > 2 || bottomRight.length > 2) {\n return -1;\n }\n\n int topRow = topLeft[0];\n int topCol = topLeft[1];\n int bottomRow = bottomRight[0];\n int bottomCol = bottomRight[1];\n\n if (topRow > bottomRow || topCol > bottomCol) {\n return -1;\n }\n\n int count = 0;\n for (int i = topRow; i <= bottomCol; i++) {\n for (int j = topRow; j <= bottomCol; j++) {\n count += matrix[i][j];\n }\n }\n\n return count;\n }" ]
[ "0.707744", "0.7053402", "0.66973454", "0.6625265", "0.66142523", "0.65071905", "0.6500795", "0.6482202", "0.641215", "0.6404195", "0.63557917", "0.631285", "0.6286296", "0.6250646", "0.6199348", "0.6194433", "0.6186599", "0.6186486", "0.6173292", "0.6141512", "0.613914", "0.6133288", "0.6116816", "0.6100631", "0.60976624", "0.6037926", "0.6025437", "0.6001444", "0.599623", "0.5942308", "0.5942308", "0.593446", "0.5920488", "0.59054863", "0.5889352", "0.58741564", "0.5860286", "0.5849356", "0.5834614", "0.58317363", "0.57981205", "0.57829195", "0.57186574", "0.57098496", "0.5707718", "0.5687872", "0.56822616", "0.5665691", "0.5659823", "0.56526613", "0.56404966", "0.56218374", "0.56197107", "0.56008536", "0.5599797", "0.5598075", "0.5569608", "0.5563404", "0.55482024", "0.5524867", "0.5524813", "0.5524006", "0.5477941", "0.54686004", "0.54654306", "0.54465646", "0.5438874", "0.54237145", "0.54200923", "0.5407336", "0.53991026", "0.5397204", "0.53923583", "0.539085", "0.53836906", "0.538114", "0.5379999", "0.5378458", "0.5360837", "0.53474724", "0.5345142", "0.53405666", "0.53368145", "0.53338176", "0.53196496", "0.5306956", "0.530222", "0.5299393", "0.52960914", "0.5292221", "0.5290271", "0.5290104", "0.5281041", "0.52800494", "0.5279654", "0.52742845", "0.52715796", "0.52672505", "0.52534074", "0.52419806" ]
0.6669493
3
Return a submatrix for a given matrix.
public static int[][] subMatrix(int[][] a, int startCol, int endCol, int startRow, int endRow) { int rowNum = a.length; int colNum = a[0].length; int[][] newAarry = new int[endRow - startRow + 1][endCol - startCol + 1]; int newRow = 0, newCol = 0; for (int i = 0; i < rowNum; i++) { newCol = 0; for (int j = 0; j < colNum; j++) { if (i >= startRow && i <= endRow && j >= startCol && j <= endCol) { newAarry[newRow][newCol] = a[i][j]; newCol++; } } if (i >= startRow && i <= endRow) { newRow++; } } return newAarry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Matrix getSubMatrix(int[] row, int[] col){\r\n \tint n = row.length;\r\n \tint m = col.length;\r\n \tMatrix subMatrix = new Matrix(n, m);\r\n \tdouble[][] sarray = subMatrix.getArrayReference();\r\n \tfor(int i=0; i<n; i++){\r\n \t\tfor(int j=0; j<m; j++){\r\n \t\tsarray[i][j]= this.matrix[row[i]][col[j]];\r\n \t\t}\r\n \t}\r\n \treturn subMatrix;\r\n \t}", "Matrix sub(Matrix m){\n if(m.cols != this.cols || m.rows != this.rows) throw new RuntimeException(String.format(\"Wrong dimensions\"));\n Matrix matrix_to_return = new Matrix(m.rows, m.cols);\n for(int i=0; i<m.rows * m.cols; i++){\n matrix_to_return.data[i] = this.data[i] - m.data[i];\n }\n return matrix_to_return;\n }", "public Matrix getSubMatrix(int i, int j, int k, int l){\r\n \tif(i>k)throw new IllegalArgumentException(\"row indices inverted\");\r\n \tif(j>l)throw new IllegalArgumentException(\"column indices inverted\");\r\n \tint n=k-i+1, m=l-j+1;\r\n \tMatrix subMatrix = new Matrix(n, m);\r\n \tdouble[][] sarray = subMatrix.getArrayReference();\r\n \tfor(int p=0; p<n; p++){\r\n \t\tfor(int q=0; q<m; q++){\r\n \t\tsarray[p][q]= this.matrix[i+p][j+q];\r\n \t\t}\r\n \t}\r\n \treturn subMatrix;\r\n \t}", "public int[][] subMatrix(int[][]A, int x1, int y1, int n) {\n\t \n\t // create a return matrix\n\t int[][] matrix = initMatrix(n);\n\t \n\t // iterate through and populate the matrix.\n\t for (int i = 0; i<n; i++) {\n\t\t for (int j = 0; j<n; j++) {\n\t\t\t matrix[i][j] = A[x1+i][y1+j];\n\t\t }\n\t }\n\t \n\t // return matrix\n\t return matrix;\n }", "@Override\n\tpublic IMatrix subMatrix(int row, int col, boolean liveView) {\n\t\tif (liveView) {\n\t\t\treturn new MatrixSubMatrixView(this, row, col);\n\t\t} else {\n\t\t\treturn new MatrixSubMatrixView(this.copy(), row, col);\n\t\t}\n\t}", "private int[][] subMatrix(int[][] matrix, ArrayList<Integer> indexes) {\n ArrayList<Integer> list = new ArrayList<>();\n int[][] result = new int[matrix.length - indexes.size()][matrix.length - indexes.size()];\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n if (!(indexes.contains(i) || indexes.contains(j))) {\n list.add(matrix[i][j]);\n }\n }\n }\n for (int i = 0; i < matrix.length - indexes.size(); i++) {\n for (int j = 0; j < matrix[i].length - indexes.size(); j++) {\n result[i][j] = list.get(j + (matrix.length - indexes.size()) * i);\n }\n }\n return result;\n }", "public Matrix subMatrix(int rowRemoved, int colRemoved) {\n\t\tComplexNumber[][] values = new ComplexNumber[M - 1][];\n\t\tint newRow = 0;\n\t\tfor (int row = 0; row < M; row++) {\n\t\t\tif (row != rowRemoved) {\n\t\t\t\tvalues[newRow] = new ComplexNumber[N - 1];\n\t\t\t\tint newCol = 0;\n\t\t\t\tfor (int col = 0; col < N; col++) {\n\t\t\t\t\tif (col != colRemoved) {\n\t\t\t\t\t\tvalues[newRow][newCol] = ROWS[row][col];\n\t\t\t\t\t\tnewCol++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnewRow++;\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(values);\n\t}", "private double[][] SubMatriz(int i,int j,double [][] matriz)\n\t\t{\n\t\t\tdouble [][]temp=new double[matriz.length-1][matriz.length-1];\n\t\t\tint count1 =0;\n\t\t\tint count2 =0;\n\t\t\tfor(int k =0; k<matriz.length;k++){\n\t\t\t\tif(k!=i){\n\t\t\t\t\tcount2 =0;\n\t\t\t\t\tfor(int l =0; l<matriz.length;l++){\n\t\t\t\t\t\tif(l!=j){\n\t\t\t\t\t\t\ttemp[count1][count2]= matriz[k][l];\n\t\t\t\t\t\t\tcount2++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcount1++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn temp;\n\t\t}", "Matrix sub(Matrix M){\n if(getSize() != M.getSize()) {\n throw new RuntimeException(\"Matrix Error: Matrices must be the same size\");\n }\n //add the negative\n Matrix Y = new Matrix(getSize());\n M = (M.scalarMult(-1));\n Y = (this.add(M));\n return Y;\n }", "public void setSubMatrix(int[] row, int[] col, double[][] subMatrix){\r\n \tint n=row.length;\r\n \tint m=col.length;\r\n \tfor(int p=0; p<n; p++){\r\n \t\tfor(int q=0; q<m; q++){\r\n \t\tthis.matrix[row[p]][col[q]] = subMatrix[p][q];\r\n \t\t}\r\n \t}\r\n \t}", "public Matrix getSubmatrix(int i, int j, int length) {\n\t\tif (length <= 0 || i < 0 || i >= n || j < 0 || j >= n || i + length > n || j + length > n)\n\t\t\tthrow new IllegalArgumentException();\n\t\tMatrix m = new Matrix(length);\n\t\tfor (int k = 0; k < length; k++) {\n\t\t\tfor (int k2 = 0; k2 < length; k2++) {\n\t\t\t\tdouble c = content[i+k][j+k2];\n\t\t\t\tm.set(k, k2, c);\n\t\t\t}\n\t\t}\n\t\treturn m;\n\t}", "private static @NotNull Matrix splitMatrix(@NotNull Matrix matrix,\n int indexRowFrom, int indexRowTo, int indexColFrom, int indexColTo) {\n\n assert indexRowTo > indexRowFrom;\n assert indexColTo > indexColFrom;\n\n final int rows = indexRowTo - indexRowFrom;\n final int cols = indexColTo - indexColFrom;\n\n final int[][] result = new int[rows][cols];\n\n for (int i = 0; i < rows; i++) {\n System.arraycopy(matrix.getRow(indexRowFrom + i), indexColFrom, result[i], 0, cols);\n }\n\n return Matrix.fromArray(result);\n\n }", "@Override\n\tpublic IMatrix sub(IMatrix other) {\n\t\tif (this.getColsCount() != other.getColsCount()\n\t\t\t\t|| this.getRowsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For operation 'sub' matrixes should be compatible!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = this.getColsCount();\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tthis.set(i, j, this.get(i, j) - other.get(i, j));\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "@Override\n\tpublic IMatrix nSub(IMatrix other) {\n\t\treturn this.copy().sub(other);\n\t}", "Matrix sub(double w){\n Matrix matrix_to_return = new Matrix(this.rows, this.cols);\n for(int i=0; i<this.rows * this.cols; i++){\n matrix_to_return.data[i] = this.data[i] - w;\n }\n return matrix_to_return;\n }", "public void setSubMatrix(int i, int j, double[][] subMatrix){\r\n \t int k = subMatrix.length;\r\n \t int l = subMatrix[0].length;\r\n \tif(i>k)throw new IllegalArgumentException(\"row indices inverted\");\r\n \tif(j>l)throw new IllegalArgumentException(\"column indices inverted\");\r\n \tint n=k-i+1, m=l-j+1;\r\n \tfor(int p=0; p<n; p++){\r\n \t\tfor(int q=0; q<m; q++){\r\n \t\tthis.matrix[i+p][j+q] = subMatrix[p][q];\r\n \t\t}\r\n \t}\r\n \t}", "public int maximumSquareSubMatrix(int[][] matrix) {\n int m = matrix.length;\n if (m < 1) return 0;\n\n int n = matrix[0].length;\n\n int[][] dp = new int[m+1][n+1];\n for (int i = 1; i <= m; i++) {\n for (int j = 1; j <= n; j++) {\n if (matrix[i-1][j-1] == 1) {\n dp[i][j] = Math.min(dp[i-1][j], Math.min(dp[i][j-1], dp[i-1][j-1]))+1;\n }\n }\n }\n\n return dp[m][n];\n }", "public static int subMatrixSum(int[][] a, int startCol, int endCol,\r\n\t\t\tint startRow, int endRow) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i >= startRow && i <= endRow && j >= startCol\r\n\t\t\t\t\t\t&& j <= endCol) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "private static void changeSubMatrix(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++){\n if(matrix[i][0]==0 || matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n }", "private int[][] subKey(int[][] km, int begin) {\n int[][] arr = new int[4][4];\n for (int i = 0; i < arr.length; i++) {\n System.arraycopy(km[i], 4 * begin, arr[i], 0, arr.length);\n }\n return arr;\n }", "public ChoresArrayImpl<E> subList(int from, int to){\n\t\t ChoresArrayImpl<E> sublist = new ChoresArrayImpl<E>();\n\t\t for(int i=from; i<to;i++){\n\t\t sublist.add(elements[i]);\n\t\t }\n\t\t for(int k=0;k<sublist.size();k++){\n\t\t System.out.println(\"Sub list elements are \"+sublist.get(k));\n\t\t \n\t\t }\n\t\t return sublist;\n\t\t }", "public T extractMatrix( int y0, int y1, int x0, int x1 ) {\n if (y0 == SimpleMatrix.END) y0 = mat.getNumRows();\n if (y1 == SimpleMatrix.END) y1 = mat.getNumRows();\n if (x0 == SimpleMatrix.END) x0 = mat.getNumCols();\n if (x1 == SimpleMatrix.END) x1 = mat.getNumCols();\n\n T ret = createMatrix(y1 - y0, x1 - x0, mat.getType());\n\n ops.extract(mat, y0, y1, x0, x1, ret.mat, 0, 0);\n\n return ret;\n }", "public void setSubMatrix(int i, int j, int k, int l, double[][] subMatrix){\r\n \tif(i>k)throw new IllegalArgumentException(\"row indices inverted\");\r\n \tif(j>l)throw new IllegalArgumentException(\"column indices inverted\");\r\n \tint n=k-i+1, m=l-j+1;\r\n \tfor(int p=0; p<n; p++){\r\n \t\tfor(int q=0; q<m; q++){\r\n \t\tthis.matrix[i+p][j+q] = subMatrix[p][q];\r\n \t\t}\r\n \t}\r\n \t}", "public AIlogicalSerial subSection(int i);", "public RealMatrix subtract(SparseRealMatrix m) throws IllegalArgumentException {\n\n // safety check\n checkAdditionCompatible(m);\n\n final RealMatrix out = new SparseRealMatrix(this);\n for (OpenIntToDoubleHashMap.Iterator iterator = m.entries.iterator(); iterator.hasNext();) {\n iterator.advance();\n final int row = iterator.key() / columnDimension;\n final int col = iterator.key() - row * columnDimension;\n out.setEntry(row, col, getEntry(row, col) - iterator.value());\n }\n\n return out;\n\n }", "public static Matrix copy(Matrix a){\r\n \t if(a==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = a.getNrow();\r\n \t int nc = a.getNcol();\r\n \t double[][] aarray = a.getArrayReference();\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t double[][] barray = b.getArrayReference();\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=aarray[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = a.index[i];\r\n \t return b;\r\n \t}\r\n \t}", "ILinkedList sublist(int fromIndex, int toIndex);", "@Override\n public T[] subList(int fromIndex, int toIndex) {\n T[] newArray = (T[]) new Object[toIndex - fromIndex + 1];\n int j = 0;\n for (int i = fromIndex; i < toIndex; i++) {\n newArray[j] = array[i];\n j++;\n }\n return newArray;\n }", "public static ASTNode evaluateSlice(ASTNode compound_matrix, ArrayList<ASTNode> indices) {\n\t if(indices.size()==0) {\n\t assert !(compound_matrix instanceof CompoundMatrix || compound_matrix instanceof EmptyMatrix);\n\t return compound_matrix;\n\t }\n\t \n\t ASTNode sliceindex=indices.get(0);\n\t \n\t if(compound_matrix instanceof EmptyMatrix) {\n // Construct new matrix domain for empty matrix.\n // First get the matrix domain for compound_matrix (which is itself an empty matrix)\n ASTNode matdom=compound_matrix.getChild(0);\n \n // Get indices\n ArrayList<ASTNode> empty_idx=matdom.getChildren(3);\n \n assert empty_idx.size()==indices.size();\n \n for(int i=empty_idx.size()-1; i>=0; i--) {\n if(! indices.get(i).equals(new IntegerDomain(new Range(null, null)))) {\n // If indices.get(i) is a constant, remove that dimension. \n empty_idx.remove(i);\n }\n }\n \n return new EmptyMatrix(new MatrixDomain(compound_matrix.getChild(0).getChild(0), // get original base domain. \n empty_idx));\n }\n\t \n // Must be a compound matrix from here on. \n if(sliceindex.isSet()) {\n assert ! sliceindex.isFiniteSetUpper() && ! sliceindex.isFiniteSetLower(); // Should be ..\n ArrayList<ASTNode> newcm=new ArrayList<ASTNode>();\n \n ArrayList<ASTNode> restindices=new ArrayList<ASTNode>(indices);\n restindices.remove(0);\n \n for(int i=1; i<compound_matrix.numChildren(); i++) {\n ASTNode tmp=evaluateSlice(compound_matrix.getChildConst(i), restindices);\n if(tmp==null) return null;\n newcm.add(tmp);\n }\n return new CompoundMatrix(compound_matrix.getChild(0), newcm); // Take index domain from original CM.\n\t }\n\t else {\n\t // This index must be a constant\n\t ArrayList<Long> cmindex;\n if(compound_matrix instanceof CompoundMatrix) {\n cmindex=compound_matrix.getChild(0).getValueSet();\n }\n else if (compound_matrix instanceof EmptyMatrix) {\n cmindex=new ArrayList<Long>();\n }\n else {\n cmindex=null;\n }\n\t \n\t long val=sliceindex.getValue();\n\t int idxval=cmindex.indexOf(val);\n\t \n\t if(idxval==-1) {\n\t // Matrix is indexed out of range. Undefined. Delay evaluation. \n\t return null;\n\t }\n\t \n ArrayList<ASTNode> restindices=new ArrayList<ASTNode>(indices);\n restindices.remove(0);\n\t \n\t return evaluateSlice(compound_matrix.getChildConst(idxval+1), restindices);\n\t }\n\t}", "public static Matrix subtract(Matrix first, Matrix second) {\n \n Matrix result = new Matrix(first.getRows(), first.getClumns());\n \n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] - second.matrix[row][col];\n }\n }\n \n return result;\n }", "private static String[] BackSub(Matrix REF){\r\n\t\t// Start at bottom right of Matrix -1 to offset starting from index 0\r\n\t\t// Track two index\r\n\t\t// [1, 2, 3| 1] \r\n\t\t// [1, 2, 3| 1] \r\n\t\t// [1, 2, 3| 1] < (rowPoint, augmentY)\r\n\t\t//\t\t ^\r\n\t\t//(rowPoint, colPoint)\r\n\t\t//\t REF.col\r\n\t\t// ------------\r\n\t\t// [ ] |\r\n\t\t// [ ] | REF.row\r\n\t\t// [ ] |\r\n\t\tint rowPoint = REF.row() - 1;\r\n\t\tint colPoint = REF.col() - 2;\r\n\t\tint augmentY = REF.col() - 1;\r\n\t\tDouble[][] REFval = REF.getAll();\r\n\t\t// if matrix inconsistent the last rows will look like [0,...,0| 1]\r\n\t\tif (REFval[rowPoint][colPoint] == 0 && REFval[rowPoint][augmentY] != 0) {\r\n\t\t\treturn null;\r\n\t\t}else {\r\n\t\t\tString[] Solution = new String[REF.col - 1];\r\n\t\t\t// find first pivot\r\n\t\t\t// we now have form ax + b + .. + c = d\r\n\t\t\t// x = (d - b - .. - c)/a\r\n\t\t\twhile (rowPoint >= 0) {\r\n\t\t\t\tDouble[] row = REFval[rowPoint];\r\n\t\t\t\tMatrix.processRow(Solution, row);\r\n\t\t\t\trowPoint--;\r\n\t\t\t}\r\n\t\t\treturn Solution;\r\n\t\t}\r\n\t}", "public Matrix copy(){\r\n \t if(this==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = this.nrow;\r\n \t int nc = this.ncol;\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t double[][] barray = b.getArrayReference();\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=this.matrix[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = this.index[i];\r\n \t return b;\r\n \t}\r\n \t}", "public Matrix minus(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=this.nrow;\r\n \tint nc=this.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] - bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "public Matrix minus(double[][] bmat){\r\n \t int nr=bmat.length;\r\n \tint nc=bmat[0].length;\r\n \tif((this.nrow!=nr)||(this.ncol!=nc)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] - bmat[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "public int[][] sub(int[][] A, int[][] B, int x1, int y1, int x2, int y2, int n)\n {\n\t // create return matrix\n\t int[][] matrix = initMatrix(n);\n\t \n\t // iterate through each element and make the appropriate subtraction. Populate the return matrix\n\t for (int i = 0; i<n; i++) {\n\t\t // This is each line\n\t\t for (int j = 0; j<n; j++) {\n\t\t\t matrix[i][j] = A[x1+i][y1+j] - B[x2+i][y2+j];\n\t\t }\n\t }\n\t \n\t // return the return matrix.\n\t return matrix;\n }", "public void printMaxSubSquare(int M[][]) {\n int i, j;\n int R = M.length; //no of rows in M[][]\n int C = M[0].length; //no of columns in M[][]\n int S[][] = new int[R][C];\n //记录对应的 最大矩阵的位置\n int max_of_s, max_i, max_j;\n\n /* Set first column of S[][]*/\n for (i = 0; i < R; i++)\n S[i][0] = M[i][0];\n\n /* Set first row of S[][]*/\n for (j = 0; j < C; j++)\n S[0][j] = M[0][j];\n\n /* Construct other entries of S[][]*/\n for (i = 1; i < R; i++) {\n for (j = 1; j < C; j++) {\n if (M[i][j] == 1)\n S[i][j] = Math.min(S[i][j - 1], Math.min(S[i - 1][j], S[i - 1][j - 1])) + 1;\n else\n S[i][j] = 0;\n }\n }\n\n /* Find the maximum entry, and indexes of maximum entry\n in S[][] */\n max_of_s = S[0][0];\n max_i = 0;\n max_j = 0;\n for (i = 0; i < R; i++) {\n for (j = 0; j < C; j++) {\n if (max_of_s < S[i][j]) {\n max_of_s = S[i][j];\n max_i = i;\n max_j = j;\n }\n }\n }\n System.out.println(\"Result in the Matrix S[][]\");\n for(i = 0;i < R ; i ++){\n for(j =0; j < C;j ++){\n System.out.print(S[i][j] + \"\\t\");\n }\n System.out.println();\n }\n\n System.out.println(\"Maximum size sub-matrix is: \");\n for (i = max_i; i > max_i - max_of_s; i--) {\n for (j = max_j; j > max_j - max_of_s; j--) {\n System.out.print(M[i][j] + \" \");\n }\n System.out.println();\n }\n\n }", "public int[][] getMat() {\n // Note: java has no return read-only so we won't return matrix;\n // b\\c that would expose internal representation. Instead we will\n // copy each row into a new matrix, and return that.\n return Helper.cloneMatrix(matrix);\n }", "public static Matrix getUpperMatrix(Matrix A) {\n\t\tint size = A.getColumnDimension();\n\t\t\n\t\tdouble[][] u = new double[size][size];\n\t\t\n\t\tfor(int i = 0; i<size; i++){\n\t\t\tfor(int j=0; j < size; j++){\n\t\t\t\tif(j>i) u[i][j] = A.get(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tMatrix U = new Matrix(u);\n\t\t\n\t\treturn U;\n\t}", "public Table getSubset(int[] rows) {\n\t\treturn new SubsetTableImpl(this, this.resubset(rows));\n\t}", "public Matrix subtract(Matrix m2)\n\t{\n\t\tMatrix result = new Matrix(new double[m2.matrix.length][m2.matrix.length]); \n\t\tfor (int i = 0; i < m2.matrix.length; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < m2.matrix.length; j++)\n\t\t\t{\n\t\t\t\tresult.matrix[i][j] = matrix[i][j] - m2.matrix[i][j];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private void\ngetMatrix( SoNode node)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPath xfPath; // ptr\n\n // Construct a path from the root down to this node. Use the given\n // path if it's the same\n if (node == null || node == SoFullPath.cast(path).getTail())\n xfPath = path;\n\n else {\n int index = getNodeIndex(node);\n xfPath = path.copy(0, index + 1);\n xfPath.ref();\n }\n\n // Create an action instance if necessary, then apply it to the path\n if (matrixAction == null)\n matrixAction = new SoGetMatrixAction(vpRegion);\n matrixAction.apply(xfPath);\n\n if (xfPath != path)\n xfPath.unref();\n}", "public int getMatrix(int i, int j) {\n\t\treturn matrix[i][j];\r\n\t}", "public static int getNumberOfOnesInSubMatrix(int[][] matrix, int[] topLeft, int[] bottomRight) {\n if (null == matrix || matrix.length == 0) {\n return -1;\n }\n if (null == topLeft || topLeft.length == 0 || null == bottomRight || bottomRight.length == 0) {\n return -1;\n }\n if (topLeft.length > 2 || bottomRight.length > 2) {\n return -1;\n }\n\n int topRow = topLeft[0];\n int topCol = topLeft[1];\n int bottomRow = bottomRight[0];\n int bottomCol = bottomRight[1];\n\n if (topRow > bottomRow || topCol > bottomCol) {\n return -1;\n }\n\n int count = 0;\n for (int i = topRow; i <= bottomCol; i++) {\n for (int j = topRow; j <= bottomCol; j++) {\n count += matrix[i][j];\n }\n }\n\n return count;\n }", "public static int subBits(int n, int m, int i, int j) {\n\n\tif (i<0 || j<0 || i>31 || j>31) {\n\t\tthrow new IndexOutOfBoundsException(\"Indices out of bounds\");\n\t}\n\n\t// internally, i is always the smaller index\n\tif (i>j) {\n\t\tint s = i;\n\t\ti = j;\n\t\tj = s;\n\t}\n\t\n\tfor (int x = i; x<=j; x++) {\n\t\tint mask = 0x1 << x;\n\t\tint v = m & mask;\n\t\tif (v==0x0) {\t// m bit is set to zero\n\t\t\tn &= ~(mask);\n\t\t} else {\t\t// m bit is set to one\n\t\t\tn |= mask;\n\t\t}\n\t}\n\n\treturn n;\n}", "@Override\n public IntList subList(int fromIndex, int toIndex) {\n subListRangeCheck(fromIndex, toIndex, size);\n return new SubList(this, fromIndex, toIndex);\n }", "public static Complex[][] solveLinearEquation(Complex[][] matrix, int numofrows){\n for(int i = 0; i < numofrows; i++){\n printarr(matrix);\n Row row = new Row();\n matrix = row.rowManipulation(matrix, i);\n }\n //backSubstitution\n if(Matrix.str.equals(\"\")) {\n for (int i = numofrows - 1; i > 0; i--) {\n //System.out.println(Arrays.deepToString(matrix));\n matrix = backSub(matrix, i);\n }\n if(Row.columnSwaps.size() != 0){\n matrix = Row.swapback(matrix);\n }\n }\n Matrix.checkSolutions(matrix);\n return matrix;\n }", "public Object getObject(int row, int column) {\n\t\treturn getColumn(column).getRow(subset[row]);\n\t}", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int c1=0; c1<cols; c1++){\n for(int r2=r1; r2<rows; r2++){\n for(int c2=c1; c2<cols; c2++){\n int sec=areas[r2][c2];\n if(r1>0) sec-=areas[r1-1][c2];\n if(c1>0) sec-=areas[r2][c1-1];\n if(r1>0 && c1>0) sec+= areas[r1-1][c1-1];\n if(sec<=k) res=Math.max(sec, res);\n }\n }\n }\n }\n return res;\n }", "public int maxSumSubmatrix(int[][] matrix, int target) {\n int row = matrix.length;\n if(row==0)return 0;\n int col = matrix[0].length;\n int m = Math.min(row,col);\n int n = Math.max(row,col);\n //indicating sum up in every row or every column\n boolean colIsBig = col>row;\n int res = Integer.MIN_VALUE;\n for(int i = 0;i<m;i++){\n int[] array = new int[n];\n // sum from row j to row i\n for(int j = i;j>=0;j--){\n int val = 0;\n TreeSet<Integer> set = new TreeSet<Integer>();\n set.add(0);\n //traverse every column/row and sum up\n for(int k = 0;k<n;k++){\n array[k]=array[k]+(colIsBig?matrix[j][k]:matrix[k][j]);\n val = val + array[k];\n //use TreeMap to binary search previous sum to get possible result \n Integer subres = set.ceiling(val-target);\n if(null!=subres){\n res=Math.max(res,val-subres);\n }\n set.add(val);\n }\n }\n }\n return res;\n}", "public Matrix copy() {\n\t\tComplexNumber[][] rows = new ComplexNumber[M][];\n\t\tfor (int row = 0; row < M; row++) {\n\t\t\trows[row] = new ComplexNumber[N];\n\t\t\tfor (int col = 0; col < N; col++) {\n\t\t\t\trows[row][col] = ROWS[row][col];\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(rows);\n\t}", "@Override\n public Matrix viewPart(int[] offset, int[] size) {\n return new MatrixView(this, offset, size);\n }", "public T rows( int begin, int end ) {\n return extractMatrix(begin, end, 0, SimpleMatrix.END);\n }", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int r2=r1; r2<rows; r2++){\n TreeSet<Integer> set=new TreeSet<Integer>();\n set.add(0);\n for(int c=0; c<cols; c++){\n int sec=areas[r2][c];\n if(r1>0) sec-= areas[r1-1][c];\n Integer ceiling=set.ceiling(sec-k);\n if(ceiling!=null)\n res=Math.max(res, sec-ceiling);\n set.add(sec);\n }\n }\n }\n return res;\n }", "public static int[][] changeMatrix(int[][] matrix,MatrixSize matrixSize){\n boolean firstRowContainsZero=doesFirstRowContainZero(matrix,matrixSize);\n boolean firstColumnContainsZero=doesFirstColumnContainZero(matrix,matrixSize);\n changeFirstRowAndColumn(matrix,matrixSize);\n changeSubMatrix(matrix,matrixSize);\n if(firstRowContainsZero)\n setFirstRowToZero(matrix,matrixSize.numberOfColumns);\n if(firstColumnContainsZero)\n setFirstColumnToZero(matrix,matrixSize.numberOfRows);\n return matrix;\n }", "public abstract List<List<Integer>> subsets(int[] S);", "Matrix get(final Serializable id);", "public JTensor sub(JType value) {\n JTensor r = new JTensor();\n TH.THTensor_(sub)(r, this, value);\n return r;\n }", "private static ArrayList<ArrayList<Integer>> transposeMatrix(ArrayList<ArrayList<Integer>> matrix){\r\n\t\tint numRows = matrix.size();\r\n\t\tint numCols = matrix.get(0).size();\r\n\t\tArrayList<ArrayList<Integer>> newMat = new ArrayList<ArrayList<Integer>>();\r\n\t\t//Put this in second for-loop to not have to loop twice?\r\n\t\tfor(int i = 0; i < numCols; i++) newMat.add(new ArrayList<Integer>());\r\n\t\tfor(int i = 0; i < numRows; i++){\r\n\t\t\tfor (int j = 0; j < numCols; j++){\r\n\t\t\t\tnewMat.get(j).add(matrix.get(i).get(j));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn newMat;\r\n\t}", "public CharSequence subSequence(int from, int to) {\n return content.subSequence(from, to);\n }", "public Table getSubset(int pos, int len) {\n\t\treturn new SubsetTableImpl(this, this.resubset(pos, len));\n\t}", "@Secured(Permission.ADMIN)\r\n\tvoid removeMatrix(final Matrix matrix);", "public E getFromMatrix(int i, int j) {\r\n\t\treturn getFromArray(i, j);\r\n\t}", "BitField getSubField(int from, int to);", "public DataTable subTable(int iRowFrom, int iRowTo, int... iCols) {\r\n\t\tDataTable rtn = null;\r\n\t\tif (iRowFrom >= 0 && iRowTo >= iRowFrom && iRowTo < rows.size()) {\r\n\t\t\tint[] iColsTU = iCols;\r\n\t\t\tif (iColsTU == null) {//null means all columns in the original order.\r\n\t\t\t\tiColsTU = new int[nColumns];\r\n\t\t\t\tfor (int i = 0; i < iColsTU.length; i++) {\r\n\t\t\t\t\tiColsTU[i] = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trtn = new DataTable(info, iColsTU.length);\r\n\t\t\tif (colNames != null) {\r\n\t\t\t\tString[] subColNames = new String[iColsTU.length];\r\n\t\t\t\tfor (int i = 0; i < iColsTU.length; i++) {\r\n\t\t\t\t\tsubColNames[i] = colNames[iColsTU[i]];\r\n\t\t\t\t}\r\n\t\t\t\trtn.setColNames(subColNames);\r\n\t\t\t}\r\n\t\t\tfor (int i = iRowFrom; i <= iRowTo; i++) {\r\n\t\t\t\tObject[] row = rows.get(i);\r\n\t\t\t\tObject[] subRow = new Object[iColsTU.length];\r\n\t\t\t\tfor (int j = 0; j < iColsTU.length; j++) {\r\n\t\t\t\t\tsubRow[j] = row[iColsTU[j]];\r\n\t\t\t\t}\r\n\t\t\t\trtn.add(subRow);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn rtn;\r\n\t}", "private static void changeFirstRowAndColumn(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++) {\n if(matrix[i][j]==0){\n matrix[i][0]=0;\n matrix[0][j]=0;\n }\n }\n }\n }", "public Matrix subtract(Matrix b, BigInteger modulo) {\n Matrix a = this;\n if (a.getColumns() != b.getColumns() ||\n a.getRows() != b.getRows()) {\n throw new MalformedMatrixException(\"Matrix with dimensions \" + nrOfRows + \"x\" + nrOfCols +\n \" cannot be subtracted from matrix with dimensions \" + b.nrOfRows + \"x\" + b.nrOfCols);\n }\n\n BigInteger[][] res = new BigInteger[a.nrOfRows][a.nrOfCols];\n\n for (int row = 0; row < a.getRows(); row++) {\n for (int column = 0; column < a.getColumns(); column++) {\n BigInteger aVal = a.get(row, column);\n BigInteger bVal = b.get(row, column);\n res[row][column] = aVal.subtract(bVal).mod(modulo);\n }\n }\n\n return new Matrix(res);\n }", "public static Matrix minus(Matrix amat, Matrix bmat){\r\n \tif((amat.nrow!=bmat.nrow)||(amat.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=amat.nrow;\r\n \tint nc=amat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=amat.matrix[i][j] - bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "public T sub(T first, T second);", "public ASTNode simplify() {\n ASTNode mat=getChildConst(0);\n \n if(mat instanceof CompoundMatrix) {\n if(getChild(1).isConstant()) { // If the index is a constant, evaluate it. \n long idx=getChild(1).getValue();\n if(idx<1 || idx>=(mat.numChildren())) {\n return null; // out of bounds -- do not attempt to evaluate it. \n }\n else {\n ASTNode elem=mat.getChild( (int)idx ); // Index from 1. Index domain is in position 0.\n if(mat==getChild(0)) {\n elem.setParent(null);\n }\n return elem;\n }\n }\n \n Intpair a=getChild(1).getBounds();\n int numelements=mat.numChildren()-1;\n \n if(a.upper<numelements) {\n // Always safe to trim the right-hand end of the matrix\n ArrayList<ASTNode> newelements=list();\n if(mat==getChild(0)) {\n mat.detachChildren();\n }\n getChild(1).setParent(null);\n for(int i=1; i<=a.upper; i++) newelements.add(mat.getChild(i));\n return new ElementOne(CompoundMatrix.make(newelements), getChild(1));\n }\n \n // IF the index is not yet flattened, then trim both ends.\n if(getChild(1).toFlatten(false) && (a.lower>1 || a.upper<numelements)) {\n // Trim the ends of the compound matrix by the bounds of the index variable. \n // Does not deal with holes in the index domain. This would require a table constraint. \n // Potentially unflattens the index variable. dangerous. \n ArrayList<ASTNode> newelements=list();\n \n if(a.lower<1) a.lower=1;\n if(a.upper>numelements) a.upper=numelements;\n if(mat==getChild(0)) {\n mat.detachChildren();\n }\n getChild(1).setParent(null);\n for(long i=a.lower; i<=a.upper; i++) newelements.add(mat.getChild((int)i));\n return new ElementOne(CompoundMatrix.make(newelements), BinOp.makeBinOp(\"-\", getChild(1), NumberConstant.make(a.lower-1)));\n }\n\t }\n\t \n\t return null;\n\t}", "public static SquareMatrix traspose(SquareMatrix matrix) {\n for (int row = 0; row < matrix.numberOfRows(); row++) {\n for (int col = row; col < matrix.numberOfCols(); col++) {\n double value = matrix.get(row, col);\n matrix.set(row, col, matrix.get(col, row));\n matrix.set(col, row, value);\n }\n }\n return matrix;\n }", "public int[] subList(int fromIndex, int toIndex)\n\t{\t\n\t\tif (fromIndex > -1 && toIndex < arraySize && fromIndex < toIndex)\n\t\t{\n\t\t\tint[] newArray = new int[toIndex - fromIndex];\n\t\t\tfor (int index = fromIndex; index < toIndex; index++)\n\t\t\t{\n\t\t\t\tnewArray[index - fromIndex] = array[index];\n\t\t\t}\n\t\t\treturn newArray;\t\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\n\t}", "public static List<List<Integer>> findMatrix(List<List<Integer>> a) {\n List<List<Integer>> res = new ArrayList<>();\n for (int i = 0; i < a.size(); i++) {\n List<Integer> rowi = a.get(i);\n List<Integer> temp = new ArrayList<>();\n int prev = 0;\n for (int j = 0; j < rowi.size(); j++) {\n if (i == 0) {\n int curr = rowi.get(j);\n temp.add(prev + curr);\n prev += curr;\n } else {\n int curr = rowi.get(j);\n int lastSum = res.get(i - 1).get(j);\n temp.add(prev + curr + lastSum);\n prev += curr;\n }\n }\n res.add(temp);\n }\n return res;\n }", "public final void sub(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 static String[][] selectSubArray (int rowStart, int rowEnd, int colStart, \n\t\t\t\t\t\t\t\t\t\t\tint colEnd, String[][] dataArray) {\n\t\t\n\t\tint colIndex;\n\t\tint rowIndex;\n\t\t\n\t\tint newRows = (rowEnd - rowStart) +1;\n\t\tint newCols = (colEnd - colStart) +1;\n\t\t\n\t\tString[][] returnData = new String[newRows][newCols];\n\t\trowIndex = rowStart;\n\t\t\n\t\tfor (int i = 0; i < newRows ; i++) { \n\t\t\tcolIndex = colStart;\n\t\t\tfor (int j = 0; j < newCols; j++) {\n\t\t\t\treturnData[i][j] = dataArray[rowIndex][colIndex];\n\t\t\t\tcolIndex++;\n\t\t\t}\n\t\t\trowIndex++;\n\t\t}\n\t\treturn returnData;\n\t}", "private static int[][] rotateMartix(int[][] matrix) {\n for(int i=0;i<matrix.length;i++) {\n for(int j=i;j< matrix.length;j++) {\n int tmp=matrix[i][j];\n matrix[i][j]=matrix[j][i];\n matrix[j][i]=tmp;\n }\n }\n //swap columns\n for(int i=0;i<matrix.length;i++){\n int low = 0;\n int high = matrix.length-1;\n\n while(low < high)\n {\n int temp = matrix[i][low];\n matrix[i][low] = matrix[i][high];\n matrix[i][high] = temp;\n\n low++;\n high--;\n }\n }\n return matrix;\n }", "private Bitmap createSubImageAt(int row, int col) {\n Bitmap subImage = Bitmap.createBitmap(originalImage, col * width, row * height, width, height);\n return subImage;\n }", "public SubsetTableImpl(Column[] col, int[] subset) {\n\t\tsuper(col);\n\t\tthis.subset = subset;\n\t}", "public static int[][] generateChildMatrix(int[][] parent_matrix, int column, int player){\n int[][] child_copy = new int[ROW][COLUMN];\n //deep copy\n for(int i=0;i<ROW;i++){\n for(int j=0;j<COLUMN;j++){\n child_copy[i][j]=parent_matrix[i][j];\n }\n }\n for(int i=3; i>=0; i--){\n if(child_copy[i][column]==0){\n child_copy[i][column]=player;\n break;\n }\n }\n return child_copy;\n }", "static double[] getArrayb(double[][] matrix) {\n double[][] res1 = transMatrix(matrix);\n double[] b = new double[res1[res1.length - 1].length];\n for (int i = 0; i < b.length; i++) {\n b[i] = res1[res1.length - 1][i];\n }\n // we get b that is array of right parts\n return b;\n }", "public int[][] extraMatriz(int a, int b, int[][] mat) {\r\n\t\tint arra[] = new int[9];\r\n\t\tint cont = 0;\r\n\t\tint i2 = (a/3)*3;\r\n\t\tint j2 = (b/3)*3;\r\n\t\tfor (int i = (a/3)*3; i < i2+3; i++) {\r\n\t\t\tfor (int j = (b/3)*3; j < j2+3; j++) {\r\n\t\t\t\tarra[cont] = mat[i][j];\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.arrayToMatriz(arra);\r\n\t}", "Matrix(Matrix first, Matrix second) {\n if (first.getColumns() == second.getRows()) {\n this.rows = first.getRows();\n this.columns = second.getColumns();\n matrix = new int[first.getRows()][second.getColumns()];\n for (int col = 0; col < this.getColumns(); col++) {\n int sum;\n int commonality = first.getColumns(); // number to handle summation loop\n for (int rw = 0; rw < this.getRows(); rw++) {\n sum = 0;\n // summation loop\n for (int x = 0; x < commonality; x++) {\n sum += first.getValue(rw, x) * second.getValue(x, col);\n }\n matrix[rw][col] = sum;\n }\n\n }\n } else {\n System.out.println(\"Matrices cannot be multiplied\");\n }\n }", "public Matrix minus(Matrix B) {\n Matrix A = this;\n if (B.rowCount != A.rowCount || B.columnCount != A.columnCount) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(rowCount, columnCount);\n for (int i = 0; i < rowCount; i++)\n for (int j = 0; j < columnCount; j++)\n C.data[i][j] = A.data[i][j] - B.data[i][j];\n return C;\n }", "public T cols( int begin, int end ) {\n return extractMatrix(0, SimpleMatrix.END, begin, end);\n }", "public Matrix ref() {\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn m;\n\t}", "public int[][] subSum(int[] list){\n\tint n=list.length;\n\tS=new int[n][n];\n\t//initialize S from list values\n\tfor (int i = 0; i < n; i++) {\n\t\tS[i][i]=list[i];\n\t}\n\t//calculate the values by bottom up fashion\n\tfor (int k = 1; k < n; k++) {\n\t\tint i=0;\n\t\tint j=i+k;\n\t\twhile(j<n && i<j){\n\t\t if(i!=j)\n\t\t\tS[i][j]=S[i][i]+S[i+1][j];\n\t\t i=i+1;\n\t\t j=i+k;\n\t\t}\n\t}\n\treturn S;\n}", "public Matrix getValue();", "public Sequence subSequencePos(int ipos02, int ipos12) {\n return new SubSequence(this.base, ipos02, ipos12);\n }", "public Matrix minus(Matrix B) throws JPARSECException {\n checkMatrixDimensions(B);\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = data[i][j] - B.data[i][j];\n }\n }\n return X;\n }", "public Matrix minus(Matrix B) {\n Matrix A = this;\n if (B.M != A.M || B.N != A.N) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(M, N);\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n C.data[i][j] = A.data[i][j] - B.data[i][j];\n return C;\n }", "@Override\n\tpublic List<T> getRow(MatrixCoordinate coordIn) {\n\t\treturn this.getRow(coordIn.getY());\n\t}", "public int get(int x, int y){\n return matriz[x][y];\n }", "public List<T> subList(int arg0, int arg1) {\n\t\treturn null;\n\t}", "private static List<Integer> getRow(int rowIndex, int[][] m) {\r\n int[] rowArray = m[rowIndex];\r\n List<Integer> row = new ArrayList<Integer>(rowArray.length);\r\n for (int i : rowArray)\r\n row.add(i);\r\n\r\n return row;\r\n }", "public Object[] subList(int c){\n return Arrays.copyOf(data, c);\n }", "public int permutationMatrixS(int row, int column, int[][] matrixPermutation){\n\t\treturn matrixPermutation[row][column];\n\t}", "public BigInteger get(int row, int column) {\n return inner[row][column];\n }", "public Matrix copy() {\n Matrix m = new Matrix(rows, cols);\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n m.getMatrix().get(i)[j] = this.get(i, j);\n }\n }\n return m;\n }", "Matrix copy() {\n Matrix newMatrix = new Matrix(matrixSize);\n for (int i = 0; i < matrixSize; i++) {\n if (!rows[i].isEmpty()) {\n rows[i].moveFront();\n while (rows[i].index() != -1) {\n Entry entry = (Entry)rows[i].get();\n newMatrix.changeEntry(i + 1, entry.column, entry.value);\n rows[i].moveNext();\n }\n }\n }\n return newMatrix;\n }", "@Override\n\tpublic List<T> subList(int fromIndex, int toIndex) {\n\t\treturn null;\n\t}", "public boolean searchMatrix(int[][] matrix, int target) {\n if (matrix.length == 0) return false;\r\n int m = matrix.length, n = matrix[0].length;\r\n int start = 0, end = m * n - 1;\r\n while (start <= end) {\r\n //changing the 2d array to 1d array\r\n int mid = start + (end - start) / 2;\r\n int mid_value = matrix[mid / n][mid % n];\r\n if (target == mid_value) {\r\n return true;\r\n } else if (target < mid_value) {\r\n end = mid - 1;\r\n } else {\r\n start = mid + 1;\r\n }\r\n }\r\n return false;\r\n }" ]
[ "0.76336527", "0.71039015", "0.69470596", "0.69081587", "0.67972", "0.66538864", "0.6596696", "0.65366066", "0.63563925", "0.60814726", "0.60149586", "0.5973375", "0.5906027", "0.5851322", "0.5765299", "0.5623648", "0.5571631", "0.55357546", "0.5418787", "0.5284013", "0.5177089", "0.51660204", "0.5164085", "0.5108537", "0.50939965", "0.5062054", "0.50524855", "0.5051827", "0.50412077", "0.50355184", "0.50322056", "0.50221086", "0.5022083", "0.50211275", "0.4996576", "0.49947786", "0.49857304", "0.49824053", "0.4959396", "0.49559653", "0.49229002", "0.49225414", "0.49071842", "0.4870911", "0.48464024", "0.48448357", "0.48406738", "0.48354435", "0.48299927", "0.4823644", "0.48234284", "0.48153338", "0.48055664", "0.4797513", "0.47873217", "0.47670352", "0.47602773", "0.47252628", "0.47156504", "0.47060516", "0.46969596", "0.4693361", "0.46845067", "0.46716192", "0.466275", "0.4647632", "0.46343195", "0.46316862", "0.46302947", "0.46270916", "0.46108714", "0.46056584", "0.46037373", "0.45945966", "0.45942277", "0.45544383", "0.45487687", "0.45465517", "0.45335734", "0.45324722", "0.45286152", "0.45233098", "0.45227665", "0.45072937", "0.45016262", "0.44912562", "0.44869888", "0.44788325", "0.44750693", "0.4460462", "0.4458728", "0.44400063", "0.44380534", "0.44343823", "0.44312933", "0.4428603", "0.44253063", "0.44213948", "0.4418764", "0.44163695" ]
0.6612485
6
Return the sum of a part of the ith row.
public static int partOfRowSum(int[][] a, int rowIndex, int startCol, int endCol) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i == rowIndex && j >= startCol && j <= endCol) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumRow(Label l){\n\t\tint sum = 0;\n\n\t\tint rowIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(rowIx).get(i);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "public static int sumRow( int r, int[][] a )\n {\n int sum = 0; //initialize sum\n for (int i = 0; i < a[r].length; i++) { //for the width of an array...\n\t sum += a[r][i]; //add the point to the sum\n }\n return sum; //return sum, an int\n }", "public static int sumRow1( int r, int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t//initialize variable to store sum of a row\n\n\t for ( int i = 0; i < a[r].length; i++) {\t//loop through the specific \"row\" (array) given\n\n\t\t\tsum += a[r][i];\t\t\t\t\t\t//add each value to our sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t//return the sum variable\n }", "public static int sumRow2(int r, int[][] m)\n {\n int sum = 0; //initialize sum\n for ( int i : m[r]) { //for each value of a certain row of m...\n\t sum += m[r][i]; //set sum as the addition of the previous sum and\n\t //the point in question\n }\n return sum; //return the sum\n }", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public static int sumRow2(int r, int[][] m)\t//same concept as above but with FOREACH loop\n {\n\t int sum = 0;\n\n\t for ( int i : m[r]) {\n\n\t\t sum += i;\n\n\t }\n\n\t return sum;\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "private int getRow() {\n return binaryPartition(row);\n }", "public static int rowSum(int[][] a, int rowIndex) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == rowIndex) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "public static int partOfColSum(int[][] a, int colIndex, int startRow,\r\n\t\t\tint endRow) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (j == colIndex && i >= startRow && i <= endRow) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "protected int sumColumn(Label l){\n\t\tint sum = 0;\n\n\t\tint colIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(i).get(colIx);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "public int sumRegion(int row1, int col1, int row2, int col2) {\n int ret = 0;\n\n for (int j = row1; j <= row2; j++){\n if (col1 == 0) \n ret += rowSums[j][col2];\n else \n ret += rowSums[j][col2] - rowSums[j][col1 - 1];\n }\n\n return ret;\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "public int sum()\n {\n return sum(0,0,size);\n }", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "double getSum();", "double getSum();", "public static int sum(int[] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tsum += a[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public double elementSum() {\n return ops.elementSum(mat);\n }", "@Override\r\n protected BigDecimal getSum() {\r\n boolean handleOutOfMemoryError = false;\r\n BigDecimal sum = BigDecimal.ZERO;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n sum = sum.add(new BigDecimal(value));\r\n }\r\n }\r\n }\r\n }\r\n return sum;\r\n }", "int atRow();", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "private static int getBoardSum(Game2048Board board) {\n int boardSum = 0;\n for (Game2048Tile tile : board.getItems()) {\n boardSum += Math.pow(tile.getValue().VAL, SCORE_SUM_POWER);\n }\n return boardSum;\n }", "public static int subMatrixSum(int[][] a, int startCol, int endCol,\r\n\t\t\tint startRow, int endRow) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i >= startRow && i <= endRow && j >= startCol\r\n\t\t\t\t\t\t&& j <= endCol) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int getSum(int index) {\n if (index >= TABLE_MIN && index <= TABLE_MAX)\n return timesTables[table][index];\n else {\n System.out.println(table + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n \n }", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "static long subArraySum(int[] data) {\n\n long result = 0;\n\n // computing sum of sub array using formula\n int n = data.length;\n for (int i = 0; i < n; i++) {\n // x * (x at first index) + (x at other indices)\n result += (data[i] * (i * (n - i) + (n - i)));\n//\t\t\tresult += (data[i] * (i + 1) * (n - i));\n }\n\n // return all sub array sum\n return result;\n }", "int getRow();", "public int row();", "public static int offset_sum_e() {\n return (104 / 8);\n }", "@Override\n\tpublic int sum() {\n\t\treturn this.first + this.second + this.third;\n\t}", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "private double getColmunSum(TableColumn<Component, String> column) {\r\n double sum = 0;\r\n for (Component component : components) {\r\n sum += Double.parseDouble(column.getCellData(component).replace(',', '.'));\r\n }\r\n return sum;\r\n }", "public int get_sum_e() {\n return (int)getSIntBEElement(offsetBits_sum_e(), 32);\n }", "@Override\n\tprotected void computeSum(double[] c, int nRows) {\n\t\tsuper.computeSum(c, nRows);\n\t\t// and add all sum of reference multiplied with nrows.\n\t\tfinal double refSum = FORUtil.refSum(_reference);\n\t\tc[0] += refSum * nRows;\n\t}", "public int sum(int[] bit, int index) {\n index = index + 1;\n int sum = 0;\n while (index > 0) {\n sum += bit[index];\n index = getParent(index);\n }\n return sum;\n }", "public int get_sum_a() {\n return (int)getSIntBEElement(offsetBits_sum_a(), 32);\n }", "public int CalculateValue(int row, int index){\n int diagonal = row - index;\n\n //All arrays start at 0, so you need to add one to get the value at that index\n int offSet = 1;\n\n /*\n * The diagonal tells us how much we have to multiply the index by to get the value of our number.\n * (since the diagonals have a pattern of (* 0 + 1), (* 1 + 1), (* 2 + 1), etc.)\n * We then add one to offset starting from 0.\n */\n\n int val = diagonal * index + offSet;\n return val;\n }", "@Override\n\tpublic IDoubleVector sumRows() {\n\t\treturn null;\n\t}", "public int sum() {\n\t\treturn (x + y);\n\t}", "public static int offset_sum_a() {\n return (72 / 8);\n }", "public static int getRowTotal(int[][] numbers, int a) {\n int total = 0;\n for (int i = 0; i < numbers[a].length; i++) {\n total += numbers[a][i];\n }\n return total;\n }", "public int getSum(int table, int index) {\n if (table >= TABLE_MIN && table <= TABLE_MAX) {\n if (index >= TABLE_MIN && index <= TABLE_MAX) {\n return timesTables[table][index];\n }\n else {\n System.out.println(index + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n }\n else {\n System.out.println(table + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n }", "private int cell(int j) \r\n\t{\n\t\tint i=1,sum=0;\r\n\t\tfor(i=1;i<=j;i++)\r\n\t\t{\r\n\t\t\tsum=sum+i;\r\n\t\t\t}\r\n\t\treturn sum;\r\n\t}", "public static void SumRowsColumns(int[][] array) {\n\n }", "int getRowsAmount();", "int totalRows(){\n return row;\n }", "private int getSumH(int[][] a, int jh) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[jh][j];\n }\n return sum;\n }", "public int getSum() {\n\t\t\treturn 0;\r\n\t\t}", "public long getSum()\n {\n long sum = 0;\n\n for(int i = 0; i < integerList.length; i++)\n {\n sum = sum + integerList[i];\n }\n\n return sum;\n }", "public double getSumXX() { \n\t\treturn sumX1X1; \n\t}", "public int minPathSum(int[][] grid) {\n\t\treturn getMinPathSum(grid, grid.length - 1, grid[0].length - 1);\n\t}", "public int getValue(int row, int column);", "public static double[] lineSum(double[][] t)\n\t{\n\t int nLines=t.length; // longeur de la ligne\n\t\tdouble[] result=new double[nLines];\n\t\tfor (int i=0; i<nLines; i++)\n\t\t{\n\t\t\tresult[i]=0.;\n\t\t\tfor (int j=0;j<t[i].length;j++)\n\t\t\t\tresult[i]+=t[i][j];\n\t\t}\n\t\treturn result;\n }", "public int minPathSum(int[][] grid) {\n if (grid==null || grid.length==0)\n return 0;\n int m = grid.length;\n int n = grid[0].length;\n for (int i=0; i<m; i++) {\n for (int j=0; j<n; j++) {\n if (i==0 && j==0)\n continue;\n int up = i > 0 ? grid[i-1][j] : Integer.MAX_VALUE;\n int left = j > 0 ? grid[i][j-1] : Integer.MAX_VALUE;\n grid[i][j] += (left > up ? up : left);\n }\n }\n return grid[m-1][n-1];\n }", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "public double sum() {\n double sum = x;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n sum += iter.next.x;\n iter = iter.next;\n }\n return sum;\n }", "public List<Integer> getRow(int rowIndex) {\n List<Integer> res = new ArrayList<>(rowIndex + 1);\n for (int i = 0; i <= rowIndex; i++) {\n int size = res.size();\n for (int j = 0; j < size - 1; j++) {\n //res.get(j) += res.get(j + 1); -->WRONG\n res.set(j, res.get(j) + res.get(j + 1));\n }\n res.add(0, 1);\n }\n return res;\n }", "private void getSum() {\n double sum = 0;\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n sum = sum + parseDouble(remindersTable.getValueAt(i, 3).toString());\n }\n String rounded = String.format(\"%.2f\", sum);\n ledgerTxtField.setText(rounded);\n }", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "private void getSum() {\n\t\tint sum =0;\r\n\t\t\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i] != null)\r\n\t\t\t\tsum += products[i].getPrice();\r\n\t\t}\r\n\t\tSystem.out.println(sum);\r\n\t}", "public int getRowNo() {\n return rowIndex+1;\n }", "public Integer getSum() {\n return sum;\n }", "public int minPathSum(int[][] grid) {\n\t\tint m = grid.length;\n\t\tint n = grid[0].length;\n\t\tif (n < m) {\n\t\t\tint[] dp = new int[n];\n\t\t\tdp[n-1] = grid[m-1][n-1];\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[m-1][i] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tfor(int j = n-1; j >= 0; j--) {\n\t\t\t\t\tif(j == n-1) {\n\t\t\t\t\t\tdp[j] += grid[i][j];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[i][j] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t} else {\n\t\t\tint[] dp = new int[m];\n\t\t\tdp[m-1] = grid[m-1][n-1];\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[i][n-1] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tfor(int j = m-1; j >= 0; j--) {\n\t\t\t\t\tif(j == m-1) {\n\t\t\t\t\t\tdp[j] += grid[j][i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[j][i] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t}\n\t}", "public int getRow(){\r\n // return statement\r\n return row;\r\n }", "public long getBlockSum1(int ua, int va, int ub, int vb) {\t// TODO: allow coordinates outside image boundaries\n\t\tif (ub < ua || vb < va) {\n\t\t\treturn 0;\n\t\t}\n\t\tfinal long saa = (ua > 0 && va > 0) ? S1[ua - 1][va - 1] : 0;\n\t\tfinal long sba = (ub >= 0 && va > 0) ? S1[ub][va - 1] : 0;\n\t\tfinal long sab = (ua > 0 && vb >= 0) ? S1[ua - 1][vb] : 0;\n\t\tfinal long sbb = (ub >= 0 && vb >= 0) ? S1[ub][vb] : 0;\n\t\treturn sbb + saa - sba - sab;\n\t}", "public int[] getRowSums() {\n\t\treturn this.rowSums;\n\t}", "long getRsum(int n, int i, int k){\r\n return n-i>=k ? (n-i-k)+ssum(k-1): ssum(k-1) - ssum(k-n+i);\r\n }", "public double totalQuantity() {\r\n\t\tdouble t = 0;\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) t += quantity[i][j][k];\r\n\t\treturn t;\r\n\t}", "public static int diagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public String getSum();", "public int minPathSum(int[][] grid) {\n\t\treturn 0;\r\n }", "public static int minPathSum(int[][] grid) {\n if (grid == null || grid.length == 0 || grid[0].length == 0)\n return 0;\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (i == 0 && j == 0) {\n } else if (i == 0 && j > 0)\n grid[i][j] += grid[i][j-1];\n else if (j == 0 && i > 0)\n grid[i][j] += grid[i-1][j];\n else \n grid[i][j] += Math.min(grid[i][j-1], grid[i-1][j]);\n }\n }\n return grid[grid.length-1][grid[0].length-1];\n }", "public int getRow() { return _row; }", "int calculate() {\n return getSum() + b1;\n }", "public double get(){\n sum = 0;\n if(hasFilled){\n for(int j=0; j<list.length; j++)\n {\n sum += list[j];\n }\n \n return sum/(double)list.length;\n }\n else{\n for(int j = 0; j < index;j++){\n sum += list[j];\n }\n return sum/(double)index;\n }\n }", "public int getRow() {\r\n\t\treturn slot / 9;\r\n\t}", "public int sumInnerSquare(int r1, int r2, int c1, int c2)\n\t\t{\t\n\t\t\tint totalSum = 0;\n\t\t\tint sumFromZeroZero = sumZeroZeroToX[r2][c2];\n\t\t\tint left = 0;\n\t\t\tint top = 0;\n\t\t\tint intersection = 0;\n\t\t\t\n\t\t\tif(r1 == 0 && c1 == 0)\n\t\t\t\treturn sumFromZeroZero;\n\t\t\t\n\t\t\tif(r1 > 0)\n\t\t\t\ttop = sumZeroZeroToX[r1-1][c2];\n\t\t\t\n\t\t\tif(c1 > 0)\n\t\t\t\tleft = sumZeroZeroToX[r2][c1-1];\n\t\t\t\n\t\t\tif(c1 > 0 && r1 > 0)\n\t\t\t\tintersection = sumZeroZeroToX[r1-1][c1-1];\n\n\t\t\treturn sumFromZeroZero - top - left + intersection;\n\t\t\t\n\t\t}", "public int sumofPrice(){\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString selectQuery = \"SELECT SUM(price) FROM \" + TABLE_SHOP;\n\t\tCursor cur = db.rawQuery(selectQuery, null);\n\t\tint total=0;\n\t\tif(cur.moveToFirst())\n\t\t{\n\t\t\ttotal = cur.getInt(0);\n\t\t}\n\t\treturn total;\n\t}", "public double getSUM() {\n return sum;\n }", "static int row(String sq) {\n String s = sq.substring(1,2);\n return 9 - Integer.parseInt(s);\n }", "public int getRow()\r\n {\r\n return row;\r\n }", "public int utility(Board board) {\n \tint sum = getResult(board.getScore(), board.getListOfPosition().size(), score(board));\n \tint [][]b = board.board;\n \tfor (int i = 0; i < b.length; i++) {\n \t\tfor (int j = 0; j < b[0].length; j++) {\n \t\t\tsum += weight[i * b.length + j] * b[i][j];\n \t\t}\n \t}\n \treturn sum;\n }", "@Override\n\tpublic int getTotalRow(String where) {\n\t\treturn 0;\n\t}", "public int totalGemValue() {\r\n\t\ttotal = 0;\r\n\t\ttotal += gemPile[0];\r\n\t\ttotal += gemPile[1] * 2;\r\n\t\ttotal += gemPile[2] * 3;\r\n\t\ttotal += gemPile[3] * 4;\r\n\t\treturn total;\r\n\t}", "private static int sum(int[] coins,int coinsCount,int startIndex){\n int sum = 0;\n for(int c1=startIndex;c1<startIndex+coinsCount;c1++){\n sum += coins[c1];\n }\n return sum;\n }", "private String getSumString(int[][] input)\n {\n int sum = 0;\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sum += input[i][j];\n }\n }\n return Integer.toString(sum);\n }", "public List <Integer> getRow (int rowIndex) {\n List <Integer> result = new ArrayList <> ();\n if (rowIndex == 1) {\n return Arrays.asList (1);\n }\n List <Integer> bList = getRow (rowIndex - 1);\n result.add (1);\n for (int i = 0; i < bList.size () - 1; i++) {\n result.add (bList.get (i) + bList.get (i + 1));\n }\n result.add (1);\n return result;\n }", "public void exercise_4_31()\n {\n int index = 0;\n int sum = 0;\n \n while (index < 10) {\n index++;\n sum += index;\n }\n System.out.println(sum);\n }", "public static int colSum(int[][] a, int colIndex) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (j == colIndex) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}" ]
[ "0.6810499", "0.66548866", "0.6557228", "0.6469255", "0.62878215", "0.62394184", "0.6230721", "0.6170279", "0.61288893", "0.61057526", "0.6059428", "0.60410446", "0.60366327", "0.59762526", "0.5929108", "0.5911136", "0.5903547", "0.5878749", "0.58677536", "0.5838924", "0.5797209", "0.5797125", "0.5776945", "0.5772952", "0.5772952", "0.57669073", "0.57331383", "0.5726607", "0.56818223", "0.56807005", "0.56753933", "0.5666623", "0.56402963", "0.5623228", "0.5618293", "0.56134176", "0.56074697", "0.5596087", "0.55860543", "0.55839276", "0.55549526", "0.5554355", "0.55492675", "0.5495192", "0.54870695", "0.54838955", "0.5481577", "0.5475991", "0.5474914", "0.54363143", "0.54297274", "0.5428019", "0.53862226", "0.5371003", "0.5369944", "0.5355915", "0.535036", "0.5340127", "0.53246856", "0.53093827", "0.5280868", "0.5271765", "0.52672696", "0.5259306", "0.5258412", "0.52553636", "0.5255104", "0.52549064", "0.5242467", "0.5241215", "0.5238343", "0.5236695", "0.5228525", "0.5215868", "0.5213837", "0.52098715", "0.52097857", "0.52052915", "0.5205106", "0.519757", "0.51935446", "0.51793265", "0.5176432", "0.5162634", "0.5162298", "0.5151637", "0.5149192", "0.5148488", "0.51378685", "0.513518", "0.5121633", "0.51184773", "0.51144916", "0.5103236", "0.5086924", "0.50832796", "0.5078831", "0.50732255", "0.5072726", "0.5061509" ]
0.67776203
1
Return sum of the ith column.
public static int colSum(int[][] a, int colIndex) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (j == colIndex) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumColumn(Label l){\n\t\tint sum = 0;\n\n\t\tint colIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(i).get(colIx);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "private double getColmunSum(TableColumn<Component, String> column) {\r\n double sum = 0;\r\n for (Component component : components) {\r\n sum += Double.parseDouble(column.getCellData(component).replace(',', '.'));\r\n }\r\n return sum;\r\n }", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "public static double sumColumn(double[][] m, int columnIndex) {\n\t\t\n\t\tdouble sum = 0;\n\t\t\n\t\tfor (int i=0; i < m.length; i++) {\n\t\t\tsum += m[i][columnIndex]; \n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "protected int sumRow(Label l){\n\t\tint sum = 0;\n\n\t\tint rowIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(rowIx).get(i);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "public static int getColumnTotal(int[][] numbers, int a) {\n int total = 0;\n for (int i = 0; i < numbers.length; i++) {\n total += numbers[i][0];\n }\n return total;\n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "@Override\n\tpublic IDoubleVector sumColumns() {\n\t\treturn null;\n\t}", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "public int sum()\n {\n return sum(0,0,size);\n }", "int totalColumns(){\n return column;\n }", "public static int sumRow2(int r, int[][] m)\t//same concept as above but with FOREACH loop\n {\n\t int sum = 0;\n\n\t for ( int i : m[r]) {\n\n\t\t sum += i;\n\n\t }\n\n\t return sum;\n }", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "public static double[] sumEachColumn(double[][] a) {\n \n double[] out = new double[a[0].length];\n for (int r = 0; r < a.length; ++r) {\n for (int c = 0; c < a[r].length; ++c) {\n out[c] += a[r][c];\n }\n }\n \n return out;\n }", "public static int sumRow2(int r, int[][] m)\n {\n int sum = 0; //initialize sum\n for ( int i : m[r]) { //for each value of a certain row of m...\n\t sum += m[r][i]; //set sum as the addition of the previous sum and\n\t //the point in question\n }\n return sum; //return the sum\n }", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "public String sumatoria(int columna) {\r\n\t\ttry {\r\n\t\t\tdouble total = 0;\r\n\t\t\tDouble cAux = new Double(total);\r\n\t\t\tString totalChar = \"\";\r\n\t\t\tString valchar = \"\";\r\n\t\t\tfor (int i = 1; i <= this.elemVS.size(); i++) {\r\n\t\t\t\tvalchar = (getObject(i, columna)).toString();\r\n\t\t\t\ttotal = total + (Double.valueOf(valchar)).doubleValue();\r\n\t\t\t}\r\n\t\t\ttotalChar = Double.toString(total);\r\n\t\t\treturn totalChar;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\treturn \"&nbsp;\";\r\n\t\t}\r\n\t}", "public static int sumRow1( int r, int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t//initialize variable to store sum of a row\n\n\t for ( int i = 0; i < a[r].length; i++) {\t//loop through the specific \"row\" (array) given\n\n\t\t\tsum += a[r][i];\t\t\t\t\t\t//add each value to our sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t//return the sum variable\n }", "@Override\r\n protected BigDecimal getSum() {\r\n boolean handleOutOfMemoryError = false;\r\n BigDecimal sum = BigDecimal.ZERO;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n sum = sum.add(new BigDecimal(value));\r\n }\r\n }\r\n }\r\n }\r\n return sum;\r\n }", "public static int sumRow( int r, int[][] a )\n {\n int sum = 0; //initialize sum\n for (int i = 0; i < a[r].length; i++) { //for the width of an array...\n\t sum += a[r][i]; //add the point to the sum\n }\n return sum; //return sum, an int\n }", "public int sum() {\n\t\treturn (x + y);\n\t}", "public int get_sum_e() {\n return (int)getSIntBEElement(offsetBits_sum_e(), 32);\n }", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "public int getSumOfCol(String l[], int n) {\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < l.length; i++) {\n\t\t\ttry {\n\t\t\t\tsum += Character.getNumericValue(l[i].charAt((l[i].length()-1)-n));\n\t\t\t}\n\t\t\tcatch(StringIndexOutOfBoundsException e) {\n\t\t\t\tsum += 0;\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "double getSum();", "double getSum();", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "public int getSum() {\n\t\t\treturn 0;\r\n\t\t}", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "public static int partOfColSum(int[][] a, int colIndex, int startRow,\r\n\t\t\tint endRow) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (j == colIndex && i >= startRow && i <= endRow) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "public double getSumXX() { \n\t\treturn sumX1X1; \n\t}", "public String sumatoria(String columna) {\r\n\t\ttry {\r\n\t\t\tdouble total = 0;\r\n\t\t\tDouble cAux = new Double(total);\r\n\t\t\tString totalChar = \"\";\r\n\t\t\tString valchar = \"\";\r\n\t\t\tfor (int i = 1; i <= this.elemVS.size(); i++) {\r\n\t\t\t\tvalchar = (getObject(i, columna)).toString();\r\n\t\t\t\ttotal = total + (Double.valueOf(valchar)).doubleValue();\r\n\t\t\t}\r\n\t\t\ttotalChar = Double.toString(total);\r\n\t\t\treturn totalChar;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\treturn \"&nbsp;\" + elemVS.size();\r\n\t\t}\r\n\t}", "@Override\n\tpublic int sum() {\n\t\treturn this.first + this.second + this.third;\n\t}", "int getColumn();", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "public int getValue(int row, int column);", "public int get_sum_a() {\n return (int)getSIntBEElement(offsetBits_sum_a(), 32);\n }", "public Integer getSum() {\n return sum;\n }", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "private static int getBoardSum(Game2048Board board) {\n int boardSum = 0;\n for (Game2048Tile tile : board.getItems()) {\n boardSum += Math.pow(tile.getValue().VAL, SCORE_SUM_POWER);\n }\n return boardSum;\n }", "public static int sum(int[] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tsum += a[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int getColumn();", "private int getColumn() {\n return binaryPartition(column);\n }", "public long getSum()\n {\n long sum = 0;\n\n for(int i = 0; i < integerList.length; i++)\n {\n sum = sum + integerList[i];\n }\n\n return sum;\n }", "public double sum()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += c;\r\n\r\n return sum;\r\n }", "public double getSUM() {\n return sum;\n }", "public int getColumn(){ return (Integer)args[1]; }", "static double sum(Map<Integer, Map<String, Object>> dict, String col){\n\t\tdouble sum = 0;\n\t\t\n\t\tfor(Integer key : dict.keySet()){\n\t\t\tsum += (double) dict.get(key).get(col);\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "private int cell(int j) \r\n\t{\n\t\tint i=1,sum=0;\r\n\t\tfor(i=1;i<=j;i++)\r\n\t\t{\r\n\t\t\tsum=sum+i;\r\n\t\t\t}\r\n\t\treturn sum;\r\n\t}", "public int getSum(int index) {\n if (index >= TABLE_MIN && index <= TABLE_MAX)\n return timesTables[table][index];\n else {\n System.out.println(table + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n \n }", "public int sumRegion(int row1, int col1, int row2, int col2) {\n int ret = 0;\n\n for (int j = row1; j <= row2; j++){\n if (col1 == 0) \n ret += rowSums[j][col2];\n else \n ret += rowSums[j][col2] - rowSums[j][col1 - 1];\n }\n\n return ret;\n }", "public int getNcol(){\r\n \treturn this.ncol;\r\n \t}", "private String getSumString(int[][] input)\n {\n int sum = 0;\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sum += input[i][j];\n }\n }\n return Integer.toString(sum);\n }", "public int getColumnAmount(BufferedReader br) {\n\n String rowStr;\n\n try {\n //Get into string\n rowStr = br.readLine();\n\n //Split into 1D array\n columns = rowStr.split(\"\\t\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Return number of elements -1 for id column\n return columns.length - 1;\n }", "public static int partOfRowSum(int[][] a, int rowIndex, int startCol,\r\n\t\t\tint endCol) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == rowIndex && j >= startCol && j <= endCol) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public String getSum();", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "int atColumn();", "public int getColumn() {\n return col;\n }", "Integer calculate(String columnValue);", "public java.math.BigDecimal getSum() {\n\treturn sum;\n}", "public int cumulativeSum() {\n int sum = 0;\n EquationList p_eqn = eqn;\n while (p_eqn != null) {\n sum = sum + p_eqn.result;\n p_eqn = p_eqn.next;\n }\n if (p_eqn == null) {\n sum = sum;\n }\n return sum;\n }", "public int getColumn()\n\t{\n\t\treturn col;\n\t}", "public int getColumn()\t \t\t{ return column; \t}", "public double getTotal(){\n double total = 0;\n for(int i=0;i<array.length; i++){\n total += array[i].doubleValue();\n }\n return total;\n }", "public static int offset_sum_e() {\n return (104 / 8);\n }", "public int getCol(){\r\n\t\treturn this.column;\r\n\t}", "public int sumofPrice(){\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString selectQuery = \"SELECT SUM(price) FROM \" + TABLE_SHOP;\n\t\tCursor cur = db.rawQuery(selectQuery, null);\n\t\tint total=0;\n\t\tif(cur.moveToFirst())\n\t\t{\n\t\t\ttotal = cur.getInt(0);\n\t\t}\n\t\treturn total;\n\t}", "public int col() {\r\n\t\treturn col;\r\n\t}", "public int getColumn() {\r\n\t\treturn this.col;\r\n\t}", "public int col() {\r\n return col;\r\n }", "public static int diagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "int getCol();", "public int getColumn()\n {\n return column;\n }", "public double sum() {\n final int size = size();\n double sum = 0.0;\n\n // Compute the average of all values\n for (int i = 0; i < size; i++) {\n final Number number = get(i);\n if (number == null) continue;\n if (Double.isNaN(number.doubleValue())) continue;\n\n sum += number.doubleValue();\n }\n\n return sum;\n }", "public int getColumn()\n\t\t{\n\t\t\treturn m_col;\n\t\t}", "@Override\n\tpublic IDoubleVector sumRows() {\n\t\treturn null;\n\t}", "public double getSumXY() { \n\t\treturn sumX1Y; \n\t}", "public int getColumn() {\r\n return column;\r\n }", "public int getColumn() {\r\n return column;\r\n }", "static int columnLengthSum(String col, Map<Integer, Map<String, Object>> dict){\n\t\tint sum = 0;\n\t\t\n\t\tfor(Integer key : dict.keySet()){\n\t\t\tsum += ((String) dict.get(key).get(col)).length();\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public double sum() {\n double sum = x;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n sum += iter.next.x;\n iter = iter.next;\n }\n return sum;\n }", "public int getColumn()\r\n\t{\r\n\t\treturn this.column;\r\n\t}", "public int getColumn() {\r\n\t\treturn column;\r\n\t}", "public final int getColumn() {\n return column;\n }", "public int getInt(String columnName) {\n IntVector vector = (IntVector) table.getVector(columnName);\n return vector.get(rowNumber);\n }", "public int getColumn() {\n return column;\n }", "public int getColumn() {\n return column;\n }", "public int getColumn() {\n return column;\n }", "public CellCoord nextColumn() {\n return new CellCoord(column + 1, row);\n }" ]
[ "0.73205835", "0.6970171", "0.6845413", "0.6757714", "0.66673356", "0.66250056", "0.65157926", "0.6407247", "0.6402388", "0.6322012", "0.62382996", "0.6231529", "0.616363", "0.61414945", "0.61379886", "0.6113058", "0.60999316", "0.60950744", "0.6080422", "0.60762", "0.6054186", "0.6017927", "0.601581", "0.5990763", "0.5989048", "0.5976596", "0.5950335", "0.594297", "0.5941039", "0.59347886", "0.5931741", "0.59271365", "0.59271365", "0.5906059", "0.5905055", "0.58974785", "0.5895422", "0.5862689", "0.58601725", "0.5852092", "0.5849587", "0.5835111", "0.5830516", "0.58253586", "0.5794526", "0.57768404", "0.5757134", "0.57515556", "0.5741235", "0.5689249", "0.56888425", "0.5631312", "0.562689", "0.56131333", "0.56119907", "0.5609697", "0.56060034", "0.5584372", "0.55790937", "0.55744445", "0.5566317", "0.5524315", "0.5489289", "0.5486702", "0.5473163", "0.5471787", "0.5469769", "0.54593635", "0.54578406", "0.5449233", "0.5447463", "0.54457223", "0.54373085", "0.54289013", "0.5428625", "0.5426829", "0.5425984", "0.54219717", "0.54137635", "0.54113287", "0.5410759", "0.5408149", "0.5393547", "0.53930575", "0.5389378", "0.5379507", "0.5377952", "0.5376258", "0.5374453", "0.5374453", "0.5373223", "0.5372956", "0.5358837", "0.5357628", "0.53495574", "0.5349418", "0.53493536", "0.53493536", "0.53493536", "0.5349242" ]
0.63426274
9
Return sum of part of the ith column.
public static int partOfColSum(int[][] a, int colIndex, int startRow, int endRow) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (j == colIndex && i >= startRow && i <= endRow) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double getColmunSum(TableColumn<Component, String> column) {\r\n double sum = 0;\r\n for (Component component : components) {\r\n sum += Double.parseDouble(column.getCellData(component).replace(',', '.'));\r\n }\r\n return sum;\r\n }", "protected int sumColumn(Label l){\n\t\tint sum = 0;\n\n\t\tint colIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(i).get(colIx);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "protected int sumRow(Label l){\n\t\tint sum = 0;\n\n\t\tint rowIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(rowIx).get(i);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "public static double sumColumn(double[][] m, int columnIndex) {\n\t\t\n\t\tdouble sum = 0;\n\t\t\n\t\tfor (int i=0; i < m.length; i++) {\n\t\t\tsum += m[i][columnIndex]; \n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static int getColumnTotal(int[][] numbers, int a) {\n int total = 0;\n for (int i = 0; i < numbers.length; i++) {\n total += numbers[i][0];\n }\n return total;\n }", "public int getSumOfCol(String l[], int n) {\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < l.length; i++) {\n\t\t\ttry {\n\t\t\t\tsum += Character.getNumericValue(l[i].charAt((l[i].length()-1)-n));\n\t\t\t}\n\t\t\tcatch(StringIndexOutOfBoundsException e) {\n\t\t\t\tsum += 0;\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "@Override\r\n protected BigDecimal getSum() {\r\n boolean handleOutOfMemoryError = false;\r\n BigDecimal sum = BigDecimal.ZERO;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n sum = sum.add(new BigDecimal(value));\r\n }\r\n }\r\n }\r\n }\r\n return sum;\r\n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public static int partOfRowSum(int[][] a, int rowIndex, int startCol,\r\n\t\t\tint endCol) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == rowIndex && j >= startCol && j <= endCol) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int colSum(int[][] a, int colIndex) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (j == colIndex) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "private int getColumn() {\n return binaryPartition(column);\n }", "public String sumatoria(int columna) {\r\n\t\ttry {\r\n\t\t\tdouble total = 0;\r\n\t\t\tDouble cAux = new Double(total);\r\n\t\t\tString totalChar = \"\";\r\n\t\t\tString valchar = \"\";\r\n\t\t\tfor (int i = 1; i <= this.elemVS.size(); i++) {\r\n\t\t\t\tvalchar = (getObject(i, columna)).toString();\r\n\t\t\t\ttotal = total + (Double.valueOf(valchar)).doubleValue();\r\n\t\t\t}\r\n\t\t\ttotalChar = Double.toString(total);\r\n\t\t\treturn totalChar;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\treturn \"&nbsp;\";\r\n\t\t}\r\n\t}", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public String sumatoria(String columna) {\r\n\t\ttry {\r\n\t\t\tdouble total = 0;\r\n\t\t\tDouble cAux = new Double(total);\r\n\t\t\tString totalChar = \"\";\r\n\t\t\tString valchar = \"\";\r\n\t\t\tfor (int i = 1; i <= this.elemVS.size(); i++) {\r\n\t\t\t\tvalchar = (getObject(i, columna)).toString();\r\n\t\t\t\ttotal = total + (Double.valueOf(valchar)).doubleValue();\r\n\t\t\t}\r\n\t\t\ttotalChar = Double.toString(total);\r\n\t\t\treturn totalChar;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\treturn \"&nbsp;\" + elemVS.size();\r\n\t\t}\r\n\t}", "public static int sumRow2(int r, int[][] m)\n {\n int sum = 0; //initialize sum\n for ( int i : m[r]) { //for each value of a certain row of m...\n\t sum += m[r][i]; //set sum as the addition of the previous sum and\n\t //the point in question\n }\n return sum; //return the sum\n }", "public int sumRegion(int row1, int col1, int row2, int col2) {\n int ret = 0;\n\n for (int j = row1; j <= row2; j++){\n if (col1 == 0) \n ret += rowSums[j][col2];\n else \n ret += rowSums[j][col2] - rowSums[j][col1 - 1];\n }\n\n return ret;\n }", "@Override\n\tpublic IDoubleVector sumColumns() {\n\t\treturn null;\n\t}", "public static int offset_sum_e() {\n return (104 / 8);\n }", "public double getSumXX() { \n\t\treturn sumX1X1; \n\t}", "public int get_sum_e() {\n return (int)getSIntBEElement(offsetBits_sum_e(), 32);\n }", "double getSum();", "double getSum();", "public static double[] sumEachColumn(double[][] a) {\n \n double[] out = new double[a[0].length];\n for (int r = 0; r < a.length; ++r) {\n for (int c = 0; c < a[r].length; ++c) {\n out[c] += a[r][c];\n }\n }\n \n return out;\n }", "int totalColumns(){\n return column;\n }", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "public static int sumRow2(int r, int[][] m)\t//same concept as above but with FOREACH loop\n {\n\t int sum = 0;\n\n\t for ( int i : m[r]) {\n\n\t\t sum += i;\n\n\t }\n\n\t return sum;\n }", "public static int sumRow( int r, int[][] a )\n {\n int sum = 0; //initialize sum\n for (int i = 0; i < a[r].length; i++) { //for the width of an array...\n\t sum += a[r][i]; //add the point to the sum\n }\n return sum; //return sum, an int\n }", "private static int getBoardSum(Game2048Board board) {\n int boardSum = 0;\n for (Game2048Tile tile : board.getItems()) {\n boardSum += Math.pow(tile.getValue().VAL, SCORE_SUM_POWER);\n }\n return boardSum;\n }", "public static int sumRow1( int r, int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t//initialize variable to store sum of a row\n\n\t for ( int i = 0; i < a[r].length; i++) {\t//loop through the specific \"row\" (array) given\n\n\t\t\tsum += a[r][i];\t\t\t\t\t\t//add each value to our sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t//return the sum variable\n }", "public int sum()\n {\n return sum(0,0,size);\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "int getColumn();", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "@Override\n\tpublic int sum() {\n\t\treturn this.first + this.second + this.third;\n\t}", "public int get_sum_a() {\n return (int)getSIntBEElement(offsetBits_sum_a(), 32);\n }", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "public int getSum() {\n\t\t\treturn 0;\r\n\t\t}", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "public int sum() {\n\t\treturn (x + y);\n\t}", "private int cell(int j) \r\n\t{\n\t\tint i=1,sum=0;\r\n\t\tfor(i=1;i<=j;i++)\r\n\t\t{\r\n\t\t\tsum=sum+i;\r\n\t\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int offset_sum_a() {\n return (72 / 8);\n }", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "public int getValue(int row, int column);", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "private String getSumString(int[][] input)\n {\n int sum = 0;\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sum += input[i][j];\n }\n }\n return Integer.toString(sum);\n }", "int atColumn();", "public String getSum();", "public int getSum(int index) {\n if (index >= TABLE_MIN && index <= TABLE_MAX)\n return timesTables[table][index];\n else {\n System.out.println(table + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n \n }", "Integer calculate(String columnValue);", "private int getGoalValueForBlock(int row, int column) {\n \tif (row == dimension() - 1 && column == dimension() - 1) {\n \t\treturn 0;\n \t\t\n \t} else {\n \t\treturn (row * dimension()) + column + 1;\n \t}\n }", "public int getColumn();", "public int getColumnAmount(BufferedReader br) {\n\n String rowStr;\n\n try {\n //Get into string\n rowStr = br.readLine();\n\n //Split into 1D array\n columns = rowStr.split(\"\\t\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Return number of elements -1 for id column\n return columns.length - 1;\n }", "static double sum(Map<Integer, Map<String, Object>> dict, String col){\n\t\tdouble sum = 0;\n\t\t\n\t\tfor(Integer key : dict.keySet()){\n\t\t\tsum += (double) dict.get(key).get(col);\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public double getSUM() {\n return sum;\n }", "public double getSumXY() { \n\t\treturn sumX1Y; \n\t}", "public Integer getSum() {\n return sum;\n }", "public int getColumn(){ return (Integer)args[1]; }", "static int columnLengthSum(String col, Map<Integer, Map<String, Object>> dict){\n\t\tint sum = 0;\n\t\t\n\t\tfor(Integer key : dict.keySet()){\n\t\t\tsum += ((String) dict.get(key).get(col)).length();\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static int subMatrixSum(int[][] a, int startCol, int endCol,\r\n\t\t\tint startRow, int endRow) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i >= startRow && i <= endRow && j >= startCol\r\n\t\t\t\t\t\t&& j <= endCol) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public void E11_6() {\n double[] row1 = {7.5, 3.6};\n double[] row2 = {4.2, 9.7};\n double[] row3 = {6.1, 8.0};\n double column1Sum = row1[0] + row2[0] + row3[0];\n double column2Sum = row1[1] + row2[1] + row3[1];\n System.out.println(\"Column 1 average: \" + (column1Sum/3));\n System.out.println(\"Column 2 average: \" + (column2Sum/3));\n }", "public java.math.BigDecimal getSum() {\n\treturn sum;\n}", "public static int sum(int[] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tsum += a[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int totalGemValue() {\r\n\t\ttotal = 0;\r\n\t\ttotal += gemPile[0];\r\n\t\ttotal += gemPile[1] * 2;\r\n\t\ttotal += gemPile[2] * 3;\r\n\t\ttotal += gemPile[3] * 4;\r\n\t\treturn total;\r\n\t}", "public int getPointColumn(int line, float x){\n if(x < 0){\n return 0;\n }\n if(line >= getLineCount()) {\n line = getLineCount() - 1;\n }\n float w = 0;\n int i = 0;\n prepareLine(line);\n while(w < x && i < mText.getColumnCount(line)){\n w += measureText(mChars, i, 1);\n i++;\n }\n if(w < x){\n i = mText.getColumnCount(line);\n }\n return i;\n }", "public int subColumnSize() {\n int i = 1;\n if (next != null) {\n Column next = this.next;\n for (; next != tail; next = next.next, i++);\n i++;\n }\n return i;\n }", "public CellCoord nextColumn() {\n return new CellCoord(column + 1, row);\n }", "public final int getColumn() {\n/* 368 */ return this.bufcolumn[this.bufpos];\n/* */ }", "public double getTotal(){\n double total = 0;\n for(int i=0;i<array.length; i++){\n total += array[i].doubleValue();\n }\n return total;\n }", "public static int diagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int minPathSum(int[][] grid) {\n\t\treturn getMinPathSum(grid, grid.length - 1, grid[0].length - 1);\n\t}", "private int getSumH(int[][] a, int jh) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[jh][j];\n }\n return sum;\n }", "public int calculateGridCellColumn(int x)\n {\n float leftEdge = miniGame.getBoundaryLeft();\n x = (int)(x - leftEdge);\n return x / TILE_IMAGE_WIDTH;\n }", "public int minPathSum(int[][] grid) {\n if (grid==null || grid.length==0)\n return 0;\n int m = grid.length;\n int n = grid[0].length;\n for (int i=0; i<m; i++) {\n for (int j=0; j<n; j++) {\n if (i==0 && j==0)\n continue;\n int up = i > 0 ? grid[i-1][j] : Integer.MAX_VALUE;\n int left = j > 0 ? grid[i][j-1] : Integer.MAX_VALUE;\n grid[i][j] += (left > up ? up : left);\n }\n }\n return grid[m-1][n-1];\n }", "public int sumofPrice(){\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString selectQuery = \"SELECT SUM(price) FROM \" + TABLE_SHOP;\n\t\tCursor cur = db.rawQuery(selectQuery, null);\n\t\tint total=0;\n\t\tif(cur.moveToFirst())\n\t\t{\n\t\t\ttotal = cur.getInt(0);\n\t\t}\n\t\treturn total;\n\t}", "public int getColumn()\t \t\t{ return column; \t}", "public int getColumn() {\r\n\t\treturn slot % 9;\r\n\t}", "public int cumulativeSum() {\n int sum = 0;\n EquationList p_eqn = eqn;\n while (p_eqn != null) {\n sum = sum + p_eqn.result;\n p_eqn = p_eqn.next;\n }\n if (p_eqn == null) {\n sum = sum;\n }\n return sum;\n }", "public int minPathSum(int[][] grid) {\n\t\treturn 0;\r\n }", "public double sum()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += c;\r\n\r\n return sum;\r\n }", "public long getSum()\n {\n long sum = 0;\n\n for(int i = 0; i < integerList.length; i++)\n {\n sum = sum + integerList[i];\n }\n\n return sum;\n }", "@Override\n\tpublic IDoubleVector sumRows() {\n\t\treturn null;\n\t}", "public double getSumX() { \n\t\treturn sumX1; \n\t}", "private void getSum() {\n double sum = 0;\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n sum = sum + parseDouble(remindersTable.getValueAt(i, 3).toString());\n }\n String rounded = String.format(\"%.2f\", sum);\n ledgerTxtField.setText(rounded);\n }", "public BigDecimal getSumOfOutstanding(){\n\t\t BigDecimal a = new BigDecimal(0);\r\n//\t\t int outstandingIndex = 0;\r\n//\t\t for (int i=0 ; i<mColumnNames.length ; i++){\r\n//\t\t\t if (mColumnNames[i].equals(DBService.OUTSTANDING)){\r\n//\t\t\t\t outstandingIndex = i;\r\n//\t\t\t\t break;\r\n//\t\t\t }\r\n//\t\t }\r\n\t\t \r\n\t\t for (int i=0 ; i<getRowCount() ; i++){\r\n\t\t\t float value = (Float)getValueAt(i, 11);\r\n\t\t\t \r\n\t\t\t if (value != 0){\r\n\t\t\t\t BigDecimal b = new BigDecimal(value);\r\n\t\t\t\t a = a.add(b);\r\n\t\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return a;\r\n\t }", "public long column_mask(int col) {\r\n return (((long)1 << height)-1) << col*(height+1);\r\n }", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "public int getSum(int table, int index) {\n if (table >= TABLE_MIN && table <= TABLE_MAX) {\n if (index >= TABLE_MIN && index <= TABLE_MAX) {\n return timesTables[table][index];\n }\n else {\n System.out.println(index + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n }\n else {\n System.out.println(table + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n }", "public double getSum()\n {\n return first + second;\n }" ]
[ "0.712147", "0.7101426", "0.67000866", "0.66332763", "0.64256454", "0.637123", "0.631288", "0.6297478", "0.61616665", "0.6122016", "0.6106306", "0.60990417", "0.60726404", "0.6069141", "0.6066762", "0.6058424", "0.6017557", "0.60010105", "0.5997239", "0.59881234", "0.59621394", "0.5946181", "0.5927689", "0.59008545", "0.58664006", "0.5858269", "0.58425486", "0.58425486", "0.5838456", "0.58354884", "0.5832619", "0.58018523", "0.5794728", "0.5786435", "0.5774186", "0.5757174", "0.57303977", "0.5727387", "0.5718605", "0.5708405", "0.5686472", "0.56860036", "0.56757694", "0.5673719", "0.5661017", "0.56546545", "0.5652025", "0.56438047", "0.56223226", "0.55986804", "0.55925673", "0.5592177", "0.5579017", "0.55771506", "0.5562536", "0.55519825", "0.5536302", "0.5514329", "0.54937625", "0.5491744", "0.54747796", "0.54452807", "0.5440955", "0.54399824", "0.54186213", "0.5414808", "0.5408743", "0.5408211", "0.53956276", "0.53796816", "0.53260857", "0.53032154", "0.52966094", "0.5292496", "0.5292491", "0.52898693", "0.52892005", "0.5278867", "0.5278349", "0.52711385", "0.5263283", "0.525205", "0.52510124", "0.524321", "0.5242231", "0.52286243", "0.5226116", "0.5219937", "0.5219356", "0.5213415", "0.5212335", "0.52078134", "0.52002215", "0.5200083", "0.52000034", "0.5198229", "0.5194543", "0.5184128", "0.51816905", "0.517494" ]
0.64396435
4
Return the sum of a one dimensional array.
public static int sum(int[] a) { int rowNum = a.length; int sum = 0; for (int i = 0; i < rowNum; i++) { sum += a[i]; } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "public int sum(int[] array) {\n if (array == null || array.length == 0){\n return 0;\n }\n int sum = 0;\n for (int i = 0; i < array.length; i++){\n sum += array[i];\n }\n return sum;\n }", "private double sumArray(double[] array) {\r\n\t\tdouble sum = 0.0;\r\n\t\t// Run through the array and add the numbers to the sum variable.\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\tsum += array[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int getSum(int[] array) {\n\n int[] arrayA = array;\n int length = arrayA.length;\n int sum = 0;\n\n for (int i = 0; i < length; i++) {\n sum += arrayA[i];\n }\n\n System.out.println(\"Sum of array elements is: \" + sum);\n\n return sum;\n }", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "public static int sumArray(int[] array) {\r\n\t\tint total = 0;\r\n\r\n\t\tfor (int i = 0; i < myList.length; i++) {\r\n\t\t\ttotal += myList[i];\r\n\t\t}\r\n\r\n\t\treturn total;\r\n\t}", "public static double sum(double[] array) {\n\t\tif (array==null)\n\t\t\treturn Double.NaN;\n\t\tdouble re = 0;\n\t\tfor (double i : array)\n\t\t\tre+=i;\n\t\treturn re;\n\t}", "public static int sumArray(int[] array) {\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor (int num : array)\n\t\t\t\tsum+=num;\n\t\t\treturn sum;\n\t\t\n\t\t}", "public static int ArraySum(int[] inputArray){\n int sum=0;\n for(int i=0;i<inputArray.length;i++){\n sum=sum+inputArray[i];\n }\n return sum;\n }", "public static double sum(double[] array) {\r\n\t\tdouble ret = 0.0;\r\n\t\tfor (double v : array) {\r\n\t\t\tret += v;\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public static int sumatory(int [] mySingleArray) {\r\n int counter = 0, sum = 0;\r\n while (counter < mySingleArray.length){\r\n sum = sum + mySingleArray[counter];\r\n counter++;\r\n }\r\n return sum;\r\n }", "public static int sum(int[] theArray) {\n\n\n //Converts the array to a list\n List<Integer> values = Arrays.stream(theArray).boxed().collect(Collectors.toList());\n\n //Streams through all the values and using lambda sums them up.\n //result is current sum and currentElement is the current element that is being added\n //see javadocs for reduce for more info.\n// int sum = values.stream().reduce(0, (result, currentElement) -> result + currentElement);\n int sum = values.stream().reduce(0, Integer::sum);\n // sum = integers.reduce(0, Integer::sum);\n return sum;\n\n\n ////Alternative code does the same job.\n// int sum = 0;\n// for (int num : theArray) {\n// sum += num;\n// }\n// return sum;\n\n }", "public double getTotal(){\n double total = 0;\n for(int i=0;i<array.length; i++){\n total += array[i].doubleValue();\n }\n return total;\n }", "public static int sumArray(int[] arr)\n\t{\n\t\tint x=0;\n\t\tfor(int y:arr)\n\t\t{\n\t\t\tx+=y;\n\t\t}\n\t\treturn x;\n\t}", "public static int simpleArraySum() { //(List<Integer> ar)\n \n Integer []ar = {1,2,3}; \n\n Integer sum =0;\n for(Integer i : ar){\n sum +=i;\n }\n return sum; \n }", "public static double arrayTotal(int[] array ) throws IOException {\r\n double total = 0;\r\n\r\n for (int i = 0; i != array.length; i++) {\r\n total = total + array[i];\r\n }\r\n return total;\r\n }", "public static int sumArray( int [] A ) {\n\tint sum = 0;\n\tfor( int a : A ) sum +=a;\n\treturn sum;\n }", "public void calculateArray() {\n\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n }", "public static double sum(double[] a){\n\n\t\t double sum = 0;\n\t\t for(int i = 0; i < a.length; i++)\n\t\t \tsum += a[i];\n\n\t \treturn sum;\n\n }", "public static int completeSum(int [] array){\n int sum = 0;\n for(int i = 0; i < array.length; i++){\n sum+= array[i];\n }\n return sum;\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "public static int sum(int[] a) {\n int sum = 0;\n for (int i = 0; i < a.length; i = i + 1) {\n sum = sum + a[i];\n }\n return sum;\n }", "public static int sumArray(int[] a) {\n\t\tint sum = 0;\n\t\tfor(int i=0;(i<=a.length-1);i++) {\n\t\t\tsum = sum + a[i];\n\t\t}\n\t\treturn sum;\n\t}", "public static double getSum(double data[]) {\r\n\t\t\t\r\n\t\t\tint datLength = data.length;\r\n\t\t\tdouble sum = 0;\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < datLength; i++) {\r\n\t\t\t\tsum = sum + data[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn sum;\r\n\t\t}", "static long subArraySum(int[] data) {\n\n long result = 0;\n\n // computing sum of sub array using formula\n int n = data.length;\n for (int i = 0; i < n; i++) {\n // x * (x at first index) + (x at other indices)\n result += (data[i] * (i * (n - i) + (n - i)));\n//\t\t\tresult += (data[i] * (i + 1) * (n - i));\n }\n\n // return all sub array sum\n return result;\n }", "public int sumOfArray(Integer[] array, int index) {\n\t\treturn (index == 0)? array[0] : array[index] + sumOfArray(array,--index);\n\t}", "public double elementSum() {\n return ops.elementSum(mat);\n }", "static double calculateArraySum(double... value) {\n double sum = 0;\n for (double i : value) {\n sum += i;\n }\n return sum;\n }", "public int sum()\n {\n return sum(0,0,size);\n }", "public static int sum(int[] mainArray) {\r\n\t\tint sum = 0;\r\n\t\tfor (int counter = 0; counter < mainArray.length; counter ++) {\r\n\t\t\tsum += mainArray[counter];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "public static int sum(int[] arr, int arrlen){ // sum of array\r\n int sum = 0;\r\n for (int i = 0; i < arrlen; i++) {\r\n sum += arr[i];\r\n }\r\n return sum;\r\n }", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "public int arraySum(int[] array, int n) {\n\t\tif (n == 0) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn arraySum(array, n - 1) + array[n - 1];\n\t\t}\n\t}", "public static int sum1DArr(int[] myArr1D)\n {\n return sum1DArrRecursive(myArr1D, 0, myArr1D.length - 1);\n }", "public static int ArraySum(int[] A, int n){\r\n if (n < A.length - 1){\r\n return A[n] + ArraySum(A,n+1);\r\n }\r\n else{\r\n return A[n];\r\n }\r\n }", "public static int sumRow( int r, int[][] a )\n {\n int sum = 0; //initialize sum\n for (int i = 0; i < a[r].length; i++) { //for the width of an array...\n\t sum += a[r][i]; //add the point to the sum\n }\n return sum; //return sum, an int\n }", "public static int sumRow1( int r, int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t//initialize variable to store sum of a row\n\n\t for ( int i = 0; i < a[r].length; i++) {\t//loop through the specific \"row\" (array) given\n\n\t\t\tsum += a[r][i];\t\t\t\t\t\t//add each value to our sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t//return the sum variable\n }", "public static double[] lineSum(double[][] t)\n\t{\n\t int nLines=t.length; // longeur de la ligne\n\t\tdouble[] result=new double[nLines];\n\t\tfor (int i=0; i<nLines; i++)\n\t\t{\n\t\t\tresult[i]=0.;\n\t\t\tfor (int j=0;j<t[i].length;j++)\n\t\t\t\tresult[i]+=t[i][j];\n\t\t}\n\t\treturn result;\n }", "public static int sum(int[] s)\n {\n int sum = 0;\n for (int i = 0; i < s.length; i++) sum = sum + s[i];\n return sum;\n }", "public static int sumUsingStreams(int []arr)\n{\n //Your code here\n //using stream.sum()\n return Arrays.stream( arr)\n .sum(); \n \n}", "private static void sumArray(String[][] arr) {\n int count = 0;\n\n if (arr.length != 4) {\n throw new MyArraySizeException(\"Array row less than 4\", arr.length);\n }\n for (int i = 0; i < arr.length; i++) {\n if (arr[i].length != 4) {\n throw new MyArraySizeException(\"Array column less than 4\", arr[i].length);\n }\n\n for (int j = 0; j < arr[i].length; j++) {\n System.out.printf(\"%-10s\", arr[i][j]);// print array data for visibility\n\n try {\n int x = Integer.parseInt(arr[i][j]);\n count = count + x;\n } catch (NumberFormatException e) {\n throw new MyArrayDataException(\"Wrong type of element: \", \"[\" + i + \"]\" + \"[\" + j + \"]\");\n }\n }\n System.out.println();\n }\n System.out.println(\"array sum: \" + count);\n\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "public static double sum(double[] s)\n {\n double sum = 0;\n for (int i = 0; i < s.length; i++) sum = sum + s[i];\n return sum;\n }", "public void testArray() {\n\t\t\n\t\tint[] arr = new int[5];\n\t\t\n\t\t/*arr[0]=10;\n\t\tarr[1]=20;\n\t\tarr[2]=30;\n\t\tarr[3]=40;\n\t\tarr[4]=50;*/\n\t\t\n\t\tint sum=0;\n\t\t\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tarr[i]=10*(i+1);\n\t\t\tsum+=arr[i];\n\t\t\tSystem.out.println(\"arr[\"+i+\"] = \"+arr[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"sum = \"+sum);\n\t}", "public int sumItems(double[] source) {\n int sum = 0;\n System.out.println(\"double array is called\");\n for(int i=0; i < source.length; i++) {\n sum += source[i];\n }\n return sum;\n }", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "public static void SumTestCase() {\n\tSystem.out.println(\"\\nQuestion (4) Sum Array\");\n\tSystem.out.println(\"----------------------\");\n\tint N = 100;\n\tint [] A = createAndFillArray( N );\n\tint sum = sumArray(A);\n\tSystem.out.println(\"The sum of \" + A[0] + \" to \" + A[A.length-1] + \" = \" + sum );\n }", "public double negativeElementsSum(double[] arr) {\n return 0;\n }", "public static double getTotal(int[][] numbers) {\n int totalValue = 0;\n for (int i = 0; i < numbers.length; i++) {\n for (int j = 0; j < numbers[i].length; j++) {\n totalValue = totalValue + numbers[i][j];\n }\n }\n return totalValue;\n }", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "RandomVariable sumProduct(RandomVariableArray array);", "public static int getSum(int arr[], int n)\n{\n\tint total = 0;\n\tfor (int i = 0; i < n; i++)\n\t\ttotal += arr[i];\n\treturn total;\n}", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public double sum() {\n final int size = size();\n double sum = 0.0;\n\n // Compute the average of all values\n for (int i = 0; i < size; i++) {\n final Number number = get(i);\n if (number == null) continue;\n if (Double.isNaN(number.doubleValue())) continue;\n\n sum += number.doubleValue();\n }\n\n return sum;\n }", "private String getSumString(int[][] input)\n {\n int sum = 0;\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sum += input[i][j];\n }\n }\n return Integer.toString(sum);\n }", "double getSum();", "double getSum();", "public int[][] sumOfMatrices(int row, int col, int array1[][], int array2[][]) {\n int[][] sum = new int[row][col];\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n sum[i][j] = array1[i][j] + array2[i][j];\n }\n }\n return sum;\n }", "public T sum();", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tint[] a = {1,2,3,4,5,6};\n\t\t\n\tint addition\t=sumofarray(a);\n\tSystem.out.println(addition);\n\t}", "private static int sum1DArrRecursive(int[] myArr1D, int min, int max)\n {\n int sum = 0;\n if(min==max)\n { \n sum += myArr1D[max];\n return sum;\n }\n else\n {\n sum += myArr1D[min] + sum1DArrRecursive(myArr1D, min+1, max);\n return sum;\n }\n }", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "public int sum(int array[], int start, int finish) {\r\n\t\tint sum = 0;\r\n\t\tint i = 0;\r\n\t\tfor (i = start; i < finish; i++) {\r\n\t\t\tsum += array[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "protected static double seqArraySum(final double[] input) {\n double sum = 0;\n\n // Compute sum of reciprocals of array elements\n for (int i = 0; i < input.length; i++) {\n sum += 1 / input[i];\n }\n\n return sum;\n }", "public static int total(int []array)\r\n\t{\r\n\t\tint ttl = 0;\r\n\t\t\r\n\t\tint n = array.length;\r\n\t\t\r\n\t\tfor (int i=0; i < n; i++)\r\n\t\t\tttl += array[i];\r\n\t\t\r\n\t\treturn ttl;\r\n\t}", "private static void sum(int[][] first, int[][] second) {\r\n\t\tint row = first.length;\r\n\t\tint column = first[0].length;\r\n\t\tint[][] sum = new int[row][column];\r\n\r\n\t\tfor (int r = 0; r < row; r++) {\r\n\t\t\tfor (int c = 0; c < column; c++) {\r\n\t\t\t\tsum[r] = first[r] + second[r];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"\\nSum of Matrices:\\n\");\r\n\t\tprint2dArray(sum);\r\n\t}", "public static int diagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static double[][] sum(double[][] t1,double[][] t2)\n\t{\n\t\t// Vérifie si t1 & t2 sont régulier\n\t\tif (!regular(t1) || !regular(t2))\n\t\t\treturn null;\n\t\t// Vérifie si t1 & t2 sont de même longeur\n\t\tif (t1.length!=t2.length)\n\t\t\treturn null;\n\t\tif (t1[0].length!=t2[0].length)\n\t\t\treturn null;\n\t\tint nLin=t1.length; int nRow=t1[0].length;\n\t\t\n\t\tdouble[][] somme=new double[nLin][nRow];\n\t\t\n\t\tfor (int i=0;i<nLin;i++)\n\t\t\tfor (int j=0;j<nRow;j++)\n\t\t\t\tsomme[i][j]=t1[i][j]+t2[i][j];\n\t\treturn somme;\n\t}", "public double sumXs() {\n double $ = 0;\n for (int ¢ = 0; ¢ < xVals.size(); ++¢)\n $ += unbox(cantBeNull(xVals.get(¢)));\n return $;\n }\n\n // calculate the sum of all the y values\n public double sumYs() {\n double $ = 0;\n for (int ¢ = 0; ¢ < yVals.size(); ++¢)\n $ += unbox(cantBeNull(yVals.get(¢)));\n return $;\n }", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "public static int sum(int[] values) {\n\t\tint sum = 0;\n\t\tfor (int value : values) {\n\t\t\tsum += value;\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static int sum(int[] arr) throws InterruptedException {\n\t\treturn fjPool.invoke(new ForkJoin(arr, 0, arr.length));\n\t}", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "public static void main(String[] args) {\n int[][] array=new int[3][5];\n int[][] array1=new int[3][];\n int[][] array3=new int[][]{};\n int[] a[]={};\n\n int[][] array4=new int[][] {\n {1,2,3},\n {4,5,6,7,9,10},\n {9,10,11,15}\n };\n System.out.println(array4.length);\n System.out.println(array4[0].length);\n System.out.println(array4[1].length);\n System.out.println(array4[0][1]);\n System.out.println(array4[2][3]);\n\n int sum=0;\n for (int i=0; i<array4.length; i++) {\n for (int j=0; j<array4[i].length; j++) {\n sum=sum+array4[i][j];\n System.out.print(array4[i][j]+\" \");\n }\n }\n System.out.println();\n System.out.println(\"Sum of all numbers is: \" +sum);\n\n }", "public static double sum2(double[] mainArray2) {\r\n\t\tint sum2 = 0;\r\n\t\tfor (int counter = 0; counter < mainArray2.length; counter ++) {\r\n\t\t\tsum2 += mainArray2[counter];\r\n\t\t}\r\n\t\treturn sum2;\r\n\t}", "public static double[] sumEachColumn(double[][] a) {\n \n double[] out = new double[a[0].length];\n for (int r = 0; r < a.length; ++r) {\n for (int c = 0; c < a[r].length; ++c) {\n out[c] += a[r][c];\n }\n }\n \n return out;\n }", "public int sum(int[] bit, int index) {\n index = index + 1;\n int sum = 0;\n while (index > 0) {\n sum += bit[index];\n index = getParent(index);\n }\n return sum;\n }", "public static void main(String[] args) {\n int my_array[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n int sum = 0;\n\n for (int i : my_array)\n sum += i; // is short hand for sum=sum+i; in word \" set sum equal to itself plus i\n System.out.println(\"The sum is \" + sum);\n }", "public static int tailSum(int[] arr){\n\t\tif(arr.length == 0){\n\t\t\tSystem.err.println(\"The array is empty\");\n\t\t\treturn -1;\n\t\t}\n\t\treturn findTailSum(arr, 0, 0);\n\t}", "public long getSum()\n {\n long sum = 0;\n\n for(int i = 0; i < integerList.length; i++)\n {\n sum = sum + integerList[i];\n }\n\n return sum;\n }", "public static void LargestSumRow(int[][] array) {\n\n }", "public static double calculateTotals(double[] money) {\n int element = 0; //The element to add\n double total = 0; //The total sales/commissions\n \n while (element < money.length) { //Add each element\n total += money[element];\n element++;\n }\n \n //Return total\n return total;\n }", "public int iSumaVec(int[] vector)\r\n\t{\r\n\t\tint iSuma=0;\r\n\t\tfor(int i=0;i<vector.length;i++)\r\n\t\t{\r\n\t\t\tiSuma+=vector[i];\r\n\t\t}\r\n\t\treturn iSuma;\r\n\t}", "public static void main(String[] args) {\nint array[]= {13, 25, 9,56,54,89,17};\r\nint sum =0;\r\n\r\nfor (int i=0; i<=6; i++) {\r\n\tsum = sum + array[i];\r\n}\r\nSystem.out.println(\"the sume of the numbers is \" +sum);\r\n\t}", "private int sum(int[] widths) {\n int sum = 0;\n\n for (int width : widths) {\n sum += width;\n }\n\n return sum;\n }", "public static int sum(int ...a)\r\n\t{\r\n\t\tint ans=0;\r\n\t\tfor(int i:a) {\r\n\t\t\tans=ans+i;\r\n\t\t}\r\n\t\treturn ans;\r\n\t}", "public static int sum1(int[] a, int n) // summen av de n første\n {\n if (n == 1) return a[0]; // summen er verdien selv\n return sum1(a,n-1) + a[n-1]; // summen av de n-1 første + a[n-1]\n }", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "private void getSum() {\n\t\tint sum =0;\r\n\t\t\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i] != null)\r\n\t\t\t\tsum += products[i].getPrice();\r\n\t\t}\r\n\t\tSystem.out.println(sum);\r\n\t}", "public int sum() {\n\n\t\t// Decide the max number of threads required to count.\n\t\tint maxThreads = numArr.length / NUMBERS_PER_THREAD;\n\t\tint reminder = numArr.length % NUMBERS_PER_THREAD;\n\t\tif (reminder > 0) {\n\t\t\tmaxThreads += 1;\n\t\t}\n\n\t\t// The list to which the results should be added.\n\t\tList<Integer> resultList = Collections.synchronizedList(new ArrayList<Integer>());\n\n\t\t// The list containing threads created.\n\t\tList<Thread> threadList = new ArrayList<Thread>();\n\n\t\t// Create and start threads.\n\t\tint fromIndex = 0;\n\t\tfor (int i = 0; i < maxThreads; i++) {\n\t\t\tString threadName = \"Thread-\" + (i + 1);\n\t\t\tArraySumThread thread = new ArraySumThread(threadName, numArr, fromIndex, NUMBERS_PER_THREAD, resultList);\n\t\t\tfromIndex += NUMBERS_PER_THREAD;\n\t\t\tthreadList.add(thread);\n\t\t\tthread.start();\n\t\t}\n\n\t\t// Join all threads.\n\t\tfor (int i = 0; i < threadList.size(); i++) {\n\t\t\tThread thread = threadList.get(i);\n\t\t\t// System.out.println(\"Waiting for end of thread: \" + thread.getName());\n\t\t\ttry {\n\t\t\t\tthread.join();\n\t\t\t\t// System.out.println(\"Finished thread: \" + thread.getName());\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\n\t\t// Sum the values returned added by each thread to the resultList\n\t\tint sum = 0;\n\t\tfor (Integer value : resultList) {\n\t\t\tsum += value;\n\t\t}\n\n\t\t// Return sum.\n\t\treturn sum;\n\t}", "public static long sum(long[] s)\n {\n long sum = 0;\n for (int i = 0; i < s.length; i++) sum = sum + s[i];\n return sum;\n }", "public double averageOfArray() {\n double sum = 0;\n double average = 0;\n int i;\n for (i = 0; i < sirDeLa1La100.length; i++) {\n sum = sum + sirDeLa1La100[i];\n }\n average = sum / sirDeLa1La100.length;\n return average;\n }", "public static Long sum(MultiDimensionArray mArray, int[] lengthOfDeminsion) { \n // Time complexity: O(n)\n // Space complexity: O(1)\n\t \n \tif(lengthOfDeminsion == null || lengthOfDeminsion.length == 0){\n \t\treturn (long) 0;\n \t}\n \t\n \tlong sum = 0;\n \t//Initialize an array to store the indexOfDimension\n \tint[] iod = new int[lengthOfDeminsion.length];\n \t\n \t/*It's easy to imagine that we should use a loop that has variable number of levels (not sure if it's allowed in java) \n \tBut we can calculate the multiplication of the domain from each level \n \tThen map the index back using only one variable.*/\n \tint mul = 1;\n \tfor(int i = 0; i < lengthOfDeminsion.length; i++){\n \t\tmul = mul * lengthOfDeminsion[i];\n \t}\n \tfor(int i = 0; i < mul; i++){\n \t\tint temp = mul;\n \t\tfor(int j = 0; j < lengthOfDeminsion.length; j++){\n \t\t\tiod[j] = i * lengthOfDeminsion[j] / temp % lengthOfDeminsion[j];\n \t\t\ttemp = temp / lengthOfDeminsion[j];\n \t\t}\n \t\tsum = sum + getValue(iod);\n \t}\n \treturn sum; \t\n }", "@Override\r\n protected BigDecimal getSum() {\r\n boolean handleOutOfMemoryError = false;\r\n BigDecimal sum = BigDecimal.ZERO;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n sum = sum.add(new BigDecimal(value));\r\n }\r\n }\r\n }\r\n }\r\n return sum;\r\n }" ]
[ "0.75892663", "0.7515937", "0.7420418", "0.74132776", "0.73801994", "0.72537637", "0.71693784", "0.7163226", "0.7154032", "0.7143154", "0.7137418", "0.70534056", "0.7029414", "0.7014698", "0.69650507", "0.69563144", "0.69531226", "0.6942008", "0.6939053", "0.69363", "0.6932636", "0.69066995", "0.689617", "0.6877632", "0.68687886", "0.6856503", "0.6838773", "0.68353707", "0.6735318", "0.6715892", "0.6708149", "0.6697418", "0.6682372", "0.667172", "0.6599199", "0.6576842", "0.65672493", "0.6535815", "0.6495727", "0.6479672", "0.64484394", "0.6375345", "0.6374354", "0.63646716", "0.6356604", "0.63322836", "0.63194597", "0.630872", "0.6308258", "0.62885743", "0.62599486", "0.6253599", "0.6218642", "0.6183155", "0.6167382", "0.6164189", "0.61632043", "0.6146289", "0.6121131", "0.6113251", "0.6077333", "0.60626143", "0.60626143", "0.60339785", "0.6008009", "0.6006465", "0.5978582", "0.5968871", "0.5960092", "0.5953781", "0.5931509", "0.5913362", "0.591231", "0.58337945", "0.58330786", "0.5826658", "0.5809798", "0.5799987", "0.5795066", "0.57754475", "0.57748085", "0.5762694", "0.5755051", "0.5750308", "0.5746324", "0.57445693", "0.5742691", "0.5734243", "0.57341135", "0.5692241", "0.5686336", "0.56670535", "0.56495845", "0.56445277", "0.5641125", "0.56371474", "0.5629799", "0.5622789", "0.561861", "0.5614665" ]
0.7021084
13
Return the sum of all values in an array.
public static int sum(int[][] a) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { sum += a[i][j]; } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int sum(int[] array) {\n if (array == null || array.length == 0){\n return 0;\n }\n int sum = 0;\n for (int i = 0; i < array.length; i++){\n sum += array[i];\n }\n return sum;\n }", "static double calculateArraySum(double... value) {\n double sum = 0;\n for (double i : value) {\n sum += i;\n }\n return sum;\n }", "private double sumArray(double[] array) {\r\n\t\tdouble sum = 0.0;\r\n\t\t// Run through the array and add the numbers to the sum variable.\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\tsum += array[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static double sum(double[] array) {\n\t\tif (array==null)\n\t\t\treturn Double.NaN;\n\t\tdouble re = 0;\n\t\tfor (double i : array)\n\t\t\tre+=i;\n\t\treturn re;\n\t}", "public static double sum(double[] array) {\r\n\t\tdouble ret = 0.0;\r\n\t\tfor (double v : array) {\r\n\t\t\tret += v;\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "public static int sumArray(int[] array) {\r\n\t\tint total = 0;\r\n\r\n\t\tfor (int i = 0; i < myList.length; i++) {\r\n\t\t\ttotal += myList[i];\r\n\t\t}\r\n\r\n\t\treturn total;\r\n\t}", "public static int sumArray(int[] array) {\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor (int num : array)\n\t\t\t\tsum+=num;\n\t\t\treturn sum;\n\t\t\n\t\t}", "public void calculateArray() {\n\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n }", "public static double arrayTotal(int[] array ) throws IOException {\r\n double total = 0;\r\n\r\n for (int i = 0; i != array.length; i++) {\r\n total = total + array[i];\r\n }\r\n return total;\r\n }", "public static int ArraySum(int[] inputArray){\n int sum=0;\n for(int i=0;i<inputArray.length;i++){\n sum=sum+inputArray[i];\n }\n return sum;\n }", "public static int sum(int[] theArray) {\n\n\n //Converts the array to a list\n List<Integer> values = Arrays.stream(theArray).boxed().collect(Collectors.toList());\n\n //Streams through all the values and using lambda sums them up.\n //result is current sum and currentElement is the current element that is being added\n //see javadocs for reduce for more info.\n// int sum = values.stream().reduce(0, (result, currentElement) -> result + currentElement);\n int sum = values.stream().reduce(0, Integer::sum);\n // sum = integers.reduce(0, Integer::sum);\n return sum;\n\n\n ////Alternative code does the same job.\n// int sum = 0;\n// for (int num : theArray) {\n// sum += num;\n// }\n// return sum;\n\n }", "public static int getSum(int[] array) {\n\n int[] arrayA = array;\n int length = arrayA.length;\n int sum = 0;\n\n for (int i = 0; i < length; i++) {\n sum += arrayA[i];\n }\n\n System.out.println(\"Sum of array elements is: \" + sum);\n\n return sum;\n }", "public static int completeSum(int [] array){\n int sum = 0;\n for(int i = 0; i < array.length; i++){\n sum+= array[i];\n }\n return sum;\n }", "public double getTotal(){\n double total = 0;\n for(int i=0;i<array.length; i++){\n total += array[i].doubleValue();\n }\n return total;\n }", "public static int simpleArraySum() { //(List<Integer> ar)\n \n Integer []ar = {1,2,3}; \n\n Integer sum =0;\n for(Integer i : ar){\n sum +=i;\n }\n return sum; \n }", "public static int sum(int[] values) {\n\t\tint sum = 0;\n\t\tfor (int value : values) {\n\t\t\tsum += value;\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static double sum(double[] a){\n\n\t\t double sum = 0;\n\t\t for(int i = 0; i < a.length; i++)\n\t\t \tsum += a[i];\n\n\t \treturn sum;\n\n }", "public static int sumArray( int [] A ) {\n\tint sum = 0;\n\tfor( int a : A ) sum +=a;\n\treturn sum;\n }", "public static int sumArray(int[] arr)\n\t{\n\t\tint x=0;\n\t\tfor(int y:arr)\n\t\t{\n\t\t\tx+=y;\n\t\t}\n\t\treturn x;\n\t}", "public static int sumArray(int[] a) {\n\t\tint sum = 0;\n\t\tfor(int i=0;(i<=a.length-1);i++) {\n\t\t\tsum = sum + a[i];\n\t\t}\n\t\treturn sum;\n\t}", "public static double getSum(double data[]) {\r\n\t\t\t\r\n\t\t\tint datLength = data.length;\r\n\t\t\tdouble sum = 0;\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < datLength; i++) {\r\n\t\t\t\tsum = sum + data[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn sum;\r\n\t\t}", "public static int sum(int[] a) {\n int sum = 0;\n for (int i = 0; i < a.length; i = i + 1) {\n sum = sum + a[i];\n }\n return sum;\n }", "public static double sum(double[] s)\n {\n double sum = 0;\n for (int i = 0; i < s.length; i++) sum = sum + s[i];\n return sum;\n }", "public static int sum(int[] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tsum += a[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int sum(int[] s)\n {\n int sum = 0;\n for (int i = 0; i < s.length; i++) sum = sum + s[i];\n return sum;\n }", "public static int sumUsingStreams(int []arr)\n{\n //Your code here\n //using stream.sum()\n return Arrays.stream( arr)\n .sum(); \n \n}", "public static int sum(int[] arr, int arrlen){ // sum of array\r\n int sum = 0;\r\n for (int i = 0; i < arrlen; i++) {\r\n sum += arr[i];\r\n }\r\n return sum;\r\n }", "public static int sumatory(int [] mySingleArray) {\r\n int counter = 0, sum = 0;\r\n while (counter < mySingleArray.length){\r\n sum = sum + mySingleArray[counter];\r\n counter++;\r\n }\r\n return sum;\r\n }", "public static int sum(int[] mainArray) {\r\n\t\tint sum = 0;\r\n\t\tfor (int counter = 0; counter < mainArray.length; counter ++) {\r\n\t\t\tsum += mainArray[counter];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public void testArray() {\n\t\t\n\t\tint[] arr = new int[5];\n\t\t\n\t\t/*arr[0]=10;\n\t\tarr[1]=20;\n\t\tarr[2]=30;\n\t\tarr[3]=40;\n\t\tarr[4]=50;*/\n\t\t\n\t\tint sum=0;\n\t\t\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tarr[i]=10*(i+1);\n\t\t\tsum+=arr[i];\n\t\t\tSystem.out.println(\"arr[\"+i+\"] = \"+arr[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"sum = \"+sum);\n\t}", "public int sumItems(double[] source) {\n int sum = 0;\n System.out.println(\"double array is called\");\n for(int i=0; i < source.length; i++) {\n sum += source[i];\n }\n return sum;\n }", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "public double sum() {\n final int size = size();\n double sum = 0.0;\n\n // Compute the average of all values\n for (int i = 0; i < size; i++) {\n final Number number = get(i);\n if (number == null) continue;\n if (Double.isNaN(number.doubleValue())) continue;\n\n sum += number.doubleValue();\n }\n\n return sum;\n }", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "public int arraySum(int[] array, int n) {\n\t\tif (n == 0) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn arraySum(array, n - 1) + array[n - 1];\n\t\t}\n\t}", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "static long subArraySum(int[] data) {\n\n long result = 0;\n\n // computing sum of sub array using formula\n int n = data.length;\n for (int i = 0; i < n; i++) {\n // x * (x at first index) + (x at other indices)\n result += (data[i] * (i * (n - i) + (n - i)));\n//\t\t\tresult += (data[i] * (i + 1) * (n - i));\n }\n\n // return all sub array sum\n return result;\n }", "public double negativeElementsSum(double[] arr) {\n return 0;\n }", "RandomVariable sumProduct(RandomVariableArray array);", "public static int total(int []array)\r\n\t{\r\n\t\tint ttl = 0;\r\n\t\t\r\n\t\tint n = array.length;\r\n\t\t\r\n\t\tfor (int i=0; i < n; i++)\r\n\t\t\tttl += array[i];\r\n\t\t\r\n\t\treturn ttl;\r\n\t}", "public static double getTotal(int[][] numbers) {\n int totalValue = 0;\n for (int i = 0; i < numbers.length; i++) {\n for (int j = 0; j < numbers[i].length; j++) {\n totalValue = totalValue + numbers[i][j];\n }\n }\n return totalValue;\n }", "public int addValue(double[] array) {\n int val = hashCode();\n for (double f : array) {\n val = addValue(f);\n }\n return val;\n }", "public int sumOfArray(Integer[] array, int index) {\n\t\treturn (index == 0)? array[0] : array[index] + sumOfArray(array,--index);\n\t}", "public static int sum(int ...a)\r\n\t{\r\n\t\tint ans=0;\r\n\t\tfor(int i:a) {\r\n\t\t\tans=ans+i;\r\n\t\t}\r\n\t\treturn ans;\r\n\t}", "public int sum()\n {\n return sum(0,0,size);\n }", "public double sum()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += c;\r\n\r\n return sum;\r\n }", "public static int getSum(int arr[], int n)\n{\n\tint total = 0;\n\tfor (int i = 0; i < n; i++)\n\t\ttotal += arr[i];\n\treturn total;\n}", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "public static void main(String[] args) {\n int my_array[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n int sum = 0;\n\n for (int i : my_array)\n sum += i; // is short hand for sum=sum+i; in word \" set sum equal to itself plus i\n System.out.println(\"The sum is \" + sum);\n }", "public double sumXs() {\n double $ = 0;\n for (int ¢ = 0; ¢ < xVals.size(); ++¢)\n $ += unbox(cantBeNull(xVals.get(¢)));\n return $;\n }\n\n // calculate the sum of all the y values\n public double sumYs() {\n double $ = 0;\n for (int ¢ = 0; ¢ < yVals.size(); ++¢)\n $ += unbox(cantBeNull(yVals.get(¢)));\n return $;\n }", "public int addValue(int[] array) {\n int val = hashCode();\n for (int i : array) {\n val = addValue(i);\n }\n return val;\n }", "public int sum(int array[], int start, int finish) {\r\n\t\tint sum = 0;\r\n\t\tint i = 0;\r\n\t\tfor (i = start; i < finish; i++) {\r\n\t\t\tsum += array[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int ArraySum(int[] A, int n){\r\n if (n < A.length - 1){\r\n return A[n] + ArraySum(A,n+1);\r\n }\r\n else{\r\n return A[n];\r\n }\r\n }", "public static void addNumbers(int... nums) {\n\n // inside the method , it used as regular array\n int sum =0;\n\n for(int each : nums){\n sum += each;\n }\n System.out.println(\"sum = \" + sum);\n\n }", "static double calculateAverage(int[] array) {\n\n double sum = 0;\n\n for (int i = 0; i < array.length; i++) {\n\n sum = sum + (double) array[i];\n\n\n }\n\n return sum / array.length;//returning average\n\n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public static void getSum(String[] args) {\n\t\tint sum = 0;\n\t\t\n\t\tSystem.out.println(Arrays.toString(args));\n\n\t\ttry {\n\t\t\tfor (String num : args) {\n\t\t\t\tint number = Integer.parseInt(num);\n\t\t\t\tsum += number;\n\t\t\t}\n\t\t\tSystem.out.printf(\"Sum of all inputed numbers is: %d\\n\", sum);\n\t\t} catch (NumberFormatException ex) {\n\t\t\tSystem.out.println(\"Not all values of an array are numbers!\");\n\t\t}\n\n\t}", "@Override\r\n\tprotected double evaluate(double[] values) throws EvaluationException {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0 ; i < values.length ; i++){\r\n\t\t\tsum += values[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "protected static double seqArraySum(final double[] input) {\n double sum = 0;\n\n // Compute sum of reciprocals of array elements\n for (int i = 0; i < input.length; i++) {\n sum += 1 / input[i];\n }\n\n return sum;\n }", "public static void main(String[] args) {\nint array[]= {13, 25, 9,56,54,89,17};\r\nint sum =0;\r\n\r\nfor (int i=0; i<=6; i++) {\r\n\tsum = sum + array[i];\r\n}\r\nSystem.out.println(\"the sume of the numbers is \" +sum);\r\n\t}", "public int iSumaVec(int[] vector)\r\n\t{\r\n\t\tint iSuma=0;\r\n\t\tfor(int i=0;i<vector.length;i++)\r\n\t\t{\r\n\t\t\tiSuma+=vector[i];\r\n\t\t}\r\n\t\treturn iSuma;\r\n\t}", "public static int sum(int[] arr) throws InterruptedException {\n\t\treturn fjPool.invoke(new ForkJoin(arr, 0, arr.length));\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tint[] a = {1,2,3,4,5,6};\n\t\t\n\tint addition\t=sumofarray(a);\n\tSystem.out.println(addition);\n\t}", "public static double calculateTotals(double[] money) {\n int element = 0; //The element to add\n double total = 0; //The total sales/commissions\n \n while (element < money.length) { //Add each element\n total += money[element];\n element++;\n }\n \n //Return total\n return total;\n }", "public static void plusScalar(double[] array, double value)\r\n\t{\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = array[i] + value;\r\n\t}", "public static void add(int... arr) {\r\n long result = 0;\r\n for (int i : arr) {\r\n result += i;\r\n }\r\n System.out.println(\"Addition is \" + result);\r\n }", "double getSum();", "double getSum();", "public void addAll(T[] arr);", "public static void SumTestCase() {\n\tSystem.out.println(\"\\nQuestion (4) Sum Array\");\n\tSystem.out.println(\"----------------------\");\n\tint N = 100;\n\tint [] A = createAndFillArray( N );\n\tint sum = sumArray(A);\n\tSystem.out.println(\"The sum of \" + A[0] + \" to \" + A[A.length-1] + \" = \" + sum );\n }", "public static long sum(long[] s)\n {\n long sum = 0;\n for (int i = 0; i < s.length; i++) sum = sum + s[i];\n return sum;\n }", "public int addValue(float[] array) {\n int val = hashCode();\n for (float f : array) {\n val = addValue(f);\n }\n return val;\n }", "static int sum(int... args) {\n\t\tint sum = 0;\n\t\tfor (int arg : args)\n\t\t\tsum += arg;\n\t\treturn sum;\n\t}", "public int[] reduce(boolean[] value, int[] sum) {\n if (sum == null) {\n sum = new int[value.length];\n }\n \n for (int cycle = 0; cycle < value.length; cycle++) {\n sum[cycle] += (value[cycle] ? 1 : 0);\n }\n \n return sum;\n }", "public static void main(String[] args) {\n\t\tint arr[] = {-3,8,-2,4,-5,6};\n\t\tint ans = sum(arr);\n\t\tSystem.out.println(ans);\n\t}", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "private int sum(int[] widths) {\n int sum = 0;\n\n for (int width : widths) {\n sum += width;\n }\n\n return sum;\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "public int sum() {\n\n\t\t// Decide the max number of threads required to count.\n\t\tint maxThreads = numArr.length / NUMBERS_PER_THREAD;\n\t\tint reminder = numArr.length % NUMBERS_PER_THREAD;\n\t\tif (reminder > 0) {\n\t\t\tmaxThreads += 1;\n\t\t}\n\n\t\t// The list to which the results should be added.\n\t\tList<Integer> resultList = Collections.synchronizedList(new ArrayList<Integer>());\n\n\t\t// The list containing threads created.\n\t\tList<Thread> threadList = new ArrayList<Thread>();\n\n\t\t// Create and start threads.\n\t\tint fromIndex = 0;\n\t\tfor (int i = 0; i < maxThreads; i++) {\n\t\t\tString threadName = \"Thread-\" + (i + 1);\n\t\t\tArraySumThread thread = new ArraySumThread(threadName, numArr, fromIndex, NUMBERS_PER_THREAD, resultList);\n\t\t\tfromIndex += NUMBERS_PER_THREAD;\n\t\t\tthreadList.add(thread);\n\t\t\tthread.start();\n\t\t}\n\n\t\t// Join all threads.\n\t\tfor (int i = 0; i < threadList.size(); i++) {\n\t\t\tThread thread = threadList.get(i);\n\t\t\t// System.out.println(\"Waiting for end of thread: \" + thread.getName());\n\t\t\ttry {\n\t\t\t\tthread.join();\n\t\t\t\t// System.out.println(\"Finished thread: \" + thread.getName());\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\n\t\t// Sum the values returned added by each thread to the resultList\n\t\tint sum = 0;\n\t\tfor (Integer value : resultList) {\n\t\t\tsum += value;\n\t\t}\n\n\t\t// Return sum.\n\t\treturn sum;\n\t}", "int maxSum(int[] arr){\n\t\tint sum=0;\n\t\tint arrayMin = findMin(arr);\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i] != arrayMin) {\n\t\t\t\tsum += arr[i];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "public long getSum()\n {\n long sum = 0;\n\n for(int i = 0; i < integerList.length; i++)\n {\n sum = sum + integerList[i];\n }\n\n return sum;\n }", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "public static float getTotal(float[] weatherArray){\n float total = 0;\n for (int month = 0;month < 12;month++){\n total += weatherArray[month];\n }\n return total;\n }", "public static int sumOfPositive(Integer array[]) {\n Arrays.sort(array, Comparator.reverseOrder());\n int result = 0;\n for (Integer i : array) {\n if (i > 0) {\n result += i;\n } else {\n break; // выходим из цикла при достижении первого отрицтельного числа. их считать не имеет смысла\n }\n }\n return result;\n }", "int minSum(int[] arr){\n\t\tint sum=0;\n\t\tint arrayMax = findMax(arr);\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i] != arrayMax) {\n\t\t\t\tsum += arr[i];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "public double averageOfArray() {\n double sum = 0;\n double average = 0;\n int i;\n for (i = 0; i < sirDeLa1La100.length; i++) {\n sum = sum + sirDeLa1La100[i];\n }\n average = sum / sirDeLa1La100.length;\n return average;\n }", "public static int average(int[] array){\n int sum = 0;\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n return sum/array.length;\n }", "public T sum();", "public int addValue(Object[] array) {\n int val = hashCode();\n for (Object obj : array) {\n val = addValue(obj);\n }\n return val;\n }", "public static int sum_negative(int[] array) {\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (array[i] < 0) {\n\t\t\t\tsum += array[i];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "private static void sumArray(String[][] arr) {\n int count = 0;\n\n if (arr.length != 4) {\n throw new MyArraySizeException(\"Array row less than 4\", arr.length);\n }\n for (int i = 0; i < arr.length; i++) {\n if (arr[i].length != 4) {\n throw new MyArraySizeException(\"Array column less than 4\", arr[i].length);\n }\n\n for (int j = 0; j < arr[i].length; j++) {\n System.out.printf(\"%-10s\", arr[i][j]);// print array data for visibility\n\n try {\n int x = Integer.parseInt(arr[i][j]);\n count = count + x;\n } catch (NumberFormatException e) {\n throw new MyArrayDataException(\"Wrong type of element: \", \"[\" + i + \"]\" + \"[\" + j + \"]\");\n }\n }\n System.out.println();\n }\n System.out.println(\"array sum: \" + count);\n\n }", "public static int add(int...nums) { // String array + any primitive datatype\n\t\t// we will return the sum of all of the parameters passed:\n\t\tint sum=0;\n\t\t\n\t\tfor (int n : nums) {\n\t\t\t//sum = sum + n; this is the longer way of writing it out...\n\t\t\tsum += n;\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static void main(String[] args) {\n System.out.println(\"Enter no of array elements\");\n Scanner s=new Scanner(System.in);\n int a=s.nextInt();\n int[] arr =new int[a];\n\n System.out.println(\"Enter array elements\");\n for(int i=0;i<arr.length;i++)\n {\n arr[i]=s.nextInt();\n }\n\n\n int sum=0;\n for(int i=0;i<a;i++)\n {\n sum=sum+arr[i];\n }\n System.out.println(\"Sum of array elements \"+sum);\n }", "public int arrayPairSum(int[] nums) {\n\t Arrays.sort(nums);\n\t int sum = 0;\n\t for (int i=0; i+1<nums.length; i += 2) {\n\t sum += nums[i];\n\t }\n\t return sum;\n\t }", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "public static int totalSum(int... result) {\n int score = IntStream.of(result).sum();\n return score;\n }", "public double average(){\n double avg = 0;\n double sum = 0;\n for (T t : arr) {\n // sum += t.doubleValue();\n }\n\n return sum / arr.length;\n }", "public static void sum(int... arg) {\n\n\t\tSystem.out.println(\"in vargs\");\n\t\tint sum = 0;\n\t\tfor (int val : arg)\n\t\t\tsum += val;\n\n\t\tSystem.out.println(sum);\n\t}" ]
[ "0.7831344", "0.78241074", "0.78205097", "0.7746252", "0.77426356", "0.77231205", "0.7699047", "0.76672786", "0.7664455", "0.75517184", "0.7514675", "0.75018895", "0.74624157", "0.74364555", "0.7421816", "0.73734736", "0.73341966", "0.7310643", "0.73003304", "0.7294664", "0.721653", "0.72063917", "0.7169393", "0.700608", "0.69891274", "0.69762176", "0.69122183", "0.6855324", "0.6826052", "0.67942005", "0.67754", "0.6755554", "0.67365485", "0.67298806", "0.67200893", "0.66810757", "0.6668174", "0.66471136", "0.66236806", "0.6574359", "0.65161824", "0.6500165", "0.6495562", "0.6493341", "0.6488141", "0.6472835", "0.6471022", "0.64582103", "0.6453365", "0.64161175", "0.6375446", "0.63676137", "0.63661045", "0.6365255", "0.63606876", "0.6326515", "0.628874", "0.62727326", "0.6270596", "0.6236563", "0.62274045", "0.6210852", "0.6189927", "0.61361355", "0.61328226", "0.61069727", "0.60994196", "0.60963625", "0.60963625", "0.60877717", "0.607904", "0.60692936", "0.60533786", "0.6046397", "0.6045734", "0.603013", "0.6015159", "0.6007782", "0.5932902", "0.5931542", "0.5922335", "0.5921509", "0.59195316", "0.59092015", "0.5902012", "0.5894602", "0.58923745", "0.5889562", "0.58869195", "0.5882041", "0.58788836", "0.5866256", "0.58649766", "0.5848355", "0.5835767", "0.5834436", "0.5814637", "0.5811212", "0.5787389", "0.57789606" ]
0.62924886
56
Return the sum of all diagonal (i==j) elements.
public static int diagSum(int[][] a) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i == j) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "public int diagonalSum(int[][] mat) {\r\n\r\n int rows = mat.length;\r\n int cols = mat[0].length;\r\n int sum = 0;\r\n for (int r = 0; r < rows; r++) {\r\n //sum of right diagonal\r\n sum += mat[r][cols - r - 1];\r\n for (int c = 0; c < cols; c++) {\r\n //sum of left diagonal\r\n if (r == c) {\r\n sum += mat[r][c];\r\n }\r\n }\r\n }\r\n //If N is odd, deduct the duplicate count\r\n return rows % 2 == 1 ? sum - mat[rows / 2][cols / 2] : sum;\r\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public static int noDiagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i != j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public double elementSum() {\n return ops.elementSum(mat);\n }", "private static long sumOfDiagonalsInSquareSpiral(int m) {\n assert m % 2 == 1 : \"Square matrix must be of odd numbered size!\";\n long sum = 0;\n final List<Integer> coefficients = Lists.newArrayList(4, 3, 8, -9);\n final int denominator = 6;\n for (int coefficient : coefficients) {\n sum = sum * m + coefficient;\n }\n return sum / denominator;\n }", "public static double sumMajorDiagonal(double[][] m) {\n double total = 0;\n for (int i = 0; i < m.length; i++) {\n total += m[i][i];\n }\n return total;\n }", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "public void diagonalSum()\r\n {\r\n // Queue which stores tree nodes\r\n Queue<Node> queue = new LinkedList<Node>();\r\n \r\n // Map to store sum of node's data lying diagonally\r\n Map<Integer, Integer> map = new TreeMap<>();\r\n \r\n root.vd = 0;\r\n queue.add(root);\r\n \r\n while (!queue.isEmpty())\r\n {\r\n \tNode current = queue.remove();\r\n int vd = current.vd;\r\n \r\n while (current != null)\r\n {\r\n map.put(vd, map.getOrDefault(vd, 0)+current.data);\r\n \r\n if (current.leftChild != null)\r\n {\r\n current.leftChild.vd = vd+1;\r\n queue.add(current.leftChild);\r\n }\r\n \r\n current = current.rightChild;\r\n }\r\n }\r\n \r\n System.out.println(\"Diagonal sum : \");\r\n for(int val: map.values())\r\n {\r\n \tSystem.out.println(val);\r\n }\r\n }", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "static int diagonalDifference(int[][] arr) {\n return Math.abs(leftDiagonalSum(arr) - rightDiagonalSum(arr));\n }", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "public static int diagonalDifference(List<List<Integer>> arr) {\n int pDia = 0;\n int sDia = 0;\n int counter = arr.size();\n for (int i = 0; i < arr.size(); i++) {\n List<Integer> row = arr.get(i);\n\n pDia = pDia + row.get(i);\n counter = counter-1;\n sDia = sDia + row.get(counter);\n }\n return Math.abs(pDia-sDia) ;\n }", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "@Override\n\tpublic double calculaDiagonal() {\n\t\treturn 0;\n\t}", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "private int getSum(int[] freq, int i, int j) {\n int sum = 0;\n for (int x = i; x <= j; x++) {\n sum += freq[x];\n }\n return sum;\n }", "private int diagonalCount() {\n\t\treturn Math.abs(destRow-curRow) > Math.abs(destCol-curCol) ?\n\t\t\t Math.abs(destCol-curCol) : Math.abs(destRow-curRow);\n\t}", "private static int sum(List<Integer> L, int i,int j) {\n\t\tSystem.out.println(L+\"\\n\"+\"index i = \"+i+\"\\n\"+\"index j = \"+j);\n\t\tList<Integer> subListToSum = new ArrayList<Integer>();\n\t\t\n\t\tif (i <= j) { //make sure that i is less than j so we have a sublist of at least one\n\t\t\tsubListToSum.addAll(L.subList(i, j));\n\t\t\t\n\t\t}\n\t\t\n\t\telse if (i > j) { //print out a error so the user knows what they did wrong\n\t\t\tSystem.out.println(\"index 'i' is more than index 'j'\");\n\t\t}\n\t\t\n\t\tint sizeList = L.size(); //only reaches here if i <= j\n\t\tSystem.out.println(\"size of list is: \" + sizeList);\n\t\tif (j <= sizeList & i <= sizeList) { //check to account for out of bounds and negatives\n\t\t\tint result = 0;\n\t\t\t\n\t\t\tfor (int allInts : subListToSum) {\n\t\t\t\tresult += allInts;\n\t\t\t};\n\t\t\t\n\t\t\tSystem.out.println(\"Sum(\" + i + \", \" + j + \")\" + \" = \" + result);\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "public int sum()\n {\n return sum(0,0,size);\n }", "public static double[][] integralMatrix (double[][] in) {\n\t\tint rows = in.length;\n\t\tint cols = in[0].length;\n\t\t\n\t\t\n\t\t// store submatrix sums, indexed by bottom-right corner of sub-matrix.\n\t\tdouble[][] integral = new double[rows][cols];\n\t\t\n\t\t// store column sums, indexed by bottom entry\n\t\tdouble[][] columnSums = new double[rows][cols];\n\t\t\n\t\t// initialize in[0][0]\n\t\tintegral[0][0] = in[0][0];\n\t\tcolumnSums[0][0] = in[0][0];\n\t\t\n\t\t// initialize left edge\n\t\tfor (int i = 1; i < rows; i++) {\n\t\t\tintegral[i][0] = in[i][0] + integral[i-1][0];\n\t\t\tcolumnSums[i][0] = columnSums[i-1][0];\n\t\t}\n\t\t\n\t\t// initialize top edge\n\t\tfor (int j = 1; j < cols; j++) {\n\t\t\tintegral[0][j] = in[0][j] + integral[0][j-1];\n\t\t\tcolumnSums[0][j] = in[0][j];\n\t\t}\n\n\t\tfor (int i = 1; i < rows; i++) {\n\t\t\tfor (int j = 1; j < cols; j++) {\n\t\t\t\tintegral[i][j] = in[i][j] + integral[i][j-1] + columnSums[i-1][j];\n\t\t\t\tcolumnSums[i][j] = in[i][j] + columnSums[i-1][j];\n\t\t\t}\n\t\t}\t\n\t\treturn integral;\n\t}", "public int sumOfEvenNumbers()\n {\n // TODO: Return the sum of all the numbers which are even\n int sum = 0;\n for (int i =0; i< matrix.length; i++){\n for (int j = 0; j< matrix[0].length; j++){\n if(matrix[i][j]%2==0){\n sum+= matrix[i][j];\n }\n }\n }\n return sum;\n }", "private int cell(int j) \r\n\t{\n\t\tint i=1,sum=0;\r\n\t\tfor(i=1;i<=j;i++)\r\n\t\t{\r\n\t\t\tsum=sum+i;\r\n\t\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int sumRow2(int r, int[][] m)\t//same concept as above but with FOREACH loop\n {\n\t int sum = 0;\n\n\t for ( int i : m[r]) {\n\n\t\t sum += i;\n\n\t }\n\n\t return sum;\n }", "private int getSumH(int[][] a, int jh) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[jh][j];\n }\n return sum;\n }", "static int diagonalDifference(int[][] matrix) {\n int ltr = 0;\n int rtl = 0;\n for (int i = 0; i < matrix.length; i++) {\n System.out.println(\"matrix[\" + i + \"][\" + i + \"]: \" + matrix[i][i]);\n ltr += matrix[i][i];\n System.out.println(\"matrix[ \" + (i) + \"][\" + (matrix.length - 1 - i) + \"]: \" + matrix[matrix.length - 1 - i][matrix.length - 1 - i]);\n rtl += matrix[i][matrix.length - 1 - i];\n }\n int result = ltr - rtl;\n return result < 0 ? result * -1 : result;\n }", "public int sumRange(int i, int j) {\n return sum[j + 1] - sum[i];\n }", "@Override\n\tpublic double diagonal() {\n\t\treturn getBase()*Math.sqrt(2);\n\t}", "static int diagonalDifference(int[][] arr) {\n int leftDiag=0;\n int rigthDiag=0;\n for(int i =0;i<arr.length;i++){\n for(int j=0;j<arr.length;j++){\n if(i==j){\n leftDiag+=arr[i][j];\n }\n if(i+j==arr.length-1){\n rigthDiag+=arr[i][j];\n }\n }\n }\n return Math.abs(leftDiag-rigthDiag);\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[][] matrrix = new int[n][n];\n\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n matrrix[i][j] = scanner.nextInt();\n }\n }\n int mainDiagonal = 0, secondDiagonal = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (i == j) {\n mainDiagonal += matrrix[i][j];\n }\n if (Math.abs(i + j) == (n - 1)) {\n secondDiagonal += matrrix[i][j];\n }\n }\n }\n System.out.println(Math.abs(mainDiagonal - secondDiagonal));\n\n }", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "public int[] findDiagonalOrder(int[][] matrix) {\n \n int n = matrix.length; if(n == 0) return new int[0];\n int m = matrix[0].length; if(m == 0) return new int[0];\n int i = 0, j = 0, idx = 0;\n int[] ret = new int[n*m];\n boolean up = true;\n while(i < n && j < m){\n ret[idx++] = matrix[i][j];\n if(up){\n if(inBound(i-1, n, j+1, m)){\n i = i-1; j = j+1;\n }else if(inBound(i, n, j+1, m)){ //try right\n j = j+1; up = !up;\n }else if(inBound(i+1, n, j, m)){ // try bot\n i = i+1; up = !up;\n }else{\n i++; j++; // hit end;\n }\n }else{\n if(inBound(i+1, n, j-1, m)){\n i = i+1; j = j-1;\n }else if(inBound(i+1, n, j, m)){ // try bot\n i = i+1; up = !up;\n }else if(inBound(i, n, j+1, m)){ // try right\n j = j+1; up = !up;\n }else{\n i++; j++; // hit end;\n }\n }\n }\n return ret;\n }", "private int getSumV(int[][] a, int jv) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][jv];\n }\n return sum;\n }", "public Map<Integer, Integer> diagonalSum(TreeNode root) {\n Map<Integer, Integer> result = new HashMap<Integer, Integer>();\n\n Queue<DiagonalNode> queue = new LinkedList<DiagonalNode>();\n queue.offer(new DiagonalNode(root, 0));\n\n while (!queue.isEmpty()) {\n DiagonalNode dn = queue.poll();\n TreeNode node = dn.node;\n while (node != null) {\n int sum = result.containsKey(dn.level) ? result.get(dn.level) : 0;\n result.put(dn.level, sum + node.val);\n\n if (node.left != null) {\n queue.offer(new DiagonalNode(node.left, dn.level + 1));\n }\n\n node = node.right;\n }\n }\n }", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "public static int subMatrixSum(int[][] a, int startCol, int endCol,\r\n\t\t\tint startRow, int endRow) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i >= startRow && i <= endRow && j >= startCol\r\n\t\t\t\t\t\t&& j <= endCol) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int sumRow2(int r, int[][] m)\n {\n int sum = 0; //initialize sum\n for ( int i : m[r]) { //for each value of a certain row of m...\n\t sum += m[r][i]; //set sum as the addition of the previous sum and\n\t //the point in question\n }\n return sum; //return the sum\n }", "public int sumRange0(int i, int j) {\n\t\t\treturn map.get(i) - map.get(j) + nums[j];\n\t\t}", "public static void SumRowsColumns(int[][] array) {\n\n }", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "public abstract double getDiagonal();", "public int minPathSum(int[][] grid) {\n\t\tint m = grid.length;\n\t\tint n = grid[0].length;\n\t\tif (n < m) {\n\t\t\tint[] dp = new int[n];\n\t\t\tdp[n-1] = grid[m-1][n-1];\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[m-1][i] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tfor(int j = n-1; j >= 0; j--) {\n\t\t\t\t\tif(j == n-1) {\n\t\t\t\t\t\tdp[j] += grid[i][j];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[i][j] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t} else {\n\t\t\tint[] dp = new int[m];\n\t\t\tdp[m-1] = grid[m-1][n-1];\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[i][n-1] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tfor(int j = m-1; j >= 0; j--) {\n\t\t\t\t\tif(j == m-1) {\n\t\t\t\t\t\tdp[j] += grid[j][i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[j][i] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t}\n\t}", "private static void sum(int[][] first, int[][] second) {\r\n\t\tint row = first.length;\r\n\t\tint column = first[0].length;\r\n\t\tint[][] sum = new int[row][column];\r\n\r\n\t\tfor (int r = 0; r < row; r++) {\r\n\t\t\tfor (int c = 0; c < column; c++) {\r\n\t\t\t\tsum[r] = first[r] + second[r];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"\\nSum of Matrices:\\n\");\r\n\t\tprint2dArray(sum);\r\n\t}", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "public double diagonal()\n {\n double diagonal = Math.sqrt(Math.pow(width,2) + Math.pow(length,2));\n //System.out.println(diagonal);\n return diagonal;\n }", "public static void main(String[] args) {\n int[][] matrix = {{1,2}, {3,4}};\n // int[][] matrix = {{1,2}, {3,4}};\n// printMatrixDiagonal (matrix, matrix.length);\n int[] result = findDiagonalOrder (matrix);\n for ( int i:result ){\n System.out.println (i);\n }\n\n }", "public static int rangeQuerySum(int arr[], int i, int j) {\n if (i == 0)\n return arr[j];\n else\n return (arr[j] - arr[i - 1]);\n }", "public int sumRegion(int row1, int col1, int row2, int col2) {\n int ret = 0;\n\n for (int j = row1; j <= row2; j++){\n if (col1 == 0) \n ret += rowSums[j][col2];\n else \n ret += rowSums[j][col2] - rowSums[j][col1 - 1];\n }\n\n return ret;\n }", "public static int[][] horizontalSums(int[][] a, int sumToFind){\r\n\t\tint [][]b = new int[a.length][a[0].length] ;\r\n\t\tfor (int r=0;r<a.length;r++) {\r\n\t\t\tfor(int c=0;c<a[0].length;c++){\r\n\t\t\tint sum=0;\r\n\t\t\t//int temp=0;\r\n\t\t\tint temp;\r\n\t\t\t\r\n\t\t\t//int column=0;\r\n\t\t\tfor (temp=c; temp<a[r].length && sum!=sumToFind;temp++){\r\n\t\t\t\tsum=sum+a[r][temp] ; \r\n\t\t\t}\r\n\t\t\tif(sum==sumToFind){\r\n\t\t\t\tfor (int i=c; i<temp;i++) {\r\n\t\t\t\t\tb[r][i]=a[r][i] ;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\treturn b ;\r\n\t}", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "public static int sum (IntVector iv) {\n if (iv.isEmpty())\n return 0;\n else\n return iv.head() + sum(iv.tail());\n }", "static int hourglassSum(int[][] arr) {\n int answer = 0 ;\n\n// validatable vertexes\n// i = 1,2,3,4\n// j = 1,2,3,4\n\n int[] adjacentArrX = {-1, -1,-1,0, 1,1,1};\n int[] adjacentArrY = {-1, 0, 1, 0, -1, 0, 1};\n\n for (int i = 1; i < 5; i++) {\n for (int j = 1; j < 5; j++) {\n int nowValue = Integer.MIN_VALUE;\n for (int r = 0; r < adjacentArrX.length; r++) {\n nowValue += arr[i + adjacentArrX[r]][j + adjacentArrY[r]];\n }\n answer = Math.max(answer, nowValue);\n }\n }\n\n\n return answer;\n\n }", "public int fillingOfMatrix(){\n int count=0;\n for (int i=0;i<m;i++)\n count+=matrix[i].size();\n return count;\n }", "public static int partOfRowSum(int[][] a, int rowIndex, int startCol,\r\n\t\t\tint endCol) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == rowIndex && j >= startCol && j <= endCol) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int[][] subSum(int[] list){\n\tint n=list.length;\n\tS=new int[n][n];\n\t//initialize S from list values\n\tfor (int i = 0; i < n; i++) {\n\t\tS[i][i]=list[i];\n\t}\n\t//calculate the values by bottom up fashion\n\tfor (int k = 1; k < n; k++) {\n\t\tint i=0;\n\t\tint j=i+k;\n\t\twhile(j<n && i<j){\n\t\t if(i!=j)\n\t\t\tS[i][j]=S[i][i]+S[i+1][j];\n\t\t i=i+1;\n\t\t j=i+k;\n\t\t}\n\t}\n\treturn S;\n}", "public int minPathSum(int[][] grid) {\n if (grid==null || grid.length==0)\n return 0;\n int m = grid.length;\n int n = grid[0].length;\n for (int i=0; i<m; i++) {\n for (int j=0; j<n; j++) {\n if (i==0 && j==0)\n continue;\n int up = i > 0 ? grid[i-1][j] : Integer.MAX_VALUE;\n int left = j > 0 ? grid[i][j-1] : Integer.MAX_VALUE;\n grid[i][j] += (left > up ? up : left);\n }\n }\n return grid[m-1][n-1];\n }", "public int[][] sumOfMatrices(int row, int col, int array1[][], int array2[][]) {\n int[][] sum = new int[row][col];\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n sum[i][j] = array1[i][j] + array2[i][j];\n }\n }\n return sum;\n }", "public int[] findDiagonalOrder(List<List<Integer>> nums) {\n\t\tMap<Integer, Stack<Integer>> map = new LinkedHashMap<>();\n\t\tint c = 0;\n\t\tfor (int i = 0; i < nums.size(); i++) {\n\t\t\tfor (int j = 0; j < nums.get(i).size(); j++) {\n\t\t\t\tmap.putIfAbsent(i + j, new Stack<>());\n\t\t\t\tmap.get(i + j).push(nums.get(i).get(j));\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tint[] res = new int[c];\n\t\tint i = 0;\n\t\tfor (Stack<Integer> stack : map.values()) {\n\t\t\twhile (!stack.isEmpty())\n\t\t\t\tres[i++] = stack.pop();\n\t\t}\n\t\treturn res;\n\t}", "public void sum2(int n){\n int sum =0; //1\n for (int j = 0; j < n; j++) //2n+2\n for (int k = 0; k < n; k++) //2n+2\n sum += k + j; //1\n for (int l = 0; l < n; l++) //2n+2\n sum += l; //1\n }", "public static int sumRow( int r, int[][] a )\n {\n int sum = 0; //initialize sum\n for (int i = 0; i < a[r].length; i++) { //for the width of an array...\n\t sum += a[r][i]; //add the point to the sum\n }\n return sum; //return sum, an int\n }", "private String getSumString(int[][] input)\n {\n int sum = 0;\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sum += input[i][j];\n }\n }\n return Integer.toString(sum);\n }", "public int iSumaVec(int[] vector)\r\n\t{\r\n\t\tint iSuma=0;\r\n\t\tfor(int i=0;i<vector.length;i++)\r\n\t\t{\r\n\t\t\tiSuma+=vector[i];\r\n\t\t}\r\n\t\treturn iSuma;\r\n\t}", "public static long checksum(int[][] m){\n long s = 0;\n for (int i = 0; i < m.length; i++)\n for (int j = 0; j < m[0].length; j++)\n s += m[i][j];\n return s;\n }", "private int[] diagnalUpward(List<Integer> resList, int rowIdx, int colIdx, int[][] matrix) {\n int row = matrix.length;\n int col = matrix[0].length;\n\n while ((rowIdx >= 0 && rowIdx < row) && (colIdx >= 0 && colIdx < col)) {\n resList.add(matrix[rowIdx][colIdx]);\n rowIdx--;\n colIdx++;\n }\n rowIdx++;\n colIdx--;\n // Compute new starting point: try to go right, if reaches the end then go down.\n if (colIdx == col - 1) return new int[]{rowIdx + 1, colIdx};\n return new int[]{rowIdx, colIdx + 1};\n }", "public static double m(int i){\n double sum = 0;\n for (int j = 1; j <= i; j++)\n sum += j / (j + 1.0);\n return sum;\n }", "public static int iAdd(int i, int j) {\n \t\treturn i + j;\n \t}", "static long subArraySum(int[] data) {\n\n long result = 0;\n\n // computing sum of sub array using formula\n int n = data.length;\n for (int i = 0; i < n; i++) {\n // x * (x at first index) + (x at other indices)\n result += (data[i] * (i * (n - i) + (n - i)));\n//\t\t\tresult += (data[i] * (i + 1) * (n - i));\n }\n\n // return all sub array sum\n return result;\n }", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "public static int minPathSum(int[][] grid) {\n if (grid == null || grid.length == 0 || grid[0].length == 0)\n return 0;\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (i == 0 && j == 0) {\n } else if (i == 0 && j > 0)\n grid[i][j] += grid[i][j-1];\n else if (j == 0 && i > 0)\n grid[i][j] += grid[i-1][j];\n else \n grid[i][j] += Math.min(grid[i][j-1], grid[i-1][j]);\n }\n }\n return grid[grid.length-1][grid[0].length-1];\n }", "double getSum();", "double getSum();", "private int[][] matrixSum(int[][] a, int[][]b) {\n\t\tint row = a.length;\n\t\tint col = a[0].length;\n\t\t// creat a matrix array to store sum of a and b\n\t\tint[][] sum = new int[row][col];\n\t\t\n\t\t// Add elements at the same position in a matrix array\n\t\tfor (int r = 0; r < row; r++) {\n\t\t\tfor (int c = 0; c < col; c++) {\n\t\t\t\tsum[r][c] = a[r][c] + b[r][c]; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static int[] findDiagonalOrder(int[][] matrix){\n if( matrix == null || matrix.length == 0)\n return new int[0];\n int i = 0;\n int j =0;\n int k = 0;\n int size = matrix.length * matrix[0].length;\n int[] result = new int[size];\n boolean moveUp =true;\n while(k< size){\n\n if(moveUp){\n for(;i >=0 && j<= matrix[0].length-1;i--, j++){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving up there are two conditions\n// 1. only row moves beyod 0 th row and column is in range (check for both row and column)\n //2. both row and column moves out ( check for column only)\n //case 1\n if(i<0 && j <= matrix[0].length-1){\n i = 0; // reset row to 0 and move down\n moveUp = !moveUp;\n }\n //case 2\n if(j == matrix[0].length){\n i = i+2; // reset row\n j--; // reduce column and move down\n moveUp = !moveUp;\n }\n\n }\n else\n {\n // moving down increment row and decrement column\n for(;j>=0 && i <= matrix.length - 1; i++, j-- ){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving down there are two cases\n // 1. column goes out but rows in order (we need to check both)\n // 2. both column and row goes out (we can only have row check)\n if(j < 0 && i<= matrix.length-1){\n j = 0;\n moveUp = !moveUp;\n }\n if( i == matrix.length){\n j = j+2;\n i--;\n moveUp = !moveUp;\n }\n\n }\n\n\n }\n return result;\n }", "public int minPathSum(int[][] grid) {\n\t\treturn 0;\r\n }", "public long iterativeSum(long n){\n long result = 0;\n for(long i = 1L; i <= n; i++){\n result += i;\n }\n return result;\n }", "@Override\n\tpublic IDoubleVector sumColumns() {\n\t\treturn null;\n\t}", "public static double dAdd(double i, double j) {\n \t\treturn i + j;\n \t}", "public double negativeElementsSum(double[] arr) {\n return 0;\n }", "public double sumXs() {\n double $ = 0;\n for (int ¢ = 0; ¢ < xVals.size(); ++¢)\n $ += unbox(cantBeNull(xVals.get(¢)));\n return $;\n }\n\n // calculate the sum of all the y values\n public double sumYs() {\n double $ = 0;\n for (int ¢ = 0; ¢ < yVals.size(); ++¢)\n $ += unbox(cantBeNull(yVals.get(¢)));\n return $;\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n //System.out.println(N);\n int[][] array = new int[N][N];\n for(int i = 0 ; i < N ; i++){\n for(int j =0 ; j < N; j++){\n int val = in.nextInt();\n array[i][j] = val; \n } \n }\n int sum1 = 0;\n for(int i = 0 ; i < N ; i++){\n sum1+= array[i][i];\n }\n //System.out.println(sum1);\n int sum2 = 0;\n int tempCol =N-1;\n for(int i =0 ; i < N ; i++){\n sum2+= array[i][tempCol];\n tempCol--;\n }\n //System.out.println(sum2);\n sum1 = Math.abs(sum1-sum2);\n System.out.println(sum1);\n }", "public int getSum() {\n\t\t\treturn 0;\r\n\t\t}", "public T diag() {\n return wrapMatrix(ops.diag(mat));\n }", "public static int sumAll(int n1,int n2) {\n int sum=0;\n for(int i=0;i<12;sum+=weights[n1][n2][i],i++);\n return sum;\n }", "public void Sumatoria()\n {\n for (int i = 0; i < vector1.length; i++) {\n sumatoria[i]=vector1[i]+vector2[i];\n }\n }", "protected int sumRow(Label l){\n\t\tint sum = 0;\n\n\t\tint rowIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(rowIx).get(i);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "public static int rowSum(int[][] a, int rowIndex) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == rowIndex) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public double sum()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += c;\r\n\r\n return sum;\r\n }", "public static int partOfColSum(int[][] a, int colIndex, int startRow,\r\n\t\t\tint endRow) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (j == colIndex && i >= startRow && i <= endRow) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "@Override\n\tpublic IDoubleVector sumRows() {\n\t\treturn null;\n\t}", "public int subarraySum(int[] nums, int k) {\n if (nums == null) {\n return 0;\n }\n\n int count = 0;\n\n for (int i = 0; i < nums.length; i++) {\n int delta = k;\n\n int j = i;\n while (j < nums.length) {\n delta = delta - nums[j];\n if (delta == 0) {\n count++;\n }\n j++;\n }\n }\n\n return count;\n }", "public double getTotalSumSquares() {\n if (n < 2) {\n return Double.NaN;\n }\n return sumYY;\n }", "public void sum(int n) {\n int sum = 0;\n for (int j = 0; j < n; j++) // 2n+2\n sum += j;\n for (int k = 0; k < n; k++) // 2n+2\n sum += k;\n for (int l = 0; l < n; l++) //2n+2\n sum += l;\n }", "private int checkDiagonal() {\n if ((this.board[0][0] == this.board[1][1]) && this.board[0][0] == this.board[2][2]) {\n return this.board[0][0];\n } else if ((this.board[0][2] == this.board[1][1]) && this.board[0][2] == this.board[2][0]) {\n return this.board[0][2];\n } else {\n return 0;\n }\n }", "public int sumOfElements(){\n\t\tint sum = 0;\n\t\tNode temp = this.head;\n\t\twhile(temp != null){\n\t\t\tsum += temp.data;\n\t\t\ttemp = temp.next;\n\t\t}\n\t\treturn sum;\n\t}" ]
[ "0.6934426", "0.6579347", "0.65176785", "0.6514015", "0.624927", "0.6105789", "0.6058385", "0.59780496", "0.59087247", "0.58574235", "0.5850037", "0.58033586", "0.5755453", "0.57480025", "0.56797516", "0.5675672", "0.5642911", "0.563413", "0.55823433", "0.5580693", "0.5540058", "0.55340505", "0.5517033", "0.5511209", "0.54587424", "0.54561335", "0.54512763", "0.5438056", "0.542192", "0.5412527", "0.5396786", "0.5383433", "0.53761744", "0.53740335", "0.53561574", "0.53323394", "0.52969337", "0.52961665", "0.52892154", "0.52647495", "0.5255776", "0.52509516", "0.5243088", "0.5242056", "0.52202845", "0.52154845", "0.52061874", "0.519187", "0.51911056", "0.51852614", "0.51655406", "0.51593494", "0.51543874", "0.515426", "0.51500034", "0.5144911", "0.51392627", "0.5120218", "0.5118673", "0.5110154", "0.5050041", "0.504384", "0.5038964", "0.5038015", "0.50089777", "0.49570143", "0.49492708", "0.49455708", "0.4937098", "0.49339175", "0.49233907", "0.4917891", "0.4910325", "0.49032623", "0.48937422", "0.48936763", "0.48936763", "0.48878402", "0.48826542", "0.4873949", "0.48647216", "0.4858106", "0.4856287", "0.48433575", "0.48358908", "0.48242527", "0.48213264", "0.48208612", "0.48192513", "0.4808992", "0.48089322", "0.48083013", "0.4801259", "0.47958606", "0.47948647", "0.4784898", "0.47819233", "0.47800127", "0.47794473", "0.4776889" ]
0.69867116
0
Return the sum of all elements except diagonal (i==j) ones.
public static int noDiagSum(int[][] a) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i != j) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int diagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int diagonalSum(int[][] mat) {\r\n\r\n int rows = mat.length;\r\n int cols = mat[0].length;\r\n int sum = 0;\r\n for (int r = 0; r < rows; r++) {\r\n //sum of right diagonal\r\n sum += mat[r][cols - r - 1];\r\n for (int c = 0; c < cols; c++) {\r\n //sum of left diagonal\r\n if (r == c) {\r\n sum += mat[r][c];\r\n }\r\n }\r\n }\r\n //If N is odd, deduct the duplicate count\r\n return rows % 2 == 1 ? sum - mat[rows / 2][cols / 2] : sum;\r\n }", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "static int diagonalDifference(int[][] arr) {\n return Math.abs(leftDiagonalSum(arr) - rightDiagonalSum(arr));\n }", "public static int diagonalDifference(List<List<Integer>> arr) {\n int pDia = 0;\n int sDia = 0;\n int counter = arr.size();\n for (int i = 0; i < arr.size(); i++) {\n List<Integer> row = arr.get(i);\n\n pDia = pDia + row.get(i);\n counter = counter-1;\n sDia = sDia + row.get(counter);\n }\n return Math.abs(pDia-sDia) ;\n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "public static double sumMajorDiagonal(double[][] m) {\n double total = 0;\n for (int i = 0; i < m.length; i++) {\n total += m[i][i];\n }\n return total;\n }", "public int sumOfEvenNumbers()\n {\n // TODO: Return the sum of all the numbers which are even\n int sum = 0;\n for (int i =0; i< matrix.length; i++){\n for (int j = 0; j< matrix[0].length; j++){\n if(matrix[i][j]%2==0){\n sum+= matrix[i][j];\n }\n }\n }\n return sum;\n }", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "int countSusbset(int n, int w){\n int dp[][] = new int[n+1][w+1];\n for(int i=0;i<=n;i++){\n for(int j=0;j<=w;j++){\n //when no items are there and target sum is 0, only one empty subset is possible\n if(i == 0 && j == 0){\n dp[i][j] = 1;\n }\n //no items left and target sum is greater than 0, no set is possible\n else if(i == 0 && j > 0){\n dp[i][j] = 0; \n }\n //if target sum is 0, no matter how many items we have , only one empty subset is possible\n else if(j == 0){\n dp[i][j] = 1;\n }\n //since item > target sum, so exclude\n else if(arr[i-1] > j){\n dp[i][j] = dp[i-1][j];\n }else{\n //two cases include and exclude\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }\n }\n }\n return dp[n][w];\n}", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "private static long sumOfDiagonalsInSquareSpiral(int m) {\n assert m % 2 == 1 : \"Square matrix must be of odd numbered size!\";\n long sum = 0;\n final List<Integer> coefficients = Lists.newArrayList(4, 3, 8, -9);\n final int denominator = 6;\n for (int coefficient : coefficients) {\n sum = sum * m + coefficient;\n }\n return sum / denominator;\n }", "static int diagonalDifference(int[][] arr) {\n int leftDiag=0;\n int rigthDiag=0;\n for(int i =0;i<arr.length;i++){\n for(int j=0;j<arr.length;j++){\n if(i==j){\n leftDiag+=arr[i][j];\n }\n if(i+j==arr.length-1){\n rigthDiag+=arr[i][j];\n }\n }\n }\n return Math.abs(leftDiag-rigthDiag);\n }", "public int manhattan() {\n int sum = 0;\n for (int i = 0; i < blocks.length; i++){\n for (int j = 0; j < blocks.length; j++){\n int value = blocks[i][j];\n if (value == 0)\n continue;\n\n sum += Math.abs((value-1) / dimension() - i);\n sum += Math.abs((value-1) % dimension() - j);\n }\n }\n return sum;\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "public int minPathSum(int[][] grid) {\n\t\treturn 0;\r\n }", "@Override\n\tpublic double calculaDiagonal() {\n\t\treturn 0;\n\t}", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int minPathSum(int[][] grid) {\n\t\tint m = grid.length;\n\t\tint n = grid[0].length;\n\t\tif (n < m) {\n\t\t\tint[] dp = new int[n];\n\t\t\tdp[n-1] = grid[m-1][n-1];\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[m-1][i] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tfor(int j = n-1; j >= 0; j--) {\n\t\t\t\t\tif(j == n-1) {\n\t\t\t\t\t\tdp[j] += grid[i][j];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[i][j] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t} else {\n\t\t\tint[] dp = new int[m];\n\t\t\tdp[m-1] = grid[m-1][n-1];\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[i][n-1] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tfor(int j = m-1; j >= 0; j--) {\n\t\t\t\t\tif(j == m-1) {\n\t\t\t\t\t\tdp[j] += grid[j][i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[j][i] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t}\n\t}", "boolean getComputeSumNull();", "public double negativeElementsSum(double[] arr) {\n return 0;\n }", "static int diagonalDifference(int[][] matrix) {\n int ltr = 0;\n int rtl = 0;\n for (int i = 0; i < matrix.length; i++) {\n System.out.println(\"matrix[\" + i + \"][\" + i + \"]: \" + matrix[i][i]);\n ltr += matrix[i][i];\n System.out.println(\"matrix[ \" + (i) + \"][\" + (matrix.length - 1 - i) + \"]: \" + matrix[matrix.length - 1 - i][matrix.length - 1 - i]);\n rtl += matrix[i][matrix.length - 1 - i];\n }\n int result = ltr - rtl;\n return result < 0 ? result * -1 : result;\n }", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "static int hourglassSum(int[][] arr) {\n int answer = 0 ;\n\n// validatable vertexes\n// i = 1,2,3,4\n// j = 1,2,3,4\n\n int[] adjacentArrX = {-1, -1,-1,0, 1,1,1};\n int[] adjacentArrY = {-1, 0, 1, 0, -1, 0, 1};\n\n for (int i = 1; i < 5; i++) {\n for (int j = 1; j < 5; j++) {\n int nowValue = Integer.MIN_VALUE;\n for (int r = 0; r < adjacentArrX.length; r++) {\n nowValue += arr[i + adjacentArrX[r]][j + adjacentArrY[r]];\n }\n answer = Math.max(answer, nowValue);\n }\n }\n\n\n return answer;\n\n }", "public int hamming() {\n int c = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n int x = tiles[i][j];\n if (x == 0) continue;\n if (x != i*n + j + 1) c++;\n }\n }\n return c;\n }", "private int diagonalCount() {\n\t\treturn Math.abs(destRow-curRow) > Math.abs(destCol-curCol) ?\n\t\t\t Math.abs(destCol-curCol) : Math.abs(destRow-curRow);\n\t}", "private int cell(int j) \r\n\t{\n\t\tint i=1,sum=0;\r\n\t\tfor(i=1;i<=j;i++)\r\n\t\t{\r\n\t\t\tsum=sum+i;\r\n\t\t\t}\r\n\t\treturn sum;\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[][] matrrix = new int[n][n];\n\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n matrrix[i][j] = scanner.nextInt();\n }\n }\n int mainDiagonal = 0, secondDiagonal = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (i == j) {\n mainDiagonal += matrrix[i][j];\n }\n if (Math.abs(i + j) == (n - 1)) {\n secondDiagonal += matrrix[i][j];\n }\n }\n }\n System.out.println(Math.abs(mainDiagonal - secondDiagonal));\n\n }", "public int minPathSum(int[][] grid) {\n if (grid==null || grid.length==0)\n return 0;\n int m = grid.length;\n int n = grid[0].length;\n for (int i=0; i<m; i++) {\n for (int j=0; j<n; j++) {\n if (i==0 && j==0)\n continue;\n int up = i > 0 ? grid[i-1][j] : Integer.MAX_VALUE;\n int left = j > 0 ? grid[i][j-1] : Integer.MAX_VALUE;\n grid[i][j] += (left > up ? up : left);\n }\n }\n return grid[m-1][n-1];\n }", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "public static int minPathSum(int[][] grid) {\n return 0;\n }", "public static int sumAll(int n1,int n2) {\n int sum=0;\n for(int i=0;i<12;sum+=weights[n1][n2][i],i++);\n return sum;\n }", "int nnzInColumnSum(int[] colIds) {\n // Give a guess to the size of the union\n int totalSize = 0;\n for (int colId : colIds) {\n totalSize += this.getColumn(colId).size();\n }\n // Take union\n IntSet colIdUnion = new IntOpenHashSet(totalSize, 0.99F);\n for (int colId : colIds) {\n synchronized (this.getColumn(colId)) {\n colIdUnion.addAll(this.getColumn(colId));\n }\n }\n return colIdUnion.size();\n }", "public int hamming() {\n int hammingDis = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (matrix[i][j] == 0) continue;\n if (i*N+j+1 != matrix[i][j]) hammingDis++;\n }\n }\n return hammingDis;\n }", "private int getSum(int[] freq, int i, int j) {\n int sum = 0;\n for (int x = i; x <= j; x++) {\n sum += freq[x];\n }\n return sum;\n }", "public static int minPathSum(int[][] grid) {\n if (grid == null || grid.length == 0 || grid[0].length == 0)\n return 0;\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (i == 0 && j == 0) {\n } else if (i == 0 && j > 0)\n grid[i][j] += grid[i][j-1];\n else if (j == 0 && i > 0)\n grid[i][j] += grid[i-1][j];\n else \n grid[i][j] += Math.min(grid[i][j-1], grid[i-1][j]);\n }\n }\n return grid[grid.length-1][grid[0].length-1];\n }", "public int manhattan() {\n int sum = 0;\n int index = 0;\n\n for (int row = 0; row < N; row++)\n for (int col = 0; col < N; col++) {\n int correctIdx = tiles[row][col] - 1;\n\n if (correctIdx != -1 && correctIdx != index) {\n sum += Math.abs((correctIdx / N) - row);\n sum += Math.abs((correctIdx % N) - col);\n }\n index++;\n }\n return sum;\n }", "public void diagonalSum()\r\n {\r\n // Queue which stores tree nodes\r\n Queue<Node> queue = new LinkedList<Node>();\r\n \r\n // Map to store sum of node's data lying diagonally\r\n Map<Integer, Integer> map = new TreeMap<>();\r\n \r\n root.vd = 0;\r\n queue.add(root);\r\n \r\n while (!queue.isEmpty())\r\n {\r\n \tNode current = queue.remove();\r\n int vd = current.vd;\r\n \r\n while (current != null)\r\n {\r\n map.put(vd, map.getOrDefault(vd, 0)+current.data);\r\n \r\n if (current.leftChild != null)\r\n {\r\n current.leftChild.vd = vd+1;\r\n queue.add(current.leftChild);\r\n }\r\n \r\n current = current.rightChild;\r\n }\r\n }\r\n \r\n System.out.println(\"Diagonal sum : \");\r\n for(int val: map.values())\r\n {\r\n \tSystem.out.println(val);\r\n }\r\n }", "static boolean subSetSumProblem(int[] arr,int sum){\n// init\n int n = arr.length;\n boolean[][] dp = new boolean[n+1][sum+1];\n\n for (int j = 0;j<=sum;j++){\n dp[0][j] = false;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = true;\n }\n\n for (int i = 1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] || dp[i-1][j-arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public int sumRegion(int row1, int col1, int row2, int col2) {\n int ret = 0;\n\n for (int j = row1; j <= row2; j++){\n if (col1 == 0) \n ret += rowSums[j][col2];\n else \n ret += rowSums[j][col2] - rowSums[j][col1 - 1];\n }\n\n return ret;\n }", "private static int totalNumberOfWays(int[] coins, int sum) {\n\t\tif(coins.length == 0 || sum <=0) {\n\t\t\treturn 0;\n\t\t}\n\t\t// find the length of total denomination\n\t\tint numberOfCoins = coins.length;\n\t\t//create a matrix\n\t\tint [][]arr = new int[numberOfCoins][sum+1];\n\t\tfor(int i = 0; i < numberOfCoins; i++) {\n\t\t\tarr[i][0] = 1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < numberOfCoins; i++) {\n\t\t for(int j = 1; j <= sum; j++) {\n\t\t \n\t\t int includingCurrentCoin = 0;\n\t\t int excludingCurrentCoin = 0;\n\t\t \n\t\t if(coins[i] <= j) {\n\t\t includingCurrentCoin = arr[i][j - coins[i]];\n\t\t }\n\t\t \n\t\t if(i > 0) {\n\t\t excludingCurrentCoin = arr[i - 1][j];\n\t\t }\n\t\t \n\t\t arr[i][j] = includingCurrentCoin + excludingCurrentCoin;\n\t\t }\n\t\t } \n\t\treturn arr[numberOfCoins - 1][sum];\n\t}", "public static int[][] horizontalSums(int[][] a, int sumToFind){\r\n\t\tint [][]b = new int[a.length][a[0].length] ;\r\n\t\tfor (int r=0;r<a.length;r++) {\r\n\t\t\tfor(int c=0;c<a[0].length;c++){\r\n\t\t\tint sum=0;\r\n\t\t\t//int temp=0;\r\n\t\t\tint temp;\r\n\t\t\t\r\n\t\t\t//int column=0;\r\n\t\t\tfor (temp=c; temp<a[r].length && sum!=sumToFind;temp++){\r\n\t\t\t\tsum=sum+a[r][temp] ; \r\n\t\t\t}\r\n\t\t\tif(sum==sumToFind){\r\n\t\t\t\tfor (int i=c; i<temp;i++) {\r\n\t\t\t\t\tb[r][i]=a[r][i] ;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\treturn b ;\r\n\t}", "public int manhattan() {\n int s = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n int x = tiles[i][j];\n if (x == 0) continue;\n x--;\n if (x != i*n + j) {\n s = s + Math.abs(i - x / n) + Math.abs(j - x % n);\n }\n }\n }\n return s;\n }", "public int countNegatives(int[][] grid) {\n\t\tint result = 0;\n\t\tint m = grid.length, n= grid[0].length;\n\t\tint[] pos = new int[] {0, n - 1};\n\t\twhile(pos[0] < m && pos[1] > -1) {\n\t\t\tif (grid[pos[0]][pos[1]] < 0) {\n\t\t\t\tresult += (m - pos[0]);\n\t\t\t\tpos[1]--;\n\t\t\t} else {\n\t\t\t\tpos[0]++;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "static int findMissingUsingSummation(int[] arr) {\n\t\tint expectedSum = (arr.length + 1) * (arr.length + 1 + 1) / 2;\n\t\tint actualSum = 0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tactualSum = actualSum + arr[i];\n\t\t}\n\n\t\treturn expectedSum - actualSum;\n\t}", "public static int[] reduce (int []n1) {\n\t\tfor (int i = 0; i < n1.length; i++) {\n\t\t\tif (n1[i] != 0) {\n\t\t\t\tif (i == 0) return copy(n1);\n\t\t\t\t\n\t\t\t\tint []newVal = new int[n1.length-i];\n\t\t\t\textract(newVal,0,n1,i,n1.length-i);\n\t\t\t\treturn newVal;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// just zero.\n\t\treturn new int[]{0};\n\t}", "public static void sumZero(int n) {\n\t\tScanner input = new Scanner(System.in);\n\t\tArrayList<Integer> arr = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tarr.add(input.nextInt());\n\t\t}\n\t\tfor (int i = 0; i < arr.size(); i++) {\n\t\t\tfor (int j = i + 1; j < arr.size(); j++) {\n\t\t\t\tif (arr.get(j) + arr.get(i) == 0) {\n\t\t\t\t\tSystem.out.println(arr.get(i) + \" \" + arr.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void sum2(int n){\n int sum =0; //1\n for (int j = 0; j < n; j++) //2n+2\n for (int k = 0; k < n; k++) //2n+2\n sum += k + j; //1\n for (int l = 0; l < n; l++) //2n+2\n sum += l; //1\n }", "private int getSumH(int[][] a, int jh) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[jh][j];\n }\n return sum;\n }", "private static int sum(List<Integer> L, int i,int j) {\n\t\tSystem.out.println(L+\"\\n\"+\"index i = \"+i+\"\\n\"+\"index j = \"+j);\n\t\tList<Integer> subListToSum = new ArrayList<Integer>();\n\t\t\n\t\tif (i <= j) { //make sure that i is less than j so we have a sublist of at least one\n\t\t\tsubListToSum.addAll(L.subList(i, j));\n\t\t\t\n\t\t}\n\t\t\n\t\telse if (i > j) { //print out a error so the user knows what they did wrong\n\t\t\tSystem.out.println(\"index 'i' is more than index 'j'\");\n\t\t}\n\t\t\n\t\tint sizeList = L.size(); //only reaches here if i <= j\n\t\tSystem.out.println(\"size of list is: \" + sizeList);\n\t\tif (j <= sizeList & i <= sizeList) { //check to account for out of bounds and negatives\n\t\t\tint result = 0;\n\t\t\t\n\t\t\tfor (int allInts : subListToSum) {\n\t\t\t\tresult += allInts;\n\t\t\t};\n\t\t\t\n\t\t\tSystem.out.println(\"Sum(\" + i + \", \" + j + \")\" + \" = \" + result);\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "public static int sumatory(int [] mySingleArray) {\r\n int counter = 0, sum = 0;\r\n while (counter < mySingleArray.length){\r\n sum = sum + mySingleArray[counter];\r\n counter++;\r\n }\r\n return sum;\r\n }", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "private int getSumV(int[][] a, int jv) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][jv];\n }\n return sum;\n }", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "public static int exerciseEightSolution(int[][] matrix) {\n\t int sum = 0;\n\t \n\t /*Populate the matrix with random values between 0 and maxNumber and print the \n\t *generated matrix. Just to facilitate test. Not a part of the given problem.\n\t * \n\t *If you want to use your own values just change or comment these lines. \n\t */\n\t int maxNumber = 5;\n\t Random randNumber = new Random();\n\t for(int i = 0; i < matrix.length; i++) {\n\t \tfor (int j = 0; j < matrix[0].length; j++) {\n\t \t\tmatrix[i][j] = randNumber.nextInt(maxNumber);\n\t \t\tSystem.out.print(matrix[i][j] + \" \");\n\t \t}\n\t \tSystem.out.println();\n\t }\n\t\tSystem.out.println();\n\n\t//My solution for the problem.\n\t//Iterate through the matrix. If a 0 is found, all the \"rooms\" below it receive 0.\n\t for(int i = 0; i < matrix.length; i++){\n\t for(int j = 0; j < matrix[i].length; j++){\n\t if(matrix[i][j] == 0){\n\t int aux = i;\n\t while(aux < matrix.length){\n\t matrix[aux][j] = 0;\n\t aux += 1;\n\t }\n\t }\n\t }\n\t }\n\n\t//Store the sum of valid room values.\n\t for(int i = 0; i < matrix.length; i++){\n\t for(int j = 0; j < matrix[i].length; j++){\n\t sum += matrix[i][j];\n\t }\n\t }\n\t \n\t return sum;\n\t}", "public int hamming() {\n if (this.hamming >= 0) return this.hamming;\n int result = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n int idx = (i * N) + (j + 1);\n if (tiles[i][j] == idx) {\n result += 0;\n } else if (tiles[i][j] == 0) {\n continue;\n } else { \n result += 1;\n }\n }\n }\n this.hamming = result;\n return result;\n }", "public static int sumOfElements(int[][] number) {\n\t\t\n\t\tint sum = number[0][0];\n\t for (int o= 0; o < number.length; o++) {\n\t \tfor(int l=0;l<number[o].length;l++){\n\t \t\t if (number[o][l] < sum) {\n\t \t sum += number[o][l];\n\t \t }\n\t \t }\t\n\t \t}\n\t \n\t return sum;\n\t}", "public int minPathSum(int[][] grid) {\n\t\treturn getMinPathSum(grid, grid.length - 1, grid[0].length - 1);\n\t}", "static void subsetSums(int arr[], int n)\n {\n \n // There are totoal 2^n subsets\n int total = 1 << n;\n \n // Consider all numbers from 0 to 2^n - 1\n for (int i = 0; i < total; i++) {\n int sum = 0;\n \n // Consider binary reprsentation of\n // current i to decide which elements\n // to pick.\n for (int j = 0; j < n; j++)\n if ((i & (1 << j)) != 0)\n sum += arr[j];\n \n // Print sum of picked elements.\n System.out.print(sum + \" \");\n }\n }", "static boolean isSubsetSum(int set[], \n\t\t\t\t\t\t\tint n, int sum)\n\t{\n\t\tboolean dp[][] = new boolean[n + 1][sum + 1];\n\t\tfor(int i = 1; i <= sum; i++)\n\t\t dp[0][i] = false;\n\t\tfor(int i = 0; i <= n; i++)\n\t\t dp[i][0] = true;\n\t\t \n\t\tfor(int i = 1; i <= n; i++) {\n\t\t for(int j = 1; j <= sum; j++) {\n\t\t //System.out.println(i + \" \" + j);\n\t\t try {\n\t\t if(j >= set[i - 1])\n\t\t dp[i][j] = dp[i - 1][j] || dp[i - 1][j - set[i - 1]];\n\t\t else\n\t\t dp[i][j] = dp[i - 1][j];\n\t\t }\n\t\t catch(ArrayIndexOutOfBoundsException exception) {\n\t\t System.out.println(\"here\");\n\t\t System.out.println(i + \" \" + j);\n\t\t }\n\t\t }\n\t\t}\n\t\treturn dp[n][sum];\n\t}", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public static void solution1(int[][] grid) {\n int M = grid.length;\n int N = grid[0].length;\n\n // Loop through 2-d grid to figure out which rows & columns have a 0\n boolean[] rows = new boolean[M];\n boolean[] cols = new boolean[N];\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (grid[row][col] == 0) {\n rows[row] = true;\n cols[col] = true;\n }\n }\n }\n\n // Re-loop through 2-d matrix and set whichever entries are necessary to 0\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (rows[row] == true || cols[col] == true) {\n grid[row][col] = 0;\n }\n }\n }\n }", "public static int sum (IntVector iv) {\n if (iv.isEmpty())\n return 0;\n else\n return iv.head() + sum(iv.tail());\n }", "public int sum()\n {\n return sum(0,0,size);\n }", "public int[] findDiagonalOrder(int[][] matrix) {\n \n int n = matrix.length; if(n == 0) return new int[0];\n int m = matrix[0].length; if(m == 0) return new int[0];\n int i = 0, j = 0, idx = 0;\n int[] ret = new int[n*m];\n boolean up = true;\n while(i < n && j < m){\n ret[idx++] = matrix[i][j];\n if(up){\n if(inBound(i-1, n, j+1, m)){\n i = i-1; j = j+1;\n }else if(inBound(i, n, j+1, m)){ //try right\n j = j+1; up = !up;\n }else if(inBound(i+1, n, j, m)){ // try bot\n i = i+1; up = !up;\n }else{\n i++; j++; // hit end;\n }\n }else{\n if(inBound(i+1, n, j-1, m)){\n i = i+1; j = j-1;\n }else if(inBound(i+1, n, j, m)){ // try bot\n i = i+1; up = !up;\n }else if(inBound(i, n, j+1, m)){ // try right\n j = j+1; up = !up;\n }else{\n i++; j++; // hit end;\n }\n }\n }\n return ret;\n }", "static void findTripletSumZero(int[] data) {\n\t\tboolean found = false;\n\t\tArrays.sort(data);\n\t\tfor (int x = 0; x < data.length - 1; x++) {\n\t\t\tint maxIndex = data.length - 1;\n\t\t\tint minIndex = x + 1;\n\t\t\twhile (minIndex < maxIndex) {\n\t\t\t\tint sum = data[x] + data[maxIndex] + data[minIndex];\n\t\t\t\tif (sum == 0) {\n\t\t\t\t\tSystem.out.println(\"Tripplets are \" + data[x] + \", \" + data[maxIndex] + \", \" + data[minIndex]);\n\t\t\t\t\t--maxIndex;\n\t\t\t\t\t++minIndex;\n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\tif (sum > 0) {\n\t\t\t\t\t--maxIndex;\n\t\t\t\t}\n\t\t\t\tif (sum < 0) {\n\t\t\t\t\t++minIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!found)\n\t\t\tSystem.out.println(\"No tripplets found\");\n\t}", "public int iSumaVec(int[] vector)\r\n\t{\r\n\t\tint iSuma=0;\r\n\t\tfor(int i=0;i<vector.length;i++)\r\n\t\t{\r\n\t\t\tiSuma+=vector[i];\r\n\t\t}\r\n\t\treturn iSuma;\r\n\t}", "static int countOfSubsetsOfSum(int[] arr,int sum){\n int n = arr.length;\n int[][] dp = new int[n + 1][sum + 1];\n\n for (int j = 0;j<=sum; j++){\n dp[0][j] = 0;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = 1;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public int sumRange(int i, int j) {\n return sum[j + 1] - sum[i];\n }", "public int islandPerimeter(int[][] grid) {\n\t\tflag = new boolean[grid.length][grid[0].length];\n\t\tfor(int i=0;i<grid.length;++i) {\n\t\t\tArrays.fill(flag[i], false);\n\t\t}\n for(int i=0;i<grid.length;++i) {\n \tfor(int j=0;j<grid[0].length;++j) {\n \t\tif(grid[i][j] == 1)\n \t\t\treturn find0s(grid,i,j);\n \t}\n }\n return 0;\n }", "public int hamming() {\n int count = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N && i+j < 2*N-2; j++) {\n if (blocks[i][j] != i*N + j + 1) {\n count++;\n }\n }\n }\n return count;\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n //System.out.println(N);\n int[][] array = new int[N][N];\n for(int i = 0 ; i < N ; i++){\n for(int j =0 ; j < N; j++){\n int val = in.nextInt();\n array[i][j] = val; \n } \n }\n int sum1 = 0;\n for(int i = 0 ; i < N ; i++){\n sum1+= array[i][i];\n }\n //System.out.println(sum1);\n int sum2 = 0;\n int tempCol =N-1;\n for(int i =0 ; i < N ; i++){\n sum2+= array[i][tempCol];\n tempCol--;\n }\n //System.out.println(sum2);\n sum1 = Math.abs(sum1-sum2);\n System.out.println(sum1);\n }", "public int numberofDistinctIslands(int[][] grid) {\n int rows = grid.length;\n if (rows == 0){\n return 0;\n }\n int cols = grid[0].length;\n int count = 0;\n\n visited = new boolean[rows][cols];\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n visited[i][j] = false;\n }\n }\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (grid[i][j] == 1 && !visited[i][j]){\n dfs(grid, i, j, rows, cols);\n count++;\n }\n }\n }\n\n System.out.println(count);\n return count;\n }", "@Override\n\tpublic IDoubleVector sumColumns() {\n\t\treturn null;\n\t}", "public static int maxSubsetSumNoAdjacent( int[] array ) {\n\t\tassertThat( array ).isNotNull();\n\n\t\tif( array.length == 0 )\n\t\t\treturn 0;\n\t\tif( array.length == 1 )\n\t\t\treturn array[0];\n\n\t\tarray[1] = array[0] > array[1] ? array[0] : array[1];\n\n\t\tfor( int i = 2; i < array.length; i++ ) {\n\t\t\tint prevIndexSum = array[i - 1];\n\t\t\tint currentIdxSum = array[i - 2] + array[i];\n\n\t\t\tarray[i] = prevIndexSum > currentIdxSum ? prevIndexSum : currentIdxSum;\n\t\t}\n\n\t\treturn array[array.length - 1];\n\t}", "public int sumRange0(int i, int j) {\n\t\t\treturn map.get(i) - map.get(j) + nums[j];\n\t\t}", "static int paths_dp(int[][] matrix) {\n\t\tint n = matrix.length;\n\t\tint m = matrix[0].length;\n\t\t\n\t\tint[][] dp = new int[n][m];\n\t\tdp[0][0] = matrix[0][0] == 1? 0 : 1;\n\t\t\n\t\tfor(int i = 1; i < m; i++) {\n\t\t\tif(matrix[0][i] == 1) {\n\t\t\t\tdp[0][i] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdp[0][i] = dp[0][i-1];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tif(matrix[i][0] == 1) {\n\t\t\t\tdp[i][0] = 0;\n\t\t\t} else {\n\t\t\t\tdp[i][0] = dp[i-1][0];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tfor(int j = 1; j < m; j++) {\n\t\t\t\tif(matrix[i][j] == 1 ) {\n\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = dp[i-1][j] + dp[i][j+1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dp[n-1][m-1];\n\t}", "public static double[][] integralMatrix (double[][] in) {\n\t\tint rows = in.length;\n\t\tint cols = in[0].length;\n\t\t\n\t\t\n\t\t// store submatrix sums, indexed by bottom-right corner of sub-matrix.\n\t\tdouble[][] integral = new double[rows][cols];\n\t\t\n\t\t// store column sums, indexed by bottom entry\n\t\tdouble[][] columnSums = new double[rows][cols];\n\t\t\n\t\t// initialize in[0][0]\n\t\tintegral[0][0] = in[0][0];\n\t\tcolumnSums[0][0] = in[0][0];\n\t\t\n\t\t// initialize left edge\n\t\tfor (int i = 1; i < rows; i++) {\n\t\t\tintegral[i][0] = in[i][0] + integral[i-1][0];\n\t\t\tcolumnSums[i][0] = columnSums[i-1][0];\n\t\t}\n\t\t\n\t\t// initialize top edge\n\t\tfor (int j = 1; j < cols; j++) {\n\t\t\tintegral[0][j] = in[0][j] + integral[0][j-1];\n\t\t\tcolumnSums[0][j] = in[0][j];\n\t\t}\n\n\t\tfor (int i = 1; i < rows; i++) {\n\t\t\tfor (int j = 1; j < cols; j++) {\n\t\t\t\tintegral[i][j] = in[i][j] + integral[i][j-1] + columnSums[i-1][j];\n\t\t\t\tcolumnSums[i][j] = in[i][j] + columnSums[i-1][j];\n\t\t\t}\n\t\t}\t\n\t\treturn integral;\n\t}", "public static int[][] verticalSums(int[][] a, int sumToFind){\r\n\t\tint b[][]=new int[a.length][a[0].length];\r\n\t\tboolean verify[][]=new boolean[a.length][a[0].length];\r\n\t\tfor (int c=0;c<a[0].length;c++){\r\n\t\t\tint r=0; \r\n\t\t\tint confirm=0;\r\n\t\t\tint sum=0;\r\n\t\t\twhile(r<a.length){\r\n\t\t\t\r\n\t\t\t\tif(sum<sumToFind){\r\n\t\t\t\t\tsum+=a[r][c];\r\n\t\t\t\t\t\r\n\t\t\t\t\tr++; \r\n\t\t\t\t}\r\n\t\t\t\tif(sum>sumToFind){\r\n\t\t\t\t\tconfirm++;\r\n\t\t\t\t\tr=confirm;\r\n\t\t\t\t\tsum=0; \r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (sum==sumToFind){\r\n\t\t\t\t\tfor(int x=confirm;x<r;x++){\r\n\t\t\t\t\t\tverify[x][c] = true;\r\n\t\t\t\t\tconfirm++;\r\n\t\t\t\t\tr=confirm;\r\n\t\t\t\t\tsum=0;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<a.length;i++){\r\n\t\t\t\tfor(int j=0;j<a.length;j++){\r\n\t\t\t\t\tif (verify[i][j]){\r\n\t\t\t\t\t\tb[i][j]=a[i][j]; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tb[i][j]=0 ;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\r\n}\r\n\t\treturn b;\r\n}", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "int removeObstacle(int numRows, int numColumns, List<List<Integer>> lot)\r\n {\r\n \tint m = 0;\r\n \tint n = 0;\r\n \tfor(List<Integer> rowList: lot) {\r\n \t\tfor(Integer num: rowList) {\r\n \t\t\tif(num == 9 ) {\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t\tn++;\r\n \t\t}\r\n \t\tm++;\r\n \t}\r\n \t// to store min cells required to be \r\n // covered to reach a particular cell \r\n int dp[][] = new int[numRows][numColumns]; \r\n \r\n // initially no cells can be reached \r\n for (int i = 0; i < numRows; i++) \r\n for (int j = 0; j < numColumns; j++) \r\n dp[i][j] = Integer.MAX_VALUE; \r\n \r\n // base case \r\n dp[0][0] = 1; \r\n \r\n for (int i = 0; i < lot.size(); i++) {\r\n \tList<Integer> columnList = lot.get(i);\r\n for (int j = 0; j < columnList.size(); j++) { \r\n \r\n // dp[i][j] != INT_MAX denotes that cell \r\n // (i, j) can be reached from cell (0, 0) \r\n // and the other half of the condition \r\n // finds the cell on the right that can \r\n // be reached from (i, j) \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (j + columnList.get(j)) < numColumns && (dp[i][j] + 1) \r\n < dp[i][j + columnList.get(j)]\r\n \t\t && columnList.get(j) != 0) \r\n dp[i][j + columnList.get(j)] = dp[i][j] + 1; \r\n \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (i + columnList.get(j)) < numRows && (dp[i][j] + 1) \r\n < dp[i + columnList.get(j)][j] && columnList.get(j) != 0) \r\n dp[i + columnList.get(j)][j] = dp[i][j] + 1; \r\n } \r\n } \r\n \r\n if (dp[m - 1][n - 1] != Integer.MAX_VALUE) \r\n return dp[m - 1][n - 1]; \r\n \r\n return -1; \r\n }", "private boolean checkMainDiagonal() {\n int diagonalSum = 0;\n for (int i = 0; i < dimensions; i++) {\n diagonalSum += square[i + dimensions * i];\n }\n\n return diagonalSum == magicConst;\n }", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "public int[][] removeOne(int[][] matrix, int x, int y) {\n while(x < matrix.length){\n if(matrix[x][y] == 1)\n matrix[x][y] = 0;\n x++;\n }\n return matrix;\n }", "public boolean percolates() {\n return myUF.connected(n*n, n*n + 1);\n }", "public boolean estDedans() {\n\t\treturn ( (i >= 0)&&(i < Constantes.N)&&(j >= 0)&&(j < Constantes.N) ); \n }", "public int getSum(List<Integer> a){\n\n int sum = 0;\n\n for(int i = 0; i<a.size(); i++){\n if(a.get(i)<0){\n continue;\n } else{\n sum +=a.get(i);\n }\n }\n return sum;\n }", "public int[] findDiagonalOrder(List<List<Integer>> nums) {\n\t\tMap<Integer, Stack<Integer>> map = new LinkedHashMap<>();\n\t\tint c = 0;\n\t\tfor (int i = 0; i < nums.size(); i++) {\n\t\t\tfor (int j = 0; j < nums.get(i).size(); j++) {\n\t\t\t\tmap.putIfAbsent(i + j, new Stack<>());\n\t\t\t\tmap.get(i + j).push(nums.get(i).get(j));\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tint[] res = new int[c];\n\t\tint i = 0;\n\t\tfor (Stack<Integer> stack : map.values()) {\n\t\t\twhile (!stack.isEmpty())\n\t\t\t\tres[i++] = stack.pop();\n\t\t}\n\t\treturn res;\n\t}", "public int stoneGameII(int[] piles) {\n int n = piles.length;\n memo = new int[n][n];\n sums = new int[n];\n sums[n-1] = piles[n-1];\n for(int i = n -2; i>=0;i--) {\n sums[i] = sums[i+1] + piles[i]; //the sum from piles[i] to the end\n }\n int score = helper(0, 1, piles);\n return score;\n }", "public int singleNumberII(int[] nums) {\n int ans = 0;\n for (int i = 0; i < 32; i++) {\n int sum = 0;\n for (int j = 0; j < nums.length; j++) {\n if (((nums[j] >> i) & 1) == 1) {\n sum ++;\n sum %= 3;\n }\n }\n if (sum != 0) {\n ans |= sum << i;\n }\n }\n return ans;\n }", "public int numIslands(boolean[][] grid) {\n m = grid.length;\n if (m == 0) return 0;\n n = grid[0].length;\n if (n == 0) return 0;\n \n int ans = 0;\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n if (!grid[i][j]) continue;\n ans++;\n dfs(grid, i, j);\n }\n }\n return ans;\n }", "public boolean percolates() {\n for (int i = n * n - n + 1; i <= n * n; i++) {\n if (weightedQuickUnionUF.connected(0, i)) {\n return true;\n }\n }\n return false;\n }", "public int[] countRowZeroes()\n\t{\n\t\tint[] zeros = new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tzeros[i]=0;\n\t\t\tfor(int j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]==0)\n\t\t\t\t{\n\t\t\t\t\tzeros[i]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn zeros;\n\t}", "@Override\n\tpublic IDoubleVector sumRows() {\n\t\treturn null;\n\t}", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}" ]
[ "0.6427378", "0.60423553", "0.6022495", "0.5972616", "0.5805042", "0.5721458", "0.5572763", "0.5564511", "0.5496461", "0.5490422", "0.5439756", "0.5398512", "0.539631", "0.539402", "0.5333219", "0.5332443", "0.53195184", "0.5302504", "0.5299421", "0.52867717", "0.52809227", "0.5280177", "0.52707255", "0.5264689", "0.5245167", "0.5242543", "0.5229209", "0.5228776", "0.5213654", "0.520298", "0.5200565", "0.51971865", "0.5196016", "0.519468", "0.5183052", "0.5172917", "0.51681125", "0.51541686", "0.5152124", "0.5128138", "0.5120048", "0.5114066", "0.5101945", "0.50798655", "0.5078343", "0.507604", "0.5066684", "0.50528115", "0.50523734", "0.50466186", "0.5038122", "0.5029204", "0.50268525", "0.501065", "0.49756533", "0.49724668", "0.4970274", "0.4967272", "0.49467242", "0.49434513", "0.49355602", "0.49329415", "0.49273148", "0.49266353", "0.48975095", "0.48968458", "0.48949558", "0.48946053", "0.48917565", "0.48911065", "0.4869731", "0.485083", "0.4849057", "0.48488927", "0.48487115", "0.48416314", "0.4833898", "0.483089", "0.4827773", "0.48277363", "0.48230675", "0.4812622", "0.48107034", "0.4806707", "0.47862694", "0.4784872", "0.47807235", "0.4768109", "0.47678268", "0.47665712", "0.4764784", "0.4760872", "0.47417113", "0.47404352", "0.47373042", "0.47220677", "0.4717651", "0.47158775", "0.47130874", "0.47107187" ]
0.70487994
0
Get zero filled array with row number == column number.
public static int[][] getZeroQuadraticArray(int rowNum) { return getZeroArray(rowNum, rowNum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[][] getZeroArray(int rowNum, int colNum) {\r\n\t\tint[][] retA = new int[rowNum][colNum];\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tretA[i][j] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retA;\r\n\t}", "private int[] blankFinder(){\n for(int x = 0; x < n; x++){\n for(int y = 0; y < n; y++){\n if(tiles[x][y] == 0){\n return new int[]{x, y};\n }\n }\n }\n return null;\n }", "public int[][] createEmptyGrid() {\n int[][] emptyGrid = new int[9][9];\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n emptyGrid[row][col] = 0;\n }\n }\n return emptyGrid;\n }", "void makeZero(){\n nnz = 0;\n for(int i=0; i<this.matrixSize; i++){\n this.rows[i] = new List();\n }\n }", "private int[][] listEmptyCells() {\n int nbEmpty = 0;\n int[][] emptyCells;\n int k = 0;\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0)\n nbEmpty++;\n }\n }\n emptyCells = new int[nbEmpty][2];\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0) {\n emptyCells[k][0] = i;\n emptyCells[k][1] = j;\n k++;\n }\n }\n }\n return emptyCells;\n }", "public static int[][] init() {\n int[][] arr={\n {0,1,0,1,0,0,0},\n {0,0,1,0,0,1,0},\n {1,0,0,1,0,1,0},\n {0,0,1,0,0,1,0},\n {0,0,1,1,0,1,0},\n {1,0,0,0,0,0,0}\n };\n return arr;\n }", "public int[] findZeros(int rows, int cols)\n\t{\n\t\tint r=0;\n\t\tint c;\n\t\tboolean over;\n\t\t\n\t\trows=-1;\n\t\tcols=-1;\n\t\tover=false;\n\t\twhile(!over)\n\t\t{\n\t\t\tc=0;\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tif(cost[r][c]==0 && rowLabelMultiple[r]==0 && columnLabelMultiple[c]==0)\n\t\t\t\t{\n\t\t\t\t\trows=r;\n\t\t\t\t\tcols=c;\n\t\t\t\t\tover=true;\n\t\t\t\t}\n\t\t\t\tc+=1;\n\t\t\t\tif(c>=n || over)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr+=1;\n\t\t\tif(r >= n)\n\t\t\t{\n\t\t\t\tover=true;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tint[] a=new int[2];\n\t\ta[0]=rows;\n\t\ta[1]=cols;\n\t\treturn a;\n\t}", "public static ArrayList<int[]> getEmptyCellCoords(int[][] grid) {\n\n ArrayList<int[]> emptyCells = new ArrayList<int[]>();\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (grid[i][j] == 0) {\n int[] arr = {i, j};\n emptyCells.add(0, arr);\n }\n }\n }\n\n return emptyCells;\n }", "public int[] findFirstNonEmpty() {\n\t\tint[] coord = new int[2];\n\t\tfor (int r=0; r<size*size; r++) {\n\t\t\tfor (int c=0; c<size*size; c++) {\n\t\t\t\tif (board[r][c].val==0) {\n\t\t\t\t\tcoord[0]=r;\n\t\t\t\t\tcoord[1]=c;\n\t\t\t\t\treturn coord;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\treturn null;\n\t}", "public static void zeroMatrix(int[][] matrix) {\n ArrayList<ArrayList<Integer>> list = new ArrayList<>(); // creates array of array of integers to store coordinates\n for (int i = 0; i < matrix.length; i++) { // go through each point in matrix\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) { // if the point in the matrix contains 0...\n ArrayList<Integer> subList = new ArrayList<>(); // create ArrayList to store point values\n subList.add(i); // add y\n subList.add(j); // add x\n list.add(subList); // add these points to the array containing points\n }\n }\n }\n fill(list, matrix); // helper method to fill in the matrix\n }", "public void setToZero() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n data[i][j] = 0;\n }\n }\n }", "public int[] getRowAndCol() {\n return new int[]{myRow, myCol};\n }", "private static int[][] identifyMatrixWithZeros(int[][] matrix){\n\t\tboolean[] rowCheck = new boolean[matrix.length];\n\t\tboolean[] colCheck = new boolean[matrix[0].length];\n\n\t\tfor(int i=0;i<matrix.length ;i++) {\n\t\t\tfor(int j=0;j<matrix[0].length;j++) {\n\t\t\t\tif(matrix[i][j] == 0) {\n\t\t\t\t\trowCheck[i] = true;\n\t\t\t\t\tcolCheck[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int row=0;row<rowCheck.length;row++) {\n\t\t\tif(rowCheck[row])\n\t\t\t\tnullifyRows(matrix, row);\n\t\t}\n\t\t\n\t\tfor(int col=0;col<colCheck.length;col++) {\n\t\t\tif(colCheck[col])\n\t\t\t\tnullifyColumns(matrix, col);\n\t\t}\n\t\treturn matrix;\n\t}", "public static int[][] makeMatrixZero(int[][] inputMatrix) {\n\t\tint[][] outputMat = zeroInit();\n\n\t\tfor (int i = 0; i < INDEX; i++) {\n\t\t\tfor (int j = 0; j < INDEX; j++) {\n\t\t\t\tif(outputMat[i][j] !=0)\n\t\t\t\t\toutputMat[i][j] = inputMatrix[i][j];\n\t\t\t\t\n\t\t\t\tif (inputMatrix[i][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < INDEX; k++) {\n\t\t\t\t\t\toutputMat[i][k] = 0;\n\t\t\t\t\t\toutputMat[k][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t} \n\n\t\t\t}\n\t\t}\n\n\t\treturn outputMat;\n\t}", "private static void setFirstRowToZero(int[][] matrix,int numberOfColumns){\n for(int i=0;i<numberOfColumns;i++){\n matrix[0][i]=0;\n }\n }", "public int[][] initMatrix(int n)\n {\n\t// create an empty 2d array and return it! Simple stuff here.\n\t int[][] retMatrix = new int[n][n];\n\t return retMatrix;\n }", "static void setFirstColumnToZero(int[][] matrix,int numberOfRows){\n for(int i=0;i<numberOfRows;i++){\n matrix[i][0]=0;\n }\n }", "public static void makeRowsCols0(int [][]input) {\n\t\tint previ=-1,prevj=-1;\n\t\tfor(int i=0;i<input.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<input[0].length;j++)\n\t\t\t{\n\t\t\t\tif(input[i][j]==0)\n\t\t\t\t{\t\n\t\t\t\t\tif(i!=previ&&j!=prevj)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int k=0;k<input.length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[k][j]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int k=0;k<input[0].length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[i][k]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprevi=i;\n\t\t\t\t\t\tprevj=j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int[][] zeroMatrix(int[][] matrix){\n\tboolean[][] zeros = new boolean[matrix.length][matrix[0].length];\n\tfor (int i = 0; i < matrix.length; i++){\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (matrix[i][j] == 0) zeros[i][j] = true;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < matrix.length; i++) {\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (zeros[i][j]){\n\t\t\t\tfor (int k = 0; k < matrix.length; k++){\n\t\t\t\t\tmatrix[k][j] = 0;\n\t\t\t\t}\n\t\t\t\tfor (int k = 0; k < matrix[0].length; k++){\n\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn matrix;\n}", "void markRowAndColumnZero(int[][] matrix) {\n HashSet<Integer> rows = new HashSet<Integer>();\n HashSet<Integer> columns = new HashSet<Integer>();\n for(int i=0; i< matrix.length;i++) {\n for(int j =0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) {\n rows.add(i);\n columns.add(j);\n }\n }\n }\n Iterator<Integer> rowsIterator = rows.iterator();\n while(rowsIterator.hasNext()) {\n int rowToBeSetToZero = rowsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[rowToBeSetToZero][0] = 0;\n }\n }\n\n Iterator<Integer> columnsIterator = columns.iterator();\n while(columnsIterator.hasNext()) {\n int columnToBeSetToZero = columnsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[i][columnToBeSetToZero] = 0;\n }\n }\n\n return;\n\n\n }", "public int[] proximoBranco(){\n for(int i = 0; i < 9; i++){\n for (int j = 0; j < 9; j++){\n if(matriz[i][j] == 0){\n int [] aux = {i, j};\n return aux;\n }\n }\n }\n return null;\n }", "private Object[] buildEmptyRow() {\n Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() );\n\n return rowData;\n }", "public void zero() {\n fill(0);\n }", "public static Matrix makeZero(int rows, int columns) {\n\t\treturn new Matrix(rows, columns);\n\t}", "public int[] findEmpty(int[] board) {\n\t\t\n\t\tint[] coord = new int[2];\n\t\tcoord[0] = -1;\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tif ((board[j + i*9]) == 0) {\n\t\t\t\t\tcoord[0] = i;\n\t\t\t\t\tcoord[1] = j;\n\t\t\t\t\treturn coord;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn coord;\n\t}", "public static Matrix Zero(int n) {\n return new Matrix(get2DListOfSize(n));\n }", "public static int[][] generateMatrix() {\n int rowsCount = RANDOM.nextInt( MAX_ROWS_COUNT ) + 1;\n int[][] result = new int[rowsCount][];\n for (int i = 0; i < rowsCount; i++) {\n result[i] = new int[RANDOM.nextInt( MAX_COLUMNS_COUNT ) + 1];\n fillArray( result[i] );\n }\n return result;\n }", "private static void cleanArray() {\n\t\tfor(int i = 0 ; i < n ;i++){\r\n\t\t\tcolTemp[i] = 0;\r\n\t\t\trowTemp[i] = 0;\r\n\t\t}\r\n\t}", "Array(int x) {\n\t\tarray = new int[x];\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = 0; // make each index 0\n\t\t}\n\t}", "public static int[] init(int in){\n int[] cells = new int[16];\n\n for(int i = 0; i < 16; i++){\n cells[i] = 1;\n }\n\n //sets the index passed-in to be 0\n cells[in] = 0;\n cells[15] = 14;\n\n return cells;\n }", "public static int[][] initializeMatrix(int version) {\n\t\t\n\t\tfinal int SIZE = QRCodeInfos.getMatrixSize(version);\n\t\tint[][] matrix = new int[SIZE][SIZE];\n\t\t\n\t\tfor (int i = 0; i < SIZE; ++i) {\n\t\t\tArrays.fill(matrix[i], 0);\n\t\t}\n\t\t\n\t\treturn matrix;\n\t}", "public void reset() {\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0];\n }\n for (int k = 0; k < this.numCols; k++) {\n this.cols[k] = new IntOpenHashSet();\n }\n }", "Matrix(int rows, int columns) {\n try {\n if (rows < 1 || columns < 1) {\n throw zeroSize;\n }\n this.rows = rows;\n this.columns = columns;\n matrix = new int[rows][columns];\n\n for (int rw = 0; rw < rows; rw++) {\n for (int col = 0; col < columns; col++) {\n matrix[rw][col] = (int) Math.floor(Math.random() * 100);\n }\n }\n }\n catch (Throwable zeroSize) {\n zeroSize.printStackTrace();\n }\n\n }", "public int[] countRowZeroes()\n\t{\n\t\tint[] zeros = new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tzeros[i]=0;\n\t\t\tfor(int j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]==0)\n\t\t\t\t{\n\t\t\t\t\tzeros[i]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn zeros;\n\t}", "private String[][] createEmptyMatrix(int rows, int columns) {\r\n\t\tString[][] outputMatrix = new String[rows][columns];\r\n\t\tfor (int i = 0; i < rows; i++) {\r\n\t\t\tfor (int j = 0; j < columns; j++) {\r\n\t\t\t\toutputMatrix[i][j] = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn outputMatrix;\r\n\t}", "public static void zeroMatrix(int[][] matrix) {\n printMatrix(matrix);\n\n boolean [] rowZero = new boolean[matrix.length];\n boolean [] colZero = new boolean[matrix[0].length];\n\n for (int row = 0; row < matrix.length; row++) {\n for (int col = 0; col < matrix[0].length; col++) {\n if (matrix[row][col] == 0) {\n rowZero[row] = true;\n colZero[col] = true;\n }\n }\n }\n\n for (int r = 0; r < rowZero.length; r++) {\n if (rowZero[r]) {\n for (int i = 0; i < colZero.length; i++) {\n matrix[r][i] = 0;\n }\n }\n }\n\n for (int c = 0; c < colZero.length; c++) {\n if (colZero[c]) {\n for (int i = 0; i < rowZero.length; i++) {\n matrix[i][c] = 0;\n }\n }\n }\n\n printMatrix(matrix);\n }", "public void setZeroes2(int[][] matrix) {\n boolean row00 = false;\n boolean col00 = false;\n\n int row = 0, col = 0;\n int rows = matrix.length;\n int cols = matrix[0].length;\n while (col < cols && !row00) {\n row00 = matrix[0][col++] == 0;\n }\n while (row < rows && !col00) {\n col00 = matrix[row++][0] == 0;\n }\n\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n matrix[row][0] = 0;\n matrix[0][col] = 0;\n }\n }\n }\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[0][col] == 0 || matrix[row][0] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (row00) {\n for (col = 0; col < cols; ++col) {\n matrix[0][col] = 0;\n }\n }\n if (col00) {\n for (row = 0; row < rows; ++row) {\n matrix[row][0] = 0;\n }\n }\n }", "public int[] countColumnZeroes()\n\t{\n\t\tint[] zeros = new int[n];\n\t\tfor(int j=0;j<n;j++)\n\t\t{\n\t\t\tzeros[j]=0;\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]==0)\n\t\t\t\t{\n\t\t\t\t\tzeros[j]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn zeros;\n\t}", "public Token zero() {\n\t\ttry {\n\t\t\treturn new LongMatrixToken(new long[_rowCount * _columnCount],\n\t\t\t\t\t_rowCount, _columnCount, DO_NOT_COPY);\n\t\t} catch (IllegalActionException illegalAction) {\n\t\t\t// should not happen\n\t\t\tthrow new InternalErrorException(\"LongMatrixToken.zero: \"\n\t\t\t\t\t+ \"Cannot create zero matrix.\");\n\t\t}\n\t}", "public void init_values(){\n\t\tint rows = (height / res);\n\t\tint cols = (width / res);\n\t\tvalues = new int [rows][cols];\n\t\tfor (int r = 0; r < rows; r++){\n\t\t\tfor (int c = 0; c < cols; c++){\n\t\t\t\tvalues[r][c] = 0;\n\t\t\t}\n\t\t}\t\n\t}", "public Integer[][] GetCurrentBoard()\n {\n return new Integer[2][3];\n }", "private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }", "Array() {\n\t\tarray = new int[0];\n\t}", "public static int[][] createArrayForCards(int totalPlayers) {\n int[][] cardValues = new int[totalPlayers][2];\n // this makes the default value zero. redunant yes, but wanted to populate it first\n for (int i = 0; i < cardValues.length; i++) {\n for (int j = 0; j < 2 ; j++) {\n cardValues[i][j] = 0;\n }\n }\n return cardValues;\n }", "public void initializeGrid() {\n for (int i = minRow; i <= maxRow; i++) {\n for (int j = minCol; j <= maxCol; j++) {\n grid[i][j] = 0;\n }\n }\n }", "public int[] getRow() { return _row; }", "public Matrix(){\r\n\t\t\r\n\t\t//dim = dimension; for now, only 3-dim. matrices are being handled\r\n\t\tmat = new int[dim][dim];\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\t\tmat[rowi][coli]=0;\r\n\t}", "public void setZeroes1(int[][] matrix) {\n boolean col00 = false;\n\n int row, col;\n int rows = matrix.length;\n int cols = matrix[0].length;\n for (row = 0; row < rows; ++row) {\n for (col = 0; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n if (col != 0) {\n matrix[0][col] = 0;\n matrix[row][0] = 0;\n } else {\n col00 = true;\n }\n }\n }\n }\n for (row = rows - 1; row >= 0; --row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][0] == 0 || matrix[0][col] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (col00) {\n for (row = rows - 1; row >= 0; --row) {\n matrix[row][0] = 0;\n }\n }\n }", "public Matriz( int lin, int col )\n {\n if(lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Quantidade invalida. \" );\n } //end\n else\n {\n table = new Object[lin][col];\n } //end se\n }", "private void initializeGrid()\n {\n \t\n // initialize grid as a 2D ARRAY OF THE APPROPRIATE DIMENSIONS\n \tgrid = new int [NUM_ROWS][NUM_COLS];\n\n\n //INITIALIZE ALL ELEMENTS OF grid TO THE VALUE EMPTY\n \tfor(int row = 0; row < NUM_ROWS; row++){\n \t\tfor(int col = 0; col < NUM_COLS; col++){\n \t\t\tgrid[row][col] = EMPTY;\n \t\t}\n \t}\n }", "public void setZeroes2(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0 ||\n matrix[0] == null || matrix[0].length == 0)\n return;\n\n int r = matrix.length, c = matrix[0].length;\n boolean[] rows = new boolean[r], cols = new boolean[c];\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < c; j++) {\n if (matrix[i][j] == 0) {\n rows[i] = true;\n cols[j] = true;\n }\n }\n }\n\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < c; j++) {\n if (rows[i] || cols[j])\n matrix[i][j] = 0;\n }\n }\n }", "public void forzerocount() {\r\n val = new BigDecimal[zerocntretobj.getRowCount()];\r\n for (int cnt = 0; cnt < zerocntretobj.getRowCount(); cnt++) {\r\n int zerocountct = 0;\r\n BigDecimal bdcross = null;\r\n int mcnt = Qrycolumns.size();\r\n int n = 0;\r\n for (int i = 0; i < mcnt; i++) {\r\n zerocountct = 0;\r\n\r\n for (int j = n; j < zerocntretobj.getColumnCount(); j = j + mcnt) {\r\n\r\n Object Obj = zerocntretobj.getFieldValue(cnt, j);\r\n\r\n if (zerocntretobj.columnTypes[j] != null) {\r\n if (zerocntretobj.columnTypesInt[j] == Types.BIGINT\r\n || zerocntretobj.columnTypesInt[j] == Types.DECIMAL || zerocntretobj.columnTypesInt[j] == Types.DOUBLE\r\n || zerocntretobj.columnTypesInt[j] == Types.FLOAT || zerocntretobj.columnTypesInt[j] == Types.INTEGER\r\n || zerocntretobj.columnTypesInt[j] == Types.NUMERIC || zerocntretobj.columnTypesInt[j] == Types.REAL\r\n || zerocntretobj.columnTypesInt[j] == Types.SMALLINT || zerocntretobj.columnTypesInt[j] == Types.TINYINT\r\n || zerocntretobj.columnTypes[j].equalsIgnoreCase(\"NUMBER\")) {\r\n\r\n BigDecimal bdecimal = null;\r\n\r\n if (Obj != null) {\r\n bdecimal = zerocntretobj.getFieldValueBigDecimal(cnt, j);\r\n BigDecimal bd = new BigDecimal(\"0\");\r\n if (bdecimal == null || bdecimal.compareTo(bd) == 0) {\r\n zerocountct = zerocountct + 1;\r\n bdcross = new BigDecimal(zerocountct);\r\n\r\n }\r\n }\r\n }\r\n }\r\n }\r\n n = n + 1;\r\n zerocntmsr.add(zerocountct);\r\n }\r\n\r\n }\r\n }", "public Board() {\n\t\tfor(int i = 0; i < board.length; i++){\n\t\t\tfor(int j = 0; j < board[i].length; j++){\n\t\t\t\tboard[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}", "public void setZeroes(int[][] matrix) {\n\t\t\tint m = matrix.length;\n\t\t\tint n = matrix[0].length;\n\t\t\t\n\t\t\tboolean fc = false, fr = false; // first row, first column as markers\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (matrix[i][j] == 0) {\n\t\t\t\t\t\tif (i == 0) fr = true;\n\t\t\t\t\t\tif (j == 0) fc = true;\n\t\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 1; i < m; i++) {\n\t\t\t\tfor (int j = 1; j < n; j++) {\n\t\t\t\t\tif (matrix[0][j] == 0 || matrix[i][0] == 0) {\n\t\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fr) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fc) {\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void zeroMatrix(int[][] matrix, int m, int n){\n \t boolean row0=false;\n \t boolean co0=false;\n \t for(int i=0;i<n;i++){//Check if the 1st row has a zero\n \t\t if(matrix[0][i]==0){\n \t\t\t row0=true;\n \t\t\t break;\n \t\t }\n \t }\n \t for(int i=0;i<m;i++){//Check if the 1st column has a zero \n \t\t if(matrix[i][0]==0){\n \t\t\t co0=true;\n \t\t\t break;\n \t\t }\n \t }\n\n \t for(int i=1;i<m;i++){// Using 1st row and 1st column to record which row and which column has zero\n \t\tfor(int j=1;j<n;j++){\n \t\t\tif(matrix[i][j]==0){\n \t\t\t\tmatrix[0][j]=0;\n \t\t\t\tmatrix[i][0]=0;\n \t\t\t}\n \t\t}\n \t}\n \t for(int i = 1; i < matrix.length; i++) {//Set the matrix zero\n \t for(int j = 1; j < matrix[0].length; j++) {\n \t if(matrix[i][0] == 0 || matrix[0][j] == 0) {\n \t matrix[i][j] = 0;\n \t }\n \t }\n \t }\n \tif(row0){//Set the 1st row zero\n \t\tfor(int i = 0; i < n; i++) {\n matrix[0][i] = 0;\n }\n \t}\n \tif(co0){//Set the 1st column zero\n \t\tfor(int i = 0; i < m; i++) {\n matrix[i][0] = 0;\n }\n \t}\n }", "public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }", "public static int[][] createBoard() {\r\n\r\n\t\tint[][] board = new int[9][9];\r\n\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\tfor (int j = 0; j < 9; j++)\r\n\t\t\t\tboard[i][j] = scan.nextInt();\r\n\t\t}\r\n\t\treturn board;\r\n\r\n\t}", "public int[] getCol() { return _col; }", "public void nullifyMatrix(int[][] mat) {\r\n //extra space\r\n boolean rows[] = new boolean[mat[0].length];\r\n boolean columns[] = new boolean[mat.length];\r\n \r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n rows[i] = true;\r\n columns[j] = true;\r\n }\r\n } \r\n }\r\n \r\n //Nullify rows\r\n for(int i=0; i<rows.length; i++) {\r\n if(rows[i])\r\n helperNullifyRow(mat, i);\r\n }\r\n //Nullify columns\r\n for(int i=0; i<columns.length; i++) {\r\n if(columns[i])\r\n helperNullifyColumn(mat,i);\r\n }\r\n printMat(mat);\r\n }", "public SudokuSolver() {\n matrix = new int[DIM][DIM];\n\n IntStream.range(0, DIM * DIM)\n .forEach(\n n -> {\n int i = n / DIM;\n int j = n % DIM;\n matrix[i][j] = 0;\n });\n }", "private void setPointsAs0() {\n\n for (int counter = 0; counter < countOfPoints; counter++) {\n points[counter] = new Point(0,0);\n }\n\n }", "public void nullifyMatrixEfficient(int[][] mat) {\r\n boolean hasRow=false, hasCol=false;\r\n //checking first row and colmun about having any zero so later we can nullify it\r\n for (int i=0;i<mat[0].length;i++ ) {\r\n if(mat[0][i] == 0) {\r\n hasRow = true;\r\n break;\r\n }\r\n }\r\n for (int i=0;i<mat.length;i++ ) {\r\n if(mat[i][0] == 0) {\r\n hasCol = true;\r\n break;\r\n }\r\n }\r\n //checking zeros existance and marking their coresponding first row and col to zero\r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n mat[0][j] = 0;\r\n mat[i][0] = 0;\r\n }\r\n }\r\n }\r\n //nullify all columns with first element is zero\r\n for(int i=0; i<mat[0].length; i++) {\r\n if(mat[0][i] == 0)\r\n helperNullifyColumn(mat, i);\r\n }\r\n \r\n //nullify all rows with first element is zero\r\n for(int i=0; i<mat.length; i++) {\r\n if(mat[i][0] == 0)\r\n helperNullifyRow(mat, i);\r\n }\r\n printMat(mat);\r\n }", "public static int[][] raggedArray(){\n int n=(int)(Math.random()*11);\n n+=10; \n //this randomly assigns n to between 10 and 20\n int[][] ragged=new int[n][];\n //initialize this array with n first components\n //forloop to assign each inner array a length\n for(int i=0; i<n; i++){\n int m=(int)(Math.random()*11);\n m+=10; //m is between 10 and 20\n ragged[i]=new int[m];\n //another for loop to assign values\n for(int k=0; k<m; k++){\n int val=(int)(Math.random()*1001);\n int sign=(int)(Math.random()*2);\n if(sign==0){\n \n }\n else{\n val*=-1;\n //makes it 50/50 to be negative\n }\n ragged[i][k]=val;\n //assigns value to that spot of array\n }\n }\n return ragged;\n }", "public static void setRowsToZeroes(int[][] matrix, int row) {\n for (int j = 0; j < matrix[0].length; j++) {\n matrix[row][j] = 0;\n }\n }", "public int[][] generateMatrix(int n) {\n // input checking\n if (n < 0) {\n return null;\n }\n\n // start fill in the matrix (consider what happen when n == 0)\n // test case: input == 0; expect [];\n int[][] matrix = new int[n][n];\n int lo = 0, hi = matrix.length - 1;\n int num = 1;\n while (lo <= hi) {\n // pay attention to when lo == hi\n if (lo == hi) {\n matrix[lo][lo] = num;\n break;\n }\n // otherwise, fill this layer\n for (int i = lo; i < hi; i++) { // attention i < hi not i <= hi\n matrix[lo][i] = num++;\n }\n for (int i = lo; i < hi; i++) {\n matrix[i][hi] = num++;\n }\n for (int i = hi; i > lo; i--) {\n matrix[hi][i] = num++;\n }\n for (int i = hi; i > lo; i--) {\n matrix[i][lo] = num++;\n }\n lo++;\n hi--;\n }\n return matrix;\n }", "private int [] createXArray(){\r\n\t\tint [] xCoord = {\r\n\t\t\t\txStart,\r\n\t\t\t\txStart + 50,\r\n\t\t\t\txStart + 65,\r\n\t\t\t\txStart + 65,\r\n\t\t\t\txStart + 50, \r\n\t\t\t\txStart,\r\n\t\t\t\txStart,\r\n\t\t\t\txStart + 50,\r\n\t\t\t\txStart + 50,\r\n\t\t\t\txStart,\r\n\t\t\t\txStart\r\n\t\t};\r\n\t\treturn xCoord;\r\n\t}", "public static void setZeroes(int[][] matrix) {\n boolean[] row = new boolean[matrix.length];\n boolean[] col = new boolean[matrix[0].length];\n\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) {\n row[i] = true;\n col[j] = true;\n }\n }\n }\n\n // Loop through each row and col arrays to see where zeroes are to be set in matrix\n for (int i = 0; i < row.length; i++) {\n if (row[i]) {\n setRowsToZeroes(matrix, i);\n }\n }\n\n for (int j = 0; j < col.length; j++) {\n if (col[j]) {\n setColsToZeroes(matrix, j);\n }\n }\n }", "public static int[][] generateMatrix(int rows, int columns) {\n\tint[][] result = new int[rows][columns];\n\tfor (int i = 0; i < rows; i++) {\n\tfor (int j = 0; j < columns; j++) {\n\tresult[i][j] = (int) (Math.random() * 100) + 1;\n\t}\n\t}\n\treturn result;\n\t}", "private double[] getNeighbors(double[] row) {\n\n double[] neighbors = {0};\n return neighbors;\n }", "@Test\n public void testCreateRowIndices1(){\n\n double[][] input = new double[4][3];\n int[][] myIndices = HarderArrayProblems.createRowIndices(input);\n assertEquals(0, myIndices.length);\n assertEquals(0, myIndices[0].length);\n }", "public void setMatrixZeroes(int[][] M) {\n int m = M.length;\n int n = M[0].length;\n\n boolean firstRowContainsZero = false;\n boolean firstColContainsZero = false;\n\n for(int j=0; j<n; j++) {\n if(M[0][j] == 0) {\n firstRowContainsZero = true;\n break;\n }\n }\n\n for(int i=0; i<m; i++) {\n if(M[i][0] == 0) {\n firstColContainsZero = true;\n break;\n }\n }\n\n for(int i=1; i<m; i++) {\n for(int j=1; j<n; j++) {\n if(M[i][j] == 0) {\n M[0][j] = 0;\n M[i][0] = 0;\n }\n }\n }\n\n for(int i=1; i<m; i++) {\n if(M[i][0] == 0) {\n for(int j=1; j<n; j++)\n M[i][j] = 0;\n }\n }\n\n for(int j=1; j<n; j++) {\n if(M[0][j] == 0) {\n for(int i=1; i<m; i++)\n M[i][j] = 0;\n }\n }\n\n if(firstRowContainsZero) {\n for(int j=0; j<n; j++)\n M[0][j] = 0;\n }\n\n if(firstColContainsZero) {\n for(int i=0; i<m; i++)\n M[i][0] = 0;\n }\n }", "public Integer[] createArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = (int)(value.length*Math.random());\n }\n\n return value;\n }", "public static int[][] init2DArray(int count){\r\n return new int[count][count];\r\n }", "public E[][] getMatrix() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tE[][] matrix = (E[][]) new Object[mColumnCount][mRowCount];\r\n\t\tfor(int i=0; i<mColumnCount; i++)\r\n\t\t\tfor(int j=0; j<mRowCount; j++)\r\n\t\t\t\tmatrix[i][j] = getFromArray(i, j);\r\n\t\treturn matrix;\r\n\t}", "public int[][] getBoard();", "public double[][] getArrayCopy(){\r\n \tdouble[][] c = new double[this.nrow][this.ncol];\r\n\t\tfor(int i=0; i<nrow; i++){\r\n\t\t \tfor(int j=0; j<ncol; j++){\r\n\t\t \tc[i][j]=this.matrix[i][j];\r\n\t\t \t}\r\n\t\t }\r\n \treturn c;\r\n \t}", "private SparseMatrix<Float64> makeCR0(int numberOfRows) {\n\t\tList<SparseVector<Float64>> matrix =\n\t\t\tnew ArrayList<SparseVector<Float64>>();\n\t\tfor (int i = 0; i < numberOfRows; i++) {\n\t\t\tmatrix.add(SparseVector.valueOf(numberOfRows, Float64.ZERO, i,\n\t\t\t\tFloat64.ONE));\n\t\t}\n\t\treturn SparseMatrix.valueOf(new AllSame<Float64>(numberOfRows,\n\t\t\tFloat64.ONE), Float64.ZERO);\n\t}", "private void resetPosition() {\n for (int i = 0; i < board.length; i++) {\n for (int j = 0; j < board[0].length; j++) {\n if (!board[i][j]) {\n rowPos = i;\n columnPos = j;\n return;\n }\n }\n }\n }", "public Matriz(int fila, int columna) {\n\t\tmatriz = new int[fila][columna];\n\t}", "public int[][] getInitialState() {\n\t\treturn this.copyState(this.initialState);\n\t}", "public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public Matrix(int x, int y) {\n\t\tnrow=x;\n\t\tncol=y;\n\t\tmat = new int[x][y];\n\t\t\n\n\t}", "private static int[][][] newEmptyDeploidGenome()\n {\n int[][][] diploid_genome = new int[haploid_number][2][2]; // The karyotype of the cell, 3 dimensional array to store discrete values for each chromosome -> each homologous pair of chromosomes -> 2 complementary DNA strands\n return diploid_genome;\n }", "public TicTacToeBoard() {board = new int[rows][columns];}", "Cell(int[][] board, int zeroRow, int zeroCol) {\n\t\t\tthis.board = board;\n\t\t\tthis.zeroRow = zeroRow;\n\t\t\tthis.zeroCol = zeroCol;\n\t\t\tthis.representation = Arrays.deepToString(board);\n\t\t}", "@Override\n\tpublic int[] toArray() {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\t\tint arr[]=new int[5];\r\n\t\tfor(int i=0;i<5;i++){\r\n\t\t\tarr[i]=i;\r\n\t\t}\r\n\t\tArrays.fill(arr,1,4,9);\r\n\t\r\nfor(int i=0;i<5;i++){\r\n\tSystem.out.println(arr[i]);\r\n}\r\n}", "public int[][] create2DimArray(int row, int col) {\n\t\treturn new int[row][col];\n\t}", "Matrix(int r,int c)\n {\n this.r=r;\n this.c=c;\n arr=new int[r][c];\n }", "private static int[] generateArray(int i, int j) {\n int[] col = new int[j+1];\n for(int k = 0; k <= j; k++)\n {\n col[k] = (i+k)%Algo.x.length;\n } \n return col;\n }", "public static int[] getRow(int[][] myArr2D, int rowNum)\n {\n if( rowNum > myArr2D.length-1)\n {\n System.out.println(\"That row does not exsit\");\n int[] zero = new int[0];\n return zero;\n }\n else\n return myArr2D[rowNum];\n \n }", "public ArrayList<Point> nullPoint() {\n\t\tArrayList<Point> points = new ArrayList<Point>();\n\t\tfor (int r=0; r<rows(); r=r+1) {\n\t\t\tfor (int c=0; c<cols(); c=c+1) {\n\t\t\t\tPoint p = new Point(r,c);\n\t\t\t\tif(get(p)==null) {\n\t\t\t\t\tpoints.add(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn points;\n\t}", "protected int[][][] fillOuterBlock(RescueMap rm, int[] block, int density,Random rand){\n\t\treturn new int[0][][];\n\t}", "public int getClumns() {\n return this.matrix[0].length;\n }", "public int[] reset() {\n return Arrays.copyOf(origin, origin.length);\n }", "public double[][] toIntArray() {\r\n return matrix;\r\n }", "public static GridInterface getEmptyGrid(int rows, int columns) {\n return getGrid(rows, columns, false);\n }", "public void setZeroes_ok(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\n\t\tif (m == 1) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[0][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\t\tmatrix[0][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (n == 1) {\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tif (matrix[i][0] == 0) {\n\t\t\t\t\tfor (int k = 0; k < m; k++) {\n\t\t\t\t\t\tmatrix[k][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint idx = 0;\n\t\tboolean[][] visit = new boolean[m][n];\n\t\twhile (idx <= m * n - 1) {\n\t\t\tint i = idx / n;\n\t\t\tint j = idx % n;\n\t\t\tif (i < m && j < n && matrix[i][j] == 0 && visit[i][j] == false) {\n\t\t\t\t// set whole row to 0\n\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\tif (matrix[i][k] != 0) {\n\t\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t\t\tvisit[i][k] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set whole col to 0\n\t\t\t\tfor (int l = 0; l < m; l++) {\n\t\t\t\t\tif (matrix[l][j] != 0) {\n\t\t\t\t\t\tmatrix[l][j] = 0;\n\t\t\t\t\t\tvisit[l][j] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t}", "public static int[] createZeroBasedSequence(int length) {\n\t\tint[] sequence = new int[length];\n\t\tfor (int i = 0; i < sequence.length; i++) {\n\t\t\tsequence[i] = i;\n\t\t}\n\t\treturn sequence;\n\t}", "public int[][] getRawGrid()\n\t{\n\t\treturn grid;\n\t}" ]
[ "0.7205178", "0.68355054", "0.65917", "0.638382", "0.63806856", "0.6366186", "0.61945635", "0.61734456", "0.61479294", "0.6126021", "0.6051057", "0.60510236", "0.6024991", "0.60082436", "0.60080314", "0.59915215", "0.5969095", "0.5944257", "0.59259737", "0.5810129", "0.57864445", "0.57770056", "0.574909", "0.57482207", "0.57066685", "0.5679956", "0.56666654", "0.5664642", "0.5661603", "0.5650604", "0.5646376", "0.56312156", "0.5629919", "0.5612848", "0.560566", "0.556729", "0.5560532", "0.55335116", "0.55220103", "0.54778147", "0.54740626", "0.54718", "0.5429363", "0.54265034", "0.5409768", "0.5388091", "0.5376272", "0.5375823", "0.5375779", "0.53638184", "0.535214", "0.5336473", "0.5324516", "0.5313901", "0.5313192", "0.5297488", "0.5288585", "0.5278599", "0.52659374", "0.5258949", "0.5252465", "0.5248323", "0.5241496", "0.52216923", "0.521276", "0.5206598", "0.52034307", "0.519881", "0.5189805", "0.5185471", "0.51805234", "0.5176646", "0.5176303", "0.5172332", "0.51675", "0.5167254", "0.51657546", "0.5165121", "0.5164865", "0.5159921", "0.51478696", "0.5144068", "0.51402354", "0.5131061", "0.5128144", "0.51266867", "0.51159346", "0.5110839", "0.510806", "0.5094421", "0.509144", "0.5090871", "0.5088534", "0.50853646", "0.50814176", "0.50696814", "0.5069436", "0.50628734", "0.5061232", "0.5058053" ]
0.62897146
6
Get zero filled array.
public static int[][] getZeroArray(int rowNum, int colNum) { int[][] retA = new int[rowNum][colNum]; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { retA[i][j] = 0; } } return retA; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Array() {\n\t\tarray = new int[0];\n\t}", "public void zero() {\n fill(0);\n }", "private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }", "public int[] reduceInit() {\n return null;\n }", "@SuppressWarnings(\"unchecked\")\n public static <T> Array<T> empty()\n {\n return (Array<T>) EMPTY;\n }", "public static int[][] init() {\n int[][] arr={\n {0,1,0,1,0,0,0},\n {0,0,1,0,0,1,0},\n {1,0,0,1,0,1,0},\n {0,0,1,0,0,1,0},\n {0,0,1,1,0,1,0},\n {1,0,0,0,0,0,0}\n };\n return arr;\n }", "Array(int x) {\n\t\tarray = new int[x];\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = 0; // make each index 0\n\t\t}\n\t}", "public Integer[] createArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = (int)(value.length*Math.random());\n }\n\n return value;\n }", "public static int[] createZeroBasedSequence(int length) {\n\t\tint[] sequence = new int[length];\n\t\tfor (int i = 0; i < sequence.length; i++) {\n\t\t\tsequence[i] = i;\n\t\t}\n\t\treturn sequence;\n\t}", "public int[] reset() {\n return Arrays.copyOf(origin, origin.length);\n }", "private int[] reset() {\n return data;\n }", "@Override\r\n\tprotected Integer zero() {\n\t\treturn 0;\r\n\t}", "private int[] blankFinder(){\n for(int x = 0; x < n; x++){\n for(int y = 0; y < n; y++){\n if(tiles[x][y] == 0){\n return new int[]{x, y};\n }\n }\n }\n return null;\n }", "public void initializeArray(){\n if(topOfStack==-1){\n for(int i=0;i<this.arr.length;i++){\n this.arr[i]=Integer.MIN_VALUE;\n }\n }\n }", "public void testCreateEmptyArray() {\n System.out.println(\"createEmptyArray\"); // NOI18N\n \n TypeID componentType = new TypeID(TypeID.Kind.COMPONENT,\"Root\"); // NOI18N\n \n PropertyValue result = PropertyValue.createEmptyArray(componentType);\n List<PropertyValue> expResult = new ArrayList<PropertyValue> (0);\n \n assertEquals(expResult, result.getArray());\n }", "public double[] genEmptyUtilities() {\n\t\tdouble[] util = new double[states.size()];\n\t\tfor(int i = 0;i<util.length;i++)\n\t\t\tutil[i] = 0.0;\n\t\treturn util;\n\t}", "public Array()\n {\n assert DEFAULT_CAPACITY > 0;\n\n array = new Object[DEFAULT_CAPACITY];\n }", "private float[] initialPositionData () {\n float[] ret = new float[ this.positionQueue.size() ];\n for ( int i = 0, len = ret.length ; i < len ; i++ )\n ret[ i ] = this.positionQueue.poll();\n return ret;\n }", "private void setPointsAs0() {\n\n for (int counter = 0; counter < countOfPoints; counter++) {\n points[counter] = new Point(0,0);\n }\n\n }", "public int[] reset() {\n\t\treturn memos;\n\t}", "CompT zero();", "public WeetArray() {\n count = 0;\n nullCount = 0;\n }", "public int[] reset() {\n\t\t\treturn originalArr;\n\t\t}", "@Override\n\tpublic int[] toArray() {\n\t\treturn null;\n\t}", "Vector getZeroVector();", "public int[] m21284OooO00o() {\n int i = this.f22760OooO0O0;\n int[] iArr = new int[i];\n System.arraycopy(this.f22759OooO00o, 0, iArr, 0, i);\n return iArr;\n }", "public void fillArrayWithNeg1(){\n\t\t\n\t\tArrays.fill(this.theArray, \"-1\");\n\t\t\n\t}", "public void clear()\n\t{\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = 0;\n\t\t}\n\t}", "public int[] reset() {\n return nums.clone();\n }", "@Override\n public long[] createAccumulator() {\n return new long[] {0};\n }", "void makeZero(){\n nnz = 0;\n for(int i=0; i<this.matrixSize; i++){\n this.rows[i] = new List();\n }\n }", "public void zero();", "public int[] reset() {\r\n\t\t\treturn this.initNums;\r\n\t\t}", "public int[] ZeroOutNegs(int[] arr) {\r\n for (int x = 0; x < arr.length; x++) {\r\n if (arr[x] < 0) {\r\n arr[x] = 0;\r\n }\r\n }\r\n return arr;\r\n }", "Array createArray();", "private static ByteBuffer _zeroBuffer( int size, BufferType type )\n {\n ByteBuffer zeroBuf = zeroTL(type).get();\n zeroBuf.clear();\n zeroBuf.limit(size);\n return zeroBuf;\n }", "public static AsonValue CreateRootArray() {\n return CreateRootArray(null);\n }", "public int[][] createEmptyGrid() {\n int[][] emptyGrid = new int[9][9];\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n emptyGrid[row][col] = 0;\n }\n }\n return emptyGrid;\n }", "private double[][] emptyW() {\n double[][] temp = new double[inputLayerSize][numNodeFeatures];\n for (int i = 0; i < inputLayerSize; i++) {\n temp[i] = new double[numNodeFeatures];\n }\n return temp;\n }", "private static int[] arrayInitializer(int length) {\n int[] myArray = new int[length];\n Random rand = new Random();\n for (int i = 0; i < length; i++) {\n myArray[i] = rand.nextInt(1000);\n }\n return myArray;\n }", "public int[] reset() {\r\n return reset;\r\n }", "public static TinyMT32[] getDefaultArray(final int count, final long seed,\n final long jump) {\n TinyMT32 tiny = getDefault(seed);\n return tiny.getJumpedArray(count, jump);\n }", "public static int[] randomPositiveIntArrayWithoutZero(int size,\n int limit) {\n int[] r = new int[size];\n\n for (int i = 0; i < size; ++i) {\n int rand;\n while ((rand = RAND.nextInt(limit)) == 0) ;\n r[i] = rand;\n }\n\n // Verify array contains no zero element\n for (int i : r) {\n if (i == 0) {\n throw new IllegalStateException(\"Array contains zero.\");\n }\n }\n\n return r;\n }", "public T[] toArray() {\n return null;\n }", "public static int[] reset() {\n nums = Arrays.copyOf(numsBackUp, numsBackUp.length);\n return nums;\n }", "private static int[] createArray() {\n\t\trnd = new Random();\r\n\t\trandomArray = new int[8];\r\n\t\tfor (int i = 0; i < 8; i++) {\r\n\t\t\trandomArray[i] = rnd.nextInt(45);\r\n\t\t}\r\n\t\treturn randomArray;\r\n\t}", "public static int[] getNumeros() {\n\t\treturn numeros;\n\t}", "public int[] reset() \n {\n return reset;\n }", "public void forzerocount() {\r\n val = new BigDecimal[zerocntretobj.getRowCount()];\r\n for (int cnt = 0; cnt < zerocntretobj.getRowCount(); cnt++) {\r\n int zerocountct = 0;\r\n BigDecimal bdcross = null;\r\n int mcnt = Qrycolumns.size();\r\n int n = 0;\r\n for (int i = 0; i < mcnt; i++) {\r\n zerocountct = 0;\r\n\r\n for (int j = n; j < zerocntretobj.getColumnCount(); j = j + mcnt) {\r\n\r\n Object Obj = zerocntretobj.getFieldValue(cnt, j);\r\n\r\n if (zerocntretobj.columnTypes[j] != null) {\r\n if (zerocntretobj.columnTypesInt[j] == Types.BIGINT\r\n || zerocntretobj.columnTypesInt[j] == Types.DECIMAL || zerocntretobj.columnTypesInt[j] == Types.DOUBLE\r\n || zerocntretobj.columnTypesInt[j] == Types.FLOAT || zerocntretobj.columnTypesInt[j] == Types.INTEGER\r\n || zerocntretobj.columnTypesInt[j] == Types.NUMERIC || zerocntretobj.columnTypesInt[j] == Types.REAL\r\n || zerocntretobj.columnTypesInt[j] == Types.SMALLINT || zerocntretobj.columnTypesInt[j] == Types.TINYINT\r\n || zerocntretobj.columnTypes[j].equalsIgnoreCase(\"NUMBER\")) {\r\n\r\n BigDecimal bdecimal = null;\r\n\r\n if (Obj != null) {\r\n bdecimal = zerocntretobj.getFieldValueBigDecimal(cnt, j);\r\n BigDecimal bd = new BigDecimal(\"0\");\r\n if (bdecimal == null || bdecimal.compareTo(bd) == 0) {\r\n zerocountct = zerocountct + 1;\r\n bdcross = new BigDecimal(zerocountct);\r\n\r\n }\r\n }\r\n }\r\n }\r\n }\r\n n = n + 1;\r\n zerocntmsr.add(zerocountct);\r\n }\r\n\r\n }\r\n }", "protected double[] toArrayNotIncludingNoDataValues() {\r\n boolean handleOutOfMemoryError = false;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(handleOutOfMemoryError);\r\n long n = getN();\r\n if (n != (int) n) {\r\n throw new Error(\"Error n != (int) n \");\r\n }\r\n double[] array = new double[(int) getN()];\r\n int row;\r\n int col;\r\n int count = 0;\r\n double value;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell( row, col);\r\n if (value != noDataValue) {\r\n array[count] = value;\r\n count++;\r\n }\r\n }\r\n }\r\n return array;\r\n }", "private int[] getRandomArray() throws ComputationException {\n if (randomArray == null || randomArray.length == 0) {\n throw new ComputationException(\"Unable to compute\");\n }\n return randomArray;\n }", "public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}", "public int[] reset() {\r\n return nums;\r\n }", "public void setToZero() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n data[i][j] = 0;\n }\n }\n }", "private static int[] stripLeadingZeroInts(int val[]) {\n int vlen = val.length;\n int keep;\n\n // Find first nonzero byte\n for (keep = 0; keep < vlen && val[keep] == 0; keep++)\n ;\n return java.util.Arrays.copyOfRange(val, keep, vlen);\n }", "public o000000ooo[] newArray(int i) {\n return new o000000ooo[i];\n }", "public Integer[] createInverseSortedArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = defaultLaenge - i;\n }\n\n return value;\n }", "protected char[] initialValue() {\n return new char[c.jk];\n }", "public int[] reset() {\n return nums;\n }", "public int[] reset() {\n return nums;\n }", "public int[] reset() {\n return nums;\n }", "public int[] reset() {\n return nums;\n }", "public int[] reset() {\n return nums;\n }", "public int[] reset() {\n return nums;\n }", "public int[] reset() {\n return nums;\n }", "public static IntArrayList zero(int size) {\n IntArrayList result = new IntArrayList(size);\n result.elementsCount = size;\n return result;\n }", "public o0000o000o[] newArray(int i) {\n return new o0000o000o[i];\n }", "public EfficientTerminalSet empty() {\n return new EfficientTerminalSet(terminals, indices, new int[data.length]);\n }", "public BigNum()\r\n { \r\n myArray = new int[SIZE];\r\n for (int i = 0; i < SIZE; i++)\r\n {\r\n myArray[i] = 0;\r\n }\r\n }", "public float[] array() {\r\n\t\treturn new float[] { x, y, z };\r\n\t}", "public static TinyMT32[] getDefaultArray(final int count,\n final String seed, final long jump) {\n TinyMT32 tiny = getDefault(seed);\n return tiny.getJumpedArray(count, jump);\n }", "public static int[][] getZeroQuadraticArray(int rowNum) {\r\n\t\treturn getZeroArray(rowNum, rowNum);\r\n\t}", "static int[] populateArray(int lenght) {\n\t\tint[] A = new int[lenght];\n\t\t\n\t\tfor(int i=0; i < A.length; i++) {\n\t\t\tA[i] = (int)(Integer.MAX_VALUE * Math.random());\n\t\t}\n\t\t\n\t\treturn A;\n\t}", "public static int[][] makeMatrixZero(int[][] inputMatrix) {\n\t\tint[][] outputMat = zeroInit();\n\n\t\tfor (int i = 0; i < INDEX; i++) {\n\t\t\tfor (int j = 0; j < INDEX; j++) {\n\t\t\t\tif(outputMat[i][j] !=0)\n\t\t\t\t\toutputMat[i][j] = inputMatrix[i][j];\n\t\t\t\t\n\t\t\t\tif (inputMatrix[i][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < INDEX; k++) {\n\t\t\t\t\t\toutputMat[i][k] = 0;\n\t\t\t\t\t\toutputMat[k][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t} \n\n\t\t\t}\n\t\t}\n\n\t\treturn outputMat;\n\t}", "public void makeArray() {\r\n for (int i = 0; i < A.length; i++) {\r\n A[i] = i;\r\n }\r\n }", "private Object[] buildEmptyRow() {\n Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() );\n\n return rowData;\n }", "protected Object[] freshElemArray(int capacity) {\n return new Object[capacity];\n }", "public void clear()\n \t{\n \t\tint byteLength = getLengthInBytes();\n \t\tfor (int ix=0; ix < byteLength; ix++)\n value[ix] = 0;\n \t}", "protected double[] toArrayIncludingNoDataValues() {\r\n boolean handleOutOfMemoryError = false;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double[] array;\r\n if (((long) nrows * (long) ncols) > Integer.MAX_VALUE) {\r\n //throw new PrecisionExcpetion\r\n System.out.println(\r\n \"PrecisionException in \" + getClass().getName()\r\n + \".toArray()!\");\r\n System.out.println(\r\n \"Warning! The returned array size is only \"\r\n + Integer.MAX_VALUE + \" instead of \"\r\n + ((long) nrows * (long) ncols));\r\n }\r\n array = new double[nrows * ncols];\r\n int row;\r\n int col;\r\n int count = 0;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n array[count] = getCell( row, col);\r\n count++;\r\n }\r\n }\r\n return array;\r\n }", "public MyArray() {\n\t\tcapacity = DEFAULT_CAPACITY;\n\t\tnumElements = 0;\n\t\telements = (E[]) new Object[capacity];\n\t}", "public int[][] zeroMatrix(int[][] matrix){\n\tboolean[][] zeros = new boolean[matrix.length][matrix[0].length];\n\tfor (int i = 0; i < matrix.length; i++){\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (matrix[i][j] == 0) zeros[i][j] = true;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < matrix.length; i++) {\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (zeros[i][j]){\n\t\t\t\tfor (int k = 0; k < matrix.length; k++){\n\t\t\t\t\tmatrix[k][j] = 0;\n\t\t\t\t}\n\t\t\t\tfor (int k = 0; k < matrix[0].length; k++){\n\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn matrix;\n}", "public int[] generateArray() {\n return generateArray(5);\n }", "private int[][] listEmptyCells() {\n int nbEmpty = 0;\n int[][] emptyCells;\n int k = 0;\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0)\n nbEmpty++;\n }\n }\n emptyCells = new int[nbEmpty][2];\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0) {\n emptyCells[k][0] = i;\n emptyCells[k][1] = j;\n k++;\n }\n }\n }\n return emptyCells;\n }", "public int[] findFirstNonEmpty() {\n\t\tint[] coord = new int[2];\n\t\tfor (int r=0; r<size*size; r++) {\n\t\t\tfor (int c=0; c<size*size; c++) {\n\t\t\t\tif (board[r][c].val==0) {\n\t\t\t\t\tcoord[0]=r;\n\t\t\t\t\tcoord[1]=c;\n\t\t\t\t\treturn coord;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\treturn null;\n\t}", "public static Vector4 zero()\n {\n return new Vector4(0,0,0,0);\n }", "public int[] start() {\n\t\treturn null;\n\t}", "private final int[] initializeInstanceVariable() {\n\t\tint n = 10;\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {temp[i] = i;}\n\t\treturn temp;\n\t}", "public FormatInteger zeroFill(){\n fillCharacter = ZERO_CHAR;\n return this;\n }", "public int[] toArray() {\n return Arrays.copyOf(buffer, elementsCount);\n }", "void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }", "public byte[] array()\r\n/* 127: */ {\r\n/* 128:156 */ ensureAccessible();\r\n/* 129:157 */ return this.array;\r\n/* 130: */ }", "public int ZERO() {\n return getInt(setting.ZERO);\n }", "@Override\n public byte[] getBytes() {\n return new byte[0];\n }", "private Integer[] getNegArray(int size) {\n Integer[] toReturn = new Integer[size];\n for (int i = 0; i < size; i++) {\n toReturn[i] = -1;\n }\n return toReturn;\n }", "private TinyMT32 getZero() {\n TinyMT32 that = new TinyMT32(this);\n that.st0 = 0;\n that.st1 = 0;\n that.st2 = 0;\n that.st3 = 0;\n return that;\n }", "@Override\n public void clear() {\n array.reset();\n }", "public int[] reset() {\n return store;\n }", "public int[] initializingArray(int size) {\n\t\tint [] array = createArrays(size);\n\t\tfor(int i = 0;i < array.length; i++) {\n\t\t\tarray[i] = rand.nextInt(10);\n\t\t}\n\t\treturn array;\n\t}", "public void clearInitialize(){\n index=0;\n for(int i =0; i < list.length;i++){\n list[i]=0;\n }\n hasFilled = false;\n\n }", "public int[] proximoBranco(){\n for(int i = 0; i < 9; i++){\n for (int j = 0; j < 9; j++){\n if(matriz[i][j] == 0){\n int [] aux = {i, j};\n return aux;\n }\n }\n }\n return null;\n }" ]
[ "0.69025475", "0.6831779", "0.66906327", "0.65413034", "0.6516538", "0.6504873", "0.6492748", "0.6365713", "0.63213164", "0.630953", "0.62788767", "0.6255684", "0.6250883", "0.62210345", "0.61786616", "0.6038632", "0.6021932", "0.60020775", "0.6000395", "0.59941155", "0.59657055", "0.5948825", "0.59372795", "0.58776736", "0.58725667", "0.58694386", "0.5863185", "0.58592886", "0.58587456", "0.5856413", "0.5853319", "0.5846159", "0.5844534", "0.584372", "0.58391774", "0.5835077", "0.5827281", "0.58061004", "0.580555", "0.5796256", "0.5793611", "0.57620215", "0.57595956", "0.5758851", "0.5756882", "0.57435995", "0.5742111", "0.574055", "0.57401466", "0.5722118", "0.57216865", "0.572074", "0.57176197", "0.57168394", "0.56897014", "0.568115", "0.56780326", "0.5674455", "0.5665913", "0.5665913", "0.5665913", "0.5665913", "0.5665913", "0.5665913", "0.5665913", "0.5660995", "0.5657759", "0.56574225", "0.5645864", "0.56424177", "0.5624577", "0.56205976", "0.56152016", "0.56025016", "0.55972797", "0.5593164", "0.55878675", "0.55824125", "0.55806345", "0.5567164", "0.5564995", "0.5563948", "0.5559663", "0.55533487", "0.55461466", "0.5540785", "0.5539161", "0.55382615", "0.55350417", "0.55295455", "0.5529239", "0.55274713", "0.55253196", "0.55229247", "0.5522821", "0.55125105", "0.5510379", "0.5510035", "0.550632", "0.5506311" ]
0.61732996
15
Get formatted string representation.
public static String toString(int[][] a) { int rowNum = a.length; int colNum = a[0].length; String ret = ""; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (colNum == 0) { ret += "\n"; } ret += "\t" + a[i][j]; } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String format();", "@VTID(8)\r\n java.lang.String format();", "public String getStringRepresentation() {\n StringJoiner joiner = new StringJoiner(STRING_FORMAT_DELIMITER);\n\n joiner.add(this.getCaller())\n .add(this.getCallee())\n .add(SIMPLE_DATE_FORMAT.format(startTime))\n .add(SIMPLE_DATE_FORMAT.format(endTime));\n\n return joiner.toString();\n }", "public String format () {\n\t\treturn format;\n\t}", "public String toString()\n {\n return toString((Format) null);\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn toString(Locale.getDefault(Locale.Category.FORMAT));\n\t}", "public final String getFormatString() {\n final Exp formatExp =\n (Exp) getProperty(Property.FORMAT_EXP_PARSED.name, null);\n if (formatExp == null) {\n return \"Standard\";\n }\n final Calc formatCalc = root.getCompiled(formatExp, true, null);\n final Object o = formatCalc.evaluate(this);\n if (o == null) {\n return \"Standard\";\n }\n return o.toString();\n }", "protected String getToStringFormat()\n {\n return getClass().getSimpleName() + \"@\"\n + Integer.toHexString(hashCode()) + \": { \"\n + \"offset = 0x\" + Integer.toHexString(offset) + \"; \"\n + \"size = \" + size + \"; \"\n + \"%s\"\n + \"value = \" + getValue() + \"; \"\n + \"isAccessible = \" + isAccessible() + \"; \"\n + \"checksum = 0x\" + Integer.toHexString(checksum()) + \"; \"\n + \"}\";\n }", "String getFormat();", "String getFormat();", "String getFormat();", "public String getFormat() {\n Object ref = format_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n format_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String toString() {\n\t\t\tStringBuilder sb = new StringBuilder(\"%\");\n\t\t\t// Flags.UPPERCASE is set internally for legal conversions.\n\t\t\tFlags dupFlag = flag.dup().remove(Flags.UPPERCASE);\n\t\t\tsb.append(dupFlag.toString());\n\t\t\tif (index > 0) {\n\t\t\t\tsb.append(index).append('$');\n\t\t\t}\n\t\t\tif (width != -1) {\n\t\t\t\tsb.append(width);\n\t\t\t}\n\t\t\tif (precision != -1) {\n\t\t\t\tsb.append('.').append(precision);\n\t\t\t}\n\t\t\tif (isDateConversion) {\n\t\t\t\tsb.append(flag.contains(Flags.UPPERCASE) ? 'T' : 't');\n\t\t\t}\n\t\t\tsb.append(flag.contains(Flags.UPPERCASE)\n\t\t\t\t\t? Character.toUpperCase(conversionChar) : conversionChar);\n\t\t\treturn sb.toString();\n\t\t}", "public String format()\n {\n StringBuilder sb = new StringBuilder(64);\n sb.append(expression).append(\" = \");\n\n if (detailExpression != null && !detailExpression.equals(value.toString()))\n {\n sb.append(\"(\").append(detailExpression).append(\") = \");\n }\n\n sb.append(value);\n if (description != null)\n {\n sb.append(\" // \").append(description);\n }\n\n return sb.toString();\n }", "public String getFormatString() {\n\t\treturn formatString;\n\t}", "public String format(Object value);", "public String toString ()\r\n\t{\r\n\t\tString format = \r\n\t\t\t\t\"*****************************************************************\" + \"\\n\" +\r\n\t\t\t\t\t\t\"\\t\" + \"The name of the contact is \"+ firstName + \" \" + surname + \". \" + \"\\n\" +\r\n\t\t\t\t\t\t\"\\t\" + \"The ID number of the contact is \" + uniqueID + \". \" + \"\\n\" +\r\n\t\t\t\t\t\t\"\\t\" + \"The phone number of the contact is \" + phoneNumber + \".\" + \"\\n\" +\r\n\t\t\t\t\t\t\"*****************************************************************\" + \"\\n\";\r\n\r\n\t\treturn format;\r\n\t}", "@GwtIncompatible(\"String.format()\")\n/* */ public String toString() {\n/* 171 */ return toString(4);\n/* */ }", "public String getFormat() {\n Object ref = format_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n format_ = s;\n return s;\n }\n }", "public String format(String key) {\r\n return getString(key);\r\n }", "String getValueFormatted();", "public String getPrintableFormat() {\n String output = new String(\"Articoli del gruppo \" + groupName + \":\\n\");\n for (int i = 0; i < list.size(); i++) {\n Article article = list.get(i);\n output += String.format(\"%2d %s\\n\",i,article.getPrintableFormat());\n }\n return output;\n }", "String getFormatter();", "public String toString() {\n\t\tString fin = String.format(\"%-15d | %-20s | %-15d | %-15s | %-15s |\"\n\t\t\t\t, ID, name, age, organ,\n\t\t\t\tbloodType.getBloodType() );\n\t\treturn fin;\n\t}", "public String getString(){\n\t\treturn \t_name + String.format(\"\\nWeight: %s\", _weight) + String.format( \"\\nNumber of wheels: %s\", _numberOfWheels ) + \n\t\t\t\tString.format( \"\\nMax of speed: %s\", _maxOfSpeed ) + String.format( \"\\nMax acceleration: %s\", _maxAcceleration ) + \n\t\t\t\tString.format( \"\\nHeight: %s\", _height ) + String.format( \"\\nLength: %s\", _length ) + String.format( \"\\nWidth: %s\", _width );\n\t}", "public String getFormat() {\n\t\treturn formatString;\n\t}", "public String toString()\n\t{\n\t\treturn String.format(\"%-25s%-15s\\n%-25s%-15s\\n%-25s%-15s\\n%-25s%-15d\\n%-25s%-15s\\n%-25s$%,-13.2f\", \n\t\t\t\t \t\t \t \"Name\", this.getName(), \"Address:\", this.getAddress(), \"Telephone number:\", this.getTelephone(), \n\t\t\t\t \t\t \t \"Customer Number:\", this.getCustNum(), \"Email notifications:\", this.getSignedUp() == true ? \"Yes\" : \"No\",\n\t\t\t\t \t\t \t \"Purchase amount:\", this.getCustomerPurchase());\n\t}", "public String getFormatString() {\r\n if (format == null) { return \"\"; }\r\n if (format.equals(ImportQueueItem.FORMAT_TAB)) {\r\n return FORMAT_TAB_DISPLAY;\r\n } else if (format.equals(ImportQueueItem.FORMAT_XML)) {\r\n return FORMAT_XML_DISPLAY;\r\n } else if (format.equals(ImportQueueItem.FORMAT_DISCOURSE)) {\r\n return FORMAT_DISCOURSE_DISPLAY;\r\n } else {\r\n return format + \" format\";\r\n }\r\n }", "String getValueFormat();", "public String toString() {\n return String.format(mFormat,\n format(mManufacturer),\n format(mBrand),\n format(mModel),\n mResolution,\n mDensity,\n mAndroidDensity,\n mVersion,\n mSdk,\n mLanguage);\n }", "R format(O value);", "public String toString()\n\t{\n\t\treturn Printer.stringify(this, false);\n\t}", "String format(T value);", "public String toString() {\n\t\treturn toString(Constants.get_output_precision());\n\t}", "public String toPrettyFormatedString() {\n StringBuilder strBuilder = new StringBuilder();\n String NEW_LINE = System.getProperty(\"line.separator\");\n \n strBuilder.append(\"Status: \" + status + NEW_LINE);\n strBuilder.append(\"Data: \" + Arrays.toString(data) + NEW_LINE);\n \n return strBuilder.toString();\n }", "public String toString() {\n\t\tString str = \"\";\n\t\tstr = String.format(\"%.2f lbs. @ %.2f /lbs.\\n%s\\t%.2f \", this.getWeight(), getPrice(), this.getName(), this.getCost());\n\t\treturn str;\n\t}", "public String toString(){\n return String.format(\n \"Width: %.2f\\nLength: %.2f\\nArea: %.2f\\nPerimeter: %.2f\\n\",\n getLength(), getWidth(), getArea(), getPerimeter());\n }", "public String toString() { return stringify(this, true); }", "String getFormattedString(IRenamable f);", "public String getFormat() {\n return this.format;\n }", "public String toString()\n {\n String str = \"\";\n switch (align)\n {\n case LEFT :\n str = \",align=left\";\n break;\n case CENTER :\n str = \",align=center\";\n break;\n case RIGHT :\n str = \",align=right\";\n break;\n }\n return getClass().getName() + \"[hgap=\" + hgap + \",vgap=\" + vgap + str + \"]\";\n }", "public String toString() {\n\t\tNumberFormat formatter = NumberFormat.getPercentInstance();\n\t\tformatter.setMinimumFractionDigits(1);\n\n\t\treturn (\"\\nStudent Name: \" + lastName + \", \" + firstName + \"\\nWID: \" + wId + \"\\nOverall Pct: \"\n\t\t\t\t+ formatter.format(scorePercent) + \"\\nFinal Grade: \" + calcFinalGrade());\n\t}", "public abstract String format(T t);", "@Override\n public String toString() {\n if (isValid()) {\n return String.format(\n Locale.US,\n \"%+02f%+02f%s/\",\n coordinates.get(1), coordinates.get(0), coordinateSystem.toString());\n }\n return \"\";\n }", "public String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append('{');\n sb.append(\" Volume=\" + volume());\n sb.append(\" Issue=\" + issue());\n sb.append(\" Pub Date=\" + pubDate());\n sb.append('}');\n return sb.toString();\n }", "public String getStringRecord() {\n NumberFormat nf = new DecimalFormat(\"0000.00\");\n String delimiter = \",\";\n\n return String.format(\"%05d\", orderLineId) + delimiter + String.format(\"%05d\", orderId) + delimiter\n + String.format(\"%05d\", userId) + delimiter + String.format(\"%05d\", productId) + delimiter\n + String.format(\"%05d\", orderLineQuantity) + delimiter + nf.format(salesPrice)\n + System.getProperty(\"line.separator\");\n }", "public String getFormattedString(String format, Object... objects) {\n return (String.format(format, objects));\n }", "public String toString(){\r\n return String.format(\"%-15s%-15s%-30s%,8.2f\", this.employeeFirstName, \r\n this.employeeLastName, this.employeeEmail, getBiweeklySalary());\r\n }", "public String toString(String fmt) {\n StringBuffer sb = new StringBuffer(\"[\");\n sb.append(\"[ \");\n for (int i = 0; i < numElements; i++) {\n sb.append(String.format(fmt, get(i)) + \" \");\n }\n sb.append(\"]\");\n return sb.toString();\n }", "@Override\n public final String toString() {\n return asString(0, 4);\n }", "public String toString() {\n\t\treturn String.format(\"%.0f-%s note [%d]\", this.getValue(),this.getCurrency(),this.getSerial());\n\t}", "public String toString()\r\n\t{\r\n\t\tString output = \" \";\r\n\t\tString specialModifier = \" \";\r\n\t\tif(this.isSpecial())\r\n\t\t{\r\n\t\t\tspecialModifier = \" *\";\r\n\t\t}\r\n\t\t\t\r\n\t\toutput = String.format(\"%-9s%-5s%-19s%s%.2f\",getType(), specialModifier, this.getName(),\"$ \", this.getPrice());\r\n\t\t//code to be done here\r\n\t\t\r\n\t\t\r\n\t\treturn output;\r\n\t}", "public String toString(){\n return \"Format: \" + format +\", \" + super.toString(); \n }", "public final String toString() {\n\t\tStringWriter write = new StringWriter();\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(write);\n\t\t\twrite.flush();\n\t\t\tout = write.toString();\n\t\t\twrite.close();\n\t\t} catch (UnsupportedEncodingException use) {\n\t\t\tuse.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn (out);\n\t}", "public String getFormat() {\r\n return _format;\r\n }", "public String toString() {\n\t\treturn toString(0, 0);\n\t}", "@Override\r\n\tpublic String toStringFormat() {\n\t\treturn transactionId + \" \" + merhcantId\r\n\t\t\t\t+ \" \" + transactionVolume + \" \" + transactionAmount\r\n\t\t\t\t+ \" \" + transactionDate+\"\\n\";\r\n\t}", "public String format(Object... args) {\n\t\treturn format(new StringBuilder(), args).toString();\n\t}", "public String format(TemporalAccessor temporal) {\n StringBuilder buf = new StringBuilder(32);\n formatTo(temporal, buf);\n return buf.toString();\n }", "public String toString() {\r\n final StringBuffer stringBuffer = new StringBuffer();\r\n stringBuffer.append( \"amount of wall rubbles = \" );\r\n stringBuffer.append( amountOfWallRubbles );\r\n stringBuffer.append( \"%, \" );\r\n stringBuffer.append( \"amount of blood = \" );\r\n stringBuffer.append( amountOfBlood );\r\n stringBuffer.append( \"%, \" );\r\n if ( isKillLimit ) {\r\n stringBuffer.append( \"kill limit = \" );\r\n stringBuffer.append( killLimit );\r\n stringBuffer.append( \", \" );\r\n }\r\n if ( isTimeLimit ) {\r\n stringBuffer.append( \"time limit = \" );\r\n stringBuffer.append( timeLimit );\r\n stringBuffer.append( \" minute\" );\r\n if ( timeLimit > 1 )\r\n stringBuffer.append( 's' );\r\n stringBuffer.append( \", \" );\r\n }\r\n stringBuffer.append( \"period time = \" );\r\n stringBuffer.append( periodTime );\r\n stringBuffer.append( \" ms\" );\r\n return stringBuffer.toString();\r\n }", "public String getFormat()\n {\n return format;\n }", "public String getOutput() {\n return String.format(\"DCode: %-7.0f \\\"%-9s\\\" \\t - %5.3fmm x %5.3fmm - \\t Area: %6.3fmm² \\t Area Ratio: %5.2f \\t Transfer Effeciency: %2.1f \\t Number of apertures: %-5.0f\"\n , (double) dCode\n , shape\n , x\n , y\n , getArea()\n , getAreaRatio()\n , getTransferEffeciency()\n , (double) numbOfApertures);\n }", "public String getFormat() {\n return format;\n }", "public String getFormat() {\n return format;\n }", "public String getFormat() {\n return format;\n }", "public String toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}", "protected String formatField() {\n \tif(!updated) return \"No record set.\";\n \t\n \tif(firstFieldP.getText() != null && lastFieldP.getText() != null) {\n\t \tfirstNameString = firstFieldP.getText();\n\t \tlastNameString = lastFieldP.getText();\n \t} else\t{\n \tfirstNameString = firstFieldC.getText();\n \tlastNameString = lastFieldC.getText();\n \ttribeString = tribeField.getText();\t\n \t}\n\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"<html><p align=center>\");\n \tsb.append(firstNameString);\n \tsb.append(\" \");\n \tsb.append(lastNameString);\n \tsb.append(\"<br>\");\n \tsb.append(tribeString);\n \tsb.append(\"</p></html>\");\n \t\n \treturn sb.toString(); \t\n }", "public String toString() {\n synchronized (FORMATTER) {\n return FORMATTER.format(_calendar.getTime());\n }\n }", "public java.lang.String toString() {\n\t\tString s=\"\";\n\t\ts+=String.format(\"%.2f\", weight);\n\t\t//s+=Double.toString(weight);\n\t\ts+=\" lbs. @ \";\n\t\ts+=DessertShoppe.cents2dollarsAndCents(price_per_pound);\n\t\ts+=\" /lb.\\t \\n\";\n\t\ts+=String.format(\"%-25s%6s\\n\",name, DessertShoppe.cents2dollarsAndCents(this.getCost()));\n\t\treturn s;\n\t}", "public String toString() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // 4\n\t\tString hours = String.format(\"%02d\", this.hours);\n\t\tString minutes = String.format(\"%02d\", this.minutes);\n\t\tString seconds = String.format(\"%05.2f\", this.seconds);\n\n\t\tString time = hours + \":\" + minutes + \":\" + seconds;\n\t\treturn time;\n\t}", "public String toString() {\n return String.format(\"%s:%n\\t%-10s: %s%n\\t%-10s: %s%n\\t%-10s: $%.2f%n\\t%-10s: %s%n\\t%-10s: %s%n\", \n \"Boat\", \"Model\", getVehicleModel(), \"Color\", getVehicleColor(), \"Cost\", getVehicleCost(), \n \"Type\", getBoatType(), \"Made of\", getBoatConstruct());\n }", "public String format()\n {\n return String.format(\"%/t%/t/\", grassPatches.length, walkers.size());\n }", "@Override\n public String toString() {\n // Jahr, immer 4-stellig (führenden Nullen)\n String j = String.format(\"%04d\", jahr());\n\n // Monat, immer 2-stellig (führende Null)\n String m = String.format(\"%02d\", monat());\n\n // Tag, immer 2-stellig (führende Null)\n String t = String.format(\"%02d\", tag());\n\n // Trennzeichen (char -> String für String.join())\n String tz = String.valueOf(separator);\n\n // Setzt Datum entsprechend dem festgelegten format zusammen\n String datum = switch (format) {\n case \"jmt\" -> String.join(tz, j, m, t);\n case \"tmj\" -> String.join(tz, t, m, j);\n case \"mtj\" -> String.join(tz, m, t, j);\n default -> \"Usage: jmt/tmj/mtj\";\n };\n return datum;\n }", "public String getFormattedReceiptLabel() {\t \n\t String receiptLabel = res.getString(getReceiptLabel().getKey());\t \n\t int numberOfSpaces = ((totalLength - receiptLabel.length()) / 2);\t \n\t String prefix = \"\";\n\t String postfix = \"\";\n\t for(int i = 0; i < numberOfSpaces; i++) {\n\t\t prefix += \" \";\n\t\t postfix += \" \";\n\t }\n\t receiptLabel = prefix + receiptLabel + postfix;\t \n\t return receiptLabel;\n }", "void format();", "public String toString() {\n\t\tString str = \"\";\n\t\tfor(int i = 0;i < data.length;i++) {\n\t\t\tstr = str + data[i];\n\t\t}\n\t\tif(overflow) {\n\t\t\treturn \"Overflow\";\n\t\t}else {\n\t\t\treturn str;\n\t\t}\n\t}", "public String toString() {\n return this.getNom() +\n formatbonus('f', bonusForce) +\n formatbonus('d', bonusDefense) +\n formatbonus('v', bonusVie) +\n formatbonus('e', bonusEsquive) +\n formatbonus('i', bonusInventaire) +\n \"\";\n }", "public String toString() {\n\tString\tstrStyle;\n\n\tif (isBold()) {\n\t strStyle = isItalic() ? \"bolditalic\" : \"bold\";\n\t} else {\n\t strStyle = isItalic() ? \"italic\" : \"plain\";\n\t}\n\n\treturn getClass().getName() + \"[family=\" + getFamily() + \",name=\" + name + \",style=\" +\n\t strStyle + \",size=\" + size + \"]\";\n }", "public String toString() {\n StringWriter writer = new StringWriter();\n this.write(writer);\n return writer.toString();\n }", "public String toString()\n\t{\n\t\tString result\t= \"\";\n\n\t\tif ( isBold )\n\t\t{\n\t\t\tresult\t= \"bold\";\n\t\t}\n\n\t\tif ( isItalic )\n\t\t{\n\t\t\tif ( result.length() > 0 )\n\t\t\t{\n\t\t\t\tresult\t+= \" \";\n\t\t\t}\n\n\t\t\tresult\t+= \"italic\";\n\t\t}\n\n\t\tif ( result.length() == 0 )\n\t\t{\n\t\t\tresult\t= \"normal\";\n\t\t}\n\n\t\treturn result;\n\t}", "public String toString() {\n\n // returns a string in a \"{standard time}: {description}\" format\n return String.format(\"%s: %s\", this.getTime(), this.description);\n }", "public String getStringValue() {\n return box.getFormat().format(box, box.getValue());\n }", "public String toOutputString()\n\t{\n\t\tStringBuffer buf = new StringBuffer();\n\t\tfor (Entry<Object, Object> entry : this.entrySet())\n\t\t\tbuf.append(String.format(\"%s=%s%c\",\n\t\t\t\t\tentry.getKey(), entry.getValue(), 12));\n\t\treturn buf.toString();\n\t}", "@Override\n public String toString()\n {\n\n String str = String.format(\"%5d %-20s %2c %11.2f\",id,name,rarity,value);\n\n return str;\n }", "public String toString() {\n\t\tString r = \"\";\n\t\tchar[][] a = toMatrix();\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tif (a[i][j] == '\\0')\n\t\t\t\t\tr += \"-\";\n\t\t\t\telse\n\t\t\t\t\tr += a[i][j];\n\t\t\t}\n\t\t\tr += \"\\n\";\n\t\t}\n\t\treturn r.substring(0, r.length() - 1);\n\t}", "public String getFormat() {\n\t\treturn getAttribute(FORMAT_TAG);\n\t}", "public String toString() {\r\n//\t\treturn String.format(\"| %-18s | %-3d | %-12s | %-6s | \",\r\n//\t\t\t\tname, age, organ, bloodtype.getBloodType());\r\n\t\treturn String.format(\"%5d | %-18s | %-3d | %-12s | %-6s | \",\r\n\t\t\t\tpatientID, name, age, organ, bloodtype.getBloodType());\r\n\t}", "public String toString() {\n\t\treturn new String(dateToString() + \" \"\n\t\t\t\t+ timeToString());\n }", "public String toString() {\n\t\treturn String.format( \"%s: %s\\n%s: $%,.2f; %s:%.2f\",\r\n\t\t\t\t \"commission employee\", super.toString(),\r\n\t\t\t\t \"gross sales\", getGrossSales(),\r\n\t\t\t\t \"commission rate\", getCommissionRate() );\r\n\t}", "private String prettyMessage() {\n Map<String, Object> map = new LinkedHashMap<>(4);\n map.put(\"type\", getType());\n map.put(\"message\", this.message);\n map.put(\"code\", getCode());\n // TODO(\"need to optimize\")\n map.put(\"data\", getData().toString());\n return JsonUtils.getGson().toJson(map);\n }", "public String getFormattedValue() {\n if (labelFormatter != null) {\n return labelFormatter.getText();\n } else {\n return \"\" + getValue();\n }\n }", "public String getDataString() {\r\n return formatoData.format(data);\r\n }", "public String toString() {\n\t\tString s1,s2,s3,s4;\r\n\t\ts1 = \"{FIR ID: \"+id + \"\\nname= \" + name + \", phone number=\" + phone_no \r\n\t\t\t\t+\"\\nDate: \"+filing_date+\", Address: \" +address\r\n\t\t\t\t+\"\\nFIR Category: \"+category;\r\n\t\t\r\n\t\tif(statement_uploaded) {\r\n\t\t\ts2 = \", Statement Uploaded\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts2 = \", Statement Not Uploaded\";\r\n\t\t}\r\n\t\tif(id_proof_uploaded) {\r\n\t\t\ts3 = \", ID Proof Uploaded\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts3 = \", ID Proof Not Uploaded\";\r\n\t\t}\r\n\t\ts4 = \"\\nStatus : \"+status+\"}\";\r\n\t\treturn s1+s2+s3+s4;\r\n\t}", "public String toString() {\n\t\tStringBuilder bld = new StringBuilder();\n\t\tFormatter fmt = new Formatter(bld);\n\t\tfor (int yPos = 0; yPos < getSlotCount(); yPos++) {\n\t\t\tint xBeanPos = getInFlightBeanXPos(yPos);\n\t\t\tfor (int xPos = 0; xPos <= yPos; xPos++) {\n\t\t\t\tint spacing = (xPos == 0) ? getIndent(yPos) : (xspacing + 1);\n\t\t\t\tString format = \"%\" + spacing + \"d\";\n\t\t\t\tif (xPos == xBeanPos) {\n\t\t\t\t\tfmt.format(format, 1);\n\t\t\t\t} else {\n\t\t\t\t\tfmt.format(format, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfmt.format(\"%n\");\n\t\t}\n\t\tfmt.close();\n\t\treturn bld.toString() + getSlotString();\n\t}", "public String toString(){ \n\t\tString s = String.format(\"%s: %d, rating: %f, price:%f\", TITLE, YEAR_RELEASED, user_rating, getPrice());\n\t\treturn s; \n\t}", "@NotNull\n protected String format(@NotNull final Object value) {\n return value != null\n ? value.toString()\n : \"\";\n }", "public String toString() {\n final StringBuilder buffer = new StringBuilder() ;\n final DecimalFormat df = new DecimalFormat( \"#00.00\" ) ;\n\n buffer.append( StringUtil.rightPad( this.symbol, 20 ) ) ;\n buffer.append( StringUtil.leftPad( \"\" + getNumActiveCashUnits(), 5 ) ) ;\n buffer.append( StringUtil.leftPad( df.format( this.avgCashUnitPrice ), 10 ) ) ;\n buffer.append( StringUtil.leftPad( df.format( this.realizedProfit ), 10 ) ) ;\n buffer.append( StringUtil.leftPad( df.format( getUnRealizedCashProfit() ), 10 ) ) ;\n\n return buffer.toString() ;\n }", "public String toString() {\n\t\treturn GrilleLoader.serialize(this, false); //isGrlFormat=false\n\t}", "public String formatStat() {\n return statUse.formatNumerator();\n }", "public String toString()\n {\n DataConversionUtility dcu = DataConversionUtility.getInstance();\n StringBuilder sb = new StringBuilder();\n sb.append(\" \");\n sb.append(this.timestamp);\n sb.append(\": \");\n sb.append(dcu.roundUpToNDecimalPlaces(this.latitude, 6));\n sb.append(\" / \");\n sb.append(dcu.roundUpToNDecimalPlaces(this.longitude, 6));\n sb.append(\" / elev.: \");\n sb.append(dcu.roundUpToNDecimalPlaces(this.elevation, 1));\n sb.append(\" / speed: \");\n sb.append(dcu.roundUpToNDecimalPlaces(this.speed, 2));\n sb.append(\" [\");\n sb.append(dcu.roundUpToNDecimalPlaces(this.course, 2));\n sb.append(\"] / wind speed: \");\n sb.append(dcu.roundUpToNDecimalPlaces(this.windSpeed, 2));\n sb.append(\" - \");\n sb.append(dcu.roundUpToNDecimalPlaces(this.maxWindSpeed, 2));\n sb.append(\" [\");\n sb.append(dcu.roundUpToNDecimalPlaces(this.windDirection, 2));\n sb.append(\"]\\n\");\n return sb.toString();\n }", "public String toCodedString() {\n\t\t//System.out.println(toString());\n\t\treturn String.format(\"%s%s\", getColor().toInt(), getShape().toString());\n\t}" ]
[ "0.7677523", "0.75765014", "0.74294025", "0.73932767", "0.73691136", "0.7174299", "0.70544356", "0.7036579", "0.6946301", "0.6946301", "0.6946301", "0.67706794", "0.6764243", "0.674203", "0.67330474", "0.67172766", "0.66713405", "0.6666533", "0.66570324", "0.66483164", "0.66122425", "0.6602973", "0.6584258", "0.65575755", "0.6538303", "0.6514443", "0.65071034", "0.6505584", "0.6500574", "0.6464591", "0.64423096", "0.6423633", "0.6418364", "0.64123845", "0.63980675", "0.63888055", "0.63860375", "0.6369422", "0.63521564", "0.6344436", "0.63380367", "0.6335963", "0.633543", "0.6329169", "0.6327577", "0.6317676", "0.6306201", "0.6294224", "0.6282173", "0.6278398", "0.6277657", "0.6264604", "0.6263923", "0.6243988", "0.6243762", "0.6243092", "0.62355566", "0.6225455", "0.622275", "0.62218064", "0.6221039", "0.6218378", "0.62110794", "0.62110794", "0.62110794", "0.620921", "0.6205109", "0.62049204", "0.6201106", "0.6190331", "0.6185671", "0.61780024", "0.61634326", "0.61593837", "0.615562", "0.61550725", "0.615306", "0.6151342", "0.6149547", "0.61490625", "0.6145729", "0.6144317", "0.6141742", "0.6140746", "0.6130699", "0.6128561", "0.6123365", "0.6120448", "0.61186457", "0.6111224", "0.61073166", "0.61031455", "0.60941386", "0.60914874", "0.6089631", "0.6084393", "0.60842913", "0.60710174", "0.60698795", "0.6064571", "0.6058771" ]
0.0
-1
Get a formatted String version for a confusion matrix.
public static String toStringConfMatrix(int[][] a, String[] cats) { int rowNum = a.length; int colNum = a[0].length; String ret = "r\\p\t"; for (int i = 0; i < cats.length; i++) { ret += cats[i] + "\t"; } for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (j == 0) { ret += "\n" + cats[i]; } ret += "\t" + a[i][j]; } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n final String lineSeparator = System.getProperty(\"line.separator\");\n return new StringBuilder(\"TableOfConfusion\").append(lineSeparator)\n .append(\"precision: \").append(calculatePrecision()).append(lineSeparator)\n .append(\"recall: \").append(calculateRecall()).append(lineSeparator)\n .append(\"specificity: \").append(calculateSpecificity()).append(lineSeparator)\n .append(\"accuracy: \").append(calculateAccuracy()).append(lineSeparator)\n .append(\"fscore: \").append(calculateFScore()).append(lineSeparator)\n .toString();\n }", "public String toString() {\n\t\tString s = n + \" x \" + n + \" Matrix:\\n\";\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\ts += content[i][j] + \"\\t\\t\";\n\t\t\t}\n\t\t\ts += \"\\n\\n\";\n\t\t}\n\t\treturn s;\n\t}", "public String toString() {\n StringBuilder output = new StringBuilder();\n output.append(\"{\\n\");\n for (int i=0; i<rows; i++) {\n output.append(Arrays.toString(matrix.get(i)) + \",\\n\");\n }\n output.append(\"}\\n\");\n return output.toString();\n }", "public String toString() {\n\t\tString matrixString = new String();\n\t\tArrayList<Doc> docList;\n\t\tfor (int i = 0; i < termList.size(); i++) {\n\t\t\tmatrixString += String.format(\"%-15s\", termList.get(i));\n\t\t\tdocList = docLists.get(i);\n\t\t\tfor (int j = 0; j < docList.size(); j++) {\n\t\t\t\tmatrixString += docList.get(j) + \"\\t\";\n\t\t\t}\n\t\t\tmatrixString += \"\\n\";\n\t\t}\n\t\treturn matrixString;\n\t}", "public String toString() {\n\t\tString r = \"\";\n\t\tchar[][] a = toMatrix();\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tif (a[i][j] == '\\0')\n\t\t\t\t\tr += \"-\";\n\t\t\t\telse\n\t\t\t\t\tr += a[i][j];\n\t\t\t}\n\t\t\tr += \"\\n\";\n\t\t}\n\t\treturn r.substring(0, r.length() - 1);\n\t}", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", matrix[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "@Override\n public String toString() {\n double[][] temp = matx.getArray();\n String tempstr = \"[\";\n for (int i = 0; i < temp.length; i++) {\n for (int j = 0; j < temp.length; j++) {\n tempstr += (int) temp[i][j] + \", \";\n }\n tempstr = tempstr.substring(0, tempstr.length() - 2);\n tempstr += \"]\\n[\";\n }\n return tempstr.substring(0, tempstr.length() - 2);\n }", "public String toString() {\n\tString retStr = \"\";\n\tfor (int r = 0; r < this.size(); r++){\n\t for (int c = 0; c < this.size(); c++){\n\t\tretStr += matrix[r][c] + \"\\t\";\n\t }\n\t retStr += \"\\n\";\n\t}\n\treturn retStr;\n }", "public String toString() {\n String s = \"\";\n for(int i = 1; i <= rows; i++){\n for(int j = 1; j <= cols; j++){ \n s = s + String.format(\"%2d\",m[i][j]) + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }", "public String toString(){\n StringBuffer returnString = new StringBuffer();\n for(int i = 0; i < this.matrixSize; i++){\n if(rows[i].length() != 0){\n returnString.append((i+1) + \":\" + rows[i]+ \"\\n\");\n }\n }\n return returnString.toString();\n }", "public String toString()\n\t{\n\t\tStringBuilder matrix = new StringBuilder();\n\t\t\n\t\tfor(int i = 0; i < numberOfVertices; i++)\n\t\t{\n\t\t\tmatrix.append(i + \": \");\n\t\t\tfor(boolean j : adjacencyMatrix[i])\n\t\t\t{\n\t\t\t\tmatrix.append((j? 1: 0) + \" \");\n\t\t\t}\n\t\t\tmatrix.append(\"\\n\");\n\t\t}\n\t\t\n\t\treturn matrix.toString();\n\t}", "private String getMatrixString(int[][] input)\n {\n // Building strings with the StringBuilder is much more efficient\n // then concatenating strings! \n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sb.append(Integer.toString(input[i][j]) + \"\\t\");\n }\n sb.append(\"\\n\"); // append the linebreaker\n }\n\n // Finally, return the StringBuilder as a string\n return sb.toString();\n }", "@Override public String toString() {\n if( _matrix == null ) return \"no trees\";\n int N = _matrix.length;\n final int K = N + 1;\n double[] e2c = new double[N];\n for( int i = 0; i < N; i++ ) {\n long err = -_matrix[i][i];\n for( int j = 0; j < N; j++ ) err += _matrix[i][j];\n e2c[i] = Math.round((err / (double) (err + _matrix[i][i])) * 100) / (double) 100;\n }\n String[][] cms = new String[K][K + 1];\n cms[0][0] = \"\";\n for( int i = 1; i < K; i++ ) cms[0][i] = \"\" + (i - 1);\n cms[0][K] = \"err/class\";\n for( int j = 1; j < K; j++ ) cms[j][0] = \"\" + (j - 1);\n for( int j = 1; j < K; j++ ) cms[j][K] = \"\" + e2c[j - 1];\n for( int i = 1; i < K; i++ )\n for( int j = 1; j < K; j++ ) cms[j][i] = \"\" + _matrix[j - 1][i - 1];\n int maxlen = 0;\n for( int i = 0; i < K; i++ )\n for( int j = 0; j < K + 1; j++ ) maxlen = Math.max(maxlen, cms[i][j].length());\n for( int i = 0; i < K; i++ )\n for( int j = 0; j < K + 1; j++ ) cms[i][j] = pad(cms[i][j], maxlen);\n String s = \"\";\n for( int i = 0; i < K; i++ ) {\n for( int j = 0; j < K + 1; j++ ) s += cms[i][j];\n s += \"\\n\";\n }\n return s;\n }", "public String toString()\n\t{\n\t\t//DecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tString report = \"\";\n\t\treport += \"m = \" + rows + \"\\n\";\n\t\treport += \"n = \" + cols + \"\\n\";\n\t\treport += \"[ | ] = \" + \"\\n\";\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < cols+1; j++)\n\t\t\t{\n\t\t\t\treport += /*df.format*/(A[i][j]) + \" \";\n\t\t\t}\n\t\t\treport += \"\\n\";\n\t\t}\n\t\treturn report;\n\t}", "public String toString() {\r\n StringBuilder result= new StringBuilder();\r\n for(int x=0;x<8;x++){\r\n for(int y=0;y<8;y++){\r\n result.append(checks[x][y]).append(\",\");\r\n }\r\n result.append(\"\\n\");\r\n }\r\n return result.toString();\r\n }", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n for (double[] b : matrix) {\n builder.append(\"\\n\");\n for (double c : b) {\n builder.append(c).append(\" \");\n }\n }\n return builder.toString();\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(dim + \"\\n\");\n for (int i = 0; i < dim; i++) {\n for (int j = 0; j < dim; j++) {\n s.append(String.format(\"%2d \", board[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String getTable() {\n StringBuilder table = new StringBuilder();\n\n table.append(\" \");\n for (int i = 0; i < matrix.length; i++) {\n table.append(\" \");\n table.append(i + 1);\n }\n table.append(\"\\n\");\n\n for (int i = 0; i < matrix.length; i++) {\n table.append(i + 1);\n table.append(\" \");\n\n for (int j = 0; j < matrix.length; j++) {\n table.append(matrix[i][j] ? 1 : 0);\n table.append(\" \");\n }\n table.append(\"\\n\");\n }\n table.append(\"\\n\");\n\n return table.toString();\n }", "public String toString(){\r\n\t\tString ret = \"MatrixArray:\\n\";\r\n\t\tfor (int i = 0; i < this.MA.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.MA[i].length; j++){\r\n\t\t\t\tif (j > 0) {\r\n\t\t\t\t\tret += \", \";\r\n\t\t }\r\n\t\t ret += String.valueOf(this.MA[i][j]);\r\n\t\t\t}\r\n\t\t\tret += \"\\n\";\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public String toString() {\n\t\tString resultString = \"\\r\\n\";\n\t\t//resultString += \"Checkerboard state: \\r\\n\";\n\t\tfor (int i = 0; i < checkerboard.length; i++) {\n\t\t\tfor (int j = 0; j < checkerboard.length; j++) {\n\t\t\t\tif (checkerboard[i][j] == WHITE) {\n\t\t\t\t\tresultString += \"o \";\n\t\t\t\t} else if (checkerboard[i][j] == BLACK) {\n\t\t\t\t\tresultString += \"x \";\n\t\t\t\t} else {\n\t\t\t\t\tresultString += \"- \";\n\t\t\t\t}//Of if\n\t\t\t}//Of for j\n\t\t\tresultString += \"\\r\\n\";\n\t\t}//Of for i\n\t\t\n\t\tresultString += currentState;\n\n\t\t//resultString += \"\\r\\nThe current situation is: \" + gameSituation;\n\t\treturn resultString;\n\t}", "public String getTabularResult() {\n StringBuilder builder = new StringBuilder();\n for (int c = 0; c < cols; ++c) {\n for (int r = 0; r < rows; ++r) {\n builder.append(puzzleMap.get(orderedKeys[r][c]).getValue());\n }\n builder.append(System.lineSeparator());\n }\n return builder.toString().trim();\n }", "@Override\n public String toString() {\n StringBuilder matrixValues = new StringBuilder(\"\\nMatrix : \"\n + values.length + \"x\" + values[0].length + \"\\n\");\n for (int[] row : values) {\n for (int value : row) {\n matrixValues.append(value + \" \");\n }\n matrixValues.append(\"\\n\");\n }\n return matrixValues.toString();\n }", "@Override\r\n public String toString() {\r\n String temp = \"\";\r\n\r\n // item statement are used to generate format for the matrix.\r\n String itemStatement = \" %x.yf\"\r\n .replace(\"x\", \"\" + (Prettify.countSingleDigitSpace(this) + Matrix.significantDigit + 2))\r\n .replace(\"y\", \"\" + Matrix.significantDigit);\r\n\r\n for (double[] row : matrix) {\r\n for (double col : row) {\r\n temp += String.format(itemStatement, col);\r\n }\r\n temp += \"\\n\";\r\n }\r\n\r\n // this one are used to clean up those junks.\r\n // if you need to know it's function, you can disable it,\r\n // it's just kind of magic, here :D\r\n return temp.replaceAll(\"[\\\\s\\\\n]+$\", \"\");\r\n }", "public String toString() {\n StringBuilder s = new StringBuilder(); // Initialize new string builder\n s.append(N + \"\\n\"); // Append board dimension to string\n\n for (int[] row : tiles) {\n for (int tile : row)\n s.append(String.format(\"%2d \", tile)); // Append formatted board tiles string\n s.append(\"\\n\"); // Append new line to string\n }\n return s.toString(); // Return string representation of board\n }", "public static <T> String matrixToString(T[][] m) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(m[i][j]);\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "@Override\r\n public String toString() {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < dimension; i++) {\r\n sb.append(rowToString(i)).append(\"\\n\");\r\n }\r\n //remove the last unnecessary carriage return from the string.\r\n return sb.toString().substring(0, sb.length() - 1);\r\n }", "public String toString()\n\t{\n\t\tString output = \"\";\n\t\tfor(String[] at:atMat){\n\t\t\tfor(String a:at){\n\t\t\t\toutput += a+ \" \";\n\t\t\t}\n\t\t\toutput += \"\\n\";\n\t\t}\n\t\treturn output;\n\t}", "public static String matrixToString(int[][] m) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(m[i][j]);\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "protected String stringConnectionsMatrix() {\n String ret = \"Connection Matrix\";\n for (G good : this.goods) {\n ret += \"\\n\";\n for (B bidder : this.bidders) {\n if (bidder.demandsGood(good)) {\n ret += \"\\t yes\";\n } else {\n ret += \"\\t no\";\n }\n }\n }\n return ret + \"\\n\";\n }", "public String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (byte m = 0; m < 9; m++) {\n\t\t\tfor (byte n = 0; n < 9; n++) {\n\t\t\t\tsb.append(cells[m][n].getValue());\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString() {\n\t\tString str = \"\\n \";\n\t\tfor (int i = 1; i <= board.length; i++) {\n\t\t\tstr += i + \" \";\n\t\t}\n\t\tstr = str.stripTrailing() + \"\\n\";\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tstr += (i+1) + \" \";\n\t\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\t\tif (board[i][j] == Disc.WHITE) {\n\t\t\t\t\tstr += \"W \";\n\t\t\t\t} else if (board[i][j] == Disc.BLACK) {\n\t\t\t\t\tstr += \"B \";\n\t\t\t\t} else {\n\t\t\t\t\tstr += \"- \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tstr = str.stripTrailing() + \"\\n\";\n\t\t}\n\t\treturn str;\n\t}", "public String toString() {\n String result = \"\";\n result += \" \";\n // Column numbers\n for (int i = 0; i < numberOfColumns; i++) {\n result += (i % 10) + \" \";\n }\n result += \"\\n\";\n result += \" \";\n // Horizontal dividers\n for (int i = 0; i <= 2 * this.numberOfColumns - 2 ; i++) {\n result += HORI_DIVIDE;\n }\n result += \"\\n\";\n // Each horizontal line has the line number, a divider, and the safe data.\n for (int i = 0; i < numberOfRows; i++) {\n result += (i % 10);\n result += VERT_DIVIDE;\n for (int j = 0; j < numberOfColumns; j++) {\n result += grid[i][j];\n if (j != numberOfColumns - 1) {\n result += \" \";\n }\n }\n if (i != numberOfRows - 1) {\n result += \"\\n\";\n }\n }\n return result;\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(this.dim + \"\\n\");\n int counter = 0;\n for (int i = 0; i < this.dim; i++) {\n for (int j = 0; j < this.dim; j++) {\n int n = tiles[counter++];\n s.append(String.format(\"%2d \", n));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public static String matrixToString(boolean[][] m) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(m[i][j]);\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public String toString() {\n\n\t\tString result = \"\";\n\n\t\tfor(Cell[][] dim : board) {\n\t\t\tfor(Cell[] row : dim) {\n\t\t\t\tfor(Cell col : row) {\n\t\t\t\t\tif(col== Cell.E)\n\t\t\t\t\t\tresult += \"-\";\n\t\t\t\t\telse\n\t\t\t\t\t\tresult += col;\t\n\t\t\t\t}\n\t\t\t\tresult += \"\\n\";\n\t\t\t}\n\t\t\tresult += \"\\n\";\n\t\t}\n\n//\t\tSystem.out.println(\"\\n***********\\n\");\n\t\treturn result;\n\n\t}", "public String toString(){\n\t\tStringBuilder output = new StringBuilder();\n\t\tfor(int i = 0; i<this.size; i++){\n\t\t\tfor(int j=0; j<this.size; j++){\n\t\t\t\toutput.append(this.numbers[i][j] + \"\\t\");\n\t\t\t}\n\t\t\toutput.append(\"\\n\");\n\t\t}\n\t\treturn output.toString();\n\t}", "public String toString() {\r\n\t\tString schemeTable=new String();\r\n\t\tint i;\r\n\t\tfor(i=0;i<explanatorySet.size();i++)\r\n\t\t\t schemeTable=schemeTable+((Attribute) explanatorySet.get(i)).getName()+\",\";\r\n\t\tfor(i=0;i<data.size();i++) {\r\n\t\t\tschemeTable=schemeTable+\"\\n\"+(i+1)+\":\";\r\n\t\t\tfor(int j=0;j<explanatorySet.size();j++) {\r\n\t\t\t\tschemeTable=schemeTable+getValue(i,j)+\",\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn schemeTable;\r\n\t}", "public String toString() {\n\t\tStringBuilder string = new StringBuilder();\n\t\tstring.append(n + \"\\n\");\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < n; j++) \n\t\t\t\tstring.append(String.format(\"%2d \", board[i][j]));\n\t\t\tstring.append(\"\\n\");\n\t\t}\n\t\treturn string.toString();\n\t}", "public String toString() {\n\t\tString temp = \"\";\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttemp += String.format(\"%d \", i);\n\t\t}\n\t\ttemp += \"\\n\";\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\ttemp += String.format(\"%d | \", i + 1);\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\ttemp += String.format(\"%c | \", board[i][j]);\n\t\t\t}\n\t\t\ttemp += \"\\n\";\n\t\t}\n\t\treturn temp;\n\t}", "public String toString(){\n\n\t\tStringBuffer b = new StringBuffer();\n\t\tb.append('\\n');\n\n\t\tint i = 0, j, counter = 0;\n\t\twhile( i < numRows){\n\n\t\t\tj = 0;\n\t\t\twhile( j < numCols){\n\n\t\t\t\tb.append( \"\" + i + TAB + j + TAB);\n\t\t\t\tObject obj = this.get(i, j);\n\t\t\t\tif( obj != null ) {\n\t\t\t\t\tb.append( obj.toString() );\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\telse b.append( \"NULL\" );\n\t\t\t\tb.append('\\n');\n\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\n\t\t}\n\t\tb.append( \"\\nNumber of Rows = \" + numRows + '\\n' );\n\t\tb.append( \"Number of Columns = \" + numCols + '\\n' );\n\t\tb.append( \"Size = \" + size + '\\n' );\n\t\tb.append( \"Number of non-null objects = \" + counter + '\\n' );\n\t\treturn b.toString();\n\t}", "public static String matrixToString(float[][] m) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(m[i][j]);\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public String toString() {\n return String.format(\"%s%s\", column, row);\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", tiles[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", tiles[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString() {\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n sb.append(board[i][j]);\n sb.append(\" \");\n }\n sb.append(\"\\n\");\n }\n return sb.toString();\n }", "private String gameBoardToString(){\n StringBuilder config = new StringBuilder();\n\n //length attribute gets the number of rows in a 2D array. length attribute on a row gets the number of columns in a\n // 2D array. We iterate through all the rows and columns and join all the characters in the array into a single\n // String config\n\n for (int i = 0; i < this.boardRows; i++){\n for (int j =0; j < this.boardColumns; j++){\n config.append(this.gameBoard[i][j]);\n }\n }\n\n // Returns String object representation of StringBuilder object\n return config.toString();\n\n }", "public String toString() {\n\tString str = \"\";\n\tfor (int i = 0; i < board.length; i++) {\n\t str = str + \"\\n\";\n\t for (int j = 0; j <= (board.length - 1); j++)\n\t\tstr = \" \" + str + board[i][j] + \" \";\n\t}\n\treturn str;\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(dimension + \"\\n\");\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n s.append(String.format(\"%2d \", (int) blocks[i * dimension + j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString() {\n \t// string representation of the board (in the output format specified below)\n \tStringBuilder sb = new StringBuilder(dimension() + \" \\n \");\n \t\n \tfor (int row = 0; row < dimension(); row++) {\n \t\tfor (int column = 0; column < dimension(); column++) {\n \t\t\tsb.append(blocks[row][column]);\n \t\t\tsb.append(\" \");\n \t\t}\n \t\t\n \t\tsb.append(\"\\n \");\n \t}\n \t\n \treturn sb.toString();\n }", "public String toString() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tint n = dimension();\r\n\t\tsb = sb.append(n + \"\\n\");\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tsb = sb.append(\" \" + this.blocks[i][j]);\r\n\t\t\t}\r\n\t\t\tif (i != n) {\r\n\t\t\t\tsb = sb.append(\"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public String toString( )\n{ \n String s=\"\\nThe Mines\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n s = s + theMines[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n }\n s += \"\\nMined neighbor counts\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n if( theCounts[ r ][ c ] == 9 )\n s = s + \"X\" + \" \";\n else\n s = s + theCounts[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n } \n return( s );\n}", "public String toString() {\n\t\tString returnString=\"\";\n\t\t\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\tfor (int j=0; j<squares.length; j++) {\n\t\t\t\treturnString+=Character.toString(squares[i][j].getValue());\n\t\t\t}\n\t\t\treturnString+=\"// \";\n\t\t}\n\t\t\n\t\treturn returnString;\n\t}", "public String toString() {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < K; i++) {\n sb.append(centroids[i].toString());\n sb.append('\\n');\n }\n return sb.toString();\n }", "public String toString(){\n\t\tString maChaineRetour=\"\";\n\t\t\n\t\tfor(Cristal[] ligne: tabCristaux){\n\t\t\tfor(Cristal colonne: ligne){\n\t\t\t\tif(colonne == null)\n\t\t\t\t\tmaChaineRetour = maChaineRetour + \"0\" ;\n\t\t\t\telse\n\t\t\t\t\tmaChaineRetour = maChaineRetour + colonne.toString();\n\t\t\t}\n\t\t\tmaChaineRetour = maChaineRetour + \"\\n\";\n\t\t}\n\t\treturn maChaineRetour;\n\t}", "@Override\n\tpublic String toString(){\n\t\t// return a string of the board representation following these rules:\n\t\t// - if printed, it shows the board in R rows and C cols\n\t\t// - every cell should be represented as a 5-character long right-aligned string\n\t\t// - there should be one space between columns\n\t\t// - use \"-\" for empty cells\n\t\t// - every row ends with a new line \"\\n\"\n\t\t\n\t\t\n\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\tfor (int i=0; i<numRows; i++){\n\t\t\tfor (int j =0; j<numCols; j++){\n\t\t\t\tPosition pos = new Position(i,j);\n\t\t\t\t\n\t\t\t\t// use the hash table to get the symbol at Position(i,j)\n\t\t\t\tif (grid.contains(pos))\n\t\t\t\t\tsb.append(String.format(\"%5s \",this.get(pos)));\n\t\t\t\telse\n\t\t\t\t\tsb.append(String.format(\"%5s \",\"-\")); //empty cell\n\t\t\t}\n\t\t\tsb.append(\"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\n\t}", "public static String matrixToString(double[][] m) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(m[i][j]);\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public String toString() {\n String result=\"Initial state: 0\\nFinal state: \"+(transitionTable.length-1)+\"\\nTransition list:\\n\";\n for (int i=0;i<epsilonTransitionTable.length;i++) for (int state: epsilonTransitionTable[i])\n result+=\" \"+i+\" -- epsilon --> \"+state+\"\\n\";\n for (int i=0;i<transitionTable.length;i++) for (int col = 0; col< NFA.N; col++)\n if (transitionTable[i][col]!=-1) result+=\" \"+i+\" -- \"+(char)col+\" --> \"+transitionTable[i][col]+\"\\n\";\n return result;\n }", "public String toString() {\n String boardString = \"\";\n for (int j = 0; j < nRows; j++) {\n String row = \"\";\n for (int i = 0; i < nCols; i++) {\n if (board[j][i] == null) {\n row = row + \"Empty \";\n } else {\n row = row + board[j][i].getType() + \" \";\n }\n }\n boardString = boardString + row + \"\\n\";\n }\n return boardString;\n }", "@Override\n\tpublic String toString() {\n\t\treturn solution + \" [\" + CONF_FORMATTER.format(confidence) + \"%]\";\n\t}", "@Override\n public final String toString() {\n \t\n \treturn String.format(\"[%1$s [%2$s\\t%3$s\\t%4$s]%1$s [%5$s\\t%6$s\\t%7$s]%1$s [%8$s\\t%9$s\\t%10$s] ]\", System.getProperty(\"line.separator\"), this.m00, this.m01, this.m02,\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 this.m10, this.m11, this.m12,\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 this.m20, this.m21, this.m22);\n }", "@Override\n public String toString() {\n StringBuilder s = new StringBuilder();\n int N = size();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", tileAt(i,j)));\n }\n s.append(\"\\n\");\n }\n /*\n s.append(manhattan());\n s.append(\"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", _goal[i][j]));\n }\n s.append(\"\\n\");\n }*/\n s.append(\"\\n\");\n return s.toString();\n }", "@Override\n\tpublic String toString() {\n\t\tString out = new String();\n\t\tfor (int i = 0; i < this.maxNumVertices; i++) {\n\t\t\tfor (int j = 0; j < this.maxNumVertices; j++) {\n\t\t\t\tout = out + this.reachabilityMatrix[i][j] + \" \";\n\t\t\t}\n\t\t\tout = out + \"\\n\";\n\t\t}\n\t\treturn out;\n\t}", "public String toString()\n\t{\n\t\tString s = \"\";\n\t\tfor(int r = 0; r < board.length; r++)\n\t\t{\n\t\t\tfor(int c = 0; c < board[0].length; c++)\n\t\t\t{\n\t\t\t\ts += \"|\" + board[r][c];\n\t\t\t}\t\t\t\t\n\t\t\ts += \"|\" + \"\\n\" + \"-------------------\" + \"\\n\";\n\t\t}\n\t\treturn s;\n\t}", "public String toString() {\n String result = \"\";\n if (this.column > 0 && this.row > 0) {\n int column = this.column, exp = (int) (Math.log(column) / Math.log(26)), cur;\n for (int i = exp; i >= 0; i--) {\n cur = (int) (column / Math.pow(26, i));\n result += (char) (64 + cur);\n column -= cur * Math.pow(26, i);\n }\n result += this.row;\n }\n return result;\n }", "public String toString()\n {\n String str = (continuation ? \"+ \" : \"- \") ;\n for(int i = 0 ; i < values.length ; i++)\n str += values[i] + \" \";\n str += classification;\n return str ;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < column; j++) {\n sb.append(game[i][j]);\n }\n sb.append(\"\\n\");\n }\n return sb.toString();\n }", "public String toString() {\n String returnString = \"\";\n returnString = returnString + \"\\r\\n\";\n for (int i = 0; i < rows + 1; i++) {\n for (int j = 0; j < cols + 1; j++) {\n if (i == 0 && j == 0) {\n returnString = returnString + \" \";\n continue;\n }\n if (i == 0) {\n if (j > 0) {\n returnString = returnString + (j + \" \");\n }\n if (j == 8) {\n returnString = returnString + \"\\r\\n\";\n }\n } else {\n if (j > 0) {\n if (!isEmpty(i - 1, j - 1)) {\n returnString = returnString + (getBoard()[i - 1][j - 1] + \" \");\n } else {\n returnString = returnString + \" \";\n }\n }\n }\n if (j == 0) {\n returnString = returnString + (i + \" \");\n }\n\n }\n returnString = returnString + \"\\r\\n\";\n }\n return returnString;\n }", "public String toString(){\n String s = \"\";\n s += \"\\t\";\n \n for (int i = 0; i < n; i++){\n // adding vertices for columns\n s += vertices[i] + \"\\t\";\n }\n \n s += \"\\n\";\n \n for (int i = 0; i < n; i++){\n s += vertices[i] + \"\\t\"; // vertex for row\n for (int j = 0; j < n; j++){\n s += edges[j][i] + \"\\t\"; // adding edges across row\n }\n s += \"\\n\";\n }\n \n return s;\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", blocks[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString()\n {\n //creates a string of the class's variables in a readable format.\n String s = String.format(\"%-14s%-3d%3s\" +lineNums.toString(), word, count,\"\");\n return s.toString();\n }", "public String toString() {\n String bs = \" \"; // bs stands for board string\n for (int col = 0; col <= (this.boardSize - 1); col++) {\n bs = bs + (col + 1) + \" \";\n if (col < this.boardSize - 1) {\n bs = bs + \" \";\n }\n }\n bs = bs + \"\\n\";\n char rowHead = 'A';\n for (int row = 0; row <= (this.boardSize - 1); row++) {\n bs = bs + \" \" + rowHead++ + \" \";\n for (int col = 0; col < this.boardSize; ++col) {\n bs = bs + \" \" + this.board[row][col];\n if (col < this.boardSize - 1) {\n bs = bs + \" |\";\n }\n }\n bs = bs + \"\\n\";\n if (row < this.boardSize - 1) {\n bs = bs + \" \";\n for (int col = 0; col < this.boardSize; col++) {\n bs = bs + \"---\";\n if (col < this.boardSize - 1) {\n bs = bs + \"|\";\n }\n }\n }\n bs = bs + \"\\n\";\n }\n return bs;\n }", "public static String matrixToString(int[][] matrix) {\n StringBuilder sb = new StringBuilder(\"[\");\n\n for (int i = 0; i < matrix.length; i++) {\n if (i > 0)\n sb.append(\" \");\n sb.append(Arrays.toString(matrix[i]));\n }\n\n return sb.append(\"]\").toString();\n }", "public String toString() {\n\t\tcell = \" \" + not_fed + \" \";\n\n\t\treturn cell;\n\t}", "public String toString(){\n\t\tStringBuilder s = new StringBuilder(\"\");\n\t\ts.append(\"\\nMD2 Model details\\n\");\n\t\ts.append(\"\\tThere are \" + numFrames + \" key framess\\n\");\n\t\ts.append(\"\\tThere are \"+ point.length + \" points (XYZ coordinates)\\n\");\n\t\ts.append(\"\\tFor rendering there are \" + glComannd.length + \" triangle strips/fans\\n\");\n\t\ts.append(\"\\t and these have \" + glVertex.length + \" vertex definitions\\n\");\n\t\ts.append(\"\\tThere are \" + state.length + \" animation sequences\\n\");\n\t\ts.append(\"Estimated memory used \" + memUsage() + \" bytes for model excluding texture.\");\n\n\t\treturn new String(s);\n\t}", "public String toString() {\r\n\t\tString result;\r\n\t\tif (ethnicity.isEmpty()) {\r\n\t\t\tresult = \"<tr><td>\" + category + \"</td>\" + \"<td>\" + gender\r\n\t\t\t\t\t+ \"</td>\" + \"<td>\" + count + \"</td></tr>\";\r\n\t\t} else {\r\n\t\t\tresult = \"<tr>\" + ethnicity + \"</td>\" + \"<td>\" + category + \"</td>\"\r\n\t\t\t\t\t+ \"<td>\" + gender + \"</td>\" + \"<td>\" + count + \"</td></tr>\";\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static String matrixToString(double[][] m, String format) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(String.format(Locale.US,format,m[i][j]));\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public String toString(){\r\n\t\tString output = \"\";\r\n\t\tfor(String s: this.data){\r\n\t\t\toutput = output + s + \"\\t\";\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}", "public String toString() {\r\n\t\tString resultado = \"\";\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tif(superficie[i][j] == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tresultado += \" - \" + \" \";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tresultado += superficie[i][j] + \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresultado += \"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\treturn resultado;\r\n\t}", "@Override\n public String toString()\n {\n StringBuffer sb = new StringBuffer();\n\n for (int i = 0; i < dice.length; i++)\n {\n sb.append(dice[i][0]);\n }\n\n return sb.toString();\n }", "@Override\n public String toString() {\n String[] output = new String[getHeight()];\n for (int row=0; row < getHeight(); row++) {\n StringBuilder builder = new StringBuilder();\n for (int col=0; col < getWidth(); col++) {\n Square current = getSquare(row, col);\n builder.append(getCharForSquare(current));\n }\n output[row] = builder.toString();\n }\n return String.join(\"\\n\", output);\n }", "public String toString(){\n makeKMLString();\n return kmlString;\n }", "public String toString(){\n\n String s;\n Exemplar cur = m_Exemplars;\n int i;\t\n\n if (m_MinArray == null) {\n return \"No classifier built\";\n }\n int[] nbHypClass = new int[m_Train.numClasses()];\n int[] nbSingleClass = new int[m_Train.numClasses()];\n for(i = 0; i<nbHypClass.length; i++){\n nbHypClass[i] = 0;\n nbSingleClass[i] = 0;\n }\n int nbHyp = 0, nbSingle = 0;\n\n s = \"\\nNNGE classifier\\n\\nRules generated :\\n\";\n\n while(cur != null){\n s += \"\\tclass \" + m_Train.attribute(m_Train.classIndex()).value((int) cur.classValue()) + \" IF : \";\n s += cur.toRules() + \"\\n\";\n nbHyp++;\n nbHypClass[(int) cur.classValue()]++;\t \n if (cur.numInstances() == 1){\n\tnbSingle++;\n\tnbSingleClass[(int) cur.classValue()]++;\n }\n cur = cur.next;\n }\n s += \"\\nStat :\\n\";\n for(i = 0; i<nbHypClass.length; i++){\n s += \"\\tclass \" + m_Train.attribute(m_Train.classIndex()).value(i) + \n\t\" : \" + Integer.toString(nbHypClass[i]) + \" exemplar(s) including \" + \n\tInteger.toString(nbHypClass[i] - nbSingleClass[i]) + \" Hyperrectangle(s) and \" +\n\tInteger.toString(nbSingleClass[i]) + \" Single(s).\\n\";\n }\n s += \"\\n\\tTotal : \" + Integer.toString(nbHyp) + \" exemplars(s) including \" + \n Integer.toString(nbHyp - nbSingle) + \" Hyperrectangle(s) and \" +\n Integer.toString(nbSingle) + \" Single(s).\\n\";\n\t\n s += \"\\n\";\n\t\n s += \"\\tFeature weights : \";\n\n String space = \"[\";\n for(int ii = 0; ii < m_Train.numAttributes(); ii++){\n if(ii != m_Train.classIndex()){\n\ts += space + Double.toString(attrWeight(ii));\n\tspace = \" \";\n }\n }\n s += \"]\";\n s += \"\\n\\n\";\n return s;\n }", "public String toString(){\r\n\t\tString aux = \"\";\r\n\t\tString ending = \",\";\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (i == numInputAttributes-1 &&\r\n\t\t\t\t\tnumOutputAttributes == 0) ending = \"\";\r\n\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\taux += nominalValues[0][i]; \r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\taux += (new Integer((int)realValues[0][i])).toString();\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.REAL:\r\n\t\t\t\taux += (new Double (realValues[0][i])).toString();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\taux += ending;\r\n\t\t}\r\n\t\tending = \",\";\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (i == numOutputAttributes-1) ending = \"\";\r\n\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\taux += nominalValues[1][i]; \r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\taux += (new Integer((int)realValues[1][i])).toString();\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.REAL:\r\n\t\t\t\taux += (new Double(realValues[1][i])).toString();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\taux += ending;\r\n\t\t} \r\n\t\treturn aux;\r\n\t}", "public String toString() {\n\t\t\tString ret = header + \":\";\n\t\t\tfor (Iterator i = practices.iterator(); i.hasNext();) {\n\t\t\t\tret += \"\\n\\t\" + (String) i.next();\n\t\t\t}\n\t\t\treturn ret;\n\t\t}", "@Override\n public String toString() {\n StringBuilder buf = new StringBuilder();\n for (int x = 0; x < numTopics; x++) {\n String v = dictionary != null\n ? vectorToSortedString(topicTermCounts.viewRow(x).normalize(1), dictionary)\n : topicTermCounts.viewRow(x).asFormatString();\n buf.append(v).append('\\n');\n }\n return buf.toString();\n }", "public String classOut() {\n\t\tStringBuilder s = new StringBuilder();\n\t\ts.append(objective());\n\t\ts.append(' ');\n\t\ts.append(optimal() ? 1 : 0);\n\t\ts.append('\\n');\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts.append(item(i) ? 1 : 0);\n\t\t\ts.append(i < n - 1 ? ' ' : '\\n');\n\t\t}\n\t\treturn s.toString();\n\t}", "public String toString() {\n\t\tString contents = \"\";\n\t\tif (scenario != null) {\n\t\t\tif (controller.getWorld().getHasScenarios()) {\n\t\t\t\tcontents += \"Scenario: \" + scenario + \"\\n\";\n\t\t\t}\n\t\t\tcontents += \"Number of runs: \" + numOfRuns + \"\\n\";\n\t\t\tcontents += \"Trial duration: \" + trialDuration + \"\\n\";\n\t\t\tcontents += \"Number of trials: \" + numOfTrials + \"\\n\";\n\t\t}\n\t\treturn contents;\n\t}", "@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint sqRt = (int)Math.sqrt(dimension);\n\t\tString line = \"\";\n\t\tint lineLength = (sqRt + 1) + (sqRt) * (sqRt + sqRt + 1);\n\t\tfor(int i = 0; i < lineLength; i++) {\n\t\t\tline += \"-\";\n\t\t}\n\t\tsb.append(line + \"\\n\");\t\n\t\tfor(int i = 1; i <= dimension; i++) {\n\t\t\tfor(int j = 1; j <= dimension; j++) {\n\t\t\t\tif(j == 1) {\n\t\t\t\t\tsb.append(\"| \");\n\t\t\t\t}\n\t\t\t\tsb.append(puzzle[i - 1][j - 1]);\n\t\t\t\tsb.append(\" \");\n\t\t\t\tif(j % sqRt == 0) \n\t\t\t\t\tsb.append(\"| \");\n\t\t\t}\n\t\t\tsb.append(\"\\n\");\n\t\t\tif(i % sqRt == 0) \n\t\t\t\tsb.append(line + \"\\n\");\t\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String getExcelString(){\n\t\tString ret = question+\"\\t\"+answerNum+\"\\t\"+answerObj;\n\t\treturn ret;\n\t}", "public static String toString(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tString ret = \"\";\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (colNum == 0) {\r\n\t\t\t\t\tret += \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\tret += \"\\t\" + a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public static String toStringRelativeConfMatrix(int[][] a, String[] cats) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tString ret = \"r\\\\p\\t\";\r\n\t\tfor (int i = 0; i < cats.length; i++) {\r\n\t\t\tret += cats[i] + \"\\t\";\r\n\t\t}\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (j == 0) {\r\n\t\t\t\t\tret += \"\\n\" + cats[i];\r\n\t\t\t\t}\r\n\t\t\t\tret += \"\\t\" + percent(a[i][j], rowSum(a, i));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public String toString() {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\n\t\ttry {\n\t\t\tAlignment[] alignment = new Alignment[] { Alignment.LEFT, Alignment.RIGHT };\n\t\t\tTable table = new Table();\n\t\t\ttable.addHeadings(table.new Headings(new String[] { \"WORKLOAD\", workloadConfiguration.getID() + \"\" },\n\t\t\t\t\tnew int[] { 24, 20 }, alignment, true, false));\n\t\t\ttable.addRow(table.new Row(\n\t\t\t\t\tnew String[] { \"Start Time\", Utilities.formatTime(workloadConfiguration.getStartTime()) },\n\t\t\t\t\talignment));\n\t\t\ttable.addRow(table.new Row(\n\t\t\t\t\tnew String[] { \"Duration\", Utilities.formatTime(workloadConfiguration.getDuration()) }, alignment));\n\t\t\ttable.addRow(table.new Row(\n\t\t\t\t\tnew String[] { \"Producer threads\", workloadConfiguration.getNumProducerThreads() + \"\" },\n\t\t\t\t\talignment));\n\t\t\ttable.addRow(table.new Row(new String[] { \"Maintenance period\",\n\t\t\t\t\tUtilities.formatTime(workloadConfiguration.getMaintenancePeriod()) }, alignment));\n\t\t\ttable.addRow(table.new Row(\n\t\t\t\t\tnew String[] { \"Pay period\", Utilities.formatTime(workloadConfiguration.getPaymentPeriod()) },\n\t\t\t\t\talignment));\n\t\t\ttable.addLine();\n\t\t\ttable.appendToStringBuilder(stringBuilder);\n\t\t} catch (RowException | CellException e) {\n\t\t\tEvent.FATAL_ERROR.issue(e);\n\t\t}\n\n\t\tappendSetsToStringBuilder(stringBuilder);\n\n\t\treturn stringBuilder.toString();\n\t}", "public String getInlineResult() {\n StringBuilder builder = new StringBuilder();\n for (int c = 0; c < cols; ++c) {\n for (int r = 0; r < rows; ++r) {\n builder.append(puzzleMap.get(orderedKeys[r][c]).getValue());\n }\n }\n return builder.toString().trim();\n }", "@Override\n\tpublic String toString() {\n\t\tString result = \"-------------------\\n\";\n\t\tfor (Cell[] cellRow : board) {\n\t\t\tresult += \"|\";\n\t\t\tfor (Cell cell : cellRow) {\n\t\t\t\tresult += (cell.val == 0 ? \" \" : cell.val) + \"|\";\n\t\t\t}\n\t\t\tresult += \"\\n-------------------\\n\";\n\t\t}\n\t\treturn result += \"\\n\" + toTest();\n\t}", "@Override\r\n public String toString()\r\n {\n String solution=\"\";\r\n for(int i=0;i<30;++i)\r\n {\r\n if(genes[i])solution+=(i/3+1)+\" \";\r\n else solution+=\"0 \";\r\n }\r\n return solution;\r\n }", "public String toString() {\r\n\t\tString ans= date + \" \" + time + \",\" + id + \",\" + p + \",\" + numOfScans + \",\" + wifis.toString();\r\n\t\tfor (int i = 0; i < ans.length(); i++){\r\n\t\t\tif (ans.charAt(i)=='[')\r\n\t\t\t\tans=ans.substring(0, i) + ans.substring(i+1,ans.length()); \r\n\t\t\tif (ans.charAt(i)==']')\r\n\t\t\t\tans=ans.substring(0, i); \r\n\t\t\telse\r\n\t\t\t\tif(ans.charAt(i)==',' && i+1<ans.length() && ans.charAt(i+1)==' ')\r\n\t\t\t\t\tans=ans.substring(0, i+1) + ans.substring(i+2,ans.length());\r\n\t\t}\r\n\t\tif(ans.charAt(ans.length()-1)==',' )\r\n\t\t\tans=ans.substring(0, ans.length()-1);\r\n\t\treturn ans + System.lineSeparator();\r\n\t}", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n\n for (int row = 0; row < this.getNumberOfRows(); row++) {\n for (int column = 0; column < this.getNumberOfCols(); column++) {\n\n if (row == this.getState()[0] && column == this.getState()[1])\n builder.append(\"* \");\n else\n builder.append(Integer.toString(this.getEnvironment()[row][column]) + ' ');\n\n }\n\n if (row != (this.getNumberOfRows() - 1))\n builder.append('\\n');\n }\n\n return builder.toString();\n }", "public String toString()\n\t{\n\t\tString result = \"AP Concert Hall - Simplified\\n\";\n\t\tfor(int i = 0; i < seat.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < seat[i].length; j++)\n\t\t\t{\n\t\t\t\tif(seat[i][j] == true)\n\t\t\t\t\tresult += \"X \\t\";\n\t\t\t\telse if(seat[i][j] == false)\n\t\t\t\t\tresult += \"O \\t\";\n\t\t\t}\n\t\t\tresult += \"\\n\";\n\t\t}\n\n\t\treturn result;\n\t}", "public String getGameStr() {\n StringBuilder outStr = new StringBuilder();\n for(int i=0;i<ROWS;i++) {\n for(int j=0;j<COLS;j++){ \n outStr.append(\"|\").append(gameBoard[i][j].show());\n }\n outStr.append(\"|\").append(System.getProperty(\"line.separator\"));\n }\n return outStr.toString();\n }", "public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(n + System.lineSeparator());\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n sb.append(tiles[i][j] + \" \");\n }\n sb.append(System.lineSeparator());\n }\n return sb.toString();\n }" ]
[ "0.726748", "0.7216195", "0.7076237", "0.7038398", "0.7026267", "0.6985793", "0.6973739", "0.69714403", "0.6921901", "0.69111353", "0.68736154", "0.68213725", "0.680631", "0.6798618", "0.67620873", "0.6760347", "0.6733738", "0.6690422", "0.6567312", "0.6516264", "0.6492098", "0.6488579", "0.6481724", "0.64797467", "0.6457824", "0.6443623", "0.6416836", "0.64107543", "0.63870454", "0.634438", "0.633183", "0.63263446", "0.6321135", "0.6302799", "0.62787235", "0.62744564", "0.6264893", "0.6259873", "0.62460905", "0.6233907", "0.6231107", "0.6207375", "0.6201513", "0.6201513", "0.62012666", "0.61943626", "0.6187897", "0.61871386", "0.6186676", "0.6180736", "0.61740357", "0.6160666", "0.61355025", "0.6121468", "0.6104168", "0.61029", "0.6098703", "0.60866106", "0.60795", "0.6068811", "0.6060922", "0.60485774", "0.6047551", "0.60453266", "0.6043484", "0.6042508", "0.6041115", "0.60394037", "0.603664", "0.60251147", "0.60159373", "0.60068977", "0.60064685", "0.59955525", "0.59931856", "0.5983835", "0.59640026", "0.5956732", "0.59510744", "0.5946088", "0.5932303", "0.5930044", "0.5929631", "0.5928836", "0.5926317", "0.5922941", "0.5920465", "0.5919639", "0.59137696", "0.5909703", "0.5903827", "0.59031016", "0.58992213", "0.58991605", "0.5893714", "0.58777845", "0.58727974", "0.5866988", "0.586162", "0.58546853" ]
0.65357643
19
Get a formatted String version for a confusion matrix for relative values.
public static String toStringRelativeConfMatrix(int[][] a, String[] cats) { int rowNum = a.length; int colNum = a[0].length; String ret = "r\\p\t"; for (int i = 0; i < cats.length; i++) { ret += cats[i] + "\t"; } for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (j == 0) { ret += "\n" + cats[i]; } ret += "\t" + percent(a[i][j], rowSum(a, i)); } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n final String lineSeparator = System.getProperty(\"line.separator\");\n return new StringBuilder(\"TableOfConfusion\").append(lineSeparator)\n .append(\"precision: \").append(calculatePrecision()).append(lineSeparator)\n .append(\"recall: \").append(calculateRecall()).append(lineSeparator)\n .append(\"specificity: \").append(calculateSpecificity()).append(lineSeparator)\n .append(\"accuracy: \").append(calculateAccuracy()).append(lineSeparator)\n .append(\"fscore: \").append(calculateFScore()).append(lineSeparator)\n .toString();\n }", "@Override\n public String toString() {\n double[][] temp = matx.getArray();\n String tempstr = \"[\";\n for (int i = 0; i < temp.length; i++) {\n for (int j = 0; j < temp.length; j++) {\n tempstr += (int) temp[i][j] + \", \";\n }\n tempstr = tempstr.substring(0, tempstr.length() - 2);\n tempstr += \"]\\n[\";\n }\n return tempstr.substring(0, tempstr.length() - 2);\n }", "@Override\n public String toString() {\n StringBuilder matrixValues = new StringBuilder(\"\\nMatrix : \"\n + values.length + \"x\" + values[0].length + \"\\n\");\n for (int[] row : values) {\n for (int value : row) {\n matrixValues.append(value + \" \");\n }\n matrixValues.append(\"\\n\");\n }\n return matrixValues.toString();\n }", "public String toString()\n\t{\n\t\t//DecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tString report = \"\";\n\t\treport += \"m = \" + rows + \"\\n\";\n\t\treport += \"n = \" + cols + \"\\n\";\n\t\treport += \"[ | ] = \" + \"\\n\";\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < cols+1; j++)\n\t\t\t{\n\t\t\t\treport += /*df.format*/(A[i][j]) + \" \";\n\t\t\t}\n\t\t\treport += \"\\n\";\n\t\t}\n\t\treturn report;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn solution + \" [\" + CONF_FORMATTER.format(confidence) + \"%]\";\n\t}", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n for (double[] b : matrix) {\n builder.append(\"\\n\");\n for (double c : b) {\n builder.append(c).append(\" \");\n }\n }\n return builder.toString();\n }", "public String toString() {\r\n StringBuilder result= new StringBuilder();\r\n for(int x=0;x<8;x++){\r\n for(int y=0;y<8;y++){\r\n result.append(checks[x][y]).append(\",\");\r\n }\r\n result.append(\"\\n\");\r\n }\r\n return result.toString();\r\n }", "@Override public String toString() {\n if( _matrix == null ) return \"no trees\";\n int N = _matrix.length;\n final int K = N + 1;\n double[] e2c = new double[N];\n for( int i = 0; i < N; i++ ) {\n long err = -_matrix[i][i];\n for( int j = 0; j < N; j++ ) err += _matrix[i][j];\n e2c[i] = Math.round((err / (double) (err + _matrix[i][i])) * 100) / (double) 100;\n }\n String[][] cms = new String[K][K + 1];\n cms[0][0] = \"\";\n for( int i = 1; i < K; i++ ) cms[0][i] = \"\" + (i - 1);\n cms[0][K] = \"err/class\";\n for( int j = 1; j < K; j++ ) cms[j][0] = \"\" + (j - 1);\n for( int j = 1; j < K; j++ ) cms[j][K] = \"\" + e2c[j - 1];\n for( int i = 1; i < K; i++ )\n for( int j = 1; j < K; j++ ) cms[j][i] = \"\" + _matrix[j - 1][i - 1];\n int maxlen = 0;\n for( int i = 0; i < K; i++ )\n for( int j = 0; j < K + 1; j++ ) maxlen = Math.max(maxlen, cms[i][j].length());\n for( int i = 0; i < K; i++ )\n for( int j = 0; j < K + 1; j++ ) cms[i][j] = pad(cms[i][j], maxlen);\n String s = \"\";\n for( int i = 0; i < K; i++ ) {\n for( int j = 0; j < K + 1; j++ ) s += cms[i][j];\n s += \"\\n\";\n }\n return s;\n }", "public String toString() {\n\t\tString r = \"\";\n\t\tchar[][] a = toMatrix();\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tif (a[i][j] == '\\0')\n\t\t\t\t\tr += \"-\";\n\t\t\t\telse\n\t\t\t\t\tr += a[i][j];\n\t\t\t}\n\t\t\tr += \"\\n\";\n\t\t}\n\t\treturn r.substring(0, r.length() - 1);\n\t}", "public String toString() {\n String s = \"\";\n for(int i = 1; i <= rows; i++){\n for(int j = 1; j <= cols; j++){ \n s = s + String.format(\"%2d\",m[i][j]) + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }", "public String toString() {\n\t\tString s = n + \" x \" + n + \" Matrix:\\n\";\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\ts += content[i][j] + \"\\t\\t\";\n\t\t\t}\n\t\t\ts += \"\\n\\n\";\n\t\t}\n\t\treturn s;\n\t}", "public String toString() {\n\t\tString matrixString = new String();\n\t\tArrayList<Doc> docList;\n\t\tfor (int i = 0; i < termList.size(); i++) {\n\t\t\tmatrixString += String.format(\"%-15s\", termList.get(i));\n\t\t\tdocList = docLists.get(i);\n\t\t\tfor (int j = 0; j < docList.size(); j++) {\n\t\t\t\tmatrixString += docList.get(j) + \"\\t\";\n\t\t\t}\n\t\t\tmatrixString += \"\\n\";\n\t\t}\n\t\treturn matrixString;\n\t}", "public String toString()\n\t{\n\t\tStringBuilder matrix = new StringBuilder();\n\t\t\n\t\tfor(int i = 0; i < numberOfVertices; i++)\n\t\t{\n\t\t\tmatrix.append(i + \": \");\n\t\t\tfor(boolean j : adjacencyMatrix[i])\n\t\t\t{\n\t\t\t\tmatrix.append((j? 1: 0) + \" \");\n\t\t\t}\n\t\t\tmatrix.append(\"\\n\");\n\t\t}\n\t\t\n\t\treturn matrix.toString();\n\t}", "private String getMatrixString(int[][] input)\n {\n // Building strings with the StringBuilder is much more efficient\n // then concatenating strings! \n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sb.append(Integer.toString(input[i][j]) + \"\\t\");\n }\n sb.append(\"\\n\"); // append the linebreaker\n }\n\n // Finally, return the StringBuilder as a string\n return sb.toString();\n }", "public String toString() {\n\tString retStr = \"\";\n\tfor (int r = 0; r < this.size(); r++){\n\t for (int c = 0; c < this.size(); c++){\n\t\tretStr += matrix[r][c] + \"\\t\";\n\t }\n\t retStr += \"\\n\";\n\t}\n\treturn retStr;\n }", "public String toString() {\r\n if(this.getImag() < 0)\r\n return String.format(\"%.1f - %.1fi\", this.getReal(), this.getImag() * -1); // imaginary to positive for output only\r\n return String.format(\"%.1f + %.1fi\", this.getReal(), this.getImag());\r\n }", "public String toString() {\n StringBuilder output = new StringBuilder();\n output.append(\"{\\n\");\n for (int i=0; i<rows; i++) {\n output.append(Arrays.toString(matrix.get(i)) + \",\\n\");\n }\n output.append(\"}\\n\");\n return output.toString();\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", matrix[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString() {\r\n\t\tString schemeTable=new String();\r\n\t\tint i;\r\n\t\tfor(i=0;i<explanatorySet.size();i++)\r\n\t\t\t schemeTable=schemeTable+((Attribute) explanatorySet.get(i)).getName()+\",\";\r\n\t\tfor(i=0;i<data.size();i++) {\r\n\t\t\tschemeTable=schemeTable+\"\\n\"+(i+1)+\":\";\r\n\t\t\tfor(int j=0;j<explanatorySet.size();j++) {\r\n\t\t\t\tschemeTable=schemeTable+getValue(i,j)+\",\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn schemeTable;\r\n\t}", "public String toString(){\n StringBuffer returnString = new StringBuffer();\n for(int i = 0; i < this.matrixSize; i++){\n if(rows[i].length() != 0){\n returnString.append((i+1) + \":\" + rows[i]+ \"\\n\");\n }\n }\n return returnString.toString();\n }", "public String toString(){\r\n\t\tString aux = \"\";\r\n\t\tString ending = \",\";\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (i == numInputAttributes-1 &&\r\n\t\t\t\t\tnumOutputAttributes == 0) ending = \"\";\r\n\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\taux += nominalValues[0][i]; \r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\taux += (new Integer((int)realValues[0][i])).toString();\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.REAL:\r\n\t\t\t\taux += (new Double (realValues[0][i])).toString();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\taux += ending;\r\n\t\t}\r\n\t\tending = \",\";\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (i == numOutputAttributes-1) ending = \"\";\r\n\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\taux += nominalValues[1][i]; \r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\taux += (new Integer((int)realValues[1][i])).toString();\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.REAL:\r\n\t\t\t\taux += (new Double(realValues[1][i])).toString();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\taux += ending;\r\n\t\t} \r\n\t\treturn aux;\r\n\t}", "public String toString()\n {\n String str = (continuation ? \"+ \" : \"- \") ;\n for(int i = 0 ; i < values.length ; i++)\n str += values[i] + \" \";\n str += classification;\n return str ;\n }", "public String toString() {\n\t\t// Converts column\n\t\tString columnStr = \"\";\n\t\tfor (int tempColumn = cell.getAddress().getColumn();\n\t\t\t\ttempColumn >= 0; tempColumn = tempColumn\n\t\t\t\t\t/ (Address.HIGHEST_CHAR - Address.LOWEST_CHAR + 1) - 1)\n\t\t\tcolumnStr = ((char)((char)(tempColumn % (Address.HIGHEST_CHAR\n\t\t\t\t- Address.LOWEST_CHAR + 1)) + Address.LOWEST_CHAR)) + columnStr;\n\t\tif (columnAbsolute)\n\t\t\tcolumnStr = ABSOLUTE_OPERATOR + columnStr;\n\n\t\t// Converts row\n\t\tString rowStr = (rowAbsolute ? ABSOLUTE_OPERATOR : \"\")\n\t\t\t+ (cell.getAddress().getRow() + 1);\n\t\treturn columnStr + rowStr;\n\t}", "public static String toStringConfMatrix(int[][] a, String[] cats) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tString ret = \"r\\\\p\\t\";\r\n\t\tfor (int i = 0; i < cats.length; i++) {\r\n\t\t\tret += cats[i] + \"\\t\";\r\n\t\t}\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (j == 0) {\r\n\t\t\t\t\tret += \"\\n\" + cats[i];\r\n\t\t\t\t}\r\n\t\t\t\tret += \"\\t\" + a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (byte m = 0; m < 9; m++) {\n\t\t\tfor (byte n = 0; n < 9; n++) {\n\t\t\t\tsb.append(cells[m][n].getValue());\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(dim + \"\\n\");\n for (int i = 0; i < dim; i++) {\n for (int j = 0; j < dim; j++) {\n s.append(String.format(\"%2d \", board[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "@Override\r\n public String toString() {\r\n String temp = \"\";\r\n\r\n // item statement are used to generate format for the matrix.\r\n String itemStatement = \" %x.yf\"\r\n .replace(\"x\", \"\" + (Prettify.countSingleDigitSpace(this) + Matrix.significantDigit + 2))\r\n .replace(\"y\", \"\" + Matrix.significantDigit);\r\n\r\n for (double[] row : matrix) {\r\n for (double col : row) {\r\n temp += String.format(itemStatement, col);\r\n }\r\n temp += \"\\n\";\r\n }\r\n\r\n // this one are used to clean up those junks.\r\n // if you need to know it's function, you can disable it,\r\n // it's just kind of magic, here :D\r\n return temp.replaceAll(\"[\\\\s\\\\n]+$\", \"\");\r\n }", "public String getExcelString(){\n\t\tString ret = question+\"\\t\"+answerNum+\"\\t\"+answerObj;\n\t\treturn ret;\n\t}", "public String getTabularResult() {\n StringBuilder builder = new StringBuilder();\n for (int c = 0; c < cols; ++c) {\n for (int r = 0; r < rows; ++r) {\n builder.append(puzzleMap.get(orderedKeys[r][c]).getValue());\n }\n builder.append(System.lineSeparator());\n }\n return builder.toString().trim();\n }", "@Override\r\n public String toString()\r\n {\n String solution=\"\";\r\n for(int i=0;i<30;++i)\r\n {\r\n if(genes[i])solution+=(i/3+1)+\" \";\r\n else solution+=\"0 \";\r\n }\r\n return solution;\r\n }", "public String toString(){\n\t\tString maChaineRetour=\"\";\n\t\t\n\t\tfor(Cristal[] ligne: tabCristaux){\n\t\t\tfor(Cristal colonne: ligne){\n\t\t\t\tif(colonne == null)\n\t\t\t\t\tmaChaineRetour = maChaineRetour + \"0\" ;\n\t\t\t\telse\n\t\t\t\t\tmaChaineRetour = maChaineRetour + colonne.toString();\n\t\t\t}\n\t\t\tmaChaineRetour = maChaineRetour + \"\\n\";\n\t\t}\n\t\treturn maChaineRetour;\n\t}", "public String getTable() {\n StringBuilder table = new StringBuilder();\n\n table.append(\" \");\n for (int i = 0; i < matrix.length; i++) {\n table.append(\" \");\n table.append(i + 1);\n }\n table.append(\"\\n\");\n\n for (int i = 0; i < matrix.length; i++) {\n table.append(i + 1);\n table.append(\" \");\n\n for (int j = 0; j < matrix.length; j++) {\n table.append(matrix[i][j] ? 1 : 0);\n table.append(\" \");\n }\n table.append(\"\\n\");\n }\n table.append(\"\\n\");\n\n return table.toString();\n }", "public String toString() {\n\t\tString returnString=\"\";\n\t\t\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\tfor (int j=0; j<squares.length; j++) {\n\t\t\t\treturnString+=Character.toString(squares[i][j].getValue());\n\t\t\t}\n\t\t\treturnString+=\"// \";\n\t\t}\n\t\t\n\t\treturn returnString;\n\t}", "@Override\r\n public String toString() {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < dimension; i++) {\r\n sb.append(rowToString(i)).append(\"\\n\");\r\n }\r\n //remove the last unnecessary carriage return from the string.\r\n return sb.toString().substring(0, sb.length() - 1);\r\n }", "public String toString()\n\t{\n\t\tString output = \"\";\n\t\tfor(String[] at:atMat){\n\t\t\tfor(String a:at){\n\t\t\t\toutput += a+ \" \";\n\t\t\t}\n\t\t\toutput += \"\\n\";\n\t\t}\n\t\treturn output;\n\t}", "public String toString() {\n String result = \"\";\n result += \" \";\n // Column numbers\n for (int i = 0; i < numberOfColumns; i++) {\n result += (i % 10) + \" \";\n }\n result += \"\\n\";\n result += \" \";\n // Horizontal dividers\n for (int i = 0; i <= 2 * this.numberOfColumns - 2 ; i++) {\n result += HORI_DIVIDE;\n }\n result += \"\\n\";\n // Each horizontal line has the line number, a divider, and the safe data.\n for (int i = 0; i < numberOfRows; i++) {\n result += (i % 10);\n result += VERT_DIVIDE;\n for (int j = 0; j < numberOfColumns; j++) {\n result += grid[i][j];\n if (j != numberOfColumns - 1) {\n result += \" \";\n }\n }\n if (i != numberOfRows - 1) {\n result += \"\\n\";\n }\n }\n return result;\n }", "public String toString() {\n return String.format(\"%s%s\", column, row);\n }", "@Override\n public String toString() {\n StringBuilder s = new StringBuilder();\n int N = size();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", tileAt(i,j)));\n }\n s.append(\"\\n\");\n }\n /*\n s.append(manhattan());\n s.append(\"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", _goal[i][j]));\n }\n s.append(\"\\n\");\n }*/\n s.append(\"\\n\");\n return s.toString();\n }", "@Override\n\tpublic String toString() {\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\treturn \"[\" + df.format(ratio1) + \",\" + year + \",\" + df.format(ratio2) + \"],\";\n\t}", "public String getInlineResult() {\n StringBuilder builder = new StringBuilder();\n for (int c = 0; c < cols; ++c) {\n for (int r = 0; r < rows; ++r) {\n builder.append(puzzleMap.get(orderedKeys[r][c]).getValue());\n }\n }\n return builder.toString().trim();\n }", "@Override\n\tpublic String toString() {\n\t\tString out = new String();\n\t\tfor (int i = 0; i < this.maxNumVertices; i++) {\n\t\t\tfor (int j = 0; j < this.maxNumVertices; j++) {\n\t\t\t\tout = out + this.reachabilityMatrix[i][j] + \" \";\n\t\t\t}\n\t\t\tout = out + \"\\n\";\n\t\t}\n\t\treturn out;\n\t}", "@Override\n\tpublic String toString() {\n\t\tString result = \"-------------------\\n\";\n\t\tfor (Cell[] cellRow : board) {\n\t\t\tresult += \"|\";\n\t\t\tfor (Cell cell : cellRow) {\n\t\t\t\tresult += (cell.val == 0 ? \" \" : cell.val) + \"|\";\n\t\t\t}\n\t\t\tresult += \"\\n-------------------\\n\";\n\t\t}\n\t\treturn result += \"\\n\" + toTest();\n\t}", "public String toString() {\n String result=\"Initial state: 0\\nFinal state: \"+(transitionTable.length-1)+\"\\nTransition list:\\n\";\n for (int i=0;i<epsilonTransitionTable.length;i++) for (int state: epsilonTransitionTable[i])\n result+=\" \"+i+\" -- epsilon --> \"+state+\"\\n\";\n for (int i=0;i<transitionTable.length;i++) for (int col = 0; col< NFA.N; col++)\n if (transitionTable[i][col]!=-1) result+=\" \"+i+\" -- \"+(char)col+\" --> \"+transitionTable[i][col]+\"\\n\";\n return result;\n }", "public String toString() {\n return String.format(\"(%d/%d)\", fila, columna);\n }", "public String toString(){\r\n\t\tString ret = \"MatrixArray:\\n\";\r\n\t\tfor (int i = 0; i < this.MA.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.MA[i].length; j++){\r\n\t\t\t\tif (j > 0) {\r\n\t\t\t\t\tret += \", \";\r\n\t\t }\r\n\t\t ret += String.valueOf(this.MA[i][j]);\r\n\t\t\t}\r\n\t\t\tret += \"\\n\";\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public String affichage() {\r\n\t\tString s = \"\";\r\n\t\tfor (int i=0; i<this.allJ.length; i++) {\r\n\t\t\ts = s + this.allJ[i];\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(dimension + \"\\n\");\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n s.append(String.format(\"%2d \", (int) blocks[i * dimension + j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toTest() {\n\t\tString result = \"Possible values: \\n\";\n\t\tfor (int r=0; r<size*size; r++) {\n\t\t\tfor (int c=0; c<size*size; c++) {\n\t\t\t\tif (board[r][c].val==0) {\n\t\t\t\t\tresult += \"Row: \" + (r+1) + \", Col: \" + (c+1) + \", Value: \" + board[r][c].val + \", Possible values: \" + board[r][c].pval + \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "protected String stringConnectionsMatrix() {\n String ret = \"Connection Matrix\";\n for (G good : this.goods) {\n ret += \"\\n\";\n for (B bidder : this.bidders) {\n if (bidder.demandsGood(good)) {\n ret += \"\\t yes\";\n } else {\n ret += \"\\t no\";\n }\n }\n }\n return ret + \"\\n\";\n }", "public String toString() {\n\t\tString resultString = \"\\r\\n\";\n\t\t//resultString += \"Checkerboard state: \\r\\n\";\n\t\tfor (int i = 0; i < checkerboard.length; i++) {\n\t\t\tfor (int j = 0; j < checkerboard.length; j++) {\n\t\t\t\tif (checkerboard[i][j] == WHITE) {\n\t\t\t\t\tresultString += \"o \";\n\t\t\t\t} else if (checkerboard[i][j] == BLACK) {\n\t\t\t\t\tresultString += \"x \";\n\t\t\t\t} else {\n\t\t\t\t\tresultString += \"- \";\n\t\t\t\t}//Of if\n\t\t\t}//Of for j\n\t\t\tresultString += \"\\r\\n\";\n\t\t}//Of for i\n\t\t\n\t\tresultString += currentState;\n\n\t\t//resultString += \"\\r\\nThe current situation is: \" + gameSituation;\n\t\treturn resultString;\n\t}", "public String toString() {\n String result = \"\";\n if (this.column > 0 && this.row > 0) {\n int column = this.column, exp = (int) (Math.log(column) / Math.log(26)), cur;\n for (int i = exp; i >= 0; i--) {\n cur = (int) (column / Math.pow(26, i));\n result += (char) (64 + cur);\n column -= cur * Math.pow(26, i);\n }\n result += this.row;\n }\n return result;\n }", "public String toString() {\n return label + \"(\" + MathUtil.doubleString(value, 1) + \")\\tweight: \" + MathUtil.doubleString(weight, 2) + \"\\tFeatureVector: \" + featureVector.toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"[[\" + getNumberOfTruePositives() + \" \" + getNumberOfFalsePositives() + \"][\" + getNumberOfFalseNegatives() + \" \" + getNumberOfTrueNegatives() + \"]]\";\n\t}", "public String toString(){\n String string = new String();\n for(int i = 0; i < axis.length; i++){\n string += axis[i];\n if(i != (axis.length - 1)){\n string += \" / \";\n }\n }\n return string;\n }", "@Override\n public final String toString() {\n \t\n \treturn String.format(\"[%1$s [%2$s\\t%3$s\\t%4$s]%1$s [%5$s\\t%6$s\\t%7$s]%1$s [%8$s\\t%9$s\\t%10$s] ]\", System.getProperty(\"line.separator\"), this.m00, this.m01, this.m02,\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 this.m10, this.m11, this.m12,\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 this.m20, this.m21, this.m22);\n }", "public String toString() {\r\n String modelString =\r\n \"value=\"\r\n + getValue()\r\n + \", \"\r\n + \"extent=\"\r\n + getExtent()\r\n + \", \"\r\n + \"min=\"\r\n + getMinimum()\r\n + \", \"\r\n + \"max=\"\r\n + getMaximum()\r\n + \", \"\r\n + \"adj=\"\r\n + getValueIsAdjusting();\r\n\r\n return getClass().getName() + \"[\" + modelString + \"]\";\r\n }", "@Override\n public String toString() {\n // Determine the width required for the maximum element,\n // and check for fractional display requirement.\n double maxval = 0;\n boolean fractional = false;\n for (int i = 0; i < getRowDimension(); i++) {\n for (int j = 0; j < getColumnDimension(); j++) {\n double current = get(i, j);\n if (current < 0)\n current *= -11;\n if (current > maxval)\n maxval = current;\n double fract = Math.abs(current - Math.rint(current));\n if (!fractional\n && ((Math.log(fract) / Math.log(10)) >= -2)) {\n fractional = true;\n }\n }\n }\n int width = (int)(Math.log(maxval) / Math.log(10)\n + (fractional ? 4 : 1));\n\n StringBuffer text = new StringBuffer();\n for (int i = 0; i < getRowDimension(); i++) {\n for (int j = 0; j < getColumnDimension(); j++)\n text.append(\" \").append(Functions.doubleToString(get(i, j),\n width, (fractional ? 2 : 0)));\n text.append(\"\\n\");\n }\n\n return text.toString();\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(this.dim + \"\\n\");\n int counter = 0;\n for (int i = 0; i < this.dim; i++) {\n for (int j = 0; j < this.dim; j++) {\n int n = tiles[counter++];\n s.append(String.format(\"%2d \", n));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString()\r\n\t{\n\t\treturn strRank[srtRank] + strSuit[srtSuit];\r\n\t}", "public String toString() {\n\t\treturn toString(Constants.get_output_precision());\n\t}", "public String toString() {\n\t\treturn this.getStatisticID() + \"\" + this.getMark() + \"\" + this.getStudentName() + \"\" + this.getCourse() + \"\"\n\t\t\t\t+ this.getAssignmentName() + \"\" + this.getFeedback() + \"\" + this.getAverage();\n\n\t}", "@Override\n\tpublic String toString() {\n\t\tString cad=tractor.getRow() + \" \" + tractor.getColumn() + \" \" + getK() + \" \" + getMax() + \" \" + getRows() + \n\t\t\t\t\" \" + getColumns() + \"\\n\";\n\t\tfor (int i=0;i<cells.length;i++) {\n\t\t\tfor (int j=0;j<cells[0].length;j++) {\n\t\t\t\tcad+=cells[i][j].getSand()+ \" \";\n\t\t\t}\n\t\t\tcad+=\"\\n\";\n\t\t} \n\t\treturn cad;\n\t}", "public String toString() {\n StringBuilder s = new StringBuilder(); // Initialize new string builder\n s.append(N + \"\\n\"); // Append board dimension to string\n\n for (int[] row : tiles) {\n for (int tile : row)\n s.append(String.format(\"%2d \", tile)); // Append formatted board tiles string\n s.append(\"\\n\"); // Append new line to string\n }\n return s.toString(); // Return string representation of board\n }", "@Override\n public String toString() {\n return columnToChar(c1) + \"\" + (8 - r1) + columnToChar(c2) + \"\" + (8 - r2);\n }", "public String getConfidenceString() {\n final DecimalFormat format = new DecimalFormat(\"0.000\");\n return !Double.isNaN(confidence) ? format.format(MathUtil.coerce(0, 1, getConfidence()) * 100.0f) + \"%\" : \"N/A\";\n }", "public String toString() {\r\n\t\tString resultado = \"\";\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tif(superficie[i][j] == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tresultado += \" - \" + \" \";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tresultado += superficie[i][j] + \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresultado += \"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\treturn resultado;\r\n\t}", "public String toString() {\n String res = \"\";\n \n for ( int[] row : img ) {\n for ( int x : row )\n res += x + \" \";\n res += \"\\n\";\n }\n return res;\n }", "public String toString( )\n{ \n String s=\"\\nThe Mines\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n s = s + theMines[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n }\n s += \"\\nMined neighbor counts\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n if( theCounts[ r ][ c ] == 9 )\n s = s + \"X\" + \" \";\n else\n s = s + theCounts[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n } \n return( s );\n}", "public String toString() {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < K; i++) {\n sb.append(centroids[i].toString());\n sb.append('\\n');\n }\n return sb.toString();\n }", "@Override\n public String toString()\n {\n\n String str = String.format(\"%5d %-20s %2c %11.2f\",id,name,rarity,value);\n\n return str;\n }", "public String toString() {\n\n\t\tString result = \"\";\n\n\t\tfor(Cell[][] dim : board) {\n\t\t\tfor(Cell[] row : dim) {\n\t\t\t\tfor(Cell col : row) {\n\t\t\t\t\tif(col== Cell.E)\n\t\t\t\t\t\tresult += \"-\";\n\t\t\t\t\telse\n\t\t\t\t\t\tresult += col;\t\n\t\t\t\t}\n\t\t\t\tresult += \"\\n\";\n\t\t\t}\n\t\t\tresult += \"\\n\";\n\t\t}\n\n//\t\tSystem.out.println(\"\\n***********\\n\");\n\t\treturn result;\n\n\t}", "public String toString() {\n\t\t\n\t\tString temp = new String();\n\t\tfor(int i=0; i<grad.length; i++) {\n\t\t\ttemp += grad[i] + \" \";\n\t\t}\n\t\t\n\t\treturn temp;\n\t}", "public String toString () {\n\t\tString resumen = \"\";\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tresumen = resumen + this.get(i).toString();\n\t\t}\n\t\treturn resumen;\n\t}", "public String toString() {\n\t\tStringBuilder string = new StringBuilder();\n\t\tstring.append(n + \"\\n\");\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < n; j++) \n\t\t\t\tstring.append(String.format(\"%2d \", board[i][j]));\n\t\t\tstring.append(\"\\n\");\n\t\t}\n\t\treturn string.toString();\n\t}", "public String toString() {\n return \"mass||\" + iMass + \"\\t\\tintensity||\" + iIntensity;\n\n }", "public String toString(){\n\t\tStringBuilder output = new StringBuilder();\n\t\tfor(int i = 0; i<this.size; i++){\n\t\t\tfor(int j=0; j<this.size; j++){\n\t\t\t\toutput.append(this.numbers[i][j] + \"\\t\");\n\t\t\t}\n\t\t\toutput.append(\"\\n\");\n\t\t}\n\t\treturn output.toString();\n\t}", "public static String matrixToString(int[][] m) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(m[i][j]);\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public String toString() {\r\n\t\tString s = String.format(\"%6.1f :\", this.distance);\r\n\t\tfor (int i = 0; i < this.length(); i++) {\r\n\t\t\ts += String.format(\"%3d\", index[i]);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "@Override\n\tpublic String toString(){\n\t\t// return a string of the board representation following these rules:\n\t\t// - if printed, it shows the board in R rows and C cols\n\t\t// - every cell should be represented as a 5-character long right-aligned string\n\t\t// - there should be one space between columns\n\t\t// - use \"-\" for empty cells\n\t\t// - every row ends with a new line \"\\n\"\n\t\t\n\t\t\n\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\tfor (int i=0; i<numRows; i++){\n\t\t\tfor (int j =0; j<numCols; j++){\n\t\t\t\tPosition pos = new Position(i,j);\n\t\t\t\t\n\t\t\t\t// use the hash table to get the symbol at Position(i,j)\n\t\t\t\tif (grid.contains(pos))\n\t\t\t\t\tsb.append(String.format(\"%5s \",this.get(pos)));\n\t\t\t\telse\n\t\t\t\t\tsb.append(String.format(\"%5s \",\"-\")); //empty cell\n\t\t\t}\n\t\t\tsb.append(\"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\n\t}", "public String toString()\n {\n String str = \"\";\n switch (align)\n {\n case LEFT :\n str = \",align=left\";\n break;\n case CENTER :\n str = \",align=center\";\n break;\n case RIGHT :\n str = \",align=right\";\n break;\n }\n return getClass().getName() + \"[hgap=\" + hgap + \",vgap=\" + vgap + str + \"]\";\n }", "public String toString(){\n\n\t\tStringBuffer b = new StringBuffer();\n\t\tb.append('\\n');\n\n\t\tint i = 0, j, counter = 0;\n\t\twhile( i < numRows){\n\n\t\t\tj = 0;\n\t\t\twhile( j < numCols){\n\n\t\t\t\tb.append( \"\" + i + TAB + j + TAB);\n\t\t\t\tObject obj = this.get(i, j);\n\t\t\t\tif( obj != null ) {\n\t\t\t\t\tb.append( obj.toString() );\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\telse b.append( \"NULL\" );\n\t\t\t\tb.append('\\n');\n\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\n\t\t}\n\t\tb.append( \"\\nNumber of Rows = \" + numRows + '\\n' );\n\t\tb.append( \"Number of Columns = \" + numCols + '\\n' );\n\t\tb.append( \"Size = \" + size + '\\n' );\n\t\tb.append( \"Number of non-null objects = \" + counter + '\\n' );\n\t\treturn b.toString();\n\t}", "public String getOutput() {\n return String.format(\"DCode: %-7.0f \\\"%-9s\\\" \\t - %5.3fmm x %5.3fmm - \\t Area: %6.3fmm² \\t Area Ratio: %5.2f \\t Transfer Effeciency: %2.1f \\t Number of apertures: %-5.0f\"\n , (double) dCode\n , shape\n , x\n , y\n , getArea()\n , getAreaRatio()\n , getTransferEffeciency()\n , (double) numbOfApertures);\n }", "public String toString(){\r\n\t\t// Print P(English), P(Spanish) and P(Japanese), as well as the \r\n\t\t// conditional probabilitiesP(c| English), P(c | Spanish), \r\n\t\t// and P(c | Japanese) for all 27 characters c\r\n\t\t/* PRIOR */\r\n\t\tString returnString = String.format(\r\n\t\t\t\t\"P(English) = %s\\n\" +\r\n\t\t\t\t\"P(Spanish) = %s\\n\" +\r\n\t\t\t\t\"P(Japanese) = %s\\n\" +\r\n\t\t\t\t\"\\n\",\r\n\t\t\t\tFloat.toString(p_english), \r\n\t\t\t\tFloat.toString(p_spanish), \r\n\t\t\t\tFloat.toString(p_japanese) \r\n\t\t\t\t);\r\n\t\t\r\n\t\t/* ENGLISH CONDITIONAL */\r\n\t\treturnString += \r\n\t\t\t\tfillToStringConditional(englishConditional, \"English\");\r\n\t\t/* SPANISH CONDITIONAL */\r\n\t\treturnString += \r\n\t\t\t\tfillToStringConditional(spanishConditional, \"Spanish\");\r\n\t\t/* JAPANESE CONDITIONAL */\r\n\t\treturnString += \r\n\t\t\t\tfillToStringConditional(japaneseConditional, \"Japanese\");\r\n\t\t\r\n\t\treturn returnString;\r\n\t}", "public static String matrixToString(float[][] m) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i=0; i<m.length; i++) {\n\t\t\tfor (int j=0; j<m[i].length; j++) {\n\t\t\t\tsb.append(m[i][j]);\n\t\t\t\tif (j<m[i].length-1)\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t}\n\t\t\tif (i<m.length-1)\n\t\t\t\tsb.append(\"\\n\");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", tiles[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", tiles[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString()\n\t{\n\t\tString output;\n\t\tif (value == null)\n\t\t\toutput = \"Null\";\n\t\telse\n\t\t\toutput = value.toString() + frequency;\n\t\tif (isLeaf())\n\t\t\treturn output;\n\t\t//don't need to check cases if only right or left is null\n\t\t//don't need to print out frequency\n\t\telse\n\t\t\treturn output + \"(\" + left.toString() + \",\" + right.toString() + \")\";\n\t}", "@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint sqRt = (int)Math.sqrt(dimension);\n\t\tString line = \"\";\n\t\tint lineLength = (sqRt + 1) + (sqRt) * (sqRt + sqRt + 1);\n\t\tfor(int i = 0; i < lineLength; i++) {\n\t\t\tline += \"-\";\n\t\t}\n\t\tsb.append(line + \"\\n\");\t\n\t\tfor(int i = 1; i <= dimension; i++) {\n\t\t\tfor(int j = 1; j <= dimension; j++) {\n\t\t\t\tif(j == 1) {\n\t\t\t\t\tsb.append(\"| \");\n\t\t\t\t}\n\t\t\t\tsb.append(puzzle[i - 1][j - 1]);\n\t\t\t\tsb.append(\" \");\n\t\t\t\tif(j % sqRt == 0) \n\t\t\t\t\tsb.append(\"| \");\n\t\t\t}\n\t\t\tsb.append(\"\\n\");\n\t\t\tif(i % sqRt == 0) \n\t\t\t\tsb.append(line + \"\\n\");\t\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString()\n\t{\n\t\t\n\t\treturn (\"The grade for quiz 1 is: \" + this.quiz1 + \" the grade for quiz 2 is: \"+ this.quiz2 + \" the grade for quiz 3 is: \" + this.quiz3 + \" the grade for the midterm is: \" + this.midtermExam + \" the grade for the final is: \" + this.finalExam);\n\t}", "@Override\n public String toString() {\n int numeritosY = 0;\n int numeritosX = 0;\n StringBuilder datos = new StringBuilder(\" \");\n\n //Imprime los numeros de arriba\n for (int x = 0; x < casillas.length; x++) {\n datos.append(\" \").append(numeritosX);\n numeritosX++;\n }\n datos.append(\"\\n \");\n //Imprime la primera linea que corresponde con la parte superior del tablero.\n for (int x = 0; x < casillas.length; x++) {\n datos.append(\"\\033[33m\"+\"+----\"+\"\\033[0m\");\n }\n datos.append(\"\\033[33m\"+\"+\"+\"\\033[0m\");\n datos.append(\"\\n\");\n //Imprime el resto del tablero.\n for (int y = 0; y < casillas.length; y++) {\n datos.append(numeritosY).append(\"\\033[33m\"+\" | \"+\"\\033[0m\");\n for (int x = 0; x < casillas[y].length; x++) {\n datos.append(casillas[y][x].toString());\n }\n datos.append(\"\\n\");\n datos.append(\" \");\n for (int i = 0; i < casillas[y].length; i++) {\n datos.append(\"\\033[33m\"+\"+----\"+\"\\033[0m\");\n }\n datos.append(\"\\033[33m\"+\"+\"+\"\\033[0m\");\n datos.append(\"\\n\");\n numeritosY++;\n }\n return datos.toString();\n }", "public String toString() {\n\t\treturn String.format(\"%d / %d : %d\", systolic, diastolic, heartRate);\n\t}", "public String toString() \r\n\t{\r\n\t\treturn value + \" \" + rank + \" of \" + suit;\r\n\t}", "@Override\n public String toString() {\n\n StringBuilder sb = new StringBuilder();\n sb.append(String.format(\"Max: %.1f°C, Min: %.1f°C, Avg: %.1f°C\", getMax(), getMin(), getAvg()));\n sb.append(System.lineSeparator());\n for (Map.Entry<Integer, Double> entry : values.entrySet()) {\n sb.append(localDate.toString());\n sb.append(\" \");\n sb.append(entry.getKey());\n sb.append(\":00\");\n sb.append(\" \");\n sb.append(String.format(\"%.1f°C\", entry.getValue()));\n sb.append(System.lineSeparator());\n }\n\n return sb.toString();\n }", "public String toString () {\n String toPrint = \"\";\n for (int i = 0; i < myCoefficients.size(); ++i) {\n if (i == 0) {\n toPrint += (myCoefficients.get(i) + \" + \");\n }\n else if (i == myCoefficients.size() - 1) {\n toPrint += (myCoefficients.get(i) + \"x^\" + i);\n }\n\n else {\n toPrint += (myCoefficients.get(i) + \"x^\" + i + \" + \");\n }\n }\n toPrint += \"\\n\";\n return toPrint;\n }", "public String toString() {\n\t\tString str = \"\\n \";\n\t\tfor (int i = 1; i <= board.length; i++) {\n\t\t\tstr += i + \" \";\n\t\t}\n\t\tstr = str.stripTrailing() + \"\\n\";\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tstr += (i+1) + \" \";\n\t\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\t\tif (board[i][j] == Disc.WHITE) {\n\t\t\t\t\tstr += \"W \";\n\t\t\t\t} else if (board[i][j] == Disc.BLACK) {\n\t\t\t\t\tstr += \"B \";\n\t\t\t\t} else {\n\t\t\t\t\tstr += \"- \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tstr = str.stripTrailing() + \"\\n\";\n\t\t}\n\t\treturn str;\n\t}", "public String toString()\r\n\t{\r\n\t\tcheckInitialization();\r\n\t\treturn equationString + \" = \" + getResult();\r\n\t}", "public String toString() {\n\t\tString temp = \"\";\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttemp += String.format(\"%d \", i);\n\t\t}\n\t\ttemp += \"\\n\";\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\ttemp += String.format(\"%d | \", i + 1);\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\ttemp += String.format(\"%c | \", board[i][j]);\n\t\t\t}\n\t\t\ttemp += \"\\n\";\n\t\t}\n\t\treturn temp;\n\t}", "public String toString()\n {\n return getRankString() + \" of \" + getSuitString();\n }", "@Override\n\tpublic String toString() {\n StringBuffer buf = new StringBuffer();\n\n// for (int i = 0; i < units.size(); i++) {\n// buf.append(\"\\nUnit \" + i + \": \" + units.get(i));\n// }\n\n buf.append(\"Connected components: \" );\n List<List<Node>> components = GraphUtils.connectedComponents(graph);\n\n for (int i = 0; i < components.size(); i++) {\n buf.append(\"\\n\" + i + \": \");\n buf.append(components.get(i));\n }\n\n buf.append(\"\\nGraph = \" );\n buf.append(graph);\n\n return buf.toString();\n }", "public String toString(){\n\t\treturn \"The r is: \" + r + \"\\nThe theta is: \" + theta;\n\t}" ]
[ "0.67901164", "0.6589365", "0.64140576", "0.63461417", "0.62704736", "0.6267152", "0.62253517", "0.622425", "0.62216765", "0.62045914", "0.6200665", "0.61752486", "0.6155632", "0.6130803", "0.6124163", "0.61188626", "0.6101693", "0.60954213", "0.60583395", "0.6037588", "0.6029615", "0.6022643", "0.59800476", "0.59713", "0.59430486", "0.5911378", "0.58943284", "0.58915555", "0.5888715", "0.58865166", "0.5881242", "0.588078", "0.58805805", "0.58785206", "0.585806", "0.58392054", "0.5827851", "0.58046204", "0.58007103", "0.57966244", "0.5790483", "0.57547796", "0.57471585", "0.574361", "0.57392013", "0.57224745", "0.5712213", "0.5707389", "0.5705696", "0.57022226", "0.5683742", "0.5680686", "0.5667668", "0.5667229", "0.56665564", "0.566306", "0.5657227", "0.5656191", "0.5646598", "0.5635344", "0.5629725", "0.5625806", "0.5620281", "0.5619347", "0.5618028", "0.56138647", "0.5604914", "0.559422", "0.55927974", "0.55879694", "0.5587951", "0.5582182", "0.5579292", "0.5577423", "0.5564391", "0.55500335", "0.554349", "0.5537628", "0.55336386", "0.55317074", "0.55314016", "0.5524472", "0.5524066", "0.55230933", "0.5520291", "0.5520291", "0.5514111", "0.55131793", "0.5504966", "0.5500667", "0.5479845", "0.54711026", "0.5470131", "0.5465517", "0.5462993", "0.54606634", "0.54554576", "0.5449136", "0.54461634", "0.5442962" ]
0.6906035
0
Get all the ficheroBytes.
@Override @Transactional(readOnly = true) public List<FicheroByteDTO> findAll() { log.debug("Request to get all FicheroBytes"); return ficheroByteRepository.findAll().stream() .map(ficheroByteMapper::toDto) .collect(Collectors.toCollection(LinkedList::new)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] getBytes() throws IOException {\r\n return mFile.getBytes();\r\n }", "public byte[] getFileBytes(){\n\t\treturn fileBytes;\n\t}", "byte[] getBytes();", "byte[] getBytes();", "public byte[] bytes() throws IOException {\n try(FileInputStream fis = new FileInputStream(file)) {\n return ByteStreams.toByteArray(fis);\n }\n }", "List<Byte> getAsBytes();", "default byte[] getBytes() throws IOException {\n try (InputStream is = getInputStream()) {\n return IOUtils.toByteArray(is);\n }\n }", "public byte[] getAllBytes() {\n return nativeGetAllBytes(__nativePtr);\n }", "public abstract byte[] getBytes(String path) throws IOException, ClassNotFoundException;", "public byte[] getBytes() {\n return baos.toByteArray();\n }", "public byte[] file2byte() {\n\t\tbyte[] result = null;\n\t\t\n\t\tif (this.isFile()) {\n\t\t\tBufferedInputStream bufferedInputStream = null;\n\t\t\tByteArrayOutputStream byteArrayOutputStream = null;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tbufferedInputStream = new BufferedInputStream(new FileInputStream(this));\n\t\t\t\tbyteArrayOutputStream = new ByteArrayOutputStream(1024);\n\n\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\tint size = 0;\n\t\t\t\twhile ((size = bufferedInputStream.read(buffer)) != -1) {\n\t\t\t\t\tbyteArrayOutputStream.write(buffer, 0, size);\n\t\t\t\t}\n\t\t\t\tbufferedInputStream.close();\n\n\t\t\t\tresult = byteArrayOutputStream.toByteArray();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bufferedInputStream != null) bufferedInputStream.close();\n\t\t\t\t\tif (byteArrayOutputStream != null) byteArrayOutputStream.close();\n\t\t\t\t} catch (Exception exception) {\n\t\t\t\t\tbufferedInputStream = null;\n\t\t\t\t\tbyteArrayOutputStream = null;\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public byte[] getBytes() {\r\n return bytes;\r\n }", "public byte[] getBytes() {\n return bytes;\n }", "public byte[] getBytes()\n {\n return bytes;\n }", "public byte[] getBytes() {\n return bytes;\n }", "public byte[] getBytes() {\n return bytes;\n }", "public byte[] getFileBytes(MessageObject messageObject) {\n\t\tMessageObject msgObject = winnowMessage(messageObject);\n\t\tif (messageObject.isUseTransform()) {\n\t\t\tdetransformMessageObject(messageObject);\n\t\t}\n\t\tbyte[] res = new byte[0];\n\t\tfor (MessagePart msgPart : msgObject.getMessageParts()) {\n\t\t\tres = concatByteArrays(res, msgPart.getMsg());\n\t\t}\n\t\treturn res;\n\t}", "public byte[] getBytes() {\n\t\treturn bytes;\n\t}", "public byte[] getBytes()\n\t{\n\t\treturn bytes;\n\t}", "public byte[] getBytes() {\r\n\t\treturn mByteList;\r\n\t}", "public byte[] getBytes() {\r\n return mBytes;\r\n }", "static byte[] getFileAsByteArray(String filename) {\n\n byte[] fileDisk = new byte[DISK_SIZE];\n\n try {\n byte[] array = Files.readAllBytes(new File(filename).toPath());\n return array;\n } catch (Exception e) {\n System.out.println(\"error\");\n System.exit(0);\n }\n\n return fileDisk;\n }", "byte[] getByteContent() throws IOException;", "public byte[] getBytes() {\n return mBytes;\n }", "public byte[] getContents() throws VlException\n {\n long len = getLength();\n // 2 GB files cannot be read into memory !\n\n // zero size optimization ! \n\n if (len==0) \n {\n return new byte[0]; // empty buffer ! \n }\n\n if (len > ((long) VRS.MAX_CONTENTS_READ_SIZE))\n throw (new ResourceToBigException(\n \"Cannot read complete contents of a file greater then:\"\n + VRS.MAX_CONTENTS_READ_SIZE));\n\n int intLen = (int) len;\n return getContents(intLen);\n\n }", "public byte[] getBytes() {\r\n\r\n if (bytes == null) {\r\n bytes = new byte[getLength()];\r\n }\r\n\r\n return bytes;\r\n }", "public static byte[] readAllBytes(String filename) {\n return readAllBytes(filename, true);\n }", "public static byte[] readBytesFromFile(File f) {\r\n byte[] bytes = null;\r\n try {\r\n int filesize = (int) f.length();\r\n bytes = new byte[filesize];\r\n DataInputStream in = new DataInputStream(new FileInputStream(f));\r\n in.readFully(bytes);\r\n in.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error reading byte[] from file: \"\r\n + e.getMessage());\r\n return null;\r\n }\r\n return bytes;\r\n }", "public static byte[] getBytesFromFile(File file) throws IOException {\r\n\r\n InputStream is = new FileInputStream(file);\r\n\r\n // Get the size of the file\r\n long length = file.length();\r\n\r\n /*\r\n * You cannot create an array using a long type. It needs to be an int\r\n * type. Before converting to an int type, check to ensure that file is\r\n * not loarger than Integer.MAX_VALUE;\r\n */\r\n if (length > Integer.MAX_VALUE) {\r\n System.out.println(\"File is too large to process\");\r\n return null;\r\n }\r\n\r\n // Create the byte array to hold the data\r\n byte[] bytes = new byte[(int) length];\r\n\r\n // Read in the bytes\r\n int offset = 0;\r\n int numRead = 0;\r\n while ((offset < bytes.length) &&\r\n ((numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)) {\r\n\r\n offset += numRead;\r\n\r\n }\r\n\r\n // Ensure all the bytes have been read in\r\n if (offset < bytes.length) {\r\n throw new IOException(\"Could not completely read file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n return bytes;\r\n\r\n }", "public byte[] getFilecontent() {\n return filecontent;\n }", "byte[] readBytes(File f) throws Exception {\n\n byte[] b_total = new byte[actualSize];\n int step = actualSize / N;\n\n byte[] b = new byte[step];\n ByteBuffer bb = ByteBuffer.allocate(step);\n\n for (int i = 0; i < N; ++i) {\n \n // READ NEXT PORTION OF BYTES VIA FIS:\n\n fis.read(b);\n System.arraycopy(b, 0, b_total, i * step, b.length);\n\n ++i;\n \n if (i < N) {\n\n bb.clear(); // needed to prepare ByteBuffer for channel read / put operations \n\n // READ NEXT PORTION OF BYTES VIA CHANNEL:\n\n inChannel.read(bb);\n byte[] arr = bb.array();\n System.arraycopy(arr, 0, b_total, i * step, arr.length);\n }\n }\n\n return b_total;\n }", "public static byte[] getBytesFromFile(File file) throws IOException {\n\t\tlong length = file.length();\r\n\r\n\t\t// You cannot create an array using a long type.\r\n\t\t// It needs to be an int type.\r\n\t\t// Before converting to an int type, check\r\n\t\t// to ensure that file is not larger than Integer.MAX_VALUE.\r\n\t\tif (length > Integer.MAX_VALUE) {\r\n\t\t\t// File is too large\r\n\t\t\tthrow new IOException(\"File is too large!\");\r\n\t\t}\r\n\r\n\t\t// Create the byte array to hold the data\r\n\t\tbyte[] bytes = new byte[(int)length];\r\n\r\n\t\t// Read in the bytes\r\n\t\tint offset = 0;\r\n\t\tint numRead = 0;\r\n\r\n\t\tInputStream is = new FileInputStream(file);\r\n\t\ttry {\r\n\t\t\twhile (offset < bytes.length\r\n\t\t\t\t\t&& (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {\r\n\t\t\t\toffset += numRead;\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\r\n\t\t// Ensure all the bytes have been read in\r\n\t\tif (offset < bytes.length) {\r\n\t\t\tthrow new IOException(\"Could not completely read file \"+file.getName());\r\n\t\t}\r\n\t\treturn bytes;\r\n\t}", "byte[] readBytes();", "public static byte[] getBytesFromFile(File file) {\r\n byte[] bytes;\r\n try (InputStream is = new FileInputStream(file)) {\r\n long length = file.length();\r\n if (length > Integer.MAX_VALUE) {\r\n LOG.log(Level.SEVERE, \"File {0} is too large\", file.getName());\r\n bytes = new byte[0];\r\n return bytes;\r\n }\r\n bytes = new byte[(int) length];\r\n int offset = 0;\r\n int numRead = 0;\r\n while (offset < bytes.length\r\n && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) {\r\n offset += numRead;\r\n }\r\n if (offset < bytes.length) {\r\n LOG.log(Level.SEVERE, \"Could not completely read file {0}\", file.getName());\r\n bytes = new byte[0];\r\n return bytes;\r\n }\r\n }\r\n catch (IOException ioex) {\r\n LOG.log(Level.SEVERE, \"{0} {1}\", new Object[]{ioex.getMessage(), file.getName()});\r\n bytes = new byte[0];\r\n return bytes;\r\n }\r\n\r\n return bytes;\r\n }", "public byte[] getbyteArray() {\n byte[] output = new byte[header_size+fileData.length];\n output[0] = (byte)((type & 0xff00)>> 8);\n output[1] = (byte)(type & 0xff);\n output[2] = (byte)((length & 0xff00)>> 8);\n\t output[3] = (byte)(length & 0xff);\n output[4] = (byte)((clientID & 0xff00)>> 8);\n output[5] = (byte)(clientID & 0xff);\n output[6] = action;\n byte[] temp2 = ByteBuffer.allocate(4).putInt(sectionLength).array();\n for(int i=0;i<4;i++) {\n output[7+i] = temp2[i]; \n }\n temp2 = ByteBuffer.allocate(4).putInt(filePosition).array();\n for(int j=0;j<4;j++) {\n output[11+j] = temp2[j]; \n }\n //copy file data\n System.arraycopy(fileData, 0,output, 15,fileData.length); \n return output;\n }", "private static byte[] getFileBytes(String filePath) {\n try {\n return Files.readAllBytes(Paths.get(filePath));\n } catch (IOException e) {\n throw new RuntimeException(\"I/O exception reading contents of file \" + filePath, e);\n }\n }", "public byte[] getFileContent() throws IOException {\n if (data != null) {\n return data;\n }\n if (tempFile != null) {\n return FileUtil.readBytes(tempFile);\n }\n return null;\n }", "@Override\r\n\tpublic byte[] getBytes() {\n\t\treturn buffer.array();\r\n\t}", "public byte[] getBytes()\r\n {\r\n return buf;\r\n }", "public static byte[] readBytes(File file) throws IOException {\n InputStream is = null;\n try {\n is = new FileInputStream(file);\n byte[] result = new byte[(int) file.length()];\n is.read(result);\n return result;\n } finally {\n close(is);\n }\n }", "public static byte[] readBytes(File file) throws IOException {\n FileInputStream is = new FileInputStream(file);\n byte[] bytes = new byte[(int) file.length()];\n int read = is.read(bytes);\n for (int totalRead = read; read > 0; ) {\n read = is.read(bytes, totalRead, bytes.length - totalRead);\n }\n is.close();\n return bytes;\n }", "public static byte[] getBytesFromFile(File file) throws IOException {\n InputStream is = new FileInputStream(file);\n\n // Get the size of the file\n long length = file.length();\n\n // You cannot create an array using a long type.\n // It needs to be an int type.\n // Before converting to an int type, check\n // to ensure that file is not larger than Integer.MAX_VALUE.\n if (length > Integer.MAX_VALUE) {\n // File is too large\n }\n\n // Create the byte array to hold the data\n byte[] bytes = new byte[(int)length];\n\n // Read in the bytes\n int offset = 0;\n int numRead = 0;\n while (offset < bytes.length\n && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {\n offset += numRead;\n }\n\n // Ensure all the bytes have been read in\n if (offset < bytes.length) {\n throw new IOException(\"Could not completely read file \"+file.getName());\n }\n\n // Close the input stream and return bytes\n is.close();\n return bytes;\n }", "private static byte[] getFileAsByte(String pathFile) {\n\t\tFile file = new File(pathFile);\n\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(file);\n\t\t\tbyte fileContent[] = new byte[(int) file.length()];\n\t\t\tfin.read(fileContent);\n\t\t\tfin.close();\n\n\t\t\treturn fileContent;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tLOGGER.error(\"File not found: \" + e);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Exception while reading the file: \" + e);\n\t\t}\n\t\treturn null;\n\t}", "private byte[] getStreamArquivo(File arquivo) throws IOException\n\t{\n\t\t/* Define o tamanho do buffer a ser lido do arquivo (max 32kb),\n\t\t * faz a criacao de um buffer em memoria para ir armazenando os dados\n\t\t * lidos e entao apos a leitura faz o envio dos dados para o GPP\n\t\t */\n\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\tFileInputStream fileInput = new FileInputStream(arquivo);\n\t\tByteArrayOutputStream bufferArquivo = new ByteArrayOutputStream();\n\n\t\tbyte[] data = new byte[sizeBuffer];\n\t\tint count=0;\n\t\twhile ( (count = fileInput.read(data)) != -1 )\n\t\t\tbufferArquivo.write(data,0,count);\n\t\t\n\t\treturn bufferArquivo.toByteArray();\n\t}", "public byte[] getBytes() {\n\treturn null;\n }", "public static byte[] readBytes(String file) throws IOException\n {\n try(InputStream in = getInputStream(file))\n {\n byte[] buffer = new byte[512];\n int size = 0;\n int read;\n while((read = in.read(buffer, size, buffer.length - size)) > 0)\n {\n size += read;\n if(size == buffer.length)\n buffer = Arrays.copyOf(buffer, size * 2);\n }\n\n if(size < buffer.length)\n buffer = Arrays.copyOf(buffer, size);\n\n return buffer;\n }\n }", "public byte[] getFile() {\n return file;\n }", "@Column(name = \"FILE_CONTENT\" )\n @Lob\n public Byte[] getFileContent() {\n return fileContent;\n }", "com.google.protobuf.ByteString getDiskBytes();", "@Override\n public ArrayList<byte[]> getFotografias(String id) throws SQLException {\n ArrayList<byte[]> resultado = new ArrayList<byte[]>();\n resultado = (ArrayList<byte[]>) bdPropiedad.getFotografias(id);\n return resultado;\n }", "public byte[] getBytes() {\r\n \treturn toString().getBytes();\r\n }", "@Nullable\n public byte[] getFileByteArray(String path) {\n\n try {\n return FileUtils.readFileToByteArray(getFile(path));\n } catch (Exception e) {\n //Eliten.getLogger().warning(\"File not found with path \" + path);\n }\n\n return null;\n }", "public static byte[] bytesFromFile(File file) throws Exception {\n if (!file.exists()) {\n return null;\n }\n FileImageInputStream in = null;\n try {\n byte bytes[] = new byte[(int) file.length()];\n in = new FileImageInputStream(file);\n in.read(bytes);\n return bytes;\n } finally {\n if (in != null) {\n in.close();\n }\n }\n }", "public byte[] getReportFile(){\n \tbyte[] result = new byte[this.reportFile.length];\n System.arraycopy(this.reportFile, 0, result, 0, this.reportFile.length);\n return result;\n }", "private String getFileContents ()\n {\n final String s = m_buffers.values ()//\n .stream ()//\n .flatMap (List::stream)//\n .collect (Collectors.joining ());\n\n return s;\n }", "public static byte[] leerFichero(String nombreFichero) throws FileNotFoundException, IOException {\n\t\tFile file = new File(new File(\"C:\\\\\"), nombreFichero);\n\t\tint fileLength = (int) file.length();\n\t\t\n\t\tFileInputStream fileIn = null;\n\t\tbyte[] contenido = new byte[fileLength];\n\t\t\n\t\ttry {\n\t\t\tfileIn = new FileInputStream(file);\n\t\t\tfileIn.read(contenido);\n\t\t}\n\t\tfinally {\n\t\t\tif (fileIn != null) \n\t\t\t\tfileIn.close();\n\t\t}\n\t\treturn contenido;\n\t}", "public byte[] GetBytes() {\n return data;\n }", "public byte[] readBytes() {\n try {\n int len = available();\n if (len > 0) {\n byte bytes[] = new byte[len];\n m_DataInputStream.read(bytes);\n\n return bytes;\n }\n else {\n return new byte[0];\n }\n }\n catch (IOException e) {\n return new byte[0];\n }\n }", "public byte[] getBytes(String remotePath) throws Exception {\r\n\r\n if (cf.checkExists().forPath(remotePath) == null)\r\n return null;\r\n\r\n byte[] data = cf.getData().forPath(remotePath);\r\n if(data==null)\r\n return null;\r\n else\r\n return data;\r\n }", "public byte[] getBytesFromFile(String imagePath) throws IOException {\n File file = new File(imagePath);\n return Files.readAllBytes(file.toPath());\n }", "public static byte[] convertir(String ruta) {\n\t\tFile file = new File(ruta);\n\t\tbyte[] a = new byte[(int) file.length()];\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tfis.read(a);\n\t\t\tfis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}", "public int getBytes() {\n\t return mBytes;\n\t}", "public ByteBuffer getFileData() {\n\t\treturn fileData;\n\t}", "@Override\n public byte[] getBytes() {\n int len = 0;\n List<byte[]> chunks = new ArrayList<>();\n for (RvtAoiMetadataKey tag : getTags()) {\n chunks.add(new byte[] {(byte) tag.getIdentifier()});\n len += 1;\n IRvtPoiAoiMetadataValue value = getField(tag);\n byte[] bytes = value.getBytes();\n byte[] lengthBytes = BerEncoder.encode(bytes.length);\n chunks.add(lengthBytes);\n len += lengthBytes.length;\n chunks.add(bytes);\n len += bytes.length;\n }\n return ArrayUtils.arrayFromChunks(chunks, len);\n }", "private static String readAllBytesJava7(String filePath) {\n String content = \"\";\n\n try {\n content = new String(Files.readAllBytes(Paths.get(filePath)));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return content;\n }", "private void getArquivo()\n {\n /*** Obtem o conteudo do pacote através do diretorio ***/\n File file = new File(caminho_origem);\n if (file.isFile())\n {\n try\n {\n /*** Lê o pacote e põe em um array de bytes ***/\n DataInputStream diStream = new DataInputStream(new FileInputStream(file));\n long len = (int) file.length();\n if (len > Utils.tamanho_maximo_arquivo)\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_muito_grande);\n System.exit(0);\n }\n Float numero_pacotes_ = ((float)len / Utils.tamanho_util_pacote);\n int numero_pacotes = numero_pacotes_.intValue();\n int ultimo_pacote = (int) len - (Utils.tamanho_util_pacote * numero_pacotes);\n int read = 0;\n /***\n 1500\n fileBytes[1500]\n p[512]\n p[512]\n p[476]len - (512 * numero_pacotes.intValue())\n ***/\n byte[] fileBytes = new byte[(int)len];\n while (read < fileBytes.length)\n {\n fileBytes[read] = diStream.readByte();\n read++;\n }\n int i = 0;\n int pacotes_feitos = 0;\n while ( pacotes_feitos < numero_pacotes)\n {\n byte[] mini_pacote = new byte[Utils.tamanho_util_pacote];\n for (int k = 0; k < Utils.tamanho_util_pacote; k++)\n {\n mini_pacote[k] = fileBytes[i];\n i++;\n }\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(mini_pacote);\n this.pacotes.add(pacote_);\n pacotes_feitos++;\n }\n byte[] ultimo_mini_pacote = new byte[ultimo_pacote];\n int ultimo_indice = ultimo_mini_pacote.length;\n for (int j = 0; j < ultimo_mini_pacote.length; j++)\n {\n ultimo_mini_pacote[j] = fileBytes[i];\n i++;\n }\n byte[] ultimo_mini_pacote2 = new byte[512];\n System.arraycopy(ultimo_mini_pacote, 0, ultimo_mini_pacote2, 0, ultimo_mini_pacote.length);\n for(int h = ultimo_indice; h < 512; h++ ) ultimo_mini_pacote2[h] = \" \".getBytes()[0];\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(ultimo_mini_pacote2);\n this.pacotes.add(pacote_);\n this.janela = new HashMap<>();\n for (int iterator = 0; iterator < this.pacotes.size(); iterator++) janela.put(iterator, new Estado());\n } catch (Exception e)\n {\n System.out.println(Utils.prefixo_cliente + Utils.erro_na_leitura);\n System.exit(0);\n }\n } else\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_inexistente);\n System.exit(0);\n }\n }", "public byte[] readBytes() throws IOException {\n int length = in.readInt();\n byte[] bytes = new byte[length];\n in.readFully(bytes);\n return bytes;\n }", "public byte[] fileToBlob() throws IOException {\n long numBlocks = 0L;\n int blockSize = 0x10000;\n int leftOver = 0;\n int pos = 0;\n OutputStream stream;\n numBlocks = BigInteger.valueOf(m_size).divide(BigInteger.valueOf(blockSize)).longValue();\n leftOver = BigInteger.valueOf(m_size).mod(BigInteger.valueOf(blockSize)).intValue();\n byte[] binByte2 = new byte[m_size];\n System.arraycopy(m_parent.m_binArray, m_startData, binByte2, 0, m_size);\n return binByte2;\n }", "private byte[] leeFicheroCompleto(String path) throws WebRequestException {\n\t\tFileInputStream file;\n\t\tbyte[] b;\n\t\ttry {\n\t\t\tfile = new FileInputStream(\"htdocs\" + path);\n\n\t\t\tDataInputStream in = new DataInputStream(file);\n\n\t\t\tb = new byte[in.available()];\n\t\t\tin.readFully(b);\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new WebRequestException(\n\t\t\t\t\tWebRequestException.CODE_ERROR_NOT_FOUND,\n\t\t\t\t\tWebRequestException.MESSAGE_ERROR_NOT_FOUND);\n\t\t} catch (IOException e) {\n\t\t\tthrow new WebRequestException(\n\t\t\t\t\tWebRequestException.CODE_ERROR_INTERNAL_SERVER_ERROR,\n\t\t\t\t\tWebRequestException.MESSAGE_ERROR_INTERNAL_SERVER_ERROR);\n\t\t}\n\n\t\treturn b;\n\t}", "private byte[] getContent(File f) {\n byte[] content = null;\n\n try {\n FileInputStream fis = new FileInputStream(f);\n byte[] temp = new byte[fis.available()];\n fis.read(temp);\n fis.close();\n content = temp;\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n\n return content;\n }", "@Override\n public GitFile[] getFiles()\n {\n if(_files==null) try { _files = getFilesImpl(); } catch(Exception e) { throw new RuntimeException(e); }\n return _files;\n }", "public static byte[] To_Byte_Array (String filename) throws java.security.NoSuchAlgorithmException {\n byte[] data = null;\n // MessageDigest hash = MessageDigest.getInstance(\"SHA-512\");//SHA2 //removed\n\n //Streams, in:\n File textFile;//Textdatei\n FileInputStream in;//Dateieingabe-Stream\n\n try {\n\n textFile = new File(filename);\n in = new FileInputStream(textFile);\n int size = (int)textFile.length(); // Dateilaenge\n int read = 0; // Anzahl der gelesenen Zeichen\n data = new byte[size]; // Lesepuffer\n // Auslesen der Datei\n while (read < size)\n read =+ in.read(data, read, size-read);\n in.close();\n // Schreiben des Lesepuffers in Instanz von MessageDigest und speichern des Hash-Werts in message\n //hash.update (data);//removed\n //message=hash.digest ();//removed\n\n\n }//try\n catch (IOException ex) {\n ex.printStackTrace();\n }\n return data;//added\n }", "public byte[] getBytes(@NonNull final String key) {\n return getBytes(key, null);\n }", "public List<Byte> getByteList(final String key) {\n return getByteList(key, new ArrayList<>());\n }", "public static byte[] readAll(String filename) {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(filename);\n\t\t\treturn readAll(fis);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new WrappedException(e);\n\t\t}\n\t}", "public byte[] getBytes()\n {\n try { return getRepo().newObjectReader().open(_entry.getObjectId()).getBytes(); }\n catch(Exception e) { throw new RuntimeException(e); }\n }", "public byte[] readBytes(int len) throws IOException {\n if (len > 1024) {\n throw new RuntimeException(String.format(\"Attempted to read %d bytes at once, file is probably corrupted.\", len));\n }\n byte[] buf = new byte[len];\n int n = 0;\n while (n < len) {\n int count = inputStream.read(buf, n, len - n);\n if (count < 0) {\n throw new EOFException();\n }\n n += count;\n }\n return buf;\n }", "public byte[] getByteData() { return bytedata; }", "public com.google.protobuf.ByteString\n getGetBytes() {\n return instance.getGetBytes();\n }", "public static byte[] convertir(File file) {\n\t\tbyte[] a = new byte[(int) file.length()];\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tfis.read(a);\n\t\t\tfis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}", "private List<String> getDataFromApi() throws IOException {\n // Get a list of up to 10 files.\n List<String> fileInfo = new ArrayList<String>();\n FileList result = mService.files().list()\n .setMaxResults(10)\n .execute();\n List<File> files = result.getItems();\n if (files != null) {\n for (File file : files) {\n fileInfo.add(String.format(\"%s (%s)\\n\",\n file.getTitle(), file.getId()));\n }\n }\n return fileInfo;\n }", "private void getExtractWithFiles(){\n\t\ttry{\n\t\t\t\n\t\t\tFileInputStream fStream = new FileInputStream(tfile);\n\t\t\tfileBytes = new byte[(int)tfile.length()];\n\t\t\t\n\t\t\tfStream.read(fileBytes, 0, fileBytes.length);\n\t\t\tfileSize = fileBytes.length;\n\t\t}catch(Exception ex){\n\t\t\tSystem.err.println(\"File Packet \"+ex.getMessage());\n\t\t}\n\t}", "public List<File> findAll() {\n\t\treturn files;\n\t}", "public byte[] toByteArray() throws IOException\n {\n try (InputStream is = createInputStream())\n {\n return is.readAllBytes();\n }\n }", "com.google.protobuf.ByteString\n getFilePathBytes();", "public static byte [] convertirFoto(String ruta){\n byte[] icono;\n try {\n File rut=new File(ruta);\n icono = new byte[(int)rut.length()];\n InputStream input = new FileInputStream(ruta);\n input.read(icono);\n } catch (Exception ex) {\n return null;\n }\n return icono;\n }", "public byte[] getByteArray() throws IOException {\n ByteArrayOutputStream dados = new ByteArrayOutputStream();\n DataOutputStream saida = new DataOutputStream(dados);\n\n saida.writeInt(idProduto);\n saida.writeUTF(nomePro);\n saida.writeUTF(descricao);\n saida.writeFloat(preco);\n return dados.toByteArray();\n }", "public static byte[] readBytes(String resource) {\n TByteList \t\tresult;\n InputStream \tin;\n byte[]\t\tbuffer;\n int \t\tread;\n\n result = new TByteArrayList();\n in = null;\n buffer = new byte[4096];\n\n try {\n in = Content.class.getClassLoader().getResourceAsStream(resource);\n while ((read = in.read(buffer)) > 0)\n\tresult.add(buffer, 0, read);\n }\n catch (Exception e) {\n LOGGER.log(Level.SEVERE, \"Failed to read bytes from resource file: \" + resource, e);\n return null;\n }\n finally {\n IOUtils.closeQuietly(in);\n }\n\n return result.toArray();\n }", "private static byte[] m136428a(File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[((int) file.length())];\n int i = 0;\n while (i < bArr.length) {\n int read = fileInputStream.read(bArr, i, bArr.length - i);\n if (read < 0) {\n break;\n }\n i += read;\n }\n if (i >= bArr.length) {\n fileInputStream.close();\n return bArr;\n }\n StringBuilder sb = new StringBuilder(\"Could not completely read file \");\n sb.append(file.getName());\n throw new IOException(sb.toString());\n }", "public byte[] readBytes() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn null;\n\n\t\tsynchronized (buffer) {\n\t\t\tint length = bufferLast - bufferIndex;\n\t\t\tbyte outgoing[] = new byte[length];\n\t\t\tSystem.arraycopy(buffer, bufferIndex, outgoing, 0, length);\n\n\t\t\tbufferIndex = 0; // rewind\n\t\t\tbufferLast = 0;\n\t\t\treturn outgoing;\n\t\t}\n\t}", "@Override\n @Transactional(readOnly = true)\n public List<FileDTO> findAll() {\n log.debug(\"Request to get all Files\");\n return fileRepository.findAll().stream().map(FileMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public byte[] getFoto() {\n\t\treturn foto;\n\t}", "@Override\n\tpublic byte[] get()\n\t{\n\t\tif (isInMemory())\n\t\t{\n\t\t\tif (cachedContent == null)\n\t\t\t{\n\t\t\t\tcachedContent = dfos.getData();\n\t\t\t}\n\t\t\treturn cachedContent;\n\t\t}\n\n\t\tFile file = dfos.getFile();\n\n\t\ttry\n\t\t{\n\t\t\treturn Files.readBytes(file);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tlog.debug(\"failed to read content of file: \" + file.getAbsolutePath(), e);\n\t\t\treturn null;\n\t\t}\n\t}", "static public byte[] getBytes(InputStream stream) throws IOException {\n if (stream instanceof BytesGetter) {\n BytesGetter buffer = (BytesGetter) stream;\n return buffer.getBytes();\n } else {\n try (InputStreamToByteArray in = new InputStreamToByteArray(stream)) {\n return in.getBytes();\n }\n }\n }", "public byte[] getContents(int len) throws VlException\n {\n byte buffer[] = new byte[len];\n\n // Warning: reading more then max int bytes\n // is impossible, but a file can be greater then that !\n // TODO: Check for out-of-memory etc ...\n\n int ret = read(0, buffer,0,len); \n\n if (ret != len)\n throw new VlIOException(\n \"Couldn't read requested number of bytes (read,requested)=\"\n + ret + \",\" + len);\n\n return buffer;\n }", "byte[] getEByteArray();", "public byte[] toBytes() {\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n writeTo(os);\n } catch (IOException e) {e.printStackTrace();}\n return os.toByteArray();\n }", "public final byte[] bytes() throws IOException {\n long contentLength = contentLength();\n if (contentLength <= 2147483647L) {\n C3580e source = source();\n try {\n byte[] G = source.mo19680G();\n C3500c.m11649a((Closeable) source);\n if (contentLength == -1 || contentLength == ((long) G.length)) {\n return G;\n }\n throw new IOException(\"Content-Length (\" + contentLength + \") and stream length (\" + G.length + \") disagree\");\n } catch (Throwable th) {\n C3500c.m11649a((Closeable) source);\n throw th;\n }\n } else {\n throw new IOException(\"Cannot buffer entire body for content length: \" + contentLength);\n }\n }", "public byte[] toByteArray() {\n\t\treturn baos.toByteArray();\n\t}", "private static String readAllBytes(Reader rd) throws IOException {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tstringBuilder.append((char) cp);\n\t\t}\n\t\treturn stringBuilder.toString();\n\t}" ]
[ "0.73408073", "0.720702", "0.70119077", "0.70119077", "0.6931279", "0.6744772", "0.6680454", "0.6669241", "0.6636174", "0.6555359", "0.65371716", "0.65254354", "0.65056026", "0.6493155", "0.64875627", "0.6475867", "0.645474", "0.6436135", "0.64346945", "0.6423194", "0.6400096", "0.63717437", "0.63678795", "0.63592535", "0.62955856", "0.6289216", "0.6282013", "0.62763685", "0.62465525", "0.62270266", "0.6199825", "0.6179309", "0.6159879", "0.6158814", "0.61539185", "0.61343575", "0.61310095", "0.61181015", "0.6092411", "0.60807425", "0.6073841", "0.60719967", "0.60574144", "0.6053012", "0.6029884", "0.5995856", "0.5985369", "0.5922914", "0.5913251", "0.58890224", "0.58852935", "0.5875926", "0.586736", "0.5843659", "0.5826471", "0.5793724", "0.57904506", "0.5786849", "0.57793474", "0.5775366", "0.57751495", "0.57635903", "0.5745581", "0.57448906", "0.57444686", "0.5742031", "0.57386154", "0.5737466", "0.5721591", "0.5714255", "0.57062775", "0.56886446", "0.5680965", "0.5674601", "0.56550133", "0.5627585", "0.562477", "0.56035715", "0.55959713", "0.55899924", "0.55778563", "0.5574997", "0.5573305", "0.55680937", "0.55669916", "0.55616945", "0.5555585", "0.5554795", "0.5545844", "0.5543966", "0.55373687", "0.55317414", "0.5527744", "0.5526146", "0.55215657", "0.5516008", "0.5514563", "0.5507377", "0.55012405", "0.54973906" ]
0.6839644
5
Get one ficheroByte by id.
@Override @Transactional(readOnly = true) public Optional<FicheroByteDTO> findOne(Long id) { log.debug("Request to get FicheroByte : {}", id); return ficheroByteRepository.findById(id) .map(ficheroByteMapper::toDto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File findOne(String id) {\n\t\treturn fileDAO.selectOneById(id);\n\t}", "@Override\n\tpublic File getById(long id) {\n\t\treturn getSession().find(File.class, id);\n\t}", "public ExtFileObjectCom getExtFileObj(Long id)\r\n \t{ \r\n \t\tlogger.debug(\"Retrieving binary file with ID = \" + id);\r\n \t\t\r\n \t\tExtFileObjectDAO extFileDao = externalFileMgrDao.getExtFileObj(id);\r\n \t\t\r\n \t\tString branch = extFileDao.getBranch();\r\n \t\tString filename = extFileDao.getFileName();\r\n \t\tString path= this.externalDataFolder + \"/\"+ branch + \"/\"+ filename;\r\n \t\tlogger.debug(\"Binary file: ID = \" + id + \"; branch = \" + branch + \"; filename = \" + filename + \"; path = \" + path);\r\n \t\t\t\t\r\n \t\t//ExtFileObjectCom extFileCom= new ExtFileObjectImpl();\r\n \t\t//extFileCom.setFile(new File(fileSrc));\r\n \t\tExtFileObjectCom extFileCom= new ExtFileObjectImpl(extFileDao, new File(path));\r\n \t\treturn extFileCom; \r\n \t}", "public AnnisBinary getBinary(Long id)\r\n \t{\r\n \t\tlogger.debug(\"Looking for binary file with id = \" + id);\r\n \t\t\r\n \t\ttry\r\n \t\t{\r\n \t\t\tExtFileObjectCom extFile= this.getExtFileObj(id);\r\n \t\t\tAnnisBinary aBin= new AnnisBinaryImpl(); \r\n \t\t\t\r\n \t\t\t//Bytes setzen\r\n \t\t\tFile file = extFile.getFile();\r\n \t\t\tlong length = file.length();\r\n \t\t\tFileInputStream fis = new FileInputStream(file);\r\n \t\t\tbyte[] bytes = new byte[(int)length];\r\n \t\t int offset = 0;\r\n \t\t int numRead = 0;\r\n \t\t while (offset < bytes.length\r\n \t\t && (numRead=fis.read(bytes, offset, bytes.length-offset)) >= 0) \r\n \t\t {\r\n \t\t \toffset += numRead;\r\n \t\t }\r\n \t\r\n \t\t \r\n \t\t // Ensure all the bytes have been read in\r\n \t\t if (offset < bytes.length) {\r\n \t\t \tthrow new IOException(\"Could not completely read file \"+file.getName());\r\n \t\t }\r\n \t\t\tfis.close();\r\n \t\t\taBin.setBytes(bytes);\r\n \t\t\taBin.setId(extFile.getID());\r\n \t\t\taBin.setFileName(extFile.getFileName());\r\n \t\t\taBin.setMimeType(extFile.getMime());\r\n \t\t\t\r\n \t\t\treturn(aBin);\r\n \t\t}\r\n \t\tcatch (Exception e)\r\n \t\t{\r\n \t\t\tlogger.error(\"Could not read binary file\", e);\r\n \t\t\tthrow new ExternalFileMgrException(e);\r\n \t\t}\r\n \t}", "@Override\n @Transactional(readOnly = true)\n public FileDTO findOne(String id) {\n log.debug(\"Request to get File : {}\", id);\n File file = fileRepository.findOne(id);\n return FileMapper.toDto(file);\n }", "@GetMapping(\"/{id}\")\r\n public ResponseEntity<byte[]> getFile(@PathVariable Long id) {\r\n Optional<FileModel> fileOptional = fileRepository.findById(id);\r\n\r\n if (fileOptional.isPresent()) {\r\n FileModel file = fileOptional.get();\r\n return ResponseEntity.ok()\r\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + file.getName() + \"\\\"\")\r\n .body(file.getAudiofile());\r\n }\r\n\r\n return ResponseEntity.status(404).body(null);\r\n }", "public GridFSDBFile find(ObjectId id) {\n\treturn findOne(id);\n }", "public Fichier getFichier(int id) throws SQLException {\n\t\tString query = SQLQueries.GET_FICHIER_QUERY + id;\n\t\tResultSet rs = null;\n\t\tFichier fichier = null;\n\t\ttry {\n\t\t\tconnection = Connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(query);\n\t\t\tif (rs.next()) {\n\t\t\t\tfichier = new Fichier();\n\t\t\t\tfichier.setNom_fichier(rs.getString(\"nom_fichier\"));\n\t\t\t\tfichier.setDate_fichier(rs.getDate(\"date_fichier\"));\n\t\t\t\tfichier.setCommentaire(rs.getString(\"commentaire\"));\n\t\t\t\tfichier.setId_matiere(rs.getInt(\"id_matiere\"));\n\t\t\t\tfichier.setFichier(rs.getBytes(\"fichier\"));\n\t\t\t}\n\t\t} finally {\n\t\t\tif (statement != null)\n\t\t\t\tstatement.close();\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\t\t\tconnection.close();\n\t\t}\n\t\treturn fichier;\n\t}", "byte[] get(byte[] id) throws RemoteException;", "public File getResource(Integer id) {\n Cours cours = courRepo.findById(id.longValue()).orElseThrow(()-> new RuntimeException(\"this cours does not exist \"));\n if(cours.getVideo() == null)\n throw new RuntimeException(\"this video does not exist\");\n String filePath= cours.getVideo().getUrlFile();\n File f = new File(filePath);\n return f;\n }", "public int getFileFromID(int id) {\n for(int i = 0 ; i < files.size(); i++) {\n if(files.get(i).getFileID() == id)\n return i;\n }\n return -1;\n }", "public GridFSDBFile findOne(ObjectId id) {\n\treturn findOne(new BasicDBObject(\"_id\", id));\n }", "public FileManagerFile getFile(int id) throws Exception {\n\n if (files == null) { // defer loading files list until requested.\n cacheFoldersFiles();\n }\n for (FileManagerFile file : files) {\n if (file.getId() == id) {\n return file;\n }\n }\n return null;\n }", "@Override\n\tpublic FileModel getId(Long id) {\n\t\treturn fm.getOne(id);\n\t}", "@RequestMapping(value=\"/files/{id}\", method = RequestMethod.GET) \n\tpublic File getFileById(@PathVariable(\"id\") final int id, HttpServletResponse response) throws InvalidInputException{\n\t\tFile temp = fileService.getFileById(id);\n\t\tif(temp==null) {\n\t\t\tthrow new InvalidInputException(id);\n\t\t}\n\t\treturn temp;\n\t}", "@Override\n\tpublic HumanFileDig findHumanFileDigById(short id) {\n\t\treturn humanFileDigMapper.selectHumanFileDigById(id);\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete FicheroByte : {}\", id);\n ficheroByteRepository.deleteById(id);\n }", "AttachmentDTO findOne(Long id);", "public Optional<VirtualFile> getAnyFileById(String id) {\n Stream<VirtualFile> files = Stream.concat(Stream.concat(public_files.stream(), resource_files.stream()), Stream.concat(solution_files.stream(), private_files.stream()));\n return files.filter(file -> file.getId().equals(id)).findFirst();\n }", "public byte [] getMedicalByteFile(Long medicalDocId) {\n\t\treturn medicalByteFileRepository.findByMedicalDocumentId(medicalDocId).get().getFile();\n\t}", "public Drive find(int id){\n\t\treturn em.find(entities.Drive.class, id);\n\t}", "@PostAuthorize(\"hasPermission(returnObject, 'read') or hasPermission(returnObject, 'administration') \")\n public File findById(long id) {\n Optional<File> file = fileRepository.findById(id);\n return file.orElse(null);\n }", "@Override\n public Download findById(long downloadId) {\n Optional<Download> opDownload = this.downloadRepository.findById(downloadId);\n return opDownload.orElse(null);\n }", "public FileItem findFileItemById(String id) {\n\n\t\tif (!filesMap.containsKey(id)) {\n\t\t\treturn null;\n\t\t}\n\t\tMap<String, String> uploadedFileInfo = filesMap.get(id);\n\t\tlogger.trace(\"uploadfileInfo id\"\n\t\t\t\t+ uploadedFileInfo.get(UPLOADED_FILE_ORIG_FILE_SIZE));\n\t\tFile file = new File(uploadedFileInfo.get(UPLOADED_FILE_PATH));\n\n\t\tif (!file.exists()) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tInputStream inputStream = new FileInputStream(file);\n\t\t\treturn new FileItem(id,\n\t\t\t\t\tuploadedFileInfo.get(UPLOADED_FILE_ORIG_FILE_NAME),\n\t\t\t\t\tuploadedFileInfo.get(UPLOADED_FILE_CONTENT_TYPE),\n\t\t\t\t\tinputStream, uploadedFileInfo.get(UPLOADED_FILE_FILE_NAME),\n\t\t\t\t\tLong.parseLong(uploadedFileInfo\n\t\t\t\t\t\t\t.get(UPLOADED_FILE_ORIG_FILE_SIZE)),\n\t\t\t\t\tuploadedFileInfo.get(UPLOADED_FILE_PATH));\n\t\t} catch (FileNotFoundException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public byte getByte(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? (byte)((Long)value).intValue() : 0);\n }", "public ProjectFiles selectByPrimaryKey(Long id) {\r\n ProjectFiles key = new ProjectFiles();\r\n key.setId(id);\r\n ProjectFiles record = (ProjectFiles) getSqlMapClientTemplate().queryForObject(\"project_files.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }", "public UploadedFileResponse getFileByFileId(String idFile) {\r\n\t\t\treturn this.uploadedFileResponseDAO.getFileByFileId( idFile);\r\n\t\t}", "@Override\n\tpublic TBasUnitClass findOne(String id) {\n\t\treturn tBasUnitClassRepository.findOne(id);\n\t}", "@Override\n\tpublic DvdCd getById(Integer id) {\n\t\tlogger.info(\"Buscando DVD/CD por ID \"+id);\n\t\tOptional<DvdCd> obj = itemRepository.findById(id);\n\t\tif (!obj.isPresent()) {\n\t\t\tlogger.error(\"DvdCd nao encontrado, \"+DvdCdServiceImpl.class);\n\t\t\tthrow new ObjectNotFoundException(\"DvdCd nao encontrado, id: \"+id);\n\t\t}\n\t\t\n\t\treturn obj.get();\n\t}", "T read(int id);", "T read(int id);", "@PostAuthorize(\"hasPermission(returnObject, 'READ')\")\n public File returnFileIfTheyCanRead(long id) {\n Optional<File> optionalFile = fileRepository.findById(id);\n return optionalFile.orElse(null);\n }", "public Byte getByte(final int index) {\n Object returnable = this.get(index);\n if (returnable == null) {\n return null;\n }\n if (returnable instanceof String) {\n /* A String can be used to construct a BigDecimal. */\n returnable = new BigDecimal((String) returnable);\n }\n return ((Number) returnable).byteValue();\n }", "@Nullable\n ReadableByteChannel get(PageId pageId);", "BaacDTO findOne(Long id);", "@Override\n\tpublic UploadDF getById(Long id) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tUploadDF UploadDF = (UploadDF) session.get(UploadDF.class,id);\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn UploadDF;\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}", "public cn.com.ho.workflow.infrastructure.db.tables.pojos.ActHiAttachment fetchOneById_(String value) {\n return fetchOne(ActHiAttachment.ACT_HI_ATTACHMENT.ID_, value);\n }", "@Override\n\tpublic Factura findById(Integer id) {\n\t\treturn facturaRepository.findById(id).orElse(null);\n\t}", "EhrPersonFile selectByPrimaryKey(Long id);", "public byte getByte(String key)\n {\n return getByte(key, (byte) 0);\n }", "public T getByID(int id) {\n\t\treturn this.data.get(id);\n\t}", "@Override\r\n\tpublic Libro read(int id) {\n\t\treturn libroRepository.findById(id).get();\r\n\t}", "@Override\r\n\tpublic CabDto findCabById(int id) throws CabNotFoundException {\r\n\t\tOptional<Cab> cab = cabRepository.findById(id);\r\n\r\n\t\tif (cab.isPresent()) {\r\n\r\n\t\t\treturn Convertor.convertCabEntitytoDTO(cab.get());\r\n\t\t}\r\n\t\tthrow new CabNotFoundException(\"Cab not found with id: \" + id);\r\n\t}", "public ImageFile getImage(int id) {\n if(id < 0)\n return null;\n\n int i = 0;\n int size = imageFiles.size();\n while(id != imageFiles.get(i).getItemID()) {\n i++;\n if(size <= i)\n return null;\n }\n return imageFiles.get(i);\n }", "public FileUpload getFileUploadById(Long id) throws AppException;", "public Asset getAssetById(UUID id) throws IOException {\n try {\n String strBody = null;\n Map<String, String> params = null;\n String correctPath = \"/Assets/{id}\";\n // Hacky path manipulation to support different return types from same endpoint\n String path = \"/Assets/{id}\";\n String type = \"/pdf\";\n if(path.toLowerCase().contains(type.toLowerCase()))\n {\n correctPath = path.replace(\"/pdf\",\"\");\n } \n\n // create a map of path variables\n final Map<String, String> uriVariables = new HashMap<String, String>();\n uriVariables.put(\"id\", id.toString());\n UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath);\n String url = uriBuilder.buildFromMap(uriVariables).toString();\n\n \n String response = this.DATA(url, strBody, params, \"GET\");\n TypeReference<Asset> typeRef = new TypeReference<Asset>() {};\n return apiClient.getObjectMapper().readValue(response, typeRef);\n\n } catch (IOException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage());\n } catch (XeroApiException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage(), e.getResponseCode(),JSONUtils.isJSONValid(e.getMessage()));\n }\n }", "T readOne(int id);", "String get(String id);", "@Transactional(readOnly = true) \n public Tbc_fazenda findOne(Long id) {\n log.debug(\"Request to get Tbc_fazenda : {}\", id);\n Tbc_fazenda tbc_fazenda = tbc_fazendaRepository.findOne(id);\n return tbc_fazenda;\n }", "@Override\n\tpublic BatimentoCardiaco get(long id) {\n\t\treturn null;\n\t}", "Chofer findOne(Long id);", "public Optional<VirtualFile> getPublicOrResourcesFile(String id) {\n Stream<VirtualFile> files = Stream.concat(public_files.stream(), resource_files.stream());\n return files.filter(file -> file.getId().equals(id)).findFirst();\n }", "public byte getId(){\n return id;\n }", "@Override\n\tpublic car getById(int id) {\n\t\ttry{\n\t\t\tcar so=carDataRepository.getById(id);\n\t\t\t\n\t\t\treturn so;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t}", "public OIDataFile getOIDataFile(final String id) {\n return Identifiable.getIdentifiable(id, getOIDataFileList());\n }", "@Transactional(readOnly = true)\n public Optional<TorrentDTO> findOne(Long id) {\n log.debug(\"Request to get Torrent : {}\", id);\n return torrentRepository.findById(id)\n .map(torrentMapper::toDto);\n }", "FileSet selectByPrimaryKey(Integer id);", "ResPartnerBankEntityWithBLOBs selectByPrimaryKey(Integer id);", "public Bank find(Integer id) {\n return em.find(Bank.class, id);\n }", "@GetMapping(\"/download/{id}\")\r\n public ResponseEntity<Resource> downloadFile(@PathVariable(value = \"id\") int fileId) {\n\r\n Files file = filesRepository.findById(fileId)\r\n .orElseThrow(() -> new ResourceNotFoundException(\"File\", \"id\", fileId));\r\n\r\n\r\n Resource resource = fileStorageService.loadFileAsResource(file.getFileName());\r\n\r\n\r\n String contentType = \"application/octet-stream\";\r\n\r\n\r\n return ResponseEntity.ok()\r\n .contentType(MediaType.parseMediaType(contentType))\r\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + resource.getFilename() + \"\\\"\")\r\n .body(resource);\r\n }", "@GetMapping(value = \"/image/id/{id}\", produces={ \"image/jpeg\" })\n public @ResponseBody byte[] getImageById(@PathVariable(name=\"id\") Long id) throws IOException {\n InputStream in = getClass()\n .getResourceAsStream(\"/com/users/info/images/babu.jpg\");\n return IOUtils.toByteArray(in);\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<ChucdanhDTO> findOne(Long id) {\n log.debug(\"Request to get Chucdanh : {}\", id);\n return chucdanhRepository.findById(id)\n .map(chucdanhMapper::toDto);\n }", "AttributeValueFile findAttributeValueFile(Long id);", "@RequestMapping(value = \"/dlFileTypes/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<DlFileType> getDlFileType(@PathVariable Long id) {\n log.debug(\"REST request to get DlFileType : {}\", id);\n return Optional.ofNullable(dlFileTypeRepository.findOne(id))\n .map(dlFileType -> new ResponseEntity<>(\n dlFileType,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "public Byte getByte(String name) {\n Object o = get(name);\n if (o instanceof Number) {\n return ((Number)o).byteValue();\n }\n\n if (o != null) {\n try {\n String string = o.toString();\n if (string != null && string.length() > 0) {\n return Byte.parseByte(string);\n }\n }\n catch (NumberFormatException e) {}\n }\n return null;\n }", "@Override\r\n\tpublic File findByfileID(Long fileID) {\n\t\tOptional<File> optionalFile = fileRepository.findByFileID(fileID);\r\n\t\t\r\n\t\tif(optionalFile.isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\treturn optionalFile.get();\r\n\t}", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "public Promise<byte[]> readFile(ElementaryFileID id) {\n try {\n getFileLock.acquire();\n } catch (InterruptedException e) {\n return Promise.reject(e);\n }\n return this.presentationLayer.selectDF(this.appId).then((res) -> {\n return openApduFile(id).then((file) -> this.resolveApduFile(file));\n });\n }", "@Transactional(readOnly = true) \n public Picture findOne(Long id) {\n log.debug(\"Request to get Picture : {}\", id);\n Picture picture = pictureRepository.findOne(id);\n return picture;\n }", "@Nullable\n ReadableByteChannel get(PageId pageId, int pageOffset);", "public Fournisseur find(long id) {\n\t\tFournisseur fournisseur = (Fournisseur) this.sessionFactory.getCurrentSession().load(Fournisseur.class, id);\r\n\t\tif(null != fournisseur){\r\n\t\t\tthis.sessionFactory.getCurrentSession().find(Fournisseur.class, fournisseur.getCode());\r\n\t\t\t\r\n\t\t}\r\n\t\treturn this.sessionFactory.getCurrentSession().find(Fournisseur.class, fournisseur.getCode());\r\n\t}", "@Override\n\tpublic int getPhoto(int id, String path) throws Exception {\n\t\tif(id<0||id>this.getSize()){\n\t\t\treturn 200;\n\t\t}\n\t\ttry {\n\t\t\tdao.getPhoto(id, path);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\treturn 300;\n\t\t}\n\t\treturn 100;\n\t}", "@Override\r\n\tpublic Food getFoodById(int id) {\n\t\tString sql=\"select * from food where id=?\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class,id);\r\n\t\tif(list.size()>0) {\r\n\t\t\treturn list.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Borne find(long id) {\r\n\t\tBorne borne = new Borne();\r\n\t\t\r\n\t\r\n\t\tStatement st =null;\r\n\t\tResultSet rs =null;\r\n\t\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\tst = this.connect.createStatement();\r\n\t\t\tString sql = \"SELECT * FROM Borne WHERE id=\"+id;\r\n\t\t\trs = st.executeQuery(sql);\r\n\t\t\t\r\n\t\t\tif(rs.first()) {\r\n\t\t\t\tborne = new Borne(rs.getInt(\"id\"),\r\n\t\t\t\t\t\t\t\t DAOzone.find(rs.getInt(\"idZone\")));\r\n\t\t\t}\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn borne;\r\n\t}", "public static PolovniAutomobili read(int id) {\n PolovniAutomobili s = null;\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT * FROM polovni WHERE id = ?\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ps.setInt(1, id);\n ResultSet result = ps.executeQuery();\n if (result.next()) {\n s = new PolovniAutomobili(result.getString(\"imgUrl\"), result.getString(\"naziv\"), result.getInt(\"godiste\"), result.getInt(\"cena\"), result.getString(\"url\"));\n }\n CONNECTION.close();\n }\n } catch (SQLException ex) {\n System.out.println(\"MySql Connection error...\");\n Logger.getLogger(PolovniFunctions.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n return s;\n }", "public File getFileByVersionId(String versionId) {\n\t\t// TODO impl\n\t\treturn null;\n\t}", "@Override\n\tpublic AtiPhoto findById(String id) {\n\t\treturn atiPhotoDao.findOne(id);\n\t}", "public byte toByte() {\n return this.toByteArray()[0];\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected ByteConsumerIF getData(String _id) {\n\t\tif(data instanceof List<?>) {\n\t\t\tfor(ByteConsumerIF b: ((List<ByteConsumerIF>)data)) {\n\t\t\t\tif(b.getId().equals(_id)) return b;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public Optional<DuLieuBaoCaoDTO> findOne(String id) {\n log.debug(\"Request to get DuLieuBaoCao : {}\", id);\n return duLieuBaoCaoRepository.findById(id)\n .map(duLieuBaoCaoMapper::toDto);\n }", "@Override\n @Transactional(readOnly = true)\n public MechanicDTO findOne(Long id) {\n log.debug(\"Request to get Mechanic : {}\", id);\n Mechanic mechanic = mechanicRepository.findOne(id);\n return mechanicMapper.toDto(mechanic);\n }", "public byte getId() {\r\n return id;\r\n }", "@GetMapping(\"/retrive/{fileId}\")\r\n public ResponseEntity<ByteArrayResource> downloadFile(@PathVariable Integer fileId) {\n Optional<Image> image;\r\n image = imgrepo.findById(fileId);\r\n Image ima=null;\r\n if(image.isPresent()) {\r\n ima = image.get();\r\n }\r\n return ResponseEntity.ok()\r\n .contentType(MediaType.parseMediaType(ima.getFileType()))\r\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + ima.getFileName() + \"\\\"\")\r\n .body(new ByteArrayResource(ima.getData()));\r\n\t\r\n\t\r\n }", "public byte getByte(String name) {\n\t\tObject val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Byte value required, but not specified\");\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).byteValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Byte.parseByte((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Byte value required, but found: \" + val);\n\t\t}\n\t}", "@RequestMapping(\"/downloadFile/{id}\")\r\n public Timesheet downloadFile(@PathVariable(\"id\") String id) {\n return ti.getAllId(id);\r\n }", "public Asset getAsset(int id) {\n\t\treturn assetRepo.findById(id).orElse(null);\r\n\t}", "public void setId(byte id){this.id = id;}", "FileStore getFile(String fileRefId);", "@Override\n public FasciaOrariaBean doRetrieveByKey(int id) throws SQLException {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria WHERE id=?\";\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n statement.setInt(1, id);\n System.out.println(\"DoRetrieveByKey\" + statement);\n ResultSet rs = statement.executeQuery();\n if (rs.next()) {\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n return bean;\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return null;\n }", "Optional<Fotografia> findOne(Long id);", "public T get( final int id )\n\t{\n\t\treturn this.dao.findById( id ).get();\n\t}", "public T find(int id) {\n\t \treturn getEntityManager().find(getEntityClass(), id);\n\t }", "public void fetchDriveFile(DriveId id, final ApiClientTask obj) {\n GoogleApiClient client = buildGoogleApiClient();\n\n RetrieveDriveFileContentsAsyncTask callBackAsyncTask\n = new RetrieveDriveFileContentsAsyncTask(client, obj);\n\n callBackAsyncTask.execute(id);\n\n// Drive.DriveApi.fetchDriveId(mGoogleApiClient, id.toString())\n// .setResultCallback(new ResultCallback<DriveApi.DriveIdResult>() {\n// @Override\n// public void onResult(DriveApi.DriveIdResult result) {\n//\n// // Build a separate google client.\n// GoogleApiClient client = buildGoogleApiClient();\n//\n// RetrieveDriveFileContentsAsyncTask callBackAsyncTask = new RetrieveDriveFileContentsAsyncTask(client, obj);\n//\n// callBackAsyncTask.execute(result.getDriveId());\n// }\n// });\n }", "BInformation findOne(Long id);", "@Override\n public Optional<BookmarkDTO> findOne(String id) {\n log.debug(\"Request to get Bookmark : {}\", id);\n return bookmarkRepository.findById(id)\n .map(bookmarkMapper::toDto);\n }", "public Integer getFileid() {\n return fileid;\n }", "public asset getAssetById(int id) {\n return assetRepository.findById(id).get();\n }", "public static item getItemById(int id) {\n try {\n PreparedStatement st = conn.prepareStatement(\"SELECT itemID, ownerID, Name, status, description, category, image1,image2,image3,image4 FROM iteminformation WHERE itemID=?\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n item item = new item(rs.getInt(1), rs.getString(2), rs.getString(3), (rs.getInt(4) == 1) ? true : false, rs.getString(5), rs.getString(6), rs.getBlob(7), rs.getBlob(8), rs.getBlob(9), rs.getBlob(10));\n return item;\n } else {\n return null;\n }\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "@Transactional(readOnly = true)\n public Optional<Fonction> findOne(Long id) {\n log.debug(\"Request to get Fonction : {}\", id);\n return fonctionRepository.findById(id);\n }", "@Override\n\tpublic List<Teatask> getByteaId(int teaid)\n\t{\n\t\treturn teataskMapper.getByteaId(teaid);\n\t}" ]
[ "0.71813893", "0.7163096", "0.68746823", "0.683023", "0.6818729", "0.67898715", "0.6774273", "0.6708272", "0.6704339", "0.65397125", "0.6459356", "0.6389181", "0.6365682", "0.633965", "0.6300388", "0.6192649", "0.6150225", "0.61081964", "0.6104101", "0.60972637", "0.6054857", "0.60540557", "0.6027058", "0.5981302", "0.59686637", "0.5962557", "0.5953155", "0.5949424", "0.594855", "0.59073436", "0.59073436", "0.5906093", "0.58919615", "0.5885297", "0.58814096", "0.58597434", "0.58484083", "0.5843809", "0.58399135", "0.582537", "0.5816804", "0.58136845", "0.5808564", "0.5804223", "0.57986915", "0.5796401", "0.5793097", "0.57911205", "0.5787451", "0.5787113", "0.57813275", "0.5767052", "0.57637167", "0.5761823", "0.5760173", "0.5759723", "0.57533514", "0.5751674", "0.57456166", "0.5726025", "0.57172984", "0.5704027", "0.57038003", "0.56927687", "0.5684144", "0.5670912", "0.5657001", "0.5649006", "0.56347466", "0.5610199", "0.5606696", "0.559704", "0.55875814", "0.5586336", "0.5585219", "0.5585114", "0.5584666", "0.55838054", "0.55788374", "0.5575217", "0.55742246", "0.55655605", "0.55592597", "0.55589247", "0.55587864", "0.55560744", "0.5552836", "0.5546252", "0.5541597", "0.5540741", "0.55392945", "0.5537776", "0.5531599", "0.5527152", "0.55178887", "0.5516263", "0.55147773", "0.55118537", "0.5495419", "0.54895526" ]
0.77353364
0
Delete the ficheroByte by id.
@Override public void delete(Long id) { log.debug("Request to delete FicheroByte : {}", id); ficheroByteRepository.deleteById(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void deleteFileData(Long id) {\n\t\t\r\n\t}", "@Override\n public void delete(String id) {\n log.debug(\"Request to delete File : {}\", id);\n fileRepository.delete(id);\n }", "public void deleteFile(int id) {\n\t\tString sql = \"delete from file where file_id=\"+id;\n\t\tthis.getJdbcTemplate().update(sql);\n\t}", "public static void eliminaFile(long idSezione) {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.parameters = new Object[] { idSezione };\n\t\trp.type = RequestType.DELETE_FILE;\n\t\tsend(rp);\n\t}", "public void deleteFile(long id)\r\n \t{\r\n \t\tif (this.logger!= null) \r\n \t\t\tlogger.debug(\"calling deleteFile(\"+id+\") was called...\");\r\n \t\t\r\n \t\tExtFileObjectDAO extFileDao= externalFileMgrDao.getExtFileObj(id);\r\n \t\tString fileSrc= this.externalDataFolder + \"/\"+ extFileDao.getBranch() + \"/\"+ extFileDao.getFileName();\r\n \t\tFile dFile= new File(fileSrc);\r\n \t\tif (!dFile.delete())\r\n \t\t\tthrow new ExternalFileMgrException(ERR_DELETE + fileSrc);\r\n \t\texternalFileMgrDao.deleteExtFileObj(id);\r\n \t}", "@Override\n\tpublic void delete(String id) throws Exception {\n\n\t}", "@Override\n\tpublic void deleteById(String id) throws Exception {\n\t\t\n\t}", "public int deleteByPrimaryKey(Long id) {\r\n ProjectFiles key = new ProjectFiles();\r\n key.setId(id);\r\n int rows = getSqlMapClientTemplate().delete(\"project_files.ibatorgenerated_deleteByPrimaryKey\", key);\r\n return rows;\r\n }", "public void delete(Integer id) {\n\r\n\t}", "public void delete(int id) {\n\n\t}", "@Override\n\tpublic void delete(Serializable id) {\n\n\t}", "@Override\n\tpublic void delete(Integer id) {\n\t\tString sql = \"DELETE FROM tbl_flashcard WHERE flcard_id = ?\";\n\t\tDelete(sql, id);\n\t\t\n\t}", "public void deleteById(Integer id) {\n\n\t}", "@Override\n\tpublic int delete(Serializable id) {\n\t\treturn 0;\n\t}", "public void delete(int id) throws Exception {\n\n\t}", "@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void delete(int id) {\n\t\t\r\n\t}", "@Override\n\tpublic int deleteById(Integer id) throws Exception {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void deletebyid(Integer id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Serializable id) {\n\t\t\n\t}", "public int deleteAttachment(int id) {\n\t\tString sql = \"DELETE FROM ATTACHMENT WHERE \" + ColumnNames.ATTACHMENTIDENTIFIER + \" = ?\";\n\t\tPreparedStatement ps = prepareCallable(sql);\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\treturn ps.executeUpdate();\n\t\t} catch (SQLException ex) {\n\t\t\tlogger.error(\"Exception in deleteAttachment - Check your SQL params\", ex);\n\t\t\treturn 0;\n\t\t}\n\t}", "public void delete(Integer id);", "public void delete(Integer id);", "public void delete(Integer id);", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "@Override\n\tpublic void deleteById(int id) {\n\t\t\n\t}", "@Override\r\n\tpublic int deleteById(String id) {\n\t\treturn 0;\r\n\t}", "@Delete({ \"delete from csv_file\", \"where id = #{id,jdbcType=INTEGER}\" })\n\tint deleteByPrimaryKey(Integer id);", "@Override\n\tpublic void deleteById(String id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Integer id) {\n\n\t}", "@Override\n\tpublic int deleteById(String id) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int deleteById(int id) {\n\t\treturn wdReceiveCardMapper.deleteById(id);\n\t}", "@Override\n\tpublic void delete(String id) {\n\n\t}", "public void delete(int id);", "@Override\n\tpublic void deleteById(Integer id) {\n\t\t\n\t}", "@Override\n\tpublic void deleteById(Integer id) {\n\t\tfacturaRepository.deleteById(id);\n\t\t\n\t}", "@Override\n\tpublic int delete(Integer id) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void delete(String id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(String id) {\n\t\t\n\t}", "public void delById(Serializable id) ;", "@Override\r\n\tpublic void delete(String id) {\n\r\n\t}", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "@Override\r\n\tpublic void delete(Integer id) {\n\r\n\t}", "void deleteAttachment(int id) throws NotAuthorizedException;", "@Override\n\tpublic int deleteOne(String id) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void delete(Integer id) {\n\t\t\n\t}", "public void deleteById(String id);", "@Override\n public void delete(int id) {\n repr.delete(id);\n }", "@Override\n\tpublic int delete(Object id) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long delete(String id) {\n\t\tdelete(Integer.valueOf(id));\n\t\treturn 0;\n\t}", "@DeleteMapping(\"/band-pruebas/{id}\")\n @Timed\n public ResponseEntity<Void> deleteBandPrueba(@PathVariable Long id) {\n log.debug(\"REST request to delete BandPrueba : {}\", id);\n bandPruebaService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Override\r\n\tpublic Result delete(int id) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic int delete(int id) {\n\t\treturn jdbcTemplate.update(\"call PKG_ESTADO_CIVIL.PR_DEL_ESTADO_CIVIL(?)\", id);\r\n\t}", "void deleteById(Integer id);", "void deleteById(Integer id);", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "void deleteById(final String id);", "@Override\n\tpublic int delete(String id) {\n\t\treturn st.delete(\"couplens.delete\",id);\n\t}", "@Override\n public void delete(int id) {\n }", "@Override\n\tpublic void delete(int id) {\n\t}", "void delete(String id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "@Override\r\n\tpublic int fileDelete(int no) {\n\t\treturn sqlSession.delete(namespace + \"fileDelete\", no);\r\n\t}", "void deleteById(int id);", "void delete( Integer id );", "public void delete(int id){\n assetRepository.deleteById(id);\n }", "public boolean delete(String id);", "public boolean delete(String id);", "@Override\r\n\tpublic void delete(int id) {\n\t\tlibroRepository.deleteById(id);\r\n\t}", "void delete(Integer id);", "void delete(Integer id);", "@DeleteMapping(\"/bebidas/{id}\")\n @Timed\n public ResponseEntity<Void> deleteBebida(@PathVariable Long id) {\n log.debug(\"REST request to delete Bebida : {}\", id);\n bebidaRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Chucdanh : {}\", id);\n chucdanhRepository.deleteById(id);\n }", "public void delete(String idAvion)\n\t{\n\t}", "@Override\r\n\tpublic void del(Integer id) {\n\t\t\r\n\t}", "public int delete( Integer idConge ) ;", "public abstract void deleteByID( int id);", "Integer delete(int id);", "@DeleteMapping(\"/{id}\")\r\n public ResponseEntity<?> delete(@PathVariable(\"id\") long id) {\r\n return fileRepository.findById(id)\r\n \r\n .map(record -> {\r\n System.out.println(\"repo id: \"+record.getId()+\" name: \"+record.getName());\r\n fileRepository.deleteById(id);\r\n return ResponseEntity.ok().build();\r\n }).orElse(ResponseEntity.notFound().build());\r\n\r\n }", "public void deleteById(long id) {\n\t\t\n\t}" ]
[ "0.72251666", "0.7220385", "0.69621366", "0.6664907", "0.6580825", "0.65757066", "0.6575488", "0.6572429", "0.6561723", "0.65563446", "0.65537924", "0.6553306", "0.6544552", "0.653327", "0.65186197", "0.6507675", "0.6505496", "0.64941335", "0.6493764", "0.6492308", "0.6489906", "0.64783937", "0.64783937", "0.64783937", "0.6465134", "0.6465134", "0.6465134", "0.6465134", "0.6465134", "0.6463021", "0.64613223", "0.6458203", "0.64479804", "0.6427388", "0.64255226", "0.6423811", "0.6423691", "0.6420232", "0.64199513", "0.64160866", "0.6404415", "0.6394104", "0.6394104", "0.63917595", "0.6391622", "0.63912857", "0.63912857", "0.63912857", "0.63912857", "0.63912857", "0.63912857", "0.63912857", "0.63912857", "0.63912857", "0.63912857", "0.6387703", "0.63872856", "0.6380514", "0.6378234", "0.6373664", "0.6372808", "0.6370797", "0.636539", "0.6358434", "0.6353872", "0.6350142", "0.6336979", "0.6336979", "0.63336", "0.63336", "0.63336", "0.63336", "0.63330024", "0.63303494", "0.6328787", "0.6328755", "0.63265455", "0.63265455", "0.63265455", "0.63265455", "0.63265455", "0.63265455", "0.63120496", "0.63076425", "0.63072824", "0.6304699", "0.63039553", "0.63039553", "0.6300169", "0.6295691", "0.6295691", "0.6288365", "0.6282128", "0.6274406", "0.6272927", "0.6266237", "0.6261176", "0.62551326", "0.62481976", "0.62429905" ]
0.8508717
0
wsdl:definition is the root hence no parent so return null.
@Override public TWSDLExtensible getParent() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic WebElement getRootElement() {\r\n\t\treturn null;\r\n\t}", "public String getParentElement() {\n return ROOT_NO_ELEMENT_DEFAULT;\n }", "public String getDefinition() {\n\t\treturn null;\n\t}", "private SchemaComponent findOutermostParentElement(){\n SchemaComponent element = null;\n //go up the tree and look for the last instance of <element>\n\tSchemaComponent sc = getParent();\n while(sc != null){\n if(sc instanceof Element){\n element = sc;\n }\n\t sc = sc.getParent();\n }\n return element;\n }", "public String getDefinitionName() {\n return null;\n }", "public Element getRootElement() {\r\n \r\n assert iRootElement!=null;\r\n \r\n return iRootElement;//here you go\r\n \r\n }", "public T getRootElement();", "public abstract Optional<TypeName> parent();", "@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}", "public URL getWSDLDocumentLocation() {\n\t\treturn null;\n\t}", "public XMLBuilder getRoot() {\n\t\treturn xmlBody;\n\t}", "ElementDefinition createElementDefinition();", "public XMLPath getParent() {\r\n return this.parent == null ? null : this.parent.get();\r\n }", "private ExtensibilityElement getExtElementFromDefinition(Definition definition){\n\t\ttry{\n\t\t\tMap<?, ?> serviceMap = definition.getAllServices();\n\t\t Iterator<?> serviceItr = serviceMap.entrySet().iterator();\n\t\t ExtensibilityElement extensibilityElement = null;\n\t\t \n\t\t while(serviceItr.hasNext()){\n\t\t \tMap.Entry<?, ?> svcEntry = (Map.Entry<?, ?>)serviceItr.next();\n\t\t \tService svc = (Service)svcEntry.getValue();\n\t\t \tMap<?, ?> portMap = svc.getPorts();\n\t\t \tIterator<?> portItr = portMap.entrySet().iterator();\n\t\t \t\n\t\t \twhile(portItr.hasNext()){\n\t\t \t\tMap.Entry<?, ?> portEntry = (Map.Entry<?, ?>)portItr.next();\n\t\t \t\tPort port = (Port)portEntry.getValue();\n\t\t \t\textensibilityElement = (ExtensibilityElement)port.getExtensibilityElements().get(0);\n\t\t \t}\n\t\t }\n\t\t return extensibilityElement;\n\t\t}catch(Exception e){\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\treturn null;\n\t\t}\n\t}", "public RMDocument getDocument() { return _parent!=null? _parent.getDocument() : null; }", "@PublicAtsApi\n public String getRootElementXPath() {\n\n return this.root.getUniquePath();\n }", "W getRootElement();", "public String getDefinition() {\n\t\ttry {\n\t\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/definition\").getText();\n\t\t} catch (Throwable t) {\n\t\t}\n\t\treturn \"\";\n\t}", "public DefinitionElements getDefinitionAccess() {\r\n\t\treturn pDefinition;\r\n\t}", "public XMLElement getParent()\n/* */ {\n/* 323 */ return this.parent;\n/* */ }", "public String getRootElement() {\n return rootElement;\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 java.lang.String getRootElement() {\r\n return rootElement;\r\n }", "public XmlDocumentDefinition() {\n }", "@Override\r\n\tpublic Tag getParent() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic XMDefinition getXMDefinition() {return _definition;}", "public String getDefinition(){\n\t\treturn definition;\n\t}", "public Object getRoot() {\n\t\treturn null;\n\t}", "public static synchronized EntityDefImpl getDefinitionObject() {\n if (mDefinitionObject == null) {\n mDefinitionObject = \n (OAEntityDefImpl)EntityDefImpl.findDefObject(\"xxgam.oracle.apps.xbol.tm.catalogue.schema.server.OriDestEO\");\n }\n return mDefinitionObject;\n }", "@Override\r\n\t\tpublic Node getLastChild()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "Rule DefinitionType() {\n // No direct effect on value stack\n return FirstOf(BaseType(), ContainerType());\n }", "public Loop getRoot() {\n\t\tfor (Loop lp : parent.keySet()) {\n\t\t\tif (parent.get(lp)==null) return lp;\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\t\tpublic String getNamespaceURI()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\r\n\tpublic Long getEventParentClass() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Long getEventParentClass() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Object getParent(Object element) {\n\t\treturn null;\r\n\t}", "@Override\n public Node getParentNode() {\n return null;\n }", "public String getRootElement() {\n int index = mRootElementCombo.getSelectionIndex();\n if (index >= 0) {\n return mRootElementCombo.getItem(index);\n }\n return null;\n }", "@Override\r\n\t\tpublic Node getParentNode()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "com.exacttarget.wsdl.partnerapi.DefinitionResponseMsgDocument.DefinitionResponseMsg getDefinitionResponseMsg();", "public Element getDocument() {\n\t\t\n\t\tElement retval = getRoot();\n\t\t\n\t\tList<Element> children;\n\t\t\n\t\tif ( retval.getName().equals(\"ROOT\") && (children = retval.getAllChildren()).size() > 0 )\n\t\t\tretval = children.get(0);\n\t\t\n\t\treturn retval;\n\n\t}", "@Override\n\tpublic EntityDefinition getDefine() {\n\t\treturn null;\n\t}", "@Override\r\n public Element findElement()\r\n {\n return null;\r\n }", "Object getParentNode(Object contextNode) throws UnsupportedAxisException;", "private HtmlElement getRoot()\n\t{\n\t\treturn getBaseRootElement( ROOT_BY );\n\t}", "public DialogueNode getRoot() {\n\t\treturn root;\n\t}", "public String getRoot() {\n\t\treturn null;\n\t}", "private WebElement getTFoot() {\r\n\t\tif (null == this.tfoot) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.tfoot = this.findElement(By.xpath(HtmlTags.TFOOT));\r\n\t\t\t}\r\n\t\t\tcatch (NotFoundException ex) {\r\n\t\t\t\tif (this.logger.isDebugEnabled()) {\r\n\t\t\t\t\tthis.logger.debug(ex.getMessage(), ex);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.tfoot;\r\n\t}", "@Override\r\n\tpublic String getNamespaceURI() {\n\t\treturn null;\r\n\t}", "protected void parseRootElement() {\n\n // This is the Activiti method body for parsing through the XML object model\n // The Joda Engine needs less information than Activiti. That's why some methods are commented out.\n parseProcessDefinitions();\n }", "public Optional<NamespaceId> getParentId() {\n return parentId;\n }", "@Override\n public ClassTree declaration() {\n return null;\n }", "public static synchronized EntityDefImpl getDefinitionObject() {\n if (mDefinitionObject == null) {\n mDefinitionObject = \n (OAEntityDefImpl)EntityDefImpl.findDefObject(\"xxup.oracle.apps.per.publicservice.institutional.schema.server.tr.XxupPerPsInstCountriesTrEO\");\n }\n return mDefinitionObject;\n }", "public boolean isElementDefinition()\n {\n return elementDefinition;\n }", "public boolean isElementDefinition()\n {\n return elementDefinition;\n }", "@Override\r\n\tpublic Long getEventParentId() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Long getEventParentId() {\n\t\treturn null;\r\n\t}", "public java.lang.String getRootElementNS() {\r\n return rootElementNS;\r\n }", "public Integer getRoot(){\n\t\tif(root != null) {\n\t\t\treturn root.element;\n\t\t}\n\t\treturn null;\n\t}", "public org.apache.axis2.context.xsd.ConfigurationContext getRootContext(){\n return localRootContext;\n }", "public UIContainer getDefinitionContainer() {\n\t\treturn uiDefinition;\n\t}", "public T caseDefRoot(DefRoot object) {\r\n\t\treturn null;\r\n\t}", "public static synchronized EntityDefImpl getDefinitionObject()\n {\n if (mDefinitionObject == null)\n {\n mDefinitionObject = (EntityDefImpl)EntityDefImpl.findDefObject(\"es.sysmap.interflex.model.bdc.Sgaexpedbulto\");\n }\n return mDefinitionObject;\n }", "private PlotDefinition getPlotDefinition() {\n if (plotDefId != null) {\n return ocm.getPlotDefinition(plotDefId);\n }\n return null;\n }", "public RMShape getRootShape() { return _parent!=null? _parent.getRootShape() : this; }", "public ObstacleDefinition getDefinition() {\n return this.definition;\n }", "@Override\n\t\tpublic ParentInfo getParentInfo() {\n\t\t\treturn null;\n\t\t}", "public Document getXML() {\n\t\treturn null;\n\t}", "public I_LogicalAddress getRoot() {\n return root;\n }", "QName getBase();", "public RDR_RDR_DEFINITION getDEFINITION() { \r\n return getTyped(\"DEFINITION\", RDR_RDR_DEFINITION.class);\r\n }", "@Override\npublic VirtualContainer getParentContainer() {\n\treturn null;\n}", "public ElementStub getEndOneElement()\n {\n return endOneElement;\n }", "public IDefinitionLocation getLocation()\n\t\tthrows ConnectException, \n\t\t\tUnexpectedReplyException, InvocationError,\n\t\t\tCompilerInstantiationException\n\t{\n\t\treturn null;\n\t}", "@Override\n public ConfigurationNode getParentNode()\n {\n return parent;\n }", "Elem getQualifiedElem();", "public boolean getIsRootElement() {\r\n\t\treturn mIsRootElement;\r\n\t}", "public Resource getParent() {\n return null;\n }", "public abstract String getDefinition();", "RootNode getRootNode();", "private TreeNode getOnlyChild() {\n return templateRoot.getChildren().get(0);\n }", "@Override\n public MElementContainer<MUIElement> getParent()\n {\n return null;\n }", "public QNodeDefinition getRootNodeDefinition() throws RepositoryException;", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "public Object getParent(Object element) {\n\t\treturn null;\r\n\t}", "private static SOAPBodyDef parseSOAPBodyDef(Element wrapper, WSDLDocument parent, SOAPOperationBinding opBdg) {\r\n\t\tElement soapBodyDefElem = wrapper.getChild(\"body\", NS_WSDL_SOAP);\r\n\t\tif(soapBodyDefElem == null) return null;\r\n\r\n\t SOAPBodyDef soapBodyDef = new SOAPBodyDef(parent, opBdg);\r\n\t\tsoapBodyDef.setUse(\"literal\".equalsIgnoreCase(soapBodyDefElem.getAttributeValue(\"use\")) ? SOAPBodyDef.USE_LITERAL : SOAPBodyDef.USE_ENCODED);\r\n\t\tsoapBodyDef.setNamespace(soapBodyDefElem.getAttributeValue(\"namespace\"));\r\n\t\tsoapBodyDef.setEncodingStyle(soapBodyDefElem.getAttributeValue(\"encodingStyle\"));\r\n\r\n\t\treturn soapBodyDef;\r\n\t}", "public String describeRoot();", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "public Object getParent(Object element) {\n\t\treturn null;\n\t}", "private String getSDefFoXML(final ResourceDefinitionCreate resourceDefinition) throws WebserverSystemException {\r\n final Map<String, Object> valueMap = new HashMap<String, Object>();\r\n valueMap.putAll(getBehaviorValues(resourceDefinition));\r\n return ContentModelFoXmlProvider.getInstance().getServiceDefinitionFoXml(valueMap);\r\n }", "public String getParentContainerXPath()\n\t{\n\t\treturn this.parentContainerXPath;\n\t}", "String getDefinition();", "public abstract XMLReader getParent ();", "public WSDLDocument() {\r\n\t\tmessages = new LinkedHashMap();\r\n\t\tportTypes = new LinkedHashMap();\r\n\t\tbindings = new LinkedHashMap();\r\n\t\tservices = new LinkedHashMap();\r\n\t\tadditionalNamespaces = new HashMap();\r\n\t\txsdSchemas = new ArrayList();\r\n\t}", "@Override\r\n public String toString() {\r\n \r\n assert iRootElement!=null;\r\n \r\n return iRootElement.toString();\r\n \r\n }", "public final BeanDefinition getBeanDefinition()\n/* */ {\n/* 53 */ return this.beanDefinition;\n/* */ }", "@Override\r\n public ExceptionHandler<Container> getParent() {\n return null;\r\n }", "@Override\n\tpublic T getRootElements() {\n\t\treturn null;\n\t}", "@Override\r\n\t\tpublic String getBaseURI()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "CoreParentNode coreGetParent();" ]
[ "0.62488776", "0.6195697", "0.61540765", "0.6129125", "0.6057933", "0.5999156", "0.5875636", "0.5779316", "0.57492507", "0.5732465", "0.5727264", "0.56886095", "0.568172", "0.56538177", "0.56220305", "0.5615066", "0.5603867", "0.5555247", "0.55529106", "0.55430543", "0.5539829", "0.5529184", "0.5510648", "0.54967993", "0.5493352", "0.54872435", "0.54831636", "0.5477109", "0.5452575", "0.5452249", "0.5450855", "0.5448738", "0.5428987", "0.54107136", "0.54107136", "0.541031", "0.54011834", "0.53925145", "0.53816783", "0.53796375", "0.5339254", "0.5336413", "0.53307456", "0.53252065", "0.53121734", "0.53115845", "0.53115016", "0.5308806", "0.53066915", "0.53045744", "0.529922", "0.5293141", "0.52911156", "0.5289884", "0.5289884", "0.52762073", "0.52762073", "0.5272559", "0.52585685", "0.5248812", "0.52477443", "0.5237348", "0.52286816", "0.5212245", "0.5197871", "0.5186311", "0.51857156", "0.5172464", "0.51644385", "0.5161969", "0.51533526", "0.5145174", "0.5137512", "0.5133193", "0.5107717", "0.51063836", "0.50995636", "0.50968194", "0.50966424", "0.50944936", "0.5094485", "0.5087708", "0.50871867", "0.50811", "0.50764716", "0.5073103", "0.5067276", "0.50657356", "0.5063915", "0.5062895", "0.5053934", "0.50471264", "0.5043741", "0.50424385", "0.5038129", "0.5030507", "0.5018465", "0.50177044", "0.50170743", "0.5012481" ]
0.5269461
58
keep a reference to the application instance
public void onStart(MainMVPApplication app) { this.application = app; // set the applications main windows (the view) //this.application.setMainWindow((Window) this.view); // load the nav presenter IPresenterFactory pf = application.getPresenterFactory(); this.navPresenter = (WorkspaceNavigationPresenter) pf.createPresenter(WorkspaceNavigationPresenter.class); IWorkspaceNavigationView navView = this.navPresenter.getView(); this.view.setNavigation(navView); IPresenter<?, ? extends EventBus> dbpresenter = pf.createPresenter(DashboardPresenter.class); ((DashboardEventBus)dbpresenter.getEventBus()).launch(application); Component dbView = (Component)dbpresenter.getView(); this.view.setContent(dbView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public App() {\n\t\tLog.d(\"App\", \"App created\");\n\t\tinstance = this;\n\t}", "public static App getInstance() {\n return applicationInstance;\n }", "public static Application getInstance(){\n\t\treturn getInstance (null);\n\t}", "public static void setApplication(ApplicationBase instance)\r\n {\r\n ApplicationBase.instance = instance;\r\n }", "public static AppClient getInstance() {\n return instance;\n }", "protected Application getApplication() {\r\n\t\treturn application;\r\n\t}", "public void setApp(Main application) { this.application = application;}", "Application getApplication();", "public static FoodApplication getInstance() {\n return instance;\n }", "public static ApplicationBase getApplication()\r\n {\r\n if (instance == null)\r\n {\r\n throw new IllegalStateException(\"Micgwaf was not (yet) initialized correctly: no instance of Application is known.\");\r\n }\r\n return instance;\r\n }", "public static synchronized DemoApplication getInstance() {\n return mInstance;\n }", "private SingletonApp( Context context ) {\n mMB = MessageBroker.getInstance( context );\n }", "public static TwitterApplication getInstance() {\n return application;\n }", "public static ExitApplicationUtil getCurrentInstance(){\n if(instance == null){\n instance = new ExitApplicationUtil();\n }\n return instance;\n }", "public static synchronized NewspointsApp getInstance() {\n return mInstance;\n }", "@Override\r\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\r\n\t\tinstance = this;\r\n\t\tAppConfigMrg.load(getApplicationContext());\r\n\t}", "private DiaryApplication getApp() {\n ServletContext application = (ServletContext) context.getMessageContext().get(MessageContext.SERVLET_CONTEXT);\n synchronized (application) {\n DiaryApplication diaryApp = (DiaryApplication) application.getAttribute(\"diaryApp\");\n if (diaryApp == null) {\n try {\n diaryApp = new DiaryApplication();\n diaryApp.setAllPath(application.getRealPath(\"WEB-INF/bookings.xml\"), application.getRealPath(\"WEB-INF/students.xml\"), application.getRealPath(\"WEB-INF/tutors.xml\"));\n application.setAttribute(\"diaryApp\", diaryApp);\n } catch (JAXBException ex) {\n Logger.getLogger(soapService.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(soapService.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return diaryApp;\n }\n }", "public static synchronized AppController getInstance() {\n return mInstance;\n }", "public void setApp(Main application){\n this.application = application;\n }", "private final static Application getInstance(String[] args){\n\t\tif (instance == null){\n\t\t\t//istanziazione lazy\n\t\t\tinstance = new Application(args);\n\t\t\t\n\t\t\t//istanzia la finestra principale dell'interfaccia\n\t\t\tinstance.mainForm = new MainForm(instance);\n\t\t\t\n\t\t\t//registra la finestra principale su Application per le notoifiche\n\t\t\tinstance.addObserver (instance.mainForm);\n\t\t\t\n\t\t\t//prepara il timer per la notifica del progressing dell'avanzamento\n\t\t\tActionListener timerActionPerformer = new ActionListener (){\n\t\t\t\t/**\n\t\t\t\t * Gestisce evento timer.\n\t\t\t\t */\n\t\t\t\tpublic void actionPerformed (ActionEvent ae){\n\t\t\t\t\tinstance.setChanged ();\n\t\t\t\t\t//notifica l'avanzamento\n\t\t\t\t\tinstance.notifyObservers (ObserverCodes.CURRENT_PROGRESS_TIC);\n\t\t\t\t}\n\t\t\t};\n\t\t\tinstance.timer = new javax.swing.Timer (1000, timerActionPerformer);\n\t\t\tinstance.timer.stop();\n\t\t}\n\t\treturn instance; \n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n application = this;\n }", "@Override\n\tpublic void initApplication(BBApplication app) {\n\t\tthis._application = app;\n\t}", "public static Main getInstance() {\r\n return instance;\r\n }", "public Application getApp() {\n\t\treturn app;\n\t}", "public static Main getInstance() {\n return instance;\n }", "public TApplication getApplication() {\n return window.getApplication();\n }", "public static ApplicationContext getInstance()\n\t{\n\t\treturn SingletonHolder.INSTANCE;\n\t}", "public static CZSZApplication_bak getInstance() {\n return theSingletonInstance;\n }", "public AppManager() {\n /** have a parking lot operator */\n ParkingLotOperatorInstance = new ParkingLotOperator();\n OperatorThread = new Thread(ParkingLotOperatorInstance);\n OperatorThread.start();\n ParkingLotOperatorInstance.startParkingLot();\n\n /** graceful shutdown */\n Runtime.getRuntime().addShutdownHook(new ProcessorHook());\n }", "public static UILApplication getInstance() {\n\t\treturn instance;\n\t}", "public MyApp() {\n sContext = this;\n }", "private appR getApp() throws JAXBException, IOException {\n synchronized (application) {\r\n appR App = (appR) application.getAttribute(\"App\");\r\n if (App == null) {\r\n App = new appR();\r\n App.setFilePath(application.getRealPath(\"WEB-INF/Listings.xml\"));\r\n application.setAttribute(\"App\", App);\r\n }\r\n return App;\r\n }\r\n }", "public static void main(String... args) {\n exKeepingAppAliveTwo();\n }", "public void setApplication(AppW app) {\n\t\tthis.app = app;\n\t}", "public static GretellaApp getApplication() {\n return Application.getInstance(GretellaApp.class);\n }", "protected void setApplication (MauiApplication aApplication)\n\t{\n\t\tif (application != aApplication)\n\t\t{\n\t\t\tapplication = aApplication;\n\t\t\tString theApplicationAddress = aApplication.getApplicationAddress ();\n\t\t\tif (!applications.contains (theApplicationAddress))\n\t\t\t{\n\t\t\t\tapplications.put (theApplicationAddress, aApplication);\t// Cache it\n\t\t\t\tnotifySessionListeners (this, aApplication, true);\n\t\t\t}\n\t\t}\n\t}", "public static LoganoApp getApplication() {\n return Application.getInstance(LoganoApp.class);\n }", "public static ApplicationController instance() {\r\n\t\treturn controller;\r\n\t}", "public RestApplication() {\n\t\tsingletons.add(new UtilResource());\n\t\tsingletons.add(new StudentResource());\n\t}", "public CH340Application() {\n sContext = this;\n }", "public static synchronized DataExplorer getInstance() {\r\n\t\tif (DataExplorer.application == null) {\r\n\t\t\tapplication = new DataExplorer();\r\n\t\t}\r\n\t\treturn DataExplorer.application;\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\tinstance = this;\n\t\tregToWX();\n\t}", "public static MainActivity getInstance(){\n\t\treturn instance;\n\t}", "public JawaBotApp_Poh() {\n JawaBotApp_Poh.instance = this; // TODO: make private, use getInstance only.\n //Thread.dumpStack(); /// Where is this constructor called?\n }", "public AppInterface getAppProxy() {\n return (AppInterface) self;\n }", "public MauiApplication getApplication ()\n\t{\n\t\treturn application;\n\t}", "public static OImaging getInstance() {\n return (OImaging) App.getInstance();\n }", "public testDatabaseAppController()\n\t{\n\t\tdataController = new testDatabaseController(this);\n\t\tqueryList = new ArrayList<QueryInfo>();\n\t\tappFrame = new testDatabaseFrame(this);\n\t}", "public BazaarApplicationImpl() {\r\n\t\tsuper();\r\n\r\n\t}", "public AuctionApp() {\r\n runAuctionApp();\r\n }", "private void initInstance() {\n init$Instance(true);\n }", "static RatAppModel getInstance() {return model;}", "public static MainWindow getInstance ()\r\n {\r\n return INSTANCE;\r\n }", "protected void onAfterCreateApplication() {\n\n\t}", "public static Context getContext(){\n return appContext;\n }", "public void setApp(MainFXApplication main) {\n mainApplication = main;\n database = mainApplication.getUsers();\n\n }", "public void setApplication(ClickCounter app) {\r\n theCounter = app;\r\n }", "public Application()\r\n {\r\n pSlot = new ParkingSlot();\r\n cPark = new CarPark();\r\n }", "private OpenSimDB() {\n instance = this;\n }", "public interface MainApplication {\n\n Activity getCurrentActivity();\n\n Application getCurrentApplication();\n\n RxBus getEventBus();\n\n void teardownModule(Modules module);\n}", "public static RCProxy instance(){\n\t\treturn SingletonHolder.INSTANCE;\n\t}", "public void init(IApplication app){\n\t\tthis.iApp = app;\n\t}", "static void setApp(PApplet _app){\n app = _app;\n }", "public static Boot getInstance()\n {\n return instance;\n }", "public MTApplication(){\r\n\t\tsuper();\r\n\t}", "private BookApplication getBookApp() throws JAXBException, IOException, Exception {\n synchronized (application) {\r\n BookApplication bookApp = (BookApplication) application.getAttribute(\"bookApp\");\r\n if (bookApp == null) {\r\n bookApp = new BookApplication();\r\n bookApp.setBookFilePath(application.getRealPath(\"WEB-INF/books.xml\"));\r\n application.setAttribute(\"bookApp\", bookApp);\r\n }\r\n return bookApp;\r\n }\r\n\r\n }", "public String getApplication() {\r\n return application;\r\n }", "public BuilderApplication getApp() {\n\t\treturn app;\n\t}", "public static BlaiseGraphicsTestApp getApplication() {\n return Application.getInstance(BlaiseGraphicsTestApp.class);\n }", "public static Application getApp() {\n if (sApplication != null) return sApplication;\n throw new NullPointerException(\"u should init first\");\n }", "public static Context getAppContext() {\n return _BaseApplication.context;\n }", "public PSFUDApplication()\n {\n loadSnapshot();\n }", "public static RecordUtil sharedInstance() {\n if (sRecordUtil != null) {\n return sRecordUtil;\n } else {\n throw new RuntimeException(\"RecordUtil must be initialized in the Application class before use\");\n }\n }", "public Application getApplication() {\n return (Application)this.getSource();\n }", "public void setApp(PR1 application){\n this.application = application;\n }", "public static Application getApp() {\n if (sApplication != null) {\n return sApplication;\n }\n Application app = getApplicationByReflect();\n init(app);\n return app;\n }", "public static MainActivity instance() {\n Log.d(TAG, \" instance(): called\");\n return inst;\n }", "public static MIDLetParamsApp getApplication() {\n return Application.getInstance(MIDLetParamsApp.class);\n }", "public static final AppMeasurementWrapper getInstance (String referer) {\r\n \t//set the referrer value from receiver to the running instance\r\n \tinstance.referrer = referer;\r\n \treturn instance;\r\n }", "public String getApplication() {\r\n\t\treturn application;\r\n\t}", "public synchronized static JettyEmbeddedAppServer getInstance() {\n if (instance == null) {\n instance = new JettyEmbeddedAppServer();\n }\n return instance;\n }", "public final void bind(App app)\n\t{\n\t\tthis.app = app;\n\t}", "public Application(AppQueue event_q)\r\n {\r\n this.event_q = event_q;\r\n flag = true;\r\n }", "public AppService appService() {\n\t\treturn appService;\n\t}", "public GraphicsAppCore() {\n try {\n if (app == null) {\n app = this;\n drawBuffer = new ArrayList<>();\n } else {\n throw new OnlyOneGraphicsAppAllowedException();\n }\n } catch (OnlyOneGraphicsAppAllowedException e) {\n e.printStackTrace();\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 }", "public static EndlessScrollApplication getInstance(Context context) {\n return (EndlessScrollApplication) context.getApplicationContext();\n }", "public SmartApplication getSmartApplication() {\r\n\t\treturn application;\r\n\t}", "public static ToolRegistery getInstance(){\n\t\treturn InstanceKeeper.instance;\n\t}", "@Provides\n @Singleton\n Application providesApplication() {\n return mApplication;\n }", "public DefaultApplication() {\n\t}", "public Application() {\n\t\tinitComponents();\n\t\tthis.service = new PacienteService();\n\t\tthis.AtualizarTabelaPacientes();\n\t\tthis.sexo = this.rd_nao_informado.getText();\n\t\tthis.cb_estados.setSelectedIndex(24);\n\t}", "public ParkingApp() {\n runApp();\n }", "public static RestaurantManagementApp getApplication() {\n return Application.getInstance(RestaurantManagementApp.class);\n }", "public static FFTApp getApplication() {\n return Application.getInstance(FFTApp.class);\n }", "public static CodeListApplicationService getInstance() {\n\t\tif(instance ==null){\n\t\t\tinstance = new CodeListApplicationServiceImpl();\n\t\t\tSystem.out.println(\"\t\t@ CodeListApplicationServiceImpl에 접근\");\n\t\t}\n\t\treturn instance;\n\t}", "void onStart(@Observes Startup event, ApplicationLifecycle app) {\n\n\t\tif (!newstore)\n\t\t\tapp.markAsRestart();\n\t\t\n\t}", "private SudokuSolverApplication() {\n\t}", "private void createSharedSingletons(Context applicationContext) {\n\t\t// Create Active User\n\t\tActiveUserModel.createInstance(applicationContext);\n\n\t\t// Create Favorites List\n\t\tFavoriteTopicModelList.createInstance(applicationContext);\n\t\tFavoriteCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Read Later list\n\t\tReadLaterTopicModelList.createInstance(applicationContext);\n\t\tReadLaterCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Location Provider\n\t\tLocationProvider.getInstance(applicationContext);\n\t}", "static Application getContext() {\n if (ctx == null)\n // TODO: 2019/6/18\n// throw new RuntimeException(\"please init LogXixi\");\n return null;\n else\n return ctx;\n }", "private AppContext()\n {\n }" ]
[ "0.7683981", "0.7482961", "0.7391914", "0.732582", "0.7117837", "0.70962894", "0.70690274", "0.70456797", "0.6976601", "0.6936326", "0.6906335", "0.68198323", "0.67218393", "0.671733", "0.6682238", "0.66324776", "0.66219336", "0.6583671", "0.65752655", "0.6557837", "0.6550969", "0.64941436", "0.6493928", "0.64852124", "0.64723605", "0.6451404", "0.6445404", "0.64291066", "0.64188915", "0.6383707", "0.63571286", "0.62692016", "0.6265673", "0.6255684", "0.6243569", "0.622184", "0.62037015", "0.61625206", "0.6161008", "0.61424434", "0.61347175", "0.61312276", "0.6131206", "0.61189836", "0.6104204", "0.6101836", "0.6087917", "0.6075548", "0.6075534", "0.60735685", "0.6073528", "0.60611486", "0.60550785", "0.6051477", "0.6046753", "0.60433984", "0.6004094", "0.60038036", "0.5977329", "0.59689593", "0.5965588", "0.5961361", "0.59499365", "0.5949875", "0.5943491", "0.59427166", "0.59413195", "0.5941044", "0.5941013", "0.59409493", "0.5915953", "0.5912867", "0.59098464", "0.5902937", "0.5891015", "0.5887068", "0.58600414", "0.5858059", "0.58552605", "0.5854545", "0.5844675", "0.5839264", "0.5830435", "0.5829585", "0.5828093", "0.5826423", "0.5812171", "0.5806799", "0.5779512", "0.57759094", "0.5772131", "0.57706606", "0.5768325", "0.5765949", "0.5765262", "0.5762392", "0.5759904", "0.5757891", "0.57540345", "0.5751915", "0.5741215" ]
0.0
-1
load the menu presenter
public void onOpenModule(Class<? extends BasePresenter<?, ? extends EventBus>> presenter) { IPresenterFactory pf = application.getPresenterFactory(); this.contentPresenter = pf.createPresenter(presenter); this.view.setContent((Component) this.contentPresenter.getView()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadMenu() {\n theView.getGamePanel().removeAll();\n Menu menu = new Menu(theView);\n menu.revalidate();\n menu.repaint();\n theView.getGamePanel().add(menu);\n menu.requestFocusInWindow();\n theView.setVisible(true);\n }", "public void initMenu(){\n\t}", "public Menu createViewMenu();", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "public void init() {\n\t\tMenu menu = new Menu();\n\t\tmenu.register();\n\n\t\t// Application.getInstance().getGUILog().showMessage(\"Show a popup the proper\n\t\t// way !\");\n\n\t\t// final ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\n\t\t// final MDAction action = new ExampleAction();\n\t\t// Adding action to main menu\n\t\t// manager.addMainMenuConfigurator(new MainMenuConfigurator(action));\n\t\t// Adding action to main toolbar\n\t\t// manager.addMainToolbarConfigurator(new MainToolbarConfigurator(action));\n\n\t\t// pluginDir = getDescriptor().getPluginDirectory().getPath();\n\n\t\t// Creating submenu in the MagicDraw main menu\n\t\t// ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\t\t// manager.addMainMenuConfigurator(new\n\t\t// MainMenuConfigurator(getSubmenuActions()));\n\n\t\t/**\n\t\t * @Todo: load project options (@see myplugin.generator.options.ProjectOptions)\n\t\t * from ProjectOptions.xml and take ejb generator options\n\t\t */\n\n\t\t// for test purpose only:\n\t\t// GeneratorOptions ejbOptions = new GeneratorOptions(\"c:/temp\", \"ejbclass\",\n\t\t// \"templates\", \"{0}.java\", true, \"ejb\");\n\t\t// ProjectOptions.getProjectOptions().getGeneratorOptions().put(\"EJBGenerator\",\n\t\t// ejbOptions);\n\n\t\t// ejbOptions.setTemplateDir(pluginDir + File.separator +\n\t\t// ejbOptions.getTemplateDir()); //apsolutna putanja\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t\t\t\t}", "public void loadMainMenuView()\n\t{\n\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Onitama\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/MainMenu.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tMainMenuViewController viewController = (MainMenuViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\t\t\t\n\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void InitializeUI(){\n\t\t//Set up the menu items, which are differentiated by their IDs\n\t\tArrayList<MenuItem> values = new ArrayList<MenuItem>();\n\t\tMenuItem value = new MenuItem();\n\t\tvalue.setiD(0); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(1); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(2); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(3); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(4); values.add(value);\n\n MenuAdapter adapter = new MenuAdapter(this, R.layout.expandable_list_item3, values);\n \n // Assign adapter to List\n setListAdapter(adapter);\n \n //Set copyright information\n Calendar c = Calendar.getInstance();\n\t\tString year = String.valueOf(c.get(Calendar.YEAR));\n\t\t\n\t\t//Set up the copyright message which links to the author's linkedin page\n TextView lblCopyright = (TextView)findViewById(R.id.lblCopyright);\n lblCopyright.setText(getString(R.string.copyright) + year + \" \");\n \n TextView lblName = (TextView)findViewById(R.id.lblName);\n lblName.setText(Html.fromHtml(\"<a href=\\\"http://uk.linkedin.com/in/lekanbaruwa/\\\">\" + getString(R.string.name) + \"</a>\"));\n lblName.setMovementMethod(LinkMovementMethod.getInstance());\n\t}", "public AbstractMenu(MenuLoader menuLoader) \r\n\t{}", "private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "@Override\n\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t}", "public menuPrincipalView() {\n initComponents();\n }", "private void loadItemList() {\n this.presenter.initialize();\n }", "public void showMenu() {\n menuController.showMenuPanel();\n }", "public void drawLoadMenu(){\n implementation.devDrawLoadMenu();\n }", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }", "private void displayMenu() {\n\t\tint option = MenuView.getMenuOption(\n\t\t\t\"Welcome \" + movieGoer.getName() + \"!\",\n\t\t\t\"View movie showtimes\",\n\t\t\t\"Book a ticket\",\n\t\t\t\"View movie details\",\n\t\t\t\"List top 5 movies\",\n\t\t\t\"View booking history\",\n\t\t\t\"Exit\"\n\t\t);\n\t\t\n\t\tswitch (option) {\n\t\t\tcase 1:\n\t\t\t\tNavigationController.load(new ShowTimeController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tNavigationController.load(new BookingController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tNavigationController.load(new MovieController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tNavigationController.load(new TopMoviesController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tNavigationController.load(new BookingHistoryController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tNavigationController.goBack();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.loader, menu);\n\t\treturn true;\n\t}", "public MenuService() {\n\t\tnew DisplayMenu();\n\t}", "public myView() {\n initComponents();\n CreatMenu();\n }", "IMenu getMainMenu();", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "public menu() {\n initComponents();\n }", "public menu() {\n initComponents();\n }", "@FXML\n private void loadMainMenu() throws IOException {\n Parent parent = FXMLLoader.load(getClass().getResource(MAIN_MENU_FXML));\n Stage mainStage = StageInitializer.parentStage;\n mainStage.getScene().setRoot(parent);\n }", "public ChoosePagePresenter() {\n// mGetKnowledgeHierarchyDataFromNet = new GetKnowledgeHierarchyDataFromNet();\n dataManager = DataManager.getInstance();\n }", "public static void activateMenu() {\n instance.getMenu().show();\n }", "private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n resideMenu.setMenuListener(menuListener);\n resideMenu.setScaleValue(0.6f);\n\n // create menu items;\n itemHome = new ResideMenuItem(this, R.drawable.icon_profile, \"Home\");\n itemSerre = new ResideMenuItem(this, R.drawable.serre, \"GreenHouse\");\n itemControl = new ResideMenuItem(this, R.drawable.ctrl, \"Control\");\n itemTable = new ResideMenuItem(this, R.drawable.database, \"Parametre\");\n\n // itemProfile = new ResideMenuItem(this, R.drawable.user, \"Profile\");\n // itemSettings = new ResideMenuItem(this, R.drawable.stat_n, \"Statistique\");\n itemPicture = new ResideMenuItem(this, R.drawable.cam, \"Picture\");\n itemLog = new ResideMenuItem(this, R.drawable.log, \"Log file \");\n\n itemLogout = new ResideMenuItem(this, R.drawable.logout, \"Logout\");\n\n\n\n itemHome.setOnClickListener(this);\n itemSerre.setOnClickListener(this);\n itemControl.setOnClickListener(this);\n itemTable.setOnClickListener(this);\n\n// itemProfile.setOnClickListener(this);\n // itemSettings.setOnClickListener(this);\n itemLogout.setOnClickListener(this);\n itemPicture.setOnClickListener(this);\n itemLog.setOnClickListener(this);\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSerre, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemControl, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemTable, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemLog, ResideMenu.DIRECTION_LEFT);\n\n\n // resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_RIGHT);\n // resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n resideMenu.addMenuItem(itemPicture, ResideMenu.DIRECTION_RIGHT);\n\n resideMenu.addMenuItem(itemLogout, ResideMenu.DIRECTION_RIGHT);\n\n // You can disable a direction by setting ->\n // resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n findViewById(R.id.title_bar_left_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n }\n });\n findViewById(R.id.title_bar_right_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n }\n });\n }", "IMenuView getMenuView();", "public startingMenu() {\r\n initComponents();\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 }", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "@Override\r\n\tpublic void onModuleLoad() {\n\t\tProposalHistory history=new ProposalHistory();\t\r\n\t\tPresenter presenter=new ProposalHistoryPresenter(history.addProposal(), new ProposalHistoryWidget());\r\n\t\tpresenter.go(RootPanel.get());\r\n\t}", "public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }", "public MenuPrincipal() {\n initComponents();\n \n }", "public Menu() {\n mainMenuScene = createMainMenuScene();\n mainMenu();\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.loading_screen, menu);\n\t\treturn true;\n\t}", "private void LoadComponents() {\n MenuBaseAdapter adapter = new MenuBaseAdapter(this.getActivity(), DataApp.LISTDATA);\n // list.setAdapter(adapter);\n this.event.OnLodCompleteDataResult();\n }", "public void setMenu() {\n\t \n\t\ttop = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t add(top, BorderLayout.CENTER);\n\t \n\t lPro = new JLabel(\"Projects: \");\n\t top.add(lPro);\n\t \n\t cPro = new JComboBox();\n\t getProject();\n\t\ttop.add(cPro);\n\t\t\n\t\tview = new JButton(\"View Sample\");\n\t\ttop.add(view);\n\t\t\n\t\tbottom = new JPanel(new FlowLayout(FlowLayout.CENTER));\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tcancel = new JButton(\"Cancel\");\n\t\tbottom.add(cancel);\n\t\t\n\t\tdownload = new JButton(\"Download\");\n\t\tbottom.add(download);\n\t\t\n\t\tsetActionListener();\t\n\t}", "public void onModuleLoad() { \n\t\tsingleton = this;\n\t\t\n\t\tdockPanel.setWidth(\"100%\");\n\t\tdockPanel.setSpacing(8);\n\t\t\n\t\tmenuBar.setVisible(false);\n\t\tmenuBar.setStyleName(\"menu\");\n\t\t\n\t\tflowPanel.setWidth(\"100%\");\n\t\tflowPanel.add(menuBar);\n\t\t\n\t\tstatusBar.setVisible(false);\n\t\tstatusBar.setStyleName(\"status\");\n\t\t\n\t\tflowPanel.add(statusBar);\n\t\t\n\t\tdockPanel.add(flowPanel,DockPanel.NORTH);\n\t\t\n\t\tloginPanel.setVisible(false);\n\t\tdockPanel.add(loginPanel,DockPanel.WEST);\n\t\t\n\t\tpublisherListPanel.setVisible(false);\n\t\tpublisherListPanel.setWidth(\"100%\");\n\t\tdockPanel.add(publisherListPanel,DockPanel.CENTER);\n\t\t\n\t\tRootPanel.get(\"publisher\").add(dockPanel);\n\t}", "protected abstract P onLoadPresenter(Bundle savedInstanceState);", "private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n\n //resideMenu.setMenuListener(menuListener);\n //scaling activity slide ke menu\n resideMenu.setScaleValue(0.7f);\n\n itemHome = new ResideMenuItem(this, R.drawable.ic_home, \"Home\");\n itemProfile = new ResideMenuItem(this, R.drawable.ic_profile, \"Profile\");\n //itemCalendar = new ResideMenuItem(this, R.drawable.ic_calendar, \"Calendar\");\n itemSchedule = new ResideMenuItem(this, R.drawable.ic_schedule, \"Schedule\");\n //itemExams = new ResideMenuItem(this, R.drawable.ic_exams, \"Exams\");\n //itemSettings = new ResideMenuItem(this, R.drawable.ic_setting, \"Settings\");\n //itemChat = new ResideMenuItem(this, R.drawable.ic_chat, \"Chat\");\n //itemTask = new ResideMenuItem(this, R.drawable.ic_task, \"Task\");\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_LEFT);\n // resideMenu.addMenuItem(itemCalendar, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSchedule, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemExams, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemTask, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemChat, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_LEFT);\n\n // matikan slide ke kanan\n resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n itemHome.setOnClickListener(this);\n itemSchedule.setOnClickListener(this);\n itemProfile.setOnClickListener(this);\n //itemSettings.setOnClickListener(this);\n\n\n }", "private void initialize() {\r\n //this.setVisible(true);\r\n \r\n\t // added pre-set popup menu here\r\n// this.add(getPopupFindMenu());\r\n this.add(getPopupDeleteMenu());\r\n this.add(getPopupPurgeMenu());\r\n\t}", "@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.loading, menu);\n\t\treturn true;\n\t}", "public abstract void displayMenu();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);//Menu Resource, Menu\n return true;\n }", "private void loadHomeclass(){\n // selecting appropriate nav menu item\n selectNavMenu();\n\n // set toolbar title\n setToolbarTitle();\n\n // if user select the current navigation menu again, don't do anything\n // just close the navigation drawer\n if (getClass().getSimpleName()==CURRENT_TAG) {\n\n drawerLayout.closeDrawers();\n\n return;\n }\n\n\n //Closing drawer on item click\n drawerLayout.closeDrawers();\n\n // refresh toolbar menu\n invalidateOptionsMenu();\n }", "protected void setupUI() {\n\t\t\n\t\tcontentPane = new JPanel();\n\t\tlayerLayout = new CardLayout();\n\t\tcontentPane.setLayout(layerLayout);\n\t\tControlAgendaViewPanel agendaViewPanel = new ControlAgendaViewPanel(layerLayout,contentPane);\n\t\tagendaPanelFactory = new AgendaPanelFactory();\n\t\tdayView = agendaPanelFactory.getAgendaView(ActiveView.DAY_VIEW);\n\t\tweekView = agendaPanelFactory.getAgendaView(ActiveView.WEEK_VIEW);\n\t\tmonthView = agendaPanelFactory.getAgendaView(ActiveView.MONTH_VIEW);\n\t\t\n\t\tcontentPane.add(dayView,ActiveView.DAY_VIEW.name());\n\t\tcontentPane.add(weekView,ActiveView.WEEK_VIEW.name());\n\t\tcontentPane.add(monthView,ActiveView.MONTH_VIEW.name());\n\t\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,agendaViewPanel, contentPane);\n\t\tthis.setContentPane(splitPane);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\t//MENU\n\t\tJMenu file, edit, help, view;\n\t\t\n\t\t//ITEM DE MENU\n\t\tJMenuItem load, quit, save;\n\t\tJMenuItem display, about;\n\t\tJMenuItem month, week, day;\n\t\t\n\t\t/* File Menu */\n\t\t/** EX4 : MENU : UTILISER L'AIDE FOURNIE DANS LE TP**/\n\t\t//Classe pour les listener des parties non implémentés\n\t\tclass MsgError implements ActionListener {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t//Menu File\t\n\t\tfile = new JMenu(ApplicationSession.instance().getString(\"file\"));\n\t\t\n\t\tmenuBar.add(file);\n\t\tfile.setMnemonic(KeyEvent.VK_A);\n\t\tfile.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(file);\n\t\t\n\n\t\t//a group of JMenuItems\n\t\tload = new JMenuItem(ApplicationSession.instance().getString(\"load\"),KeyEvent.VK_T);\n\t\tload.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tload.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(load);\n\t\tload.addActionListener(new MsgError());\n\t\t\n\t\tquit = new JMenuItem(ApplicationSession.instance().getString(\"quit\"),KeyEvent.VK_T);\n\t\tquit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tquit.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(quit);\n\t\t\n\t\t//LISTENER QUIT\n\t\tquit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\t//message box yes/no pour le bouton quitter\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsave = new JMenuItem(new String(ApplicationSession.instance().getString(\"save\")),KeyEvent.VK_T);\n\t\tsave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tsave.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(save);\n\t\tsave.addActionListener(new MsgError());\n\t\t\n\t\t\n\t//Menu Edit \n\t\tedit = new JMenu(new String(ApplicationSession.instance().getString(\"edit\")));\n\t\t\n\t\tmenuBar.add(edit);\n\t\tedit.setMnemonic(KeyEvent.VK_A);\n\t\tedit.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\t\n\t\t//Sous menu View\n\t\t\n\t\tview = new JMenu(new String(ApplicationSession.instance().getString(\"view\")));\n\t\tview.setMnemonic(KeyEvent.VK_A);\n\t\tview.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tedit.add(view);\n\t\t\n\t\tmonth = new JMenuItem(new String(ApplicationSession.instance().getString(\"month\")),KeyEvent.VK_T);\n\t\tmonth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmonth.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(month);\n\t\t\t\t\n\t\tweek = new JMenuItem(new String(ApplicationSession.instance().getString(\"week\")),KeyEvent.VK_T);\n\t\tweek.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tweek.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(week);\n\t\t\n\t\tday = new JMenuItem(new String(ApplicationSession.instance().getString(\"day\")),KeyEvent.VK_T);\n\t\tday.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tday.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(day);\n\t\t\n\t\t//LISTENER VIEW\n\t\t\n\t\t\n\t\tmonth.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.last(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tweek.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\tlayerLayout.next(contentPane);\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\tday.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t//Menu Help\n\t\thelp = new JMenu(new String(ApplicationSession.instance().getString(\"help\")));\n\t\t\n\t\tmenuBar.add(help);\n\t\thelp.setMnemonic(KeyEvent.VK_A);\n\t\thelp.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(help);\n\t\t\n\t\tdisplay = new JMenuItem(new String(ApplicationSession.instance().getString(\"display\")),KeyEvent.VK_T);\n\t\tdisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tdisplay.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(display);\n\t\tdisplay.addActionListener(new MsgError());\n\t\t\n\t\tabout = new JMenuItem(new String(ApplicationSession.instance().getString(\"about\")),KeyEvent.VK_T);\n\t\tabout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tabout.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(about);\n\t\tabout.addActionListener(new MsgError());\n\t\t\n\t\t\n\n\t\tthis.setJMenuBar(menuBar);\n\t\tthis.pack();\n\t\tlayerLayout.next(contentPane);\n\t}", "private MenuManager() {\r\n\r\n\t\t\tmenubar = new Menu(shell, SWT.BAR);\r\n\t\t\tshell.setMenuBar(menubar);\r\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n getMenuInflater().inflate(R.menu.diary, menu);\n\n try\n {\n constructUserInterface();\n }\n catch (Exception exp)\n {\n return false;\n }\n return true;\n }", "IMenuFactory getMenuFactory();", "protected abstract void startMvpPresenter();", "public void menu(){\n super.goToMenuScreen();\n }", "public static void loadMainMenu()\n\t{\n\t\tinSubMenu = false;\n\t\t\n\t\tframe.getContentPane().remove(newGamePanel);\n\t\t\n\t\tmainLabel.setVisible(true);\n\t\t\n\t\tframe.getContentPane().add(mainPanel);\n\t\tframe.getContentPane().repaint();\n\t\tframe.setVisible(true);\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "public void gotoMenu() {\n try {\n MenuClienteController menu = (MenuClienteController) replaceSceneContent(\"MenuCliente.fxml\");\n menu.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void onLoadMenuMyPlaylistSelected();", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\n\t\thome = new MenuItem(\"Home Page\");\n\t\thome.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.CREDENTIALS);\n\n\t\t\t}\n\t\t}); \n\n\t\t\n\t\tnewuser = new MenuItem(\"New User\");\n\t\tnewuser.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"Calling New User window\");\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.NEWUSER);\n\t\t\t}\n\t\t}); \n\t\t\n\t\t\n\t\texit = new MenuItem(\"Exit Application\");\n\t\texit.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"quitting\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}); \n\n\t\t\n\t\tMain.getItems().add(home);\n\t\n\t\tMain.getItems().add(newuser);\n\n\t\tMain.getItems().add(exit);\n\t\t\n\n\t\t//---------------------------- Actions Menu Drop down --------------------------------\n\n\t\thistory = new MenuItem(\"View History\");\n\t\thistory.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) { \t\n\t\t\t\t// open the default web browser for the HTML page\n\t\t\t\ttry {\n\t\t\t\t\tURL webURL = new URL(\"http://webdevelopmentdev.azurewebsites.net/\");\n\t\t\t\t\tDesktop.getDesktop().browse(webURL.toURI());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (URISyntaxException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(history);\n\n\t\tbrowser = new MenuItem(\"View Browser\");\n\t\tbrowser.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"Inside the browser\");\n\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.BROWSER);\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(browser);\n\t\tbrowser.setDisable(true);\n\t\t\n\t\tissue = new MenuItem(\"Report Issue\");\n\t\tissue.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.ISSUE);\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(issue);\n\n\t\tStartConnection();\n\t}", "public MenuScene getMenu() { return menu; }", "@Override\n public void onOpened() {\n menu.callOnResumeForUpdate();\n menu.showData();\n isMenuShowing = true;\n }", "public void createmenu(){\n\n\n Context context = getApplicationContext();\n menuadpater = new MenuAdapter(context);\n\n MENULIST.setAdapter(menuadpater);\n\n\n }", "@Override\r\n\tprotected void initializePresenter() {\n\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.menu_principal, menu);\n \t//Fin del menu\n \treturn true;\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // Repartos\n// initializeMainMenu();\n connectMainMenuClickActions();\n \n initFirstMenu();\n }", "private void loadNavHeader() {\n // name, website\n txtName.setText(\"Ashish Jain\");\n txtWebsite.setText(\"[email protected]\");\n\n navigationView.getMenu().getItem(3).setActionView(R.layout.menu_dot);\n }", "public Window init() {\n // Construye una ventana (del navegador)\n // ----------------------------------------\n\n Window window = new Window();\n window.setTitle(\"Hola Mundo\");\n\n // ----------------------------------------\n // Construye un panel raiz y se lo asigna\n // a la ventana\n // ----------------------------------------\n\n ContentPane contentPane = new ContentPane();\n window.setContent(contentPane);\n\n // ----------------------------------------\n // Construye la GUI y la añade al panel\n // raiz recien construido\n // ----------------------------------------\n\n SplitPane split1 = new SplitPane();\n split1.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n split1.setSeparatorPosition(new Extent(30, Extent.PX));\n split1.setSeparatorColor(Color.BLACK);\n split1.setResizable(true);\n split1.setSeparatorHeight(new Extent(5, Extent.PX));\n contentPane.add(split1);\n\n MenuBarPane mbp = DemoMenuFactory.createDemoMenuBarPane();\n split1.add(mbp);\n\n SplitPane split2 = new SplitPane();\n split2.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n split2.setSeparatorPosition(new Extent(30, Extent.PX));\n split2.setSeparatorColor(Color.BLACK);\n split2.setResizable(true);\n split2.setSeparatorHeight(new Extent(5, Extent.PX));\n split1.add(split2);\n\n Row row = new Row();\n //row.add(DemoMenuFactory.createDemoMenuBarPane()); // Can't be done\n row.add(DemoMenuFactory.createDemoDropDownMenu());\n split2.add(row);\n\n HtmlLayout htmlLayout;\n\n try {\n htmlLayout = new HtmlLayout( //\n getClass().getResourceAsStream(\"template.html\"), \"UTF-8\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n HtmlLayoutData hld;\n\n hld = new HtmlLayoutData(\"label1\");\n Label lblLabel1 = new Label(\"Menu 1\");\n lblLabel1.setLayoutData(hld);\n htmlLayout.add(lblLabel1);\n\n hld = new HtmlLayoutData(\"menu1\");\n //MenuBarPane ddm1 = DemoMenuFactory.createDemoMenuBarPane(); // Can't be done\n DropDownMenu ddm1 = DemoMenuFactory.createDemoDropDownMenu();\n ddm1.setLayoutData(hld);\n htmlLayout.add(ddm1);\n\n hld = new HtmlLayoutData(\"label2\");\n Label lblLabel2 = new Label(\"Menu 2\");\n lblLabel2.setLayoutData(hld);\n htmlLayout.add(lblLabel2);\n\n hld = new HtmlLayoutData(\"menu2\");\n DropDownMenu ddm2 = DemoMenuFactory.createDemoDropDownMenu();\n ddm2.setLayoutData(hld);\n htmlLayout.add(ddm2);\n\n split2.add(htmlLayout);\n\n WindowPane windowPane = new WindowPane();\n windowPane.setClosable(false);\n contentPane.add(windowPane);\n\n SplitPane split3 = new SplitPane();\n split3.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);\n split3.setSeparatorPosition(new Extent(30, Extent.PX));\n split3.setSeparatorColor(Color.BLACK);\n split3.setResizable(true);\n split3.setSeparatorHeight(new Extent(5, Extent.PX));\n windowPane.add(split3);\n\n split3.add(DemoMenuFactory.createDemoMenuBarPane());\n\n return window;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) \n\t{\n\t\tgetMenuInflater().inflate(R.menu.display_page, menu);\n\t\treturn true;\n\t}", "private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}", "public void load(MenuResponseDTO resDTO) {\n deInitialize();\n //bug 14783, CR 14789\n imageUploadNumber = resDTO.getUploadId();\n iCaptureImage.setChatId(resDTO.getUploadId());\n// userPhoneNnmber = resDTO.getUserNumber();\n itemFocused = UISettings.MENU;//CR 12767\n lastItemFocused = UISettings.MENU; \n short mPos = UISettings.headerHeight;\n byte numOfMenuItems = UISettings.numOfMenuItems;\n try {\n if (null != resDTO.getSecHdrTxt()) {\n sHeader = CustomCanvas.getSecondaryHeader(resDTO.getSecHdrTxt(), \"\",0);\n CustomCanvas.sHeader = sHeader;\n //CR 12817\n mPos += UISettings.secondaryHeaderHeight;\n numOfMenuItems--;\n } else {\n sHeader = resDTO.getSecHdrTxt();\n CustomCanvas.sHeader = resDTO.getSecHdrTxt();\n }\n } catch (Exception e) {\n Logger.loggerError(\"MenuCanvas load \" + e.toString() + e.getMessage());\n }\n iMenu.setMenu(resDTO.getSeqlist(), resDTO.getItemnamelist(),null, \n resDTO.getItemidlist(), resDTO.getStylelist(),true,null,0);\n if(bannerHandler.setBanner(resDTO.getBannerText(), resDTO.getBannerStyle(),resDTO.getLopttext(),false))\n numOfMenuItems--;\n iMenu.setMenuPosition(mPos, numOfMenuItems, resDTO.getLopttext(),true);\n rOByte = UISettings.rOByte = resDTO.getLopttext();\n UISettings.lOByte = PresenterDTO.setLOptByte();\n //#if KEYPAD\n //|JG|setSearchMenuState();\n //#endif\n\n //CR 14694\n if(resDTO.getProfileImageType() == 0){\n isImage((byte)53);\n } else if(resDTO.getProfileImageType() == 1){\n isImage((byte)56);\n }\n\n reLoadFooterMenu();\n ShortHandCanvas.IsNeedPaint();\n }", "public abstract void setupMvpPresenter();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.principal, menu);\n\n\n return true;\n }", "private void loadGUI() {\n JMenuItem tmp;\n Font font = new Font(\"Arial\", Font.ITALIC, 10);\n \n // Project menu\n projectMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected project\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n projectMenu.add(tmp);\n projectMenu.addSeparator();\n \n properties = new JMenuItem(\"Properties\");\n properties.addActionListener(this);\n projectMenu.add(properties);\n \n reimport = new JMenuItem(\"Re-Import Files\");\n reimport.addActionListener(this);\n projectMenu.add(reimport);\n \n removeProject = new JMenuItem(\"Remove project\");\n removeProject.addActionListener(this);\n projectMenu.add(removeProject);\n \n // Directory menu\n dirMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected directory\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n dirMenu.add(tmp);\n dirMenu.addSeparator();\n \n removeDir = new JMenuItem(\"Remove from project\");\n removeDir.addActionListener(this);\n dirMenu.add(removeDir);\n \n deleteDir = new JMenuItem(\"Delete from disk\");\n deleteDir.addActionListener(this);\n dirMenu.add(deleteDir);\n \n renameDir = new JMenuItem(\"Rename\");\n renameDir.addActionListener(this);\n dirMenu.add(renameDir);\n \n // File menu\n fileMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected file\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n fileMenu.add(tmp);\n fileMenu.addSeparator();\n \n removeFile = new JMenuItem(\"Remove from project\");\n removeFile.addActionListener(this);\n fileMenu.add(removeFile);\n \n deleteFile = new JMenuItem(\"Delete from disk\");\n deleteFile.addActionListener(this);\n fileMenu.add(deleteFile);\n \n renameFile = new JMenuItem(\"Rename\");\n renameFile.addActionListener(this);\n fileMenu.add(renameFile);\n\t\n\t // sutter2k: need to tap in here for preview in browser\n miLaunchBrowser= new JMenuItem(\"Preview in Browser\");\n miLaunchBrowser.addActionListener(this);\n fileMenu.add(miLaunchBrowser);\n\t\n // Menu to show when multiple nodes are selected\n multipleSelMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Multiple selection\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n multipleSelMenu.add(tmp);\n multipleSelMenu.addSeparator();\n \n removeMulti = new JMenuItem(\"Remove from project\");\n removeMulti.addActionListener(this);\n multipleSelMenu.add(removeMulti);\n \n deleteMulti = new JMenuItem(\"Delete from disk\");\n deleteMulti.addActionListener(this);\n multipleSelMenu.add(deleteMulti);\n \n }", "public Menu() {\n initComponents();\n }", "public Menu() {\n initComponents();\n }", "public Menu() {\n initComponents();\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.viewer, menu);\n\t\t\treturn true;\n\t\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 }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.principal, menu);\n return true;\n }", "public interface IGetEntryPresenter {\n\n /**\n * Method to load the entry presenter screen\n * \n * @param responseDTO An instance of GetEntryResponseDTO which contains\n * variables that determine the loading/handling of\n * entry canvas.\n */\n void load(GetEntryResponseDTO responseDTO);\n \n void rotateScreen(boolean isLandScape);\n\n /**\n * Unloads the view\n */\n void unLoad();\n\n /**\n * Method to remove a menu item from the view\n * \n * @param itemId Item Id of the menu item\n * @param itemName Item Name of the menu item\n */\n void removeMenuItem(int itemId, String itemName);\n\n /**\n * Method to rename the menu item. Method adds the item edit box to the view\n * \n * @param itemId Item Id of the menu item\n * @param itemName Item Name of the menu item\n */\n //#if KEYPAD\n //|JG| void renameMenuItem(int itemId, String itemName);\n //#endif\n\n /**\n * Method to change a menu item name\n * \n * @param itemId Item id of the menu item whose name needs to be changed\n * @param itemName New item name\n */\n void changeMenuItemName(String itemId, String itemName);\n\n /**\n * Method to load message box\n * @param type\n * <li> 1 - Smartpopup without any options that last for \n * predefined time </li>\n * <li> 2,3,5 - Message box with options menu </li>\n * <li> 4,6 - Notification window </li>\n * @param msg Message\n */\n// void loadMessageBox(byte type, String msg);\n\n /**\n * Method to select the last accessed menu item\n * \n * @param iName Item name to be selected\n */\n void selectLastAccessedItem(String itemId);\n\n /**\n * Method to copy the text to the text box\n * \n * @param txt Text to be copied\n */\n void copyTextToTextBox(String text,boolean isMaxSet);\n\n /**\n * Method to show notification. This function internally calls the the\n * handlesmartpopup with the type defined for notification window\n * \n * @param isGoTo Boolean to indicate whether the notification window should\n * have \"Goto\" option or not\n * \n * @param dmsg Notification message\n * \n * @param param String Array which consists of two elements\n * <li> Element 0 - To represents whether the notification\n * is raised for message arrival or scheduler invocation\n * </li>\n * <li> Element 1 - Gives you the message id incase of \n * message or sequence name in case of scheduler\n * <li>\n */\n// void showNotification(byte isGoto);\n \n void keyPressed(int keycode);\n \n void paintGameView(Graphics g);\n \n byte commandAction(byte priority);\n \n// void displayMessageSendSprite();\n \n boolean pointerPressed(int x, int y, boolean isPointed, boolean isReleased, boolean isPressed);\n\n// //CR 12318\n// public void updateChatNotification(String[] msg);\n\n //CR 12118\n //bug 14155\n //bug 14156\n void changeMenuItemName(String itemName, byte type, String msgPlus);\n\n //CR 14672, 14675\n void refreshList(String[] contacts, int[] contactId);\n\n void setImage(ByteArrayOutputStream byteArrayOutputStream); //CR 14694\n}", "private void init()\n {\n btnUser.setOnAction(buttonHandler);\n btnHome.setOnAction(event -> changeScene(\"store/fxml/home/home.fxml\"));\n btnCategories.setOnAction(event -> changeScene(\"store/fxml/category/categories.fxml\"));\n btnTopApps.setOnAction(buttonHandler);\n btnPurchased.setOnAction(buttonHandler);\n btnMenu.setOnAction(buttonHandler);\n btnSearch.setOnAction(buttonHandler);\n btnFeatured.setOnAction(buttonHandler);\n\n itmLogout = new MenuItem(\"Logout\");\n itmAddApp = new MenuItem(\"Add app\");\n itmUsers = new MenuItem(\"Manage users\");\n itmCategories = new MenuItem(\"Manage categories\");\n\n itmAddApp.setOnAction(itemHandler);\n itmLogout.setOnAction(itemHandler);\n itmUsers.setOnAction(itemHandler);\n itmCategories.setOnAction(itemHandler);\n\n if (user.getId() != null)\n {\n btnMenu.setVisible(true);\n if (user.getAdmin())\n btnMenu.getItems().addAll(itmAddApp, itmCategories, itmUsers, itmLogout);\n else\n btnMenu.getItems().add(itmLogout);\n\n ImageView imageView = new ImageView(user.getPicture());\n imageView.setFitHeight(25);\n imageView.setFitWidth(25);\n\n btnUser.setText(user.getUsername());\n }\n else\n btnMenu.setVisible(false);\n }", "@FXML\n private void menu(){\n\n // Runs mid menu\n MidGameMenu.menuMethod();\n\n Main.gang.setMoving(false);\n Main.main.getMenuWindow().showAndWait();\n }", "private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }", "@Override\n public void onPrepareOptionsMenu(Menu menu) {\n if (mShowOptionsMenu && ViewConfiguration.get(getActivity()).hasPermanentMenuKey() &&\n isLayoutReady() && mDialpadChooser != null) {\n setupMenuItems(menu);\n }\n }", "private void prepareNavigationMenu() {\n navigationView.setNavigationItemSelectedListener(this);\n\n Menu menu = navigationView.getMenu();\n if(routeSelected != -1) {\n menu.findItem(R.id.nav_map).setVisible(true);\n }\n menu.findItem(R.id.nav_userpanel).setVisible(false);\n }", "public ScreenMainMenu() {\n\t\tsuper(AdapterInputMainMenu.class);\n\t\tobj.add(new MainMenuInteractObjTest<>(gRef,200,200,new Rectangle(0,0,32,32)));\n\t\tChartset.detect(\"resources\\\\Charts\");\n\t}", "public void display() {\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new ProviderMenu().setVisible(true);\n\n }\n });\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.details_page, menu);\n gMenu = menu;\n return true;\n }", "public abstract MenuInflater mo2159d();", "public MenuPanel() {\n initComponents();\n }", "public void readTheMenu();", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(getLayoutViewId());\n// presenter = getPresenter(typePresenter);\n init();\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.viewer, menu);\r\n\t\treturn true;\r\n\t}", "public Menu() { //Menu pannel constructor\n\t\tmenuBar = new JMenuBar();\n\t\tmenu = new JMenu(\"Menu\");\n\t\tabout = new JMenu(\"About\");\n\t\tabout.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Ragnarock Web Browser 2017\\nIvan Mykolenko\\u00AE\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\thistory = new JMenu(\"History\");\n\t\thistory.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"history\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"History\");\n\t\t\t\tlayer.show(userViewPort, \"History\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 2;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tbookmarks = new JMenu(\"Bookmarks\");\n\t\tbookmarks.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"bookmarks\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"Bookmarks\");\n\t\t\t\tlayer.show(userViewPort, \"Bookmarks\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 3;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tsettingsMenuItem = new JMenuItem(\"Settings\", KeyEvent.VK_X);\n\t\tsettingsMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcreateSettings();\n\t\t\t\tsettings.setVisible(true);\n\t\t\t}\n\t\t});\n\t\texitMenuItem = new JMenuItem(\"Exit\");\n\t\texitMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tbackButton = new JButton(\"Back\");\n\t\tremoveButton = new JButton(\"Remove\");\n\t\tmenu.add(settingsMenuItem);\n\t\tmenu.add(exitMenuItem);\n\t\tmenuBar.add(menu);\n\t\tmenuBar.add(history);\n\t\tmenuBar.add(bookmarks);\n\t\tmenuBar.add(about);\n\t\tmenuBar.add(Box.createHorizontalGlue()); // Changing backButton's alignment to right\n\t\tsettings = new JDialog();\n\t\tadd(menuBar);\n\t\tsaveButton = new JButton(\"Save\");\n\t\tclearHistory = new JButton(\"Clear History\");\n\t\tclearBookmarks = new JButton(\"Clear Bookmarks\");\n\t\tbuttonsPanel = new JPanel();\n\t\tpanel = new JPanel();\n\t\turlField = new JTextField(15);\n\t\tedit = new JLabel(\"Edit Homepage:\");\n\t\tviewMode = 1;\n\t\tlistModel = new DefaultListModel<String>();\n\t\tlist = new JList<String>(listModel);\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);\n\t\tlist.setLayoutOrientation(JList.VERTICAL);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n mMenu = menu;\n\n if (response == null) {\n getCachedRiverData();\n } else {\n // getRefreshCachedData();\n progressBar.setVisibility(View.GONE);\n }\n // startActivity(new Intent(MainPagerActivity.this, SplashActivity.class));\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.principal, menu);\n return true;\n }" ]
[ "0.72711813", "0.69084185", "0.6761936", "0.6632261", "0.6631972", "0.6624694", "0.6602674", "0.6502955", "0.6497598", "0.6471469", "0.64600575", "0.6449108", "0.6440202", "0.6425727", "0.63929117", "0.6367856", "0.63516027", "0.632892", "0.63207686", "0.63187987", "0.6308689", "0.62905025", "0.6267319", "0.6230958", "0.62195075", "0.62195075", "0.62189037", "0.6214446", "0.62142557", "0.6210888", "0.6204579", "0.6201873", "0.62015504", "0.6199214", "0.6197438", "0.6194741", "0.6193458", "0.61894774", "0.6177598", "0.61522996", "0.61498916", "0.6111829", "0.6103905", "0.609782", "0.609613", "0.6094826", "0.60828424", "0.6081795", "0.6073548", "0.60676455", "0.60555786", "0.6049847", "0.6040344", "0.603908", "0.6027282", "0.6022687", "0.602168", "0.6020125", "0.6016894", "0.6000375", "0.59951186", "0.5988595", "0.5988221", "0.59589857", "0.5956064", "0.5951765", "0.5950215", "0.5949445", "0.59455174", "0.59390944", "0.5935629", "0.59292483", "0.59266347", "0.5916655", "0.5916063", "0.5901535", "0.58994323", "0.58994323", "0.58994323", "0.5895653", "0.58905184", "0.5881596", "0.5877876", "0.58745724", "0.5869812", "0.586724", "0.58597827", "0.5859281", "0.5856303", "0.58536077", "0.5853511", "0.58516777", "0.58494407", "0.5843197", "0.58348453", "0.58251584", "0.5822394", "0.5820469", "0.5818694", "0.58175504", "0.5817322" ]
0.0
-1
Populate the model task with user input.
public void onClick(View v) { Task task = new Task(); task.setTask_id(key); // Use the generated key from the database as id. task.setMessage(editText.getText().toString()); String rating = spinner.getSelectedItem().toString(); task.setPriority(rating); // we need to convert our model into a Hashmap since Firebase cannot save custom classes. // String/ArrayList/Integer and Hashmap are the only supported types. Map<String, Object> childUpdates = new HashMap<>(); childUpdates.put( key, task.toFirebaseObject()); database.child("users").child(currentUserID).child("taskList").updateChildren(childUpdates, new DatabaseReference.CompletionListener() { @Override public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) { if (databaseError == null) { // Return to previous activity finish(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateFromTask(String actionTitle, Task task) {\r\n if (task == null || actionTitle.equals(\"Create\")) {\r\n myTask = null;\r\n return;\r\n }\r\n myTask = task;\r\n }", "public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }", "public Task gatherTaskInfo() {\n \t\n \tString title;\n \t\n \tEditText getTitle = (EditText)findViewById(R.id.titleTextBox);\n \t//EditText itemNum = (EditText)findViewById(R.id.showCurrentItemNum);\n \t \t\n \t//gathering the task information\n \ttitle = getTitle.getText().toString();\n\n \t//validate input \n \tboolean valid = validateInput(title);\n \t\n \t//if valid input and we have the properties create a task and return it\n \tif(valid && propertiesGrabbed) {\n \t\t\n\t \t//creating a task\n\t \tTask t = new TfTask();\n\t \tt.setTitle(title);\n\t \t\n\t \t//setting the visibility enum\n\t \tif(taskVisibility.equals(\"Public\")) { \t\t\n\t \t\tt.setVisibility(Visibility.PUBLIC); \t\t\n\t \t}else{\n\t \t\tt.setVisibility(Visibility.PRIVATE); \t\t\n\t \t}\n\t \t\n\t \t//creating each individual item\n\t \taddItemsToTask(t);\n\t \t\t \t\n\t \t//set the description\n\t \tt.setDescription(taskDescription);\n\n\t \t//set the email to respond to\n\t \tt.setEmail(taskResponseString);\n\t \t\n\t \t//return the task\t \t\n\t \treturn t;\n\t \t\n \t}else{\n \t\t//task not correct\n \t\treturn null;\n \t}\n }", "private static void taskProcess(String input)\r\n\t{\r\n\t\tswitch (input.toUpperCase())\r\n\t\t{\r\n\t\t\tcase CREATE:\r\n\t\t\t{\r\n\t\t\t\tPostTaskService postTask = new PostTaskService();\r\n\t\t\t\tpostTask.createTask();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase GET:\r\n\t\t\t{\r\n\t\t\t\tGetTaskService getTask = new GetTaskService();\r\n\t\t\t\tList<Task> taskList = getTask.getAllTasks();\r\n\t\t\t\tTaskSchedulerUtil.getInstance().printTasks(taskList);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase START:\r\n\t\t\t{\r\n\t\t\t\tStartTaskService startTask = new StartTaskService();\r\n\t\t\t\tstartTask.startTask();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase END:\r\n\t\t\t{\r\n\t\t\t\tEndTaskService endTask = new EndTaskService();\r\n\t\t\t\tendTask.endTask();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void initTask() {\n\t\tRankTempInfo rankInfo = RankServerManager.getInstance().getRankTempInfo(player.getPlayerId());\n\t\tif(rankInfo!=null){\n\t\t\tgetTask().getTaskInfo().setProcess((int)rankInfo.getSoul());\n\t\t}\n\t}", "protected void setupTask(Task task) {\n }", "public void setTask(Task inTask){\n punchTask = inTask;\n }", "public void setTask(PickingRequest task) {\n this.task = task;\n }", "public RefactoringTask() {\n\t\tlauncher = new Launcher();\n\t\tinputSources = new ArrayList<String>();\n\t\tprocessors = new ArrayList<String>();\n\t\ttemplates = new ArrayList<SpoonResource>();\n\t\trefactoringsApplied = new HashMap<String, Integer>();\n\t\toutputSource = \"\";\n\t\tisProcessed = false;\n\t\tisModelBuilt = false;\n\t}", "private Task readTask(String input) throws DukeException {\n String[] splitInput = input.split(\"\\\\|\", -1);\n String identifier = splitInput[0];\n boolean isComplete = parseInt(splitInput[1]) == 1;\n Task task;\n switch (identifier) {\n case Todo.IDENTIFIER:\n task = new Todo(splitInput[2]);\n break;\n case Deadline.IDENTIFIER:\n task = new Deadline(splitInput[2], parseDate(splitInput[3]));\n break;\n case Event.IDENTIFIER:\n task = new Event(splitInput[2], parseDate(splitInput[3]));\n break;\n default:\n throw new DukeException(\"Imported task with invalid type.\");\n }\n if (isComplete) {\n task.setDone();\n }\n return task;\n }", "public void saveTask() {\r\n if (validateTask(textFieldName, textFieldDescription, textFieldDueDate, comboPriority)) {\r\n if (myTask == null) {\r\n myTask = new Task(textFieldName.getText(), textFieldDescription.getText(),\r\n LocalDate.parse(textFieldDueDate.getText()),\r\n Priority.valueOf(Objects.requireNonNull(comboPriority.getSelectedItem()).toString()));\r\n } else {\r\n myTask.setName(textFieldName.getText());\r\n myTask.setDescription(textFieldDescription.getText());\r\n myTask.setDueDate(LocalDate.parse(textFieldDueDate.getText()));\r\n myTask.setPriority(Priority.valueOf(Objects.requireNonNull(\r\n comboPriority.getSelectedItem()).toString()));\r\n }\r\n myTodo.getTodo().put(myTask.getHashKey(), myTask);\r\n todoListGui();\r\n }\r\n }", "private static void addTask() {\n Task task = new Task();\n System.out.println(\"Podaj tytuł zadania\");\n task.setTitle(scanner.nextLine());\n System.out.println(\"Podaj datę wykonania zadania (yyyy-mm-dd)\");\n\n while (true) {\n try {\n LocalDate parse = LocalDate.parse(scanner.nextLine(), DateTimeFormatter.ISO_LOCAL_DATE);\n task.setExecuteDate(parse);\n break;\n } catch (DateTimeParseException e) {\n System.out.println(\"Nieprawidłowy format daty. Spróbuj YYYY-MM-DD\");\n }\n }\n\n task.setCreationDate(LocalDate.now());\n\n queue.offer(task);\n System.out.println(\"tutuaj\");\n }", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "private void doAddTask() {\n System.out.println(\n \"Kindly enter the time, description and date of the task you would like to add on separate lines.\");\n String time = input.nextLine();\n String description = input.nextLine();\n String date = input.nextLine();\n todoList.addTask(new Task(time,description,date));\n System.out.println(time + \" \" + description + \" \" + date + \" \" + \"has been added.\");\n }", "public static void addTask(ArrayList<Task> taskList) {\n // String response; // String variable for user's input\n Task task; // declaring the temporary task variable for the user's task\n do { // do while loop for preventing the user from entering a label longer than 20 characters\n System.out.print(\"Task (max 20 char.): \"); // prompting the user for task label\n response = input.nextLine(); // receiving user input\n } while (response.length() > 20); // runs until they enter a valid input\n \n if (response.equals(\"\") || response.equals(\" \")) { // if they left the label blank\n task = new Task();\n } else {\n task = new Task(response);\n }\n System.out.print(\"Task added.\"); // tells the user that adding the task was successful\n System.out.println(\"\\n\"); // prints a newline for formatting\n taskList.add(task); // adds task to the task list\n pause(); // pauses the screen\n }", "public Model(){\r\n try{\r\n File file = new File(\"./config.ini\");\r\n boolean firstRun = file.createNewFile();\r\n\r\n //If this is the first run for the application\r\n if (firstRun){\r\n //Ask user the amount of hours he wants to work per day\r\n dailyWorkload = Integer.parseInt(JOptionPane.showInputDialog(\"Enter number of hours you want to work per day\"));\r\n numDayWorkWeek = Integer.parseInt(JOptionPane.showInputDialog(\"Enter number of days you want to work per week\"));\r\n\r\n //Allocate memory for data structures\r\n unfinished = new TreeSet<>();\r\n finished = new ArrayList<>();\r\n activities = new ArrayList<>();\r\n\r\n FileWriter fw = new FileWriter(file);\r\n PrintWriter pw = new PrintWriter(fw);\r\n\r\n pw.println(dailyWorkload);\r\n pw.println(numDayWorkWeek);\r\n pw.close();\r\n fw.close();\r\n\r\n weeklySchedule = new ArrayList<>(numDayWorkWeek);\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.add(new TreeSet<Task>());\r\n }\r\n //Else if this is not the first run of the application\r\n else{\r\n FileReader fr = new FileReader(file);\r\n BufferedReader br = new BufferedReader(fr);\r\n dailyWorkload = Integer.parseInt(br.readLine());\r\n numDayWorkWeek = Integer.parseInt(br.readLine());\r\n br.close();\r\n fr.close();\r\n\r\n weeklySchedule = new ArrayList<>(numDayWorkWeek);\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.add(new TreeSet<Task>());\r\n loadFromDatabase();\r\n }\r\n\r\n }\r\n catch (Exception e){\r\n System.out.println(\"Stress is constructor: \" + e.getMessage());\r\n }\r\n }", "public void populateTaskList(String _task){\n\t\ttaskList.getItems().add(_task);\n\t}", "public void processUser() {\r\n Scanner sc = new Scanner(System.in);\r\n model.setAllparameters(inputIntValueWithScanner(sc, View.INPUT_INT_HOUR_DATA, GlobalConstants.PRIMARY_HOUR_MAX_BARRIER),// the correct input (hour,minute,second) is sent to the model\r\n inputIntValueWithScanner(sc, View.INPUT_INT_MINUTE_DATA, GlobalConstants.PRIMARY_MINUTE_MAX_BARRIER),\r\n inputIntValueWithScanner(sc, View.INPUT_INT_SECOND_DATA, GlobalConstants.PRIMARY_SECOND_MAX_BARRIER));\r\n int k = 0;\r\n do { //at least once the menu option is chosen (for option number 6 (break) for example)\r\n k = inputIntValueWithScanner(sc, View.CHOOSE_OPERATION, GlobalConstants.MENU_OPTION_MAX_VALUE);\r\n chooseOperation(k);\r\n } while (k != GlobalConstants.MENU_OPTION_MAX_VALUE); //menu loop until break option isn't chosen\r\n\r\n }", "public void createTask(){\n final String name = newTaskNameField.getText().toString();\n final String description = newTaskDescriptionField.getText().toString();\n\n if (name.isEmpty()){\n newTaskNameField.setText(\"Please Enter a name\");\n newTaskNameField.requestFocus();\n newTaskNameField.selectAll();\n return;\n }\n\n if (description.isEmpty()){\n newTaskDescriptionField.setText(\"Please Enter a Description\");\n newTaskDescriptionField.requestFocus();\n newTaskDescriptionField.selectAll();\n return;\n }\n\n if(!getValidDate(newtaskDateField.getText().toString())) {\n handleInvalidDate();\n return;\n }\n\n if(newTaskAssignee == null) {\n newTaskAssigneeField.setText(\"Please assign a user\");\n newTaskAssigneeField.selectAll();\n return;\n }\n\n TaskManager.sharedInstance().CreateTask(name, description, newTaskAssignee, DueDate, false);\n newTaskDialog.dismiss();\n }", "public void handleLoad() throws IOException {\n File file = new File(this.path);\n\n // creates data directory if it does not exist\n file.getParentFile().mkdirs();\n\n // creates tasks.txt if it does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n\n Scanner sc = new Scanner(file);\n\n while (sc.hasNext()) {\n String longCommand = sc.nextLine();\n String[] keywords = longCommand.split(\" \\\\|\\\\| \");\n Task cur = null;\n switch (keywords[1]) {\n case \"todo\":\n cur = new Todo(keywords[2]);\n break;\n case \"deadline\":\n cur = new Deadline(keywords[2], keywords[3]);\n break;\n case \"event\":\n cur = new Event(keywords[2], keywords[3]);\n break;\n default:\n System.out.println(\"error\");\n break;\n }\n if (keywords[0].equals(\"1\")) {\n cur.markAsDone();\n }\n TaskList.getTaskLists().add(cur);\n }\n sc.close();\n }", "public Task(Task source) {\n if (source.Application != null) {\n this.Application = new Application(source.Application);\n }\n if (source.TaskName != null) {\n this.TaskName = new String(source.TaskName);\n }\n if (source.TaskInstanceNum != null) {\n this.TaskInstanceNum = new Long(source.TaskInstanceNum);\n }\n if (source.ComputeEnv != null) {\n this.ComputeEnv = new AnonymousComputeEnv(source.ComputeEnv);\n }\n if (source.EnvId != null) {\n this.EnvId = new String(source.EnvId);\n }\n if (source.RedirectInfo != null) {\n this.RedirectInfo = new RedirectInfo(source.RedirectInfo);\n }\n if (source.RedirectLocalInfo != null) {\n this.RedirectLocalInfo = new RedirectLocalInfo(source.RedirectLocalInfo);\n }\n if (source.InputMappings != null) {\n this.InputMappings = new InputMapping[source.InputMappings.length];\n for (int i = 0; i < source.InputMappings.length; i++) {\n this.InputMappings[i] = new InputMapping(source.InputMappings[i]);\n }\n }\n if (source.OutputMappings != null) {\n this.OutputMappings = new OutputMapping[source.OutputMappings.length];\n for (int i = 0; i < source.OutputMappings.length; i++) {\n this.OutputMappings[i] = new OutputMapping(source.OutputMappings[i]);\n }\n }\n if (source.OutputMappingConfigs != null) {\n this.OutputMappingConfigs = new OutputMappingConfig[source.OutputMappingConfigs.length];\n for (int i = 0; i < source.OutputMappingConfigs.length; i++) {\n this.OutputMappingConfigs[i] = new OutputMappingConfig(source.OutputMappingConfigs[i]);\n }\n }\n if (source.EnvVars != null) {\n this.EnvVars = new EnvVar[source.EnvVars.length];\n for (int i = 0; i < source.EnvVars.length; i++) {\n this.EnvVars[i] = new EnvVar(source.EnvVars[i]);\n }\n }\n if (source.Authentications != null) {\n this.Authentications = new Authentication[source.Authentications.length];\n for (int i = 0; i < source.Authentications.length; i++) {\n this.Authentications[i] = new Authentication(source.Authentications[i]);\n }\n }\n if (source.FailedAction != null) {\n this.FailedAction = new String(source.FailedAction);\n }\n if (source.MaxRetryCount != null) {\n this.MaxRetryCount = new Long(source.MaxRetryCount);\n }\n if (source.Timeout != null) {\n this.Timeout = new Long(source.Timeout);\n }\n if (source.MaxConcurrentNum != null) {\n this.MaxConcurrentNum = new Long(source.MaxConcurrentNum);\n }\n if (source.RestartComputeNode != null) {\n this.RestartComputeNode = new Boolean(source.RestartComputeNode);\n }\n if (source.ResourceMaxRetryCount != null) {\n this.ResourceMaxRetryCount = new Long(source.ResourceMaxRetryCount);\n }\n }", "public static void main(String[] args) {\n System.out.println(\"This is Tasker, the place where you can handle all your tasks. With this, maintaining good health and well-being has never been easier!\\n\"); // introduces/presents the app\n ArrayList<Task> taskList; // declaring the ArrayList of tasks\n taskList = deser(); // deserializes any existing .ser file for ArrayList Object\n do { // runs the main program loop\n System.out.println(\"In Tasker, you can choose from...\\na. Check task list\\nb. Add a task\\nc. Remove a task\\nd. Mark a task as complete\\ne. Change a task's date\\nf. Save & Exit Tasker\"); // options menu \n System.out.print(\"Please select an option: \"); // prompting the user\n response = input.nextLine(); // receiving the user's input\n System.out.print(\"\\n\"); // printing a newline for formatting\n if (response.equalsIgnoreCase(\"a\")) { // if the user choes to look at task list\n printTaskList(taskList); // printing the task list to the user\n } else if (response.equalsIgnoreCase(\"b\")) { // if the user wants to add a task\n addTask(taskList); // allows the user to add a task\n } else if (response.equalsIgnoreCase(\"c\")) { // if the user wants to remove a task\n delTask(taskList); // allows the user to remove a task\n } else if (response.equalsIgnoreCase(\"d\")) { // if the user wants to mark a task as complete\n markComplete(taskList); // allows the user to mark a task as complete\n } else if (response.equalsIgnoreCase(\"e\")) { // if the user wants to change a task's date\n promptDate(taskList); // allows the user to change the date of a task\n } else if (!response.equalsIgnoreCase(\"f\")){\n System.out.println(\"Invalid input.\"); // telling the user they entered an invalid input\n }\n } while (!response.equalsIgnoreCase(\"f\")); // while the user does not want to exit \n ser(taskList); // serializes the ArrayList of the task objects the user created\n }", "public Task toModelType() throws IllegalValueException {\n\t\tfinal Name name = new Name(this.name);\n\t\tfinal TaskDate taskStartDate = DateUtil.convertJaxbStringToTaskDate(this.startDate);\n\t\tfinal TaskDate taskEndDate = DateUtil.convertJaxbStringToTaskDate(this.endDate);\n\t\tfinal Status status = new Status(this.status);\n\t\treturn createTaskFromGivenArgs(name, taskStartDate, taskEndDate, status);\n\t}", "public void initiateValues(Task task)\r\n {\n int icon;\r\n switch (task.getType()) {\r\n case Task.TASK_DELIVERY:\r\n icon = R.drawable.ic_delivery;\r\n break;\r\n case Task.TASK_PICKUP:\r\n icon = R.drawable.ic_pickup;\r\n break;\r\n default:\r\n icon = R.drawable.ic_delivery;\r\n }\r\n ((Toolbar)findViewById(R.id.package_toolbar)).setNavigationIcon(icon);\r\n\r\n //task fields\r\n TextView number = (TextView)findViewById(R.id.route_id_field);\r\n TextView type = (TextView)findViewById(R.id.task_type_field);\r\n TextView address = (TextView)findViewById(R.id.task_address_field);\r\n TextView timeslot = (TextView)findViewById(R.id.task_timeslot_field);\r\n\r\n number.setText(task.getId()+\"\");\r\n type.setText(((task.getType()==0)?\"Levering\":\"Henting\")+ \" (\" + task.getSize() + \" kolli)\");\r\n address.setText(task.getAddress() + \", \" + task.getZip() + \" \" + task.getCity());\r\n long timeSlotStart = task.getTimeSlotStart();\r\n long timeSlotEnd = task.getTimeSlotEnd();\r\n //set timeslot for package if it exists\r\n if(timeSlotStart != 0 && timeSlotEnd != 0)\r\n timeslot.setText(task.getTimeSlotStartString() + \" - \" + task.getTimeSlotEndString());\r\n\r\n //sender fields\r\n TextView sender_name = (TextView)findViewById(R.id.sender_name_field);\r\n TextView sender_phone = (TextView)findViewById(R.id.sender_phone_field);\r\n TextView sender_address = (TextView)findViewById(R.id.sender_address_field);\r\n\r\n sender_name.setText(task.getSender().getName());\r\n sender_phone.setText(task.getSender().getPhone());\r\n sender_address.setText(task.getSender().getAddress());\r\n\r\n //receiver fields\r\n TextView receiver_name = (TextView)findViewById(R.id.receiver_name_field);\r\n TextView receiver_phone = (TextView)findViewById(R.id.receiver_phone_field);\r\n TextView receiver_address = (TextView)findViewById(R.id.receiver_address_field);\r\n\r\n receiver_name.setText(task.getReceiver().getName());\r\n receiver_phone.setText(task.getReceiver().getPhone());\r\n receiver_address.setText(task.getReceiver().getAddress());\r\n }", "public void setupTask(TaskAttemptContext context) throws IOException {\n }", "public void fetchTaskDetailsFromDB() {\n TaskInfo taskInfo = TaskInfo.getOrBadRequest(userTaskUUID);\n taskParams = Json.fromJson(taskInfo.getDetails(), UniverseDefinitionTaskParams.class);\n }", "public static Object createTaskObject(){\n try {\n\n return taskModel.make()\n .load(ClassLoader.getSystemClassLoader(), ClassLoadingStrategy.Default.WRAPPER)\n .getLoaded()\n .newInstance();\n\n\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public AddCommand(Task task){\r\n this.task = task;\r\n }", "protected abstract void createTasks();", "public CompleteableToDoListApp() {\n\t\t\n//\t\tmanager = TaskableFactory.getBasicTaskManager();\n//\t\tsc = new Scanner(System.in);\n\t}", "@Override\n public void run(String... args) throws Exception {\n\n TaskTemplate finalProjectDemo = new TaskTemplate(\"Final Project Demo\", \"Finishing the Demo\", 300, \"Tuesday\");\n taskTemplateStorage.save(finalProjectDemo);\n\n User mom = new User(\"Mom\", 300, \"rose\", \"/front-end/images/mom.png\");\n User dad = new User(\"Dad\", 600, \"apple\", \"/front-end/images/Dad.png\");\n User bro = new User(\"Bro\", 200, \"light-blue\", \"/front-end/images/Bro.png\");\n User sis = new User(\"Sis\", 200, \"magenta\", \"/front-end/images/sis.png\");\n\n\n// userStorage.save(testUser);\n userStorage.save(mom);\n userStorage.save(dad);\n userStorage.save(bro);\n userStorage.save(sis);\n\n\n\n TaskTemplate cleanCommonArea = new TaskTemplate(\"Clean Common Area\", \"Clean all common areas\", 30, 30, \"Monday\");\n TaskTemplate cleanGarage = new TaskTemplate(\"Clean Garage\", \"Sweep and organize the Garage\", 45, 45, \"Tuesday\");\n TaskTemplate cleanBathrooms = new TaskTemplate(\"Clean Bathrooms\", \"Wipe down sinks, scrub toilets, sweep and mop floors, and empty bathroom trash\", 30, 30, \"Wednesday\");\n TaskTemplate takeOutTrash = new TaskTemplate(\"Take Out Trash\", \"Take all trash to rolling bin outside and take the rolling bin to the road if today is a trash day\", 15,\"Wednesday\" );\n TaskTemplate washDishes = new TaskTemplate(\"Wash Dishes\", \"Wash and dry all dishes in the sink and empty/load the dishwasher\", 30, \"Wednesday\");\n TaskTemplate washAndDryLaundry = new TaskTemplate(\"Wash and Dry Laundry\", \"\", 30, 200, \"Monday\");\n TaskTemplate foldAndPutAwayLaundry = new TaskTemplate(\"Fold and Put Away Laundry\", \"\", 30, \"Monday\");\n TaskTemplate rakeLeaves = new TaskTemplate(\"Rake Leaves\", \"Rake and bag the leaves from the front, back, and sides of the house\", 45, \"Monday\");\n TaskTemplate mowLawn = new TaskTemplate(\"Mow Lawn\", \"Pick up rocks and sticks in the yards and mow the front and back lawn\", 45, \"Monday\");\n TaskTemplate cleanBedroom = new TaskTemplate(\"Clean Bedroom\", \"Clean your room\", 30, \"Tuesday\");\n TaskTemplate deepCleanKitchen = new TaskTemplate(\"Deep Clean Kitchen\", \"Clear off and wipe down all counter tops, wipe cabinet fronts, wipe behind sink, wipe trim boards under cabinets, sweep, and mop kitchen\", 90, \"Tuesday\");\n TaskTemplate tidyKitchen = new TaskTemplate(\"Tidy Kitchen\", \"Move dishes to sink, wipe down counter tops and table, and sweep floors\", 30, \"Tuesday\");\n TaskTemplate vacuumLivingRoom = new TaskTemplate(\"Vacuum Living Room\", \"Vacuum floors, crevases, and under furniture, and remove couch cushions to vacuum under cushions\", 30, \"Tuesday\");\n TaskTemplate mopAndSweepKitchen = new TaskTemplate(\"Mop and Sweep Kitchen\", \"Sweep and hot mop the kitchen floors\", 30, \"Thursday\");\n TaskTemplate changeLitterBox = new TaskTemplate(\"Change Litter Box\", \"Scoop the litter box and replace the litter if today is Friday\", 15, \"Thursday\");\n TaskTemplate walkDog = new TaskTemplate(\"Walk Dog\", \"Take the dogs for a walk around the block\", 20, \"Daily\");\n TaskTemplate cleanUpYard = new TaskTemplate(\"Clean Up Yard\", \"Pick up sticks and rocks in the front and back yard and pick up any trash that has blown in\", 20, \"Thursday\");\n TaskTemplate getMail = new TaskTemplate(\"Get Mail\", \"Get the mail from the mailbox\", 5, \"Daily\");\n TaskTemplate dustLivingRoom = new TaskTemplate(\"Dust Living Room\", \"Dust picture frames, end tables, coffee table, and door sills in the living room\", 20, \"Friday\");\n TaskTemplate dustFamilyRoom = new TaskTemplate(\"Dust Family Room\", \"Dust bookshelves, mantel over fireplace, stereo, and door sills in family room\", 20, \"Friday\");\n TaskTemplate vacuumFamilyRoom = new TaskTemplate(\"Vacuum Family Room\", \"Vacuum floors, crevases, and under furniture in the family room\", 20, \"Friday\");\n TaskTemplate dustCeilingFans = new TaskTemplate(\"Dust Ceiling Fans\", \"Wipe blades of ceiling fans down and ensure dust is blown out of fan motor housing\", 30, \"Friday\", bro, sis);\n\n taskTemplateStorage.save(cleanCommonArea);\n taskTemplateStorage.save(cleanGarage);\n taskTemplateStorage.save(cleanBathrooms);\n taskTemplateStorage.save(takeOutTrash);\n taskTemplateStorage.save(washDishes);\n taskTemplateStorage.save(washAndDryLaundry);\n taskTemplateStorage.save(foldAndPutAwayLaundry);\n taskTemplateStorage.save(rakeLeaves);\n taskTemplateStorage.save(mowLawn);\n taskTemplateStorage.save(cleanBedroom);\n taskTemplateStorage.save(deepCleanKitchen);\n taskTemplateStorage.save(tidyKitchen);\n taskTemplateStorage.save(vacuumLivingRoom);\n taskTemplateStorage.save(mopAndSweepKitchen);\n taskTemplateStorage.save(changeLitterBox);\n taskTemplateStorage.save(walkDog);\n taskTemplateStorage.save(cleanUpYard);\n taskTemplateStorage.save(getMail);\n taskTemplateStorage.save(dustLivingRoom);\n taskTemplateStorage.save(dustFamilyRoom);\n taskTemplateStorage.save(vacuumFamilyRoom);\n taskTemplateStorage.save(dustCeilingFans);\n\n resourceManager.allocateAllTasks();\n\n }", "@Override\r\n public void generateTasks() {\r\n int tasks = Integer.parseInt(this.getProperty(\"numTask\", \"1000\"));\r\n setNumOfTasks(tasks);\r\n //TODO:fixed port here !!!! need to change!!!\r\n serverPort = Integer.parseInt(this.getProperty(\"reqServerPort\", \"5560\")); \r\n PROC_MAX = Integer.parseInt(this.getProperty(\"reqServerMaxConcurrentClients\",\"10\"));\r\n location = this.getProperty(\"location\", \"rutgers\");\r\n energyplusPropertyFile = this.getProperty(\"energyplusTemplate\", \"energyplus.property\");\r\n \r\n winnerTakeAll = Boolean.parseBoolean(this.getProperty(\"winnerTakeAll\",\"true\"));\r\n jobDistributionMap = new HashMap<Integer,Integer>();\r\n copyJobDistributionMap = new HashMap<Integer,Integer>();\r\n //System.out.println(\"energyplusPropertyFile:\"+energyplusPropertyFile);\r\n \r\n initInfoSystem();\r\n initDistributionSystem();\r\n startFedServer();\r\n }", "public void setTask(Task task) {\n this.task = task;\n }", "public TaskBoardModel() {\n\n }", "public void setUp() {\n instance = new Task();\n }", "@Override\n public void init() throws IOException {\n ToDoData.getInstance().loadTasks();\n }", "public static void main(String[] args)\r\n\t{\r\n\t\tSystem.out.print(\"Choose task todo: [G]et all task, [C]reate new task, [S]tart task, [E]nd task :\");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString input = sc.next();\r\n\r\n\t\ttaskProcess(input);\r\n\t}", "Task createTask();", "Task createTask();", "Task createTask();", "private void populateUI(TaskEntry task) {\n if (task == null) {\n return;\n }\n mHeaderText.setText(task.getHeader());\n mDescription.setText(task.getDescription());\n\n }", "public void addTask(View view) {\n // Model of the list data\n ListModel model = ListModel.getInstance();\n\n // String for the date in \"mm/dd/yyyy\" format\n String date;\n\n // Get the name of the task\n EditText text = (EditText) findViewById(R.id.taskInput);\n String taskName = text.getText().toString();\n\n // Add list to model\n model.addTask(listName, taskName);\n\n\n // Return to the single list activity\n Log.i(TAG, \"Creating intent to return to the single list activity\");\n Intent intent = new Intent(this, SingleListActivity.class);\n intent.putExtra(Extra.LIST, listName);\n Log.i(TAG, \"Intent created with extra message (list name).\");\n Log.i(TAG, \"Starting single list activity\");\n startActivity(intent);\n }", "public static void main(String[] args) throws ParseException {\n ProcessEngine processEngine = initProcessEngine();\n ProcessDefinition processDefinition = initRepositoryService(processEngine);\n\n RuntimeService runtimeService = processEngine.getRuntimeService();\n ProcessInstance processInstance = initProcessInstance(runtimeService, \"onboarding\");\n\n TaskService taskService = processEngine.getTaskService();\n FormService formService = processEngine.getFormService();\n HistoryService historyService = processEngine.getHistoryService();\n\n Scanner scanner = new Scanner(System.in);\n\n while (processInstance != null && !processInstance.isEnded()) {\n List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(\"managers\").list();\n System.out.println(String.format(\"Active outstanding task:[%s]\", tasks.size()));\n for (Task task : tasks) {\n System.out.println(String.format(\"Processing Task [%s]\", task.getName()));\n Map<String, Object> variables = new HashMap<String, Object>();\n FormData formData = formService.getTaskFormData(task.getId());\n for (FormProperty formProperty : formData.getFormProperties()) {\n if (StringFormType.class.isInstance(formProperty.getType())) {\n System.out.println(formProperty.getName() + \"?\");\n String value = scanner.nextLine();\n variables.put(formProperty.getId(), value);\n } else if (LongFormType.class.isInstance(formProperty.getType())) {\n System.out.println(String.format(\"%s Must be a whole number\", formProperty.getName()));\n Long value = Long.valueOf(scanner.nextLine());\n variables.put(formProperty.getId(), value);\n } else if (DateFormType.class.isInstance(formProperty.getType())) {\n System.out.println(String.format(\"%s Must be a data m/d/yy\", formProperty.getName()));\n DateFormat dateFormat = new SimpleDateFormat(\"m/d/yy\");\n Date value = dateFormat.parse(scanner.nextLine());\n variables.put(formProperty.getId(), value);\n } else {\n System.out.println(String.format(\"<form type:%s not supported>\", formProperty.getType()));\n }\n }\n taskService.complete(task.getId(), variables);\n\n HistoricActivityInstance endActivity = null;\n List<HistoricActivityInstance> activityInstances =\n historyService.createHistoricActivityInstanceQuery()\n .processInstanceId(processInstance.getId()).finished()\n .orderByHistoricActivityInstanceEndTime().asc().list();\n for (HistoricActivityInstance activityInstance : activityInstances) {\n if (activityInstance.getActivityType().equals(\"startEvent \")) {\n System.out.println(String.format(\"BEGIN [%s] %s ms\", processDefinition.getName(), activityInstance.getDurationInMillis()));\n }\n if (activityInstance.getActivityType().equals(\"endEvent\")) {\n endActivity = activityInstance;\n } else {\n System.out.println(String.format(\"-- %s [%s] %s ms\", activityInstance.getActivityName(), activityInstance.getActivityId(), activityInstance.getDurationInMillis()));\n }\n }\n if (endActivity != null) {\n System.out.println(String.format(\"-- %s [%s] %s ms\", endActivity.getActivityName(), endActivity.getActivityId(), endActivity.getDurationInMillis()));\n System.out.println(String.format(\"COMPLETE %s [%s] %s\", processDefinition.getName(), processInstance.getProcessDefinitionKey(), endActivity.getEndTime()));\n }\n processInstance = runtimeService.createProcessInstanceQuery()\n .processInstanceId(processInstance.getId()).singleResult();\n }\n }\n scanner.close();\n }", "public static Task PromptForTask(BufferedReader stdin, PrintStream stdout)\n\t\t\tthrows IOException {\n\t\t Task task = new Task();\n\t\n\ttask.setTask(numTask);\n\t//numTask++;\n\t\n\tstdout.print(\"Enter context: \");\n\ttask.setContext(stdin.readLine());\n\t\n\tstdout.print(\"Enter project: \");\n\ttask.setProject(stdin.readLine());\n\n\tstdout.print(\"Enter priority(HIGH,MID,LOW): \");\n\tString priority = stdin.readLine();//Por defecto la prioridad es LOW\n\tif (priority.equals(\"HIGH\")){\n\t\ttask.setPriority(HIGH);\n\t}\n\telse if (priority.equals(MID)){\n\t\ttask.setPriority(MID);\n\t}\n\telse{\n\t\ttask.setPriority(LOW);\n\t}\n\t\treturn task;\n\t}", "private void initTaskViews(){\n for (Task t : taskManager.getTasksList()){\n submit(t.getName(), t.getIdInView(), t.getTimeForTask(), t.isFinished());\n }\n }", "private void newTask()\n {\n \t//TODO add alarm\n \tTask task = new Task(taskName.getText().toString(), taskDetails.getText().toString());\n \tdb.createTask(task);\n \t//TODO Tie notification to an alarm\n \t//Create notification\n \tIntent notifyIntent = new Intent(this, TaskNotification.class);\n \tnotifyIntent.putExtra(\"title\", task.name); //add title name\n \tnotifyIntent.putExtra(\"id\", (int) task.id); //add id\n \tstartActivity(notifyIntent); //create the intent\n \t\n \trefreshData();\n }", "@Override\n public void executeAction(String command) {\n String[] parts = command.split(\",\");\n Task task = Task.buildTask(parts[0], parts[1], DateSorting.parseDate(\"dd-MM-yyyy\", parts[2]),\n parts[3], parts[4]);\n\n TodoList.tasks.put(task.getId(), task);\n System.out.println(\"IP.TodoListApplication.App.Task successfully added!\");\n\n }", "public static void taskAssigner(String[] data, TaskList taskList) {\n String description;\n boolean isDone;\n\n switch(data[0]) {\n case \"[T]\":\n isDone = Boolean.parseBoolean(data[1]);\n description = data[2];\n taskList.getTaskArrayList().add(new ToDo(description, isDone));\n break;\n case \"[D]\":\n isDone = Boolean.parseBoolean(data[1]);\n String[] deadlineArray = data[2].trim().split(\"\\\\|\", 2);\n description = deadlineArray[0];\n String by = deadlineArray[1];\n taskList.getTaskArrayList().add(new Deadline(description, by, isDone));\n break;\n case \"[E]\":\n isDone = Boolean.parseBoolean(data[1]);\n String[] eventArray = data[2].trim().split(\"\\\\|\", 2);\n description = eventArray[0];\n String at = eventArray[1];\n taskList.getTaskArrayList().add(new Event(description, at, isDone));\n break;\n }\n\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}", "@Override\n public void run(){\n sharedPref = getActivity().getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n String defaultValue = getResources().getString(R.string.username);\n String username =sharedPref.getString(getString(R.string.username), defaultValue);\n\n mBuddyLocationTask = new GetBuddyLocation(username);\n mBuddyLocationTask.execute((Void) null);\n\n mBuddyHrTask = new GetBuddyHr(username);\n mBuddyHrTask.execute((Void) null);\n }", "@Override\n\t\tprotected String doInBackground(Task... arg0) {\n\t\t\tString taskID = TfTaskRepository.addTask(arg0[0], \n\t\t\t getApplicationContext());\n\t\t\t\n\t\t\ttaskID = taskID + \"\\n\";\n\t\t\t\n\t\t\t//saving the ID local\n\t\t\tlt.saveTaskId(taskID, getApplicationContext());\n\t\t\t\n\t\t\treturn null;\n\t\t}", "public void activatedTask(BudgetValue budget, Sentence sentence, boolean isInput) {\r\n Task task = new Task(sentence, budget, this);\r\n newTasks.add(task);\r\n }", "public void updateTask() {}", "private Task createTaskFromGivenArgs(Name name, TaskDate taskStartDate, TaskDate taskEndDate, Status taskStatus) {\n\t if (isEventTask(taskStartDate, taskEndDate)) {\n\t return new EventTask(name, taskStartDate, taskEndDate, taskStatus);\n\t }\n\t if (isDeadline(taskEndDate)) {\n\t return new DeadlineTask(name, taskEndDate, taskStatus);\n\t }\n\t return new Task(name, taskStatus);\n\t}", "public TaskProgram() {\n initComponents();\n list=new ArrayList();\n li=list.listIterator();\n curtask=0;\n tottask=0;\n }", "public void initTaskInsideDrug(DrugMtl drugMtl, String task, String type){\n\t\tTask taskO = (Task)taskCreator.setTask(task).setType(type).setTaskvar(\"\").build();\n\t\tlog.debug(taskO);\n\t\tTree innerTaskT = nodeCreator.setTagName(\"task\")\n\t\t.setTreeManager(drugMtl).setParentT(drugMtl.getDocT()).addChild();\n\t\tlog.debug(innerTaskT);\n\t\t\n//\t\tif(innerTask!=null)\n\t\t\tdrugMtl.addMObject(taskO, innerTaskT);\n\t\tfor(Tree t:drugMtl.getDocT().getChildTs())\n\t\t\tif(t.getTabName().equals(\"task\"))\n\t\t\t\tlog.debug(\"--------\"+t);\n\t\t\n\t\tlog.debug(innerTaskT);\n\t\tlog.debug(drugMtl.getIdt());\n\t}", "public static void main(String[] args) {\n String[] TaskList = new String[50]; // list of tasks\n int numTasks = -1;\n int userChoice; // user input from menu\n userChoice = getUserOption();\n while (userChoice != 0){\n switch (userChoice) {\n case 1: // Add a Task\n numTasks++;\n addTask(TaskList, numTasks);\n break;\n case 2: // Remove a Task\n if ( numTasks < 0 )\n System.out.println( \"There are no tasks on the list to remove.\");\n else\n numTasks = removeTask(TaskList, numTasks);\n break;\n case 3: // Update a Task\n if ( numTasks < 0 )\n System.out.println( \"There are no tasks on the list to update.\");\n else\n updateTask(TaskList, numTasks);\n break;\n case 4: // List Tasks\n listTasks(TaskList, numTasks);\n break;\n }\n userChoice = getUserOption();\n }\n }", "public void createNewTask(View view) {\n try{\n newTaskLayout.checkTaskLayoutIsValid();\n ImageView taskImage = (ImageView) findViewById(R.id.imageViewBoard);\n String layoutImagePath = takeScreenshot(taskImage);\n newTaskLayout.setImagePath(layoutImagePath);\n\n // save new task\n HashMap<String, Integer> instructions = convertSpinnersToHashMap();\n Task newTask = new Task(newTaskLayout, instructions);\n Task.saveTask(getApplicationContext(), newTask);\n\n // alert user task created and return to task menu.\n Toast.makeText(this, \"new task created\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(), TaskOptionsActivity.class));\n } catch (TaskLayoutException | InstructionsRequiredException e) {\n // layout was not valid on insufficient instructions set.\n makeMessageDialogue(e.getMessage());\n }\n }", "public void init(Task task) {\n\n// System.out.println(\"Task \" + task + \" init, for some reason.\");\n\n if(firstTime) {\n firstTime = !firstTime;\n } else {\n System.out.println(\"\\nSecond init, loading from serials\");\n executableNodes = new ArrayList<ExecutableNode>();\n\n confirmWorkingDir();\n\n\n System.out.println(\"in node to file : \" + inputNodeNumberToFilename.toString());\n System.out.println(\"out node to file : \" + outputNodeNumberToFilename.toString());\n\n for(Integer integer : inputNodeNumberToFilename.keySet()) {\n Node node = task.getInputNode(integer);\n if(node != null) {\n addExecutableNodeMapping(node, inputNodeNumberToFilename.get(integer));\n }\n }\n for(Integer integer : outputNodeNumberToFilename.keySet()) {\n Node node = task.getOutputNode(integer);\n if(node != null) {\n addExecutableNodeMapping(node, outputNodeNumberToFilename.get(integer));\n }\n }\n }\n }", "protected void prepareModel() {\n model();\n }", "public StudentTask() {\n\t\tthis(\"student_task\", null);\n\t}", "private void setupModel() {\n\n //Chooses which model gets prepared\n switch (id) {\n case 2:\n singlePackage = new Node();\n activeNode = singlePackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_solo)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 3:\n multiPackage = new Node();\n activeNode = multiPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_multi_new)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 4:\n wagonPackage = new Node();\n activeNode = wagonPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_car_new)\n .build().thenAccept(a -> activeRenderable = a)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n default:\n mailbox = new Node();\n activeNode = mailbox;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.mailbox)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n }\n }", "public AnemoCheckTask() {\n }", "public interface Model {\n /** Clears existing backing model and replaces with the provided new data. */\n void resetData(ReadOnlyTaskManager newData);\n\n /** Returns the TaskManager */\n ReadOnlyTaskManager getTaskManager();\n\n /** Adds the given floating task */\n void addTask(Task task);\n \n /** Deletes the given floating task. */\n void deleteUndoneTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;\n\n /** Add the given floating tasks */\n void addTasks(List<Task> tasks);\n \n /** Archives the task by adding it into DoneTaskList */\n void addDoneTask(Task task);\n\n /** Removes the task permanently from the archive DoneTaskList **/\n void deleteDoneTask(ReadOnlyTask floatingTask) throws TaskNotFoundException;\n \n /** Archives the tasks by adding them into DoneTaskList */\n void addDoneTasks(List<Task> task);\n \n /** Returns the filtered undone task list as an {@code UnmodifiableObservableList<ReadOnlyPerson>} */\n UnmodifiableObservableList<ReadOnlyTask> getFilteredUndoneTaskList();\n \n /** Returns the filtered done task list as an {@code UnmodifiableObservableList<ReadOnlyPerson>} */\n UnmodifiableObservableList<ReadOnlyTask> getFilteredDoneTaskList();\n\n /** Updates the filter of the filtered task lists to show all tasks */\n void updateFilteredListsToShowAll();\n\n /** Updates the filter of the filtered task list to filter by the given keywords*/\n void updateFilteredUndoneTaskListNamePred(Set<String> keywords);\n\n /** Updates the filter of the filtered done task list to filter by the given keywords*/\n void updateFilteredDoneTaskListNamePred(Set<String> keywords);\n \n /** Returns true is current list is done task list, false if current list is undone task list*/\n Boolean isCurrentListDoneList();\n \n /** Sets current list to be done list*/\n public void setCurrentListToBeDoneList();\n \n /** Sets current list to be undone list*/\n public void setCurrentListToBeUndoneList();\n \n /** Edits the parameters of the given floating task*/\n\tvoid editTask(ReadOnlyTask taskToEdit, Name taskName, Date startDate, Date endDate, Priority priority,\n\t\t\tRecurrenceRate recurrenceRate);\n\t\n /** Clears existing backing model of the done task data and replaces with the provided new data. */\n void resetDoneData(ReadOnlyTaskManager newData);\n \n /** Clears existing backing model if the undone task data and replaces with the provided new data. */\n void resetUndoneData(ReadOnlyTaskManager newData);\n \n void setTaskManagerUndoneList(ObservableList<Task> list);\n\n void setTaskManagerDoneList(ObservableList<Task> list);\n \n void clearTaskManagerUndoneList();\n \n void clearTaskManagerDoneList();\n \n ObservableList<Task> getTaskManagerUndoneList();\n \n ObservableList<Task> getTaskManagerDoneList();\n\n void updateFilteredUndoneTaskListDatePred(String keyword) throws IllegalValueException;\n\n void updateFilteredDoneTaskListDatePred(String keyword) throws IllegalValueException;\n\n\n\n\n\n}", "private Task(Parcel in) {\n\t\tid = in.readInt();\n\t\tuser_id = in.readInt();\n\t\ttitle = in.readString();\n\t\tdescription = in.readString();\n\t\tdate = (Calendar) in.readSerializable();\n\t\tcreated_at = (Calendar) in.readSerializable();\n\t\tupdated_at = (Calendar) in.readSerializable();\n\t}", "public void parse() {\n if (commandSeparate.length == 1) {\n parseTaskType();\n } else if (commandSeparate.length == 2) {\n parseTaskType();\n index = commandSeparate[1];\n taskName = commandSeparate[1];\n } else {\n parseTaskType();\n parseTaskName();\n parseTaskDate();\n }\n }", "public TaskGenerator() {\n if (taskNames == null) {\n setUpNameList();\n }\n }", "public Task(String name) {\n\t\tthis.name=name;\n\t}", "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 void loadFields() {\n \tsuper.loadFields();\n \tif(getUIContext().get(\"taskId\")!=null){\n \t\teditData.setRelateTask((FDCScheduleTaskInfo) getUIContext().get(\"taskId\"));\n \t}\n \tfillPnlTaskInfo();\n \t\n }", "public void showTask(View v) {\n String taskIdStr = txtId.getText().toString();\n if (taskIdStr.isEmpty() || taskIdStr == null) {\n Toast.makeText(this, \"Please Insert task ID\", Toast.LENGTH_LONG).show();\n } else {\n try {\n int taskId = Integer.parseInt(taskIdStr);\n TaskModel taskmodel = taskManager.getTaskById(taskId);\n txtTaskName.setText(taskmodel.getTaskName());\n txtTaskDescription.setText(taskmodel.getTaskDescription());\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n }", "Task(String name) {\n this.name = name;\n }", "public void run()\n {\n String option = \"\";\n System.out.println(\"To Do List - Please enter an option\");\n System.out.println(\" add priority description (add a new task)\");\n System.out.println(\" next (remove and print most urgent task)\");\n System.out.println(\" quit (exit this program)\");\n System.out.println();\n \n Scanner in = new Scanner(System.in);\n \n do\n {\n System.out.print(\"> \");\n option = in.nextLine();\n if (option.startsWith(\"add\"))\n {\n addTask(option);\n }\n else if (option.equals(\"next\"))\n {\n nextTask();\n }\n } \n while (! option.equals(\"quit\"));\n }", "@Override\r\n\tpublic void PreExecute(TaskConfig config){\n\t}", "public void addTask(String optionStr)\n {\n Scanner in = new Scanner(optionStr);\n in.next();\n if (!in.hasNextInt()) {\n System.out.println(\"The priority must be an integer between 1 and 9.\");\n return;\n }\n int priority = in.nextInt();\n //System.out.println(\"priority: \" + priority);\n String task = in.nextLine();\n //System.out.println(\"task: \"+ task);\n pq.add(new Task(priority, task));\n\n }", "private void DataCreator() {\n\t\t// Creation of employees\n\t\tEmployee emp1 = new Employee(\"Akos\", \"Toth\", true);\n\t\tEmployee emp2 = new Employee(\"Gabor\", \"Kovacs\", true);\n\t\tEmployee emp3 = new Employee(\"Adam\", \"Ciceri\", true);\n\n\t\tempRep.save(emp1);\n\t\tempRep.save(emp2);\n\t\tempRep.save(emp3);\n\t\tLOGGER.info(\"TEST DATA: Employees saved!\");\n\n\t\t// creation of tasks\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\n\t\ttry {\n\t\t\tTaskStates task1State = new TaskStates(\"CLOSED\");\n\t\t\tProjectTask task1 = new ProjectTask(\n\t\t\t\t\t\"Modelling of system\",\n\t\t\t\t\t\"Engineering Systems Analyst\",\n\t\t\t\t\t\"Engineering Systems Analyst Dorking Surrey Salary ****K Our client is located in Dorking, Surrey and are looking for Engineering Systems Analyst our client provides specialist software development Keywords Mathematical Modelling, Risk Analysis, System Modelling, Optimisation, MISER, PIONEEER Engineering Systems Analyst Dorking Surrey Salary ****K\",\n\t\t\t\t\ttask1State,\n\t\t\t\t\tsdf.parse(\"20-01-2015\"),\n\t\t\t\t\tsdf.parse(\"25-01-2015\"),\n\t\t\t\t\t0.9);\n\t\t\tTaskStates task2State = new TaskStates(\"OPEN\");\n\t\t\tProjectTask task2 = new ProjectTask(\n\t\t\t\t\t\"Material performance design\",\n\t\t\t\t\t\"Stress Engineer Glasgow\",\n\t\t\t\t\t\"Stress Engineer Glasgow Salary **** to **** We re currently looking for talented engineers to join our growing Glasgow team at a variety of levels. The roles are ideally suited to high calibre engineering graduates with any level of appropriate experience, so that we can give you the opportunity to use your technical skills to provide high quality input to our aerospace projects, spanning both aerostructures and aeroengines. In return, you can expect good career opportunities and the chance for advancement and personal and professional development, support while you gain Chartership and some opportunities to possibly travel or work in other offices, in or outside of the UK. The Requirements You will need to have a good engineering degree that includes structural analysis (such as aeronautical, mechanical, automotive, civil) with some experience in a professional engineering environment relevant to (but not limited to) the aerospace sector. You will need to demonstrate experience in at least one or more of the following areas: Structural/stress analysis Composite stress analysis (any industry) Linear and nonlinear finite element analysis Fatigue and damage tolerance Structural dynamics Thermal analysis Aerostructures experience You will also be expected to demonstrate the following qualities: A strong desire to progress quickly to a position of leadership Professional approach Strong communication skills, written and verbal Commercial awareness Team working, being comfortable working in international teams and self managing PLEASE NOTE SECURITY CLEARANCE IS REQUIRED FOR THIS ROLE Stress Engineer Glasgow Salary **** to ****\",\n\t\t\t\t\ttask2State,\n\t\t\t\t\tsdf.parse(\"20-06-2015\"),\n\t\t\t\t\tnull,\n\t\t\t\t\t0.0);\n\t\t\tTaskStates task3State = new TaskStates(\"IN_PROGRESS\");\n\t\t\tProjectTask task3 = new ProjectTask(\n\t\t\t\t\t\"Implementation embedded system\",\n\t\t\t\t\t\"CNC Programmer\",\n\t\t\t\t\t\"Working within a small but busy sub contract ISO accredited sub contract machine shop. Must be able to programme straight from drawings programming and operating a Bridgeport VMC or a Haas VMC with Heidenhain controls. Machining 1 off,s to small batch work. Hours of work are Mon Thurs 8am 5.00pm and 3.00pm finish on a Friday\",\n\t\t\t\t\ttask3State,\n\t\t\t\t\tsdf.parse(\"20-03-2015\"),\n\t\t\t\t\tnull,\n\t\t\t\t\t0.0);\n\n\t\t\ttaskStatesRep.save(task1State);\n\t\t\ttaskStatesRep.save(task2State);\n\t\t\ttaskStatesRep.save(task3State);\n\t\t\t\n\t\t\tprjTaskRep.save(task1);\n\t\t\tprjTaskRep.save(task2);\n\t\t\tprjTaskRep.save(task3);\n\t\t\tLOGGER.info(\"TEST DATA: Tasks and task statuses saved!\");\n\t\t\t\n\t\t\t// creation of project\n\t\t\tProject prj1 = new Project(\"Building modernization\", sdf.parse(\"01-01-2015\"), sdf.parse(\"01-09-2015\"), 0.9, 0.1, true);\n\t\t\tTaskSet tskSet1 = prj1.assignTaskToEmployee(emp1, task1);\n\t\t\tTaskSet tskSet2 = prj1.assignTaskToEmployee(emp2, task2);\n\t\t\tTaskSet tskSet3 = prj1.assignTaskToEmployee(emp3, task3);\n\t\n\t\t\ttaskSetRep.save(tskSet1);\n\t\t\ttaskSetRep.save(tskSet2);\n\t\t\ttaskSetRep.save(tskSet3);\n\t\t\tLOGGER.info(\"TEST DATA: Task sets are saved!\");\n\t\n\t\t\tprjRep.save(prj1);\n\t\t\tLOGGER.info(\"TEST DATA: Projects are saved!\");\n\t\t\t\n\t\t\t//creation of Performance statistics\n\t\t\tPerfStat emp1PerfStat = new PerfStat(prj1, emp1, 10, 5, 0, 100);\n\t\t\tPerfStat emp2PerfStat = new PerfStat(prj1, emp2, 5, 15, 6, 170);\n\t\t\tPerfStat emp3PerfStat = new PerfStat(prj1, emp3, 0, 6, 3, 20);\n\t\t\t\n\t\t\tperfStatRep.save(emp1PerfStat);\n\t\t\tperfStatRep.save(emp2PerfStat);\n\t\t\tperfStatRep.save(emp3PerfStat);\n\t\t\tLOGGER.info(\"TEST DATA: Project and employee assignments are saved!\");\n\n\t\t\t\n\t\t\tLOGGER.info(\"TEST DATA: Upload of TEST employee, task and project data is FINISHED!\");\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void editTask(String newTask) {\n task = newTask;\n }", "public static void promptDate(ArrayList<Task> taskList) {\n String prompt = \"change the date of\"; // initializing the prompt to the user\n Task task; // declaring the task variable for date changing\n int index = promptIndex(taskList, prompt); // prompting, receiving, and error checking the user's input\n if (index != -1) { // if the index exists\n task = taskList.get(index); // assigning the variable pointer to the task at this index\n // declaring the integer variables for the month, day, and year numbers\n int month; // month number\n int day; // day number\n int year; // year number\n // month prompting and error checking\n do { // error checking for correct month value\n System.out.print(\"Enter valid month #: \"); // prompting the user for month number\n month = input.nextInt(); // receiving the user's input for month\n input.nextLine(); // preventing the nextInt/nextLine error\n } while (month < 1 || month > 12); // while the user does not enter a valid input for month\n // year prompting and error checking\n do {\n System.out.print(\"Enter valid year #: \"); // prompting the user for year number\n year = input.nextInt(); // receiving the user's input for year\n input.nextLine(); // preventing the nextInt/nextLine error\n } while (year < 0); // while the user does not enter a valid input for day\n // day prompting and error checking\n do { // error checking for correct day value\n System.out.print(\"Enter valid day #: \"); // prompting the user for day number\n day = input.nextInt(); // receiving the user's input for day\n input.nextLine(); // preventing the nextInt/nextLine error\n } while (day > checkDaysInMonth(month, year) || day <= 0); // while the user does not enter a valid input for day\n String formattedDate = String.format(\"%02d/%02d/%04d\", month, day, year); // formatting the date into String format of mm/dd/yyyy\n task.setDate(formattedDate); // setting the date of the Task object\n } \n System.out.print(\"\\n\"); // printing a newline for formatting\n pause(); // pausing the screen\n }", "public void inputTask(Task task) {\n \tif (task != null) {\n if (task.aboveThreshold()) { // set a threshold?\n report(task.getSentence(), true); // report input\n newTasks.add(task); // wait to be processed in the next cycle\n }\n }\n }", "@Override\n public String getInputParameter(String task) {\n try {\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task);\n JSONArray response = new JSONArray();\n if (inputParameters != null) {\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"id\", input.getId());\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n i.put(\"tiid\", task);\n response.add(i);\n }\n return response.toString();\n }\n return null;\n\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void AddTaskToDB(View view){\n\t\tif (TASK_CREATED == true){\n\t\t\tString name = taskName.getText().toString();\n\t\t\tString desc = taskDescription.getText().toString();\n//\t\t\tlong millisecondsToReminder = 0;\n\t\t\tlong millisecondsToCreated = 0;\n//\t\t\tyear = taskDatePicker.getYear();\n//\t\t\tmonth = taskDatePicker.getMonth() + 1;\n//\t\t\tday = taskDatePicker.getDayOfMonth();\n//\t\t\thour = taskTimePicker.getCurrentHour();\n//\t\t\tminute = taskTimePicker.getCurrentMinute();\n\t\t\ttry {\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tDate dateCreated = cal.getTime();\n\t\t\t\tmillisecondsToCreated = dateCreated.getTime();\n//\t\t\t\tString dateToParse = day + \"-\" + month + \"-\" + year + \" \" + hour + \":\" + minute;\n//\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"d-M-yyyy hh:mm\");\n//\t\t\t\tDate date = dateFormatter.parse(dateToParse);\n//\t\t\t\tmillisecondsToReminder = date.getTime();\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} // You will need try/catch around this\n\n\t\t\tBujoDbHandler taskHandler = new BujoDbHandler(view.getContext());\n\t\t\tcurrentTask = new Task(name, desc, millisecondsToCreated);\n\t\t\ttaskHandler.addTask(currentTask);\n\t\t}\n\t}", "public void setTask(TaskDTO task) {\n\t\tthis.task = task;\r\n\t\t\r\n\t\t\r\n\t}", "public Todo(String task) {\n super(task);\n }", "public void createTask(View view){\n\n String title = ((EditText) findViewById(R.id.title)).getText().toString();\n String description = ((EditText) findViewById(R.id.description)).getText().toString();\n\n if(TextUtils.isEmpty(title) || TextUtils.isEmpty(description)) {\n if (TextUtils.isEmpty(title))\n Toast.makeText(this, \"Title cannot be empty\", Toast.LENGTH_SHORT).show();\n\n if (TextUtils.isEmpty(description))\n Toast.makeText(this, \"Description cannot be empty\", Toast.LENGTH_SHORT).show();\n } else {\n\n Intent intent = new Intent();\n intent.putExtra(TITLE, title);\n intent.putExtra(DESCRIPT, description);\n\n setResult(RESULT_OK, intent);\n this.finish();\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n \tsuper.onCreate(savedInstanceState);\n \n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n this.requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.activity_new_task);\n \n nameText = (EditText) findViewById(R.id.NameBox);\n \tdatePicker = (DatePicker)findViewById(R.id.datepicker);\n \tlengthText = (EditText) findViewById(R.id.estimatedlength);\n \tprogressBar = (SeekBar) findViewById(R.id.currentprogress);\n \tpriorityBox = (CheckBox)findViewById(R.id.highpriority);\n \t\n \t// If a task was passed in, attempt to load it\n \tBundle passedData = getIntent().getExtras();\n if (passedData != null) {\n \tTask task = new Task();\n \ttask.extractBundle(passedData);\n \t\n \ttask.get(Task.Attributes.Name, nameText);\n \ttask.get(Task.Attributes.Duedate, datePicker);\n \ttask.get(Task.Attributes.Hours, lengthText);\n \ttask.get(Task.Attributes.Progress, progressBar);\n \ttask.get(Task.Attributes.Priority, priorityBox);\n \t\n \tid = passedData.getLong(\"DB_ID\");\n \teditmode = true;\n } \n \t\n Button save = (Button) findViewById(R.id.save);\n\t\tsave.setOnClickListener(new OnClickListener() { public void onClick(View v) { saveTask();} } );\n \n }", "private void doModifyTask() {\n System.out.println(\"Select the task you would like to modify by entering the appropriate index number.\");\n int index = input.nextInt();\n try {\n todoList.validateIndex(index);\n System.out.println(\"Enter the modified time and description to be added.\");\n String time = input.nextLine();\n String description = input.nextLine();\n System.out.println(\"Enter the modified date to be added.\");\n String date = input.nextLine();\n todoList.modifyTask(index, time, description, date);\n System.out.println(\"The selected task has been modified.\");\n } catch (IllegalInputException e) {\n System.err.println(\"Invalid index number entered\");\n }\n }", "public ConvertTextUnitsTask() {\n \n super();\n \n Label = LABEL;\n TaskParameterClassName = TASK_PARAMETER_CLASS_NAME;\n TaskResultClassName = TASK_RESULT_CLASS_NAME;\n ControlPanelClassName = CONTROL_PANEL_CLASS_NAME;\n ProjectPropertyData = PROJECT_PROPERTY_DATA;\n \n }", "private void assignComponents() {\r\n if (myTask != null) {\r\n textFieldName.setText(myTask.getName());\r\n textFieldDescription.setText(myTask.getDescription());\r\n textFieldDueDate.setText(myTask.getDueDate().toString());\r\n comboPriority.setSelectedItem(myTask.getPriority());\r\n } else {\r\n textFieldName.setText(null);\r\n textFieldDescription.setText(null);\r\n textFieldDueDate.setText(null);\r\n comboPriority.setSelectedItem(-1);\r\n }\r\n }", "public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tuserTaskEClass.getESuperTypes().add(this.getTask());\n\t\tapplicationTaskEClass.getESuperTypes().add(this.getTask());\n\t\tinteractionTaskEClass.getESuperTypes().add(this.getTask());\n\t\tabstractionTaskEClass.getESuperTypes().add(this.getTask());\n\t\tnullTaskEClass.getESuperTypes().add(this.getTask());\n\t\tchoiceOperatorEClass.getESuperTypes().add(this.getTemporalOperator());\n\t\torderIndependenceOperatorEClass.getESuperTypes().add(this.getTemporalOperator());\n\t\tinterleavingOperatorEClass.getESuperTypes().add(this.getTemporalOperator());\n\t\tsynchronizationOperatorEClass.getESuperTypes().add(this.getTemporalOperator());\n\t\tparallelOperatorEClass.getESuperTypes().add(this.getTemporalOperator());\n\t\tdisablingOperatorEClass.getESuperTypes().add(this.getTemporalOperator());\n\t\tsequentialEnablingInfoOperatorEClass.getESuperTypes().add(this.getTemporalOperator());\n\t\tsequentialEnablingOperatorEClass.getESuperTypes().add(this.getTemporalOperator());\n\t\tsuspendResumeOperatorEClass.getESuperTypes().add(this.getTemporalOperator());\n\n\t\t// Initialize classes and features; add operations and parameters\n\t\tinitEClass(taskModelEClass, TaskModel.class, \"TaskModel\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getTaskModel_Root(), this.getTask(), null, \"root\", null, 1, 1, TaskModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getTaskModel_Tasks(), this.getTask(), null, \"tasks\", null, 1, -1, TaskModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getTaskModel_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, TaskModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(taskEClass, Task.class, \"Task\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getTask_Id(), ecorePackage.getEString(), \"id\", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getTask_Name(), ecorePackage.getEString(), \"name\", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getTask_Operator(), this.getTemporalOperator(), null, \"operator\", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getTask_Subtasks(), this.getTask(), this.getTask_Parent(), \"subtasks\", null, 0, -1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getTask_Parent(), this.getTask(), this.getTask_Subtasks(), \"parent\", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getTask_Min(), ecorePackage.getEIntegerObject(), \"min\", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getTask_Max(), ecorePackage.getEIntegerObject(), \"max\", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getTask_Iterative(), ecorePackage.getEBooleanObject(), \"iterative\", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(userTaskEClass, UserTask.class, \"UserTask\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(applicationTaskEClass, ApplicationTask.class, \"ApplicationTask\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(interactionTaskEClass, InteractionTask.class, \"InteractionTask\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(abstractionTaskEClass, AbstractionTask.class, \"AbstractionTask\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(nullTaskEClass, NullTask.class, \"NullTask\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(temporalOperatorEClass, TemporalOperator.class, \"TemporalOperator\", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(choiceOperatorEClass, ChoiceOperator.class, \"ChoiceOperator\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(orderIndependenceOperatorEClass, OrderIndependenceOperator.class, \"OrderIndependenceOperator\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(interleavingOperatorEClass, InterleavingOperator.class, \"InterleavingOperator\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(synchronizationOperatorEClass, SynchronizationOperator.class, \"SynchronizationOperator\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(parallelOperatorEClass, ParallelOperator.class, \"ParallelOperator\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(disablingOperatorEClass, DisablingOperator.class, \"DisablingOperator\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(sequentialEnablingInfoOperatorEClass, SequentialEnablingInfoOperator.class, \"SequentialEnablingInfoOperator\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(sequentialEnablingOperatorEClass, SequentialEnablingOperator.class, \"SequentialEnablingOperator\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(suspendResumeOperatorEClass, SuspendResumeOperator.class, \"SuspendResumeOperator\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}", "private Tasks createTaskListForAddingOrUpdating(ArrayList<String> arguments) {\n Tasks task = null;\n String descriptionOfTask = arguments.get(0);\n ArrayList<String> timeArray = getTimeArray(arguments, 0);\n int numberOfArguments = timeArray.size();\n \n if (numberOfArguments == 0) {\n task = new FloatingTask(descriptionOfTask);\n } else {\n try {\n for (int i = 0; i < timeArray.size(); i++) {\n Integer.parseInt(timeArray.get(i));\n }\n task = createNoKeywordTask(task, descriptionOfTask, timeArray, numberOfArguments);\n } catch (NumberFormatException e) {\n task = createKeywordTask(task, descriptionOfTask, timeArray);\n }\n }\n return task;\n }", "@Override\r\n\tpublic void setModel() {\n\t\tnew UpUI(context).execute();\r\n\t}", "public static void createEntitySources() {\n UUID makeBreakfastId = UUID.fromString(\"fab3906e-b50a-11eb-b13c-0242ac110002\"); //saved.getId()\n ITodo makeBreakfast = SelectTemplate.selectOne(ITodo.class, new Object[]{makeBreakfastId}, new HashMap<>());\n System.out.println(\"selected -> \" + makeBreakfast.getId());\n\n UUID makePancakeId = UUID.fromString(\"fab6a862-b50a-11eb-b13c-0242ac110002\");\n ITodo makePancake = SelectTemplate.selectOne(ITodo.class, new Object[]{makePancakeId}, new HashMap<>());\n System.out.println(\"selected -> \" + makePancake.getId());\n\n //modify found task\n makeBreakfast.setNextTask(makePancake);\n\n //updated modified task\n UpdateTemplate.updateOne(makeBreakfast);\n ITodo updatedTask = SelectTemplate.selectOne(ITodo.class, new Object[]{makeBreakfast.getId()}, new HashMap<>());\n System.out.println(\"updated -> \" + updatedTask.getId());\n }", "private <E, F extends ITaskObject> IStatusTask createInitTask(F taskObject) {\n ITaskObjectManager<E, F> taskObjectManager = getTaskManagerConfiguration().getTaskObjectManagerRegistry().getTaskObjectManager(taskObject);\n Class<F> taskObjectClass = taskObjectManager.getTaskObjectClass();\n\n E currentStatus = taskObjectManager.getInitialStatus(taskObject);\n\n // Create a first task, it does nothing\n return getTaskManagerConfiguration().getTaskFactory().newStatusTask(null, taskObjectClass, currentStatus);\n }", "public Task() {\n\t}", "public ToDoCommand(TaskList taskList, Storage storage, Ui ui, String userInput) {\n super(taskList, storage, ui, userInput);\n }", "@FXML\n private void handleUserInput() {\n String input = inputTextField.getText();\n storeUserInputHistory(input);\n try {\n Command command = ParserFactory.parse(input);\n command.execute(tasks, storage, history);\n } catch (ChronologerException e) {\n e.printStackTrace();\n }\n printUserMessage(\" \" + input);\n printChronologerMessage(UiMessageHandler.getOutputForGui());\n inputTextField.clear();\n }", "@Override\n\tpublic void execute(Model model) {\n\t\tString userid = (String)model.asMap().get(\"userid\");\n//\t\tString nickname = (String)model.asMap().get(\"nickname\");\n\t\t\n\t\tRecipeDAO dao = new RecipeDAO();\n\t\tArrayList<MyRecipeDTO> list = dao.MyRecipe(userid);\n\t\t\n\t\tmodel.addAttribute(\"MyRecipe\", list); \n\t}", "@PostConstruct\n public void setUpTasks() {\n final Iterable<Task> findAll = taskService.findAll();\n if (findAll != null) {\n findAll.forEach(task -> {\n\n final RunnableTask runnableTask = new RunnableTask(task.getId(), runTaskService);\n\n if (task.getCronExpression() != null) {\n log.info(\"Adding cron schedule for {} : {}\", task.getId(), task.getCronExpression());\n threadPoolTaskScheduler.schedule(runnableTask, new CronTrigger(task.getCronExpression()));\n }\n else if (task.getDelayPeriod() > 0) {\n log.info(\"Adding periodic schedule for {} : {}\", task.getId(), task.getDelayPeriod());\n threadPoolTaskScheduler.schedule(runnableTask, new PeriodicTrigger(task.getDelayPeriod()));\n }\n else {\n log.error(\"Invalid task {}\", task.getId());\n }\n\n });\n }\n }", "public void processUser() {\r\n view.printMessage(View.GEM_POOL + model.getStonePool());\r\n chooseMenuOption(chooseParameters(INTEGER_DELIMITERS, View.INPUT_PARAMETERS, true));\r\n\r\n\r\n }", "public void createTask(Task task) {\n ContentValues values = new ContentValues();\n values.put(SQLiteHelper.COLUMN_NAME, task.getName());\n database.insert(SQLiteHelper.TABLE_TASKS, null, values);\n }" ]
[ "0.67153937", "0.61780435", "0.60206085", "0.5982059", "0.5981447", "0.58522063", "0.582444", "0.5792707", "0.5760699", "0.57502997", "0.57497716", "0.569967", "0.5697653", "0.5680587", "0.5678153", "0.56750304", "0.56465685", "0.56144494", "0.5612041", "0.5586027", "0.55759245", "0.5508144", "0.5498622", "0.5493", "0.548114", "0.54664797", "0.5455555", "0.5455491", "0.54532397", "0.54497063", "0.5449169", "0.544307", "0.5434295", "0.5412025", "0.5400874", "0.53905904", "0.5366495", "0.53657305", "0.53657305", "0.53657305", "0.5354322", "0.53485245", "0.53394663", "0.533746", "0.5324374", "0.53196746", "0.5285473", "0.5262336", "0.526122", "0.5258148", "0.52567154", "0.52543855", "0.5252998", "0.5249629", "0.5240008", "0.52362466", "0.5229707", "0.522745", "0.5222003", "0.5218931", "0.52180123", "0.521573", "0.5213892", "0.5209607", "0.5209397", "0.5204685", "0.5197935", "0.5194389", "0.5191895", "0.5191064", "0.5189984", "0.5179929", "0.51730543", "0.5171715", "0.51686466", "0.5167689", "0.51606524", "0.51500744", "0.51473767", "0.51449925", "0.51395047", "0.51390034", "0.51359934", "0.5131156", "0.5124479", "0.51229054", "0.51124257", "0.5103771", "0.51027775", "0.5101267", "0.50991946", "0.5089279", "0.50780797", "0.5075359", "0.5072217", "0.5071024", "0.50699675", "0.5067123", "0.5063415", "0.5061043" ]
0.52186465
60
Sets up a bank account the specified account number and initial balance.
public saccoAccount (int account_num, double initial_balance) { account = account_num; balance = initial_balance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}", "public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}", "public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public Account(double balance) {\n\t\tthis.balance = balance;\n\t}", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "public BankAccount(int accountNum, String customerName, double balance){\n this.accountNum = accountNum;\n this. customerName = customerName;\n this.balance = balance;\n }", "public BankAccount(int accountNum, String customerName){\n this.accountNum = accountNum;\n this.customerName = customerName;\n balance = 0;\n }", "public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }", "public void setAccount(String bank, String account)\n\t{\n\t\tbank = bank.trim().replaceAll(\" +\",\" \");\n\t\t\n\t\tif(account.length() == 19) //length of digits including hyphen(-)\n\t\t{\n\t\t this.account = MaskDigits.mask(account, \"xxxx-xxxx-xxxx-####\");\n\t\t}\n\t\tif(bank.equals(\"HSBC Canada\"))\n\t\t{\n\t\t\t\n\t\t\tthis.account = MaskDigits.mask(account, \"##xx-xxxx-xxxx-xxxx\");\n\t\t}\n\t\t\n\t\tif(bank.equals(\"Royal Bank of Canada\"))\n\t\t{\n\t\t\tthis.account = MaskDigits.mask(account, \"####-xxxx-xxxx-xxxx\");\n\t\t}\n\t\t\n\t\tif(bank.equals(\"American Express\"))\n\t\t{\n\t\t\tthis.account = MaskDigits.mask(account, \"xxxx-xxxx-xxxx-###\");\n\t\t}\n\t}", "public BankAccount(String holderName, String number, float balance){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = balance;\r\n\t}", "public BankAccount() {\n numberOfAccounts++;\n this.accountNumber = accountNumberGenerator(); \n }", "public BankAccount(String accountName, int balance) {\n this.accountName = accountName;\n this.balance = balance;\n this.valueDeposits = balance;\n this.valueWithdrawals = 0;\n this.maximumBalance = balance;\n this.minimumBalance = balance;\n }", "public SavingAccount(double initialBalance)\n\t\t { \n\t\t super(initialBalance);\n\t\t }", "Account(int account_number,double balance) //pramiterized constrector\n {\n this.account_number=account_number;\n this.balance=balance;\n }", "public Account(int id, double initialBalance){\n\t\tthis.id = id;\n\t\tbalance = initialBalance;\n\t\tdateCreated = new Date();\n\t}", "public BankAccount()\n {\n \t//intializing instance variables\n \t//at the time object creation constuctor executes \n \t\n \taccountHolderName=\"unknow\";\n \taccountBalance=0;\n \t\n }", "void setAccountNumber(java.lang.String accountNumber);", "public BankAccount() {\r\n\t\tbalance=0;\r\n\t\t\r\n\t}", "public void setBalance(double balance)\n {\n startingBalance = balance;\n }", "public void setBankAccount(final int newBAccount) {\n this.bankAccount = newBAccount;\n }", "public BankAccount() {\n\t\tthis.money = 0;\n\t}", "public Account(Holder holder, int balance) {\n this.holder = holder;\n this.balance = balance;\n }", "void setAccount(final Account account);", "public BankAccount(int accountNo, String name, double balance) {\n this.accountNo = accountNo;\n this.name = name;\n if(balance > 0.0)\n this.balance = balance;\n }", "public Savings_Account (int account_num, double initial_balance, double interest_rate) \r\n {\r\n\r\n super (account_num, initial_balance);\r\n\r\n rate = interest_rate;\r\n\r\n }", "BankAccount(double initBalance, Customer customer) throws CreditHistoryException {\n\t\tif (CreditAgency.checkCreditHistory(customer))\n\t\t\tthrow new CreditHistoryException();\n\t\tsetRandomNo();\n\t\tthis.balance = initBalance;\n\t\tthis.cheque = 0;\n\t\tthis.customer = customer;\n\t\tthis.PIN = getRandomPIN(6);\n\t\tthis.isSuspended = false;\n\t}", "public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }", "public Bank(long accNumber, float accBalance) {\n\t\tsuper();\n\t\tthis.accNumber = accNumber;\n\t\tthis.accBalance = accBalance;\n\t}", "public void addAccount(String accountNumber, String owner, BigDecimal startBalance) throws SQLException {\r\n\r\n\t\ttry (Connection connection = dbAdministration.getConnection();\r\n\t\t\t\tPreparedStatement preparedStatement = connection\r\n\t\t\t\t\t\t.prepareStatement(\"INSERT INTO account VALUES (?,?,?)\")) {\r\n\t\t\tint id = dbAdministration.getEntryCount(\"account\") + 1;\r\n\t\t\tpreparedStatement.setInt(1, id);\r\n\t\t\tpreparedStatement.setString(2, owner);\r\n\t\t\tpreparedStatement.setString(3, accountNumber);\r\n\t\t\t// Datensatz in die Datenbanktabelle schreiben\r\n\t\t\tpreparedStatement.execute();\r\n\t\t\tlogger.info(\"SQL-Statement ausgeführt: \" + \"INSERT INTO account VALUES (\" + id + \", \" + owner + \", \"\r\n\t\t\t\t\t+ accountNumber + \")\");\r\n\t\t\tlogger.info(\"Neues Konto angelegt. Besitzer: \" + owner + \", Kontonr.: \" + accountNumber + \", Startkapital: \"\r\n\t\t\t\t\t+ startBalance);\r\n\t\t\tif (startBalance.compareTo(BigDecimal.ZERO) == 1) {\r\n\t\t\t\t// Wenn das angeforderte Startguthaben > 0 ist, wird es dem\r\n\t\t\t\t// Konto überwiesen\r\n\t\t\t\tdaTransaction.addTransaction(\"0000\", accountNumber, startBalance, \"STARTGUTHABEN\");\r\n\t\t\t}\r\n\t\t\t// Die reservierte Nummer gehört jetzt zu einem Konto, daher\r\n\t\t\t// kann die Reservierung aufgehoben werden\r\n\t\t\treservedNumbers.remove(accountNumber);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(e);\r\n\t\t}\r\n\t}", "public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some validation in the other functions\r\n //not nessacary\r\n setAccNum(accNum);\r\n this.bal=bal;\r\n this.name=name;\r\n this.email=email;\r\n this.phone=phone;\r\n\r\n }", "public Account()\n {\n // initialise instance variables\n balance = 0.00;\n remainder = 0;\n }", "public BankAccount(String holderName, String number){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = 0;\r\n\t}", "public Account(int accountNo, String accountHolderName, double balance) {\r\n this.accountNo = accountNo;\r\n this.accountHolderName = accountHolderName;\r\n this.balance = balance;\r\n\r\n Account.accountCount++;\r\n }", "public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate)\r\n {\r\n\r\n super (account_num, initial_balance, interest_rate);\r\n\r\n }", "public BankAccount createAccount(String name, String pin, int initialDeposit) {\n\t\tString accountNumber = \"\";\n\n\t\tString sql = \"INSERT INTO accounts (id, name, pin, balance, balance_saving) VALUES(?, ?, ?, ?, ?)\";\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// not sure why this was changed, but the database should of been auto-incrementing id\n\t\t\tpstmt.setInt(1, getNumAccounts() + 1);\n\t\t\tpstmt.setString(2, name);\n\t\t\tpstmt.setString(3, pin);\n\t\t\tpstmt.setInt(4, initialDeposit);\n\t\t\tpstmt.setInt(5, 0);\n\n\t\t\tpstmt.executeUpdate();\n\t\t\tResultSet genky = pstmt.getGeneratedKeys();\n\t\t\taccountNumber = Long.toString(genky.getLong(1));\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn authenticateAccount(accountNumber, pin);\n\t}", "public BankAccount(double basicMoney) {\n\t\tthis.money = basicMoney;\n\t}", "public Account(int accNmr, String firstName, String lastName, double balance) {\n this.accNmr = accNmr;\n this.firstName = firstName;\n this.lastName = lastName;\n this.balance = balance;\n }", "Account(String name, double balance)\r\n\t{\r\n\t\t\r\n\t\tthis.name = name; //assign name to the instance variable name \r\n\t\t\r\n\t\t// validate that the balance is greater that 0.0; if it is not,\r\n\t\t// instance variable balance keeps its default value 0.0\r\n\t\tif(balance > 0.0) // if balance is valid\r\n\t\t\tthis.balance = balance; // assign balance to the instance variable balance\t\t\t\t\t\r\n\t}", "BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}", "public void initAccount() {\n initAccount(Huobi.PLATFORM_NAME, Gateio.PLATFORM_NAME, \"EOS_USDT\", 14.5632);\n\n\n initAccount(Huobi.PLATFORM_NAME, Fcoin.PLATFORM_NAME, \"LTCUSDT\", 112.610000000);\n initAccount(Huobi.PLATFORM_NAME, Fcoin.PLATFORM_NAME, \"BCHUSDT\", 1032.690000000);\n initAccount(Huobi.PLATFORM_NAME, Fcoin.PLATFORM_NAME, \"ETHUSDT\", 572.300000000);\n\n initAccount(Huobi.PLATFORM_NAME, Dragonex.PLATFORM_NAME, \"EOSUSDT\", 13.1469);\n initAccount(Huobi.PLATFORM_NAME, Dragonex.PLATFORM_NAME, \"NEOUSDT\", 48.4760);\n initAccount(Huobi.PLATFORM_NAME, Dragonex.PLATFORM_NAME, \"ETHUSDT\", 572.1195);\n }", "public BankAccount1(String str, double initialBalance) {\n\t\tbalance = initialBalance;\n\t\tcustomerName = str;\n\t}", "@Override\n\tpublic void createAccount(String username, Bank bank) {\n\t\ttry {\n\t\tAccount newAccount = new Account(username, bank.getBankID(), bank.getNumOfAccounts()+1);\n\t\tbank.setNumOfAccounts(bank.getNumOfAccounts()+1);\n\t\taddAccount(bank, newAccount);\n\t\t}catch(NullPointerException e) {\n\t\t\tSystem.out.println(\"Could not find bank\");\n\t\t}\n\t\t\n\t}", "public Account(String currency) {\n //numAccount += 1;\n incrementNumAccount();\n this.accountID = numAccount;\n this.dateOfCreation = LocalDate.now();\n\n setPrimaryCurrency(currency);\n this.currencyBalance = Money.of(0, this.primaryCurrency);\n ownerID = new ArrayList<>();\n }", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public Account(String number, double balance, String customerName, String customerEmail, String customerPhone) {\n // set the instance's field variables directly, and do NOT use the setters inside constructor.\n this.number = number;\n this.balance = balance;\n this.customerName = customerName;\n this.customerEmail = customerEmail;\n this.customerPhone = customerPhone;\n }", "public CashAccount(double initialCash, double tradingFeePerShare){\n\t\tthis(initialCash);\n\t\tthis.tradingFeePerShare = tradingFeePerShare;\n\t}", "public Account() {\n\t\t//starting amount is 1500\n\t\tmoney = 1500;\n\t}", "public void setBalance(final int balance)\n {\n this.balance = balance;\n }", "public BankAccount(String accountHolderName, String accountNumber, String routingNumber){\n this.mAccountHolderName = accountHolderName;\n this.mAccountNumber = accountNumber;\n this.mRoutingNumber = routingNumber;\n balance = BigDecimal.ZERO;\n }", "public synchronized void setAccountNumber(int number) {\n this.accountNumber = number;\n }", "Account(int id, double balance){\r\n\t\t//sets the default values and than the specified values of the id and balance\r\n\t\tsetId(id);\r\n\t\tsetBalance(balance);\t\t \r\n\t\tsetAnnualInterestRate(0);\r\n\t\tthis.dateCreated = new Date(System.currentTimeMillis());\r\n\t }", "void setManageTransactionBalance(String balance);", "public void setAccount(Account account) {\n this.account = account;\n }", "public Checking_Account (int account_num, double initial_balance, Savings_Account protection)\r\n {\r\n\r\n super (account_num, initial_balance);\r\n overdraft = protection;\r\n\r\n }", "Bank(String name, double currentAmount) {\n this.accountName = name;\n this.currentAmount = currentAmount;\n }", "public SavingsAccount(String n) {\n super(n); \n balance = 0;\n }", "public void setInitilaCash(int noOfBills) throws java.lang.Exception;", "public void setBalance( Integer account_id, double balance ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n params.put(\"balance\", String.valueOf(balance));\r\n String url = API_DOMAIN + ACCOUNT_EXT + SET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }", "protected Account(String n, float b) {\n this(n); \n balance = b;\n }", "public void setBankAccountNumber(int bankAccountNumber) {\n this.bankAccountNumber = bankAccountNumber;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "private void setBalance(double balance) {\n this.balance = balance;\n }", "public void setBP_BankAccount(MBPBankAccount ba) {\n log.fine(\"\" + ba);\n if (ba == null) {\n return;\n }\n setC_BPartner_ID(ba.getC_BPartner_ID());\n setAccountAddress(ba.getA_Name(), ba.getA_Street(), ba.getA_City(),\n ba.getA_State(), ba.getA_Zip(), ba.getA_Country());\n setA_EMail(ba.getA_EMail());\n setA_Ident_DL(ba.getA_Ident_DL());\n setA_Ident_SSN(ba.getA_Ident_SSN());\n //\tCC\n if (ba.getCreditCardType() != null) {\n setCreditCardType(ba.getCreditCardType());\n }\n if (ba.getCreditCardNumber() != null) {\n setCreditCardNumber(ba.getCreditCardNumber());\n }\n if (ba.getCreditCardExpMM() != 0) {\n setCreditCardExpMM(ba.getCreditCardExpMM());\n }\n if (ba.getCreditCardExpYY() != 0) {\n setCreditCardExpYY(ba.getCreditCardExpYY());\n }\n if (ba.getCreditCardVV() != null) {\n setCreditCardVV(ba.getCreditCardVV());\n }\n //\tBank\n if (ba.getAccountNo() != null) {\n setAccountNo(ba.getAccountNo());\n }\n if (ba.getRoutingNo() != null) {\n setRoutingNo(ba.getRoutingNo());\n }\n }", "void setBank(shared.data.Bank bank);", "public void InitializeBalance(BigDecimal valor){\n \r\n ChekingAccount chekAc=pRepository.GetChekingAccount();\r\n chekAc.setSaldoInicial(valor);\r\n pRepository.SaveChekingAccount(chekAc);\r\n \r\n }", "public EnterToAccount(Bank bank) {\n this.bank = bank;\n initComponents();\n setVisible(true);\n }", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "public Account(String name, Double balance, String accNum){\n\t\tthis.name = name;\n\t\taccountNumber = accNum;\n\t\tthis.balance = balance;\n\t}", "public void createAccount(String accountType, double balance){\r\n // check what is the type of the account being created\r\n /* update the list each time an account is being created and then put it into the hashtable. Then increase the\r\n counter do this for each of the following accounts each time an account is created*/\r\n switch (accountType){\r\n case \"1\":\r\n credits[creditCounter]= new CreditCardAccount(balance);\r\n allAccounts.replace(\"CreditCard\",credits);\r\n creditCounter++;\r\n break;\r\n case \"2\":\r\n lineOfCredits[lineOfCreditCounter] = new LineOfCreditAccount(balance);\r\n allAccounts.replace(\"LineOfCredit\",lineOfCredits);\r\n lineOfCreditCounter++;\r\n break;\r\n case \"3\":\r\n chequing[chequingCounter] = new ChequingAccount(balance);\r\n allAccounts.replace(\"Chequing\",chequing);\r\n chequingCounter++;\r\n break;\r\n case \"4\":\r\n saving[savingCounter] = new SavingsAccount(balance);\r\n allAccounts.replace(\"Saving\",saving);\r\n savingCounter++;\r\n break;\r\n default:\r\n System.out.println(\"ERROR IN CREATE ACCOUNT\");\r\n break;\r\n }\r\n }", "public StandardAccount(int accountNumber, double creditLimit) {\n super(accountNumber);\n this.creditLimit = creditLimit;\n }", "public void setAccountNumber(int accountNumberIn)\r\n\t{\r\n\t\t\r\n\t\tif (accountNumberIn >= ACCOUNT_NUM_MIN && accountNumberIn <= ACCOUNT_NUM_MAX)\r\n\t\t\r\n\t\t\taccountNumber = accountNumberIn;\r\n\t\t\r\n\t\telse\r\n\t\t\taccountNumber = -1;\r\n\t\t\r\n\t}", "public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}", "public Account(int id, double balance) {\n this();\n this.id = id;\n this.balance = balance;\n }", "private void initial(){\n storeAccount(\"201799990001030047\");\n }", "public void setupAccount(long accountId) throws NamingException {\r\n\t\tloginToAccount(accountId);\r\n\t}", "private void initAccounts() {\n ((GenesisBlock) DependencyManager.getBlockchain().getGenesisBlock()).getAccountBalances().forEach((key, value) -> {\n Account account = getAccount(key);\n account.addBalance(value);\n });\n DependencyManager.getBlockchain().getChain().getChain().forEach(this::parseBlock);\n }", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "public Bank(String name, int accs){\n bankAccounts = new Account[accs];\n bankName = name;\n maxAccounts = accs;\n currAccounts = 0; //empty\n }", "public CheckingAccount(String n) {\n super(n);\n balance = 0;\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public void setAccountNumber(int accountNumber) {\n this.accountNumber = accountNumber;\n }", "public void setAccount(com.huawei.www.bme.cbsinterface.cbs.businessmgr.Account account) {\r\n this.account = account;\r\n }", "public void setAvailableCash(Money initialAmount){\n\t\tavailableCash = initialAmount;\n\t}", "public account() {\n initComponents();\n autoID();\n branch();\n }", "public void setBalance(java.math.BigDecimal balance) {\n this.balance = balance;\n }", "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}", "public void setBalance(double bal){\n balance = bal;\r\n }", "public void setBalance(){\n balance.setBalance();\n }", "public ControlBank(Bank bank) {\r\n\t\tthis.bank = bank;\r\n\t}", "@Override\n protected void setBankNum(int bankNum) {\n }", "public Account()\n {\n balance = 0;\n balanceChangeLock = new ReentrantLock();\n sufficientFundsCondition = balanceChangeLock.newCondition();\n }", "public void setBalance( long balance ) {\r\n this.balance = balance;\r\n }", "public\n void\n setAccount(Account account)\n {\n itsAccount = account;\n }" ]
[ "0.7540318", "0.7303126", "0.70826364", "0.70732087", "0.699879", "0.6985183", "0.69843006", "0.69102675", "0.6910109", "0.686329", "0.678574", "0.6781067", "0.67801034", "0.67753434", "0.6740125", "0.6735483", "0.6715536", "0.6689961", "0.6673843", "0.66619664", "0.6639786", "0.6637821", "0.66334367", "0.6624447", "0.65692145", "0.6565364", "0.6563432", "0.65627396", "0.654374", "0.65394026", "0.6533697", "0.65100956", "0.64772916", "0.64643395", "0.6460659", "0.64339024", "0.6429281", "0.6422059", "0.6404824", "0.6403186", "0.6389363", "0.6380475", "0.63652366", "0.63645864", "0.63521606", "0.6328812", "0.6304773", "0.630469", "0.62836796", "0.6268988", "0.6268054", "0.6252012", "0.6241542", "0.6235147", "0.62269235", "0.6226268", "0.6186715", "0.618485", "0.6176913", "0.61682", "0.61496985", "0.61455005", "0.61327434", "0.61327434", "0.61327434", "0.61327434", "0.61310345", "0.61138934", "0.6103735", "0.6099408", "0.6092742", "0.60906255", "0.60906255", "0.60893524", "0.6077656", "0.6074081", "0.6073297", "0.60684", "0.6066685", "0.6058793", "0.6053765", "0.6051272", "0.6032644", "0.6026477", "0.60133857", "0.60124415", "0.60124415", "0.5998794", "0.59978175", "0.5996741", "0.5996127", "0.59956324", "0.59925103", "0.59887636", "0.5982772", "0.5980507", "0.59738564", "0.59727716", "0.59698737", "0.59603184" ]
0.75219953
1
method deposit Adds the deposited amount to the account balance.
public void deposit (double amount) { balance += amount; System.out.println ("Deposit into account shs: " + account); System.out.println ("Standing Amount: " + amount); System.out.println ("Current balance: " + balance); System.out.println (); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deposit(int depositAmount)\r\n {\n this.balance += depositAmount;\r\n System.out.println(\"Deposit of \" + depositAmount + \" made. New Balance is \" + this.balance);\r\n }", "public void deposit(double deposit){\n accTransactions.add(new Transaction('D', deposit, balance, \"deposit\"));\n balance += deposit;\n }", "public void deposit(BigDecimal deposit){\n balance = balance.add(deposit);\n }", "public void deposit(int amount)\n {\n setBalance(getBalance()+amount);\n }", "public void deposit(double amount)\n {\n balance = balance + amount;\n }", "void deposit(double amount){\r\n\t\t//add to the current balance the amount\r\n\t\t setBalance(getBalance() + amount);\r\n\t }", "@Override\n public void deposit(double amount) {\n double balance = getBalance();\n setBalance(balance+amount);\n }", "public void deposit(double amount) {\n this.balance += amount;\n }", "public void deposit(double amount){\n\t\tbalance += amount;\n\t}", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public void deposit(double depositAmount) {\n if (depositAmount < 0) throw new IllegalArgumentException(\"Deposit Amount cannot be negative\");\n balance += depositAmount;\n ++numDeposits;\n }", "public int deposit(int amount) {\n\n balance += amount;\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return balance;\n\n }", "protected void deposit(double amount)\n\t{\n\t\tacc_balance+=amount;\n\t}", "public void deposit(double amount) \n\t{\n\t\tbalance += amount;\n\t}", "public void deposit (int amount) {\n if (amount >= 0) {\n balance = balance + amount;\n valueDeposits = valueDeposits + amount;\n if (balance > maximumBalance) {\n maximumBalance = balance;\n }\n }\n }", "public void deposit(double amount) {\n\t\tbalance += amount;\n\t}", "public void deposit(double amount) {\n\t\tbalance += amount;\n\t}", "public void deposit(double amount)\n {\n startingBalance += amount;\n }", "public void deposit(double amount) {\n balance = balance + amount + 10;\n }", "public void deposit(int amountToDeposit) {\n if (amountToDeposit > 0) {\n balance = balance + amountToDeposit;\n }\n }", "public void depositAmount() {\n\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please Enter the account number you want to deposit: \");\n\t\t\tint depositAccountNumber = scan.nextInt();\n\t\t\tlong amount;\n\t\t\tlog.log(Level.INFO, \"Please Enter the amount you want to Deposit : \");\n\t\t\tamount = scan.nextLong();\n\t\t\tbankop.deposit(depositAccountNumber,amount);\n\t\t\t\n\t\t}catch(AccountDetailsException | BalanceException message ) {\n\t\t\tlog.log(Level.INFO, message.getMessage());\n\t\t}\n\t\t\n\t}", "public void deposit(double depositAmmount)\r\n\t{\r\n\t\tif(depositAmmount > 0.0) // it the deposit is valid\r\n\t\t\tbalance = balance + depositAmmount; // add it to the balance\r\n\t}", "@Override\n\tpublic int deposit(double amount) throws RaiseException {\n\t\tValidator.validateDeposit(amount);\n\t\tif(amount < 0) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\tthis.setBalance(this.getBalance() + amount);\n\t\t\t\n\t\t\t//create a transaction and adding it to the list of transactions of this account \n\t\t\tTransaction tmpTransaction = new Transaction(amount, EnumTypeTransaction.deposit);\n\t\t\tthis.addTransaction(tmpTransaction);\n\t\t\t\n\t\t\treturn 1;\n\t\t}\n\t}", "void deposit (double depositAmount, String userName) {\n\t\tBankAccountRepositoryJdbc bar = new BankAccountRepositoryJdbc();\n\t\tbalance = bar.getBalance(userName);\n\t\t\n\t\ttry {\n\t\t\tif(depositAmount != 0) {\n\t\t\t\tif(depositAmount > 0) {\n\t\t\t\t\tbalance = balance+depositAmount;\n\t\t\t\t\taccount.setBalance(balance);\n\t\t\t\t\taccount.setUsername(userName);\n\t\t\t\t\tbar.updateAccount(account);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NegativeAmountDepositException (\"You attempted to deposit a negative amount.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (NegativeAmountDepositException e) {\n\t\t\tLOGGER.info(e);\n\t\t}\n\t}", "@Override\r\n\tpublic void deposit(int amount) {\n\t\t\r\n\t}", "void deposit(float amount) {\n\n float newBalance;\n if (this.transactionHistory.isEmpty()) {\n newBalance = amount;\n } else {\n newBalance = this.transactionHistory.getLastTransaction().getBalanceAfter() + amount;\n }\n Transaction transaction = new Transaction(amount, true, newBalance);\n transactionHistory.addTransaction(transaction);\n }", "@Override\n\tvoid deposit(double amount) {\n\t\tsuper.balance += amount - 20;\n\t}", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public void addBalance(float deposit) {\r\n\t\tthis.balance += deposit;\r\n\t}", "public void makeDeposit(double deposit) {\n\t\t// implement\n\t\tthis.balance += deposit;\n\t}", "public void depositMoney(double amount) {\n\t\tbalance = balance + amount;\n\t}", "public void deposit(long amount) {\n\t\n\tbalance += amount;\n\t\n\tlog += \"Deposit made to this account in the ammount of \"+amount+\" on \"+date+\"\\n\";\n\tlog += log += \" Current balance is \"+balance+\" \\n\";\n\tupdate();\n}", "public void deposit(double amount){\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be deposited\");\n }\n else{\n balance += amount;\n savingTransactions[arrayLocation]= \"Deposit into savings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n }", "public void deposit (double amount) {\r\n\t\t\r\n\t\tbalance=balance+amount;\r\n\t\tif(balance > 0) {\r\n\t\t\t\r\n\t\t\toverDrawn = false;\r\n\t\t}\r\n\t\t\r\n\t}", "public double depositInto(double amount)\r\n {\r\n _balance += amount;\r\n\r\n return _balance;\r\n }", "@Override\n public void deposit(double amount) {\n try {\n doDepositing(amount);\n } catch (BankException e) {\n System.out.println(e.getMessage());\n }\n }", "public void deposit (double amount)\n {\n imposeTransactionFee ();\n super.deposit (amount);\n }", "public void deposit(double amount)\t{\n\t\tbalance = balance + amount;\n\t\tbalance = Math.round(balance * 100.0) / 100.0;\n\t}", "public void deposit(BigDecimal amount) {\n this.setBalance(this.getBalance().add(amount));\n }", "public void deposit( double amount ) throws Exception\n\t{\n // TODO\n // deposit amount of money, if it is legal/valid amount\n\t\tif(amount >= 0.0)\n\t\t\tbalance += amount;\n\t\telse\n\t\t\tthrow new Exception(\"Invalid Deposite Amount\");\n\t}", "void deposit(double amount)\n\t{\n\t\tbalance += amount;\n\t\t//what this translates to is\n\t\t// this.balance += amount;\n\t}", "public boolean deposit(double depositAmount) {\n\t\tif (depositAmount <= 0) return false; // Special case: can't deposit negative money\n\t\tbalance += depositAmount;\n\t\treturn true;\n\t}", "public double deposit(double amount){\n double total=amount;\n if(type.equals(\"TMB\"));total=-0.5;\n currentBalance+=total;\n return currentBalance;\n }", "@Override\n public void deposit(double amount) {\n super.deposit(amount);\n store_trans(amount);\n }", "public static void deposit() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t//Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number:\");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to deposit in cents:\");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt()) amount = Integer.parseInt(Quinterac.s.nextLine());\n\t\t\t\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckDepositValid(accNum, amount);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckDepositValid(accNum, amount);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public long deposit(long amount) {\n balance += amount;\n return balance;\n }", "@Override\n\tpublic void deposit(int money) {\n\t\t\n\t}", "public void depositMoney(double amount) {\n\t\tif (amount>=0){\n\t\t\tsetBalance(getBalance() + amount);\n\t\t}else{\n\t\t\tSystem.out.println(\"You can not deposit a negative value!\");\n\t\t}\n\t\t\n\t}", "public void deposit (int amount){\n if(amount>=3000){\n super.deposit(amount+200);\n } else {\n super.deposit(amount);\n }\n }", "public void deposit(double amount)\n {\n balanceChangeLock.lock();\n try\n {\n System.out.print(\"Depositando \" + amount);\n double newBalance = balance + amount;\n System.out.println(\", novo saldo igual a \" + newBalance);\n balance = newBalance;\n sufficientFundsCondition.signalAll();\n }\n finally\n {\n balanceChangeLock.unlock();\n }\n }", "void deposit(double Cash){\r\n\t\tbalance=balance+Cash;\r\n\t}", "private void deposit() {\n userInput = 0;\n while (userInput <= 0) {\n System.out.printf(\"Din nuværende balance er: %.2f DKK\\n\" +\n \"Indtast ønsket beløb at indsætte: \", balanceConverted);\n\n textMenuKey(false, \"\");\n\n if (userInput <= 0) {\n System.out.println(\"Indtast et gyldigt beløb\");\n }\n }\n\n moneyController(userInput);\n mysql.transactionUpdate(customerNumber, customerName, balance, userInput, \"Deposited\");\n }", "private static void deposite (double amount) {\n double resultDeposit = balance + amount;\r\n System.out.println(\"Deposit successful.\\nCurrent balance: \" + \"$\" + resultDeposit+ \".\");\r\n }", "void depositByCash(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tbalance += amount;\n\t\tSystem.out.println(\"Deposit \" + amount + \" successfully\");\n\t}", "public void deposit();", "void deposit() {\n System.out.println(\"Enter the amount to deposit : \");\n int deposit = scan.nextInt();\n balance += deposit;\n }", "@Override\n\tpublic void deposit() {\n\t\t\n\t}", "@Override\n public boolean deposit(Account account, BigDecimal amount) {\n return false;\n }", "public void makeDeposit() {\n deposit();\n }", "public double deposit(double amount, boolean branch) {\n balance += amount;\n return balance;\n }", "public void deposit() throws IOException, ClassNotFoundException {\r\n System.out.println(\"Enter an amount to deposit \");\r\n float depositedAmount = (float)this.input.nextDouble();\r\n if (depositedAmount < 5.0F) {\r\n System.out.println(\"enter amount greater or equal to N$ 5\");\r\n this.repeatDeposit(); // Calling the Mentioned Function\r\n }\r\n\r\n this.balance += depositedAmount;\r\n this.transaction = depositedAmount;\r\n System.out.println(\"You have Successfully Deposited: N$\" + this.transaction);\r\n System.out.printf(\"New Balance: N$%.2f\", this.balance);\r\n this.repeatDeposit(); // Calling the Mentioned Function\r\n this.coinDisbursed(); // Calling the Mentioned Function\r\n }", "public void deposit(int amount) {\n\t\tint newBalance = balance + amount;\n\t\ttry{\n\t\t\tThread.sleep(5); //added to make magnify corruption & make visible\n\t\t}catch(InterruptedException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tthis.balance = newBalance;\n\t}", "public void setDeposit(Integer deposit) {\n this.deposit = deposit;\n }", "public void deposit(double value)\r\n {\r\n //TODO need logic to make sure you can't deposit more then you have in cash\r\n subtractCash(value);\r\n savings += value;\r\n }", "public void deposit(int amount) throws RejectedException {\n if (amount < 0) {\n throw new RejectedException(\n \"Tried to deposit negative value, illegal value: \" + amount + \".\" + accountInfo());\n }\n balance += amount;\n }", "public boolean deposit(double amount) {\n if (amount>0) {\n setBalance(this.balance + amount);\n return true;\n }\n return false;\n }", "public void addToBalance(double depositBalanceAmount) \n\t{\n\t\taccountBalance += depositBalanceAmount;\n\t}", "@Override\r\n\tpublic double depositDao(double money) throws EwalletException {\n\t\ttemp.setCustBal(temp.getCustBal()+money);\r\n\t\ttry {\r\n\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Depsoited Amount :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\treturn temp.getCustBal();\r\n\t\t\r\n\t}", "public int deposit(int depositAmmount);", "public boolean deposit(Account account, double amount) {\r\n\t\tint found = find(account);\r\n\t\t\r\n\t\t//account does not exist\r\n\t\tif ( found == -1 ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t//get the balance, and call credit() to add the amount to balance\r\n\t\tdouble balance = accounts[found].getBalance();\r\n\t\taccount.setBalance(balance);\r\n\t\taccount.credit(amount);\r\n\t\taccounts[found].setBalance(account.getBalance());\r\n\t\treturn true;\r\n\t\r\n\t}", "public boolean deposit(Account account, double amount) {\n\t\t\n\t\tint index = find(account);\n\t\t\n\t\tif (account == null || index == -1 || amount < 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\taccounts[index].credit(amount);\n\t\t\n\t\treturn true;\n\t\t\n\t}", "@Override\r\n\tpublic void deposit() {\n\t\tSystem.out.println(\"This Deposit value is from Axisbank class\");\r\n\t\t//super.deposit();\r\n\t}", "@Override\n public void deposit(int accountId, long amount) {\n if(!accounts.containsKey(accountId)){\n throw new IllegalArgumentException(\"Account \" + accountId + \" does not exist in this Bank.\");\n }\n else{\n synchronized (accounts.get(accountId)){\n accounts.get(accountId).deposit(amount);\n }\n }\n }", "public void deposit(String accountType, double amount) {\r\n\t\tif(accountType.equals(\"savings\")) {\r\n\t\t\tthis.savingsBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse if(accountType.equals(\"checking\")) {\r\n\t\t\tthis.checkingBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Deposit failed\");\r\n\t\t}\r\n\t}", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "public void deposit(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tlastBalance = nowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"deposit : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}", "public void deposit(double value){\r\n balance += value;\r\n}", "public boolean deposit(Account account, double amount) {\n int accountPosition = find(account);\n if (accountPosition == -1) {\n return false;\n }\n accounts[accountPosition].credit(amount);\n return true;\n }", "public abstract boolean deposit(float amount);", "public float deposit(float creditAmount) {\n\t\taccBalance += creditAmount;\n\t\treturn accBalance;\n\t}", "@Override\n\tpublic void deposit(double d) {\n\t\tsuper.deposit(d);\n\t\tSystem.out.println(\"Checking deposit made: \" + d);\n\t}", "public void setDepositAmount(MMDecimal depositAmount) {\r\n this.depositAmount = depositAmount;\r\n }", "@Override\r\n\tpublic boolean deposit(DepositBean db, double amount) throws WalletException {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb : customerList) {\r\n\t\t\tif(cb.getPhoneNum()==db.getPhoneNum()) {\r\n\t\t\t\tdb.setBalance(db.getBalance()+amount);\r\n\t\t\t\tdb.setDate(LocalDateTime.now());\r\n\t\t\t\tisValid = true;\r\n\t\t\t\tWalletTransactions transac = new WalletTransactions();\r\n\t\t\t\ttransac.setAmount(amount);\r\n\t\t\t\ttransac.setBalance(db.getBalance());\r\n\t\t\t\ttransac.setDate(db.getDate());\r\n\t\t\t\ttransac.setPhoneNum(db.getPhoneNum());\r\n\t\t\t\ttransac.setType(\"deposit\");\r\n\t\t\t\ttransacList.add(transac);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "public boolean deposit(String accountNumber, double amount) {\r\n\t\tif (!DaoUtility.isAccountNumberValid(accountNumber))\r\n\t\t\treturn false;\r\n\r\n\t\tConnection conn = null;\r\n\r\n\t\ttry {\r\n\t\t\tStatement st;\r\n\t\t\tResultSet rs;\r\n\t\t\tString sql;\r\n\r\n\t\t\tconn = dbConnector.getConnection();\r\n\t\t\tif (conn == null)\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t// atomic operation\r\n\t\t\tst = conn.createStatement();\r\n\r\n\t\t\t// get the aid and old balance\r\n\t\t\tint aid = 0;\r\n\t\t\tdouble oldbalance = 0;\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"select * from tbAccount where acnumber='%s' \",\r\n\t\t\t\t\taccountNumber);\r\n\r\n\t\t\trs = st.executeQuery(sql);\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\taid = rs.getInt(\"aid\");\r\n\t\t\t\toldbalance = rs.getDouble(\"balance\");\r\n\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\r\n\t\t\t\t// If the account is Frozen(isactive=false), then cannot\r\n\t\t\t\t// deposit.\r\n\t\t\t\tif (!isactive) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// ac.balance += amount.\r\n\t\t\t// update tbAccount set balance='new balance' where\r\n\t\t\t// acnumber='acnumber'\r\n\t\t\tdouble newBalance = oldbalance + amount;\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"update tbAccount set balance=%f where acnumber='%s' \",\r\n\t\t\t\t\tnewBalance, accountNumber);\r\n\t\t\tst.addBatch(sql);\r\n\r\n\t\t\t// insert a transaction record\r\n\t\t\t// insert into tbTransaction(aid,trtype,amount,description)\r\n\t\t\t// values( select aid from tbAccount where acnumber='acnumber',\r\n\t\t\t// DEPOSIT_TRANSACTION_TYPE_ID,\r\n\t\t\t// amount, 'deposit 123.4 dollars on 2014-09-19')\r\n\t\t\t//\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\tString currentDate = dateFormat.format(date); // 2014-08-06\r\n\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t+ \" values( %d, \" + \"\t\t\t%d, \"\r\n\t\t\t\t\t\t\t+ \"\t\t\t%f, 'deposit %.2f dollars on %s' ) \", aid,\r\n\t\t\t\t\tDEPOSIT_TRANSACTION_TYPE_ID, amount, amount, currentDate);\r\n\r\n\t\t\tst.addBatch(sql);\r\n\r\n\t\t\t// Execute transaction\r\n\t\t\tint[] nRes = st.executeBatch();\r\n\t\t\tif (nRes[1] > 0)\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "@Override\n public void makeDeposit(BigInteger account, BigDecimal amount) {\n Account accountDeposit = accountDao.getAccountByIban(account);\n accountDeposit.setBalance(accountDeposit.getBalance().add(amount));\n accountDao.updateAccount(accountDeposit);\n\n transactionDao.storeTransaction(new Transaction(null, account, amount, TransactionType.DEPOSIT));\n }", "public boolean deposit(double amount) {\n if (amount < 0) {\n return false;\n }\n value += amount;\n return true;\n }", "public boolean deposit(long id, String password, String currency, double amount);", "public void withdrawOrDeposit(double amount, boolean isWithdraw){\n if(amount > 0.0) {\n if (isWithdraw) {\n balance -= amount;\n } else {\n balance += amount;\n }\n }\n }", "boolean deposit(UUID name, double amount);", "public void deposit(double amt) throws NegativeAmountException {\n\t\tif (getBalance() >= 0)\n\t\t\tsetAmount(getAmount() + amt);\n\t\telse\n\t\t\tthrow new NegativeAmountException();\n\t}", "protected void insertDime(double balance)\r\n {\r\n totalBalance = balance;\r\n totalBalance = totalBalance + 0.1;\r\n }", "@Override\n public boolean depositAmount(TransactionDTO transaction) {\n if(transaction.getAmount()>0){\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n customerDetails.setAccountBalance(customerDetails.getAccountBalance()+transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }else{\n return false;\n }\n }", "public void nonSyncdeposit(double amount)\r\n\t {\r\n\t if(amount<0){//if deposit amount is negative\r\n\t \t System.out.println(\"Invalid amount cannot deposit\");\r\n\t }\r\n\t else{ //logic to deposit amount\r\n\t\t System.out.print(\"Depositing \" + amount);\r\n\t double newBalance = balance + amount;\r\n\t System.out.println(\", new balance is \" + newBalance);\r\n\t balance = newBalance;\r\n\t }\r\n\t }", "public Integer getDeposit() {\n return deposit;\n }", "private void doDeposit() {\n System.out.println(\"How much do you want to deposit?\");\n boolean keepgoing = true;\n int amount = -1;\n while (keepgoing) {\n amount = input.nextInt();\n if (amount > 0) {\n keepgoing = false;\n pickedAccount.deposit(amount);\n }\n }\n System.out.println(\"deposited \" + amount + \" $\");\n }", "@Test\n\tpublic void testDeposit() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(04, \"acc1\", 00000, 100.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Deposit Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to deposit money\", testResult);\n\t}", "public boolean depositAmount(float amount) {\n\t\treturn dao.depositAmount(amount);\r\n\t}", "public void depositMenu(){\n\t\tstate = ATM_State.DEPOSIT;\n\t\tgui.setDisplay(\"Amount to deposit: \\n$\");\t\n\t}", "public boolean depositMoney(int accountNo, float amount) {\n Account account = getAccountByAccountNo(accountNo);\n account.setBalance(account.getBalance() + amount);\n saveOrUpdate(account);\n // save transaction to database\n Transaction transaction = new Transaction();\n transaction.setAccountNo(accountNo);\n transaction.setTime(new Timestamp(new Date().getTime()));\n transaction.setType(\"deposit\");\n transactionRepository.save(transaction);\n return true;\n }", "int deposit(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n accountBalance += amount;\n break;\n } else\n return -1;\n }\n // Run the operation to update the balance only for the user's account\n updateAccount(id, accountBalance, account);\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n System.out.println(\"AMOUNT: \" + accountBalance);\n return 1;\n }" ]
[ "0.84499013", "0.8366093", "0.8291567", "0.8224366", "0.8211198", "0.8173097", "0.8148479", "0.81390476", "0.8096961", "0.8092166", "0.8087009", "0.8080742", "0.80692285", "0.8065247", "0.801766", "0.80054057", "0.80054057", "0.7975974", "0.7972426", "0.7948598", "0.79422224", "0.7926773", "0.79097843", "0.79097515", "0.7897855", "0.78451896", "0.78146636", "0.7814345", "0.78049463", "0.77686787", "0.77461296", "0.7733856", "0.77305907", "0.7730248", "0.7715205", "0.76951885", "0.7693823", "0.7682052", "0.767777", "0.7665929", "0.7612492", "0.7608405", "0.7576594", "0.75178576", "0.75052917", "0.7499224", "0.7496298", "0.74845797", "0.74542636", "0.7443769", "0.7435266", "0.74252707", "0.7404217", "0.7403522", "0.73934656", "0.7390849", "0.7380237", "0.7357398", "0.7321155", "0.7315412", "0.73088396", "0.7299613", "0.7298031", "0.72220796", "0.7221664", "0.72092503", "0.7188961", "0.7185533", "0.7183082", "0.7177561", "0.70863414", "0.7080068", "0.706581", "0.70101595", "0.7009918", "0.7009496", "0.7001913", "0.6985441", "0.6984544", "0.69736046", "0.6967627", "0.69572204", "0.695614", "0.6878677", "0.6869491", "0.6859446", "0.6857974", "0.6856878", "0.6843089", "0.68141156", "0.680583", "0.67996234", "0.679774", "0.6723403", "0.6701084", "0.66870725", "0.6658991", "0.6644583", "0.66366667", "0.6619303" ]
0.8018642
14
for checking the amout on the account
public Checking_Account (int account_num, double initial_balance, Savings_Account protection) { super (account_num, initial_balance); overdraft = protection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isAccountNonExpired();", "boolean isAccountNonExpired();", "@Override\npublic boolean isAccountNonExpired() {\n\treturn false;\n}", "private void checkAccountLoggedIn()\r\n\t{\n\t\tSharedPreferences pref = this.getSharedPreferences(\"accountdata\", 0);\r\n\t\tSystem.out.println(\"Checking if an account is logged in\");\r\n\t\tif (pref.getBoolean(\"accountLoggedIn\", false))\r\n\t\t{\r\n\t\t\tloginButton.setEnabled(false);\r\n\t\t\tregisterButton.setEnabled(false);\r\n\r\n\t\t\t// Make a crouton notifying the user\r\n\t\t\tCrouton crouton = Crouton.makeText(this, this.getResources()\r\n\t\t\t\t\t.getString(R.string.activity_login_account_loggedin),\r\n\t\t\t\t\tStyle.INFO);\r\n\t\t\tConfiguration.Builder configBuild = new Configuration.Builder();\r\n\t\t\tconfigBuild.setDuration(Configuration.DURATION_INFINITE);\r\n\t\t\tcrouton.setConfiguration(configBuild.build());\r\n\t\t\tcrouton.setOnClickListener(new OnClickListener()\r\n\t\t\t{\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Crouton clicked\");\r\n\t\t\t\t\t((LoginActivity) v.getContext()).onBackPressed();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tcrouton.show();\r\n\t\t}\r\n\t}", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\n public boolean isAccountNonExpired() {\n return false;\n }", "@Override\npublic boolean isAccountNonExpired() {\n\treturn true;\n}", "@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }", "@Override\n\t\t\t\tpublic boolean isAccountNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n public boolean isAccountNonExpired () {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return true;\n }", "@Override\n public boolean isAccountNonExpired() {\n return !locked;\n }", "public void checkOut() {\n\n }", "@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}", "boolean isAccountNonLocked();", "boolean isAccountNonLocked();", "@Override\n\tpublic void checkOutRoom() {\n\t\t\n\t}", "public void checkOut() {\n\t}", "boolean isCheckedOut();", "@Override\n\tpublic void unlock() {\n\t\tSystem.out.println(\"Card in ATM1 is unlocked !\");\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired()\n\t{\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}", "public void signOutOfDD()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignOutLink();\n\t\t\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "boolean hasAccount();", "boolean hasAccount();", "boolean hasAccount();", "public boolean disattiva_account()\n {\n boolean d=true;//variabile per disattivare l'account\n //già messa a true in quanto l'account viene attualmente usato\n int scelta;\n \n System.out.println(\"--Vuoi disattivare l'account?\\n[1] si [0] no\");\n scelta=input.nextInt();\n \n if(scelta==1)\n { \n d=false;\n System.out.println(\"--Attenzione account disattivato--\");\n }\n \n else if(scelta==0)\n { \n System.out.println(\"--Puoi usare ancora il tuo account--\");\n }\n \n else \n System.out.println(\"Impossibile eseguire l'operazione scelta\");\n \n return d;\n }", "public boolean isActiveLoan();", "Boolean signOut();", "public boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}", "private boolean accountChecks(Account account){\n // ie. if the account has to be personal for the round-up service to apply\n account.getName(); // check personal\n return true;\n }", "public void checkOutFlight() {\n confirmationPage.checkButton();\n }", "public boolean checkAccountAction(String myAppName) {\n\t\tLog.info(\"Checking current account status for app\" + myAppName);\n\t\tboolean currentValue = false;\n\t\tWebElement myAccount = getAccontDetails(myAppName);\n\t\tWebElement Tab = myAccount.findElement(By.className(\"adminTable5\"));\n\t\tString elementPageSource = Tab.getAttribute(\"outerHTML\");\n\t\tif (elementPageSource.contains(\"deactivate.png\")) {\n\t\t\tLog.info(myAppName + \" account is activated\");\n\t\t\tcurrentValue = true;\n\t\t} else {\n\t\t\tLog.info(myAppName + \" account is deactivated\");\n\t\t\tcurrentValue = false;\n\t\t}\n\t\treturn currentValue;\n\t}", "public boolean isAccountNonExpired() {\n\t\treturn false;\n\t}", "public boolean isAccountNonExpired() {\n\t\treturn false;\n\t}", "@Override\n public boolean isAccountNonLocked() {\n return false;\n }", "@Override\n public boolean isAccountNonLocked() {\n return false;\n }", "@Override\n public boolean isAccountNonLocked() {\n return false;\n }", "@Override\npublic boolean isAccountNonLocked() {\n\treturn false;\n}", "public boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}", "public CheckingAccount()\n {\n withdrawals = 0;\n deposits = 0;\n }", "@Override\r\n public boolean isAccountNonLocked() {\r\n return true;\r\n }", "@Override\r\n\tpublic void onLogout()\r\n\t{\n\r\n\t\tif (accountListener != null)\r\n\t\t{\r\n\t\t\taccountListener.onMmiHeartbeatLogout();\r\n\t\t}\r\n\t\tAirServices.getInstance().stopSelf();\r\n\t\tLog.e(AirAccountManager.class, \"MMI ======================== onLogout =======================\");\r\n\t}", "private void updateAccountStatus() {\n\r\n }", "public boolean isAccountNonExpired() {\n\t\t// TODO Auto-generated method stub\n\t\treturn true;\n\t}", "public void checkOut(double priceIn) {\n \n if (this.balance < priceIn) {\n System.out.println(\"Insufficient funds. Remove an item.\");\n }\n else {\n System.out.print(\"Sufficient funds. Your new balance is $\");\n this.balance -= priceIn;\n System.out.print(this.balance + \".\\n\");\n success = true;\n }\n }", "@Override\npublic boolean isAccountNonLocked() {\n\treturn true;\n}", "@AfterTest\n\t\tpublic void logout(){\n//Calling method to logout from the account and verify logout message.\n//'**********************************************************\n\t\t\tLogOutPage accountLogoutPage =myWishlistPage.logout();\n\t\t\tAssert.assertTrue(accountLogoutPage.getlogoutMsg().equals(\"Account Logout\"), \"Account Logout message is not displayed\");\n\t\t\textentTest.log(LogStatus.PASS,\"Account Logout message is displayed and the user is signed out from the account\");\n//'**********************************************************\n//Close the report\n//'**********************************************************\n\t\t\textentReports.endTest(extentTest);\n\t\t\textentReports.flush();\n\t\t\textentReports.close();\n\t\t}", "public boolean checkAccountClosed() {\n return this.accountStatus == \"Closed\";\n }", "public void onNoAccountsFound();", "@Override\n public boolean isAccountNonLocked() {\n return true;\n }", "public boolean isAccountNonExpired() {\n\t\treturn true;\n\t}", "public void checkAccountExpiration() throws MessagingException{\r\n\t\tList<Account> accounts = accountRepository.findAll();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\r\n\t\t\r\n\t\t//Username Password does not exist its only for faking user to system default\r\n\t\tUsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(\"[email protected]\",\r\n\t\t\t\t\"Test1234@\");\r\n\t\tSecurityContextHolder.getContext().setAuthentication(authRequest);\r\n\t\t\r\n\t\tfor( Account acc: accounts)\t{\r\n\t\t\tif(acc.getAlwaysActive() == false && acc.getActive() == true){\r\n\t\t\t\tDate expiration = acc.getExpirationDate() != null ? acc.getExpirationDate() :\r\n\t\t\t\t\tDateUtil.toDate(DateUtil.adjustDate(DateUtil.fromDate(acc.getStartDate()), Calendar.DAY_OF_MONTH, acc.getType() == AccountType.TRIAL ? getTrial.getTrialDays() : PREMIUM_EXPIRATION_DAYS));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.getDaysRemaining(expiration) <= -1){\r\n\t\t\t\t\tacc.setActive(false);\r\n\t\t\t\t\tacc.setExpirationDate(new Date());\r\n\t\t\t\t\tacc.setCurrency(\"SGD\");\r\n\t\t\t\t\tUser user = new User();\r\n\t\t\t\t\tuser.setId(1L);\r\n\t\t\t\t\tacc.setLastModifiedBy(user);\r\n\t\t\t\t\tacc.setLastModifiedDate(new Date());\r\n\t\t\t\t\taccountRepository.save(acc);\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\tsendTrialExpiredEmail(acc.getUser().getUsername());\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(MessagingException e){\r\n\t\t\t\t\t\tlog.error(\"exception while sending email to \"+acc.getUser().getUsername());\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}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn isAccountNonExpired;\n\t}", "@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn accountNonExpired;\n\t}", "private void userDidLeave() {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n deviceSingleton.setImInARoom(false);\n deviceSingleton.setJoinedChat(false);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"savedJoinedChat\", false);\n editor.commit();\n Intent intent2 = new Intent(ShowMapActivity.this, LoginActivity.class);\n startActivity(intent2);\n// break;\n\n }", "public final void deactivateAccount() {\n\t\tthis.setIsAccountLocked(true);\n\t}", "@Test\n\t void testAccountNonExpired() {\n\t\tassertTrue(user.isAccountNonExpired());\n\t}", "public String getOutAccountNo() {\r\n return outAccountNo;\r\n }", "@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}", "private boolean logout() {\r\n\t\t// Create exit.\r\n\t\tCMPPTerminate exit = new CMPPTerminate();\r\n\t\t// Set sequence.\r\n\t\texit.sequence = nextSequence();\r\n\r\n\t\ttry {\r\n\t\t\t// Write packet.\r\n\t\t\tsingleCmppObject.getConnection().writePacket(exit);\r\n\t\t\t// Read packet.\r\n\t\t\tCMPPPacket cmpp = (CMPPPacket) singleCmppObject.getConnection()\r\n\t\t\t\t\t.readPacket();\r\n\t\t\t// Check result.\r\n\t\t\tif (cmpp == null) {\r\n\t\t\t\tUtil.log.error(\"fail to read packet !\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// Check command.\r\n\t\t\tif (cmpp.command == CMPPCommandID.TERMINATE) {\r\n\t\t\t\t// Create response.\r\n\t\t\t\tCMPPTerminateResponse response = new CMPPTerminateResponse(\r\n\t\t\t\t\t\tcmpp.sequence);\r\n\t\t\t\t// Write response.\r\n\t\t\t\tsingleCmppObject.getConnection().writePacket(response);\r\n\t\t\t\t// Log event.\r\n\t\t\t\tUtil.log.info(\"exit request was received !\");\r\n\t\t\t} else if (cmpp.command == CMPPCommandID.TERMINATE_RESPONSE) {\r\n\t\t\t\t// Log event.\r\n\t\t\t\tif (LogRequests.isRequested(EventID.CMPP_PACKET\r\n\t\t\t\t\t\t| EventID.INFORMATION))\r\n\t\t\t\t\tUtil.log.info(\"exit response was received !\");\r\n\t\t\t} else {\r\n\t\t\t\t// Log event.\r\n\t\t\t\tif (LogRequests.isRequested(EventID.CMPP_PACKET\r\n\t\t\t\t\t\t| EventID.EXCEPTION))\r\n\t\t\t\t\tUtil.log.info(\"invalid exit response packet !\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// Set authenticated.\r\n\t\t\tsingleCmppObject.setAuthenticated(false);\r\n\t\t\t// Return true.\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\tif (LogRequests.isRequested(EventID.CMPP_PACKET | EventID.EXCEPTION)) {\r\n\t\t\t\tUtil.log.error(e.getMessage(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Return false.\r\n\t\treturn false;\r\n\t}", "private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }", "@Override\n\t\t\t\tpublic boolean isAccountNonLocked() {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "private void checkAction(HttpServletRequest req, HttpServletResponse resp) throws SQLException, IOException {\n\t\tString account = req.getParameter(\"account\");\r\n\t\tString password = req.getParameter(\"password\");\r\n\t\tManage manage = this.service.checkLogin(account, password);\r\n\r\n\t\t// 如果User不是空,证明账号密码正确\r\n\t\tif (manage != null) {\r\n\t\t\tsession.setAttribute(\"MANAGEINSESSION\", manage);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/index.jsp\");\r\n\t\t\tpw.print(true);\r\n\t\t} else {\r\n\t\t\tpw.print(false);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/login.jsp\");\r\n\t\t}\r\n\t\treturn;\r\n\t}", "void onKbsAccountLocked(@Nullable Long timeRemaining);", "boolean hasHasAccount();", "void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}", "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);", "@Override\n\tpublic int signOut(Attendance attendance) {\n\t\treturn attendanceMapper.signOut(attendance);\n\t}", "@Test(enabled=false)\n\tpublic void loanDetails(){\n\t\n\t\ttry{\n\t\tHomePage homePage=new HomePage(driver);\n\t\thomePage.clickOnSignIn();\n\t\t\n\t\tLoginActions loginAction=new LoginActions();\n\t\tloginAction.login(driver, \"username\", \"password\");\n\t\t\n\t\tAccountSummaryPage accountsummary= new AccountSummaryPage(driver);\n\t\taccountsummary.isAccountSummary();\n\t\t\n\t\tAccountActivityPage accountActivity=new AccountActivityPage(driver);\n\t\taccountActivity.clickOnAccountActivity();\n\t\t\n\t\taccountActivity.selectLoanAccount();\n\t\t\n\t\taccountActivity.getRowdata();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getRowdata(), \"RENT\");\t\n\t\t\n\t\tSystem.out.println(accountActivity.getRowdata());\n\t\t\n\t\t// Test case no - AccActShow_04 -no results for credit card are verified under this test only\n\t\n\t\taccountActivity.getCreditCard();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getCreditCard(), \"No Results\");\n\t\t}\n\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.getMessage();\n\t\t}\n\t}", "void reinstate() {\n\t\tisSuspended = false;\n\t\tSystem.out.println(\"Reinstate account successfully.\");\n\t}", "public void closeAccount() {}", "public void closeAccount() {}", "@Override\r\n\tpublic boolean isAccountNonLocked() {\n\t\treturn false;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_changepassword) {\n Intent j = new Intent(Rounds.this, CHANGE_PASSWORD.class);\n j.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(j);\n return true;\n }\n\n if (id == R.id.action_logout) {\n\n if(isInternetOn())\n {\n String currentdate = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\").format(new Date());\n serverLogout(myHelper.getUserID(), replaceSpace(currentdate));\n return true;\n }\n else\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(Rounds.this);\n builder.setTitle(\"No Internet Connection\");\n builder.setMessage(\"Check your network and Retry\");\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //do things\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n }\n return super.onOptionsItemSelected(item);\n }", "public void checkOUT(DTOInscripcion inscripcion) throws Exception {\n\t\ttry {\n\t\t\tDaoInscripcion dao = new DaoInscripcion(connection);\n\t\t\tdao.checkOUT(inscripcion.getInscripcion());\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void onSwitchAccount() {\n\t\t\t\tshowToast(\"onSwitchAccount---\");\r\n\t\t\t}" ]
[ "0.6320395", "0.6320395", "0.6116713", "0.6108607", "0.60722226", "0.60722226", "0.60722226", "0.6055933", "0.60297465", "0.6005713", "0.59881705", "0.5977836", "0.5977836", "0.5977836", "0.5932819", "0.5931608", "0.59243286", "0.59243286", "0.59149575", "0.59149575", "0.59005946", "0.5898638", "0.5888979", "0.5885279", "0.5878525", "0.5878525", "0.5878525", "0.58087444", "0.5806475", "0.5806475", "0.57878894", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.57539845", "0.5750205", "0.5750205", "0.5750205", "0.5704298", "0.5691056", "0.56867325", "0.56620663", "0.5657814", "0.56119823", "0.56020516", "0.5586123", "0.5586123", "0.55741465", "0.55741465", "0.55741465", "0.5562624", "0.5561201", "0.55499554", "0.55305326", "0.55162376", "0.5501919", "0.5498688", "0.5495741", "0.54950863", "0.5494124", "0.5489486", "0.54791343", "0.54789585", "0.54731643", "0.54681087", "0.54648167", "0.5447263", "0.5441708", "0.5437496", "0.5435927", "0.5434776", "0.5432373", "0.5432373", "0.5428671", "0.5428365", "0.54233927", "0.54141015", "0.5414019", "0.54038256", "0.53932565", "0.53931767", "0.53476846", "0.5342481", "0.53388625", "0.5338227", "0.53364533", "0.53364533", "0.5332668", "0.53088367", "0.5302628", "0.53019655" ]
0.0
-1
Withdraws the specified amount from the checking Overrides the withdrawal method in saccoAccount. override method withdrawal
public boolean withdrawal (double amount) { boolean result = false; if ( ! super.withdrawal (amount) ) { System.out.println ("Using overdraft..."); if ( ! overdraft.withdrawal (amount-balance) ) System.out.println ("Overdraft source insufficient."); else { balance = 0; System.out.println ("Current Balance on account " + account + ": " + balance); result = true; } } System.out.println (); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void withdraw(double withdrawalAmount) {\n if (withdrawalAmount < 0) throw new IllegalArgumentException(\"Withdrawal amount cannot be negative\");\n if (balance - withdrawalAmount < 0) throw new IllegalArgumentException(\"Cannot withdraw more than account balance\");\n balance -= withdrawalAmount;\n numWithdrawals++;\n }", "void withdraw(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Withdrawing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (check(amount)) {\n\t\t\tbalance -= amount;\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" successfully.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" unsuccessfully. Do not have enough available funds.\");\n\t\t}\n\t}", "public double withdraw(double withdrawalAmount) {\n\t\tdouble savingsBalance = getBalance();\n\t\tif ((savingsBalance - withdrawalAmount) >= overdraft) { // Check if balance is less than overdraft limit.\n\t\t\tsuper.withdraw(withdrawalAmount);\n\t\t}\n\t\tif ((savingsBalance - withdrawalAmount) < overdraft) {\n\t\t\tSystem.out.print(\"Cannot execute withdraw action: greater than savings withdraw limit.\\n\");\n\t\t}\n\t\treturn getBalance();\n\t}", "@Override\n\tpublic int withdraw(double amount) throws RaiseException {\n\t\tValidator.validateWithdraw(this.getBalance(), amount);\n\t\tif(amount <= this.getBalance()) {\n\t\t\tthis.setBalance(this.getBalance() - amount);\n\t\t\t\n\t\t\t//create a transaction and adding it to the list of transactions of this account \n\t\t\tTransaction tmpTransaction = new Transaction(amount, EnumTypeTransaction.withdraw);\n\t\t\tthis.addTransaction(tmpTransaction);\n\t\t\t\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "public void withdraw(long amount) {\n\t\n\tif(canWithdraw == true) {\n\t\tSystem.out.println(\"before \"+balance);\n\t\tbalance\t-= amount;\n\t\tSystem.out.println(\"after \"+balance);\n\t\t//add to log\n\t\tlog += \"Withdraw made to this account in the ammount of \"+amount+\" on \"+date+\"\\n\";\n\t\tlog += log += \" Current balance is \"+balance+\" \\n\"+date;\n\t\tupdate();\n\t}else {\n\t\tlog += \"Overdraft account on \"+date+\" \\n\";\n\t\tSystem.out.println(\"Insufficients funds to complete tranaction!\");\n\t\t}//end else statement\n}", "void withdraw(double amount){\r\n\t\t//subtract to the current balance the amount\r\n\t\tsetBalance(getBalance() - amount);\r\n\t\t\r\n\t\t//alert the user that his bank account is in the red if the balance lower than 0\r\n\t\tif(getBalance()<0){\r\n\t\t\tSystem.out.println(\"Your bank account is in the red.\");\r\n\t\t}\r\n\t}", "public void withdraw(double amount){\n accTransactions.add(new Transaction('W', amount, balance, \"withdraw\"));\n balance -= amount;\n }", "public void withdraw (double amount)\n {\n super.withdraw (amount);\n imposeTransactionFee ();\n }", "public void withdrawMoney(int amount) {\n wallet.withdraw(amount);\n }", "public void withdraw (double amount) throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be withdrawn\");\n }\n if (dailyMaxWithdraw != null){\n todayWithdraw += amount;\n if(todayWithdraw > dailyMaxWithdraw){\n throw new IllegalArgumentException(\"Amount entered would exceed your daily withdraw limit\");\n }\n }\n else if (amount <= balance){\n balance -= amount;\n savingTransactions[arrayLocation] = \"Withdraw from savings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n else {\n throw new InsufficientFundsException(\"Not enough money\");\n }\n }", "public void withdrawFromChecking(double amount) {\r\n\t\tif(amount > this.getSavingsBalance()) {\r\n\t\t\tSystem.out.println(\"Unsufficient funds\");\r\n\t\t} else {\r\n\t\t\tthis.checkingBalance -= amount;\r\n\t\t\ttotalAmount -= amount;\r\n\t\t}\r\n\t}", "private static void withdraw(double amount) {\n double resultWithdraw = balance - amount;\r\n if (resultWithdraw < 0 || amount > 2000) {\r\n System.out.println(\"Withdrawal cannot exceed $2000. Balance cannot be reduced below $0.\");\r\n } else {\r\n System.out.println(amount + \" has been withdrawn from your bank account.\\nCurrent balance \" + resultWithdraw + \".\");\r\n }\r\n }", "public void withdrawMoney(double amount, boolean checkingAccount) {\n if (checkingAccount && amount <= checkingBalance) {\n checkingBalance -= amount;\n totalBalance -= amount;\n } else if (!checkingAccount && amount <= savingsBalance) {\n savingsBalance -= amount;\n totalBalance -= amount;\n } else {\n System.out.println(\"Insufficient Funds.\");\n }\n }", "public int withdraw() {\n\t\tif ((acc.getBalance() - keyboard.getAmt()) > acc.getMinimumBalace()) {\r\n\t\t\tif (casher.withdraw(keyboard.getAmt()) == 1) {\r\n\t\t\t\tsetNewBalance();\r\n\t\t\t\t\r\n\t\t\t\treciept.printer(acc.getAccountNumber(), acc.getBalance(), keyboard.getAmt());\r\n\t\t\t\treturn 1;\r\n\t\t\t} else\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}", "public void withdraw(double amount)\n {\n if (amount <= balance) {\n balance = balance - amount;\n }\n else {\n System.err.println(\"Transaction Declined\");\n remainder = balance - amount;\n System.out.println(\"Your balance would have been \" + remainder);\n }\n }", "public void withdraw (int amount) {\n if (amount >= 0) {\n balance = balance - amount;\n valueWithdrawals = valueWithdrawals + amount;\n if (balance < minimumBalance){\n minimumBalance = balance;\n }\n }\n }", "public int withdrawal(Account account, double amount) { \r\n\t\tint found = find(account); //get the account that wants to withdraw\r\n\t\t\r\n\t\t//if the account doesn't exist \r\n\t\tif ( found == -1 ) {\r\n\t\t\treturn -1; \r\n\t\t}\r\n\t\t//get the balance amount, and call debit() to decrease the balance by amount \r\n\t\tDouble balance = accounts[found].getBalance();\r\n\t\taccount.setBalance(balance);\r\n\t\taccount.debit(amount); \r\n\t\t\r\n\t\t//if its less than 0, means that there are insufficient funds\r\n\t\tif ( account.getBalance() < 0 ) {\r\n\t\t\treturn 1; \r\n\t\t} \r\n\t\taccounts[found].setBalance(account.getBalance());\r\n\t\t\r\n\t\t\r\n\t\t//check if the account is a MoneyMarket account, then increment the count of withdrawls\r\n\t\tif ( accounts[found] instanceof MoneyMarket ) {\r\n\t\t\tMoneyMarket moneyAcc = (MoneyMarket) accounts[found];\r\n\t\t\tint numberOfWithdraws = moneyAcc.getWithdrawals() + 1;\r\n\t\t\tmoneyAcc.setWithdrawals(numberOfWithdraws);\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public void withdraw(double amount)\n\t{\n\t\tbalance -= amount;\n\t}", "public void withdraw(double amount){\n\t\tbalance -= amount;\n\t}", "public void withdraw(double amount) {\n this.balance -= amount;\n }", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void withdraw(double amount) {\n\t\tbalance -= amount;\n\t}", "public void withdrawMoney(double amount) {\n\t\tbalance = balance - amount;\n\t}", "@Override\n\tpublic boolean withdraw(int accNo, double money) {\n\t\treturn false;\n\t}", "public void withdraw(double amount)\n {\n startingBalance -= amount;\n }", "public void withDrawAmount() {\n\t\t\n\t\ttry {\t\n\t\t\tlog.log(Level.INFO, \"Please Enter the account number you want to withdraw: \");\n\t\t\tint withdrawAccountNumber = scan.nextInt();\n\t\t\tlong amount;\n\t\t\tlog.log(Level.INFO, \"Please Enter the amount you want to withdraw : \");\n\t\t\tamount = scan.nextLong();\n\t\t\tbankop.withDraw(withdrawAccountNumber,amount);\n\t\t\t\n\t\t}catch(AccountDetailsException | BalanceException message ) {\n\t\t\tlog.log(Level.INFO, message.getMessage());\n\t\t}\n\n\t}", "@Override\r\n\tvoid withdraw(double amount) {\n\t\tsuper.withdraw(amount);\r\n\t\tif(minimumblc>500)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"you have withdraw rupees\"+ (amount));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"withdraw failed \");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void withdraw(int money) {\n\t\t\n\t}", "public void withdraw (double amount) {\r\n\t\tif(!overDrawn) {\r\n\t\t\tbalance=balance-amount;\r\n\t\t\tif(balance< -1)\r\n\t\t\t{\r\n\t\t\t\toverDrawn = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Negative amount!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void withdraw(double dollarAmount) throws InsufficientFundsException {\r\n\t\tif (this.accountBalance - dollarAmount < 0 || this.accountBalance - dollarAmount - 1.50 < 0) {\r\n\t\t\tthrow new InsufficientFundsException();\r\n\t\t} else {\r\n\t\t\ttransactionTracker++;\r\n\t\t\tSystem.out.println(transactionTracker);\r\n\t\t\tif (transactionTracker > 4) {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount - 1.50;\r\n\t\t\t} else {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void withdraw(int amount)\n {\n setBalance(getBalance()-amount);\n }", "public void withdraw(float amount) {}", "public void withdraw(float amount) {}", "public void withdraw(double amount) {\n\t\tif (amount < balance) {\n\t\t\tSystem.out.println(\"Successful withdraw: $\" + amount);\n\t\t\tbalance -= amount;\n\t\t} else {\n\t\t\tSystem.out.println(\"Withdraw Failed: Insufficient balance. The amount of $\" + amount + \" is more than your balance ($\" + balance +\").\");\n\t\t}\n\t}", "public abstract boolean withdraw(float amount);", "public void withdrawMoney(double amount) {\n\t\tif (amount>=0){\n\t\t\tsetBalance(this.balance - amount);\n\t\t}else{\n\t\t\tSystem.out.println(\"You can not withdraw a negative value!\");\n\t\t}\n\t\t\t\t\n\t}", "public boolean withdraw(double amount)\t{\n\t\tbalance = balance - amount;\n\t\tnumWithdraws++;\n\t\treturn true;\n\t}", "@Override\n public Account withdraw(int accountNo, int amount) throws AccountNotFoundException, InsufficientBalanceException {\n Account account = getAccount(accountNo);\n if (account == null) {\n return null;\n }\n if ((account.getBalance() + 1000) < amount) {\n throw new InsufficientBalanceException(\"Can't withdraw \" + amount + \" when balance is \" + account.getBalance());\n }\n account.setBalance(account.getBalance() - amount);\n\n Transaction transaction = new Transaction();\n transaction.setAccountNo(accountNo);\n transaction.setDate(\"DD/MM/YYYY\");\n transaction.setAction(\"Withdraw\");\n transaction.setAmount(amount);\n notifyObserver(transaction);\n\n return account;\n }", "public void withdraw( double amount ) throws Exception\n\t{\n\t\tif(amount >= 0.0 && amount <= balance)\n\t\t\tbalance -= amount;\n\t\t\n\t\telse\n\t\t\tthrow new Exception(\"Insufficient Balance\");\n\t}", "protected boolean withdraw(double amount)\n\t{\n\t\tif(amount>acc_balance)\n\t\t\treturn false;\n\t\t\n\t\t//else the deduction is done from balance and success message is passed\n\t\tacc_balance-=amount;\n\t\treturn true;\n\t}", "public boolean withdraw(double amount) {\n if (super.withdraw(amount)) {\n airlineDollars += amount * dollarRate;\n totalSpent += amount;\n claimDollars();\n return true;\n }\n return false;\n }", "public Integer withdraw(Integer amount) {\r\n\t if (balance < amount) {\r\n\t throw new NotEnoughFundsException(amount, balance);\r\n\t }\r\n\t balance -= amount;\r\n\t return balance;\r\n\t }", "@Override\n\tpublic void withdraw(double amount) {\n\t\tif (super.getBalance() - amount > overdraftLimit) {\n\t\t\tsuper.setBalance(getBalance() - amount);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Amount exceeds overdraft limit.\");\n\t}", "public void withdrawFromBalance(double withdrawBalanceAmount) \n\t{\n\t\taccountBalance -= withdrawBalanceAmount;\n\t}", "public long withdraw(long amount) {\n if (amount > balance) {\n long tmp = balance;\n balance = 0;\n return tmp;\n } else {\n balance -= amount;\n return amount;\n }\n }", "public double withdrawFrom(double amount)\r\n {\r\n _balance -= amount;\r\n\r\n return _balance;\r\n }", "public int withdraw(int amount) {\n\n this.balance -= amount;\n if (balance < 0) {\n\n this.balance = 0;\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return this.balance;\n\n } else {\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return balance;\n }\n }", "@Override\n public void withdraw(double amount) {\n try {\n if (amount > 1000) {\n throw new InvalidFundingAmountException(amount);\n }\n if (this.getBalance() < 5000) {\n throw new InsufficientFundsException(amount);\n }\n doWithdrawing(amount);\n } catch (BankException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override //nadpisanie - adnotacja, wskazówka\n public int withdraw(int cash) {\n super.balance -=cash;\n return cash;\n }", "@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }", "private void withdraw() {\n userInput = 0;\n while (userInput <= 0) {\n System.out.printf(\"Din nuværende balance er: %.2f DKK\\n\" +\n \"Indtast ønsket beløb at hæve: \", balanceConverted);\n\n textMenuKey(false, \"\");\n\n if (userInput <= 0) {\n System.out.println(\"Indtast et gyldigt beløb\");\n }\n }\n\n if ((userInput * 100) <= balance) {\n moneyController(-userInput);\n mysql.transactionUpdate(customerNumber, customerName, balance, userInput, \"Withdraw\");\n } else {\n System.out.println(\"Utilstrækkelig balance på kontien\");\n }\n }", "public boolean withdrawal (double amount)\r\n {\r\n\r\n System.out.println (\"Penalty incurred: \" + PENALTY);\r\n return super.withdrawal (amount+PENALTY);\r\n\r\n }", "public boolean withdrawMoney(int accountNo, float amount) {\n Account account = getAccountByAccountNo(accountNo);\n //check if account has sufficient balance\n if (checkIfEnough(account, amount)) {\n account.setBalance(account.getBalance() - amount);\n saveOrUpdate(account);\n //save transaction to database\n Transaction transaction = new Transaction();\n transaction.setAccountNo(accountNo);\n transaction.setTime(new Timestamp(new Date().getTime()));\n transaction.setType(\"withdraw\");\n transactionRepository.save(transaction);\n return true;\n }\n return false;\n }", "public int withdrawal(Account account, double amount) {\n\t\t\n\t\tint index = find(account);\n\t\t\n\t\tif (account == null || index == -1 || amount < 0) {\t\t//check if account exists, invalid amount\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\telse if (amount > accounts[index].getBalance()) {\t\t//check if funds insufficient\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\telse { \n\t\t\taccounts[index].debit(amount);\n\t\t\tif (account instanceof MoneyMarket) {\n\t\t\t\t((MoneyMarket) account).setWithdrawals();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 0; \n\t}", "void withdraw() {\n System.out.println(\"Enter the amount to withdraw : \");\n int withdraw = scan.nextInt();\n balance -= withdraw;\n }", "@Override\n\tvoid withdraw(double amount) {\n\t\tsuper.balance -= amount - 20;\n\t}", "public int withdrawal(Account account, double amount) {\n int accountPosition = find(account);\n if (accountPosition == -1) {\n return -1;\n }\n double currBal = accounts[accountPosition].getBalance();\n if (currBal < amount) {\n return 1;\n }\n accounts[accountPosition].debit(amount);\n return 0;\n }", "public boolean withdraw(long id, String password, String currency, double amount);", "public abstract String withdrawAmount(double amountToBeWithdrawn);", "@Override\n public boolean withdraw(double amount) {\n boolean res = store_trans(amount*-1);\n\n if(res){\n res=super.withdraw(amount);\n }\n\n return res;\n }", "public void withdraw(int amount) throws RejectedException {\n if (amount < 0) {\n throw new RejectedException(\n \"Tried to withdraw negative value, illegal value: \" + amount + \".\" + accountInfo());\n }\n if (balance - amount < 0) {\n throw new RejectedException(\n \"Tried to overdraft, illegal value: \" + amount + \".\" + accountInfo());\n }\n balance -= amount;\n }", "int withdraw(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n if (accountBalance <= amount)\n return -1;\n else {\n accountBalance -= amount;\n }\n }\n }\n updateAccount(id, accountBalance, account); // update command\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n\n return 1;\n }", "public abstract void withdraw(float amount);", "public boolean withdraw(double amount) {\n this.balance += -amount;\n return true;\n }", "@Override\n public void withdraw(double amount) //Overridden method\n {\n elapsedPeriods++;\n \n if(elapsedPeriods<maturityPeriods)\n {\n double fees = getBalance()*(interestPenaltyRate/100)*elapsedPeriods;\n super.withdraw(fees);//withdraw the penalty\n super.withdraw(amount);//withdraw the actual amount\n \n }\n \n }", "void preWithdraw(double amount) {\n\t\tSystem.out.println(\"Your account is not saver account.\");\n\t}", "public void withdrawOrDeposit(double amount, boolean isWithdraw){\n if(amount > 0.0) {\n if (isWithdraw) {\n balance -= amount;\n } else {\n balance += amount;\n }\n }\n }", "public void transferToChecking(double amount){\n withdrawSavings(amount);\r\n depositChecking(amount);\r\n }", "@Override\r\n\tpublic double withdrawlDao(double money) throws EwalletException {\n\t\tif(money<temp.getCustBal()) {\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttry {\r\n\t\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Withdrawn :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\t} catch (Exception 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\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\" Low Balance :( \");\r\n\t\t\treturn temp.getCustBal();\r\n\t}", "boolean withdraw(UUID name, double amount);", "public boolean withdraw(float amount) {\r\n\t\tif (amount > 0.0f) {\t\t\r\n\t\t\t// KG: incorrect, last balance check should be >=\r\n\t\t\tif (getState() == State.OPEN || (getState() == State.OVERDRAWN && balance > -100.0f)) {\r\n\t\t\t\tbalance = balance - amount;\r\n\t\t\t\t_numWithdraws++;\r\n\t\t\t\tif (_numWithdraws > 10)\r\n\t\t\t\t\tbalance = balance - 2.0f;\r\n\t\t\t\tif (balance < 0.0f) {\r\n\t\t\t\t\tsetState(State.OVERDRAWN);\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void subtractCreditTransaction(double withdrawAmount){\n if(!checkAccountOpen()){\n System.out.println(\"Your credit transaction in the amount of -$\" + withdrawAmount +\" has been declined\");\n }\n else {\n this.currentBalance = this.currentBalance - withdrawAmount;\n if(this.currentBalance<0){\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n this.currentBalance = this.currentBalance + withdrawAmount;\n }\n else {\n System.out.println(\"Your credit transaction has been approved!\");\n System.out.println(\"Your current balance is: $\" + currentBalance);\n }\n }\n\n }", "public void deposit (double amount) {\r\n\t\t\r\n\t\tbalance=balance+amount;\r\n\t\tif(balance > 0) {\r\n\t\t\t\r\n\t\t\toverDrawn = false;\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean withdrawAmount(float amount) {\n\t\treturn dao.withdrawAmount(amount);\r\n\t}", "public void withdraw(BigDecimal amount) {\n this.setBalance(this.getBalance().subtract(amount));\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public boolean withdrawl(double withdrawAmount) {\n\t\tif (balance-withdrawAmount < 0 || withdrawAmount < 0) return false; // Special cases: can't withdraw more than your balance; can't withdraw negative money\n\t\tbalance -= withdrawAmount;\n\t\treturn true;\n\t}", "@Test\n\tpublic void testWithdraw() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);;\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(01, \"acc1\", 00000, 50.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tArrayList<Account> expected = new ArrayList<>();\n\t\texpected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Withdrawl Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"fail withdrawing $50 + fee\", testResult);\n\t}", "@Override\r\n\tpublic boolean withdraw(WithdrawBean wb, double amount) throws WalletException {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb : customerList) {\r\n\t\t\tif(cb.getPhoneNum()==wb.getPhoneNum()) {\r\n\t\t\t\tif(wb.getBalance()>amount) {\r\n\t\t\t\twb.setBalance(wb.getBalance()-amount);\r\n\t\t\t\twb.setDate(LocalDateTime.now());\r\n\t\t\t\tisValid = true;\r\n\t\t\t\tWalletTransactions transac = new WalletTransactions();\r\n\t\t\t\ttransac.setAmount(amount);\r\n\t\t\t\ttransac.setBalance(wb.getBalance());\r\n\t\t\t\ttransac.setDate(wb.getDate());\r\n\t\t\t\ttransac.setPhoneNum(wb.getPhoneNum());\r\n\t\t\t\ttransac.setType(\"withdraw\");\r\n\t\t\t\ttransacList.add(transac);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "public void withdraw(double amount) throws \n\t\t\t\t\t\t\t\t\tBalanceTooLowException{\n\t\tif(balance >= amount){\n\t\t\tbalance -= amount;\n\t\t}\n\t\telse{\n\t\t\tdouble needs = amount - balance;\n\t throw new BalanceTooLowException(needs);\n\t\t}\n\t}", "public boolean canWithdraw(double withdrawalAmount){\n double potentialAmountOwed = withdrawalAmount + Math.abs(super.getCurrentBalance());\n if(potentialAmountOwed < creditLine) return true;\n \n return false;\n }", "public void depositMoney(double amount, boolean checkingAccount) {\n if (checkingAccount) {\n checkingBalance += amount;\n totalBalance += amount;\n } else {\n savingsBalance += amount;\n totalBalance += amount;\n }\n }", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public Double withdrawAndReportBalance(Double withdrawnAmount, AccountRule rule) \n \t\tthrows IllegalBalanceException \n {\n return null;\n }", "protected void deposit(double amount)\n\t{\n\t\tacc_balance+=amount;\n\t}", "public boolean withdraw(Double amount) {\r\n\t\tif (amount < 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (amount > this.WITHDRAW_LIMIT) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (amount > this.balance) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.balance = this.balance - amount;\r\n\t\treturn true;\r\n\t}", "@PostMapping(value = \"/withdraw\")\n public ResponseEntity<ResponseWrapper> withdraw(@RequestBody AccountWrapper accountWrapper) {\n ResponseWrapper wrapper =new ResponseWrapper();\n UserAccount userAccount = userAccountRepository.findByAccountNumber(accountWrapper.getAccountNumber());\n if(Objects.isNull(userAccount)){\n wrapper.setMessage(\"Account With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n if (userAccount.getAmount() < accountWrapper.getAmount()) {\n wrapper.setMessage(\"Insufficent funds in your account \");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n Float amount = userAccount.getAmount() - Math.abs(accountWrapper.getAmount());\n userAccount.setAmount(amount);\n\n accountTransactionService.saveTransaction(new AccountTransaction(WITHDRAW,accountWrapper.getAccountNumber(),\"Withdrawing Money\",accountWrapper.getAmount(),userAccount.getUserID()));\n wrapper.setMessage(\"Withdraw amount successfully:\" + accountWrapper.getAmount());\n wrapper.setData(userAccountRepository.save(userAccount));\n\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }", "public boolean withdraw(double amount) throws BankAccountException {\n if (amount>this.balance) {\n throw new BankAccountException(BankAccountException.LOW_AMOUNT_OF_MONEY);\n }\n if(amount + calculateTax(amount)<=balance) {\n this.balance = balance- (amount+calculateTax(amount));\n return true;\n }\n return false;\n }", "protected static Boolean withdrawCanBeMade(\n Account account,\n Integer amount,\n Transaction.TransactionType type\n ) {\n return doWithdrawCheck(account, null, null, amount, type);\n }", "void depositByCash(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Depositing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tbalance += amount;\n\t\tSystem.out.println(\"Deposit \" + amount + \" successfully\");\n\t}", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public double withdraw(double amount, boolean branch) {\n if ((amount > 25) && !branch) {\n throw new IllegalArgumentException();\n }\n balance -= amount;\n return balance;\n }", "public void withdrawCashFromSavings(long socialSecurityNumber, String userName, String password, double amount) throws AuthenticationException,UnauthorizedActionException,InsufficientAssetsException{\r\n if(security(socialSecurityNumber, userName, password)){\r\n throw new AuthenticationException();\r\n }\r\n if(getPatron(socialSecurityNumber).getSavingsAccount() == null){\r\n throw new UnauthorizedActionException();\r\n }\r\n try{\r\n Transaction withdraw = new Transaction(getPatron(socialSecurityNumber), Transaction.TRANSACTION_TYPE.WITHDRAW, getPatron(socialSecurityNumber).getSavingsAccount(), amount);\r\n withdraw.execute();\r\n txHistoryByPatron.get(getPatron(socialSecurityNumber)).add(withdraw);\r\n } catch (InsufficientAssetsException e){\r\n throw new InsufficientAssetsException();\r\n }\r\n }", "public void getSavingsWithdrawlInput()\r\n\t{\r\n\t\tSystem.out.println(\"Savings Account Balance : \" + Double.toString(savingsBalance));\r\n\t\tSystem.out.println(\"Enter the Amount to withdraw : \");\r\n\t\tdouble amount = input.nextDouble();\r\n\t\tif((savingsBalance-amount)>=0)\r\n\t\t{\r\n\t\t\tcalcSavingsWithdraw(amount);\r\n\t\t\tSystem.out.println(\"Withdrawl Successful\" + \"Savings Account Balance : \" + Double.toString(savingsBalance));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Insufficient Amount in your Account to withdraw\");\r\n\t\t}\r\n\t}", "public void makeWithdraw() {\n withDraw();\n }", "private void makeWithdraw() {\n\t\t\r\n\t}", "@Test\n\tpublic void withdrawTest(){\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tAccount cAcc = new CurrentAccount(cus);\n\t\tbc.withdraw(cAcc, 300);\n\t\tboolean flag = false;\n\t\tif(cAcc.getBalance() == -300.0){\n\t\t\tflag = true;\n\t\t}\n\t\tassertTrue(flag);\n\t}", "public void withdrawalMenu(){\n\t\tstate = ATM_State.WITHDRAW;\n\t\tgui.setDisplay(\"Amount to withdraw: \\n$\");\n\t}", "private void doWithdrawal() {\n while(true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n int amountWithdrawn = ui.readWithdrawalAmount();\n\n if(userAccount.debit(amountWithdrawn)){\n ui.displayNewBalance(userAccount);\n break;\n\n } else {\n ui.displayError(\"You do not have enough money in this account to withdraw \" + amountWithdrawn);\n }\n }catch(Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }", "public void withdraw(double ammount) throws insufficientFunds{\n if(ammount > abal)\n throw new insufficientFunds();\n else{\n ammount = abal - ammount;\n UpdateDB();\n }\n }" ]
[ "0.8043121", "0.8008468", "0.7997436", "0.78203064", "0.78125525", "0.7782193", "0.7768858", "0.7734695", "0.7715014", "0.76952684", "0.7690517", "0.7687304", "0.7684472", "0.767174", "0.76619095", "0.76415414", "0.76157314", "0.7604993", "0.75991595", "0.75558937", "0.75503945", "0.75472254", "0.7540701", "0.751716", "0.7514074", "0.75102675", "0.7503397", "0.749559", "0.74805367", "0.7439498", "0.7437354", "0.74292904", "0.74292904", "0.7415446", "0.74086297", "0.73905784", "0.7386353", "0.7377382", "0.7369971", "0.7365554", "0.73621327", "0.7359381", "0.73570377", "0.7337374", "0.73068607", "0.7303914", "0.72990656", "0.72981644", "0.72960335", "0.72775996", "0.7275287", "0.7252918", "0.72527033", "0.7239254", "0.72259504", "0.7207986", "0.72055626", "0.7161043", "0.7145729", "0.7143383", "0.7141276", "0.712993", "0.7101341", "0.7088517", "0.70716804", "0.70465887", "0.70281523", "0.70270425", "0.6996338", "0.69900125", "0.69844204", "0.69500226", "0.69473547", "0.6936706", "0.69262004", "0.69201684", "0.691563", "0.6897618", "0.6882363", "0.6880479", "0.6873987", "0.6873496", "0.6870431", "0.68256116", "0.6812846", "0.6801007", "0.680057", "0.6791423", "0.67909884", "0.6783029", "0.676898", "0.67657125", "0.67601746", "0.67600805", "0.67477274", "0.67468315", "0.6734995", "0.6727521", "0.6726977", "0.66800565" ]
0.7676348
13
Sets up a savings account using the specified values.
public Savings_Account (int account_num, double initial_balance, double interest_rate) { super (account_num, initial_balance); rate = interest_rate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }", "public void setSavingsAccount(BankAccount newSavings) {\n this.savings = newSavings;\n }", "public savingsAccount(){\n balance = 0;\n String[] sTransactions = new String[1000];\n savingTransactions = sTransactions;\n }", "public BankAccount(double checkingBalance, double savingsBalance) {\r\n\t\tthis.checkingBalance = checkingBalance;\r\n\t\tthis.savingsBalance = savingsBalance;\r\n\t\taccountsCount++;\r\n\t\ttotalAmount += checkingBalance;\r\n\t\ttotalAmount += savingsBalance;\r\n\t}", "@Test\n public void savings_account2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account savingsAccount = new SavingsAccount(bill, Account.SAVINGS);\n bank.addCustomer(new Customer(\"Bill\").openAccount(savingsAccount));\n Transaction t = new CreditTransaction(500.0);\n t.setTransactionDate(getTestDate(-15));\n savingsAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365, 15) * 500.0 - 500, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "public SavingsAccount(double rate) //setting interest rate with constructor\r\n { \r\n interestRate = rate;\r\n }", "public static void main(String[] args) {\n SavingAccount savings = new SavingAccount(1112, 200);\r\n CheckingAccount checking = new CheckingAccount(1113, 200, -200);\r\n\r\n //account.setAnnualInterestRate(4.5);\r\n savings.setAnnualInterestRate(4.5);\r\n checking.setAnnualInterestRate(4.5);\r\n\r\n\r\n //account.withdraw(250);\r\n //account.deposit(30);\r\n //System.out.println(account.toString());\r\n\r\n\r\n\r\n\r\n checking.withdraw(250);\r\n checking.deposit(30);\r\n System.out.println(checking.toString());\r\n\r\n savings.withdraw(2504);\r\n savings.deposit(30);\r\n System.out.println(savings.toString());\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n }", "public SavingsAccount() {\n super();\n }", "public SavingsAccount(String n) {\n super(n); \n balance = 0;\n }", "@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}", "void setDSTSavings(int dstSavings);", "public SavingsAccount() {\n\t}", "public Savings(int pin, double balance, double fees,\n\t\t\tdouble annualInterestRate) throws RaiseException {\n\t\tsuper(pin, EnumTypeAccount.savings, balance, fees);\n\t\tthis.annualInterestRate = annualInterestRate;\n\t\tthis.annualGain = this.getAnnualGain();\n\t}", "private void createSavingsAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE savingsAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 2000000001, INCREMENT BY 1), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table SavingsAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of SavingsAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "public SavingAccount(double initialBalance)\n\t\t { \n\t\t super(initialBalance);\n\t\t }", "public SavingsAccount(String accNumber, String accName, double rate) {\n\t\tsuper(accNumber, accName);\n\t\tinterestRate = rate;\n\t}", "@Test\n\tpublic void createAccountSavingTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnSaving.setSelected(true);\n\t\tdata.setRdbtnSaving(rdbtnSaving);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.SAVING.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "public SavingAccount()\n\t\t{\n\t\t\tsuper();\n\t\t}", "public void InitializeBalance(BigDecimal valor){\n \r\n ChekingAccount chekAc=pRepository.GetChekingAccount();\r\n chekAc.setSaldoInicial(valor);\r\n pRepository.SaveChekingAccount(chekAc);\r\n \r\n }", "void setBank(shared.data.Bank bank);", "public static void main(String[] args) {\n\t\tIAccount accountObjWithSavingsAcc=new SavingsAccount();\n\t\t\n\t\taccountObjWithSavingsAcc.depositAmount(100000);\n\t}", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "public SavingsAccount()\n {\n super();\n this.interestRate = DEFAULT_RATE;\n System.out.println(\"Constructor is called.\");\n }", "public SavingAccount(double balance, Date dateOfCreation, String accountId, User owner) {\n\t\tsuper(balance, dateOfCreation, accountId, owner);\n\t\tthis.interestRate = 0.1/100;\n\t}", "public StudentSavingsAccount(double bal, String name) {\n\n \t\tsuper(bal, name);\n// \t super();\n// \t setName(name);\n// \t setBalance(bal);\n \t overdraftsBeforeFee = 3;\n \t System.out.println(\"double, String constructor called [StudentSavingsAccount]\");\t\n\n }", "public static void createSavings(ArrayList<Account> accounts, int id, double balance, double interestRate){\n SavingsAccount sAccount = new SavingsAccount(id, balance, interestRate);\r\n \r\n //add the account just created to array\r\n accounts.add(sAccount);\r\n System.out.println(\"Your account has been created. Information of your new account is below. \\n\");\r\n \r\n //get the current index of the id and print out the info\r\n int idIndex = idIndex(accounts, sAccount.getID());\r\n System.out.println(\"Account type: Saving\");\r\n accounts.get(idIndex).displayAccountInformation();\r\n }", "private void setWallet(int dollars) {\n\t\twallet += dollars;\n\t}", "public void initAccount() {\n initAccount(Huobi.PLATFORM_NAME, Gateio.PLATFORM_NAME, \"EOS_USDT\", 14.5632);\n\n\n initAccount(Huobi.PLATFORM_NAME, Fcoin.PLATFORM_NAME, \"LTCUSDT\", 112.610000000);\n initAccount(Huobi.PLATFORM_NAME, Fcoin.PLATFORM_NAME, \"BCHUSDT\", 1032.690000000);\n initAccount(Huobi.PLATFORM_NAME, Fcoin.PLATFORM_NAME, \"ETHUSDT\", 572.300000000);\n\n initAccount(Huobi.PLATFORM_NAME, Dragonex.PLATFORM_NAME, \"EOSUSDT\", 13.1469);\n initAccount(Huobi.PLATFORM_NAME, Dragonex.PLATFORM_NAME, \"NEOUSDT\", 48.4760);\n initAccount(Huobi.PLATFORM_NAME, Dragonex.PLATFORM_NAME, \"ETHUSDT\", 572.1195);\n }", "public void addSavingsBalance(BigDecimal toAdd) {\r\n setSavingsBalance(savingsBalance.add(toAdd));\r\n }", "void setBalance(double value);", "public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate)\r\n {\r\n\r\n super (account_num, initial_balance, interest_rate);\r\n\r\n }", "public static void main(String[] args) {\n\t\tSavingsAccount Saver1 = new SavingsAccount(2000.00);\n\t\tSavingsAccount Saver2 = new SavingsAccount(3000.00);\n\t\t\n//\t\tSet interest rate to 4%\n\t\tSavingsAccount.modifyInterestRate(4);\n\t\t\n//\t\tPrint data for Saver 1\n\t\tSystem.out.println(\"Balance for Saver 1\");\n\t\t\n\t\tfor(int i = 0; i < 12; i++) {\n//\t\t\tcalculate the monthly interest\n\t\t\tSaver1.calculateMonthlyInterest();\n\t\t\tSystem.out.println(\"Month \" + (i+1) + \": \\t\");\n\t\t\tSaver1.displayBalance();\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\t\n\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\n//\t\tPrint data for Saver 2\n\t\tSystem.out.println(\"Balance for Saver 2\");\n\t\t\n\t\tfor(int i = 0; i < 12; i++) {\n//\t\t\tcalculate the monthly interest\n\t\t\tSaver2.calculateMonthlyInterest();\n\t\t\tSystem.out.println(\"Month \" + (i+1) + \": \\t\");\n\t\t\tSaver2.displayBalance();\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\t\n\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\n//\t\tSet interest rate to 5%\n\t\tSavingsAccount.modifyInterestRate(5);\n\t\t\n//\t\tCalculate new monthly interest\n\t\tSaver1.calculateMonthlyInterest();\n\t\tSaver2.calculateMonthlyInterest();\n\t\t\n//\t\tPrint Final data\n\t\tSystem.out.println(\"Saver 1 \\t Month 13: \\t\");\n\t\tSaver1.displayBalance();\n\t\t\n\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\n\t\tSystem.out.println(\"Saver 2 \\t Month 13: \\t\");\n\t\tSaver2.displayBalance();\t\t\n\n\t\t\n\t\t\n\t\t\n\t}", "@Test\n\tpublic void createNewAccountWithOpeningBalanceSavingTest() {\n\t\tcreateAccountSavingTest();\n\t\tcreateNewAccountWithOpeningBalanceHelper();\n\t}", "public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}", "public Account(String requisites, double value) {\n this.value = value;\n this.requisites = requisites;\n }", "public void writeBaseSavings(Account account, BufferedWriter bufferedWriter) throws IOException {\n bufferedWriter.write(\"BS @ \" + account.getBaseSavings() + \"\\n\");\n }", "void save(Account account);", "void setIncome(double amount);", "public static void main(String[] args){\n //create 2 SavingsAccount objects saver1 and saver2\n SavingsAccount saver1 = new SavingsAccount(2000.00);\n SavingsAccount saver2 = new SavingsAccount(3000.00);\n //set initial int rate at 4%\n SavingsAccount.modifyInterestRate(0.04);\n //calc monthly int for 12 months, set new balances and print new balances\n System.out.println(\"-Month----------Saver 1----------Saver 2----Interest Rate-\");\n for(int i = 1; i < 13; i++){\n //call each objects calc monthly int method 12 times\n saver1.calculateMonthlyInterest();\n saver2.calculateMonthlyInterest();\n //if statements are for proper table formatting, just visual whitespace changes\n if(i<=9) {\n System.out.printf(\" %d $%.02f $%.02f %.02f%%\\n\", i, saver1.getSavingBalance(), saver2.getSavingBalance(), (saver1.getInterestRate()*100.0));\n }\n else{\n System.out.printf(\" %d $%.02f $%.02f %.02f%%\\n\", i, saver1.getSavingBalance(), saver2.getSavingBalance(), (saver1.getInterestRate()*100.0));\n }\n }\n //set int rate to 5%\n SavingsAccount.modifyInterestRate(0.05);\n //calc next months int and print new balances\n saver1.calculateMonthlyInterest();\n saver2.calculateMonthlyInterest();\n System.out.printf(\" 13 $%.02f $%.02f %.02f%%\\n\", saver1.getSavingBalance(), saver2.getSavingBalance(),(saver1.getInterestRate()*100.0));\n System.out.println(\"\");\n }", "int save(final PaymentAccountScope scope);", "void setAccount(final Account account);", "@Override\n\tvoid make_deposit(DataStore ds){\n\tds.setbalancedepositAccount1(ds.getbalanceAccount1_temp()+ds.getdepositAccount1());\n\t}", "private void initial(){\n storeAccount(\"201799990001030047\");\n }", "public Savings(String first_name, String last_name, double balance, Date date, boolean isLoyal) {\r\n\t\tsuper(first_name, last_name, balance, date);\r\n\t\tthis.isLoyal = isLoyal;\r\n\t}", "public static void createAccount(String name, String address, String contactNum, SavingsAccount savings) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, savings));\n\t}", "public static void main(String[] args) {\n SavingsAccount saver1=new SavingsAccount(2000);\n SavingsAccount saver2=new SavingsAccount(3000);\n int b,i;\n SavingsAccount.modifyInterestRate(4);//Enter this as a percentage number e.g 4 percent or 3.5 as oppposed to .04 or .035\n System.out.println(\"Here is the balance sheet for Saver 1: 4% Interest Rate\\n\");\n for(i=1;i<=12;i++) {//This is the list for saver 1\n\t saver1.calculateMonthlyInterest();\n\t System.out.println(\"Month\\t\"+i+String.format(\"\\t%2f\",saver1.getSavingBalance()));\n }\n System.out.println(\"\\nHere is the balance sheet for saver 2: 4% Interest Rate\\n\");\n for(i=1;i<=12;i++) {\n\t saver2.calculateMonthlyInterest();\n System.out.println(\"Month\\t\"+i+String.format(\"\\t%2f\",saver2.getSavingBalance()));\n }\n \n SavingsAccount.modifyInterestRate(5);//from here just copy and paste the saver1 and saver 2 loops\n System.out.println(\"Here is new balance sheet for Saver 1: 5% Interest Rate\\n\");\n for(i=1;i<=12;i++) {//This is the list for saver 1\n\t saver1.calculateMonthlyInterest();\n\t System.out.println(\"Month\\t\"+i+String.format(\"\\t%2f\",saver1.getSavingBalance()));\n }\n System.out.println(\"\\nHere is new balance sheet for Saver 1: 5% Interest Rate\\\\n\");\n for(i=1;i<=12;i++) {\n\t saver2.calculateMonthlyInterest();\n System.out.println(\"Month\\t\"+i+String.format(\"\\t%2f\",saver2.getSavingBalance()));\n }\n \n \n\t}", "Bank(String name, double currentAmount) {\n this.accountName = name;\n this.currentAmount = currentAmount;\n }", "@Override\n\tpublic void saveData()\n\t{\n ssaMain.d1.pin = ssaMain.tmp_pin1;\n ssaMain.d1.balance = ssaMain.tmp_balance1;\n System.out.println(\"Your account has been established successfully.\");\n\t}", "UserAccount createUserAccount(User user, double amount);", "public Wallet() {\n total_bal = 10;\n }", "void xsetDSTSavings(org.apache.xmlbeans.XmlInt dstSavings);", "public saccoAccount (int account_num, double initial_balance) \r\n {\r\n\r\n account = account_num;\r\n balance = initial_balance;\r\n\r\n }", "@Test\n public void testSetBalance() {\n System.out.println(\"setBalance\");\n double balance = 9.0;\n Account instance = new Account(\"Piper\", 10.0);\n instance.setBalance(balance);\n double expResult = 9.0;\n double result = instance.getBalance();\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "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}", "public abstract PlacedBet register(double bet, double balance, Payout payout);", "public Savings(Calendar date, User owner1, String currencyCode, int num) {\n super(date, owner1, currencyCode, num);\n }", "public void setInitilaCash(int noOfBills) throws java.lang.Exception;", "public CheckingAccount()\n {\n withdrawals = 0;\n deposits = 0;\n }", "public Bank(String name, int accs){\n bankAccounts = new Account[accs];\n bankName = name;\n maxAccounts = accs;\n currAccounts = 0; //empty\n }", "public UsersAccounting saveUserAccounting(UsersAccountingBo usersAccountingBo) throws FixitException;", "public static void main(String[] args) {\n\t\t\n\t\tBanking s1 = AccountFactory.openSavingAccount(\"Polo\");\n\t\ttry {\n\t\t\ts1.withdraw(2000);\n\t\t} catch (BalanceException e) {\n\t\t\t//e.printStackTrace(); \t//For debugging - used by developers\n\t\t\t//System.out.println(e); \t//used for loggers\n\t\t\tSystem.out.println(e.getMessage()); \t//for end user\n\t\t}\n\t\t\n\t\ts1.deposit(3000);\n//\t\ts1.withdraw(2000);\n//\t\ts1.deposit(4000);\n//\t\t\n//\t\ts1.statement();\n\t\t\n\n\t}", "public static void main(String[] args) {\r\n\t SavingAccount a= new SavingAccount();\r\n\t a.deposit(5000);\r\n\t a.withdraw(1000);\r\n\t a.getBalance();\r\n\t a.addInterest();\r\n\t \r\n\t \r\n\t\t\r\n\r\n\t}", "public void deposit(double value)\r\n {\r\n //TODO need logic to make sure you can't deposit more then you have in cash\r\n subtractCash(value);\r\n savings += value;\r\n }", "public Checking_Account (int account_num, double initial_balance, Savings_Account protection)\r\n {\r\n\r\n super (account_num, initial_balance);\r\n overdraft = protection;\r\n\r\n }", "public BankAccount() {\n numberOfAccounts++;\n this.accountNumber = accountNumberGenerator(); \n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\t// Prompt the user to create a savings or a checking account\n\t\t//*** Start #1 ***//\n\t\tint type = 0;\n\t\tdo {\n\t\t\tSystem.out.println(\"What kind of account do you wish to create?\");\n\t\t\tSystem.out.print(\"Enter 1 for savings and 2 for checking: \");\n\t\t\ttype = input.nextInt();\n\t\t}\n\t\twhile (type != 1 && type != 2);\n\n\t\tAccount account;\n\t\tif (type == 1) account = new SavingsAccount();\n\t\telse account = new CheckingAccount();\n\n\t\t// Prompt the user to enter the account id, balance, and annual interest rate\n\t\tSystem.out.print(\"\\nEnter the account id (int): \");\n\t\tint id = input.nextInt();\n\t\taccount.setId(id);\n\n\t\tSystem.out.print(\"Enter the account balance (double): \");\n\t\tdouble balance = input.nextDouble();\n\t\taccount.setBalance(balance);\n\n\t\tSystem.out.print(\"Enter the annual interest rate (double): \");\n\t\tdouble annualInterestRate = input.nextDouble();\n\t\tAccount.setAnnualInterestRate(annualInterestRate);\n\t\t//*** End #1 ***//\n\t\t\n\t\tdo {\n\t\t\t// Display options to users\n\t\t\t//*** Start #2 ***//\n\t\t\tdisplayOptions(account);\n\n\t\t\tint option = input.nextInt();\n\t\t\tif (option == 0)\n\t\t\t\tbreak; \n\n\t\t\tswitch (option) {\n\t\t\tcase 1: \n\t\t\t\tSystem.out.println(\"\\n\\tThe id is: \" + account.getId());\n\t\t\t\tSystem.out.println(\"\\tThe account was created on: \" + account.getDateCreated());\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.printf(\"\\n\\tThe balance is: %.2f\\n\", account.getBalance());\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.printf(\"\\n\\tThe monthly interest is: %.2f\\n\", account.getMonthlyInterest());\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.print(\"\\n\\tEnter the amount to withdraw: \");\n\t\t\t\tdouble withdrawAmount = input.nextDouble();\n\t\t\t\taccount.withdraw(withdrawAmount);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.print(\"\\n\\tEnter the amount to deposit: \");\n\t\t\t\tdouble depositAmount = input.nextDouble();\n\t\t\t\taccount.deposit(depositAmount);\n\t\t\t\tbreak;\t\n\t\t\tcase 6:\n\t\t\t\tif (account instanceof CheckingAccount)\n\t\t\t\t\tSystem.out.printf(\"\\n\\tThe overdraft limit is: %.2f\\n\", ((CheckingAccount)account).getOverdraftLimit());\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"\\n\\tOption not available\");\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tif (account instanceof CheckingAccount) {\n\t\t\t\t\tSystem.out.print(\"\\n\\tEnter the new overdraft limit: \");\n\t\t\t\t\tdouble limit = input.nextDouble();\n\t\t\t\t\t((CheckingAccount)account).setOverdraftLimit(limit);\n\t\t\t\t} else\n\t\t\t\t\tSystem.out.println(\"\\n\\tOption not available\");\n\t\t\t\tbreak;\t\n\t\t\tdefault: \n\t\t\t\tSystem.out.println(\"\\n\\tInvalid option. Try again.\");\n\t\t\t//*** End #2 ***//\n\t\t\t};\n\t\t} while (true);\n\n\t\t// Display a final message\n\t\tSystem.out.println(\"\\nGoodbye\");\n\n\t\t// Close the Scanner\n\t\tinput.close();\n\t}", "public Account(String firstName, String lastName, String SSN,\n String email, String password, String cardNum, String accId,\n double gpa, String schoolName, HashMap<String, Transaction> pendingTransactions,\n HashMap<String, Transaction> completedTransactions) {\n //Map<String, Transaction> dailyTransactions) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.SSN = SSN;\n this.cardNum = cardNum;\n this.email = email;\n this.password = password;\n this.accId = accId;\n dailyLimit = 50.00;\n accCreditLimit = 1000.00;\n creditUsed = getCreditUsed();\n this.gpa = gpa;\n cashBackRate = gpa / 2;\n this.schoolName = schoolName;\n this.pendingTransactions = pendingTransactions;\n this.completedTransactions = completedTransactions;\n this.cashBackToDate = 0.0;\n //this.dailyTransactions = dailyTransactions;\n }", "public void setSavingsOpportunity(SavingsOpportunity savingsOpportunity) {\n this.savingsOpportunity = savingsOpportunity;\n }", "public void setSaldoBank(double saldoBank) {\n this.saldoBank = saldoBank;\n }", "public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }", "public BankAccount() {\n\t\tthis.money = 0;\n\t}", "public Account(double balance) {\n\t\tthis.balance = balance;\n\t}", "public static void main(String[] args) {\n Account account = new Account(1122, 20000);\n account.setAnnualInterestRate(4.5);\n \n // create checkingaccount object and set variables\n CheckingAccount checking = new CheckingAccount(1122, 20000);\n checking.setAnnualInterestRate(4.5);\n \n // create savings account object and set variables\n SavingsAccount savings = new SavingsAccount(1122, 20000);\n savings.setAnnualInterestRate(4.5);\n \n // invoke toString() methods\n account.toString();\n checking.toString();\n savings.toString();\n }", "public\n void\n setAccount(Account account)\n {\n itsAccount = account;\n }", "public Account() {\n\t\t//starting amount is 1500\n\t\tmoney = 1500;\n\t}", "public BankDataBase()\n {\n accounts = new Account[ 2 ];\n accounts[ 0 ] = new Account( 12345, 54321, 1000.0, 1200.0 );\n accounts[ 1 ] = new Account( 98765, 56789, 200.0, 200.0 );\n }", "public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}", "public void setBalance(double balance)\n {\n startingBalance = balance;\n }", "public void setSettlement(Settlement set);", "public Account(String owner, int ownerID, int accountID, double growthRate){\n this.owner = owner;\n this.ownerID = ownerID;\n this.accountID = accountID;\n this.growthRate = growthRate;\n \n }", "public void setJP_BankAccount_Value (String JP_BankAccount_Value);", "private void loadSavingsAccounts(String savingsAccountFileName)\n {\n try\n {\n /* Open the file to read */\n File inputFile = new File(savingsAccountFileName);\n\n /* Create a scanner to begin reading from file */\n Scanner input = new Scanner(inputFile);\n\n while (input.hasNextLine())\n {\n //read...\n String currentLine = input.nextLine();\n\n //parse on commas...\n String[] splitLine = currentLine.split(\",\");\n\n //DateFormat class to parse Date from file\n DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);\n\n //parsing out data...\n int accountId = Integer.parseInt(splitLine[0]);\n double balance = Double.parseDouble(splitLine[1]);\n String ssn = splitLine[2];\n double interestRate = Double.parseDouble(splitLine[3]);\n Date dateOpened = dateFormat.parse(splitLine[4]);\n int overdraftAccountId = Integer.parseInt(splitLine[5]);\n\n Savings savingsAccount = new Savings(accountId,\n balance,\n ssn,\n interestRate,\n dateOpened,\n overdraftAccountId);\n\n ArrayList<Transaction> accountTransactions = transactionHashMap.get(accountId);\n savingsAccount.setTransactions(accountTransactions);\n\n //add savings account...\n accounts.add(savingsAccount);\n }\n\n input.close();\n\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }", "private void setAccount(SessionData sessionData, Account account) {\n \ttry {\n\t sessionData.set(\"account\", account);\n \t} catch (Exception e) {\n \t throw new RuntimeException(e.toString());\n \t}\n }", "public void setBalance(double bal){\n balance = bal;\r\n }", "public void testSetAccount_fixture24_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture24();\n\t\tAccount account = new Account();\n\n\t\tfixture.setAccount(account);\n\n\t\t// add additional test code here\n\t}", "public SavingsAccount(double startBalance, double startInterestRate)\n {\n super(startBalance);\n setInterestRate(startInterestRate);\n System.out.println(\"Overloaded Constructor called.\");\n }", "public void createNewAccountWithOpeningBalanceHelper() {\n\t\tparseDateTextFieldHelper();\n\t\tBalance balance = data.createNewAccountWithOpeningBalance();\n\t\tLocalDate date = LocalDate.of(year, month, dayOfMonth);\n\t\tbalance.setDate(date);\n\t\tJTextField amount = data.getTextFieldBalance();\n\t\t// this before was not being set, i thought i set it in expectedResult but\n\t\t// that's a different object!\n\t\tbalance.setAmount(Float.parseFloat(amount.getText()));\n\t\t// I think you can actually just insert the values here instead if using get()\n\t\tBalance resultExpected = new Balance(bankTest, accountTest,\n\t\t\t\tdate.getYear(), date.getMonthValue(), date.getDayOfMonth(),\n\t\t\t\tFloat.parseFloat(amount.getText()), TEST_TXTR_EXTRA_NOTES);\n\t\tassertEquals(resultExpected, balance);\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tBankAccount myBankAccount = new BankAccount();\n\t\t\n\t\t// Add a transaction to myBankAccount\n\t\tmyBankAccount.getTransactions().add(new Transaction());\n\t\t\n\t\t// Set the amount for the first transaction:\n\t\tmyBankAccount.getTransactions().get(0).setAmount(12.34);\n\t\t\n\t\t// Output value of first transaction:\n\t\tdouble firstTransactionAmount = myBankAccount.getTransactions().get(0).getAmount();\n\t\t\n\t\tSystem.out.println(\"firstTransactionAmount: \" + firstTransactionAmount);\n\t\t\n\t\t\n\t\t// Add a second transaction\n\t\tmyBankAccount.getTransactions().add(new Transaction());\n\t\t// set its value (ideally would be done in a constructor that took the value):\n\t\tmyBankAccount.getTransactions().get(1).setAmount(34.56);\n\t\t\n\t\t\n\t\t//Total and display balance:\n\t\tmyBankAccount.getTotalBalanceFromTransactions();\n\t\tSystem.out.println(\"myBankAccount.getBalance(): \" + myBankAccount.getBalance());\n\t}", "public void setBank(Bank bank) {\r\n this.bank = bank;\r\n }", "public GoalMoneySaved(double moneySaved) {\n MoneySaved = moneySaved;\n }", "public SavingsAccount(double balance, String id, double interestRate) {\r\n\t\tsuper(balance, id);\r\n\t\tif(interestRate < 0){\r\n\t\t\tValidation.reportError(\"Invalid Interest Rate\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tYearlyInterestRate = interestRate;\r\n\t\t}\r\n\t\t\r\n\t}", "public void setCurrentCash(double value) {\r\n this.currentCash = value;\r\n }", "public BankAccount()\n {\n \t//intializing instance variables\n \t//at the time object creation constuctor executes \n \t\n \taccountHolderName=\"unknow\";\n \taccountBalance=0;\n \t\n }", "public void setBalance(){\n balance.setBalance();\n }", "int insert(FinanceAccount record);", "public static void saveAccount(MC x, MC y, MC z)\n {\n Scanner scan = new Scanner (System.in); \n int i=0;\n System.out.print(\"The accounts stored are: \" + \"\\n\\n\");\n System.out.println(\"Hero: \" + x.getName() + \" Level: \" + x.getLevel());\n System.out.println(\"Hero: \" + y.getName() + \" Level: \" + y.getLevel());\n System.out.print(\"Which hero would you like to override? (1 / 2)\" + \"\\n\" + \"Response: \");\n int response = scan.nextInt();\n if (response == 1) //if you want to save on account 1, it does that for you\n {\n x.setName(z.getName());\n x.setQuestNumber(z.getQuestNumber());\n x.setExperience(z.getExperience());\n x.setCurrentHP(z.getCurrentHP());\n x.setAgility(z.getAgility());\n x.setDefence(z.getDefence());\n x.setStrength(z.getStrength());\n x.setMoney(z.getMoney());\n x.setWeapon(z.getWeapon());\n x.setArmor(z.getArmor());\n x.setMaxHP(z.getMaxHP());\n x.setMinHeal(z.getMinHeal());\n x.setMaxHeal(z.getMaxHeal());\n x.setPoints(z.getPoints());\n x.setTotalExperience(z.getTotalExperience());\n x.setTotalCurrentExperience(z.getTotalCurrentExperience());\n x.setTotalMoney(z.getTotalMoney());\n x.setLevel0();\n for (i=x.getLevel(); i<z.getLevel(); i++) //to set the right level since setLevel() is only ++;\n {\n x.setLevel();\n }\n }\n else //for account 2\n { \n y.setName(z.getName());\n y.setQuestNumber(z.getQuestNumber());\n y.setExperience(z.getExperience());\n y.setCurrentHP(z.getCurrentHP());\n y.setAgility(z.getAgility());\n y.setDefence(z.getDefence());\n y.setStrength(z.getStrength());\n y.setMoney(z.getMoney());\n y.setWeapon(z.getWeapon());\n y.setArmor(z.getArmor());\n y.setMaxHP(z.getMaxHP());\n y.setMinHeal(z.getMinHeal());\n y.setMaxHeal(z.getMaxHeal());\n y.setPoints(z.getPoints());\n y.setTotalExperience(z.getTotalExperience());\n y.setTotalCurrentExperience(z.getTotalCurrentExperience());\n y.setTotalMoney(z.getTotalMoney());\n y.setLevel0();\n for (i=y.getLevel(); i<z.getLevel(); i++) \n {\n y.setLevel();\n }\n }\n }", "private void createDriver() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L,\n new Licence(\"Full for over 2 years\", \"YXF87231\",\n LocalDate.parse(\"12/12/2015\", formatter),\n LocalDate.parse(\"12/12/2020\", formatter)));\n }", "public void\tsaveAccounts() throws IOException;", "@Before\r\n public void setUp() throws Exception {\r\n bank.addPerson(p1);\r\n bank.addPerson(p2);\r\n\r\n bank.addAccount(p1, a1);\r\n bank.addAccount(p2, a2);\r\n bank.addAccount(p2, a3);\r\n }" ]
[ "0.6625433", "0.6610646", "0.65127504", "0.6262919", "0.6230255", "0.6185147", "0.5997869", "0.59937733", "0.5956465", "0.5938776", "0.5915104", "0.5884442", "0.5870853", "0.5773463", "0.575447", "0.57515246", "0.57462347", "0.5707366", "0.5701571", "0.5690678", "0.5689352", "0.568143", "0.56761503", "0.56580085", "0.5641994", "0.55907154", "0.55904627", "0.553404", "0.5532711", "0.5501953", "0.5493914", "0.54395306", "0.5413912", "0.5400389", "0.5394782", "0.53427315", "0.5314071", "0.5300241", "0.5298151", "0.52827036", "0.52534515", "0.52302074", "0.52219987", "0.52135915", "0.5207176", "0.5196682", "0.5196001", "0.51901406", "0.51882154", "0.51813793", "0.5173465", "0.51658493", "0.51648563", "0.5150359", "0.51461554", "0.5142095", "0.5132875", "0.5130639", "0.5125119", "0.51222885", "0.5118943", "0.5118794", "0.5117554", "0.51159614", "0.5109542", "0.51077616", "0.5104708", "0.5104083", "0.5076023", "0.50644326", "0.50612754", "0.50515825", "0.5049904", "0.50458765", "0.5034791", "0.5031095", "0.5031022", "0.50255495", "0.5020712", "0.5010632", "0.49960792", "0.49922317", "0.49863574", "0.49808836", "0.49746236", "0.49738672", "0.49723026", "0.49649024", "0.49532762", "0.49451637", "0.49425626", "0.49407852", "0.49350274", "0.4931525", "0.49314937", "0.49070042", "0.49042004", "0.49041533", "0.48956987", "0.48834732" ]
0.6058296
6
Adds interest to the account balance.
public void add_interest () { balance += balance * rate; System.out.println ("Interest added to account: " + account); System.out.println ("Current Balance: " + balance); System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addInterest() {\n\t\tdouble interest = getBalance() * interestRate / 100;\n\t\tdeposit(interest);\n\t}", "public void add_interest ()\r\n {\r\n\r\n balance += balance * (rate + BONUS_RATE);\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \" + balance);\r\n System.out.println();\r\n\r\n }", "public void increaseInterest() {\n\t\tthis.balance *= (1 + interestRate);\n\t}", "public void giveInterest(int accountId) throws SQLException,\n ConnectionFailedException,\n DatabaseInsertException {\n if (this.currentUserAuthenticated && this.currentCustomerAuthenticated) {\n // find if the account belongs to the user\n //List<Integer> accountIds = DatabaseSelectHelper.getAccountIds(this.currentUser.getId());\n boolean contains = false;\n int i = 0;\n List<Account> customerAccountList = this.currentCustomer.getAccounts();\n for (Account e : customerAccountList) {\n if (e.getId() == accountId) {\n contains = true;\n break;\n }\n i++;\n }\n \n if (contains) {\n // find out which account type it is\n // add interest to the account and update the balance\n // update database\n int role = DatabaseSelectHelper.getAccountType(accountId);\n BigDecimal interestRate = new BigDecimal(\"0\");\n // calculate balance after interest rate\n interestRate = DatabaseSelectHelper.getInterestRate(role).add(new BigDecimal(\"1\"));\n BigDecimal oldBalance = DatabaseSelectHelper.getBalance(accountId);\n BigDecimal newBalance = oldBalance.multiply(interestRate);\n newBalance = newBalance.setScale(2, RoundingMode.HALF_UP);\n DatabaseSelectHelper.getAccountDetails(accountId).addInterest();\n DatabaseUpdateHelper.updateAccountBalance(newBalance, accountId);\n \n this.currentCustomer.getAccounts().get(i).setBalance(newBalance);\n \n String msg = \"An interest rate has been added to your account: $\" + interestRate;\n int msgId = DatabaseInsertHelper.insertMessage(currentCustomer.getId(), msg);\n \n Message message = new MessageImpl(msgId, msg, false);\n currentCustomer.getMessagingCentre().addMessage(message);\n \n }\n }\n }", "public void interestIncrease(){\r\n for (SavingsAccount account : saving){\r\n if (account == null){\r\n break;\r\n }\r\n account.addInterest();\r\n }\r\n }", "public void addInterest() {}", "public void calcInterest() {\n\t\tbalance = balance + (interestPct*balance);\n\t\t}", "public void AddInterest(Interest I) {\n \t//TODO does this add new ones to the DB or must they already exist?\n \tinterests.add(I);\n }", "public void addInterest(TXSemanticTag interest);", "public void applyInterest()\n {\n deposit( (getBalance()* getInterestRate()) /12);\n }", "public void calcInterest() {\n double monthlyInterestRate = annualInterestRate / 12;\n double monthlyInterest = balance * monthlyInterestRate;\n balance += monthlyInterest;\n }", "public double calcInterest(){\n double interest = (interestRate + 1) * balance;\n return interest;\n }", "public void GetInterest() {\n\t\tSystem.out.println(\"balance=\"+bal);\r\n\t\tinterest_rate=((bal/100)*10);\r\n\t\t\r\n\t\tSystem.out.println(\"Interest :- \"+ interest_rate);\r\n\t\tbal=(int) (bal+interest_rate);\r\n\t\tSystem.out.println(\"Balance after interest:- \"+bal );\r\n\t}", "void addBalance(double amount) {\n\t\tbalance += amount;\n\t}", "public void addBalance(long balance) {\r\n this.balance += balance;\r\n }", "public final void addInterest( final String tag ) {\n Log.d( TAG, \"Adding interest for '\" + tag + \"'.\" );\n\n this.interestList.add(tag);\n\n final D2DAddInterestNotificationEvent event = new D2DAddInterestNotificationEvent( true );\n event.interestList.add( tag );\n this.sendEvent( event );\n }", "public void addBalance()\n\t\t{\n\t\t\tthis.setBalance_acc2(this.getBalance_acc2() + this.getTemp_d_acc2());\n\t\t}", "public static void addAccount(String accType, float balance, String fName, String lName, float interest) {\n\t\tStatement stmt;\n\t\ttry {\n\t\t\tstmt = con.getConnection().createStatement();\n\t\t\t// insert the data\n\t\t\t\n\t\t\tjava.sql.Date currentDate = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n\t\t\t\n\t\t\tstmt.executeUpdate(\"INSERT INTO ser322.account \" + \"VALUES (NULL, '\" + accType + \"', \" + balance + \", '\" + currentDate + \"'); \" +\n\t\t\t\"SET @last_id_in_account = Last_INSERT_ID();\" + \n\t\t\t\"INSERT INTO interest_rate VALUES(@last_id_in_account, (SELECT accType FROM account WHERE accID = @last_id_in_account),\" + interest + \");\");\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"[ERROR] - Add Account Error\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tAccountsManager.populateFromSQL();\n\t\tAccountsPanel.refreshTabel(); \n\t \n\n\t}", "public void earnMonthlyInterest(){\r\n\t\tbalance += balance * getYearlyInterestRate() / 12 ;\r\n\t}", "public void addInterestEarned(Equity holding) {\n \n double time = 0;\n double intrst = 0;\n double price = holding.getSimulationPrice();\n double newPrice = price;\n int steps = amount;\n \n switch(interval) {\n \n case DAY:\n time = amount / 365.0;\n break;\n case MONTH:\n time = amount / 12.0;\n break;\n case YEAR:\n time = amount;\n break;\n }\n \n switch(simType) {\n \n case NONE:\n holding.addPriceChange(newPrice);\n return;\n \n case BEAR:\n intrst = price * percentage * time;\n steps = amount;\n \n while(steps != 0) { \n \n newPrice -= ((1.0/amount) * intrst);\n steps--;\n }\n \n holding.addPriceChange(newPrice);\n break;\n \n case BULL:\n intrst = price * percentage * time;\n steps = amount;\n \n while(steps != 0) {\n \n newPrice += ((1.0/amount) * intrst);\n steps--;\n }\n \n holding.addPriceChange(newPrice);\n break;\n }\n }", "void updateInterest() {\n // FIXME: Currently unimplemented\n }", "public void addToBalance(double depositBalanceAmount) \n\t{\n\t\taccountBalance += depositBalanceAmount;\n\t}", "public void addMoney(int income) {\r\n\t\tmoney += income;\r\n\t}", "public double getBalancePlusInterest()\n {\n return startingBalance * (1 + (interestRate / 12));\n }", "public void addBalance(float deposit) {\r\n\t\tthis.balance += deposit;\r\n\t}", "public void setInterestAmount(BigDecimal interestAmount) {\n this.interestAmount = interestAmount;\n }", "public void addSavingsBalance(BigDecimal toAdd) {\r\n setSavingsBalance(savingsBalance.add(toAdd));\r\n }", "public void addMoney(int amount) {\n\t\tcurrentBalance += amount;\n\t}", "public Saving updateSavingBalanceByAddingInterests(Long id){\n Optional<Saving> optionalSaving = savingRepository.findById(id);\n\n if(optionalSaving.isPresent()){\n LocalDateTime today = LocalDateTime.now();\n long diff = Math.abs(ChronoUnit.YEARS.between(today, optionalSaving.get().getAdditionLastInterestDate()));\n if(diff > 0){\n BigDecimal newBalance = optionalSaving.get().getBalance().multiply(optionalSaving.get().getInterestRate().add(new BigDecimal(1)).pow((int) diff));\n transactionService.saveTransaction(TransactionType.INTEREST, newBalance.subtract(optionalSaving.get().getBalance()), optionalSaving.get().getId(), ReturnType.SAVING, optionalSaving.get().getPrimaryOwner(), optionalSaving.get().getId(), ReturnType.SAVING, optionalSaving.get().getPrimaryOwner());\n optionalSaving.get().setBalance(newBalance);\n optionalSaving.get().setAdditionLastInterestDate(today);\n }\n return savingRepository.save(optionalSaving.get());\n }else{\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"The saving account with the given id does not exist\");\n }\n }", "public void applyInterest(double rate) {\n if ((rate > 0) && (balance < 0)) {\n withdraw((int) (-balance*rate));\n } \n if ((rate > 0) && (balance > 0)) {\n deposit((int) (balance*rate));\n }\n }", "public Builder addInterests(\n int index, pl.stormit.protobuf.UserProtos.User.Interest value) {\n if (interestsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInterestsIsMutable();\n interests_.add(index, value);\n onChanged();\n } else {\n interestsBuilder_.addMessage(index, value);\n }\n return this;\n }", "public void setInterest(String interest) {\n this.interest = interest;\n }", "public void increaseBalance(final double balance) {\n this.balance += balance;\n }", "public Builder addInterests(pl.stormit.protobuf.UserProtos.User.Interest value) {\n if (interestsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInterestsIsMutable();\n interests_.add(value);\n onChanged();\n } else {\n interestsBuilder_.addMessage(value);\n }\n return this;\n }", "public void addIncomeAmount(KualiDecimal incomeAmount) {\n this.incomeAmount = this.incomeAmount.add(incomeAmount); \n this.totalNumberOfTransactionLines++;\n \n }", "public void addAccount(BankAccount newAccount) { \n accounts.add(newAccount); // Insere no final do vetor.\n }", "public void calculateMonthlyInterest() {\r\n addSavingsBalance(getSavingsBalance().\r\n multiply(annualInterestRate.divide(\r\n BigDecimal.valueOf(12.0), 10, RoundingMode.HALF_UP)));\r\n }", "public static void modifyInterestRate(double interestRate){\n annualInterestRate = interestRate;\n }", "public void updateInterest(){\n //Caculate when all fields are available\n String amountStr = amountInput.getText().toString();\n String yieldStr = annualizedYieldInput.getText().toString();\n String bankStr = bankInput.getText().toString();\n\n if (mStartDate!=null && mEndDate!=null\n && !Utils.isNullOrEmpty(amountStr)\n && !Utils.isNullOrEmpty(yieldStr)\n && !Utils.isNullOrEmpty(bankStr)){\n\n float days = Utils.getDiffDays(mStartDate,mEndDate);\n mAmount = Float.valueOf(amountStr);\n mYield = Float.valueOf(yieldStr);\n\n //Caculate the value\n mInterest = mAmount * (mYield/100)*(days/ Constants.DAYS_OF_ONE_YEAR);\n mInterest = Utils.roundFloat(mInterest);\n //Update the interest in UI\n expectedInterestInput.setText(Utils.formatFloat(mInterest));\n Log.d(Constants.LOG_TAG, \"start = \" + mStartDate.toString() + \"\\nend = \" + mEndDate.toString()\n + \"\\ndays = \" + days + \"\\namount = \" + mAmount + \"\\nyield = \" + mYield + \"\\ninterest = \" + mInterest);\n }\n }", "public void changeBalance (int amount){\n balance += amount;\n }", "void addBondToInvestmentAccount(Bond newBond, Ui ui) throws BankException {\n throw new BankException(\"This account does not support this feature\");\n }", "public void credit(double amount) {\n this.balance += amount;\n }", "public void addCash(double amount) {\r\n cash += amount;\r\n }", "public TXSemanticTag addInterest(String name, String si);", "public BigDecimal getInterestAmount() {\n return interestAmount;\n }", "String addBalance(Integer clientAccountId, Integer balance) throws ServiceException;", "public void increase() {\n balance.multiply(1.001);\n }", "void addIncomeToBudget();", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public void calculateMonthlyInterest(){\n double currentMonth;\n currentMonth = (double)(this.savingsBalance*annualInterestRate/12);\n this.savingsBalance += currentMonth;\n }", "private void payInterest(Customer customer) {\n AccountType accountType = AccountType.SAVINGACCOUNT;\n if(customer.hasHighBalance()) {\n Currency interest = Interest.getInterestForSaving(customer);\n customer.deposit(interest, accountType);\n loseProfit(interest);\n }\n }", "@Override\n public double calculateInterest(double amount) {\n\t\treturn ( hasWithdrawalInPast10Days() ? 0.001 : 0.05 ) * amount;\n }", "public boolean addCourtInterest(CourtBooking courtBooking, String name, String phoneNumber) {\n BookingInterest bookingInterest = bookingInterestHelper.createBookingInterest(name, phoneNumber);\n if (courtBooking.getInterestTwo() == null) {\n updateCourtSecondInterest(courtBooking, bookingInterest);\n return false;\n } else if (courtBooking.getInterestThree() == null) {\n updateCourtThirdInterest(courtBooking, bookingInterest);\n return false;\n } else if (courtBooking.getInterestFour() == null) {\n updateCourtForthInterest(courtBooking, bookingInterest);\n return true;\n }\n return false;\n }", "public static void createAccount(String accountnumber, double interest) {\n\t\t//Insert Account into Accounts Table\n\t\tString execute = \"INSERT INTO \" + EconomosConstants.DB_ACCOUNTS_TABLENAME + \" (accountno, balance, interest)\" +\n\t\t\t\t\" VALUES (\" + accountnumber + \", \" + interest + \", \" + EconomosConstants.INTEREST_AMOUNT + \")\";\n\t\tSQLUtil.transactUpdate(execute);\n\t\tif (EconomosConstants.VERBOSE) GPP.consoleInfo(\"[GPP::ECONOMOS] Bank account \" + accountnumber + \" created.\");\n\t}", "void addToAmount(double amount) {\n this.currentAmount += amount;\n }", "@Override\n\tpublic void addAccount(Bank bank, Account account) {\n\t\t\n\t\tbank.addAccount(account);\n\t}", "public void setInterest(double rate)\n {\n interestRate = rate;\n }", "public void addMoney(double profit){\n money+=profit;\n }", "public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate)\r\n {\r\n\r\n super (account_num, initial_balance, interest_rate);\r\n\r\n }", "private void savingAccountInterest(){\n if(this.watch.checkElapsedTime() >= 30){\n this.watch.stop(); // stopping stopwatch\n this.timeInterval = this.watch.elapsedTime(); // saving elapsed time in variable\n System.out.println(\"this.timeInterval == \"+this.timeInterval);\n this.bal += this.bal * 0.05 * Math.floor(this.timeInterval/30); // incrementing balance by 5% every 30 seconds\n this.watch.start();\n }\n }", "private void addToBalance(double aBalance) {\n balance += aBalance;\n String out = String.format(\"<html><b>Balance</b><br>$%.2f</html>\", balance);\n balanceLabel.setText(out);\n }", "void addBank(IBank bank) throws RemoteException;", "private double computeSimpleInterest(double balance, int time) {\n\t\treturn (balance * 0.1) / 365;\n\t}", "public double addToBalance(double addAmount){\r\n\t\tbalance +=addAmount;\r\n\t\treturn balance;\r\n\t}", "@Override\n\tpublic void addIncomeBill(IncomeBillPO incomeBillPO) throws RemoteException {\n\t\t\n\t}", "public void addMoney(int amount) {\n\t\tmoney += amount;\n\t}", "private InterestRegistration registerInterest(InterestRegistration reg) throws IOException {\n setupTimers();\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINEST)) Log.finest(Log.FAC_NETMANAGER, formatMessage(\"registerInterest for {0}, and obj is \" + _myInterests.hashCode()), reg.interest.name());\n synchronized (_myInterests) {\n _myInterests.add(reg.interest, reg);\n }\n return reg;\n }", "public SavingsAccount(double balance, String id, double interestRate) {\r\n\t\tsuper(balance, id);\r\n\t\tif(interestRate < 0){\r\n\t\t\tValidation.reportError(\"Invalid Interest Rate\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tYearlyInterestRate = interestRate;\r\n\t\t}\r\n\t\t\r\n\t}", "public double getInterest()\r\n {\r\n return interest;\r\n }", "public Saving interestRate(String interestRate) {\n this.interestRate = interestRate;\n return this;\n }", "public void addCash(double added_cash) {\n cash += added_cash;\n }", "public void setInterestRate(double interestRate) {\n this.interestRate = interestRate;\n }", "@Override\r\n\tpublic boolean addBankAccount(String name, String balance) {\n\t\treturn false;\r\n\t}", "public String getInterestAmount() {\r\n return interestAmount;\r\n }", "public static double calculateInterest(double amount, double interestRate) {\n\n return(amount * (interestRate / 100));\n\n }", "public double getInterest ()\n {\n return interest;\n }", "public User addInterest(String email,String password, String interest) throws MeetingException{\n \tUser user = null;\n \tif(this.isUserInArrayLisyOfUsers(email, users)==false){\n \t\tthrow new NotExistingUserMember();\n \t//IF there are more than 5 interest or one is yet count\t\n \t}else if((this.getUserFromUsersBy(email, password).getNumberInterest() >=5)||\n \t\t\t(this.getUserFromUsersBy(email, password).getInterest().contains(interest))){\n \t\tthrow new MaximunNumberOfInterestPerUser();\n \t}else{\n \t\tthis.getUserFromUsersBy(email, password).addInterest(interest);\n \t\tuser = this.getUserFromUsersBy(email, password);\n \t}\n \treturn user;\n }", "public pl.stormit.protobuf.UserProtos.User.Interest.Builder addInterestsBuilder(\n int index) {\n return getInterestsFieldBuilder().addBuilder(\n index, pl.stormit.protobuf.UserProtos.User.Interest.getDefaultInstance());\n }", "public void addMoney(int amount) {\n\t\tcurrentMoney.addMoney(amount);\n\t}", "protected void insertDime(double balance)\r\n {\r\n totalBalance = balance;\r\n totalBalance = totalBalance + 0.1;\r\n }", "public void expressInterest(Object caller, Interest interest, CCNInterestListener callbackListener) throws IOException {\n if (null == callbackListener) {\n throw new NullPointerException(formatMessage(\"expressInterest: callbackListener cannot be null\"));\n }\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINE)) Log.fine(Log.FAC_NETMANAGER, formatMessage(\"expressInterest: {0}\"), interest);\n InterestRegistration reg = new InterestRegistration(this, interest, callbackListener, caller);\n expressInterest(reg);\n }", "public void updateBalance(int account_id, int final_amount){\n dbUpdate(\"update ACCOUNTS set BALANCE = \"+ final_amount + \" where ACCOUNT_ID = \" + account_id);\n cache.add(new Account(account_id, final_amount));\n }", "public interface Account {\n\t\n//\t\n//\t\tMoney money;\n//\t\tInterestRate interestRate;\n//\t\tPeriod interestPeriod;\n\t\t\n\t\tpublic int deposit(int depositAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()+depositAmmount;\n//\t\t}\n\t\t\n\t\tpublic int withdrawl(int withdrawAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()-withdrawAmmount;\n//\t\t}\n\t\t\n\t\tpublic int getBalance();\n//\t\t{\n//\t\t\treturn money.getMoney()*interestRate.getInterestRate()*interestPeriod.getPeriod()/100;\n//\t\t}\n\t}", "public void addCoins(int coins) {\n total_bal += coins;\n }", "public double getInterest()\n {\n return interestRate;\n }", "public pl.stormit.protobuf.UserProtos.User.Interest.Builder addInterestsBuilder() {\n return getInterestsFieldBuilder().addBuilder(\n pl.stormit.protobuf.UserProtos.User.Interest.getDefaultInstance());\n }", "public void addAccount(Account account,Person person);", "public void addJackpot(int amount){\n this.amount += amount;\n }", "public void addAccount(AccountInterface _account) {\n\t\tif (!isAccountContained(_account)) {\n\t\t\taccounts.add(_account);\n\t\t}\n\t}", "public String getInterest() {\n return interest;\n }", "public void updateBalance(UUID accountId, double amount) {\n Account account = repository.getAccount(accountId);\n account.updateBalance(amount);\n repository.save(account);\n }", "public void addDailyInterest(double intRate, int numDays) {\n DecimalFormat df = new DecimalFormat(\"#,##0.00\");\n if (intRate >= 0 && numDays >= 0) {\n double i = (intRate / 100) / 365;\n double A = balance * Math.pow((1.0 + i), numDays);\n JOptionPane.showMessageDialog(null, \"The interest earned in \" + numDays + \" days is: $\" + df.format(A - balance));\n balance = A;\n } else {\n JOptionPane.showMessageDialog(null, \"There is a problem with your interest rate or the number of days\");\n JOptionPane.showMessageDialog(null, \"Negative amounts are not allowed.\");\n }\n }", "public void write(Interest interest) throws ContentEncodingException {\n _stats.increment(StatsEnum.WriteInterest);\n WirePacket packet = new WirePacket(interest);\n writeInner(packet);\n }", "public void addCoins(int i) {\n coins = coins + i;\n }", "public void addIncludedTax (BigDecimal amt)\r\n\t{\r\n\t\tm_includedTax = m_includedTax.add(amt);\r\n\t}", "public void addAmount(int amountOfShares) {\n\t\tthis.amountOfShares += amountOfShares;\n\t}", "public double getInterest(){return this.interest_rate;}", "@Test\n public void savings_account2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account savingsAccount = new SavingsAccount(bill, Account.SAVINGS);\n bank.addCustomer(new Customer(\"Bill\").openAccount(savingsAccount));\n Transaction t = new CreditTransaction(500.0);\n t.setTransactionDate(getTestDate(-15));\n savingsAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365, 15) * 500.0 - 500, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "public void addAccount(Person p, Account a);", "public void addBalance() {\r\n List<String> choices = new ArrayList<>();\r\n choices.add(\"10\");\r\n choices.add(\"20\");\r\n choices.add(\"50\");\r\n ChoiceDialog<String> addBalanceDialog = new ChoiceDialog<>(\"10\", choices);\r\n addBalanceDialog.setTitle(\"Add Balance\");\r\n addBalanceDialog.setContentText(\"Please enter the balance you want to add\");\r\n Optional<String> result = addBalanceDialog.showAndWait();\r\n result.ifPresent(\r\n s -> cardSelected.addMoney(Double.parseDouble(addBalanceDialog.getSelectedItem())));\r\n }" ]
[ "0.89844817", "0.87193215", "0.7960966", "0.77384", "0.7710118", "0.75193757", "0.75116247", "0.7351901", "0.73434377", "0.7131638", "0.7109761", "0.6975674", "0.6673731", "0.65895265", "0.6565047", "0.65222234", "0.65119636", "0.64647907", "0.644672", "0.6424216", "0.64109266", "0.63993955", "0.6381881", "0.63713783", "0.6362395", "0.63405144", "0.6325043", "0.6307077", "0.6259151", "0.62328404", "0.62231493", "0.62218916", "0.6218566", "0.6213571", "0.6167477", "0.6112527", "0.6094686", "0.6068353", "0.60611624", "0.605348", "0.60360837", "0.59946734", "0.59696597", "0.5960824", "0.5934394", "0.5925529", "0.5893573", "0.58751225", "0.5870551", "0.58540374", "0.58505166", "0.5848715", "0.58400106", "0.58301556", "0.5815222", "0.5799522", "0.5770215", "0.5759915", "0.575961", "0.57595414", "0.57546914", "0.57510376", "0.574941", "0.5744381", "0.57381463", "0.57228625", "0.5721218", "0.5719256", "0.56763506", "0.566519", "0.56630784", "0.56622326", "0.5632541", "0.56286865", "0.5610659", "0.56048137", "0.5584843", "0.55841106", "0.5569126", "0.5543651", "0.5541265", "0.5537929", "0.5535622", "0.55342954", "0.5524357", "0.55229247", "0.55137855", "0.55109733", "0.5488854", "0.5486657", "0.54673535", "0.5466676", "0.54578614", "0.54576254", "0.5452349", "0.54422486", "0.5437302", "0.5437189", "0.5432066", "0.5427916" ]
0.8538006
2
Sets up a bonus account using the specified values.
public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate) { super (account_num, initial_balance, interest_rate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBonus(double bonus){\r\n this.bonus = bonus;\r\n }", "public void setBonusAmount(long value) {\r\n this.bonusAmount = value;\r\n }", "public Account(String requisites, double value) {\n this.value = value;\n this.requisites = requisites;\n }", "void setBalance(double value);", "public Bonus (){\n\t\tsuper (); \n\t\t//TODO [CORRECCION] Tiene una clase Config, utilizarla para estos valores fijos.\n\t\tthis.tiempoDeVida = Config.BONUS_VIDA; // cantidad de turnos\n\t\tPosicion posicion = new Posicion(randX.nextInt(), randY.nextInt());\n\t\tTamanio tamanio = new Tamanio(Config.BONUS_ANCHO, Config.BONUS_ALTO);\n\t\tthis.setPosicion(posicion);\n\t\tthis.setTamanio(tamanio);\n\t}", "BonusResponse add(Long customerId, Long authorizedBy, BonusRequest bonus);", "public saccoAccount (int account_num, double initial_balance) \r\n {\r\n\r\n account = account_num;\r\n balance = initial_balance;\r\n\r\n }", "public Wallet() {\n total_bal = 10;\n }", "public Savings_Account (int account_num, double initial_balance, double interest_rate) \r\n {\r\n\r\n super (account_num, initial_balance);\r\n\r\n rate = interest_rate;\r\n\r\n }", "public void setMyIncomeMultiplier(float factor) throws CallbackAIException;", "public Builder setBonusMoney(int value) {\n bitField0_ |= 0x00000010;\n bonusMoney_ = value;\n onChanged();\n return this;\n }", "private void setWallet(int dollars) {\n\t\twallet += dollars;\n\t}", "public Employee(String firstName, String lastName, int salary, int bonus) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.salary = salary;\n this.bonus = bonus;\n this.taxableSalary=this.salary+this.bonus-this.taxAllowance;\n }", "public void setBonus(int firstThrow, int secondThrow) {\r\n\t\t//to be implemented\r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t\tif(frames.get(i).isSpare())\r\n\t\t\t{\r\n\t\t\t\tbonus= frames.get(i+1);\r\n\t\t\t\tbonusGame+=bonus.score();\r\n\t\t\t}\r\n\t\t\telse if(frames.get(i).isStrike())\r\n\t\t\t{\r\n\t\t\t\tbonus = frames.get(i+1);\r\n\t\t\t\tbonusGame+=bonus.score();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t}", "public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some validation in the other functions\r\n //not nessacary\r\n setAccNum(accNum);\r\n this.bal=bal;\r\n this.name=name;\r\n this.email=email;\r\n this.phone=phone;\r\n\r\n }", "public void setBonusScore() {\r\n count = count+50;\r\n }", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "public void setBalanceBonus(BigDecimal balanceBonus) {\n this.balanceBonus = balanceBonus;\n }", "public void setBonusList(BonusList bonusList) {\r\n/* 372 */ this._bonusList = bonusList;\r\n/* */ }", "void setIncome(double amount);", "public void setBonusAwarded(double value) {\n this.bonusAwarded = value;\n }", "public void setInitilaCash(int noOfBills) throws java.lang.Exception;", "public Account(String owner, int ownerID, int accountID, double growthRate){\n this.owner = owner;\n this.ownerID = ownerID;\n this.accountID = accountID;\n this.growthRate = growthRate;\n \n }", "Account(int account_number,double balance) //pramiterized constrector\n {\n this.account_number=account_number;\n this.balance=balance;\n }", "UserAccount createUserAccount(User user, double amount);", "public void setBonusKeys(int k) {\n setStat(k, bonusKeys);\n }", "public Object creditEarningsAndPayTaxes()\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setInitialCash : \" + \"Agent\");\r\n/* 144 */ \tgetPriceFromWorld();\r\n/* 145 */ \tgetDividendFromWorld();\r\n/* */ \r\n/* */ \r\n/* 148 */ \tthis.cash -= (this.price * this.intrate - this.dividend) * this.position;\r\n/* 149 */ \tif (this.cash < this.mincash) {\r\n/* 150 */ \tthis.cash = this.mincash;\r\n/* */ }\t\r\n/* */ \r\n/* 153 */ \tthis.wealth = (this.cash + this.price * this.position);\r\n/* */ \r\n/* 155 */ \treturn this;\r\n/* */ }", "public void setBalance(double bal){\n balance = bal;\r\n }", "public final void setBonus(LeaderKingdomModifier bonus) {\r\n\tremove();\r\n\tthis.bonus = bonus;\r\n\tapply();\r\n }", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }", "public void updateArmorBonus(int value){\n\t\t//TODO do we want a negative value???\n\t\tthis.armorBonus = value;\n\t}", "public Builder setBonusMoneyID(int value) {\n bitField0_ |= 0x00000020;\n bonusMoneyID_ = value;\n onChanged();\n return this;\n }", "public Builder setBonusExp(int value) {\n bitField0_ |= 0x00000002;\n bonusExp_ = value;\n onChanged();\n return this;\n }", "public Builder setBonusExp(int value) {\n bitField0_ |= 0x00000008;\n bonusExp_ = value;\n onChanged();\n return this;\n }", "public CheckingAccount()\n {\n withdrawals = 0;\n deposits = 0;\n }", "public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}", "private void ustawienie_bonusu(String bonus)\n {\n switch (bonus)\n {\n case \"+10 naboi\":\n liczba_naboi+=10;\n break;\n case \"+zycie\":\n liczba_zyc+=1;\n break;\n case \"-zycie\":\n liczba_zyc-=1;\n break;\n case \"+wieksze pilki\":\n rozmiar_pilki+=1;\n break;\n case \"+5 naboi\":\n liczba_naboi+=5;\n case \"+40 punktow\":\n liczba_punktow+=40;\n break;\n case \"+duze pilki\":\n break;\n }\n }", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public SavingsAccount(double rate) //setting interest rate with constructor\r\n { \r\n interestRate = rate;\r\n }", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public Account()\n {\n // initialise instance variables\n balance = 0.00;\n remainder = 0;\n }", "public BankAccount() {\n numberOfAccounts++;\n this.accountNumber = accountNumberGenerator(); \n }", "private Account_Type(int rate) {\r\n\tthis.rate=rate;\r\n\t}", "public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}", "public void setAmount(double amount) {\nloanAmount = amount;\n}", "void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "public Account(double balance) {\n\t\tthis.balance = balance;\n\t}", "public void setBitcoins(double Bitcoins){\r\n bitcoins = Bitcoins;\r\n }", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "public TimeDepositAccount(double interestRate, double balance, int maturityPeriods, double interestPenaltyRate) // constructor\n {\n super(interestRate,balance);\n this.elapsedPeriods=0;\n this.maturityPeriods=maturityPeriods;\n this.interestPenaltyRate = interestPenaltyRate;\n \n \n }", "public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }", "public Account(Holder holder, int balance) {\n this.holder = holder;\n this.balance = balance;\n }", "public void setAmount(int moneyOption);", "public Account() {\n\t\t//starting amount is 1500\n\t\tmoney = 1500;\n\t}", "public StandardAccount(int accountNumber, double creditLimit) {\n super(accountNumber);\n this.creditLimit = creditLimit;\n }", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "public Checking_Account (int account_num, double initial_balance, Savings_Account protection)\r\n {\r\n\r\n super (account_num, initial_balance);\r\n overdraft = protection;\r\n\r\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount addNewCapital();", "public void setBalance(){\n balance.setBalance();\n }", "public void addBonus() {\r\n game.settings.setBonusDay(strDate);\r\n }", "public void bonusStones() {\n\t\tint bonus = 1; // final pit player had when landing on empty pit\n\t\tbonus += board[12 - currentPit]; // (12 - currentPit) will get us pit directly across board\n\t\tboard[12 - currentPit] = 0;\n\t\tif (isPlayer1()) { // if player one, place bonus stones in pit 6\n\t\t\tboard[6] += bonus;\n\t\t} else { // if player 2, place stones in pit 13\n\t\t\tboard[13] += bonus;\n\t\t}\n\t}", "@Payable @Entry\n\tpublic ExternallyOwnedAccount(int initialAmount) {}", "public void createNewAccountWithOpeningBalanceHelper() {\n\t\tparseDateTextFieldHelper();\n\t\tBalance balance = data.createNewAccountWithOpeningBalance();\n\t\tLocalDate date = LocalDate.of(year, month, dayOfMonth);\n\t\tbalance.setDate(date);\n\t\tJTextField amount = data.getTextFieldBalance();\n\t\t// this before was not being set, i thought i set it in expectedResult but\n\t\t// that's a different object!\n\t\tbalance.setAmount(Float.parseFloat(amount.getText()));\n\t\t// I think you can actually just insert the values here instead if using get()\n\t\tBalance resultExpected = new Balance(bankTest, accountTest,\n\t\t\t\tdate.getYear(), date.getMonthValue(), date.getDayOfMonth(),\n\t\t\t\tFloat.parseFloat(amount.getText()), TEST_TXTR_EXTRA_NOTES);\n\t\tassertEquals(resultExpected, balance);\n\t}", "public Account(String name, double balance){\n\n this.name = name;\n\n if (balance > 0.0 )\n this.balance = balance;\n }", "public void InitializeBalance(BigDecimal valor){\n \r\n ChekingAccount chekAc=pRepository.GetChekingAccount();\r\n chekAc.setSaldoInicial(valor);\r\n pRepository.SaveChekingAccount(chekAc);\r\n \r\n }", "public void setBalance(double balance)\n {\n startingBalance = balance;\n }", "public Builder setBonusExp(float value) {\n bitField0_ |= 0x00000040;\n bonusExp_ = value;\n onChanged();\n return this;\n }", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "public static void saveAccount(MC x, MC y, MC z)\n {\n Scanner scan = new Scanner (System.in); \n int i=0;\n System.out.print(\"The accounts stored are: \" + \"\\n\\n\");\n System.out.println(\"Hero: \" + x.getName() + \" Level: \" + x.getLevel());\n System.out.println(\"Hero: \" + y.getName() + \" Level: \" + y.getLevel());\n System.out.print(\"Which hero would you like to override? (1 / 2)\" + \"\\n\" + \"Response: \");\n int response = scan.nextInt();\n if (response == 1) //if you want to save on account 1, it does that for you\n {\n x.setName(z.getName());\n x.setQuestNumber(z.getQuestNumber());\n x.setExperience(z.getExperience());\n x.setCurrentHP(z.getCurrentHP());\n x.setAgility(z.getAgility());\n x.setDefence(z.getDefence());\n x.setStrength(z.getStrength());\n x.setMoney(z.getMoney());\n x.setWeapon(z.getWeapon());\n x.setArmor(z.getArmor());\n x.setMaxHP(z.getMaxHP());\n x.setMinHeal(z.getMinHeal());\n x.setMaxHeal(z.getMaxHeal());\n x.setPoints(z.getPoints());\n x.setTotalExperience(z.getTotalExperience());\n x.setTotalCurrentExperience(z.getTotalCurrentExperience());\n x.setTotalMoney(z.getTotalMoney());\n x.setLevel0();\n for (i=x.getLevel(); i<z.getLevel(); i++) //to set the right level since setLevel() is only ++;\n {\n x.setLevel();\n }\n }\n else //for account 2\n { \n y.setName(z.getName());\n y.setQuestNumber(z.getQuestNumber());\n y.setExperience(z.getExperience());\n y.setCurrentHP(z.getCurrentHP());\n y.setAgility(z.getAgility());\n y.setDefence(z.getDefence());\n y.setStrength(z.getStrength());\n y.setMoney(z.getMoney());\n y.setWeapon(z.getWeapon());\n y.setArmor(z.getArmor());\n y.setMaxHP(z.getMaxHP());\n y.setMinHeal(z.getMinHeal());\n y.setMaxHeal(z.getMaxHeal());\n y.setPoints(z.getPoints());\n y.setTotalExperience(z.getTotalExperience());\n y.setTotalCurrentExperience(z.getTotalCurrentExperience());\n y.setTotalMoney(z.getTotalMoney());\n y.setLevel0();\n for (i=y.getLevel(); i<z.getLevel(); i++) \n {\n y.setLevel();\n }\n }\n }", "public void setCredits(double credits) {\n this.credits = credits;\n }", "public Buyer(String username, String password, String firstName, String lastName, String emailAddress, String phoneNumber) {\n super(username, password, firstName, lastName, emailAddress, phoneNumber);\n this.role = 1;\n credit = 10000;\n ProgramManager.getProgramManagerInstance().addAccountToList(username, this);\n }", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public Saving bonusAmount(String bonusAmount) {\n this.bonusAmount = bonusAmount;\n return this;\n }", "public USMoney(int startDollars, int startCents)\r\n {\r\n dollars = startDollars;\r\n cents = startCents;\r\n \r\n if (startCents < 0 || startCents > 99)\r\n {\r\n dollars += (startCents / 100); \r\n cents = (startCents % 100);\r\n }\r\n }", "public void addBalance() {\r\n List<String> choices = new ArrayList<>();\r\n choices.add(\"10\");\r\n choices.add(\"20\");\r\n choices.add(\"50\");\r\n ChoiceDialog<String> addBalanceDialog = new ChoiceDialog<>(\"10\", choices);\r\n addBalanceDialog.setTitle(\"Add Balance\");\r\n addBalanceDialog.setContentText(\"Please enter the balance you want to add\");\r\n Optional<String> result = addBalanceDialog.showAndWait();\r\n result.ifPresent(\r\n s -> cardSelected.addMoney(Double.parseDouble(addBalanceDialog.getSelectedItem())));\r\n }", "public ATM(Account anAccount, int aChange, JLabel aInfo) {\n account = anAccount;\n change = aChange;\n info = aInfo;\n }", "public void credit(double amount) {\n this.balance += amount;\n }", "void setExpenses(double amount);", "public BankAccount(int accountNum, String customerName, double balance){\n this.accountNum = accountNum;\n this. customerName = customerName;\n this.balance = balance;\n }", "public FeeAccount (double minimumBalance, double transactionFee)\n {\n this.minimumBalance = minimumBalance;\n this.transactionFee = transactionFee;\n }", "int getBonusMoney();", "public void setBonusBole(Float bonusBole) {\n this.bonusBole = bonusBole;\n }", "public SavingAccount(double balance, Date dateOfCreation, String accountId, User owner) {\n\t\tsuper(balance, dateOfCreation, accountId, owner);\n\t\tthis.interestRate = 0.1/100;\n\t}", "public CheckingAccount (double openingBalance) {\n\t\t//super(openingBalance; INT_RATE);\n\t\tsuper(openingBalance);\n\t}", "private float setBankAbsorption(HashMap content) {\n\t\tfloat change = calculateAbsorption();\n this.bankDamageModifier = baseDamageModifier + change;\n//System.out.println(\"bank: \" + this.bankDamageModifier);\n content.put(\"bank_damage_modifier\", \"\" + this.bankDamageModifier);\n\t\treturn change*ABSORPTION_PRICE_MULTIPLIER;\n }", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "public Account(int accNmr, String firstName, String lastName, double balance) {\n this.accNmr = accNmr;\n this.firstName = firstName;\n this.lastName = lastName;\n this.balance = balance;\n }", "private void updateBonusStats(double percentage) {\n baseStats.setHealth((int) (baseStats.getHealth() * percentage));\n baseStats.setStrength((int) (baseStats.getStrength() * percentage));\n baseStats.setDexterity((int) (baseStats.getDexterity() * percentage));\n baseStats.setIntelligence((int) (baseStats.getIntelligence() * percentage));\n }", "@Test\n public void testSetBalance() {\n System.out.println(\"setBalance\");\n double balance = 9.0;\n Account instance = new Account(\"Piper\", 10.0);\n instance.setBalance(balance);\n double expResult = 9.0;\n double result = instance.getBalance();\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public BankAccount() {\n\t\tthis.money = 0;\n\t}", "public CreditLimitCalculator(int accountnumber,int beginningbalance,int itemscharge,int creditsapply, int creditlimit) \r\n {\r\n this.accountnumber = accountnumber; \r\n this.beginningbalance = beginningbalance;\r\n this.itemscharge = itemscharge;\r\n this.creditsapply = creditsapply;\r\n this.creditlimit = creditlimit; \r\n \r\n }", "public void setCoin(int c) {\n setStat(c, coin);\n }", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public void addCoins(int coins) {\n total_bal += coins;\n }", "private void setupSettlementCost(){\n\t\tsettlementCost.put(ResourceKind.WOOL, 1);\n\t\tsettlementCost.put(ResourceKind.WOOD, 1);\n\t\tsettlementCost.put(ResourceKind.BRICK, 1);\n\t\tsettlementCost.put(ResourceKind.GRAIN, 1);\n\t}", "public AccountManager(){\r\n allAccounts.put(\"CreditCard\",credits);\r\n allAccounts.put(\"LineOfCredit\",lineOfCredits);\r\n allAccounts.put(\"Chequing\",chequing);\r\n allAccounts.put(\"Saving\",saving);\r\n createAccount(\"3\", 0);\r\n primaryAccount = chequing[0];\r\n }", "public BankAccount(double basicMoney) {\n\t\tthis.money = basicMoney;\n\t}", "public void updateBal(int value) {\r\n bal = bal + value;\r\n }" ]
[ "0.6145005", "0.5923534", "0.57429665", "0.57426167", "0.5710756", "0.57067525", "0.5693443", "0.5659081", "0.5646152", "0.562305", "0.5620786", "0.5553134", "0.5545554", "0.55116415", "0.55106616", "0.54740584", "0.54664093", "0.54583305", "0.5456303", "0.5445437", "0.5439192", "0.54256433", "0.54170656", "0.5413287", "0.5389181", "0.5377457", "0.5373719", "0.5371273", "0.5361954", "0.5355398", "0.5340308", "0.5327738", "0.5325027", "0.5321196", "0.5309987", "0.52903754", "0.5286814", "0.5276885", "0.52558744", "0.52462596", "0.5245727", "0.52177095", "0.52129245", "0.5192093", "0.5172945", "0.51690584", "0.5158189", "0.5157474", "0.5136345", "0.51241016", "0.5121913", "0.5116673", "0.5114023", "0.51068354", "0.51055783", "0.5104052", "0.5081964", "0.5080738", "0.50785583", "0.5072065", "0.5069188", "0.50663596", "0.5062793", "0.5062204", "0.5060797", "0.50552493", "0.5048945", "0.50442845", "0.50439614", "0.50361687", "0.503505", "0.5031262", "0.5029484", "0.5023565", "0.5021466", "0.5019743", "0.50197303", "0.50162905", "0.50156987", "0.501507", "0.500879", "0.5001669", "0.49960122", "0.49909243", "0.49862587", "0.4984403", "0.4981021", "0.49804747", "0.497814", "0.4968578", "0.4964006", "0.49635068", "0.49626318", "0.49571958", "0.4949426", "0.49479136", "0.49463362", "0.4946024", "0.49444538", "0.49411923" ]
0.58900195
2
constructor Super_Saver_Account Withdraws the specified amount, plus the penalty for withdrawing from a bonus account. Overrides the withdrawal method of the saccoAccount class, but uses it to perform the actual withdrawal operation.
public boolean withdrawal (double amount) { System.out.println ("Penalty incurred: " + PENALTY); return super.withdrawal (amount+PENALTY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate)\r\n {\r\n\r\n super (account_num, initial_balance, interest_rate);\r\n\r\n }", "@Override\n public void withdraw(double amount) //Overridden method\n {\n elapsedPeriods++;\n \n if(elapsedPeriods<maturityPeriods)\n {\n double fees = getBalance()*(interestPenaltyRate/100)*elapsedPeriods;\n super.withdraw(fees);//withdraw the penalty\n super.withdraw(amount);//withdraw the actual amount\n \n }\n \n }", "public void withdraw (double amount)\n {\n super.withdraw (amount);\n imposeTransactionFee ();\n }", "@Override\n\tvoid withdraw(double amount) {\n\t\tsuper.balance -= amount - 20;\n\t}", "public Savings_Account (int account_num, double initial_balance, double interest_rate) \r\n {\r\n\r\n super (account_num, initial_balance);\r\n\r\n rate = interest_rate;\r\n\r\n }", "public StudentSavingsAccount(double bal, String name) {\n\n \t\tsuper(bal, name);\n// \t super();\n// \t setName(name);\n// \t setBalance(bal);\n \t overdraftsBeforeFee = 3;\n \t System.out.println(\"double, String constructor called [StudentSavingsAccount]\");\t\n\n }", "public void withDrawAmount() {\n\t\t\n\t\ttry {\t\n\t\t\tlog.log(Level.INFO, \"Please Enter the account number you want to withdraw: \");\n\t\t\tint withdrawAccountNumber = scan.nextInt();\n\t\t\tlong amount;\n\t\t\tlog.log(Level.INFO, \"Please Enter the amount you want to withdraw : \");\n\t\t\tamount = scan.nextLong();\n\t\t\tbankop.withDraw(withdrawAccountNumber,amount);\n\t\t\t\n\t\t}catch(AccountDetailsException | BalanceException message ) {\n\t\t\tlog.log(Level.INFO, message.getMessage());\n\t\t}\n\n\t}", "public Double withdrawAndReportBalance(Double withdrawnAmount, AccountRule rule) \n \t\tthrows IllegalBalanceException \n {\n return null;\n }", "public void withdraw(double amount){\n accTransactions.add(new Transaction('W', amount, balance, \"withdraw\"));\n balance -= amount;\n }", "@Override\n public Account withdraw(int accountNo, int amount) throws AccountNotFoundException, InsufficientBalanceException {\n Account account = getAccount(accountNo);\n if (account == null) {\n return null;\n }\n if ((account.getBalance() + 1000) < amount) {\n throw new InsufficientBalanceException(\"Can't withdraw \" + amount + \" when balance is \" + account.getBalance());\n }\n account.setBalance(account.getBalance() - amount);\n\n Transaction transaction = new Transaction();\n transaction.setAccountNo(accountNo);\n transaction.setDate(\"DD/MM/YYYY\");\n transaction.setAction(\"Withdraw\");\n transaction.setAmount(amount);\n notifyObserver(transaction);\n\n return account;\n }", "public void withdraw(double amount) {\n this.balance -= amount;\n }", "public void withdraw(double withdrawalAmount) {\n if (withdrawalAmount < 0) throw new IllegalArgumentException(\"Withdrawal amount cannot be negative\");\n if (balance - withdrawalAmount < 0) throw new IllegalArgumentException(\"Cannot withdraw more than account balance\");\n balance -= withdrawalAmount;\n numWithdrawals++;\n }", "public SavingAccount(double balance, Date dateOfCreation, String accountId, User owner) {\n\t\tsuper(balance, dateOfCreation, accountId, owner);\n\t\tthis.interestRate = 0.1/100;\n\t}", "public ILoA withdraw(int amount, int accNum) {\n if (accNum == this.first.accountNum)\n return new ConsLoA(this.first.accWit(amount), this.rest);\n else return new ConsLoA\n (this.first, this.rest.withdraw(amount, accNum));\n }", "public void withdraw(double amount)\n\t{\n\t\tbalance -= amount;\n\t}", "public double withdraw(double withdrawalAmount) {\n\t\tdouble savingsBalance = getBalance();\n\t\tif ((savingsBalance - withdrawalAmount) >= overdraft) { // Check if balance is less than overdraft limit.\n\t\t\tsuper.withdraw(withdrawalAmount);\n\t\t}\n\t\tif ((savingsBalance - withdrawalAmount) < overdraft) {\n\t\t\tSystem.out.print(\"Cannot execute withdraw action: greater than savings withdraw limit.\\n\");\n\t\t}\n\t\treturn getBalance();\n\t}", "public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }", "public void withdraw(double amount){\n\t\tbalance -= amount;\n\t}", "public void withdraw(int amount)\n {\n setBalance(getBalance()-amount);\n }", "public void withdraw(double amount) {\n\t\tbalance -= amount;\n\t}", "@Override\r\n\tvoid withdraw(double amount) {\n\t\tsuper.withdraw(amount);\r\n\t\tif(minimumblc>500)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"you have withdraw rupees\"+ (amount));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"withdraw failed \");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tvoid deposit(double amount) {\n\t\tsuper.balance += amount - 20;\n\t}", "public void withdraw(double amount)\n {\n startingBalance -= amount;\n }", "@Override\n\tpublic void withdraw(int money) {\n\t\t\n\t}", "public Account(double balance) {\n\t\tthis.balance = balance;\n\t}", "@Override //nadpisanie - adnotacja, wskazówka\n public int withdraw(int cash) {\n super.balance -=cash;\n return cash;\n }", "public void withdrawMoney(double amount) {\n\t\tbalance = balance - amount;\n\t}", "public SavingsAccount(String n) {\n super(n); \n balance = 0;\n }", "@Override\n\tpublic boolean withdraw(int accNo, double money) {\n\t\treturn false;\n\t}", "public CheckingAccount (double openingBalance) {\n\t\t//super(openingBalance; INT_RATE);\n\t\tsuper(openingBalance);\n\t}", "public Checking_Account (int account_num, double initial_balance, Savings_Account protection)\r\n {\r\n\r\n super (account_num, initial_balance);\r\n overdraft = protection;\r\n\r\n }", "public void withdraw (double amount) {\r\n\t\tif(!overDrawn) {\r\n\t\t\tbalance=balance-amount;\r\n\t\t\tif(balance< -1)\r\n\t\t\t{\r\n\t\t\t\toverDrawn = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Negative amount!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public abstract void withdraw(float amount);", "public void withdraw(float amount) {}", "public void withdraw(float amount) {}", "void withdraw(double amount){\r\n\t\t//subtract to the current balance the amount\r\n\t\tsetBalance(getBalance() - amount);\r\n\t\t\r\n\t\t//alert the user that his bank account is in the red if the balance lower than 0\r\n\t\tif(getBalance()<0){\r\n\t\t\tSystem.out.println(\"Your bank account is in the red.\");\r\n\t\t}\r\n\t}", "public BankAccount(int accountNum, String customerName, double balance){\n this.accountNum = accountNum;\n this. customerName = customerName;\n this.balance = balance;\n }", "@Override\n public void withdraw(double amount) {\n try {\n if (amount > 1000) {\n throw new InvalidFundingAmountException(amount);\n }\n if (this.getBalance() < 5000) {\n throw new InsufficientFundsException(amount);\n }\n doWithdrawing(amount);\n } catch (BankException e) {\n System.out.println(e.getMessage());\n }\n }", "public void withdrawFromBalance(double withdrawBalanceAmount) \n\t{\n\t\taccountBalance -= withdrawBalanceAmount;\n\t}", "public SavingAccount(double initialBalance)\n\t\t { \n\t\t super(initialBalance);\n\t\t }", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "@Override\n\tpublic void withdraw(double amount) {\n\t\tif (super.getBalance() - amount > overdraftLimit) {\n\t\t\tsuper.setBalance(getBalance() - amount);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Amount exceeds overdraft limit.\");\n\t}", "@Override\r\n\tpublic void withdraw(String mobileNo, double withdrawAmount) {\n\t\tCustomer customer = custMap.get(mobileNo);\r\n\t\tdouble amount = customer.getInitialBalance();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString name = customer.getName();\r\n\t\tString newMobileNo = customer.getMobileNo();\r\n\t\tfloat age = customer.getAge();\r\n\t\t\r\n\t\tif(amount - withdrawAmount > 500)\r\n\t\t\tamount -= withdrawAmount;\r\n\t\t\r\n\t\tcustomer.setAge(age);\r\n\t\tcustomer.setInitialBalance(amount);\r\n\t\tcustomer.setName(name);\r\n\t\tcustomer.setMobileNo(newMobileNo);\r\n\t\t\r\n\t\tcustMap.put(newMobileNo, customer);\r\n\t\tSystem.out.println(\"Amount withdrawn\");\r\n\t\t\r\n\t\t\r\n\t}", "public void withdraw(double amount)\n {\n if (amount <= balance) {\n balance = balance - amount;\n }\n else {\n System.err.println(\"Transaction Declined\");\n remainder = balance - amount;\n System.out.println(\"Your balance would have been \" + remainder);\n }\n }", "Account(int account_number,double balance) //pramiterized constrector\n {\n this.account_number=account_number;\n this.balance=balance;\n }", "protected void deposit(double amount)\n\t{\n\t\tacc_balance+=amount;\n\t}", "public BankRekening(double saldo) {\n if (saldo > 0)\n setSaldo(saldo);\n }", "public void withdrawMoney(int amount) {\n wallet.withdraw(amount);\n }", "@Override\n\tpublic int withdraw(double amount) throws RaiseException {\n\t\tValidator.validateWithdraw(this.getBalance(), amount);\n\t\tif(amount <= this.getBalance()) {\n\t\t\tthis.setBalance(this.getBalance() - amount);\n\t\t\t\n\t\t\t//create a transaction and adding it to the list of transactions of this account \n\t\t\tTransaction tmpTransaction = new Transaction(amount, EnumTypeTransaction.withdraw);\n\t\t\tthis.addTransaction(tmpTransaction);\n\t\t\t\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "public void withdraw(long amount) {\n\t\n\tif(canWithdraw == true) {\n\t\tSystem.out.println(\"before \"+balance);\n\t\tbalance\t-= amount;\n\t\tSystem.out.println(\"after \"+balance);\n\t\t//add to log\n\t\tlog += \"Withdraw made to this account in the ammount of \"+amount+\" on \"+date+\"\\n\";\n\t\tlog += log += \" Current balance is \"+balance+\" \\n\"+date;\n\t\tupdate();\n\t}else {\n\t\tlog += \"Overdraft account on \"+date+\" \\n\";\n\t\tSystem.out.println(\"Insufficients funds to complete tranaction!\");\n\t\t}//end else statement\n}", "public void withdraw(BigDecimal amount) {\n this.setBalance(this.getBalance().subtract(amount));\n }", "public CheckingAccount(int id, double balance, double overdraftLimit) {\n\t\tsuper(id, balance);\n\t\tthis.overdraftLimit = overdraftLimit;\n\t}", "public boolean withdraw(double amount) {\n if (super.withdraw(amount)) {\n airlineDollars += amount * dollarRate;\n totalSpent += amount;\n claimDollars();\n return true;\n }\n return false;\n }", "public Account(String owner, int ownerID, int accountID, double growthRate){\n this.owner = owner;\n this.ownerID = ownerID;\n this.accountID = accountID;\n this.growthRate = growthRate;\n \n }", "public int withdrawal(Account account, double amount) { \r\n\t\tint found = find(account); //get the account that wants to withdraw\r\n\t\t\r\n\t\t//if the account doesn't exist \r\n\t\tif ( found == -1 ) {\r\n\t\t\treturn -1; \r\n\t\t}\r\n\t\t//get the balance amount, and call debit() to decrease the balance by amount \r\n\t\tDouble balance = accounts[found].getBalance();\r\n\t\taccount.setBalance(balance);\r\n\t\taccount.debit(amount); \r\n\t\t\r\n\t\t//if its less than 0, means that there are insufficient funds\r\n\t\tif ( account.getBalance() < 0 ) {\r\n\t\t\treturn 1; \r\n\t\t} \r\n\t\taccounts[found].setBalance(account.getBalance());\r\n\t\t\r\n\t\t\r\n\t\t//check if the account is a MoneyMarket account, then increment the count of withdrawls\r\n\t\tif ( accounts[found] instanceof MoneyMarket ) {\r\n\t\t\tMoneyMarket moneyAcc = (MoneyMarket) accounts[found];\r\n\t\t\tint numberOfWithdraws = moneyAcc.getWithdrawals() + 1;\r\n\t\t\tmoneyAcc.setWithdrawals(numberOfWithdraws);\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "void deposit(double amount)\n\t{\n\t\tbalance += amount;\n\t\t//what this translates to is\n\t\t// this.balance += amount;\n\t}", "public void withdraw (int amount) {\n if (amount >= 0) {\n balance = balance - amount;\n valueWithdrawals = valueWithdrawals + amount;\n if (balance < minimumBalance){\n minimumBalance = balance;\n }\n }\n }", "public static void main(String[] args) {\n SavingAccount savings = new SavingAccount(1112, 200);\r\n CheckingAccount checking = new CheckingAccount(1113, 200, -200);\r\n\r\n //account.setAnnualInterestRate(4.5);\r\n savings.setAnnualInterestRate(4.5);\r\n checking.setAnnualInterestRate(4.5);\r\n\r\n\r\n //account.withdraw(250);\r\n //account.deposit(30);\r\n //System.out.println(account.toString());\r\n\r\n\r\n\r\n\r\n checking.withdraw(250);\r\n checking.deposit(30);\r\n System.out.println(checking.toString());\r\n\r\n savings.withdraw(2504);\r\n savings.deposit(30);\r\n System.out.println(savings.toString());\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n }", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "public saccoAccount (int account_num, double initial_balance) \r\n {\r\n\r\n account = account_num;\r\n balance = initial_balance;\r\n\r\n }", "@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }", "public Account(String name, double balance){\n\n this.name = name;\n\n if (balance > 0.0 )\n this.balance = balance;\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public SavingsAccount(String accNumber, String accName, double rate) {\n\t\tsuper(accNumber, accName);\n\t\tinterestRate = rate;\n\t}", "public double withdrawFrom(double amount)\r\n {\r\n _balance -= amount;\r\n\r\n return _balance;\r\n }", "public void withdraw( double amount ) throws Exception\n\t{\n\t\tif(amount >= 0.0 && amount <= balance)\n\t\t\tbalance -= amount;\n\t\t\n\t\telse\n\t\t\tthrow new Exception(\"Insufficient Balance\");\n\t}", "public BankAccount(int accountNo, String name, double balance) {\n this.accountNo = accountNo;\n this.name = name;\n if(balance > 0.0)\n this.balance = balance;\n }", "public BankAccount() {\n\t\tthis.money = 0;\n\t}", "public BankAccount(double checkingBalance, double savingsBalance) {\r\n\t\tthis.checkingBalance = checkingBalance;\r\n\t\tthis.savingsBalance = savingsBalance;\r\n\t\taccountsCount++;\r\n\t\ttotalAmount += checkingBalance;\r\n\t\ttotalAmount += savingsBalance;\r\n\t}", "public TimeDepositAccount(double interestRate, double balance, int maturityPeriods, double interestPenaltyRate) // constructor\n {\n super(interestRate,balance);\n this.elapsedPeriods=0;\n this.maturityPeriods=maturityPeriods;\n this.interestPenaltyRate = interestPenaltyRate;\n \n \n }", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public StandardAccount(int accountNumber, double creditLimit) {\n super(accountNumber);\n this.creditLimit = creditLimit;\n }", "public void withdrawMoney(double amount) {\n\t\tif (amount>=0){\n\t\t\tsetBalance(this.balance - amount);\n\t\t}else{\n\t\t\tSystem.out.println(\"You can not withdraw a negative value!\");\n\t\t}\n\t\t\t\t\n\t}", "public SavingsAccount(double startBalance, double startInterestRate)\n {\n super(startBalance);\n setInterestRate(startInterestRate);\n System.out.println(\"Overloaded Constructor called.\");\n }", "public void credit(double amount) {\n this.balance += amount;\n }", "public int withdraw() {\n\t\tif ((acc.getBalance() - keyboard.getAmt()) > acc.getMinimumBalace()) {\r\n\t\t\tif (casher.withdraw(keyboard.getAmt()) == 1) {\r\n\t\t\t\tsetNewBalance();\r\n\t\t\t\t\r\n\t\t\t\treciept.printer(acc.getAccountNumber(), acc.getBalance(), keyboard.getAmt());\r\n\t\t\t\treturn 1;\r\n\t\t\t} else\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}", "public abstract String withdrawAmount(double amountToBeWithdrawn);", "public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some validation in the other functions\r\n //not nessacary\r\n setAccNum(accNum);\r\n this.bal=bal;\r\n this.name=name;\r\n this.email=email;\r\n this.phone=phone;\r\n\r\n }", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "void deposit(double Cash){\r\n\t\tbalance=balance+Cash;\r\n\t}", "@Test\n public void savings_account2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account savingsAccount = new SavingsAccount(bill, Account.SAVINGS);\n bank.addCustomer(new Customer(\"Bill\").openAccount(savingsAccount));\n Transaction t = new CreditTransaction(500.0);\n t.setTransactionDate(getTestDate(-15));\n savingsAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365, 15) * 500.0 - 500, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "int withdraw(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n if (accountBalance <= amount)\n return -1;\n else {\n accountBalance -= amount;\n }\n }\n }\n updateAccount(id, accountBalance, account); // update command\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n\n return 1;\n }", "void withdraw(double amount) {\n\t\tif (isSuspended()) {\n\t\t\tSystem.out.println(\"Account is suspended.\");\n\t\t\treturn;\n\t\t}\n\t\tif (amount <= 0) {\n\t\t\tSystem.out.println(\"Amount must be more than 0.\");\n\t\t\tSystem.out.println(\"Withdrawing failed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (check(amount)) {\n\t\t\tbalance -= amount;\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" successfully.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Withdraw \" + amount + \" unsuccessfully. Do not have enough available funds.\");\n\t\t}\n\t}", "public void withdraw (double amount) throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be withdrawn\");\n }\n if (dailyMaxWithdraw != null){\n todayWithdraw += amount;\n if(todayWithdraw > dailyMaxWithdraw){\n throw new IllegalArgumentException(\"Amount entered would exceed your daily withdraw limit\");\n }\n }\n else if (amount <= balance){\n balance -= amount;\n savingTransactions[arrayLocation] = \"Withdraw from savings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n else {\n throw new InsufficientFundsException(\"Not enough money\");\n }\n }", "@Override\n public BigDecimal withdraw(Account account, BigDecimal bigDecimal) {\n return null;\n }", "public BankAccount(int accountNum, String customerName){\n this.accountNum = accountNum;\n this.customerName = customerName;\n balance = 0;\n }", "public SavingsAccount(double rate) //setting interest rate with constructor\r\n { \r\n interestRate = rate;\r\n }", "public void deposit(double amount) {\n this.balance += amount;\n }", "public void withdraw(double dollarAmount) throws InsufficientFundsException {\r\n\t\tif (this.accountBalance - dollarAmount < 0 || this.accountBalance - dollarAmount - 1.50 < 0) {\r\n\t\t\tthrow new InsufficientFundsException();\r\n\t\t} else {\r\n\t\t\ttransactionTracker++;\r\n\t\t\tSystem.out.println(transactionTracker);\r\n\t\t\tif (transactionTracker > 4) {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount - 1.50;\r\n\t\t\t} else {\r\n\t\t\t\tthis.accountBalance = this.accountBalance - dollarAmount;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void withdrawCashFromSavings(long socialSecurityNumber, String userName, String password, double amount) throws AuthenticationException,UnauthorizedActionException,InsufficientAssetsException{\r\n if(security(socialSecurityNumber, userName, password)){\r\n throw new AuthenticationException();\r\n }\r\n if(getPatron(socialSecurityNumber).getSavingsAccount() == null){\r\n throw new UnauthorizedActionException();\r\n }\r\n try{\r\n Transaction withdraw = new Transaction(getPatron(socialSecurityNumber), Transaction.TRANSACTION_TYPE.WITHDRAW, getPatron(socialSecurityNumber).getSavingsAccount(), amount);\r\n withdraw.execute();\r\n txHistoryByPatron.get(getPatron(socialSecurityNumber)).add(withdraw);\r\n } catch (InsufficientAssetsException e){\r\n throw new InsufficientAssetsException();\r\n }\r\n }", "public void withdraw(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"withdraw : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\tSystem.out.println(\"Ypu got $\"+String.valueOf(amount));\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "public Wallet() {\n total_bal = 10;\n }", "public void deposit (double amount) {\r\n\t\t\r\n\t\tbalance=balance+amount;\r\n\t\tif(balance > 0) {\r\n\t\t\t\r\n\t\t\toverDrawn = false;\r\n\t\t}\r\n\t\t\r\n\t}", "public SavingsAccount(double balance, String id, double interestRate) {\r\n\t\tsuper(balance, id);\r\n\t\tif(interestRate < 0){\r\n\t\t\tValidation.reportError(\"Invalid Interest Rate\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tYearlyInterestRate = interestRate;\r\n\t\t}\r\n\t\t\r\n\t}", "Account(String name, double balance)\r\n\t{\r\n\t\t\r\n\t\tthis.name = name; //assign name to the instance variable name \r\n\t\t\r\n\t\t// validate that the balance is greater that 0.0; if it is not,\r\n\t\t// instance variable balance keeps its default value 0.0\r\n\t\tif(balance > 0.0) // if balance is valid\r\n\t\t\tthis.balance = balance; // assign balance to the instance variable balance\t\t\t\t\t\r\n\t}", "public Savings(String first_name, String last_name, double balance, Date date, boolean isLoyal) {\r\n\t\tsuper(first_name, last_name, balance, date);\r\n\t\tthis.isLoyal = isLoyal;\r\n\t}", "public Bank(double cash, double interest)\r\n {\r\n super(cash);\r\n this.interest = interest;\r\n }", "public boolean withdrawal (double amount) \r\n {\r\n\r\n boolean result = false;\r\n\r\n if ( ! super.withdrawal (amount) ) \r\n {\r\n System.out.println (\"Using overdraft...\");\r\n if ( ! overdraft.withdrawal (amount-balance) )\r\n System.out.println (\"Overdraft source insufficient.\");\r\n else {\r\n balance = 0;\r\n System.out.println (\"Current Balance on account \" + account + \": \" + balance);\r\n result = true;\r\n }\r\n }\r\n System.out.println ();\r\n\r\n return result;\r\n\r\n }", "public CheckingAcoount(String accountHolder, long accountNum, double balance) {\n // super to have parent class constructor !\n super(accountHolder, accountNum, balance);\n }", "public Account(int id, double balance) {\n this();\n this.id = id;\n this.balance = balance;\n }" ]
[ "0.71833587", "0.71756876", "0.6985317", "0.6771202", "0.67106324", "0.6594407", "0.659032", "0.6589962", "0.65787727", "0.65473205", "0.65400034", "0.65351266", "0.6534137", "0.65278786", "0.64904845", "0.647925", "0.646235", "0.6458366", "0.6448341", "0.6432872", "0.64298326", "0.64175254", "0.6415988", "0.64097667", "0.6385036", "0.63828945", "0.63449824", "0.6310039", "0.63006824", "0.6291699", "0.62902457", "0.62844115", "0.62797195", "0.62710106", "0.62710106", "0.6269499", "0.6247107", "0.62391615", "0.6236096", "0.6232669", "0.6231405", "0.62158436", "0.62052745", "0.62046427", "0.61911744", "0.61895305", "0.6153513", "0.6153303", "0.61321497", "0.6119306", "0.61176467", "0.6116997", "0.61151445", "0.6111888", "0.61075896", "0.6098904", "0.608174", "0.6062559", "0.6049984", "0.60354966", "0.60328984", "0.60286367", "0.6028269", "0.60275334", "0.6023288", "0.601828", "0.60101414", "0.6009801", "0.6006949", "0.60026556", "0.60025156", "0.5999734", "0.5996404", "0.59684026", "0.59683037", "0.596623", "0.59594953", "0.5951322", "0.59465474", "0.5943455", "0.5940767", "0.59398717", "0.5939002", "0.5934179", "0.5931384", "0.59294754", "0.59273267", "0.5925654", "0.5925598", "0.59147847", "0.59085107", "0.5899801", "0.5898529", "0.58972275", "0.5896622", "0.58739245", "0.58623743", "0.58599603", "0.5843272", "0.5832307" ]
0.62901604
31
method withdrawal Adds interest to the balance of the account, including the bonus rate. Overrides the add_interest method of the Savings_Account class.
public void add_interest () { balance += balance * (rate + BONUS_RATE); System.out.println ("Interest added to account: " + account); System.out.println ("Current Balance: " + balance); System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addInterest() {\n\t\tdouble interest = getBalance() * interestRate / 100;\n\t\tdeposit(interest);\n\t}", "public void add_interest () \r\n {\r\n balance += balance * rate;\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \" + balance);\r\n System.out.println();\r\n\r\n }", "public void giveInterest(int accountId) throws SQLException,\n ConnectionFailedException,\n DatabaseInsertException {\n if (this.currentUserAuthenticated && this.currentCustomerAuthenticated) {\n // find if the account belongs to the user\n //List<Integer> accountIds = DatabaseSelectHelper.getAccountIds(this.currentUser.getId());\n boolean contains = false;\n int i = 0;\n List<Account> customerAccountList = this.currentCustomer.getAccounts();\n for (Account e : customerAccountList) {\n if (e.getId() == accountId) {\n contains = true;\n break;\n }\n i++;\n }\n \n if (contains) {\n // find out which account type it is\n // add interest to the account and update the balance\n // update database\n int role = DatabaseSelectHelper.getAccountType(accountId);\n BigDecimal interestRate = new BigDecimal(\"0\");\n // calculate balance after interest rate\n interestRate = DatabaseSelectHelper.getInterestRate(role).add(new BigDecimal(\"1\"));\n BigDecimal oldBalance = DatabaseSelectHelper.getBalance(accountId);\n BigDecimal newBalance = oldBalance.multiply(interestRate);\n newBalance = newBalance.setScale(2, RoundingMode.HALF_UP);\n DatabaseSelectHelper.getAccountDetails(accountId).addInterest();\n DatabaseUpdateHelper.updateAccountBalance(newBalance, accountId);\n \n this.currentCustomer.getAccounts().get(i).setBalance(newBalance);\n \n String msg = \"An interest rate has been added to your account: $\" + interestRate;\n int msgId = DatabaseInsertHelper.insertMessage(currentCustomer.getId(), msg);\n \n Message message = new MessageImpl(msgId, msg, false);\n currentCustomer.getMessagingCentre().addMessage(message);\n \n }\n }\n }", "public void applyInterest()\n {\n deposit( (getBalance()* getInterestRate()) /12);\n }", "public void increaseInterest() {\n\t\tthis.balance *= (1 + interestRate);\n\t}", "public void interestIncrease(){\r\n for (SavingsAccount account : saving){\r\n if (account == null){\r\n break;\r\n }\r\n account.addInterest();\r\n }\r\n }", "public double calcInterest(){\n double interest = (interestRate + 1) * balance;\n return interest;\n }", "public void calcInterest() {\n\t\tbalance = balance + (interestPct*balance);\n\t\t}", "public void GetInterest() {\n\t\tSystem.out.println(\"balance=\"+bal);\r\n\t\tinterest_rate=((bal/100)*10);\r\n\t\t\r\n\t\tSystem.out.println(\"Interest :- \"+ interest_rate);\r\n\t\tbal=(int) (bal+interest_rate);\r\n\t\tSystem.out.println(\"Balance after interest:- \"+bal );\r\n\t}", "public void applyInterest(double rate) {\n if ((rate > 0) && (balance < 0)) {\n withdraw((int) (-balance*rate));\n } \n if ((rate > 0) && (balance > 0)) {\n deposit((int) (balance*rate));\n }\n }", "public void withdraw(double withdrawalAmount) {\n if (withdrawalAmount < 0) throw new IllegalArgumentException(\"Withdrawal amount cannot be negative\");\n if (balance - withdrawalAmount < 0) throw new IllegalArgumentException(\"Cannot withdraw more than account balance\");\n balance -= withdrawalAmount;\n numWithdrawals++;\n }", "@Override\n public void withdraw(double amount) //Overridden method\n {\n elapsedPeriods++;\n \n if(elapsedPeriods<maturityPeriods)\n {\n double fees = getBalance()*(interestPenaltyRate/100)*elapsedPeriods;\n super.withdraw(fees);//withdraw the penalty\n super.withdraw(amount);//withdraw the actual amount\n \n }\n \n }", "public void addInterest() {}", "public double getBalancePlusInterest()\n {\n return startingBalance * (1 + (interestRate / 12));\n }", "public void calcInterest() {\n double monthlyInterestRate = annualInterestRate / 12;\n double monthlyInterest = balance * monthlyInterestRate;\n balance += monthlyInterest;\n }", "public Saving updateSavingBalanceByAddingInterests(Long id){\n Optional<Saving> optionalSaving = savingRepository.findById(id);\n\n if(optionalSaving.isPresent()){\n LocalDateTime today = LocalDateTime.now();\n long diff = Math.abs(ChronoUnit.YEARS.between(today, optionalSaving.get().getAdditionLastInterestDate()));\n if(diff > 0){\n BigDecimal newBalance = optionalSaving.get().getBalance().multiply(optionalSaving.get().getInterestRate().add(new BigDecimal(1)).pow((int) diff));\n transactionService.saveTransaction(TransactionType.INTEREST, newBalance.subtract(optionalSaving.get().getBalance()), optionalSaving.get().getId(), ReturnType.SAVING, optionalSaving.get().getPrimaryOwner(), optionalSaving.get().getId(), ReturnType.SAVING, optionalSaving.get().getPrimaryOwner());\n optionalSaving.get().setBalance(newBalance);\n optionalSaving.get().setAdditionLastInterestDate(today);\n }\n return savingRepository.save(optionalSaving.get());\n }else{\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"The saving account with the given id does not exist\");\n }\n }", "public void addBalance(float deposit) {\r\n\t\tthis.balance += deposit;\r\n\t}", "@Override\n public double calculateInterest(double amount) {\n\t\treturn ( hasWithdrawalInPast10Days() ? 0.001 : 0.05 ) * amount;\n }", "public void withdraw(double amount){\n accTransactions.add(new Transaction('W', amount, balance, \"withdraw\"));\n balance -= amount;\n }", "public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate)\r\n {\r\n\r\n super (account_num, initial_balance, interest_rate);\r\n\r\n }", "@Override\n public double interestEarned(double amount, Date dateOfLastWithdrawal) {\n double result;\n\n if (amount <= 1000) {\n result = amount * 0.02;\n } else if (amount <= 2000) {\n result = 20 + (amount - 1000) * 0.05;\n } else {\n result = 70 + (amount - 2000) * 0.1;\n }\n\n Date currentDateBefore10Days = DateProvider.getInstance().getCurrentDateBefore10Days();\n if (dateOfLastWithdrawal != null && dateOfLastWithdrawal.before(currentDateBefore10Days)) {\n result = result * 1.05;\n }\n\n return result;\n }", "public int withdrawal(Account account, double amount) { \r\n\t\tint found = find(account); //get the account that wants to withdraw\r\n\t\t\r\n\t\t//if the account doesn't exist \r\n\t\tif ( found == -1 ) {\r\n\t\t\treturn -1; \r\n\t\t}\r\n\t\t//get the balance amount, and call debit() to decrease the balance by amount \r\n\t\tDouble balance = accounts[found].getBalance();\r\n\t\taccount.setBalance(balance);\r\n\t\taccount.debit(amount); \r\n\t\t\r\n\t\t//if its less than 0, means that there are insufficient funds\r\n\t\tif ( account.getBalance() < 0 ) {\r\n\t\t\treturn 1; \r\n\t\t} \r\n\t\taccounts[found].setBalance(account.getBalance());\r\n\t\t\r\n\t\t\r\n\t\t//check if the account is a MoneyMarket account, then increment the count of withdrawls\r\n\t\tif ( accounts[found] instanceof MoneyMarket ) {\r\n\t\t\tMoneyMarket moneyAcc = (MoneyMarket) accounts[found];\r\n\t\t\tint numberOfWithdraws = moneyAcc.getWithdrawals() + 1;\r\n\t\t\tmoneyAcc.setWithdrawals(numberOfWithdraws);\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public SavingsAccount(double balance, String id, double interestRate) {\r\n\t\tsuper(balance, id);\r\n\t\tif(interestRate < 0){\r\n\t\t\tValidation.reportError(\"Invalid Interest Rate\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tYearlyInterestRate = interestRate;\r\n\t\t}\r\n\t\t\r\n\t}", "public double withdraw(double withdrawalAmount) {\n\t\tdouble savingsBalance = getBalance();\n\t\tif ((savingsBalance - withdrawalAmount) >= overdraft) { // Check if balance is less than overdraft limit.\n\t\t\tsuper.withdraw(withdrawalAmount);\n\t\t}\n\t\tif ((savingsBalance - withdrawalAmount) < overdraft) {\n\t\t\tSystem.out.print(\"Cannot execute withdraw action: greater than savings withdraw limit.\\n\");\n\t\t}\n\t\treturn getBalance();\n\t}", "@Override\n\tpublic void withdraw(int money) {\n\t\t\n\t}", "@Override\n public Account withdraw(int accountNo, int amount) throws AccountNotFoundException, InsufficientBalanceException {\n Account account = getAccount(accountNo);\n if (account == null) {\n return null;\n }\n if ((account.getBalance() + 1000) < amount) {\n throw new InsufficientBalanceException(\"Can't withdraw \" + amount + \" when balance is \" + account.getBalance());\n }\n account.setBalance(account.getBalance() - amount);\n\n Transaction transaction = new Transaction();\n transaction.setAccountNo(accountNo);\n transaction.setDate(\"DD/MM/YYYY\");\n transaction.setAction(\"Withdraw\");\n transaction.setAmount(amount);\n notifyObserver(transaction);\n\n return account;\n }", "private void payInterest(Customer customer) {\n AccountType accountType = AccountType.SAVINGACCOUNT;\n if(customer.hasHighBalance()) {\n Currency interest = Interest.getInterestForSaving(customer);\n customer.deposit(interest, accountType);\n loseProfit(interest);\n }\n }", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public ILoA withdraw(int amount, int accNum) {\n if (accNum == this.first.accountNum)\n return new ConsLoA(this.first.accWit(amount), this.rest);\n else return new ConsLoA\n (this.first, this.rest.withdraw(amount, accNum));\n }", "public void withDrawAmount() {\n\t\t\n\t\ttry {\t\n\t\t\tlog.log(Level.INFO, \"Please Enter the account number you want to withdraw: \");\n\t\t\tint withdrawAccountNumber = scan.nextInt();\n\t\t\tlong amount;\n\t\t\tlog.log(Level.INFO, \"Please Enter the amount you want to withdraw : \");\n\t\t\tamount = scan.nextLong();\n\t\t\tbankop.withDraw(withdrawAccountNumber,amount);\n\t\t\t\n\t\t}catch(AccountDetailsException | BalanceException message ) {\n\t\t\tlog.log(Level.INFO, message.getMessage());\n\t\t}\n\n\t}", "public void withdraw(int amount)\n {\n setBalance(getBalance()-amount);\n }", "public void withdraw (double amount)\n {\n super.withdraw (amount);\n imposeTransactionFee ();\n }", "void withdraw(double amount){\r\n\t\t//subtract to the current balance the amount\r\n\t\tsetBalance(getBalance() - amount);\r\n\t\t\r\n\t\t//alert the user that his bank account is in the red if the balance lower than 0\r\n\t\tif(getBalance()<0){\r\n\t\t\tSystem.out.println(\"Your bank account is in the red.\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean withdraw(int accNo, double money) {\n\t\treturn false;\n\t}", "public static void addAccount(String accType, float balance, String fName, String lName, float interest) {\n\t\tStatement stmt;\n\t\ttry {\n\t\t\tstmt = con.getConnection().createStatement();\n\t\t\t// insert the data\n\t\t\t\n\t\t\tjava.sql.Date currentDate = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n\t\t\t\n\t\t\tstmt.executeUpdate(\"INSERT INTO ser322.account \" + \"VALUES (NULL, '\" + accType + \"', \" + balance + \", '\" + currentDate + \"'); \" +\n\t\t\t\"SET @last_id_in_account = Last_INSERT_ID();\" + \n\t\t\t\"INSERT INTO interest_rate VALUES(@last_id_in_account, (SELECT accType FROM account WHERE accID = @last_id_in_account),\" + interest + \");\");\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"[ERROR] - Add Account Error\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tAccountsManager.populateFromSQL();\n\t\tAccountsPanel.refreshTabel(); \n\t \n\n\t}", "public void addToBalance(double depositBalanceAmount) \n\t{\n\t\taccountBalance += depositBalanceAmount;\n\t}", "public void withdraw(double amount) {\n this.balance -= amount;\n }", "public void addBalance()\n\t\t{\n\t\t\tthis.setBalance_acc2(this.getBalance_acc2() + this.getTemp_d_acc2());\n\t\t}", "public void addSavingsBalance(BigDecimal toAdd) {\r\n setSavingsBalance(savingsBalance.add(toAdd));\r\n }", "void addBalance(double amount) {\n\t\tbalance += amount;\n\t}", "public void withdraw(double amount){\n\t\tbalance -= amount;\n\t}", "public boolean withdrawal (double amount)\r\n {\r\n\r\n System.out.println (\"Penalty incurred: \" + PENALTY);\r\n return super.withdrawal (amount+PENALTY);\r\n\r\n }", "public void withdraw (double amount) throws InsufficientFundsException{\n if (isFrozen == true){\n return;\n }\n if (UserAccount.isAmountValid(amount) == false){\n throw new IllegalArgumentException(\"Amount entered is not possible to be withdrawn\");\n }\n if (dailyMaxWithdraw != null){\n todayWithdraw += amount;\n if(todayWithdraw > dailyMaxWithdraw){\n throw new IllegalArgumentException(\"Amount entered would exceed your daily withdraw limit\");\n }\n }\n else if (amount <= balance){\n balance -= amount;\n savingTransactions[arrayLocation] = \"Withdraw from savings account of the amount: \" + String.valueOf(amount);\n arrayLocation++;\n }\n else {\n throw new InsufficientFundsException(\"Not enough money\");\n }\n }", "public void addInterest(TXSemanticTag interest);", "public void withdraw(double amount)\n\t{\n\t\tbalance -= amount;\n\t}", "public Integer withdraw(Integer amount) {\r\n\t if (balance < amount) {\r\n\t throw new NotEnoughFundsException(amount, balance);\r\n\t }\r\n\t balance -= amount;\r\n\t return balance;\r\n\t }", "public void withdraw(double amount) {\n\t\tbalance -= amount;\n\t}", "@Override\n\tvoid withdraw(double amount) {\n\t\tsuper.balance -= amount - 20;\n\t}", "public void withdraw(BigDecimal amount) {\n this.setBalance(this.getBalance().subtract(amount));\n }", "public void withdrawMoney(double amount) {\n\t\tbalance = balance - amount;\n\t}", "void withdraw() {\n System.out.println(\"Enter the amount to withdraw : \");\n int withdraw = scan.nextInt();\n balance -= withdraw;\n }", "public void withdraw(double amount)\n {\n startingBalance -= amount;\n }", "public double cal_SimpleInterest(double principleAmt,double rateofInterest,double timePeriod )\r\n\t{\r\n\t\treturn(((principleAmt* rateofInterest*timePeriod)/100));\r\n\t}", "public void deposit(BigDecimal deposit){\n balance = balance.add(deposit);\n }", "public Banking addFundsToAccount(Banking banking){\n return client.addBanking(banking);\n }", "public void increaseBalance(final double balance) {\n this.balance += balance;\n }", "@Override\n\tpublic int withdraw(double amount) throws RaiseException {\n\t\tValidator.validateWithdraw(this.getBalance(), amount);\n\t\tif(amount <= this.getBalance()) {\n\t\t\tthis.setBalance(this.getBalance() - amount);\n\t\t\t\n\t\t\t//create a transaction and adding it to the list of transactions of this account \n\t\t\tTransaction tmpTransaction = new Transaction(amount, EnumTypeTransaction.withdraw);\n\t\t\tthis.addTransaction(tmpTransaction);\n\t\t\t\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "public int withdrawal(Account account, double amount) {\n\t\t\n\t\tint index = find(account);\n\t\t\n\t\tif (account == null || index == -1 || amount < 0) {\t\t//check if account exists, invalid amount\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\telse if (amount > accounts[index].getBalance()) {\t\t//check if funds insufficient\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\telse { \n\t\t\taccounts[index].debit(amount);\n\t\t\tif (account instanceof MoneyMarket) {\n\t\t\t\t((MoneyMarket) account).setWithdrawals();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 0; \n\t}", "public void withdrawMoney(int amount) {\n wallet.withdraw(amount);\n }", "public void addInterestEarned(Equity holding) {\n \n double time = 0;\n double intrst = 0;\n double price = holding.getSimulationPrice();\n double newPrice = price;\n int steps = amount;\n \n switch(interval) {\n \n case DAY:\n time = amount / 365.0;\n break;\n case MONTH:\n time = amount / 12.0;\n break;\n case YEAR:\n time = amount;\n break;\n }\n \n switch(simType) {\n \n case NONE:\n holding.addPriceChange(newPrice);\n return;\n \n case BEAR:\n intrst = price * percentage * time;\n steps = amount;\n \n while(steps != 0) { \n \n newPrice -= ((1.0/amount) * intrst);\n steps--;\n }\n \n holding.addPriceChange(newPrice);\n break;\n \n case BULL:\n intrst = price * percentage * time;\n steps = amount;\n \n while(steps != 0) {\n \n newPrice += ((1.0/amount) * intrst);\n steps--;\n }\n \n holding.addPriceChange(newPrice);\n break;\n }\n }", "public Savings_Account (int account_num, double initial_balance, double interest_rate) \r\n {\r\n\r\n super (account_num, initial_balance);\r\n\r\n rate = interest_rate;\r\n\r\n }", "public void withdraw (int amount) {\n if (amount >= 0) {\n balance = balance - amount;\n valueWithdrawals = valueWithdrawals + amount;\n if (balance < minimumBalance){\n minimumBalance = balance;\n }\n }\n }", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public void withdraw(float amount) {}", "public void withdraw(float amount) {}", "public boolean withdraw(double amount) {\n if (super.withdraw(amount)) {\n airlineDollars += amount * dollarRate;\n totalSpent += amount;\n claimDollars();\n return true;\n }\n return false;\n }", "public Saving bonusTotalInterestRate(String bonusTotalInterestRate) {\n this.bonusTotalInterestRate = bonusTotalInterestRate;\n return this;\n }", "public Savings(int pin, double balance, double fees,\n\t\t\tdouble annualInterestRate) throws RaiseException {\n\t\tsuper(pin, EnumTypeAccount.savings, balance, fees);\n\t\tthis.annualInterestRate = annualInterestRate;\n\t\tthis.annualGain = this.getAnnualGain();\n\t}", "public void withdraw(String PIN, float amount, String currentDate) {\n String finalDate = ProcessingDates.computeFinalDay(currentDate, this.period);\n if(finalDate.compareTo(currentDate) < 0) {\n System.out.println(\"Daca retrageti bani inainte de data scadenta a contului, va veti pierde dobanda\");\n }\n else if(finalDate == currentDate) {\n if (amount <= this.getCurrentBalance()) {\n this.setCurrentBalance(this.getCurrentBalance() - amount);\n\n AccountStatement accountStatement = new AccountStatement(currentDate, \"Retragere numerar\", \"Debit\", amount);\n this.addAccountStatement(accountStatement);\n System.out.println(\"Retragere realizata cu succes!\");\n } else {\n System.out.println(\"Fonduri insuficiente!\");\n }\n }\n }", "public void withdraw( double amount ) throws Exception\n\t{\n\t\tif(amount >= 0.0 && amount <= balance)\n\t\t\tbalance -= amount;\n\t\t\n\t\telse\n\t\t\tthrow new Exception(\"Insufficient Balance\");\n\t}", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public void AddInterest(Interest I) {\n \t//TODO does this add new ones to the DB or must they already exist?\n \tinterests.add(I);\n }", "public double cal_CompoundInterest(double principleAmt,double rateofInterest,double timePeriod )\r\n\t{\r\n\t\tdouble amount=\tprincipleAmt*\r\n\t\t\t\t(Math.pow((1+( rateofInterest/100)),timePeriod));\r\n\t\treturn (amount-principleAmt);\r\n\t}", "void updateInterest() {\n // FIXME: Currently unimplemented\n }", "@Override //nadpisanie - adnotacja, wskazówka\n public int withdraw(int cash) {\n super.balance -=cash;\n return cash;\n }", "int withdraw(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n if (accountBalance <= amount)\n return -1;\n else {\n accountBalance -= amount;\n }\n }\n }\n updateAccount(id, accountBalance, account); // update command\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n\n return 1;\n }", "@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }", "public void withdrawFromBalance(double withdrawBalanceAmount) \n\t{\n\t\taccountBalance -= withdrawBalanceAmount;\n\t}", "@Override\n\tpublic boolean addWithdraw(Withdraws wd) throws Exception {\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tString sql = \"insert into withdraws(a_id,amount,currency,draw_time) values('\"\n\t\t\t\t+wd.getA_id()+\"','\"\n\t\t\t\t+wd.getAmount()+\"','\"\n\t\t\t\t+wd.getCurrency()+\"','\"\n\t\t\t\t+wd.getDraw_time()+\"')\";\n\t\ttry {\n\t\t\tconn = DBConnection.getConnection();\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tint col = ps.executeUpdate();\n\t\t\tif (col > 0) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tthrow new Exception(\"insert withdraw record exception:\" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (ps != null) {\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new Exception(\"ps close exception:\" + e.getMessage());\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new Exception(\"conn close exception:\" + e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "private static double priceWithInterest(double price_tax, double dwnpymnt, double interest, int year) {\n \tdouble pwi = price_tax - dwnpymnt;\n \t\n \tif(year > 0) {\n \t\tpwi = pwi * (1 + (interest / 100));\n \t}\n \t\n \treturn pwi;\n }", "public interface Account {\n\t\n//\t\n//\t\tMoney money;\n//\t\tInterestRate interestRate;\n//\t\tPeriod interestPeriod;\n\t\t\n\t\tpublic int deposit(int depositAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()+depositAmmount;\n//\t\t}\n\t\t\n\t\tpublic int withdrawl(int withdrawAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()-withdrawAmmount;\n//\t\t}\n\t\t\n\t\tpublic int getBalance();\n//\t\t{\n//\t\t\treturn money.getMoney()*interestRate.getInterestRate()*interestPeriod.getPeriod()/100;\n//\t\t}\n\t}", "public void withdraw (double amount) {\r\n\t\tif(!overDrawn) {\r\n\t\t\tbalance=balance-amount;\r\n\t\t\tif(balance< -1)\r\n\t\t\t{\r\n\t\t\t\toverDrawn = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Negative amount!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public int withdraw() {\n\t\tif ((acc.getBalance() - keyboard.getAmt()) > acc.getMinimumBalace()) {\r\n\t\t\tif (casher.withdraw(keyboard.getAmt()) == 1) {\r\n\t\t\t\tsetNewBalance();\r\n\t\t\t\t\r\n\t\t\t\treciept.printer(acc.getAccountNumber(), acc.getBalance(), keyboard.getAmt());\r\n\t\t\t\treturn 1;\r\n\t\t\t} else\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}", "String addBalance(Integer clientAccountId, Integer balance) throws ServiceException;", "public int withdrawal(Account account, double amount) {\n int accountPosition = find(account);\n if (accountPosition == -1) {\n return -1;\n }\n double currBal = accounts[accountPosition].getBalance();\n if (currBal < amount) {\n return 1;\n }\n accounts[accountPosition].debit(amount);\n return 0;\n }", "public BigDecimal getInterestAmount() {\n return interestAmount;\n }", "public static void withdrawMoney(ATMAccount account) throws FileNotFoundException {\r\n\r\n\t\t// File initialization\r\n\t\taccountsdb = new File(\"accountsdb.txt\");\r\n\t\t// #ADDED THE 2-D ARRAY\r\n\t\tString[][] accountInfo = null;\r\n\r\n\t\tif (accountsdb.exists()) {\r\n\t\t\taccountsdbReader = new Scanner(accountsdb);\r\n\t\t\tint y = 0;\r\n\t\t\twhile (accountsdbReader.hasNextLine()) {\r\n\t\t\t\ty++;\r\n\t\t\t\taccountInfo = new String[y][4];\r\n\t\t\t\taccountsdbReader.nextLine();\r\n\t\t\t}\r\n\t\t\taccountsdbReader.close();\r\n\t\t}\r\n\r\n\t\tdouble withdrawAmount;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Enter the amount you want to withdraw:\");\r\n\t\t\twithdrawAmount = userInput.nextDouble();\r\n\t\t\tif (account.getBalance() < 0 || withdrawAmount > account.getBalance()) {\r\n\t\t\t\tSystem.out.println(\"Insufficient balance!\");\r\n\t\t\t} else {\r\n\t\t\t\taccount.setWithdraw(withdrawAmount);\r\n\t\t\t}\r\n\r\n\t\t} while (withdrawAmount < 0);\r\n\r\n\t\tString s = \"\";\r\n\t\tif (accountsdb.exists()) {\r\n\t\t\tint y = 0;\r\n\t\t\taccountsdbReader = new Scanner(accountsdb);\r\n\r\n\t\t\twhile (accountsdbReader.hasNextLine()) {\r\n\t\t\t\ts = accountsdbReader.nextLine();\r\n\t\t\t\tStringTokenizer spl = new StringTokenizer(s, \" \");\r\n\t\t\t\tfor (int x = 0; x != 4; x++) {\r\n\t\t\t\t\taccountInfo[y][x] = spl.nextToken();\r\n\r\n\t\t\t\t}\r\n\t\t\t\ty++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tint line = -1;\r\n\t\ttry {\r\n\r\n\t\t\tint accID;\r\n\t\t\tfor (int y = 0; y != accountInfo.length; y++) {\r\n\t\t\t\taccID = Integer.parseInt(accountInfo[y][0]);\r\n\t\t\t\tif (accID == account.getID())\r\n\t\t\t\t\tline = y;\r\n\r\n\t\t\t}\r\n\t\t\taccountInfo[line][2] = \"\" + account.getBalance();\r\n\t\t\tSystem.out.println(\"Withdrawing...\");\r\n\t\t\tSystem.out.println(\"New Balance: \" + accountInfo[line][2]);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tPrintWriter scrubFile = new PrintWriter(accountsdb);\r\n\t\t\tscrubFile.write(\"\");\r\n\t\t\tscrubFile.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFileWriter fileWriter = new FileWriter(accountsdb, true);\r\n\t\t\tBufferedWriter fileBuffer = new BufferedWriter(fileWriter);\r\n\t\t\tPrintWriter fileOutput = new PrintWriter(fileBuffer);\r\n\t\t\tfor (int i = 0; i != accountInfo.length; i++) {\r\n\t\t\t\tfileOutput.println(accountInfo[i][0] + \" \" + accountInfo[i][1] + \" \" + accountInfo[i][2] + \" \"\r\n\t\t\t\t\t\t+ accountInfo[i][3]);\r\n\t\t\t}\r\n\r\n\t\t\tif (fileOutput != null) {\r\n\t\t\t\tfileOutput.close();\r\n\t\t\t}\r\n\t\t\tif (fileBuffer != null) {\r\n\t\t\t\tfileBuffer.close();\r\n\t\t\t}\r\n\t\t\tif (fileWriter != null) {\r\n\t\t\t\tfileWriter.close();\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\taccountsdbReader.close();\r\n\r\n\t}", "public void withdraw(double amount)\n {\n if (amount <= balance) {\n balance = balance - amount;\n }\n else {\n System.err.println(\"Transaction Declined\");\n remainder = balance - amount;\n System.out.println(\"Your balance would have been \" + remainder);\n }\n }", "public Double withdrawAndReportBalance(Double withdrawnAmount, AccountRule rule) \n \t\tthrows IllegalBalanceException \n {\n return null;\n }", "public abstract void withdraw(float amount);", "@Override\n\tvoid deposit(double amount) {\n\t\tsuper.balance += amount - 20;\n\t}", "void addIncomeToBudget();", "public SavingAccount(double balance, Date dateOfCreation, String accountId, User owner) {\n\t\tsuper(balance, dateOfCreation, accountId, owner);\n\t\tthis.interestRate = 0.1/100;\n\t}", "public Account getUpdatedAccount(Player p) {\n\n\t\tAccount a = getAccount(p);\n\t\tif (a != null) {\n\n\t\t\t// update Account with pending interest\n\n\t\t\tDate today = new Date();\n\t\t\tlong now = today.getTime() / 86400000 ;\n\t\t\t/* 'now' is an integral number of days since epoch.\n\t\t\t * There are 86,400 seconds in a day, and 1000 'ticks' in a getTime() value.\n\t\t\t * Interest is considered to compound at midnight\n\t\t\t */\n\t\t\t\n\t\t\t// Update account with accumulated interest, if applicable\n\t\t\t\n\t\t\tif (a.lastUpdate > 0 && rate > 1.0) {\n\t\t\t\tlong periods = now - a.lastUpdate;\n\t\t\t\tif (periods > 0) {\n\t\t\t\t\tBigDecimal oldamt = a.money;\n\t\t\t\t\tdouble newamt = oldamt.doubleValue() * Math.pow(rate, periods);\n\t\t\t\t\ta.money = new BigDecimal(newamt, context);\n\t\t\t\t\ta.money = a.money.setScale(Currency.getDecimals(), RoundingMode.HALF_UP);\n\t\t\t\t\tif (a.money.compareTo(maxMoney) > 0)\n\t\t\t\t\t\ta.money = maxMoney;\n\t\t\t\t\tBigDecimal interest = a.money.subtract(oldamt);\n\t\t\t\t\t\n\t\t\t\t\tp.sendMessage(ChatColor.YELLOW + \"Interest applied: \" + interest);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ta.lastUpdate = now;\n\t\t\t\n\t\t}\n\t\treturn a;\n\t}", "public void addDailyInterest(double intRate, int numDays) {\n DecimalFormat df = new DecimalFormat(\"#,##0.00\");\n if (intRate >= 0 && numDays >= 0) {\n double i = (intRate / 100) / 365;\n double A = balance * Math.pow((1.0 + i), numDays);\n JOptionPane.showMessageDialog(null, \"The interest earned in \" + numDays + \" days is: $\" + df.format(A - balance));\n balance = A;\n } else {\n JOptionPane.showMessageDialog(null, \"There is a problem with your interest rate or the number of days\");\n JOptionPane.showMessageDialog(null, \"Negative amounts are not allowed.\");\n }\n }", "private void savingAccountInterest(){\n if(this.watch.checkElapsedTime() >= 30){\n this.watch.stop(); // stopping stopwatch\n this.timeInterval = this.watch.elapsedTime(); // saving elapsed time in variable\n System.out.println(\"this.timeInterval == \"+this.timeInterval);\n this.bal += this.bal * 0.05 * Math.floor(this.timeInterval/30); // incrementing balance by 5% every 30 seconds\n this.watch.start();\n }\n }", "@Override\r\n\tpublic double withdrawlDao(double money) throws EwalletException {\n\t\tif(money<temp.getCustBal()) {\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttry {\r\n\t\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Withdrawn :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\t} catch (Exception 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\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\" Low Balance :( \");\r\n\t\t\treturn temp.getCustBal();\r\n\t}", "com.google.ads.googleads.v6.resources.UserInterest getUserInterest();", "public void withdraw(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"withdraw : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\tSystem.out.println(\"Ypu got $\"+String.valueOf(amount));\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "public void withdraw(long amount) {\n\t\n\tif(canWithdraw == true) {\n\t\tSystem.out.println(\"before \"+balance);\n\t\tbalance\t-= amount;\n\t\tSystem.out.println(\"after \"+balance);\n\t\t//add to log\n\t\tlog += \"Withdraw made to this account in the ammount of \"+amount+\" on \"+date+\"\\n\";\n\t\tlog += log += \" Current balance is \"+balance+\" \\n\"+date;\n\t\tupdate();\n\t}else {\n\t\tlog += \"Overdraft account on \"+date+\" \\n\";\n\t\tSystem.out.println(\"Insufficients funds to complete tranaction!\");\n\t\t}//end else statement\n}" ]
[ "0.75887096", "0.7281422", "0.693701", "0.67945963", "0.66616756", "0.6556402", "0.6546834", "0.6526511", "0.65106845", "0.64623386", "0.63444", "0.6299593", "0.6211908", "0.617098", "0.6112678", "0.6056967", "0.60184294", "0.6014061", "0.6005178", "0.60019094", "0.59138036", "0.59043026", "0.58851844", "0.5860663", "0.5828837", "0.57914335", "0.57901603", "0.57823735", "0.5758352", "0.5740123", "0.57228667", "0.57190263", "0.5709521", "0.5705841", "0.5695955", "0.5652809", "0.56401193", "0.5626129", "0.5625134", "0.5622944", "0.5617746", "0.56043315", "0.5600563", "0.5595409", "0.55935735", "0.55899924", "0.5576947", "0.55758697", "0.55652887", "0.5563961", "0.55636734", "0.55501854", "0.5549313", "0.5548293", "0.5547517", "0.5547329", "0.5542109", "0.5537003", "0.55266595", "0.5523653", "0.5500397", "0.54992414", "0.5497335", "0.5497184", "0.5497184", "0.5483148", "0.54709417", "0.5461998", "0.5461165", "0.54429644", "0.54343915", "0.5432567", "0.5419246", "0.541316", "0.54128385", "0.5412375", "0.5402306", "0.5397077", "0.53904355", "0.53681016", "0.53679013", "0.536547", "0.53622735", "0.53583974", "0.5354841", "0.5338644", "0.5334782", "0.5325345", "0.5323232", "0.53206694", "0.53125614", "0.5297863", "0.52948964", "0.5285772", "0.5285685", "0.5274234", "0.5272758", "0.52723336", "0.52608186", "0.52530533" ]
0.74227214
1
Simple wrapper class around a UnaryVoidFunction. This exists to avoid problems with using nested generics.
public interface Emitter extends UnaryVoidFunction<MethodVisitor> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface MyFirstVoidFunctionalInterface {\n\n public void methodOne();\n\n}", "public interface TriFunction<Arg1, Arg2, Arg3, Result> {\n Result apply(Arg1 arg1, Arg2 arg2, Arg3 arg3);\n}", "@SuppressWarnings(\"WeakerAccess\")\n@FunctionalInterface\npublic interface TriFunction<T, U, V, R> {\n /**\n * Applies this function to the given arguments.\n *\n * @param t the first function argument\n * @param u the second function argument\n * @param v the third function argument\n * @return the function result\n */\n R apply(T t, U u, V v);\n}", "@FunctionalInterface\npublic interface TriFunction<T, U, V, R> {\n /**\n * Invokes the function with the specified arguments and returns the result.\n * \n * @param input1 the first argument\n * @param input2 the second argument\n * @param input3 the third argument\n * @return the function's result\n */\n R apply(T input1, U input2, V input3);\n\n /**\n * Returns a composed function that first applies this function to its input, and then applies\n * the {@code after} function to the result. If evaluation of either function throws an\n * exception, it is relayed to the caller of the composed function.\n *\n * @param <W> the type of output of the {@code after} function, and of the composed function\n * @param after the function to apply after this function is applied\n * @return a composed function that first applies this function and then applies the\n * {@code after} function\n * @throws NullPointerException if after is null\n */\n default <W> TriFunction<T, U, V, W> andThen(Function<? super R, ? extends W> after) {\n Objects.requireNonNull(after);\n return (T t, U u, V v) -> after.apply(apply(t, u, v));\n }\n}", "VoidOperation createVoidOperation();", "private interface TriFunction<T1,T2,T3,R>\n {\n public R apply(T1 v1, T2 v2, T3 v3);\n }", "public interface Callback<T> {\n void execute(T t);\n}", "@FunctionalInterface\n interface NonnullFunction<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 @Nonnull\n R apply(@Nonnull T t);\n }", "@FunctionalInterface\n interface NonnullBiFunction<T, U, R> {\n\n /**\n * Applies this function to the given arguments.\n *\n * @param t the first function argument\n * @param u the second function argument\n * @return the function result\n */\n @Nonnull\n R apply(@Nonnull T t, @Nonnull U u);\n }", "public interface Function<T, U> {\n static <X,Y,Z> Function<Y,Z> partialA(X i, Function<X,Function<Y,Z>> l) {\n return l.apply(i);\n }\n\n static <X,Y,Z> Function<X,Z> partialB(Y i, Function<X,Function<Y,Z>> l) {\n return x->l.apply(x).apply(i);\n }\n\n static <X,Y,Z> Function<X,Function<Y,Z>> curry(Function<Tuple<X,Y>,Z> l) {\n return x->y->l.apply(new Tuple<X,Y>(x,y));\n }\n\n static <X,Y,Z> Function<Tuple<X,Y>,Z> unCurry(Function<X,Function<Y,Z>> l) {\n return x->l.apply(x._1).apply(x._2);\n }\n\n static <X,Y,Z> Function<X,Function<Y,Z>> reverseParameter(Function<Y,Function<X,Z>> l) {\n return x->y->l.apply(y).apply(x);\n }\n\n static <U> Function<U,U> composeAll(List<Function<U,U>> list) {\n return list.foldLeft(Function.<U>identity(),x->y->Function.compose(x,y));\n }\n\n U apply(T arg);\n\n\t/**\n\t * It directly return a function which is trivial. It just return whatever input.\n\t * @param <T>\n\t * @return\n\t */\n\tstatic <T> Function<T, T> identity() {\n\t\treturn t -> t;\n\t}\n\n\t/**\n\t * Should be able to higherCompose two function into one function\n\t * @return\n\t */\n\tstatic <X, Y, Z> Function<Function<X, Y>,\n Function<Function<Y, Z>,\n Function<X, Z>>> higherAndThen() {\n return x -> y -> z -> y.apply(x.apply(z));\n }\n\n /**\n * It is similar to {@link #higherCompose}\n * @return\n */\n static <X, Y, Z> Function<Function<Y, Z>,\n Function<Function<X, Y>,\n Function<X, Z>>> higherCompose() {\n return x -> y -> z -> x.apply(y.apply(z));\n }\n\n static <X, Y, Z> Function<X, Z> composeAndThen(Function<X,Y> f1, Function<Y,Z> f2){\n return Function.<X,Y,Z>higherAndThen().apply(f1).apply(f2);\n }\n\n static <X, Y, Z> Function<X, Z> compose(Function<Y,Z> f1, Function<X,Y> f2){\n return Function.<X,Y,Z>higherCompose().apply(f1).apply(f2);\n }\n\n\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}", "@FunctionalInterface\npublic interface ThrowableFunction3<T1, T2, T3, TResult> {\n\n TResult apply(T1 item1, T2 item2, T3 item3) throws Throwable;\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 Func<T> {\n\t\tvoid accept(T a) throws Throwable;\n\t}", "@FunctionalInterface\npublic interface SilentBiFunction<A, B, R> extends BiFunction<A, B, R> {\n @Override\n default R apply(A a, B b) { try { return actualApply(a, b); } catch (Exception ignored) { return null; } }\n\n R actualApply(A a, B b) throws Exception;\n}", "public interface Func<T, R> {\n R call(T t);\n}", "public interface BooleanFunction<T> extends Function<T, Boolean> {\r\n\r\n}", "public static interface Callback<T> {\n void call(T argument);\n }", "public interface VoidCommandHandler<S extends State, C extends Command>\n extends CommandHandler<S, C, Event> {\n\n /**\n * Handle a command without returning an event.\n *\n * @param state The current state object.\n * @param command The command object to handle.\n */\n void handle(S state, C command);\n\n}", "public interface wkhtmltoimage_void_callback extends Callback {\n\t\tvoid apply(Pointer converter);\n\t}", "public interface ICallback<T> {\n\n void onNext(T object);\n\n void onComplete();\n\n void onError(Throwable error);\n\n // TODO: 18/06/17 Crear metodo Throwable\n @Deprecated\n void onError(String message);\n\n}", "public interface Callback<T> extends SuccessCallback<T> {\n\n void onError(Throwable e);\n}", "public static <U, R> Function<MonoT<U>, MonoT<R>> lift(Function<? super U, ? extends R> fn) {\n return optTu -> optTu.map(input -> fn.apply(input));\n }", "public interface SimpleCallback<T> {\n void onStart();\n\n void onNext(T t);\n\n void onComplete();\n}", "@java.lang.FunctionalInterface()\r\n @jsweet.lang.Erased\r\n public interface CallbackThenableBiConsumer<T1,T2> {\r\n public void $apply(T1 p1, T2 p2);\r\n }", "@SuppressWarnings(\"unchecked\")\n private static <T> Collector<T, Void, Void> collectVoid() {\n return (Collector<T, Void, Void>) VOID_COLLECTOR;\n }", "public static interface Callback<T> {\n void onError();\n\n void onSuccess(T value);\n }", "static <T> Function<T,SibillaValue> apply(UnaryOperator<SibillaValue> op, Function<T,SibillaValue> f1) {\n return arg -> op.apply(f1.apply(arg));\n }", "public interface CustomCallBackInterface2<T> {\n\n void failure() ;\n void success(T result) ;\n}", "@SuppressWarnings(\"unchecked\")\n public static <TYPE, RESULT, THOWABLE extends Throwable> Operator<TYPE, RESULT, THOWABLE> of(Function<TYPE, RESULT, THOWABLE> function) {\n return (Operator<TYPE, RESULT, THOWABLE>)(t-> { \n return function.apply(t);\n });\n }", "public interface Callback<T> {\n /**\n * The work to be performed.\n *\n * @param arg the argument to be passed to the callback.\n */\n public void call(T arg);\n}", "public interface FunctionAsync<T, R> {\n public Promise<R> apply(T value) throws Exception;\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\ninterface Functional {\n String goodbye(String arg);\n}", "public static native void staticVoid();", "public interface Callback<T>\n {\n /**\n * Called when the function has been executed.\n * @param result the function result.\n */\n void onResult(T result);\n }", "public interface DuelCallable<T, E> {\n\n\tvoid run(T one, E two);\n\n}", "@FunctionalInterface\npublic interface Func0<Out> extends Func<Void, Out>, Supplier<Out>, Try.CheckedSupplier<Out> {\n\n\tdefault int arity(){\n\t\treturn 0;\n\t}\n\n\tdefault Out get() {\n\t\treturn apply();\n\t}\n\n\t@Override\n\tdefault <Last> Func0<Last> andThen(Function<? super Out, ? extends Last> other) {\n\t\treturn () -> other.apply(apply());\n\t}\n\n\tOut checkedApply() throws Exception;\n\n\tdefault Out checkedApply(Void v) throws Exception {\n\t\treturn checkedApply();\n\t}\n\n\tdefault Out apply() {\n\t\treturn tryApply().get();\n\t}\n\n\tdefault Out apply(Void v) {\n\t\treturn apply();\n\t}\n\n\tdefault Try<Out> tryApply() {\n\t\treturn Try.of(this);\n\t}\n\n\tdefault Try<Out> tryApply(Void v) {\n\t\treturn tryApply();\n\t}\n\n\tstatic <Out> Func0<Out> lift(Func0<Out> func) {\n\t\treturn func;\n\t}\n}", "@FunctionalInterface\npublic interface ICorfuSMRUpcallTarget<R> {\n\n /** Do the upcall.\n * @param obj The upcall target.\n * @param args The arguments to the upcall.\n *\n * @return The return value of the upcall.\n */\n Object upcall(R obj, Object[] args);\n}", "public interface Function1<A,B> {\n\tB apply(A a);\n}", "public interface BaseCallback<T> {\n\n void onSuccess(T t);\n\n void onFail();\n}", "public interface OnEventListener<T> {\n public void onSuccess(T object);\n public void onFailure(Exception e);\n}", "@FunctionalInterface\npublic interface ToFloatFunction<T> {\n\n /**\n * Applies this function to the given argument.\n *\n * @param value the function argument\n * @return the function result\n */\n float applyAsFloat(T value);\n\n}", "@FunctionalInterface\npublic interface Func<In, Out> extends Function<In, Out>{\n\n\tdefault Out apply(In in) {\n\t\treturn tryApply(in).get();\n\t}\n\n\tOut checkedApply(In in) throws Exception;\n\n\tdefault int arity(){\n\t\treturn 1;\n\t}\n\n\t@Override\n\tdefault <Last> Func<In, Last> andThen(Function<? super Out, ? extends Last> other) {\n\t\treturn in -> other.apply(apply(in));\n\t}\n\n\t@Override\n\tdefault <First> Func<First, Out> compose(Function<? super First, ? extends In> other) {\n\t\treturn first -> apply(other.apply(first));\n\t}\n\n\tdefault Try<Out> tryApply(In in) {\n\t\treturn Try.of(() -> checkedApply(in));\n\t}\n\n\n\tstatic <Out> Func0<Out> lift(Func0<Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In, Out> Func1<In, Out> lift(Func1<In, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2, Out> Func2<In1, In2, Out> lift(Func2<In1, In2, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2, In3, Out> Func3<In1, In2, In3, Out> lift(Func3<In1, In2, In3, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2, In3, In4, Out> Func4<In1, In2, In3, In4, Out> lift(Func4<In1, In2, In3, In4, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2, In3, In4, In5, Out> Func5<In1, In2, In3, In4, In5, Out> lift(Func5<In1, In2, In3, In4, In5, Out> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In> Consumer1<In> lift(Consumer1<In> func) {\n\t\treturn func;\n\t}\n\n\tstatic <In1, In2> Consumer2<In1, In2> lift(Consumer2<In1, In2> func) {\n\t\treturn func;\n\t}\n}", "public interface LightFuture<T> {\n /**\n * Returns {@code true} then task is finished.\n */\n boolean isReady();\n\n /**\n * Returns result of work.\n * @throws InterruptedException if waiting for the result to compute fails\n * @throws LightExecutionException if computation ends up with an exception\n */\n T get() throws InterruptedException, LightExecutionException;\n\n /**\n * Applies mapping to result of the task to get a new task.\n * @param mapping function to get new task from the result\n * of the previous\n * @param <U> return value of new task\n * @return new task\n * @throws InterruptedException if waiting for the result to compute fails\n * @throws LightExecutionException if computation ends up with an exception\n */\n @NotNull\n <U> LightFuture<U> thenApply(Function<? super T, U> mapping) throws InterruptedException, LightExecutionException;\n}", "@FunctionalInterface\npublic interface HasBeenCancelledFactory extends Function<WebContext, Boolean> {\n}", "@java.lang.FunctionalInterface()\r\n @jsweet.lang.Erased\r\n public interface CallbackBiConsumer<T1,T2> {\r\n public void $apply(T1 p1, T2 p2);\r\n }", "public interface CallbackTask<R>\n{\n\n R execute() throws Exception;\n\n void onBack(R r);\n\n void onException(Throwable t);\n}", "public interface ItemCallBack<T> {\n void onSuccess(T result);\n\n void onFailure(Throwable caught);\n}", "public interface OnNetlitener<T> {\n public void onSuccess(T t);\n public void onFailure(Exception e);\n}", "@Override\r\n default R apply(final T t, final U u, final V v) {\r\n try {\r\n return applyThrows(t, u, v);\r\n } catch (final Throwable e) {\r\n rethrowUnchecked(e);\r\n throw new FunctionException(e); // never reached normally\r\n }\r\n }", "public interface IHttpCallBack<T> {\n void success(T t);\n void fail(Throwable e);\n}", "public interface BaseCallback<T> {\n void onSuccess(T result);\n\n void onFail(String message);\n}", "public interface OnStart extends FuncUnit0 {\n \n public static final OnStart DoNothing = ()->{};\n \n public static OnStart run(FuncUnit0 runnable) {\n if (runnable == null)\n return null;\n \n return runnable::run;\n }\n \n}", "static <T, R> Function<T, R> function(Function<T, R> function) {\n return function;\n }", "@Override\n public void call(Void aVoid) {\n\n }", "@FunctionalInterface\npublic interface PentaFunction<T, U, V, W, X, R> {\n\tR apply(T t, U u, V v, W w, X x);\n}", "@FunctionalInterface\n private interface TwoParameterFunction<T, U, R> {\n R apply(T t, U u);\n }", "public interface OnSucceedListener {\n public <T> void OnSucceed(int flag, T cla, String message);\n\n public void Error();\n}", "@FunctionalInterface\npublic interface FailableRunnable {\n\n /**\n * Executes a side-effectful computation.\n *\n * @throws Exception\n * if it fails\n */\n public void run() throws Exception;\n}", "@FunctionalInterface\npublic interface BiFunction<I1,I2,O,E extends Exception> {\n\n\tpublic O apply(I1 first, I2 second) throws E;\n\n}", "@Override\n\tpublic Void visit(IsVoid isvoid) {\n\t\tprintIndent(\"isvoid\");\n\t\tindent++;\n\t\tisvoid.expr.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "static <A, B, C, R> Function<C, R> bind(TriFunction<A, B, C, R> f, A firstParam, B secondParam) {\n return thirdParam -> f.apply(firstParam, secondParam, thirdParam);\n }", "public interface INetCallback<T> {\n void Success(T t);\n void Failed(String msg);\n}", "@FunctionalInterface\npublic interface TaskWithoutResult {\n\n /**\n * The job that this task will accomplish\n *\n * @return\n */\n void completeJob();\n}", "public interface Callback<T> {\n void callListener(T param);\n}", "public interface Callback<T> {\n\t/**\n\t * Executes when the method is complete\n\t * @param result The result of the method\n\t */\n\tpublic void onComplete(T result);\n}", "BrainTreeVoidResult voidTransaction(VoidRequest voidRequest);", "public interface Callback<T> {\n\n // 失败回调\n void onFail(int errorNo, String errorMsg);\n\n // 成功回调\n void onSuccess(T t);\n}", "public abstract void executeVoid(VirtualFrame frame);", "public interface Function {\n /**\n * Get the name of this function.\n *\n * @return The name of the function.\n */\n String getName();\n\n /**\n * Execute this function.\n */\n void execute();\n}", "public interface Function {\n double f(double x);\n}", "public interface Function {\n double f(double x);\n}", "@Override\n\t\t\tpublic Ast unaryOp(UnaryOp ast, Void dummy) {\n\t\t\t\tsuper.unaryOp(ast, dummy);\n\t\t\t\ttry {\n\t\t\t\t\tInteger intValue = null;\n\t\t\t\t\tBoolean boolValue = null;\n\n\t\t\t\t\tswitch (ast.operator) {\n\t\t\t\t\tcase U_BOOL_NOT:\n\t\t\t\t\t\tboolValue = !asBool(ast.arg());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase U_MINUS:\n\t\t\t\t\t\tintValue = -asInt(ast.arg());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase U_PLUS:\n\t\t\t\t\t\tintValue = asInt(ast.arg());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn replace(ast, intValue, boolValue);\n\t\t\t\t} catch (NotConstantException e) {\n\t\t\t\t\t// non-constant argument, no effect\n\t\t\t\t\treturn ast;\n\t\t\t\t}\n\t\t\t}", "public interface FloatExceptional<E extends Throwable> extends BaseExceptional<FloatStream, E> {\n FloatStream mapException(ToFloatFunction<E> mapper);\n}", "public interface Function2<T, U, K> {\n\n /**\n * This method is a composition of two functions:\n * it acts as g(f(x, y))) where f is the Function2 class object\n * and g is a Function1 class object.\n * @param g one-argument function,\n * the outer function of the composition\n * @param <V> outer function range type parameter\n * @return function of one argument that represents g(f(x, y))\n */\n default <V> Function2<T, U, V> compose(@NotNull final Function1<? super K, ? extends V> g) {\n return (t, u) -> g.apply(Function2.this.apply(t, u));\n }\n\n /**\n * This method binds the first argument with a provided value.\n * @param newFirstArgument argument to be bound\n * @return new function object with a bound first argument\n */\n default Function1<U, K> bind1(T newFirstArgument) {\n return u -> Function2.this.apply(newFirstArgument, u);\n }\n\n /**\n * This method binds the second argument with a provided value.\n * @param newSecondArgument argument to be bound\n * @return new function object with a bound second argument\n */\n default Function1<T, K> bind2(U newSecondArgument) {\n return t -> Function2.this.apply(t, newSecondArgument);\n }\n\n /**\n * This method implements currying:\n * instead of a two-argument function we get\n * two one-argument functions.\n * @return function g such that g(x)(y) == f.apply(x, y)\n */\n default Function1<T, Function1<U, K>> curry() {\n return this::bind1;\n }\n\n /**\n * This method applies the function to provided arguments.\n * @param arg1 first argument\n * @param arg2 second argument\n * @return result of function application\n */\n K apply(T arg1, U arg2);\n}", "public abstract void onSuccess(T t);", "static <T> Function<T, T> identity() {\n\t\treturn t -> t;\n\t}", "@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 native void instanceVoid();", "@FunctionalInterface\npublic interface ThrowingConsumer<T, E extends Exception> {\n\n void accept(T t) throws E;\n\n}", "public static <A> Answer<Void> answerVoid(VoidAnswer1<A> answer) {\n return toAnswer(answer);\n }", "public interface Dispatch<A extends Action, S extends State> extends Function<A, S> {\n}", "@Override\n public String visit(VoidType n, Object arg) {\n return null;\n }", "public void onSuccess(Void v) {\n \t\t }", "public interface Future<T> extends AsyncResult<T> {\n\n final class Factory {\n\n public static <T> Future<T> failedFuture(String failureMessage) {\n return new FutureImpl<>(failureMessage, false);\n }\n\n public static <T> Future<T> failedFuture(Throwable t) {\n return new FutureImpl<>(t);\n }\n\n public static <T> Future<T> future() {\n return new FutureImpl<>();\n }\n\n public static <T> Future<T> succeededFuture() {\n return new FutureImpl<>((Throwable) null);\n }\n\n public static <T> Future<T> succeededFuture(T result) {\n return new FutureImpl<>(result);\n }\n }\n\n void complete();\n\n void complete(T result);\n\n void fail(String failureMessage);\n\n void fail(Throwable throwable);\n\n boolean isComplete();\n\n void setHandler(Handler<AsyncResult<T>> handler);\n}", "public interface OnSuccessCallback {\n public void execute(Object body);\n}", "interface SomeFunc<T>{\n T func(T t);\n}", "@FunctionalInterface\r\ninterface SingleMethod { // functional interface cant have more than one abstract method\r\n\tvoid method();\r\n\t\r\n}", "public interface CallBack<T> {\n void getSuccess(T result);\n void getFailed(String msg);\n}", "public interface HttpCallback <T> {\n void onSuccess(T data);\n void onError(Exception e);\n}", "private String addVoid() {\n\t\t// NO PARAMETERS\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"VOID:VOID\");\n\t\treturn tag.toString();\n\n\t}", "public interface Functor1<T, F extends Functor1<?,?>> {\n <R> F map(Function<T,R> fn);\n}", "public interface Function2<T, U, R> {\n R apply(T t, U u);\n\n /**\n * Method to create composition: after(this(x, y)).\n *\n * @param after function to apply after.\n * @param <V> return type of after.\n * @return composition of functions.\n */\n default <V> Function2<T, U, V> compose(Function1<? super R, ? extends V> after) {\n return (t, u) -> after.apply(this.apply(t, u));\n }\n\n /**\n * Method to bind 1st parameter of function.\n *\n * @param firstParameter value of 1st argument to bind.\n * @return function from 1 arguments that waits for the second argument.\n */\n default Function1<U, R> bind1(T firstParameter) {\n return (u) -> apply(firstParameter, u);\n }\n\n /**\n * Method to bind 2nd parameter of function.\n *\n * @param secondParameter value of 2nd argument to bind.\n * @return function from 1 arguments that waits for the first argument.\n */\n default Function1<T, R> bind2(U secondParameter) {\n return (t) -> apply(t, secondParameter);\n }\n\n /**\n * Method to curry function, second parameter will be bind.\n *\n * @param parameter parameter to set.\n * @return function from 1 argument(1st argument of Function2).\n */\n default Function1<T, R> curry(U parameter) {\n return bind2(parameter);\n }\n}", "public interface InvokerCallback<T> {\n public void invoke(T response);\n}", "void success(T t);", "public interface Task<C extends FlowContext> extends Func1<C, Completable> {\n}", "public interface DataCallback<T> {\n\n void onSuccess(T data);\n\n void onError();\n}", "@FunctionalInterface\npublic interface MyFunctionalInterface {\n\n // abstract method\n int addMethod(int val1, int val2);\n\n}", "R apply(T t, U u);" ]
[ "0.6596399", "0.62048024", "0.60555166", "0.5990964", "0.58685833", "0.56762826", "0.5387004", "0.5386656", "0.531552", "0.5277548", "0.52757406", "0.5262167", "0.5247738", "0.5243856", "0.52321637", "0.5223401", "0.5219263", "0.5182125", "0.51674664", "0.51428", "0.5138503", "0.5085103", "0.5070768", "0.50687706", "0.5015701", "0.5014157", "0.49924877", "0.49770084", "0.49532038", "0.49531135", "0.49331445", "0.49306408", "0.4910472", "0.48818642", "0.48794243", "0.48632222", "0.48601633", "0.48493424", "0.48477927", "0.48348853", "0.4834521", "0.48228353", "0.48102129", "0.4794873", "0.47942173", "0.4793565", "0.47892395", "0.4785362", "0.47686934", "0.47584343", "0.4755229", "0.4745632", "0.47397608", "0.47389352", "0.47263902", "0.47125122", "0.46977127", "0.4697231", "0.46839437", "0.46778575", "0.46612346", "0.46478847", "0.46428308", "0.464143", "0.4639444", "0.46346253", "0.4628834", "0.46211216", "0.4615355", "0.46084064", "0.45966083", "0.4580664", "0.4580664", "0.45728746", "0.45698744", "0.45668483", "0.45668432", "0.4560351", "0.45567805", "0.4552252", "0.45424283", "0.4539674", "0.45315114", "0.45312682", "0.45287082", "0.45272028", "0.45258993", "0.4524766", "0.4517729", "0.4517683", "0.45167056", "0.45128015", "0.45073897", "0.45069355", "0.45067832", "0.4500871", "0.4496974", "0.44928664", "0.44898465", "0.44865945" ]
0.47582456
50
Construct a BitSet for the given arguments.
private static BitSet makeBitSet( int... args ) { BitSet result = new BitSet( MAX_OPCODE + 1 ) ; for (int value : args ) result.set( value ) ; return result ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BitSet makeMod(){\n\t\tBitSet bs = new BitSet(this.length());\n\t\tbs.or(this);\n\t\treturn bs;\n\t}", "public static BitSet BitStringToBitSet(String s) {\n BitSet result = new BitSet();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == '1') {\n result.set(i);\n }\n }\n return result;\n }", "public static void main(String[] args) {\n\t\tBitSet bits1 = new BitSet(16);\n\t\tBitSet bits2 = new BitSet(16);\n\n\t\t// set some bits\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tif ((i % 2) == 0) bits1.set(i);\n\t\t\tif ((i % 5) != 0) bits2.set(i);\n\t\t}\n\t\tSystem.out.println(\"Initial pattern in bits1: \");\n\t\tSystem.out.println(bits1);\n\t\tSystem.out.println(\"\\nInitial pattern in bits2: \");\n\t\tSystem.out.println(bits2);\n\n\t\t// AND bits\n\t\tbits2.and(bits1);\n\t\tSystem.out.println(\"\\nbits2 AND bits1: \");\n\t\tSystem.out.println(bits2);\n\n\t\t// OR bits\n\t\tbits2.or(bits1);\n\t\tSystem.out.println(\"\\nbits2 OR bits1: \");\n\t\tSystem.out.println(bits2);\n\n\t\t// XOR bits\n\t\tbits2.xor(bits1);\n\t\tSystem.out.println(\"\\nbits2 XOR bits1: \");\n\t\tSystem.out.println(bits2);\n\t}", "public BinaryMatrixNew() {\n\t\t\tsuper(Matrixes.<R, C>newValidating(PredicateUtils.inBetween(0d, 1d)));\n\t\t}", "public FormatableBitSet(int numBits)\n \t{\n \t\tinitializeBits(numBits);\n \t}", "public void testCtor2() {\r\n try {\r\n new BloomFilter(Integer.MAX_VALUE, new DefaultHashFunctionFamily(10000));\r\n fail(\"The length of bitset is too large.\");\r\n } catch(IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public static BitSet createBitSetFromBinaryString(String bitsAsBinaryString) {\r\n\t\tBitSet bitSet = new BitSet(bitsAsBinaryString.length());\r\n\r\n\t\tfor (int i = 0; i < bitsAsBinaryString.length(); i++) {\r\n\t\t\tif (bitsAsBinaryString.substring(i, i + 1).equals(\"1\")) {\r\n\t\t\t\tbitSet.set(i, true);\r\n\t\t\t} else {\r\n\t\t\t\tbitSet.set(i, false);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn bitSet;\r\n\t}", "public static void main(String[] args)\n {\n BitSet bs1 = new BitSet();\n BitSet bs2 = new BitSet();\n\n /* assigning values to set1*/\n bs1.set(0);\n bs1.set(1);\n bs1.set(3);\n bs1.set(4);\n\n // assign values to bs2\n bs2.set(4);\n bs2.set(6);\n bs2.set(5);\n bs2.set(1);\n bs2.set(2);\n bs2.set(3);\n bs2.set(12);\n\n // Printing the 2 Bitsets\n System.out.println(\"bs1 : \" + bs1);\n System.out.println(\"bs2 : \" + bs2);\n\n // Print the first clear bit of bs1\n System.out.println(bs1.nextClearBit(1));\n\n // Print the first clear bit of bs2 after index 3\n System.out.println(bs2.nextClearBit(3));\n }", "public static void main( final String[] args ) {\n final BooleanSetEvaluator evaluator = new BooleanSetEvaluator();\n final BitSetEvaluationContext context = new BitSetEvaluationContext( 4 );\n doIt( evaluator, \"0011 * 1010\", context );\n doIt( evaluator, \"true * 1100\", context );\n doIt( evaluator, \"-false\", context );\n }", "HashSet<BitSet> createSubsets(BitSet bs){\n HashSet<BitSet> subsets = new HashSet<>();\n for(int i=0; i<bs.length(); i++){\n if(bs.get(i)){\n BitSet t = (BitSet)bs.clone();\n t.flip(i);\n subsets.add(t);\n }\n }\n \n return subsets;\n }", "void setBits(int... values);", "public BloomFilter(int n){\n\t\tflags = new boolean[4*n]; // initialize the boolean array by the size of 4n\n\t\tfor(int i=0; i<flags.length; i++){\n\t\t\tflags[i]=false; // initializing the fields with false value\n\t\t}\n\t\ta = (int) (Math.random()*100); // 1-100\n\t\tb = (int) (Math.random()*100);// 1-100\n\t}", "BitSet valueLeafFlags();", "BitSet valueLeafFlags();", "public Code(ArrayList<Boolean> bits)\n\t{\n\t\tthis.bits = bits;\n\t}", "protected static BitSet m5341b(byte[] bArr) {\n BitSet bitSet = new BitSet(bArr.length << 3);\n int i = 0;\n for (byte b : bArr) {\n int i2 = 7;\n while (i2 >= 0) {\n int i3 = i + 1;\n bitSet.set(i, ((b & (1 << i2)) >> i2) == 1);\n i2--;\n i = i3;\n }\n }\n return bitSet;\n }", "public UnmodifiableBitSet orBitSet(BitSet bs){\n\t\tUnmodifiableBitSet nbs = (UnmodifiableBitSet)this.clone();\n\t\tnbs.orBitSetInn(bs);\n\t\treturn nbs;\n\t}", "public BloomFilter(int bitSetSize, int expectedNumberOElements) {\r\n\t\tthis(bitSetSize / (double) expectedNumberOElements,\r\n\t\t\t\texpectedNumberOElements, (int) Math\r\n\t\t\t\t\t\t.round((bitSetSize / (double) expectedNumberOElements)\r\n\t\t\t\t\t\t\t\t* Math.log(2.0)));\r\n\t}", "public FormatableBitSet(byte[] newValue)\n \t{\n \t\tvalue = newValue;\n \t\tbitsInLastByte = 8;\n \t\tlengthAsBits = calculateLength(newValue.length);\n \t}", "@Test\n public void encodeAsBitSet()\n {\n int value = 6;\n final BinaryEncoder encoder = new BinaryEncoder(16);\n\n BitSet result = encoder.encodeAsBitSet(value);\n\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n assertFalse(result.get(0));\n assertTrue(result.get(1));\n assertTrue(result.get(2));\n assertFalse(result.get(3));\n\n value = 20; // > 16 outside range\n result = encoder.encodeAsBitSet(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n // 0100 Best fit into 4 digits; ignores higher bits.\n assertFalse(result.get(0));\n assertFalse(result.get(1));\n assertTrue(result.get(2));\n assertFalse(result.get(3));\n }", "BitSet selectLeafFlags();", "BitSet selectLeafFlags();", "String bsToStr(BitSet bs){\n String s = \"\";\n for(int i=0; i<bitsetLen; i++){\n if(bs.get(i) == true)\n s += '1';\n else\n s += '0';\n }\n \n return new StringBuilder(s).reverse().toString();\n }", "public Unsigned128BitType()\n\t{\n\t\tthis( 0, 0 );\n\t}", "private Bits32() {\r\n }", "public static BitVector createIndexSet(int[] indices) {\n\t\tif (indices.length==0)\n\t\t\treturn new BitVector(0);\n\n\t\tBitVector bv = new BitVector(indices[indices.length-1]+1);\n\t\tfor (int index : indices)\n\t\t\tbv.putQuick(index, true);\n\t\treturn bv;\n\t}", "protected BitSet getDeterminantBitSet(ConditionalFunctionalDependencyResult result) {\n try {\n BitSet bitSet = new BitSet();\n String tableName = result.getDeterminantTableName();\n for (ColumnIdentifier column : result.getDeterminant().getColumnIdentifiers()) {\n bitSet.or(this.tableInformationMap.get(tableName).getColumnInformationMap()\n .get(column.getColumnIdentifier()).getBitSet());\n }\n return bitSet;\n } catch (Exception e) {\n return new BitSet();\n }\n }", "boolean[] bitwiseChangeList();", "HashSet<BitSet> createSubsetsOfLen2(BitSet bs){\n HashSet<BitSet> subsets = new HashSet<>();\n \n for(int i=0; i<bs.length();){\n i = bs.nextSetBit(i);\n \n for(int j=i+1; j<bs.length();){\n j = bs.nextSetBit(j);\n BitSet b = new BitSet(bitsetLen);\n b.set(i, true);\n b.set(j, true);\n subsets.add(b);\n j++;\n }\n i++;\n }\n return subsets;\n }", "public static String ReturnSet(BitSet bs, int size) {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < size; i++) {\n String s1;\n if (bs.get(i) == true) {\n s1 = \"1\";\n } else {\n s1 = \"0\";\n }\n sb.append(s1);\n }\n return sb.toString();\n }", "public static LongArrayBitVector of( final int... bit ) {\n\t\tfinal LongArrayBitVector bitVector = new LongArrayBitVector( bit.length );\n\t\tfor( int b : bit ) {\n\t\t\tif ( b != 0 && b != 1 ) throw new IllegalArgumentException( \"Illegal bit value: \" + b );\n\t\t\tbitVector.add( b );\n\t\t}\n\t\treturn bitVector;\n\t}", "@Test\n public void encodeAsBitSetNegative()\n {\n final int value = -5;\n final BinaryEncoder encoder = new BinaryEncoder(-8, 8, 1.0);\n\n final BitSet result = encoder.encodeAsBitSet(value);\n\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n assertTrue(result.get(0));\n assertTrue(result.get(1));\n assertFalse(result.get(2));\n assertFalse(result.get(3));\n }", "public static Builder create(Tribit fillBit){\n return new Builder(fillBit);\n }", "public static int[] bwand(BinaryNumber bn1, BinaryNumber bn2) {\n\t\tif (bn1.getLength() !=bn2.getLength()) {\n\t\t\tSystem.out.println(\"can't be doin that. Make them the same length.\");\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tint[] and = new int[bn1.length];\n\t\tfor(int i = 0;i < bn1.length;i++) {\n\t\t\tif(bn1.data[i] + bn2.data[i] == 2) {\n\t\t\t\tand[i] = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tand[i] = 0;\n\t\t\t}\n\t\t}\n\t\treturn and;\n\t}", "public DefaultBitBuffer(ByteBuffer inputByteBuffer) {\n // TODO: I think we should use #limit() instead of #capacity()\n this(inputByteBuffer, ((long) (inputByteBuffer.capacity())) << 3, 0L);\n }", "public BloomFilter(String m1, String path) {\n this.size = Integer.parseInt(m1);\n this.bloomFilterArr = new boolean[this.size];\n this.multyFancArr = new int[TxtFileLineCounter(path)][2];\n InsertHashFunction(multyFancArr, path);\n }", "public Builder(Set<String> shortSwitches) {\n this.shortSwitches = new HashSet<String>();\n this.shortSwitches.addAll(shortSwitches);\n longSwitches = new HashSet<String>();\n }", "public LogicalVector(boolean... values) {\r\n this.values = new int[values.length];\r\n for (int i = 0; i != values.length; ++i) {\r\n this.values[i] = values[i] ? 1 : 0;\r\n }\r\n }", "public <V extends Number> FluentExp<V> bitAnd (V value)\n {\n return new BitAnd<V>(this, value);\n }", "abstract CharArraySet build();", "private void convertTransactionToBitStream(){\n bitTransactionList = new ArrayList<>();\n itemListMap2 = new HashMap<>();\n \n for(int i=0; i<transactions_set.size(); i++){\n ArrayList curr_tr = transactions_set.get(i);\n \n if(curr_tr.size() >= min_itemset_size_K){ \n int freqItem = 0;\n BitSet bitset = new BitSet(bitsetLen);\n \n for(int j=0; j<curr_tr.size(); j++){\n try{\n int item = (int)curr_tr.get(j);\n bitset.set(itemIndex.get(item), true);\n freqItem++;\n }\n catch(Exception e){}\n }\n if(freqItem >= min_itemset_size_K){\n bitTransactionList.add(bitset);\n// System.out.println(bitset);\n HashSet<BitSet> subset_2 = createSubsetsOfLen2(bitset);\n for(BitSet sub_b : subset_2){\n itemListMap2.put(sub_b, itemListMap2.getOrDefault(sub_b, 0)+1);\n }\n }\n }\n }\n \n itemListMap2.values().removeIf(val -> val<min_sup);\n }", "public static LongArrayBitVector getInstance() {\n\t\treturn new LongArrayBitVector( 0 );\n\t}", "public BloomFilterJunior(int capacity) {\n if (capacity < MIN_INIT_CAPACITY) {\n // throws IllegalArgumentException if capacity < 50\n throw new IllegalArgumentException();\n }\n\n // Initialize boolean table of specified capacity\n table = new boolean[capacity];\n }", "public BloomFilter_utils( final int n, final int d ) {\r\n this.d = d;\r\n int len =\r\n \t(int)Math.ceil( ( (long)n * (long)d / NATURAL_LOG_OF_2 ) / 32 );\r\n // round up to ensure divisible into 1MiB chunks\r\n len = ((len / ONE_MB_INTS)+1)*ONE_MB_INTS;\r\n this.m = len*32L;\r\n if ( m >= 1L<<54 ) {\r\n \tthrow new IllegalArgumentException( \"This filter would require \" + m + \" bits\" );\r\n }\r\n// bits = new int[ len ];\r\n bits = new int[ len/ONE_MB_INTS ][ONE_MB_INTS];//生成bloom数组\r\n\r\n if ( DEBUG ) System.err.println( \"Number of bits: \" + m );\r\n\r\n // seeded for reproduceable behavior in repeated runs; BUT: \r\n // SecureRandom's default implementation (as of 1.5) \r\n // seems to mix in its own seeding.\r\n final SecureRandom random = new SecureRandom(new byte[] {19,96});\r\n weight = new int[ d ][];\r\n //生成d行[NUMBER_OF_WEIGHTS]列的随机数\r\n for( int i = 0; i < d; i++ ) {\r\n weight[ i ] = new int[ NUMBER_OF_WEIGHTS ];\r\n for( int j = 0; j < NUMBER_OF_WEIGHTS; j++ )\r\n weight[ i ][ j ] = random.nextInt();\r\n }\r\n }", "HxMethod createConstructor(final HxType... parameterTypes);", "public static Builder create(){\n return new Builder(Tribit.ZERO);\n }", "public void build() {\n boolean debugGates = this.debugDepth > 0 ? this.inDebuggerMode : false;\n if (this.outputs.size() != 1 << this.input.getSize()) {\n throw new BitStreamInputSizeMismatch(this);\n }\n\n List<BitStream> splitterInput = new ArrayList<>();\n splitterInput.add(this.input);\n\n List<BitStream> splitterOutput = new ArrayList<>();\n for (int i = 0; i < this.input.getSize(); i++) {\n splitterOutput.add(new BitStream(1));\n }\n\n Splitter inputSplitter = new Splitter(splitterInput, splitterOutput, \"inputSplitter\", debugGates);\n\n for (int i = 0; i < this.outputs.size(); i++) {\n List<BitStream> andInputs = new ArrayList<>();\n for (BitStream splitterOut : splitterOutput) {\n andInputs.add(splitterOut);\n }\n\n String indexInBinary = DataConverter.convertUnsignedDecToBin(i);\n indexInBinary = this.padZeros(indexInBinary, this.input.getSize());\n\n for (int j = indexInBinary.length() - 1; j >= 0; j--) {\n if (indexInBinary.charAt(j) == '0') {\n BitStream notOut = new BitStream(1);\n NOT not = new NOT(andInputs.get(j), notOut,\n \"not\" + i + (indexInBinary.length() - 1 - j), debugGates);\n andInputs.set(j, notOut);\n }\n }\n\n MultiAND and = new MultiAND(andInputs, this.outputs.get(i), \"and\" + i, debugGates);\n }\n }", "public Unsigned128BitType( final long lower, final long upper )\n\t{\n\t\tthis( ( NativeImg< ?, ? extends LongAccess > ) null );\n\t\tdataAccess = new LongArray( 2 );\n\t\tset( lower, upper );\n\t}", "public static Bits fromBinaryString(String binaryString) {\n final int length = binaryString.length();\n final boolean bitsFit = (length % 8) == 0;\n final Bits bits = new Bits(new byte[length / 8 + (bitsFit ? 0 : 1)]);\n\n for (int i = 0; i < length; i++)\n if (binaryString.charAt(i) == '1')\n bits.setBit(i);\n else\n bits.unsetBit(i);\n\n return bits;\n }", "protected abstract boolean a(axz paramaxz, long paramLong, int paramInt1, int paramInt2, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, BitSet paramBitSet);", "public void set(boolean[] abol);", "public IntHashSet(int paramInt)\n/* */ {\n/* 61 */ this(paramInt, 0.3D);\n/* */ }", "HxMethod createConstructor(final String... parameterTypes);", "public BruteForce() {\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(rangeBitwiseAnd(10, 13));\r\n\t}", "static void initBin(int[] binToInt)\n {\n for(int i = 0; i < 32; i++)\n {\n binToInt[i] = 0;\n }\n }", "public Code()\n\t{\n\t\tbits = new ArrayList<Boolean>();\n\t}", "public EnumSet<KeyUsage> convert(boolean[] keyUsageBits) {\n EnumSet<KeyUsage> usages = EnumSet.noneOf(KeyUsage.class);\n if (keyUsageBits != null) {\n for (int i = 0; i < Math.min(BIT_TO_USAGE.size(), keyUsageBits.length); i++) {\n if (keyUsageBits[i]) {\n usages.add(BIT_TO_USAGE.get(i));\n }\n }\n }\n return usages;\n }", "private static ArrayList<Integer> generateBinaryCodeList(ArrayList<ArrayList<Integer>> tMat){\r\n\t\tArrayList<Integer> bcList = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < tMat.size(); i++){\r\n\t\t\tint code = getBinaryCode(tMat, i);\r\n\t\t\tbcList.add(code);\r\n\t\t}\r\n\t\treturn bcList;\r\n\t}", "public static void main(String[] args) {\n if (args.length == 0) {\n System.out.println(\"Usage: java BitAlgebra <number>\");\n System.exit(1);\n }\n int i = new Integer(args[0]);\n System.out.println(\"input number = \" + i);\n int num;\n int sign = 1;\n String s;\n if (i < 0) {\n s = getBits(i);\n System.out.println(\"2's complement bits for negative integer i = \" + s);\n sign = -1;\n i = ~i + 1; // 1's complement + 1\n }\n s = getBits(i);\n System.out.println(\"bits for positive integer i = \" + s);\n System.out.println(\"original number = \" + (sign*stringBinaryToDecimal(s)));\n }", "public static boolean basicBinaryTests()\n\t{\n\t\tSystem.out.println(\"Beginning Basic Binary Tests...\");\n\t\tSystem.out.println(\"isBitSet[Array]...\");\n\t\tfinal byte[] original_bytes = { 3, 54 };\n\t\tfinal String binary_str_rep = Integer.toBinaryString(3) + Integer.toBinaryString(54);\n\t\tString binary_str_rebuilt = \"\";\n\t\tfor(int i = 0; i < original_bytes.length; i ++)\n\t\t{\n\t\t\tfinal byte byte_len = (byte) (Integer.toBinaryString(original_bytes[i]).length() - BIT_ONE_);\n\t\t\tfor( int a = byte_len; a > -1; a --)\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tbinary_str_rebuilt += isBitSet(original_bytes, i, a) ? BIT_ONE : BIT_ZERO;\n\t\t\t\t}\n\t\t\t\tcatch (BitException e)\n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\t\n\t\tfinal boolean success_0 = binary_str_rebuilt.equals(binary_str_rep);\n\t\t\n\t\tSystem.out.println(\"Binary String[0]: \"+binary_str_rep);\n\t\tSystem.out.println(\"Rebuilt Binary[0]: \"+binary_str_rebuilt);\n\t\tSystem.out.println(\"Success[0]: \" + success_0 + \"\\n\");\n\n\t\tSystem.out.println(\"isBitSet[Byte]...\");\n\t\t\n\t\tbinary_str_rebuilt = \"\";\n\t\tfor(int i = 0; i < original_bytes.length; i ++)\n\t\t{\n\t\t\tfinal byte byte_len = (byte) (Integer.toBinaryString(original_bytes[i]).length() - BIT_ONE_);\n\t\t\tfor( int a = byte_len; a > -1; a --)\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tbinary_str_rebuilt += isBitSet(original_bytes[i], a) ? BIT_ONE : BIT_ZERO;\n\t\t\t\t}\n\t\t\t\tcatch (BitException e)\n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\t\n\t\tfinal boolean success_1 = binary_str_rebuilt.equals(binary_str_rep);\n\t\t\n\t\tSystem.out.println(\"Binary String[1]: \"+binary_str_rep);\n\t\tSystem.out.println(\"Rebuilt Binary[1]: \"+binary_str_rebuilt);\n\t\tSystem.out.println(\"Success[1]: \" + success_1 + \"\\n\");\n\t\t\n\t\treturn success_0 && success_1;\n\t}", "private static int createBitVector(String str) {\n\t\tint bitVector = 0;\n\t\tfor(char c : str.toCharArray()) {\n\t\t\tint x = getCharNum(c);\n\t\t\tbitVector = toggle(bitVector, x);\n\t\t}\n\t\treturn bitVector;\n\t}", "public BitArray(int size)\n\t{\n\t\tthis.bits = new long[(size - 1) / BITS_IN_LONG + 1];\n\t\tthis.size = size;\n\t}", "private byte[] intToBits(int number, int n) {\n\t\tbyte[] bits = new byte[n];\n\t\t\n\t\tString bitString = Integer.toBinaryString(number);\n\t\twhile (bitString.length() < n) {\n\t\t\tbitString = \"0\" + bitString;\n\t\t}\n\t\t\n\t\tfor(int i = 0, maxLen = bits.length; i < maxLen; i++) {\n\t\t\tbits[i] = (byte) (bitString.charAt(i) == 1 ? 1 : 0);\n\t\t}\n\t\t\n\t\treturn bits;\n\t}", "public BitTwiddle() {\r\n\t\t}", "public static bcm a(Block parambec, EnumDirection paramej, boolean paramBoolean1, boolean paramBoolean2)\r\n/* 22: */ {\r\n/* 23: 42 */ return new bdv(parambec, paramej, paramBoolean1, paramBoolean2);\r\n/* 24: */ }", "public Builder(String shortSwitch) {\n this.shortSwitches = new HashSet<String>();\n this.shortSwitches.add(shortSwitch);\n longSwitches = new HashSet<String>();\n }", "private static Expression constructBinaryFilterTreeWithAnd(List<Expression> expressions) {\n if (expressions.size() == 2) {\n return new LogicAndExpression(expressions.get(0), expressions.get(1));\n } else {\n return new LogicAndExpression(\n expressions.get(0),\n constructBinaryFilterTreeWithAnd(expressions.subList(1, expressions.size())));\n }\n }", "public <V extends Number> FluentExp<V> bitAnd (SQLExpression<V> expr)\n {\n return new BitAnd<V>(this, expr);\n }", "public static void main(String[] args) {\n\t\tint m = 12345;\n\t\tint n = 123;\n\t\tString mBin = \"11000000111001\";\n\t\tString nBin = \"1111011\";\n\t\tSystem.out.println(updateBits(mBin, nBin, 2, 8));\n\t\t//myUpdateBits(412, 14, 4, 7);\n\t}", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:53.096 -0500\", hash_original_method = \"AD601F3532730C1588B10C0B2F4700C0\", hash_generated_method = \"7CF3579665197E3D9616E88D35150E2D\")\n \npublic ASN1BitString() {\n super(TAG_BITSTRING);\n }", "public static BitFragment newInstance() {\n BitFragment fragment = new BitFragment();\n return fragment;\n }", "private Binomial(int n) {\n N = n;\n }", "private BitSet createFingerprint(final String strSmiles, final FingerprintSettings settings, boolean sanitize) {\n\n // todo: update code if other types are used\n\n // Normally: ROMol objects are needed to calculate fingerprints\n // Create an ROMol object\n\n // Performance trick, if SMILES is already canonicalized\n try ( RWMolCloseable mol = RWMolCloseable.from(RWMol.MolFromSmiles(strSmiles, 0, sanitize))) {\n return createFingerprint(mol, settings, sanitize);\n }\n }", "public static void bitMaxSize(){\n BitSet bitSet = new BitSet(Integer.MAX_VALUE);\n bitSet.set(0);\n }", "public LogicalVector(Boolean[] values) {\r\n this.values = new int[values.length];\r\n for (int i = 0; i != values.length; ++i) {\r\n this.values[i] = values[i] ? 1 : 0;\r\n }\r\n }", "private Term parseBitwiseAnd(final boolean required) throws ParseException {\n Term t1 = parseAdd(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '&') {\n Term t2 = parseAdd(true);\n if ((t1.isI() && t2.isI()) || !isTypeChecking()) {\n t1 = new Term.AndI(t1, t2);\n } else {\n reportTypeErrorI2(\"'&'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public bit and(bit other)\n\t{\n\t\tbit andBit = new bit();\n\t\t\n\t\tif(bitHolder.getValue() == other.getValue())\n\t\t{\n\t\t\tif(bitHolder.getValue() == 0)\n\t\t\t{\n\t\t\t\tandBit.setValue(0);\n\t\t\t}else {\n\t\t\tandBit.setValue(1);\n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\tandBit.setValue(0);\n\t\t}\n\t\t\n\t\treturn andBit;\n\t}", "public BloomFilter(String m1, String filePath) {\n if (filePath == null || filePath.equals(\"\")) {\n throw new RuntimeException(\"hashFunctionsFilePath is null or empty.\");\n }\n\n // parse the string to an integer\n try {\n this.m1 = Integer.parseInt(m1);\n }\n catch (NumberFormatException e) {\n throw new RuntimeException(\"m1 is not a number is base 10\", e);\n }\n\n // initialize the bit array\n this.bitArray = new BitArray(this.m1);\n this.hashFunctions = new LinkedList<>();\n Utils.iterateFileLines(filePath, password -> this.parseHashFunctionLine(password));\n }", "public abstract Builder produces(String... paramVarArgs);", "BSet createBSet();", "public static void main(String[] args) {\n\t\tString[] set1 = new String[16];\n\t\tString[] set2 = new String[17];\n\t\tinitSet1(set1);\n\t\tinitSet2(set2);\n\t\t\n\t\t//insert test data in bloom filters\n\t\tBloomFilter<String> bf1 = new BloomFilter<String>(160, 16);\n\t\tBloomFilter<String> bf2 = new BloomFilter<String>(170, 17);\n\t\t\n\t\t\n\t\tfor(int i=0; i<set1.length; i++ ) {\n\t\t\tbf1.add(set1[i]);\n\t\t}\n\t\tfor(int i=0; i<set2.length; i++ ) {\n\t\t\tbf2.add(set2[i]);\n\t\t}\t\n\t\t\n\t\t//approximate number of elements in filter:\n\t\tint m = bf1.size();\n\t\tint k = bf1.getK();\n\t\tint z = m - bf1.getBitSet().cardinality();\n\t\tdouble numerator = Math.log((double)z/m);\n\t\tdouble denominator = k*Math.log(1-(1/(double)m));\n\t\tdouble X = numerator / denominator;\n\t\t\n\t\t//output some testing stuff\n\t\tSystem.out.println(bf1.contains(set2[16]));\n\t\tSystem.out.println(\"Expected FP-rate: \" + bf1.expectedFalsePositiveProbability());\n\t\tSystem.out.println(\"Number of hash functions used: \" + bf1.getK());\n\t\tSystem.out.println(\"Length of bloom filter: \" + bf1.size());\n\t\tSystem.out.println(\"Number of inserted elements (exactly counted by the object): \" + bf1.count());\n\t\tSystem.out.println(\"Number of bits set to true in bloom fitler: \" + bf1.getBitSet().cardinality());\n\t\tSystem.out.println(bf1.getBitSet());\n\t\tSystem.out.println(\"\\n\\n\\n\\n\");\n\t\tSystem.out.println(\"Expected number of elements in bf1: \" + X);\n\t}", "@Override\n\tpublic void visit(BitwiseAnd arg0) {\n\n\t}", "@Override\n\tpublic void visit(BitwiseAnd arg0) {\n\t\t\n\t}", "public static BinaryExpression makeBinary(ExpressionType binaryType, Expression expression0, Expression expression1, boolean liftToNull, Method method) { throw Extensions.todo(); }", "private static void create(int num1, int num2) {\n\t\tlong result = (~(~0<<num1)) << num2;\n\t\tSystem.out.println(result);\n\t}", "public static BitSet combine(int length, BitSet... bitsets) {\r\n\t\tBitSet combinedBitSet = new BitSet();\r\n\t\tint currentBitset = 0;\r\n\t\tfor (BitSet bitset : bitsets) {\r\n\t\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\t\tif (bitset.get(i)) {\r\n\t\t\t\t\tcombinedBitSet.set((currentBitset * length) + i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcurrentBitset++;\r\n\t\t}\r\n\t\treturn combinedBitSet;\r\n\t}", "public static MethodBuilder constructor(String name) {\n\t\treturn new MethodBuilder().returnType(\"\").name(name);\n\t}", "public UnmodifiableBitSet setBit(int i){\n\t\tUnmodifiableBitSet nbs = (UnmodifiableBitSet)this.clone();\n\t\tnbs.setBitInn(i);\n\t\treturn nbs;\n\t}", "public abstract Builder params(String... paramVarArgs);", "@Override\n public PermutationSolution<Integer> createSolution() {\n return new DefaultBinaryIntegerPermutationSolution(this) ;\n }", "public CNFClause(int[] condand, int[] condor, int[] effand, int[] effor) {\r\n\t\tthis.condand = condand;\r\n\t\tthis.condor = condor;\r\n\t\tthis.effand = effand;\r\n\t\tthis.effor = effor;\r\n\t}", "public int rangeBitwiseAnd(int m, int n) {\n\t \tint ans = 0;\n\t for (int i = 0; i < 32; ++ i) {\n \t\tif (1 == ((m >> i) & 1)) {\n \t\t\tif (((m & ~0 << (i + 1)) | (~0 >>> (31 - i))) >= n) {\n \t\t\t\tans |= 1 << i;\n \t\t\t}\n \t\t}\n\t }\n\t System.out.println(ans);\n\t return ans;\n\t }", "@Override\n public BinaryType andBinary(BinaryType BinaryType) {\n int n = BinaryType.getValue().length();\n StringBuilder resultado = new StringBuilder();\n for (int i = 0; i < n; i++){\n boolean b1 = BinaryType.getValue().charAt(i) == '1';\n boolean b2 = this.getValue().charAt(i) == '1';\n resultado.append((b1 && b2) ? '1' : '0');\n }\n return TypeFactory.getBinaryType(resultado.toString());\n }", "public BloomFilter(double c, int n, int k) {\r\n\t\tthis.expectedNumberOfFilterElements = n;\r\n\t\tthis.k = k;\r\n\t\tthis.bitsPerElement = c;\r\n\t\tthis.bitSetSize = (int) Math.ceil(c * n);\r\n\t\tnumberOfAddedElements = 0;\r\n\t\tthis.bitset = new BitSet(bitSetSize);\r\n\t\ttry {\r\n\t\t\tdigestFunction.getInstance(\"MD5\");\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void testCtor() {\r\n BloomFilter[] filters = new BloomFilter[OPERATIONS];\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n filters[i] = new BloomFilter(CAPACITY, ERROR_RATE);\r\n new BloomFilter(filters[i].getSerialized());\r\n }\r\n\r\n long endTime = System.currentTimeMillis();\r\n System.out.println(\"Stress tests ------ \" + \" create BloomFilter instance in \" + (OPERATIONS * 2) +\r\n \" times in \" + Integer.toString((int) (endTime - startTime)) + \" ms\");\r\n }", "public ChamferDistance5x5Short() {\n\t\tthis(new short[]{5, 7, 11}, true);\n\t}", "public IntHashSet()\n/* */ {\n/* 69 */ this(0, 0.3D);\n/* */ }", "private boolean[] addBit(boolean a, boolean b, boolean c) {\n // PROGRAM 1: Student must complete this method\n // This method may only use the Java logic operations && (logical and),\n // || (logical or), and ! (logical not). Do not use any Java arithmetic\n // operators in this method.\n boolean[] result = new boolean[2];\n result[0] = (a ^ b) ^ c; // (a xor b) xor c -> yields the sum\n result[1] = (a && b) || (a ^ b) && c; // (a and b) or (a xor b) and c -> yields the carry-out\n // return value is a placeholder, student should replace with correct return\n return result;\n }", "private Set<BitSet> findMinimalSet(List<Set<BitSet>> pFunction) {\n\n\t\tSet<BitSet> minimalSet = new LinkedHashSet<>(pFunction.get(0));\n\t\tSet<BitSet> helpSet = new LinkedHashSet<>(pFunction.get(0));\n\t\tint pFunctionSize = pFunction.size();\n\n\t\tfor (int i = 0; i < pFunctionSize - 1; i++) {\n\t\t\tminimalSet.clear();\n\n\t\t\tfor (BitSet bitSet : helpSet) {\n\n\t\t\t\tSet<BitSet> set = pFunction.get(i + 1);\n\n\t\t\t\tfor (BitSet bitSet2 : set) {\n\t\t\t\t\tBitSet help = (BitSet) bitSet.clone();\n\t\t\t\t\thelp.or(bitSet2);\n\t\t\t\t\tminimalSet.add(help);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thelpSet.clear();\n\t\t\thelpSet.addAll(minimalSet);\n\t\t}\n\t\tlogSumOfProducts(minimalSet);\n\n\t\tint cardinality = minimalSet.stream().min((a, b) -> Integer.compare(a.cardinality(), b.cardinality()))\n\t\t\t\t.map(BitSet::cardinality).get();\n\n\t\tminimalSet = minimalSet.stream().filter(e -> e.cardinality() == cardinality)\n\t\t\t\t.collect(Collectors.toCollection(LinkedHashSet::new));\n\n\t\treturn minimalSet;\n\t}" ]
[ "0.608457", "0.57603", "0.5757322", "0.5580763", "0.5513933", "0.55083704", "0.5508065", "0.5427002", "0.5407785", "0.5304616", "0.5289869", "0.5284647", "0.527086", "0.527086", "0.52464885", "0.5224657", "0.5201101", "0.5179585", "0.5135778", "0.5118613", "0.50393194", "0.50393194", "0.50187856", "0.49836844", "0.49820143", "0.49570692", "0.4928964", "0.49228376", "0.49054813", "0.49026233", "0.48999074", "0.48572066", "0.48501056", "0.48273566", "0.4804308", "0.47963855", "0.47743052", "0.4761568", "0.47564", "0.4750307", "0.4749418", "0.4742918", "0.47063956", "0.47024322", "0.4672852", "0.46621305", "0.4648996", "0.46211147", "0.46145067", "0.46075222", "0.46058354", "0.46058", "0.45988256", "0.45985827", "0.45883578", "0.45821294", "0.4571777", "0.45704287", "0.45597315", "0.45562473", "0.45481467", "0.4538372", "0.4537138", "0.4533813", "0.45233905", "0.45177656", "0.4517345", "0.45099825", "0.45043525", "0.45027107", "0.4494935", "0.44940248", "0.44880757", "0.4483612", "0.44816852", "0.4478294", "0.44752643", "0.44715813", "0.4467576", "0.44540235", "0.44519812", "0.4433502", "0.44318023", "0.44291952", "0.44243902", "0.44174668", "0.44141185", "0.44115058", "0.43965808", "0.43868023", "0.4382591", "0.4370714", "0.435647", "0.43498006", "0.43495286", "0.434927", "0.43431276", "0.43414876", "0.4335167", "0.4329757" ]
0.8404121
0
The opcode must be one of the PUT/GET FIELD/STATIC instructions.
public FieldInsnEmitter( int opcode, String owner, String name, String desc ) { check( visitFieldInsnSet, opcode ) ; this.opcode = opcode ; this.owner = owner ; this.name = name ; this.desc = desc ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void interceptPutField(int opcode, String owner, String name, String desc) {\n FieldDefinition fieldDefn = classDefn.managedFields.get(name);\n if (fieldDefn != null && !isCurrentMethodAccessorOfField(name)) {\n if (fieldDefn.isCollection() && (fieldDefn.isEntity() || fieldDefn.isEmbedded())) {\n super.visitFieldInsn(opcode, owner, name, desc);\n return;\n }\n char[] field = name.toCharArray();\n field[0] = Character.toUpperCase(field[0]);\n String getterMethodName = \"get\" + String.valueOf(field);\n String getterMethodDesc = \"()\" + desc;\n \n /* inject preSet before PUTFIELD and postSet after PUTFIELD\n */ \n // at this point stack has (..., [this], [fieldX]) which is ready for PUTFIELD \n // push [this]\n mv.visitVarInsn(ALOAD, 0);\n // stack has (..., [this], [fieldX], [this])\n mv.visitInsn(DUP2);\n // stack has (..., [this], [fieldX], [this], [fieldX], [this])\n // push \"fieldX\"\n mv.visitLdcInsn(name);\n // stack has (..., [this], [fieldX], [this], [fieldX], [this], \"fieldX\")\n mv.visitInsn(DUP_X2);\n // stack has (..., [this], [fieldX], [this], \"fieldX\", [fieldX], [this], \"fieldX\")\n // pop \n mv.visitInsn(POP);\n // stack has (..., [this], [fieldX], [this], \"fieldX\", [fieldX], [this])\n // invoke getFieldX()\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, getterMethodName, getterMethodDesc);\n // stack has (..., [this], [fieldX], [this], \"fieldX\", [fieldX], getFieldX())\n mv.visitInsn(SWAP);\n // stack has (..., [this], [fieldX], [this], \"fieldX\", getFieldX(), [fieldX])\n if (fieldDefn.isEntity()) {\n // invoke preSet(\"fieldX\", getFieldX(), [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preSetMethodName, preSetMethodDesc);\n } else if (fieldDefn.isEmbedded()) {\n // invoke preSetEmbedded(\"fieldX\", getFieldX(), [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preSetEmbeddedMethodName, preSetEmbeddedMethodDesc);\n } else if (fieldDefn.isBasic()) {\n // invoke preSetBasic(\"fieldX\", getFieldX(), [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preSetBasicMethodName, preSetBasicMethodDesc);\n } else {\n // invoke preSetAmbiguous(\"fieldX\", getFieldX(), [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preSetAmbiguousMethodName, preSetAmbiguousMethodDesc);\n }\n // stack has (..., [this], [fieldX], preSet())\n // DUP IRETURN value of preSet() beneath third word\n mv.visitInsn(DUP_X2);\n // stack has (..., preSet(), [this], [fieldX], preSet())\n mv.visitInsn(POP);\n // stack has (..., preSet(), [this], [fieldX])\n mv.visitInsn(DUP_X2);\n // stack has (..., [fieldX], preSet(), [this], [fieldX])\n \n // PUTFIELD in [this].[fieldX]\n super.visitFieldInsn(opcode, owner, name, desc);\n // stack has (..., [fieldX], preSet())\n \n /* inject postSet after PUTFIELD\n if (IRETURN value of preSet() is false && [this].[fieldX] == [fieldX])\n postSet...\n */\n Label label1 = new Label();\n // stack has (..., [fieldX], preSet())\n // if true goto label, there is not change by PUTFIELD\n mv.visitJumpInsn(IFGT, label1);\n // stack has (..., [fieldX])\n mv.visitInsn(DUP);\n // stack has (..., [fieldX], [fieldX])\n // push [this]\n mv.visitVarInsn(ALOAD, 0); \n // stack has (..., [fieldX], [fieldX], [this])\n // get [this].[fieldX]\n mv.visitFieldInsn(GETFIELD, classDefn.internalClassName, name, desc);\n // stack has (..., [fieldX], [fieldX], [this].[fieldX])\n // if ([this].[fieldX] == [fieldX])\n mv.visitJumpInsn(IF_ACMPNE, label1); // jump if !=\n // stack has (..., [fieldX])\n // push [this]\n mv.visitVarInsn(ALOAD, 0);\n // stack has (..., [fieldX], [this])\n mv.visitInsn(SWAP);\n // stack has (..., [this], [fieldX])\n // push \"fieldX\"\n mv.visitLdcInsn(name);\n // stack has (..., [this], [fieldX], \"fieldX\")\n mv.visitInsn(SWAP);\n // stack has (..., [this], \"fieldX\", [fieldX])\n if (fieldDefn.isEntity()) {\n // stack has (..., [this], \"fieldX\", [fieldX])\n mv.visitInsn(POP);\n // stack has (..., [this], \"fieldX\") \n // invoke postSet(\"fieldX\")\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n postSetMethodName, postSetMethodDesc);\n // stack has (...)\n } else if (fieldDefn.isEmbedded()) {\n // stack has (..., [this], \"fieldX\", [fieldX])\n // invoke postSetEmbedded(\"fieldX\", [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n postSetEmbeddedMethodName, postSetEmbeddedMethodDesc);\n // stack has (...)\n } else if (fieldDefn.isBasic()) {\n // stack has (..., [this], \"fieldX\", [fieldX])\n // invoke postSetBasic(\"fieldX\", [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n postSetBasicMethodName, postSetBasicMethodDesc);\n // stack has (...)\n } else {\n // stack has (..., [this], \"fieldX\", [fieldX])\n // invoke postSetAmbiguous(\"fieldX\", [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n postSetAmbiguousMethodName, postSetAmbiguousMethodDesc);\n // stack has (...)\n }\n Label label2 = new Label();\n mv.visitJumpInsn(GOTO, label2);\n // label1:\n mv.visitLabel(label1);\n // stack has (..., [fieldX])\n mv.visitInsn(POP);\n // stack has (...)\n // label2:\n mv.visitLabel(label2);\n // stack has (...)\n\n // Frame TODO\n // mv.visitFrame(F_SAME, 0, null, 0, null);\n if (oprandStackIncrement < 9) {\n oprandStackIncrement = 9;\n }\n return;\n }\n super.visitFieldInsn(opcode, owner, name, desc);\n }", "public void setOpcode(short op);", "public void setOpcode(final int opcode) {\n this.opcode = opcode;\n }", "public void putStatic(String desc, String owner, String name, int opcode, int ID, int SID, int index)\n\t{\n\t mv.visitFieldInsn(opcode, owner, name, desc); // putstatic \n logFieldAccess(desc, ID, SID, index); \n\t}", "@Override\n\tpublic int getOpcode() {\n\t\treturn 0;\n\t}", "public void setOpcode(int val);", "public void visitPutfield(Quad obj) {\n if (TRACE_INTRA) out.println(\"Visiting: \"+obj);\n Operand base_op = Putfield.getBase(obj);\n Operand val_op = Putfield.getSrc(obj);\n Putfield.getField(obj).resolve();\n jq_Field f = Putfield.getField(obj).getField();\n if (IGNORE_INSTANCE_FIELDS) f = null;\n Object base, val;\n if (val_op instanceof RegisterOperand) {\n Register src_r = ((RegisterOperand)val_op).getRegister();\n val = getRegister(src_r);\n Assert._assert(val != null, \"Can't convert \" + src_r);\n } else {\n val = handleConst((ConstOperand) val_op, new QuadProgramLocation(method, obj), 0);\n Assert._assert(val != null, \"Can't convert \" + val_op);\n }\n if (base_op instanceof RegisterOperand) {\n Register base_r = ((RegisterOperand)base_op).getRegister();\n base = getRegister(base_r);\n } else {\n base = handleConst((ConstOperand) base_op, new QuadProgramLocation(method, obj), 1);\n }\n Assert._assert(val != null);\n heapStore(base, val, f);\n }", "void register(Opcode opcode);", "T put(T obj) throws DataElementPutException, RepositoryAccessDeniedException;", "public void visitPutstatic(Quad obj) {\n if (TRACE_INTRA) out.println(\"Visiting: \"+obj);\n Operand val = Putstatic.getSrc(obj);\n Putstatic.getField(obj).resolve();\n jq_Field f = Putstatic.getField(obj).getField();\n if (IGNORE_STATIC_FIELDS) f = null;\n if (val instanceof RegisterOperand) {\n Register src_r = ((RegisterOperand)val).getRegister();\n heapStore(my_global, getRegister(src_r), f);\n } else {\n Node n = handleConst((ConstOperand) val, new QuadProgramLocation(method, obj));\n Assert._assert(n != null); \n heapStore(my_global, n, f);\n }\n }", "public String getOpcode() {\n\t\treturn \"fstoreAO\";\n\t}", "public void setOp(String op) {\n this.op = op;\n }", "public void setOperation(String op) {this.operation = op;}", "public PUT(OperatorDescription description) {\n\t\tsuper(description);\n\t\t// TODO Auto-generated constructor stub\n\t}", "public boolean isPutOrGet() {\r\n return putOrGet;\r\n }", "public void visitPUTSTATIC(PUTSTATIC o){\n\t\tString field_name = o.getFieldName(cpg);\n\t\tJavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());\n\t\tField[] fields = jc.getFields();\n\t\tField f = null;\n\t\tfor (int i=0; i<fields.length; i++){\n\t\t\tif (fields[i].getName().equals(field_name)){\n\t\t\t\tf = fields[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (f == null){\n\t\t\tthrow new AssertionViolatedException(\"Field not found?!?\");\n\t\t}\n\t\tType value = stack().peek();\n\t\tType t = Type.getType(f.getSignature());\n\t\tType shouldbe = t;\n\t\tif (shouldbe == Type.BOOLEAN ||\n\t\t\t\tshouldbe == Type.BYTE ||\n\t\t\t\tshouldbe == Type.CHAR ||\n\t\t\t\tshouldbe == Type.SHORT){\n\t\t\tshouldbe = Type.INT;\n\t\t}\n\t\tif (t instanceof ReferenceType){\n\t\t\tReferenceType rvalue = null;\n\t\t\tif (value instanceof ReferenceType){\n\t\t\t\trvalue = (ReferenceType) value;\n\t\t\t\treferenceTypeIsInitialized(o, rvalue);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of a reference type as expected.\");\n\t\t\t}\n\t\t\t// TODO: This can possibly only be checked using Staerk-et-al's \"set-of-object types\", not\n\t\t\t// using \"wider cast object types\" created during verification.\n\t\t\t// Comment it out if you encounter problems. See also the analogon at visitPUTFIELD.\n\t\t\tif (!(rvalue.isAssignmentCompatibleWith(shouldbe))){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not assignment compatible with '\"+shouldbe+\"'.\");\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (shouldbe != value){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of type '\"+shouldbe+\"' as expected.\");\n\t\t\t}\n\t\t}\n\t\t// TODO: Interface fields may be assigned to only once. (Hard to implement in\n\t\t// JustIce's execution model). This may only happen in <clinit>, see Pass 3a.\n\t}", "public void put(Object key, Object value) throws AspException\n {\n throw new AspReadOnlyException(\"Request.QueryString\");\n }", "public void put(Object key, Object value) throws AspException\n {\n throw new AspReadOnlyException(\"Request\");\n }", "@Override\n public void visitFieldInsn(int opcode, String owner, String name, String desc) {\n // GETFIELD I,F,L,D + B,S\n if ((opcode == Opcodes.GETFIELD)) {\n if (desc.equals(\"I\")) {\n if (this.shouldMutate(\"Incremented (++a) integer field \" + name)) {\n mv.visitInsn(Opcodes.DUP); // stack = .. [ref] [ref]\n mv.visitFieldInsn(opcode, owner, name, desc); // stack = ... [ref] [ref.field]\n mv.visitInsn(Opcodes.ICONST_1); // stack = ... [ref] [ref.field] [1]\n mv.visitInsn(Opcodes.IADD); // stack = ... [ref] [ref.field + 1]\n mv.visitInsn(Opcodes.DUP_X1); // stack = ... [ref.field +1] [ref] [ref.field +1]\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); // stack = ... [ref.field +1]\n return;\n }\n }\n if (desc.equals(\"F\")) {\n if (this.shouldMutate(\"Incremented (++a) float field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.FCONST_1);\n mv.visitInsn(Opcodes.FADD);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"J\")) {\n if (this.shouldMutate(\"Incremented (++a) long field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.LCONST_1);\n mv.visitInsn(Opcodes.LADD);\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"D\")) {\n if (this.shouldMutate(\"Incremented (++a) double field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.DCONST_1);\n mv.visitInsn(Opcodes.DADD);\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"B\")) {\n if (this.shouldMutate(\"Incremented (++a) byte field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2B);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"S\")) {\n if (this.shouldMutate(\"Incremented (++a) short field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2S);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n }\n\n // GETSTATIC I,F,L,D + B,S\n if (opcode == Opcodes.GETSTATIC) {\n if (desc.equals(\"I\")) {\n if (this.shouldMutate(\"Incremented (++a) static integer field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"F\")) {\n if (this.shouldMutate(\"Incremented (++a) static float field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.FCONST_1);\n mv.visitInsn(Opcodes.FADD);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"J\")) {\n if (this.shouldMutate(\"Incremented (++a) static long field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.LCONST_1);\n mv.visitInsn(Opcodes.LADD);\n mv.visitInsn(Opcodes.DUP2);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"D\")) {\n if (this.shouldMutate(\"Incremented (++a) static double field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.DCONST_1);\n mv.visitInsn(Opcodes.DADD);\n mv.visitInsn(Opcodes.DUP2);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"B\")) {\n if (this.shouldMutate(\"Incremented (++a) static byte field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2B);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"S\")) {\n if (this.shouldMutate(\"Incremented (++a) static short field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2S);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n }\n mv.visitFieldInsn(opcode, owner, name, desc);\n }", "void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "HttpPut putRequest(HttpServletRequest request, String address) throws IOException;", "public int getOpcode();", "public void setOp(int op) {\n\t\tthis.op = op;\n\t}", "public void send(Opcode opcode);", "public void visitPUTFIELD(PUTFIELD o){\n\n\t\tType objectref = stack().peek(1);\n\t\tif (! ( (objectref instanceof ObjectType) || (objectref == Type.NULL) ) ){\n\t\t\tconstraintViolated(o, \"Stack next-to-top should be an object reference that's not an array reference, but is '\"+objectref+\"'.\");\n\t\t}\n\t\t\n\t\tString field_name = o.getFieldName(cpg);\n\t\t\n\t\tJavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());\n\t\tField[] fields = jc.getFields();\n\t\tField f = null;\n\t\tfor (int i=0; i<fields.length; i++){\n\t\t\tif (fields[i].getName().equals(field_name)){\n\t\t\t\tf = fields[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (f == null){\n\t\t\tthrow new AssertionViolatedException(\"Field not found?!?\");\n\t\t}\n\n\t\tType value = stack().peek();\n\t\tType t = Type.getType(f.getSignature());\n\t\tType shouldbe = t;\n\t\tif (shouldbe == Type.BOOLEAN ||\n\t\t\t\tshouldbe == Type.BYTE ||\n\t\t\t\tshouldbe == Type.CHAR ||\n\t\t\t\tshouldbe == Type.SHORT){\n\t\t\tshouldbe = Type.INT;\n\t\t}\n\t\tif (t instanceof ReferenceType){\n\t\t\tReferenceType rvalue = null;\n\t\t\tif (value instanceof ReferenceType){\n\t\t\t\trvalue = (ReferenceType) value;\n\t\t\t\treferenceTypeIsInitialized(o, rvalue);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of a reference type as expected.\");\n\t\t\t}\n\t\t\t// TODO: This can possibly only be checked using Staerk-et-al's \"set-of-object types\", not\n\t\t\t// using \"wider cast object types\" created during verification.\n\t\t\t// Comment it out if you encounter problems. See also the analogon at visitPUTSTATIC.\n\t\t\tif (!(rvalue.isAssignmentCompatibleWith(shouldbe))){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not assignment compatible with '\"+shouldbe+\"'.\");\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (shouldbe != value){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of type '\"+shouldbe+\"' as expected.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (f.isProtected()){\n\t\t\tObjectType classtype = o.getClassType(cpg);\n\t\t\tObjectType curr = new ObjectType(mg.getClassName());\n\n\t\t\tif (\tclasstype.equals(curr) ||\n\t\t\t\t\t\tcurr.subclassOf(classtype)\t){\n\t\t\t\tType tp = stack().peek(1);\n\t\t\t\tif (tp == Type.NULL){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (! (tp instanceof ObjectType) ){\n\t\t\t\t\tconstraintViolated(o, \"The 'objectref' must refer to an object that's not an array. Found instead: '\"+tp+\"'.\");\n\t\t\t\t}\n\t\t\t\tObjectType objreftype = (ObjectType) tp;\n\t\t\t\tif (! ( objreftype.equals(curr) ||\n\t\t\t\t\t\t objreftype.subclassOf(curr) ) ){\n\t\t\t\t\tconstraintViolated(o, \"The referenced field has the ACC_PROTECTED modifier, and it's a member of the current class or a superclass of the current class. However, the referenced object type '\"+stack().peek()+\"' is not the current class or a subclass of the current class.\");\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\n\t\t// TODO: Could go into Pass 3a.\n\t\tif (f.isStatic()){\n\t\t\tconstraintViolated(o, \"Referenced field '\"+f+\"' is static which it shouldn't be.\");\n\t\t}\n\t}", "@Override\n\tpublic void doPut(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}", "@Override\n public void visitFieldInsn(int opcode, String owner, String name, String desc) {\n if(!isFinal(owner, name)) {\n if (isFieldRead(opcode)) {\n callBeforeGetField(opcode, owner, name, getClassName(), getMethodName(), getLastLineNumber());\n } else if(isFieldUpdate(opcode)) {\n callBeforeSetField(opcode, owner, name, Type.getType(desc), getClassName(), getMethodName(), getLastLineNumber());\n }\n }\n\n super.visitFieldInsn(opcode, owner, name, desc);\n }", "abstract String getOp();", "public void returnedPutRequest( CellMessage msg , RequestImpl req ){\n // if the request was not successful we have to \n // remove the bfid entry from the database \n // and return the request to EuroGate\n //\n String group = req.getStorageGroup() ;\n String bfid = req.getBfid() ;\n \n if( req.getReturnCode() != 0 ){\n try{\n _dataBase.removeBitfileId( group , bfid ) ;\n }catch( DatabaseException dbe ){\n esay( \"Couldn't remove bfid from database : \"+bfid ) ;\n } \n return ;\n }\n //\n // update the database entry\n //\n try{\n BitfileId bitfileid = _dataBase.getBitfileId( group , bfid ) ;\n bitfileid.setMode(\"persistent\") ;\n bitfileid.setPosition( req.getPosition() ) ;\n bitfileid.setVolume( req.getVolume() ) ;\n _dataBase.storeBitfileId( group , bitfileid ) ;\n }catch( DatabaseException dbe ){\n esay( \"storeBitfileId : \"+dbe ) ;\n req.setReturnValue( dbe.getCode() , dbe.getMessage() ) ;\n }\n \n }", "org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation getOperation();", "public void setOp(Operator op) {\n this.op = op;\n }", "public void setOperation (String Operation);", "public void setPutOrGet(boolean value) {\r\n this.putOrGet = value;\r\n }", "public interface Opcodes\n{\n // Fields\n\n public static final int OP_NOP = 0;\n\n public static final int OP_MOVE = 1;\n\n public static final int OP_MOVE_FROM16 = 2;\n\n public static final int OP_MOVE_16 = 3;\n\n public static final int OP_MOVE_WIDE = 4;\n\n public static final int OP_MOVE_WIDE_FROM16 = 5;\n\n public static final int OP_MOVE_WIDE_16 = 6;\n\n public static final int OP_MOVE_OBJECT = 7;\n\n public static final int OP_MOVE_OBJECT_FROM16 = 8;\n\n public static final int OP_MOVE_OBJECT_16 = 9;\n\n public static final int OP_MOVE_RESULT = 10;\n\n public static final int OP_MOVE_RESULT_WIDE = 11;\n\n public static final int OP_MOVE_RESULT_OBJECT = 12;\n\n public static final int OP_MOVE_EXCEPTION = 13;\n\n public static final int OP_RETURN_VOID = 14;\n\n public static final int OP_RETURN = 15;\n\n public static final int OP_RETURN_WIDE = 16;\n\n public static final int OP_RETURN_OBJECT = 17;\n\n public static final int OP_CONST_4 = 18;\n\n public static final int OP_CONST_16 = 19;\n\n public static final int OP_CONST = 20;\n\n public static final int OP_CONST_HIGH16 = 21;\n\n public static final int OP_CONST_WIDE_16 = 22;\n\n public static final int OP_CONST_WIDE_32 = 23;\n\n public static final int OP_CONST_WIDE = 24;\n\n public static final int OP_CONST_WIDE_HIGH16 = 25;\n\n public static final int OP_CONST_STRING = 26;\n\n public static final int OP_CONST_STRING_JUMBO = 27;\n\n public static final int OP_CONST_CLASS = 28;\n\n public static final int OP_MONITOR_ENTER = 29;\n\n public static final int OP_MONITOR_EXIT = 30;\n\n public static final int OP_CHECK_CAST = 31;\n\n public static final int OP_INSTANCE_OF = 32;\n\n public static final int OP_ARRAY_LENGTH = 33;\n\n public static final int OP_NEW_INSTANCE = 34;\n\n public static final int OP_NEW_ARRAY = 35;\n\n public static final int OP_FILLED_NEW_ARRAY = 36;\n\n public static final int OP_FILLED_NEW_ARRAY_RANGE = 37;\n\n public static final int OP_FILL_ARRAY_DATA = 38;\n\n public static final int OP_THROW = 39;\n\n public static final int OP_GOTO = 40;\n\n public static final int OP_GOTO_16 = 41;\n\n public static final int OP_GOTO_32 = 42;\n\n public static final int OP_PACKED_SWITCH = 43;\n\n public static final int OP_SPARSE_SWITCH = 44;\n\n public static final int OP_CMPL_FLOAT = 45;\n\n public static final int OP_CMPG_FLOAT = 46;\n\n public static final int OP_CMPL_DOUBLE = 47;\n\n public static final int OP_CMPG_DOUBLE = 48;\n\n public static final int OP_CMP_LONG = 49;\n\n public static final int OP_IF_EQ = 50;\n\n public static final int OP_IF_NE = 51;\n\n public static final int OP_IF_LT = 52;\n\n public static final int OP_IF_GE = 53;\n\n public static final int OP_IF_GT = 54;\n\n public static final int OP_IF_LE = 55;\n\n public static final int OP_IF_EQZ = 56;\n\n public static final int OP_IF_NEZ = 57;\n\n public static final int OP_IF_LTZ = 58;\n\n public static final int OP_IF_GEZ = 59;\n\n public static final int OP_IF_GTZ = 60;\n\n public static final int OP_IF_LEZ = 61;\n\n public static final int OP_AGET = 68;\n\n public static final int OP_AGET_WIDE = 69;\n\n public static final int OP_AGET_OBJECT = 70;\n\n public static final int OP_AGET_BOOLEAN = 71;\n\n public static final int OP_AGET_BYTE = 72;\n\n public static final int OP_AGET_CHAR = 73;\n\n public static final int OP_AGET_SHORT = 74;\n\n public static final int OP_APUT = 75;\n\n public static final int OP_APUT_WIDE = 76;\n\n public static final int OP_APUT_OBJECT = 77;\n\n public static final int OP_APUT_BOOLEAN = 78;\n\n public static final int OP_APUT_BYTE = 79;\n\n public static final int OP_APUT_CHAR = 80;\n\n public static final int OP_APUT_SHORT = 81;\n\n public static final int OP_IGET = 82;\n\n public static final int OP_IGET_WIDE = 83;\n\n public static final int OP_IGET_OBJECT = 84;\n\n public static final int OP_IGET_BOOLEAN = 85;\n\n public static final int OP_IGET_BYTE = 86;\n\n public static final int OP_IGET_CHAR = 87;\n\n public static final int OP_IGET_SHORT = 88;\n\n public static final int OP_IPUT = 89;\n\n public static final int OP_IPUT_WIDE = 90;\n\n public static final int OP_IPUT_OBJECT = 91;\n\n public static final int OP_IPUT_BOOLEAN = 92;\n\n public static final int OP_IPUT_BYTE = 93;\n\n public static final int OP_IPUT_CHAR = 94;\n\n public static final int OP_IPUT_SHORT = 95;\n\n public static final int OP_SGET = 96;\n\n public static final int OP_SGET_WIDE = 97;\n\n public static final int OP_SGET_OBJECT = 98;\n\n public static final int OP_SGET_BOOLEAN = 99;\n\n public static final int OP_SGET_BYTE = 100;\n\n public static final int OP_SGET_CHAR = 101;\n\n public static final int OP_SGET_SHORT = 102;\n\n public static final int OP_SPUT = 103;\n\n public static final int OP_SPUT_WIDE = 104;\n\n public static final int OP_SPUT_OBJECT = 105;\n\n public static final int OP_SPUT_BOOLEAN = 106;\n\n public static final int OP_SPUT_BYTE = 107;\n\n public static final int OP_SPUT_CHAR = 108;\n\n public static final int OP_SPUT_SHORT = 109;\n\n public static final int OP_INVOKE_VIRTUAL = 110;\n\n public static final int OP_INVOKE_SUPER = 111;\n\n public static final int OP_INVOKE_DIRECT = 112;\n\n public static final int OP_INVOKE_STATIC = 113;\n\n public static final int OP_INVOKE_INTERFACE = 114;\n\n public static final int OP_INVOKE_VIRTUAL_RANGE = 116;\n\n public static final int OP_INVOKE_SUPER_RANGE = 117;\n\n public static final int OP_INVOKE_DIRECT_RANGE = 118;\n\n public static final int OP_INVOKE_STATIC_RANGE = 119;\n\n public static final int OP_INVOKE_INTERFACE_RANGE = 120;\n\n public static final int OP_NEG_INT = 123;\n\n public static final int OP_NOT_INT = 124;\n\n public static final int OP_NEG_LONG = 125;\n\n public static final int OP_NOT_LONG = 126;\n\n public static final int OP_NEG_FLOAT = 127;\n\n public static final int OP_NEG_DOUBLE = 128;\n\n public static final int OP_INT_TO_LONG = 129;\n\n public static final int OP_INT_TO_FLOAT = 130;\n\n public static final int OP_INT_TO_DOUBLE = 131;\n\n public static final int OP_LONG_TO_INT = 132;\n\n public static final int OP_LONG_TO_FLOAT = 133;\n\n public static final int OP_LONG_TO_DOUBLE = 134;\n\n public static final int OP_FLOAT_TO_INT = 135;\n\n public static final int OP_FLOAT_TO_LONG = 136;\n\n public static final int OP_FLOAT_TO_DOUBLE = 137;\n\n public static final int OP_DOUBLE_TO_INT = 138;\n\n public static final int OP_DOUBLE_TO_LONG = 139;\n\n public static final int OP_DOUBLE_TO_FLOAT = 140;\n\n public static final int OP_INT_TO_BYTE = 141;\n\n public static final int OP_INT_TO_CHAR = 142;\n\n public static final int OP_INT_TO_SHORT = 143;\n\n public static final int OP_ADD_INT = 144;\n\n public static final int OP_SUB_INT = 145;\n\n public static final int OP_MUL_INT = 146;\n\n public static final int OP_DIV_INT = 147;\n\n public static final int OP_REM_INT = 148;\n\n public static final int OP_AND_INT = 149;\n\n public static final int OP_OR_INT = 150;\n\n public static final int OP_XOR_INT = 151;\n\n public static final int OP_SHL_INT = 152;\n\n public static final int OP_SHR_INT = 153;\n\n public static final int OP_USHR_INT = 154;\n\n public static final int OP_ADD_LONG = 155;\n\n public static final int OP_SUB_LONG = 156;\n\n public static final int OP_MUL_LONG = 157;\n\n public static final int OP_DIV_LONG = 158;\n\n public static final int OP_REM_LONG = 159;\n\n public static final int OP_AND_LONG = 160;\n\n public static final int OP_OR_LONG = 161;\n\n public static final int OP_XOR_LONG = 162;\n\n public static final int OP_SHL_LONG = 163;\n\n public static final int OP_SHR_LONG = 164;\n\n public static final int OP_USHR_LONG = 165;\n\n public static final int OP_ADD_FLOAT = 166;\n\n public static final int OP_SUB_FLOAT = 167;\n\n public static final int OP_MUL_FLOAT = 168;\n\n public static final int OP_DIV_FLOAT = 169;\n\n public static final int OP_REM_FLOAT = 170;\n\n public static final int OP_ADD_DOUBLE = 171;\n\n public static final int OP_SUB_DOUBLE = 172;\n\n public static final int OP_MUL_DOUBLE = 173;\n\n public static final int OP_DIV_DOUBLE = 174;\n\n public static final int OP_REM_DOUBLE = 175;\n\n public static final int OP_ADD_INT_2ADDR = 176;\n\n public static final int OP_SUB_INT_2ADDR = 177;\n\n public static final int OP_MUL_INT_2ADDR = 178;\n\n public static final int OP_DIV_INT_2ADDR = 179;\n\n public static final int OP_REM_INT_2ADDR = 180;\n\n public static final int OP_AND_INT_2ADDR = 181;\n\n public static final int OP_OR_INT_2ADDR = 182;\n\n public static final int OP_XOR_INT_2ADDR = 183;\n\n public static final int OP_SHL_INT_2ADDR = 184;\n\n public static final int OP_SHR_INT_2ADDR = 185;\n\n public static final int OP_USHR_INT_2ADDR = 186;\n\n public static final int OP_ADD_LONG_2ADDR = 187;\n\n public static final int OP_SUB_LONG_2ADDR = 188;\n\n public static final int OP_MUL_LONG_2ADDR = 189;\n\n public static final int OP_DIV_LONG_2ADDR = 190;\n\n public static final int OP_REM_LONG_2ADDR = 191;\n\n public static final int OP_AND_LONG_2ADDR = 192;\n\n public static final int OP_OR_LONG_2ADDR = 193;\n\n public static final int OP_XOR_LONG_2ADDR = 194;\n\n public static final int OP_SHL_LONG_2ADDR = 195;\n\n public static final int OP_SHR_LONG_2ADDR = 196;\n\n public static final int OP_USHR_LONG_2ADDR = 197;\n\n public static final int OP_ADD_FLOAT_2ADDR = 198;\n\n public static final int OP_SUB_FLOAT_2ADDR = 199;\n\n public static final int OP_MUL_FLOAT_2ADDR = 200;\n\n public static final int OP_DIV_FLOAT_2ADDR = 201;\n\n public static final int OP_REM_FLOAT_2ADDR = 202;\n\n public static final int OP_ADD_DOUBLE_2ADDR = 203;\n\n public static final int OP_SUB_DOUBLE_2ADDR = 204;\n\n public static final int OP_MUL_DOUBLE_2ADDR = 205;\n\n public static final int OP_DIV_DOUBLE_2ADDR = 206;\n\n public static final int OP_REM_DOUBLE_2ADDR = 207;\n\n public static final int OP_ADD_INT_LIT16 = 208;\n\n public static final int OP_RSUB_INT = 209;\n\n public static final int OP_MUL_INT_LIT16 = 210;\n\n public static final int OP_DIV_INT_LIT16 = 211;\n\n public static final int OP_REM_INT_LIT16 = 212;\n\n public static final int OP_AND_INT_LIT16 = 213;\n\n public static final int OP_OR_INT_LIT16 = 214;\n\n public static final int OP_XOR_INT_LIT16 = 215;\n\n public static final int OP_ADD_INT_LIT8 = 216;\n\n public static final int OP_RSUB_INT_LIT8 = 217;\n\n public static final int OP_MUL_INT_LIT8 = 218;\n\n public static final int OP_DIV_INT_LIT8 = 219;\n\n public static final int OP_REM_INT_LIT8 = 220;\n\n public static final int OP_AND_INT_LIT8 = 221;\n\n public static final int OP_OR_INT_LIT8 = 222;\n\n public static final int OP_XOR_INT_LIT8 = 223;\n\n public static final int OP_SHL_INT_LIT8 = 224;\n\n public static final int OP_SHR_INT_LIT8 = 225;\n\n public static final int OP_USHR_INT_LIT8 = 226;\n\n public static final int OP_CONST_CLASS_JUMBO = 255;\n\n public static final int OP_CHECK_CAST_JUMBO = 511;\n\n public static final int OP_INSTANCE_OF_JUMBO = 767;\n\n public static final int OP_NEW_INSTANCE_JUMBO = 1023;\n\n public static final int OP_NEW_ARRAY_JUMBO = 1279;\n\n public static final int OP_FILLED_NEW_ARRAY_JUMBO = 1535;\n\n public static final int OP_IGET_JUMBO = 1791;\n\n public static final int OP_IGET_WIDE_JUMBO = 2047;\n\n public static final int OP_IGET_OBJECT_JUMBO = 2303;\n\n public static final int OP_IGET_BOOLEAN_JUMBO = 2559;\n\n public static final int OP_IGET_BYTE_JUMBO = 2815;\n\n public static final int OP_IGET_CHAR_JUMBO = 3071;\n\n public static final int OP_IGET_SHORT_JUMBO = 3327;\n\n public static final int OP_IPUT_JUMBO = 3583;\n\n public static final int OP_IPUT_WIDE_JUMBO = 3839;\n\n public static final int OP_IPUT_OBJECT_JUMBO = 4095;\n\n public static final int OP_IPUT_BOOLEAN_JUMBO = 4351;\n\n public static final int OP_IPUT_BYTE_JUMBO = 4607;\n\n public static final int OP_IPUT_CHAR_JUMBO = 4863;\n\n public static final int OP_IPUT_SHORT_JUMBO = 5119;\n\n public static final int OP_SGET_JUMBO = 5375;\n\n public static final int OP_SGET_WIDE_JUMBO = 5631;\n\n public static final int OP_SGET_OBJECT_JUMBO = 5887;\n\n public static final int OP_SGET_BOOLEAN_JUMBO = 6143;\n\n public static final int OP_SGET_BYTE_JUMBO = 6399;\n\n public static final int OP_SGET_CHAR_JUMBO = 6655;\n\n public static final int OP_SGET_SHORT_JUMBO = 6911;\n\n public static final int OP_SPUT_JUMBO = 7167;\n\n public static final int OP_SPUT_WIDE_JUMBO = 7423;\n\n public static final int OP_SPUT_OBJECT_JUMBO = 7679;\n\n public static final int OP_SPUT_BOOLEAN_JUMBO = 7935;\n\n public static final int OP_SPUT_BYTE_JUMBO = 8191;\n\n public static final int OP_SPUT_CHAR_JUMBO = 8447;\n\n public static final int OP_SPUT_SHORT_JUMBO = 8703;\n\n public static final int OP_INVOKE_VIRTUAL_JUMBO = 8959;\n\n public static final int OP_INVOKE_SUPER_JUMBO = 9215;\n\n public static final int OP_INVOKE_DIRECT_JUMBO = 9471;\n\n public static final int OP_INVOKE_STATIC_JUMBO = 9727;\n\n public static final int OP_INVOKE_INTERFACE_JUMBO = 9983;\n\n public static final int OP_IGET_WIDE_VOLATILE = 232;\n\n public static final int OP_IPUT_WIDE_VOLATILE = 233;\n\n public static final int OP_SGET_WIDE_VOLATILE = 234;\n\n public static final int OP_SPUT_WIDE_VOLATILE = 235;\n\n public static final int OP_BREAKPOINT = 236;\n\n public static final int OP_THROW_VERIFICATION_ERROR = 237;\n\n public static final int OP_EXECUTE_INLINE = 238;\n\n public static final int OP_EXECUTE_INLINE_RANGE = 239;\n\n public static final int OP_INVOKE_DIRECT_EMPTY = 240;\n\n public static final int OP_IGET_QUICK = 242;\n\n public static final int OP_IGET_WIDE_QUICK = 243;\n\n public static final int OP_IGET_OBJECT_QUICK = 244;\n\n public static final int OP_IPUT_QUICK = 245;\n\n public static final int OP_IPUT_WIDE_QUICK = 246;\n\n public static final int OP_IPUT_OBJECT_QUICK = 247;\n\n public static final int OP_INVOKE_VIRTUAL_QUICK = 248;\n\n public static final int OP_INVOKE_VIRTUAL_QUICK_RANGE = 249;\n\n public static final int OP_INVOKE_SUPER_QUICK = 250;\n\n public static final int OP_INVOKE_SUPER_QUICK_RANGE = 251;\n\n}", "public void put(Object key, Object value) throws AspException\n {\n throw new AspReadOnlyException(\"Request.Form\");\n }", "public final void mT__40() throws RecognitionException {\n try {\n int _type = T__40;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:40:7: ( 'PUT' )\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:40:9: 'PUT'\n {\n match(\"PUT\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void emit(OpCode opcode){\n\t\t\n\t}", "ISObject put(String key, ISObject stuff) throws UnexpectedIOException;", "public Instruction staticGet(final Integer register, final FieldIdItem field) {\n\t\tfinal Opcode opcode;\n\t\tfinal TypeIdItem type = field.getFieldType();\n\n\t\t// determine the correct opcode from the field type\n\t\tif (TypeUtils.isWide(type)) {\n\t\t\topcode = Opcode.SGET_WIDE;\n\t\t} else if (TypeUtils.isPrimitive(type)) {\n\t\t\tfinal char descriptor = type.getTypeDescriptor().charAt(0);\n\t\t\tswitch (descriptor) {\n\t\t\t\tcase 'Z':\n\t\t\t\t\topcode = Opcode.SGET_BOOLEAN;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'B':\n\t\t\t\t\topcode = Opcode.SGET_BYTE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'C':\n\t\t\t\t\topcode = Opcode.SGET_CHAR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'S':\n\t\t\t\t\topcode = Opcode.SGET_SHORT;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\topcode = Opcode.SGET;\n\t\t\t}\n\t\t} else {\n\t\t\topcode = Opcode.SGET_OBJECT;\n\t\t}\n\n\t\treturn new Instruction21c(opcode, register.shortValue(), field);\n\t}", "private void m5283g(C1070b op) {\n this.f3533c.add(op);\n int i = op.f3539a;\n if (i == 1) {\n this.f3534d.mo7306c(op.f3540b, op.f3542d);\n } else if (i == 2) {\n this.f3534d.mo7304b(op.f3540b, op.f3542d);\n } else if (i == 4) {\n this.f3534d.mo7302a(op.f3540b, op.f3542d, op.f3541c);\n } else if (i == 8) {\n this.f3534d.mo7301a(op.f3540b, op.f3542d);\n } else {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Unknown update op type for \");\n sb.append(op);\n throw new IllegalArgumentException(sb.toString());\n }\n }", "public void put(String opName, EditableWSDLOperation ptOp) {\n/* 76 */ this.portTypeOperations.put(opName, ptOp);\n/* */ }", "public void visitGETSTATIC(GETSTATIC o){\n\t\t// Field must be static: see Pass 3a.\n\t}", "LogicalTableModify.Operation getTableModOp();", "public interface PutValidation {\n}", "public void setOp(String op) {\n this.op = op == null ? null : op.trim();\n }", "public ResponseTranslator put() {\n setMethod(\"PUT\");\n return doRequest();\n }", "public static void showInstruction(){\r\n\t\tSystem.out.println(\"put key value : put operation\");\r\n\t\tSystem.out.println(\"get key : get the value of this key\");\r\n\t\tSystem.out.println(\"delete key : delete this key-value pairs\");\r\n\t}", "public UpdateOperation(){ key = value = null;}", "@Override\n\tpublic boolean canUpdateLiteral(Frame frame, OPCode op) {\n\t\treturn heldObj.canUpdateLiteral(frame, op);\n\t}", "private Transaction.Operation getOperation(HttpServletRequest req){\n return Transaction.Operation.valueOf(req.getParameter(\"action\").toUpperCase());\n }", "private static Instruction create(byte opcode, boolean wide)\n {\n switch (opcode)\n {\n // Simple instructions.\n case InstructionConstants.OP_NOP:\n case InstructionConstants.OP_ACONST_NULL:\n case InstructionConstants.OP_ICONST_M1:\n case InstructionConstants.OP_ICONST_0:\n case InstructionConstants.OP_ICONST_1:\n case InstructionConstants.OP_ICONST_2:\n case InstructionConstants.OP_ICONST_3:\n case InstructionConstants.OP_ICONST_4:\n case InstructionConstants.OP_ICONST_5:\n case InstructionConstants.OP_LCONST_0:\n case InstructionConstants.OP_LCONST_1:\n case InstructionConstants.OP_FCONST_0:\n case InstructionConstants.OP_FCONST_1:\n case InstructionConstants.OP_FCONST_2:\n case InstructionConstants.OP_DCONST_0:\n case InstructionConstants.OP_DCONST_1:\n\n case InstructionConstants.OP_BIPUSH:\n case InstructionConstants.OP_SIPUSH:\n\n case InstructionConstants.OP_IALOAD:\n case InstructionConstants.OP_LALOAD:\n case InstructionConstants.OP_FALOAD:\n case InstructionConstants.OP_DALOAD:\n case InstructionConstants.OP_AALOAD:\n case InstructionConstants.OP_BALOAD:\n case InstructionConstants.OP_CALOAD:\n case InstructionConstants.OP_SALOAD:\n\n case InstructionConstants.OP_IASTORE:\n case InstructionConstants.OP_LASTORE:\n case InstructionConstants.OP_FASTORE:\n case InstructionConstants.OP_DASTORE:\n case InstructionConstants.OP_AASTORE:\n case InstructionConstants.OP_BASTORE:\n case InstructionConstants.OP_CASTORE:\n case InstructionConstants.OP_SASTORE:\n case InstructionConstants.OP_POP:\n case InstructionConstants.OP_POP2:\n case InstructionConstants.OP_DUP:\n case InstructionConstants.OP_DUP_X1:\n case InstructionConstants.OP_DUP_X2:\n case InstructionConstants.OP_DUP2:\n case InstructionConstants.OP_DUP2_X1:\n case InstructionConstants.OP_DUP2_X2:\n case InstructionConstants.OP_SWAP:\n case InstructionConstants.OP_IADD:\n case InstructionConstants.OP_LADD:\n case InstructionConstants.OP_FADD:\n case InstructionConstants.OP_DADD:\n case InstructionConstants.OP_ISUB:\n case InstructionConstants.OP_LSUB:\n case InstructionConstants.OP_FSUB:\n case InstructionConstants.OP_DSUB:\n case InstructionConstants.OP_IMUL:\n case InstructionConstants.OP_LMUL:\n case InstructionConstants.OP_FMUL:\n case InstructionConstants.OP_DMUL:\n case InstructionConstants.OP_IDIV:\n case InstructionConstants.OP_LDIV:\n case InstructionConstants.OP_FDIV:\n case InstructionConstants.OP_DDIV:\n case InstructionConstants.OP_IREM:\n case InstructionConstants.OP_LREM:\n case InstructionConstants.OP_FREM:\n case InstructionConstants.OP_DREM:\n case InstructionConstants.OP_INEG:\n case InstructionConstants.OP_LNEG:\n case InstructionConstants.OP_FNEG:\n case InstructionConstants.OP_DNEG:\n case InstructionConstants.OP_ISHL:\n case InstructionConstants.OP_LSHL:\n case InstructionConstants.OP_ISHR:\n case InstructionConstants.OP_LSHR:\n case InstructionConstants.OP_IUSHR:\n case InstructionConstants.OP_LUSHR:\n case InstructionConstants.OP_IAND:\n case InstructionConstants.OP_LAND:\n case InstructionConstants.OP_IOR:\n case InstructionConstants.OP_LOR:\n case InstructionConstants.OP_IXOR:\n case InstructionConstants.OP_LXOR:\n\n case InstructionConstants.OP_I2L:\n case InstructionConstants.OP_I2F:\n case InstructionConstants.OP_I2D:\n case InstructionConstants.OP_L2I:\n case InstructionConstants.OP_L2F:\n case InstructionConstants.OP_L2D:\n case InstructionConstants.OP_F2I:\n case InstructionConstants.OP_F2L:\n case InstructionConstants.OP_F2D:\n case InstructionConstants.OP_D2I:\n case InstructionConstants.OP_D2L:\n case InstructionConstants.OP_D2F:\n case InstructionConstants.OP_I2B:\n case InstructionConstants.OP_I2C:\n case InstructionConstants.OP_I2S:\n case InstructionConstants.OP_LCMP:\n case InstructionConstants.OP_FCMPL:\n case InstructionConstants.OP_FCMPG:\n case InstructionConstants.OP_DCMPL:\n case InstructionConstants.OP_DCMPG:\n\n case InstructionConstants.OP_IRETURN:\n case InstructionConstants.OP_LRETURN:\n case InstructionConstants.OP_FRETURN:\n case InstructionConstants.OP_DRETURN:\n case InstructionConstants.OP_ARETURN:\n case InstructionConstants.OP_RETURN:\n\n case InstructionConstants.OP_NEWARRAY:\n case InstructionConstants.OP_ARRAYLENGTH:\n case InstructionConstants.OP_ATHROW:\n\n case InstructionConstants.OP_MONITORENTER:\n case InstructionConstants.OP_MONITOREXIT:\n return new SimpleInstruction();\n\n // Instructions with a contant pool index.\n case InstructionConstants.OP_LDC:\n case InstructionConstants.OP_LDC_W:\n case InstructionConstants.OP_LDC2_W:\n\n case InstructionConstants.OP_GETSTATIC:\n case InstructionConstants.OP_PUTSTATIC:\n case InstructionConstants.OP_GETFIELD:\n case InstructionConstants.OP_PUTFIELD:\n\n case InstructionConstants.OP_INVOKEVIRTUAL:\n case InstructionConstants.OP_INVOKESPECIAL:\n case InstructionConstants.OP_INVOKESTATIC:\n case InstructionConstants.OP_INVOKEINTERFACE:\n case InstructionConstants.OP_INVOKEDYNAMIC:\n\n case InstructionConstants.OP_NEW:\n case InstructionConstants.OP_ANEWARRAY:\n case InstructionConstants.OP_CHECKCAST:\n case InstructionConstants.OP_INSTANCEOF:\n case InstructionConstants.OP_MULTIANEWARRAY:\n return new ConstantInstruction();\n\n // Instructions with a local variable index.\n case InstructionConstants.OP_ILOAD:\n case InstructionConstants.OP_LLOAD:\n case InstructionConstants.OP_FLOAD:\n case InstructionConstants.OP_DLOAD:\n case InstructionConstants.OP_ALOAD:\n case InstructionConstants.OP_ILOAD_0:\n case InstructionConstants.OP_ILOAD_1:\n case InstructionConstants.OP_ILOAD_2:\n case InstructionConstants.OP_ILOAD_3:\n case InstructionConstants.OP_LLOAD_0:\n case InstructionConstants.OP_LLOAD_1:\n case InstructionConstants.OP_LLOAD_2:\n case InstructionConstants.OP_LLOAD_3:\n case InstructionConstants.OP_FLOAD_0:\n case InstructionConstants.OP_FLOAD_1:\n case InstructionConstants.OP_FLOAD_2:\n case InstructionConstants.OP_FLOAD_3:\n case InstructionConstants.OP_DLOAD_0:\n case InstructionConstants.OP_DLOAD_1:\n case InstructionConstants.OP_DLOAD_2:\n case InstructionConstants.OP_DLOAD_3:\n case InstructionConstants.OP_ALOAD_0:\n case InstructionConstants.OP_ALOAD_1:\n case InstructionConstants.OP_ALOAD_2:\n case InstructionConstants.OP_ALOAD_3:\n\n case InstructionConstants.OP_ISTORE:\n case InstructionConstants.OP_LSTORE:\n case InstructionConstants.OP_FSTORE:\n case InstructionConstants.OP_DSTORE:\n case InstructionConstants.OP_ASTORE:\n case InstructionConstants.OP_ISTORE_0:\n case InstructionConstants.OP_ISTORE_1:\n case InstructionConstants.OP_ISTORE_2:\n case InstructionConstants.OP_ISTORE_3:\n case InstructionConstants.OP_LSTORE_0:\n case InstructionConstants.OP_LSTORE_1:\n case InstructionConstants.OP_LSTORE_2:\n case InstructionConstants.OP_LSTORE_3:\n case InstructionConstants.OP_FSTORE_0:\n case InstructionConstants.OP_FSTORE_1:\n case InstructionConstants.OP_FSTORE_2:\n case InstructionConstants.OP_FSTORE_3:\n case InstructionConstants.OP_DSTORE_0:\n case InstructionConstants.OP_DSTORE_1:\n case InstructionConstants.OP_DSTORE_2:\n case InstructionConstants.OP_DSTORE_3:\n case InstructionConstants.OP_ASTORE_0:\n case InstructionConstants.OP_ASTORE_1:\n case InstructionConstants.OP_ASTORE_2:\n case InstructionConstants.OP_ASTORE_3:\n\n case InstructionConstants.OP_IINC:\n\n case InstructionConstants.OP_RET:\n return new VariableInstruction(wide);\n\n // Instructions with a branch offset operand.\n case InstructionConstants.OP_IFEQ:\n case InstructionConstants.OP_IFNE:\n case InstructionConstants.OP_IFLT:\n case InstructionConstants.OP_IFGE:\n case InstructionConstants.OP_IFGT:\n case InstructionConstants.OP_IFLE:\n case InstructionConstants.OP_IFICMPEQ:\n case InstructionConstants.OP_IFICMPNE:\n case InstructionConstants.OP_IFICMPLT:\n case InstructionConstants.OP_IFICMPGE:\n case InstructionConstants.OP_IFICMPGT:\n case InstructionConstants.OP_IFICMPLE:\n case InstructionConstants.OP_IFACMPEQ:\n case InstructionConstants.OP_IFACMPNE:\n case InstructionConstants.OP_GOTO:\n case InstructionConstants.OP_JSR:\n\n case InstructionConstants.OP_IFNULL:\n case InstructionConstants.OP_IFNONNULL:\n\n case InstructionConstants.OP_GOTO_W:\n case InstructionConstants.OP_JSR_W:\n return new BranchInstruction();\n\n // The tableswitch instruction.\n case InstructionConstants.OP_TABLESWITCH:\n return new TableSwitchInstruction();\n\n // The lookupswitch instruction.\n case InstructionConstants.OP_LOOKUPSWITCH:\n return new LookUpSwitchInstruction();\n\n default:\n throw new IllegalArgumentException(\"Unknown instruction opcode [\"+opcode+\"]\");\n }\n }", "private int patchAccess(BT_Method bm,BT_InsVector iv,int idx)\n{\n int ctr = 0;\n\n if (patch_type.getPatchLocalAccess() || patch_type.getPatchRemoteAccess()) {\n BT_FieldRefIns fri = (BT_FieldRefIns) iv.elementAt(idx);\n BT_Field fld = fri.getFieldTarget();\n if (fri.opcode == BT_Opcodes.opc_getstatic) {\n\t ctr = patch_type.getInstrumenter().patchStaticAccess(fld,bm,iv,idx);\n }\n else {\n\t ctr = patch_type.getInstrumenter().patchFieldAccess(fld,bm,iv,idx);\n }\n }\n\n patch_delta += ctr;\n\n return ctr;\n}", "public void setValue(Object obj) throws AspException\n {\n throw new AspReadOnlyException(\"Request.QueryString\");\n }", "@Override\n protected void executeLowLevelRequest() {\n doPutItem();\n }", "public void visitGetfield(Quad obj) {\n if (TRACE_INTRA) out.println(\"Visiting: \"+obj);\n Register r = Getfield.getDest(obj).getRegister();\n Operand o = Getfield.getBase(obj);\n Getfield.getField(obj).resolve();\n jq_Field f = Getfield.getField(obj).getField();\n if (IGNORE_INSTANCE_FIELDS) f = null;\n ProgramLocation pl = new QuadProgramLocation(method, obj);\n if (o instanceof RegisterOperand) {\n Register b = ((RegisterOperand)o).getRegister();\n heapLoad(pl, r, b, f);\n } else {\n // base is not a register?!\n Node n = handleConst((ConstOperand) o, pl);\n heapLoad(pl, r, n, f);\n }\n }", "public interface Opcodes {\n\n byte JOIN = 0x1;\n byte LEAVE = 0X2;\n byte MESSAGE = 0x4;\n byte MOVE = 0x5;\n byte ASSIGN = 0x3;\n byte COLOR = 0x6;\n}", "public void send(Opcode opcode, Serializable datum);", "public void interceptGetField(int opcode, String owner, String name, String desc) {\n FieldDefinition fieldDefn = classDefn.managedFields.get(name);\n if (fieldDefn != null && !isCurrentMethodAccessorOfField(name)) {\n /* inject preGet(\"fieldX\") before GETFIELD\n */\n // at this point stack has (..., [object]) which is ready for GETFIELD\n // DUP [object]\n mv.visitInsn(DUP);\n // stack has (..., [object], [object]) \n // push [this]\n mv.visitVarInsn(ALOAD, 0);\n // stack has (..., [object], [object], [this])\n Label label = new Label();\n // if ([object] == [this])\n mv.visitJumpInsn(IF_ACMPNE, label);\n // stack has (..., [this]) because (object == this)\n // DUP [this]\n mv.visitInsn(DUP);\n // stack has (..., [this], [this])\n // push \"fieldX\"\n mv.visitLdcInsn(name);\n // stack has (..., [this], [this], \"fieldX\")\n // invoke preGet(\"fieldX\")\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preGetMethodName, preGetMethodDesc);\n // stack has (..., [this])\n // label:\n mv.visitLabel(label);\n // Frame TODO\n // mv.visitFrame(??, 0, null, 0, null);\n // stack has (..., [object])\n if (oprandStackIncrement < 3) {\n oprandStackIncrement = 3;\n }\n }\n // stack has (..., [object])\n // GETFIELD\n super.visitFieldInsn(opcode, owner, name, desc);\n }", "String getOp();", "String getOp();", "String getOp();", "public boolean hasOperation() {\n return fieldSetFlags()[3];\n }", "public void handlePut( HttpExchange exchange ) throws IOException {\n\n }", "public static InstructionType getType(Opcodes opcode) {\n if (opcode == null) {\n return InstructionType.UNKNOW;\n }\n switch (opcode) {\n case ADD:\n return InstructionType.ATYPE;\n case SUB:\n return InstructionType.ATYPE;\n case BEQ:\n return InstructionType.BTYPE;\n case BNE:\n return InstructionType.BTYPE;\n case LW:\n return InstructionType.MTYPE;\n case SW:\n return InstructionType.MTYPE;\n case JUMP:\n return InstructionType.JTYPE;\n default:\n return InstructionType.UNKNOW;\n }\n }", "protected void send(O operation)\n {\n }", "public boolean addPutRequest( CellMessage msg , RequestImpl req ){\n // assign a new bitfile to this request\n //\n String group = req.getStorageGroup() ;\n String bfid = new Bfid().toString() ;\n long size = req.getFileSize() ;\n req.setBfid( bfid ) ;\n \n say( \"addPutRequest : bfid=\"+bfid+\";group=\"+group+\";size=\"+size ) ;\n \n BitfileId bitfile = new BitfileId( bfid , size ) ;\n bitfile.setParameter( req.getParameter() ) ;\n //\n // store the bitfile into the database\n try{\n _dataBase.storeBitfileId( group , bitfile ) ;\n }catch( DatabaseException dbe ){\n String error = \"StorageGroup not found : \"+group ;\n req.setReturnValue( 11 , error ) ;\n msg.revertDirection() ;\n esay( \"Sending problem : \"+error ) ;\n try{\n sendMessage( msg ) ;\n }catch(Exception ee ){\n esay( \"PANIC : can't return error msg to \"+msg.getDestinationPath() ) ;\n }\n return false ;\n }\n //\n // send the first BB-OK\n //\n CellPath bbReplyPath = (CellPath)msg.getSourceAddress().clone() ;\n bbReplyPath.revert() ;\n try{\n sendMessage( new CellMessage( bbReplyPath , req ) ) ;\n }catch(Exception nrtc ){\n esay( \"Door cell seems to have disappeared\" ) ;\n return false ;\n }\n \n return true ;\n \n }", "public void visitGetstatic(Quad obj) {\n if (TRACE_INTRA) out.println(\"Visiting: \"+obj);\n Register r = Getstatic.getDest(obj).getRegister();\n Getstatic.getField(obj).resolve();\n jq_Field f = Getstatic.getField(obj).getField();\n if (IGNORE_STATIC_FIELDS) f = null;\n ProgramLocation pl = new QuadProgramLocation(method, obj);\n heapLoad(pl, r, my_global, f);\n }", "@PUT\n @Path(\"/update\")\n public void put() {\n System.out.println(\"PUT invoked\");\n }", "public abstract void Put(WriteOptions options, Slice key, Slice value) throws IOException, BadFormatException, DecodeFailedException;", "public void put(Object key, Object value) throws AspException\n {\n throw new AspReadOnlyException(\"Request.ServerVariables\");\n }", "public int getOp() {\n\t\treturn op;\n\t}", "public String getOp() {\n return op;\n }", "public String getOp() {\n return op;\n }", "Request _request(String operation);", "public String getOperation() {return operation;}", "private void addOp(Class op){\n try {\n //Create a new instance and add it to the list\n Operation operation = (Operation)op.newInstance();\n operations.put(operation.getTextualRepresentation(), operation);\n } catch (InstantiationException | IllegalAccessException ex) {\n Logger.getLogger(RPC.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Test\n public void testCantSerializeBodySoftError() throws Exception {\n ThriftRequest<ExampleWithRequiredField> request = new ThriftRequest.Builder<ExampleWithRequiredField>(\"keyvalue-service\", \"KeyValue::setValue\")\n .setBody(new ExampleWithRequiredField())\n .build();\n ByteBuf arg1 = request.getArg1();\n ByteBuf arg2 = request.getArg2();\n ByteBuf arg3 = request.getArg3();\n assertEquals(2, arg2.readableBytes());\n assertEquals(0, arg2.getByte(0));\n assertEquals(0, arg2.getByte(1));\n assertNull(arg3);\n request.release();\n assertEquals(0, arg1.refCnt());\n assertEquals(0, arg2.refCnt());\n\n assertNull(request.getArg1());\n assertNull(request.getArg2());\n assertNull(request.getArg3());\n }", "public void editOperation() {\n\t\t\r\n\t}", "protected void setOpc(int opc) {\n this.opc = opc;\n }", "public Instruction(OpCode op, int o1, int o2, int o3) {\n\t\tthis.op = op;\n\t\tthis.o1 = o1;\n\t\tthis.o2 = o2;\n\t\tthis.o3 = o3;\n\t}", "public Expression staticCheck(Expression expr, int flags)\n {\n Expression e = simpleStaticCheck(expr, flags);\n if(UpdatingExpr.isUpdating(e))\n error(\"XUST0001\", e, \"updating expression is not allowed here\");\n return e;\n }", "@Override\n protected ResourceMethod<WorldMapInput, String> getPutMethod(ResourcePath path) throws ResourceAccessException {\n return createParameterlessMethod(path, ClientSecurityRequirements.PUBLIC, WorldMapInput.class,\n (data, client) -> getWorldMapBase64ImageString(data.getCenter(), data.getMapBlockWidth(), data.getMapBlockLength(), data.isSurface(), client));\n }", "public sparqles.avro.discovery.DGETInfo.Builder setOperation(java.lang.CharSequence value) {\n validate(fields()[1], value);\n this.Operation = value;\n fieldSetFlags()[1] = true;\n return this; \n }", "public RestUtils setMethodPut()\n\t{\n\t\trestMethodDef.setHttpMethod(HttpMethod.PUT);\n\t\treturn this;\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (op == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'op' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public boolean hasOperation() {\n return fieldSetFlags()[1];\n }", "@Override\n\tpublic void put() {\n\t\tSystem.out.println(\"this is put\");\n\t}", "void addInstruction(OpCode opcode, String param) {\n\t\tcode.add(opcode.ordinal());\n\t\tif (param != null) addParam(opcode, param);\n\t}", "public interface Opcodes {\n int T_INT = 10;\n // versions\n // int V1_1 = 3 << 16 | 45;\n // int V1_2 = 0 << 16 | 46;\n // int V1_3 = 0 << 16 | 47;\n // int V1_4 = 0 << 16 | 48;\n int V1_5 = 0 << 16 | 49;\n // int V1_6 = 0 << 16 | 50;\n // int V1_7 = 0 << 16 | 51;\n // access flags\n int ACC_PUBLIC = 0x0001; // class, field, method\n int ACC_SUPER = 0x0020; // class\n // opcodes // visit method (- = idem)\n int ACONST_NULL = 1; // -\n int ICONST_0 = 3; // -\n int ICONST_1 = 4; // -\n int LCONST_0 = 9; // -\n int LCONST_1 = 10; // -\n int FCONST_0 = 11; // -\n int DCONST_0 = 14; // -\n int BIPUSH = 16; // visitIntInsn\n // int SIPUSH = 17; // -\n // int LDC = 18; // visitLdcInsn\n // int LDC_W = 19; // -\n // int LDC2_W = 20; // -\n int ILOAD = 21; // visitVarInsn\n int LLOAD = 22; // -\n int FLOAD = 23; // -\n int DLOAD = 24; // -\n int ALOAD = 25; // -\n int ISTORE = 54; // visitVarInsn\n int LSTORE = 55; // -\n int FSTORE = 56; // -\n int DSTORE = 57; // -\n int ASTORE = 58; // -\n int IASTORE = 79; // visitInsn\n int POP = 87; // -\n // int POP2 = 88; // -\n int DUP = 89; // -\n int IADD = 96; // -\n // int ISUB = 100; // -\n int IAND = 126; // -\n // int LAND = 127; // -\n int IOR = 128; // -\n // int LOR = 129; // -\n // int IXOR = 130; // -\n // int LXOR = 131; // -\n // int IINC = 132; // visitIincInsn\n int LCMP = 148; // -\n int FCMPL = 149; // -\n int DCMPL = 151; // -\n int IFEQ = 153; // visitJumpInsn\n int IFNE = 154; // -\n int IFLE = 158; // -\n int IF_ICMPEQ = 159; // -\n int IF_ICMPNE = 160; // -\n int IF_ICMPLT = 161; // -\n int IF_ICMkgE = 162; // -\n int IF_ICMkgT = 163; // -\n int IF_ACMPEQ = 165; // -\n int IF_ACMPNE = 166; // -\n int GOTO = 167; // -\n int RET = 169; // visitVarInsn\n int ARETURN = 176; // -\n int RETURN = 177; // -\n int GETSTATIC = 178; // visitFieldInsn\n int GETFIELD = 180; // -\n int PUTFIELD = 181; // -\n int INVOKEVIRTUAL = 182; // visitMethodInsn\n int INVOKESPECIAL = 183; // -\n int INVOKESTATIC = 184; // -\n int INVOKEINTERFACE = 185; // -\n // int INVOKEDYNAMIC = 186; // -\n int NEW = 187; // visitTypeInsn\n int NEWARRAY = 188; // visitIntInsn\n // int ANEWARRAY = 189; // visitTypeInsn\n // int ARRAYLENGTH = 190; // visitInsn\n // int ATHROW = 191; // -\n int CHECKCAST = 192; // visitTypeInsn\n int INSTANCEOF = 193;\n int IFNULL = 198; // visitJumpInsn\n int IFNONNULL = 199; // -\n // int GOTO_W = 200; // -\n // int JSR_W = 201; // -\n}", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "public static Instruction create(byte opcode)\n {\n Instruction instruction = create(opcode, false);\n\n instruction.opcode = opcode;\n\n return instruction;\n }", "void doLogicalPut(final L lockID, final Object key, final Object value);", "@Override\n\tpublic void VisitGetFieldNode(GetFieldNode Node) {\n\n\t}", "public java.lang.String getPut() {\n return instance.getPut();\n }", "@Override\r\n\tpublic int getOperationCode() {\n\t\treturn 8;\r\n\t}", "ISObject forceGet(String key);", "public void setOp(boolean value) {}", "public void setValue(Object obj) throws AspException\n {\n throw new AspException(\"Modification of read-only variable\");\n }", "public Instruction instanceGet(final Integer targetRegister, final Integer instanceRegister, final FieldIdItem field) {\n\t\tfinal Opcode opcode;\n\t\tfinal TypeIdItem type = field.getFieldType();\n\n\t\t// determine the correct opcode from the field type\n\t\tif (TypeUtils.isWide(type)) {\n\t\t\topcode = Opcode.IGET_WIDE;\n\t\t} else if (TypeUtils.isPrimitive(type)) {\n\t\t\tfinal char descriptor = type.getTypeDescriptor().charAt(0);\n\t\t\tswitch (descriptor) {\n\t\t\t\tcase 'Z':\n\t\t\t\t\topcode = Opcode.IGET_BOOLEAN;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'B':\n\t\t\t\t\topcode = Opcode.IGET_BYTE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'C':\n\t\t\t\t\topcode = Opcode.IGET_CHAR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'S':\n\t\t\t\t\topcode = Opcode.IGET_SHORT;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\topcode = Opcode.IGET;\n\t\t\t}\n\t\t} else {\n\t\t\topcode = Opcode.IGET_OBJECT;\n\t\t}\n\n\t\treturn new Instruction22c(opcode, targetRegister.byteValue(), instanceRegister.byteValue(), field);\n\t}", "private void parseCommandPut(DataInputStream in) throws IOException {\n int ksize = in.readInt();\n int vsize = in.readInt();\n byte[] key = new byte[ksize];\n in.read(key);\n byte[] value = new byte[vsize];\n in.read(value);\n // int err = \n in.readUnsignedByte(); // unused\n elements = new LinkedHashMap<String, String>(1);\n elements.put(new String(key), new String(value));\n if (LOG.isDebugEnabled()) LOG.debug(\"parseCommandPut: elements -> \" + elements);\n }", "public static boolean handleStaticFieldWrite(Node sf, Node x, Node m) {\n\t\tif(ImmutabilityPreferences.isInferenceRuleLoggingEnabled()){\n\t\t\tString values = \"x:\" + getTypes(x).toString() + \", sf:\" + getTypes(sf).toString() + \", m:\" + getTypes(m).toString();\n\t\t\tLog.info(\"TSWRITE (sf=x in m, sf=\" + sf.getAttr(XCSG.name) + \", x=\" + x.getAttr(XCSG.name) + \", m=\" + m.getAttr(XCSG.name) + \")\\n\" + values);\n\t\t}\n\t\t// a write to a static field means the containing method cannot be pure (readonly or polyread)\n\t\treturn removeTypes(m, ImmutabilityTypes.READONLY, ImmutabilityTypes.POLYREAD);\n\t}" ]
[ "0.59025276", "0.5893527", "0.58394563", "0.5784227", "0.5563663", "0.55122405", "0.54505926", "0.5391738", "0.537547", "0.5340491", "0.5335106", "0.53261614", "0.5299241", "0.52498364", "0.52274483", "0.5195884", "0.517651", "0.5171425", "0.5162475", "0.51260227", "0.5093771", "0.5086436", "0.5083032", "0.5073218", "0.5028485", "0.5008387", "0.5002764", "0.49710706", "0.49628127", "0.49425742", "0.4938315", "0.49276957", "0.4913152", "0.49083328", "0.4903021", "0.4896306", "0.48818547", "0.48585477", "0.48505878", "0.4834991", "0.48304924", "0.48146832", "0.48112124", "0.47747064", "0.47703353", "0.47688666", "0.47634774", "0.47583658", "0.47430512", "0.47374433", "0.4736776", "0.4724479", "0.47065705", "0.4691363", "0.46817204", "0.46719086", "0.46684724", "0.46666023", "0.46650583", "0.46650583", "0.46650583", "0.4658468", "0.46545592", "0.46483713", "0.46283683", "0.46092656", "0.46078154", "0.45877054", "0.45727703", "0.4571657", "0.45709133", "0.45649004", "0.45649004", "0.45605224", "0.45571703", "0.45550743", "0.4554905", "0.4554783", "0.4541097", "0.45405743", "0.45360914", "0.45230955", "0.4520757", "0.45106968", "0.45097747", "0.4505851", "0.44940925", "0.44930735", "0.44837096", "0.44788674", "0.4474741", "0.44730923", "0.44698873", "0.44630256", "0.44609165", "0.44595164", "0.44395602", "0.44249222", "0.44209954", "0.4420967", "0.4398442" ]
0.0
-1
There are several cases here: 1. Local variables. This is the case for MethodGenerator arguments, BlockStatement definitions, catch clause exception variables, nonvoid return holders, and the uncaught exception holder for finally clauses. Here the Variable passed in must already have an attribute named "stackFrameSlot" that holds an Integer that gives the start of the local variables. 2. Nonstatic class data members. Here the parent of the Variable must be a ClassGenerator, and the type information from the ClassGenerator is required in the FieldInsnEmitter. The emitters here use GETFIELD/PUTFIELD. 3. Static class data members. This is just like case 2, but the emitters must use the GETSTATIC/PUTSTATIC opcodes. 4. FieldAccessExpression. 5. ArrayIndexExpression.
private static int getVarInsnOpcode( Type type, boolean isStore ) { if (isStore) { if (!type.isPrimitive()) { return ASTORE ; } else if (type == Type._float()) { return FSTORE ; } else if (type == Type._double()) { return DSTORE ; } else if (type == Type._long()) { return LSTORE ; } else { // must be boolean, byte, char, short, or int. // All of these are handled the same way. return ISTORE ; } } else { if (!type.isPrimitive()) { return ALOAD ; } else if (type == Type._float()) { return FLOAD ; } else if (type == Type._double()) { return DLOAD ; } else if (type == Type._long()) { return LLOAD ; } else { // must be boolean, byte, char, short, or int. // All of these are handled the same way. return ILOAD ; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void enterVariableAssignmentStatement(MiniJavaParser.VariableAssignmentStatementContext ctx) {\n Symbol variable = currentScope.lookup(ctx.Identifier().getText());\n if (variable.isField()) {\n mg.loadThis();\n }\n }", "@Override\n public void visitFieldInsn(int opcode, String owner, String name, String desc) {\n // GETFIELD I,F,L,D + B,S\n if ((opcode == Opcodes.GETFIELD)) {\n if (desc.equals(\"I\")) {\n if (this.shouldMutate(\"Incremented (++a) integer field \" + name)) {\n mv.visitInsn(Opcodes.DUP); // stack = .. [ref] [ref]\n mv.visitFieldInsn(opcode, owner, name, desc); // stack = ... [ref] [ref.field]\n mv.visitInsn(Opcodes.ICONST_1); // stack = ... [ref] [ref.field] [1]\n mv.visitInsn(Opcodes.IADD); // stack = ... [ref] [ref.field + 1]\n mv.visitInsn(Opcodes.DUP_X1); // stack = ... [ref.field +1] [ref] [ref.field +1]\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); // stack = ... [ref.field +1]\n return;\n }\n }\n if (desc.equals(\"F\")) {\n if (this.shouldMutate(\"Incremented (++a) float field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.FCONST_1);\n mv.visitInsn(Opcodes.FADD);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"J\")) {\n if (this.shouldMutate(\"Incremented (++a) long field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.LCONST_1);\n mv.visitInsn(Opcodes.LADD);\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"D\")) {\n if (this.shouldMutate(\"Incremented (++a) double field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.DCONST_1);\n mv.visitInsn(Opcodes.DADD);\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"B\")) {\n if (this.shouldMutate(\"Incremented (++a) byte field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2B);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"S\")) {\n if (this.shouldMutate(\"Incremented (++a) short field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2S);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n }\n\n // GETSTATIC I,F,L,D + B,S\n if (opcode == Opcodes.GETSTATIC) {\n if (desc.equals(\"I\")) {\n if (this.shouldMutate(\"Incremented (++a) static integer field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"F\")) {\n if (this.shouldMutate(\"Incremented (++a) static float field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.FCONST_1);\n mv.visitInsn(Opcodes.FADD);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"J\")) {\n if (this.shouldMutate(\"Incremented (++a) static long field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.LCONST_1);\n mv.visitInsn(Opcodes.LADD);\n mv.visitInsn(Opcodes.DUP2);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"D\")) {\n if (this.shouldMutate(\"Incremented (++a) static double field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.DCONST_1);\n mv.visitInsn(Opcodes.DADD);\n mv.visitInsn(Opcodes.DUP2);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"B\")) {\n if (this.shouldMutate(\"Incremented (++a) static byte field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2B);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"S\")) {\n if (this.shouldMutate(\"Incremented (++a) static short field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2S);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n }\n mv.visitFieldInsn(opcode, owner, name, desc);\n }", "@Override\n public void visitLocalVariable(String name, String descriptor, String signature, Label start, Label end, int index) {\n if(this.preserveDebuggability){\n super.visitLocalVariable(name, descriptor, signature, start, end, index);\n }\n }", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "@Override\n\tpublic void display() {\n\t\tDexUtil qualifiedName = new DexUtil();\n\t\tsuper.display();\n\t\n\t\tint dest = ((OneRegisterInstruction) instruction).getRegisterA();\n\t FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();\n\t \n\t String name= qualifiedName.getQualifiedName(f.getDefiningClass())+\".\"+qualifiedName.getQualifiedName(f.getName());\n\t String type= qualifiedName.getQualifiedName(f.getType());\n\t \n\t \n\t Variable variable=new Variable(null, 0, 0, 0, 0);\n\t \n\t variable.setName(name);\n\t variable.setType(type);\n\t DexMethodDefinition.registerLocals[dest]=variable;\n\t System.out.println(variable.getName());\n\t \n\t}", "public interface TypeContext {\n Type getReturnType();\n\n Type getThisType();\n\n void setThisType(Type thisType);\n\n void setReturnType(Type returnType);\n\n VarRef lookupVar(String varUse);\n\n void putVar(String varName, Type type, NQJVarDecl var);\n\n //\n // CHANGE: Introduce separate field storage to enable field shadowing while\n // disallowing variable shadowing.\n //\n\n /**\n * Gets a reference to a field previous stored to the context.\n *\n * @param fieldUse The name of the field to retrieve.\n * @return A reference to the requested field.\n */\n VarRef lookupField(String fieldUse);\n\n /**\n * Stores a field into the context.\n *\n * @param fieldName The name of the field to store.\n * @param type The type of the field to store.\n * @param field The AST declaration of the field to store.\n */\n void putField(String fieldName, Type type, NQJVarDecl field);\n\n TypeContext copy();\n\n /**\n * Variable declaration and type wrapper class.\n */\n class VarRef {\n final NQJVarDecl decl;\n final Type type;\n\n public VarRef(Type type, NQJVarDecl decl) {\n this.decl = decl;\n this.type = type;\n }\n }\n}", "@Override public void visitFrame(\n int type,\n int nLocal,\n Object[] local,\n int nStack,\n Object[] stack) {}", "public Variable[] getLocals();", "public LocalDebugInfo[] locals();", "public String visit(VarDeclaration n, String ourclass) {\n String type, name;\n type = n.f0.accept(this, null);\n name = n.f1.accept(this, null);\n if(!ourclass.contains(\" \")){ //class members variables\n vcounter ++;\n integer++;\n variable x = new variable(type, name, vcounter, integer);\n ClassMembers cm = st.cmgetST(ourclass);\n if(cm.checkSameVar(x)){\n System.out.println(\"Variable already exists\");\n return null;\n }\n cm.var.add(x);\n st.cmputST(ourclass, cm);\n }\n else{ //method's variables\n integer++;\n variable x = new variable(type, name, integer);\n String[] parts = ourclass.split(\" \");\n String classname = parts[0]; \n String methodname = parts[1];\n ClassMembers cm=st.cmgetST(classname);\n Method m=cm.meth.get(methodname);\n m.localvars.add(x);\n cm.meth.put(methodname, m);\n st.cmputST(classname, cm);\n }\n return null; \n }", "@Override\n public String generate() {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + variableSymbol + \" = alloca \" + variableLLVMType + \"\\n\";\n }", "Variable getSourceVariable();", "public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }", "public Snippet visit(MethodDeclaration n, Snippet argu) {\n\t\t Snippet _ret=null;\n\t\t\ttPlasmaCode = \"\";\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.returnType.accept(this, argu);\n\t String tempString = \"\";\n\t\t\tif(f2 != null){\n\t\t\t\t//System.out.println(\" \"+f2.expType+\" \"+f2.returnTemp);\n\t\t\t\ttempString = f2.expType.typeName;\n\t\t\t}else{\n\t\t\t\ttempString = \"void \";\n\t\t\t}\n\t Snippet f3 = n.identifier.accept(this, argu);\n\t String methodName = f3.expType.getTypeName();\n\t memberSig = new MethodSignature();\n\t\t\tmemberSig.methodName = methodName;\n\t\t\tcurrentMethod = currentClass.methods.get(methodName);\n\t\t\t\n\t\t\t\n\t\t\ttempCounter = tempZero;\n\t\t\tblockId = 1;\n\t\t\tcurrentBlock = 1;\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f5 = n.nodeOptional.accept(this, argu);\n\t // n.nodeToken3.accept(this, argu);\n\t memberSig = null;\n\t\t\tblockId = 0;\n\t\t\tcurrentBlock = 0;\n\t\t\t\n\t\t\tString tempFormal = \"\";\n\t\t\tif(f5 != null){\n\t\t\t\ttempFormal = f5.returnTemp+\",\";\n\t\t\t}else{\n\t\t\t\ttempFormal = \"\";\n\t\t\t}\n\t\t\t\n\t\t\ttempString+=\" \"+methodName+\" \"+\"( \"+tempFormal+\" int myUniquePlacePoint)\";\n\t\t\t\n\t\t\ttPlasmaCode += \"public static \"+tempString+\"\\n\";\n\t\t\t//String placeCheckString = \"final HashMap<Integer, HashSet<Integer>> globalPointerHashMap = new final HashMap<Integer, HashSet<Integer>>(4)\";\n\t\t\t//placeCheckString += \"final int maxPlaces = 4; \\n for(int i =0; i <maxPlaces; ++i){globalPointerHashMap.put(i, new HashSet<Integer>());}\";\n\t\t\tn.block.accept(this, argu);\n\t currentClassBody.methods += tPlasmaCode;\n\t\t\ttPlasmaCode = \"\";\n\t return _ret;\n\t }", "@Override\r\n\tpublic void visit(VariableDeclaration variableDeclaration) {\n\r\n\t}", "public Arginfo visit(VarDeclaration n, Arginfo argu) {\n Arginfo _ret=null;\n \n \n \n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n \n if(!argu.methodname.equals(\"\")){\n \t globalmap.put(n.f1.f0.tokenImage,prectr++);\n }\n \n return _ret;\n }", "public interface StackFrame {\n\t/**\n\t * Indicator for a Stack that grows negatively.\n\t */\n\tpublic final static int GROWS_NEGATIVE = -1;\n\t/**\n\t * Indicator for a Stack that grows positively.\n\t */\n\tpublic final static int GROWS_POSITIVE = 1;\n\t/**\n\t * Indicator for a unknown stack parameter offset\n\t */\n\tpublic static final int UNKNOWN_PARAM_OFFSET = (128 * 1024);\n\n\t/**\n\t * Get the function that this stack belongs to.\n\t * This could return null if the stack frame isn't part of a function.\n\t *\n\t * @return the function\n\t */\n\tpublic Function getFunction();\n\n\t/**\n\t * Get the size of this stack frame in bytes.\n\t *\n\t * @return stack frame size\n\t */\n\tpublic int getFrameSize();\n\n\t/**\n\t * Get the local portion of the stack frame in bytes.\n\t *\n\t * @return local frame size\n\t */\n\tpublic int getLocalSize();\n\n\t/**\n\t * Get the parameter portion of the stack frame in bytes.\n\t *\n\t * @return parameter frame size\n\t */\n\tpublic int getParameterSize();\n\n\t/**\n\t * Get the offset to the start of the parameters.\n\t *\n\t * @return offset\n\t */\n\tpublic int getParameterOffset();\n\n//\t/**\n//\t * Set the offset on the stack of the parameters.\n//\t *\n//\t * @param offset the start offset of parameters on the stack\n//\t */\n//\tpublic void setParameterOffset(int offset) throws InvalidInputException;\n\n\t/**\n\t * Returns true if specified offset could correspond to a parameter\n\t * @param offset\n\t */\n\tpublic boolean isParameterOffset(int offset);\n\n\t/**\n\t * Set the size of the local stack in bytes.\n\t *\n\t * @param size size of local stack\n\t */\n\tpublic void setLocalSize(int size);\n\n\t/**\n\t * Set the return address stack offset.\n\t * @param offset offset of return address.\n\t */\n\tpublic void setReturnAddressOffset(int offset);\n\n\t/**\n\t * Get the return address stack offset.\n\t *\n\t * @return return address offset.\n\t */\n\tpublic int getReturnAddressOffset();\n\n\t/**\n\t * Get the stack variable containing offset. This may fall in\n\t * the middle of a defined variable.\n\t *\n\t * @param offset offset of on stack to get variable.\n\t */\n\tpublic Variable getVariableContaining(int offset);\n\n\t/**\n\t * Create a stack variable. It could be a parameter or a local depending\n\t * on the direction of the stack.\n\t * <p><B>WARNING!</B> Use of this method to add parameters may force the function\n\t * to use custom variable storage. In addition, parameters may be appended even if the\n\t * current calling convention does not support them.\n\t * @throws DuplicateNameException if another variable(parameter or local) already\n\t * exists in the function with that name.\n\t * @throws InvalidInputException if data type is not a fixed length or variable name is invalid.\n\t * @throws VariableSizeException if data type size is too large based upon storage constraints.\n\t */\n\tpublic Variable createVariable(String name, int offset, DataType dataType, SourceType source)\n\t\t\tthrows DuplicateNameException, InvalidInputException;\n\n\t/**\n\t * Clear the stack variable defined at offset\n\t *\n\t * @param offset Offset onto the stack to be cleared.\n\t */\n\tpublic void clearVariable(int offset);\n\n\t/**\n\t * Get all defined stack variables.\n\t * Variables are returned from least offset (-) to greatest offset (+)\n\t *\n\t * @return an array of parameters.\n\t */\n\tpublic Variable[] getStackVariables();\n\n\t/**\n\t * Get all defined parameters as stack variables.\n\t *\n\t * @return an array of parameters.\n\t */\n\tpublic Variable[] getParameters();\n\n\t/**\n\t * Get all defined local variables.\n\t *\n\t * @return an array of all local variables\n\t */\n\tpublic Variable[] getLocals();\n\n\t/**\n\t * A stack that grows negative has local references negative and\n\t * parameter references positive. A positive growing stack has\n\t * positive locals and negative parameters.\n\t *\n\t * @return true if the stack grows in a negative direction.\n\t */\n\tpublic boolean growsNegative();\n}", "public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }", "public Snippet visit(ThisFieldAssignment n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\", \"\", null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.identifier.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f5 = n.identifier1.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = generateTabs(blockDepth)+\"this.\"+f2.returnTemp+\" = (\"+f5.returnTemp+\");\\n\";\n\t\t\ttPlasmaCode+= _ret.returnTemp;\n\t\t\treturn _ret;\n\t }", "@Override\n public void visitFieldInsn(int opcode, String owner, String name, String desc) {\n if(!isFinal(owner, name)) {\n if (isFieldRead(opcode)) {\n callBeforeGetField(opcode, owner, name, getClassName(), getMethodName(), getLastLineNumber());\n } else if(isFieldUpdate(opcode)) {\n callBeforeSetField(opcode, owner, name, Type.getType(desc), getClassName(), getMethodName(), getLastLineNumber());\n }\n }\n\n super.visitFieldInsn(opcode, owner, name, desc);\n }", "@Override\n public CodeFragment visitBlockVarDec(AlangParser.BlockVarDecContext ctx) {\n String name = ctx.ID().getText();\n\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n int arity = ctx.index_to_array().size();\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n String reg = this.generateNewRegister(false);\n\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n v.setArity(arity);\n this.vars.get(this.scope).put(name, v);\n\n CodeFragment result = new CodeFragment();\n result.setRegister(reg);\n if (llvmvartype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n\n if (arity > 0) {\n /* alloca n-dimensional array[a1]...[an] on stack with size a1*a2*...*an */\n v.setLocalArray();\n String prevreg = this.generateNewRegister(false);\n String newreg;\n result.addCode(String.format(\"%s = add i32 0, 1\\n\", prevreg));\n for (int i = 0; i < arity; i++) {\n CodeFragment exp = visit(ctx.index_to_array(i).expression());\n result.addCode(exp);\n v.addLevelReg(exp.getRegister());\n\n newreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", newreg, prevreg, exp.getRegister()));\n prevreg = newreg;\n }\n result.addCode(String.format(\"%s = alloca %s, i32 %s\\n\", reg, llvmvartype, prevreg));\n return result;\n }\n\n return this.generateNewDeclaration(reg, v.getLLVMDeclareType());\n }", "@Override\n\tpublic void visitFrame(int type, int nLocal, Object[] local, int nStack,\n\t\t\tObject[] stack) {\n\t}", "private void processCodeAttribute() {\n int codeAttributeLengthPos = destPos();\n int codeAttributeLength = copyInt();\n copy(4); // max_stack, max_locals\n int codeLength = copyInt(); // code_length\n copy(codeLength); // code\n copy(8 * copyShort()); // exception_table_length, exception_table\n int numAttr = copyShort();\n for (int i = 0; i < numAttr; i++) {\n // Look for \"LocalVariableTable\" attribute.\n int attrNameIdx = copyShort();\n if (cpIdxIsLocalVariableTable(attrNameIdx)) {\n processLocalVariableTableAttribute(codeAttributeLengthPos, codeAttributeLength, codeLength);\n } else {\n copyRestOfAttribute();\n }\n }\n }", "public Snippet visit(FieldAssignment n, Snippet argu) {\n\t \n\t Snippet _ret = new Snippet(\"\", \"\", null, false);\n\t Snippet f0 = n.identifier.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f2 = n.identifier1.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f5 = n.identifier2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t _ret.returnTemp = generateTabs(blockDepth)+f0.returnTemp+\".\"+f2.returnTemp+\" = (\"+f5.returnTemp+\")\"+\";\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "@Override\n public void compile(LinkedList<Token> theStack, Compiler c) throws CompilerException {\n\n\tVariableToken vt;\n\tvt = c.getGlobalVariable(this.getTokenString());\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getLocalVariable(this.getTokenString());\n\t }\n\t}\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getParameter(this.getTokenString());\n\t }\n\t}\n\n\tif (vt == null) {\n\t throw new CompilerException(\"The variable \\\"\" + this.getTokenString() + \"\\\" cannot be used in an expression, as it is not a known variable in the current context!\");\n\t} else {\n\t NumberTokenFactory ntf = new NumberTokenFactory();\n\n//\t\t\tNumberToken nt = (NumberToken) ntf.create(Integer.toString(vt.getVariableID()), 0);\n\t //nt.compile(theStack, c);//when we compile the variable, we add the ID of the variable on the bytecode stack of the compiler c. We use NumberTokenFactory to decide, whether the ID is actually 1 byte long or 2 bytes long and then we add those bytes to the compiler bytecode stack.\n\t //theStack.pop();//well... the previous call had the side effect of placing the \"NumberToken\" on the working stack \"theStack\", which is not what we want, so we're removing it from the working stack here!\n\t extended = CompilableToken.compileNumber(vt.getVariableID(), c);\n\n\t //boolean extended = false;\n\t\t\t/*\n\t if (nt instanceof ByteNumberToken) {\n\t extended = false;\n\t } else {\n\t extended = true;\n\t }\n\t */\n\t this.type = vt.getType();\n\t this.context = vt.getContext();\n\n\t c.getByteCode().push(this);\n\n\t //TODO: Following code should have been here for ages, it seems suspicious\n\t // (impossible)\n\t //that everything even worked without it\n\t theStack.push(this.type);\n\t /*\n\t if (this.getType() == BYTE) {\n\t c.getByteCode().push(new PushByteVariableOnStackByteCodeToken(extended));\n\t theStack.push(new ByteNumberToken(\"0\"));\n\t } else if (this.getType() == INT) {\n\t c.getByteCode().push(new PushIntegerVariableOnStackByteCodeToken(extended));\n\t theStack.push(new IntegerNumberToken(\"0\"));\n\t } else {\n\t System.err.println(\"Cannot compile a variable reference; unknown variable type for variable \\\"\" + this.getTokenString() + \".\\\"\");\n\n\t }\n\t */\n\t}\n\n }", "private void declareLocals() {\r\n\t\t// declare locals\r\n\t\tfor(Local local: method.retrieveActiveBody().getLocals()) {\r\n\t\t\tString cType = null;\r\n\t\t\t// null types need special treatment, we don't output them\r\n\t\t\t// we also won't generate statements that use a nullType\r\n\t\t\t// as a target.\r\n\t\t\tif(local.getType() instanceof NullType) {\r\n\t\t\t\tcType = \"java_lang_Object*\";\r\n\t\t\t} else {\r\n\t\t\t\tcType = CTypes.toCType(local.getType());\r\n\t\t\t}\r\n\t\t\twriter.wl(cType + \" \" + local.getName() + \" = 0;\");\r\n\t\t}\r\n\t\twriter.wl(\"java_lang_Object* _exception = 0;\");\r\n\t}", "public Variable[] getStackVariables();", "@Override\n\tpublic void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) {\n\t\tclassAdapter.dependencies.addAll(Utils.getClassNamesFromFieldDesc(desc, classAdapter.ignoredClasses, modifier, Dependency.methodBodyDependency));\n\t\tif (signature != null)\n\t\t\tclassAdapter.dependencies.addAll(Utils.getClassNamesFromFieldDesc(signature, classAdapter.ignoredClasses, modifier, Dependency.methodBodyDependency));\n\t\tmv.visitLocalVariable(name, desc, signature, start, end, index);\n\t}", "Variable createVariable();", "Variable createVariable();", "public void visit(BinFieldInvocationExpression x){\n }", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "public interface AssignmentNode extends StackOperationNode {\n\n TemporaryVariableName getValueName();\n\n}", "public static ParameterExpression variable(Class type) { throw Extensions.todo(); }", "public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}", "public void someMethod() {\n\t\tint localInt = ExampleDriver.counter;\n\t\t//int localInt2 = ExampleDriver.nonStaticCounter;\n\t\tExampleDriver exampleDriver = new ExampleDriver();\n\t\tint localInt2 = exampleDriver.nonStaticCounter;\n\t}", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1790259326));\n classWriter0.newInteger((-2013884533));\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"LocalVariableTable\";\n stringArray0[1] = \"LocalVariableTable\";\n stringArray0[2] = \"cM6G}.\";\n stringArray0[3] = \"H\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2013884533), \"H\", \"cM6G}.\", \"cM6G}.\", stringArray0, false, false);\n Frame frame0 = new Frame();\n Label label0 = frame0.owner;\n // Undeclared exception!\n try { \n methodWriter0.visitLocalVariable(\"org.objectweb.asm.jip.FieldWriter\", (String) null, \"cM6G}.\", (Label) null, (Label) null, (-2013884533));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "public static ParameterExpression variable(Class type, String name) { throw Extensions.todo(); }", "VariableExp createVariableExp();", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(32767);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"tE\";\n stringArray0[1] = \"tE\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 32767, \"&h'pH__a\", \"tE\", \"org.objectweb.asm.jip.Attribute\", stringArray0, false, false);\n MethodWriter methodWriter1 = methodWriter0.next;\n Label label0 = new Label();\n Label[] labelArray0 = new Label[6];\n Label label1 = label0.getFirst();\n label0.info = (Object) label1;\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n labelArray0[4] = label0;\n label1.successor = label0;\n methodWriter0.visitLocalVariable(\"Label offset position has not been resolved yet\", \"w4v?Hl$.LGym,,F\", \"org.objectweb.asm.jip.Attribute\", label0, label1, 12);\n methodWriter0.visitLabel(label0);\n assertSame(label0, label1);\n }", "@Override\n\tpublic void VisitGetFieldNode(GetFieldNode Node) {\n\n\t}", "VarDecl createVarDecl();", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(32767);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"tE\";\n stringArray0[1] = \"tE\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 32767, \"&h'pH__a\", \"tE\", \"org.objectweb.asm.jip.Attribute\", stringArray0, false, false);\n MethodWriter methodWriter1 = new MethodWriter(classWriter0, 2, \"org.objectweb.asm.jip.Attribute\", \"_b}n0f['\", \"_b}n0f['\", stringArray0, false, false);\n Frame frame0 = new Frame();\n Label label0 = frame0.owner;\n MethodWriter methodWriter2 = classWriter0.firstMethod;\n methodWriter2.visitTypeInsn(262144, \"_b}n0f['\");\n methodWriter2.visitTypeInsn(1639, \"tE\");\n // Undeclared exception!\n try { \n methodWriter0.visitLocalVariable(\"tE\", \"tE\", \"org.objectweb.asm.jip.Attribute\", (Label) null, (Label) null, (-2699));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "private void assign(DefinitionStmt stmt) {\n \n soot.Value rightOp = stmt.getRightOp();\n Value result;\n \n if (rightOp instanceof Immediate) {\n Immediate immediate = (Immediate) rightOp;\n result = immediate(stmt, immediate);\n } else if (rightOp instanceof ThisRef) {\n result = function.getParameterRef(1);\n } else if (rightOp instanceof ParameterRef) {\n ParameterRef ref = (ParameterRef) rightOp;\n int index = (sootMethod.isStatic() ? 1 : 2) + ref.getIndex();\n Value p = new VariableRef(\"p\" + index, getType(ref.getType()));\n result = widenToI32Value(p, isUnsigned(ref.getType()));\n } else if (rightOp instanceof CaughtExceptionRef) {\n result = call(BC_EXCEPTION_CLEAR, env);\n } else if (rightOp instanceof ArrayRef) {\n ArrayRef ref = (ArrayRef) rightOp;\n VariableRef base = (VariableRef) immediate(stmt, (Immediate) ref.getBase());\n if (ref.getType() instanceof NullType) {\n // The base value is always null. Do a null check which will\n // always throw NPE.\n checkNull(stmt, base);\n return;\n } else {\n Value index = immediate(stmt, (Immediate) ref.getIndex());\n checkNull(stmt, base);\n checkBounds(stmt, base, index);\n result = call(getArrayLoad(ref.getType()), base, index);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n }\n } else if (rightOp instanceof InstanceFieldRef) {\n InstanceFieldRef ref = (InstanceFieldRef) rightOp;\n Value base = immediate(stmt, (Immediate) ref.getBase());\n checkNull(stmt, base);\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_getter\", \n new FunctionType(getType(ref.getType()), ENV_PTR, OBJECT_PTR));\n } else {\n soot.Type runtimeType = ref.getBase().getType();\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n String runtimeClassName = runtimeType == NullType.v() ? targetClassName : getInternalName(runtimeType);\n Trampoline trampoline = new GetField(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()), runtimeClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n result = call(fn, env, base);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n } else if (rightOp instanceof StaticFieldRef) {\n StaticFieldRef ref = (StaticFieldRef) rightOp;\n FunctionRef fn = Intrinsics.getIntrinsic(sootMethod, stmt);\n if (fn == null) {\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_getter\", \n new FunctionType(getType(ref.getType()), ENV_PTR));\n } else {\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n Trampoline trampoline = new GetStatic(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()));\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n }\n result = call(fn, env);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n } else if (rightOp instanceof Expr) {\n if (rightOp instanceof BinopExpr) {\n BinopExpr expr = (BinopExpr) rightOp;\n Type rightType = getLocalType(expr.getType());\n Variable resultVar = function.newVariable(rightType);\n result = resultVar.ref();\n Value op1 = immediate(stmt, (Immediate) expr.getOp1());\n Value op2 = immediate(stmt, (Immediate) expr.getOp2());\n if (rightOp instanceof AddExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Add(resultVar, op1, op2));\n } else {\n function.add(new Fadd(resultVar, op1, op2));\n }\n } else if (rightOp instanceof AndExpr) {\n function.add(new And(resultVar, op1, op2));\n } else if (rightOp instanceof CmpExpr) {\n Variable t1 = function.newVariable(I1);\n Variable t2 = function.newVariable(I1);\n Variable t3 = function.newVariable(resultVar.getType());\n Variable t4 = function.newVariable(resultVar.getType());\n function.add(new Icmp(t1, Condition.slt, op1, op2));\n function.add(new Icmp(t2, Condition.sgt, op1, op2));\n function.add(new Zext(t3, new VariableRef(t1), resultVar.getType()));\n function.add(new Zext(t4, new VariableRef(t2), resultVar.getType()));\n function.add(new Sub(resultVar, new VariableRef(t4), new VariableRef(t3)));\n } else if (rightOp instanceof DivExpr) {\n if (rightType instanceof IntegerType) {\n FunctionRef f = rightType == I64 ? LDIV : IDIV;\n result = call(f, env, op1, op2);\n } else {\n // float or double\n function.add(new Fdiv(resultVar, op1, op2));\n }\n } else if (rightOp instanceof MulExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Mul(resultVar, op1, op2));\n } else {\n function.add(new Fmul(resultVar, op1, op2));\n }\n } else if (rightOp instanceof OrExpr) {\n function.add(new Or(resultVar, op1, op2));\n } else if (rightOp instanceof RemExpr) {\n if (rightType instanceof IntegerType) {\n FunctionRef f = rightType == I64 ? LREM : IREM;\n result = call(f, env, op1, op2);\n } else {\n FunctionRef f = rightType == DOUBLE ? DREM : FREM;\n result = call(f, env, op1, op2);\n }\n } else if (rightOp instanceof ShlExpr || rightOp instanceof ShrExpr || rightOp instanceof UshrExpr) {\n IntegerType type = (IntegerType) op1.getType();\n int bits = type.getBits();\n Variable t = function.newVariable(op2.getType());\n function.add(new And(t, op2, new IntegerConstant(bits - 1, (IntegerType) op2.getType())));\n Value shift = t.ref();\n if (((IntegerType) shift.getType()).getBits() < bits) {\n Variable tmp = function.newVariable(type);\n function.add(new Zext(tmp, shift, type));\n shift = tmp.ref();\n }\n if (rightOp instanceof ShlExpr) {\n function.add(new Shl(resultVar, op1, shift));\n } else if (rightOp instanceof ShrExpr) {\n function.add(new Ashr(resultVar, op1, shift));\n } else {\n function.add(new Lshr(resultVar, op1, shift));\n }\n } else if (rightOp instanceof SubExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Sub(resultVar, op1, op2));\n } else {\n function.add(new Fsub(resultVar, op1, op2));\n }\n } else if (rightOp instanceof XorExpr) {\n function.add(new Xor(resultVar, op1, op2));\n } else if (rightOp instanceof XorExpr) {\n function.add(new Xor(resultVar, op1, op2));\n } else if (rightOp instanceof CmplExpr) {\n FunctionRef f = op1.getType() == FLOAT ? FCMPL : DCMPL;\n function.add(new Call(resultVar, f, op1, op2));\n } else if (rightOp instanceof CmpgExpr) {\n FunctionRef f = op1.getType() == FLOAT ? FCMPG : DCMPG;\n function.add(new Call(resultVar, f, op1, op2));\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n } else if (rightOp instanceof CastExpr) {\n Value op = immediate(stmt, (Immediate) ((CastExpr) rightOp).getOp());\n soot.Type sootTargetType = ((CastExpr) rightOp).getCastType();\n soot.Type sootSourceType = ((CastExpr) rightOp).getOp().getType();\n if (sootTargetType instanceof PrimType) {\n Type targetType = getType(sootTargetType);\n Type sourceType = getType(sootSourceType);\n if (targetType instanceof IntegerType && sourceType instanceof IntegerType) {\n // op is at least I32 and has already been widened if source type had fewer bits then I32\n IntegerType toType = (IntegerType) targetType;\n IntegerType fromType = (IntegerType) op.getType();\n Variable v = function.newVariable(toType);\n if (fromType.getBits() < toType.getBits()) {\n // Widening\n if (isUnsigned(sootSourceType)) {\n function.add(new Zext(v, op, toType));\n } else {\n function.add(new Sext(v, op, toType));\n }\n } else if (fromType.getBits() == toType.getBits()) {\n function.add(new Bitcast(v, op, toType));\n } else {\n // Narrow\n function.add(new Trunc(v, op, toType));\n }\n result = widenToI32Value(v.ref(), isUnsigned(sootTargetType));\n } else if (targetType instanceof FloatingPointType && sourceType instanceof IntegerType) {\n // we always to a signed conversion since if op is char it has already been zero extended to I32\n Variable v = function.newVariable(targetType);\n function.add(new Sitofp(v, op, targetType));\n result = v.ref();\n } else if (targetType instanceof FloatingPointType && sourceType instanceof FloatingPointType) {\n Variable v = function.newVariable(targetType);\n if (targetType == FLOAT && sourceType == DOUBLE) {\n function.add(new Fptrunc(v, op, targetType));\n } else if (targetType == DOUBLE && sourceType == FLOAT) {\n function.add(new Fpext(v, op, targetType));\n } else {\n function.add(new Bitcast(v, op, targetType));\n }\n result = v.ref();\n } else {\n // F2I, F2L, D2I, D2L\n FunctionRef f = null;\n if (targetType == I32 && sourceType == FLOAT) {\n f = F2I;\n } else if (targetType == I64 && sourceType == FLOAT) {\n f = F2L;\n } else if (targetType == I32 && sourceType == DOUBLE) {\n f = D2I;\n } else if (targetType == I64 && sourceType == DOUBLE) {\n f = D2L;\n } else {\n throw new IllegalArgumentException();\n }\n Variable v = function.newVariable(targetType);\n function.add(new Call(v, f, op));\n result = v.ref();\n }\n } else {\n if (sootTargetType instanceof soot.ArrayType \n && ((soot.ArrayType) sootTargetType).getElementType() instanceof PrimType) {\n soot.Type primType = ((soot.ArrayType) sootTargetType).getElementType();\n GlobalRef arrayClassPtr = new GlobalRef(\"array_\" + getDescriptor(primType), CLASS_PTR);\n Variable arrayClass = function.newVariable(CLASS_PTR);\n function.add(new Load(arrayClass, arrayClassPtr));\n result = call(CHECKCAST_PRIM_ARRAY, env, arrayClass.ref(), op);\n } else {\n String targetClassName = getInternalName(sootTargetType);\n Trampoline trampoline = new Checkcast(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, op);\n }\n }\n } else if (rightOp instanceof InstanceOfExpr) {\n Value op = immediate(stmt, (Immediate) ((InstanceOfExpr) rightOp).getOp());\n soot.Type checkType = ((InstanceOfExpr) rightOp).getCheckType();\n if (checkType instanceof soot.ArrayType \n && ((soot.ArrayType) checkType).getElementType() instanceof PrimType) {\n soot.Type primType = ((soot.ArrayType) checkType).getElementType();\n GlobalRef arrayClassPtr = new GlobalRef(\"array_\" + getDescriptor(primType), CLASS_PTR);\n Variable arrayClass = function.newVariable(CLASS_PTR);\n function.add(new Load(arrayClass, arrayClassPtr));\n result = call(INSTANCEOF_PRIM_ARRAY, env, arrayClass.ref(), op);\n } else {\n String targetClassName = getInternalName(checkType);\n Trampoline trampoline = new Instanceof(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, op);\n }\n } else if (rightOp instanceof NewExpr) {\n String targetClassName = getInternalName(((NewExpr) rightOp).getBaseType());\n FunctionRef fn = null;\n if (targetClassName.equals(this.className)) {\n fn = FunctionBuilder.allocator(sootMethod.getDeclaringClass()).ref();\n } else {\n Trampoline trampoline = new New(this.className, targetClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n result = call(fn, env);\n } else if (rightOp instanceof NewArrayExpr) {\n NewArrayExpr expr = (NewArrayExpr) rightOp;\n Value size = immediate(stmt, (Immediate) expr.getSize());\n if (expr.getBaseType() instanceof PrimType) {\n result = call(getNewArray(expr.getBaseType()), env, size);\n } else {\n String targetClassName = getInternalName(expr.getType());\n Trampoline trampoline = new Anewarray(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, size);\n }\n } else if (rightOp instanceof NewMultiArrayExpr) {\n NewMultiArrayExpr expr = (NewMultiArrayExpr) rightOp;\n if (expr.getBaseType().numDimensions == 1 && expr.getBaseType().getElementType() instanceof PrimType) {\n Value size = immediate(stmt, (Immediate) expr.getSize(0));\n result = call(getNewArray(expr.getBaseType().getElementType()), env, size);\n } else {\n for (int i = 0; i < expr.getSizeCount(); i++) {\n Value size = immediate(stmt, (Immediate) expr.getSize(i));\n Variable ptr = function.newVariable(new PointerType(I32));\n function.add(new Getelementptr(ptr, dims.ref(), 0, i));\n function.add(new Store(size, ptr.ref()));\n }\n Variable dimsI32 = function.newVariable(new PointerType(I32));\n function.add(new Bitcast(dimsI32, dims.ref(), dimsI32.getType()));\n String targetClassName = getInternalName(expr.getType());\n Trampoline trampoline = new Multianewarray(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, new IntegerConstant(expr.getSizeCount()), dimsI32.ref());\n }\n } else if (rightOp instanceof InvokeExpr) {\n result = invokeExpr(stmt, (InvokeExpr) rightOp);\n } else if (rightOp instanceof LengthExpr) {\n Value op = immediate(stmt, (Immediate) ((LengthExpr) rightOp).getOp());\n checkNull(stmt, op);\n Variable v = function.newVariable(I32);\n function.add(new Call(v, ARRAY_LENGTH, op));\n result = v.ref();\n } else if (rightOp instanceof NegExpr) {\n NegExpr expr = (NegExpr) rightOp;\n Value op = immediate(stmt, (Immediate) expr.getOp());\n Type rightType = op.getType();\n Variable v = function.newVariable(op.getType());\n if (rightType instanceof IntegerType) {\n function.add(new Sub(v, new IntegerConstant(0, (IntegerType) rightType), op));\n } else {\n function.add(new Fmul(v, new FloatingPointConstant(-1.0, (FloatingPointType) rightType), op));\n }\n result = v.ref();\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n \n soot.Value leftOp = stmt.getLeftOp();\n \n if (leftOp instanceof Local) {\n Local local = (Local) leftOp;\n VariableRef v = new VariableRef(local.getName(), new PointerType(getLocalType(leftOp.getType())));\n function.add(new Store(result, v, !sootMethod.getActiveBody().getTraps().isEmpty()));\n } else {\n Type leftType = getType(leftOp.getType());\n Value narrowedResult = narrowFromI32Value(leftType, result);\n if (leftOp instanceof ArrayRef) {\n ArrayRef ref = (ArrayRef) leftOp;\n VariableRef base = (VariableRef) immediate(stmt, (Immediate) ref.getBase());\n Value index = immediate(stmt, (Immediate) ref.getIndex());\n checkNull(stmt, base);\n checkBounds(stmt, base, index);\n if (leftOp.getType() instanceof RefLikeType) {\n call(BC_SET_OBJECT_ARRAY_ELEMENT, env, base, index, narrowedResult);\n } else {\n call(getArrayStore(leftOp.getType()), base, index, narrowedResult);\n }\n } else if (leftOp instanceof InstanceFieldRef) {\n InstanceFieldRef ref = (InstanceFieldRef) leftOp;\n Value base = immediate(stmt, (Immediate) ref.getBase());\n checkNull(stmt, base);\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_setter\", \n new FunctionType(VOID, ENV_PTR, OBJECT_PTR, getType(ref.getType())));\n } else {\n soot.Type runtimeType = ref.getBase().getType();\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n String runtimeClassName = runtimeType == NullType.v() ? targetClassName : getInternalName(runtimeType);\n Trampoline trampoline = new PutField(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()), runtimeClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n call(fn, env, base, narrowedResult);\n } else if (leftOp instanceof StaticFieldRef) {\n StaticFieldRef ref = (StaticFieldRef) leftOp;\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_setter\", \n new FunctionType(VOID, ENV_PTR, getType(ref.getType())));\n } else {\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n Trampoline trampoline = new PutStatic(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()));\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n call(fn, env, narrowedResult);\n } else {\n throw new IllegalArgumentException(\"Unknown type for leftOp: \" + leftOp.getClass());\n }\n }\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1267));\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"LocalVariableTypeTable\";\n stringArray0[1] = \"QL\";\n stringArray0[2] = \"LocalVariableTypeTable\";\n stringArray0[3] = \"LocalVariableTypeTable\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2431), \"QL\", \"LocalVariableTypeTable\", \"RuntimeInvisibleAnnotations\", stringArray0, false, false);\n methodWriter0.visitIincInsn((-1267), 2684);\n }", "public LocalVariableGen addLocalVariable2(String name, Type type, InstructionHandle start) {\n/* 177 */ return addLocalVariable(name, type, this._slotAllocator.allocateSlot(type), start, null);\n/* */ }", "@Override\r\n\tpublic void visit(FieldDeclNode fieldDeclNode) {\n\t\tfieldDeclNode.getType().accept(this);\r\n\t\t\r\n\t\t//Only visit declared variables, not the type!\r\n\t\tVarDeclListNode vars = fieldDeclNode.getDeclaredVariables();\r\n\t\tfor(VarDeclNode v : vars){\r\n\t\t\t\r\n\t\t\t//Set cur field\r\n\t\t\tVariable fieldBefore = curField;\r\n\t\t\tcurField = v.getName().getSemantics();\r\n\t\t\t\r\n\t\t\t//Accept\r\n\t\t\tv.accept(this);\r\n\t\t\t\r\n\t\t\t//Reset cur field\r\n\t\t\tcurField = fieldBefore;\r\n\t\t}\r\n\t}", "protected Expr visitFieldAssign(FieldAssign n) throws SemanticException { \n Position pos = n.position();\n if (n.operator() == Assign.ASSIGN) return n;\n X10Binary_c.Operator op = n.operator().binaryOperator();\n Field left = (Field) n.left();\n Expr right = n.right();\n Type R = left.type();\n if (left.flags().isStatic()) {\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos, left, op, right).type(R));\n return assign(pos, left, Assign.ASSIGN, val);\n }\n Expr e = (Expr) left.target();\n Type E = e.type();\n List<Formal> parms = new ArrayList<Formal>();\n Name xn = Name.make(\"x\");\n LocalDef xDef = xts.localDef(pos, xts.Final(), Types.ref(E), xn);\n Formal x = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, E), xnf.Id(pos, xn)).localDef(xDef);\n parms.add(x);\n Name yn = Name.make(\"y\");\n Type T = right.type();\n LocalDef yDef = xts.localDef(pos, xts.Final(), Types.ref(T), yn);\n Formal y = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, T), xnf.Id(pos, yn)).localDef(yDef);\n parms.add(y);\n Expr lhs = xnf.Field(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(E),\n xnf.Id(pos, left.name().id())).fieldInstance(left.fieldInstance()).type(R);\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos,\n lhs, op, xnf.Local(pos, xnf.Id(pos, yn)).localInstance(yDef.asInstance()).type(T)).type(R));\n Expr res = assign(pos, lhs, Assign.ASSIGN, val);\n Block body = xnf.Block(pos, xnf.Return(pos, res));\n Closure c = synth.makeClosure(pos, R, parms, body, context());\n X10MethodInstance ci = c.closureDef().asType().applyMethod();\n List<Expr> args = new ArrayList<Expr>();\n args.add(0, e);\n args.add(right);\n return xnf.ClosureCall(pos, c, args).closureInstance(ci).type(R);\n }", "@Override String opStr() { return \"var\"; }", "public int func_176881_a() {\n/* */ return this.field_176893_h;\n/* */ }", "public void setLocals(LocalDebugInfo[] locals);", "@Override\n\tprotected String getVariableClassName() {\n\t\treturn \"variable\";\n\t}", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n int[] intArray0 = new int[7];\n intArray0[0] = 2;\n intArray0[1] = 3;\n intArray0[0] = 7;\n intArray0[3] = 7;\n intArray0[4] = 10;\n intArray0[5] = 5;\n intArray0[6] = 1;\n frame0.inputLocals = intArray0;\n typeArray0[3] = type1;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.BOOLEAN_TYPE;\n typeArray0[2] = type4;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[6] = type5;\n Type type6 = Type.SHORT_TYPE;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n ClassWriter classWriter0 = new ClassWriter(189);\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(28, 10, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public vx i()\r\n/* 185: */ {\r\n/* 186:212 */ return vx.a;\r\n/* 187: */ }", "public Variable getVariableContaining(int offset);", "public void interceptGetField(int opcode, String owner, String name, String desc) {\n FieldDefinition fieldDefn = classDefn.managedFields.get(name);\n if (fieldDefn != null && !isCurrentMethodAccessorOfField(name)) {\n /* inject preGet(\"fieldX\") before GETFIELD\n */\n // at this point stack has (..., [object]) which is ready for GETFIELD\n // DUP [object]\n mv.visitInsn(DUP);\n // stack has (..., [object], [object]) \n // push [this]\n mv.visitVarInsn(ALOAD, 0);\n // stack has (..., [object], [object], [this])\n Label label = new Label();\n // if ([object] == [this])\n mv.visitJumpInsn(IF_ACMPNE, label);\n // stack has (..., [this]) because (object == this)\n // DUP [this]\n mv.visitInsn(DUP);\n // stack has (..., [this], [this])\n // push \"fieldX\"\n mv.visitLdcInsn(name);\n // stack has (..., [this], [this], \"fieldX\")\n // invoke preGet(\"fieldX\")\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preGetMethodName, preGetMethodDesc);\n // stack has (..., [this])\n // label:\n mv.visitLabel(label);\n // Frame TODO\n // mv.visitFrame(??, 0, null, 0, null);\n // stack has (..., [object])\n if (oprandStackIncrement < 3) {\n oprandStackIncrement = 3;\n }\n }\n // stack has (..., [object])\n // GETFIELD\n super.visitFieldInsn(opcode, owner, name, desc);\n }", "public Snippet visit(UpdatableFieldDeclaration n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"public \",null,false);\n\t n.nodeToken.accept(this, argu);\n\t tPlasmaCode=\"\";\n\t\t\tSnippet f1 = n.type.accept(this, argu);\n\t\t\tSnippet f2 = n.identifier.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t _ret.returnTemp += f1.returnTemp+\" \"+f2.returnTemp+\";\";\n\t\t\tString temp = generateTabs(0)+\"public \" + f1.expType.getTypeName()+\" \"+f2.returnTemp+\";\\n\";\n\t\t\tcurrentClassBody.fields+=temp;\n\t\t\ttPlasmaCode=\"\";\n\t return _ret;\n\t }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1790259313));\n classWriter0.newInteger((-2013884528));\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"LocalVariableTable\";\n stringArray0[1] = \"LocalVariableTable\";\n stringArray0[2] = \"cM6G}.\";\n stringArray0[3] = \"H\";\n classWriter0.newConst(\"cM6G}.\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1790259313), \"9~\\\"GM0+ ?&-(JmN[0f.\", \"Fj)3/|(;sZXz$\", \"LocalVariableTable\", stringArray0, true, true);\n Label label0 = new Label();\n // Undeclared exception!\n try { \n methodWriter0.visitJumpInsn((-2013884528), label0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.Frame\", e);\n }\n }", "public String generate(String registerName) {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + registerName + \" = alloca \" + variableLLVMType + \"\\n\";\n }", "public Arginfo visit(AllocationExpression n, Arginfo argu) {\n Arginfo _ret=null;\n argu.isreq=0;\n \n int a=prectr++;\n int b=prectr++;\n int c=prectr++;\n int d=prectr++;\n int e=prectr++;\n \n String classname=n.f1.f0.tokenImage;\n HashMap<String,Integer> methodnum=finaltable.symboltable.get(classname).varnum;\n int num1=finaltable.symboltable.get(classname).varnum.size();\n num1++;\n int num2=finaltable.symboltable.get(classname).methodnum.size();\n int size1=num1*4;\n int size2=num2*4;\n System.out.println(\"BEGIN\\n MOVE TEMP \"+b+\" HALLOCATE \"+size1);\n System.out.println(\"MOVE TEMP \"+c+\" HALLOCATE \"+size2);\n \n Iterator it=finaltable.symboltable.get(classname).methodnum.entrySet().iterator();\n\t while(it.hasNext()){\n\t\t Map.Entry pair = (Map.Entry)it.next();\n\t\t String a1=(String) pair.getKey();\n\t\t int b1=(Integer) pair.getValue();\n\t\t System.out.println(\"HSTORE TEMP \"+c+\" \"+b1+\" \"+a1);\n\t }\n\t System.out.println(\"HSTORE TEMP \"+b+\" 0\"+\" TEMP \"+c);\n\t \n\t int i;\n\t for(i=4;i<size1;i=i+4){\n\t System.out.println(\" HSTORE TEMP \"+b+\" \"+i+\" 0 \\n\");\n\t }\n\t System.out.println(\"RETURN TEMP \"+b+\" \\nEND\\n\");\n\t \n\t \n \n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n n.f3.accept(this, argu);\n \n \n Arginfo temp1=new Arginfo();\n temp1.str=n.f1.f0.tokenImage;\n return temp1;\n }", "public String visit(VarDeclaration n, LLVMRedux argu) throws Exception {\n\n u.println(\"%\"+n.f1.accept(this, argu)+\" = alloca \"+n.f0.accept(this,argu));\n u.println(\"\");\n return null;\n }", "private LocalVariables locals(){\n\t\treturn frame.getLocals();\n\t}", "public void method_6438(int var1) {\r\n this.field_6227 = var1;\r\n }", "private /* synthetic */ SpeedRunType() {\n void var2_-1;\n void var1_-1;\n SpeedRunType a2;\n }", "ClassVariable getClassVariable();", "<C, PM> Variable<C, PM> createVariable();", "protected void createJoinPointSpecificFields() {\n String[] fieldNames = null;\n // create the field argument field\n Type fieldType = Type.getType(m_calleeMemberDesc);\n fieldNames = new String[1];\n String fieldName = ARGUMENT_FIELD + 0;\n fieldNames[0] = fieldName;\n m_cw.visitField(ACC_PRIVATE, fieldName, fieldType.getDescriptor(), null, null);\n m_fieldNames = fieldNames;\n\n m_cw.visitField(\n ACC_PRIVATE + ACC_STATIC,\n SIGNATURE_FIELD_NAME,\n FIELD_SIGNATURE_IMPL_CLASS_SIGNATURE,\n null,\n null\n );\n }", "Variable getTargetVariable();", "private void addInstanceVariables(ClassWriterTracker ct) {\n // variable #1, the state manager\n ct.getCw().visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_TRANSIENT,\n \"sm\", Type.getDescriptor(OpenJPAStateManager.class), null, null).visitEnd();\n\n // variable #2, the state manager\n ct.getCw().visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_TRANSIENT,\n \"field\", Type.getDescriptor(int.class), null, null).visitEnd();\n }", "private synchronized void updateVariables() throws DebugException {\n\t\tif (lastUpdated == target.getSuspendCount()\n\t\t\t\t|| (variables != null && oldLineNumber == lineNumber))\n\t\t\treturn;\n\t\t\n\t\tSynchronizer frontend = target.getFrontend();\n\t\tif (frontend != null) {\n\t\t\t// get local variables\n\t\t\tString localsSausage = frontend.GetLocals(thread.getID(),frameNumber);\n\t\t\tString[] locals;\n\t\t\tif (localsSausage == null || localsSausage.equals(\"--\")\n\t\t\t\t\t|| localsSausage.equals(\"\"))\n\t\t\t\tlocals = new String[0];\n\t\t\telse\n\t\t\t\tlocals = localsSausage.split(\" \");\n\t\t\t// get parameters\n\t\t\tString paramsSausage = frontend.GetParameters(thread.getID(),frameNumber);\n\t\t\tString[] params;\n\t\t\tif (paramsSausage == null || paramsSausage.equals(\"--\")\n\t\t\t\t\t|| paramsSausage.equals(\"\"))\n\t\t\t\tparams = new String[0];\n\t\t\telse\n\t\t\t\tparams = paramsSausage.split(\" \");\n\t\t\t// get static fields of the current class\n\t\t\tString className;\n\t\t\ttry {\n\t\t\t\tclassName = methodName.substring(0, methodName.lastIndexOf('.'));\n\t\t\t} catch (StringIndexOutOfBoundsException e) {\n\t\t\t\tclassName = \"\";\n\t\t\t}\n\t\t\tString staticsSausage = frontend.PtypeFieldsOnly(thread.getID(),frameNumber,\n\t\t\t\t\tclassName,true);\n\t\t\tString[] statics;\n\t\t\tif (staticsSausage == null || staticsSausage.equals(\"--\")\n\t\t\t\t\t|| staticsSausage.equals(\"\"))\n\t\t\t\tstatics = new String[0];\n\t\t\telse\n\t\t\t\tstatics = staticsSausage.split(\" \");\n\t\t\t// determine if \"this\" is valid\n\t\t\tboolean _this = true;\n\t\t\tif (frontend.PtypeFieldsOnly(thread.getID(),frameNumber,\"this\",false).equals(\"--\"))\n\t\t\t\t_this = false;\n\t\t\t\n\t\t\t// create variable objects\n\t\t\tIVariable[] tempVariables = new EmonicVariable[locals.length + params.length\n\t\t\t + statics.length + (_this ? 1 : 0)];\n\n\t\t\tif (variables == null || variables.length != tempVariables.length) {\n\t\t\t\t// something changed\n\t\t\t\tint index = 0;\n\t\t\t\tif (_this) {\n\t\t\t\t\ttempVariables[0] = new EmonicVariable(this,\"this\",null);\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t\tArrays.sort(locals);\n\t\t\t\tfor (int i=0; i<locals.length; i++) {\n\t\t\t\t\ttempVariables[i+index] = new EmonicVariable(this,locals[i],null);\n\t\t\t\t}\n\t\t\t\tindex+=locals.length;\n\t\t\t\tArrays.sort(params);\n\t\t\t\tfor (int i=0; i<params.length; i++) {\n\t\t\t\t\ttempVariables[i+index] = new EmonicVariable(this,params[i],null);\n\t\t\t\t}\n\t\t\t\tindex+=params.length;\n\t\t\t\tArrays.sort(statics);\n\t\t\t\tfor (int i=0; i<statics.length; i++) {\n\t\t\t\t\ttempVariables[i+index] = new EmonicVariable(this,statics[i],null);\n\t\t\t\t}\n\t\t\t\tvariables = tempVariables;\n\t\t\t} \n\t\t}\n\t\tlastUpdated = target.getSuspendCount();\n//\t\toldLineNumber = lineNumber;\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 140,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit\", NM=\"_ZN5clang7CodeGen15CodeGenFunction24EmitCXXGlobalVarDeclInitERKNS_7VarDeclEPN4llvm8ConstantEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction24EmitCXXGlobalVarDeclInitERKNS_7VarDeclEPN4llvm8ConstantEb\")\n//</editor-fold>\npublic final void EmitCXXGlobalVarDeclInit(final /*const*/ VarDecl /*&*/ D, \n Constant /*P*/ DeclPtr, \n boolean PerformInit) {\n \n /*const*/ Expr /*P*/ Init = D.getInit$Const();\n QualType T = D.getType();\n \n // The address space of a static local variable (DeclPtr) may be different\n // from the address space of the \"this\" argument of the constructor. In that\n // case, we need an addrspacecast before calling the constructor.\n //\n // struct StructWithCtor {\n // __device__ StructWithCtor() {...}\n // };\n // __device__ void foo() {\n // __shared__ StructWithCtor s;\n // ...\n // }\n //\n // For example, in the above CUDA code, the static local variable s has a\n // \"shared\" address space qualifier, but the constructor of StructWithCtor\n // expects \"this\" in the \"generic\" address space.\n /*uint*/int ExpectedAddrSpace = $this().getContext().getTargetAddressSpace(new QualType(T));\n /*uint*/int ActualAddrSpace = DeclPtr.getType().getPointerAddressSpace();\n if (ActualAddrSpace != ExpectedAddrSpace) {\n org.llvm.ir.Type /*P*/ LTy = $this().CGM.getTypes().ConvertTypeForMem(new QualType(T));\n org.llvm.ir.PointerType /*P*/ PTy = org.llvm.ir.PointerType.get(LTy, ExpectedAddrSpace);\n DeclPtr = ConstantExpr.getAddrSpaceCast(DeclPtr, PTy);\n }\n \n ConstantAddress DeclAddr/*J*/= new ConstantAddress(DeclPtr, $this().getContext().getDeclAlign($AddrOf(D)));\n if (!T.$arrow().isReferenceType()) {\n if (($this().getLangOpts().OpenMP != 0) && D.hasAttr(OMPThreadPrivateDeclAttr.class)) {\n /*J:(void)*/$this().CGM.getOpenMPRuntime().emitThreadPrivateVarDefinition($AddrOf(D), new Address(DeclAddr), D.getAttr(OMPThreadPrivateDeclAttr.class).getLocation(), \n PerformInit, $this());\n }\n if (PerformInit) {\n CGDeclCXXStatics.EmitDeclInit(/*Deref*/$this(), D, new ConstantAddress(DeclAddr));\n }\n if ($this().CGM.isTypeConstant(D.getType(), true)) {\n CGDeclCXXStatics.EmitDeclInvariant(/*Deref*/$this(), D, DeclPtr);\n } else {\n CGDeclCXXStatics.EmitDeclDestroy(/*Deref*/$this(), D, new ConstantAddress(DeclAddr));\n }\n return;\n }\n assert (PerformInit) : \"cannot have constant initializer which needs destruction for reference\";\n RValue RV = $this().EmitReferenceBindingToExpr(Init);\n $this().EmitStoreOfScalar(RV.getScalarVal(), new Address(DeclAddr), false, new QualType(T));\n}", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"LocalVariableTypeTable\";\n stringArray0[1] = \"QL\";\n stringArray0[2] = \"QL\";\n stringArray0[3] = \"QL\";\n stringArray0[4] = \"QL\";\n stringArray0[5] = \"QL\";\n stringArray0[6] = \"LocalVariableTypeTable\";\n stringArray0[7] = \"QL\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \"LocalVariableTypeTable\", \"LocalVariableTypeTable\", \"QL\", stringArray0, false, false);\n methodWriter0.visitIincInsn(1, 2);\n methodWriter0.getSize();\n methodWriter0.visitIincInsn(54, (-2994));\n }", "VarReference createVarReference();", "VarAssignment createVarAssignment();", "public void visitLocalVariableInstruction(LocalVariableInstruction o){\n\t\tif (locals().maxLocals() <= (o.getType(cpg).getSize()==1? o.getIndex() : o.getIndex()+1) ){\n\t\t\tconstraintViolated(o, \"The 'index' is not a valid index into the local variable array.\");\n\t\t}\n\t}", "private B() {\n void var2_-1;\n void var1_-1;\n }", "public abstract int getBindingVariable();", "public VariableMeta getMeta();", "VariableDeclaration createVariableDeclaration();", "public Snippet visit(ConstantDeclaration n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"public static final \",null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f3 = n.type.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f6 = n.methodCall.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t _ret.returnTemp += f3.returnTemp+\" \"+f4.returnTemp+\" = \"+f6.returnTemp+\";\\n\";\n\t\t\tcurrentClassBody.constants += _ret.returnTemp;\n\t\t\treturn _ret;\n\t }", "public void MIPSme()\n\t{\n\t\t\n\t\tTEMP varAddress = null;\n\t\t//v := v - this is the right side of the assignment - we want to load the value of v from memory\n\t\tif (isRight){\n\t\t\tif(isParamFromStack){\n\t\t\t\t// we want value from stack\n\t\t\t\tsir_MIPS_a_lot.getInstance().loadFromFrame(dst,(this.localVarOffset+1)*4);\n\t\t\t}\n\t\t\t//need to be modified\n\t\t\telse{\n\t\t\t\tsir_MIPS_a_lot.getInstance().loadFromFrame(dst,-(this.localVarOffset+1)*4);\n\t\t\t}\n\t\t}\n\t\t//left side - we want to get variable address into temp t \n\t\telse{\n\t\t\t//variable is a parameter of a function\n\t\t\tif (isParamFromStack){\n\t\t\t\tvarAddress = sir_MIPS_a_lot.getInstance().addressParamVar(this.localVarOffset);\n\t\t\t}\n\t\t\t//for now it represents local variable but need to be changed.... (data members, globals...) \n\t\t\telse{\n\t\t\t\tvarAddress = sir_MIPS_a_lot.getInstance().addressLocalVar(this.localVarOffset);\n\t\t\t}\n\t\t\tsir_MIPS_a_lot.getInstance().move(dst,varAddress);\n\t\t}\n\t}", "@Override\n\tvoid populateMethodImplBlock(Block block) {\n\t\tfinal DataConstructorExp newLocExp = new DataConstructorExp();\n\t\tnewLocExp.setConstructor(LOCATION_CONSTRUCTOR);\n\t\tfinal FnApp memExp = new FnApp();\n\t\tmemExp.setName(MEMORY_SELECTOR);\n\t\tmemExp.addParamNoTransform(arrayArg.getVarUse());\n\t\tnewLocExp.addParamNoTransform(memExp);\n\t\tfinal FnApp offsetExp = new FnApp();\n\t\toffsetExp.setName(OFFSET_SELECTOR);\n\t\toffsetExp.addParamNoTransform(arrayArg.getVarUse());\n\t\tnewLocExp.addParamNoTransform(new AddAddExp(offsetExp, new MultMultExp(sizeArg.getVarUse(), indexArg.getInnerExp())));\n\t\tfinal ReturnStmt returnStmt = new ReturnStmt();\n\t\treturnStmt.setRetExp(newLocExp);\n\t\tblock.addStmt(returnStmt);\n\t}", "DynamicVariable createDynamicVariable();", "@Test(timeout = 4000)\n public void test066() 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.visitFieldInsn(11, \"n\", \"Ljava/lang/Synthetic;\", \"g!\");\n methodWriter0.visitIntInsn(32767, 1);\n }", "String getSourceVariablePart();", "VariableRef createVariableRef();", "public interface IInstanceVariable extends INameNode {\n}", "void m1() {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(outer); // can access the outer CLASS context elements\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(finalVariable); // can access to the outer METHOD context elements if FINAL\n\t\t\t\t\tSystem.out.println(effectivellyFinal); // can access to the outer METHOD context elements if EFFECTIVELY FINAL\n\t\t\t\t}", "public VariType visit(AllocationExpression n, Table argu) {\n\t VariType _ret = new VariType();\n\t n.f0.accept(this, argu);\n\t VariType t1 = n.f1.accept(this, argu);\n\t if(((MethodTable)argu).toptable.getclasstable(n.f1.f0.tokenImage) == null) {\n\t \t PrintError.errorexist = true;\n\t \t String emsg = \"undefined class \\\"\"+n.f1.f0.tokenImage+\"\\\"\";\n\t \t PrintError.print(emsg, n.f2.beginLine, n.f2.beginColumn, 1);\n\t \t _ret.type = \"Undefined\";\n\t \t return _ret;\n\t }\n\t n.f2.accept(this, argu);\n\t n.f3.accept(this, argu);\n\t _ret.type = \"Object\";\n\t _ret.name = n.f1.f0.tokenImage;\n\t return _ret;\n\t }", "public DetachedVarSymbol(long flags, Name name, Type type, Symbol owner) {\n super(flags, name, type, owner);\n this.decl = null;\n }", "protected void SetVariable(SB_ExecutionFrame contextFrame, SB_Variable var)\r\n\t throws SB_Exception\r\n\t{\r\n\t\tSB_Variable classVar = contextFrame.GetVariable(_varName);\r\n\t\t\t\t\r\n\t\tif( classVar != null)\r\n\t\t{\r\n\t\t Object obj = classVar.getValue();\r\n\t\t\tClass cls = obj.getClass();\r\n\t\t\t\r\n\t\t\tif( !SetClassMemberField(cls, obj, _varMember, SB_SimInterface.ConvertObject(var)))\r\n\t\t\t{\r\n\t\t\t throw new SB_Exception(\"Can't find \" + _varName +\".\" + _varMember);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public interface Visitor {\n\n public void visitCode(Code obj);\n\n public void visitCodeException(CodeException obj);\n\n public void visitConstantClass(ConstantClass obj);\n\n public void visitConstantDouble(ConstantDouble obj);\n\n public void visitConstantFieldref(ConstantFieldref obj);\n\n public void visitConstantFloat(ConstantFloat obj);\n\n public void visitConstantInteger(ConstantInteger obj);\n\n public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj);\n\n public void visitConstantLong(ConstantLong obj);\n\n public void visitConstantMethodref(ConstantMethodref obj);\n\n public void visitConstantNameAndType(ConstantNameAndType obj);\n\n public void visitConstantPool(ConstantPool obj);\n\n public void visitConstantString(ConstantString obj);\n\n public void visitConstantUtf8(ConstantUtf8 obj);\n\n public void visitConstantValue(ConstantValue obj);\n\n public void visitDeprecated(Deprecated obj);\n\n public void visitExceptionTable(ExceptionTable obj);\n\n public void visitField(Field obj);\n\n public void visitInnerClass(InnerClass obj);\n\n public void visitInnerClasses(InnerClasses obj);\n\n public void visitJavaClass(JavaClass obj);\n\n public void visitLineNumber(LineNumber obj);\n\n public void visitLineNumberTable(LineNumberTable obj);\n\n public void visitLocalVariable(LocalVariable obj);\n\n public void visitLocalVariableTable(LocalVariableTable obj);\n\n public void visitMethod(Method obj);\n\n public void visitSignature(Signature obj);\n\n public void visitSourceFile(SourceFile obj);\n\n public void visitSynthetic(Synthetic obj);\n\n public void visitUnknown(Unknown obj);\n\n public void visitStackMap(StackMap obj);\n\n public void visitStackMapEntry(StackMapEntry obj);\n\n // Java5\n public void visitEnclosingMethod(EnclosingMethod obj);\n\n public void visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations obj);\n\n public void visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations obj);\n\n public void visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations obj);\n\n public void visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations obj);\n\n public void visitAnnotationDefault(AnnotationDefault obj);\n\n public void visitLocalVariableTypeTable(LocalVariableTypeTable obj);\n}", "Node getVariable();", "public LlvmValue visit(ClassDeclSimple n){\n\t\t\n\t\t//recuperando classEnv do SymTab\n\t\tclassEnv = symTab.classes.get(n.name.s);\n\t\t\n\t\t//System.out.format(\"****classEnv: \\n%s \\n%s \\n%s \\n%s\\n\",classEnv.classType, classEnv.nameClass, classEnv.type, classEnv.varList);\n\t\t\n\t\t//System.out.format(\"n: %s %s %s %s\\n\",n,n.name, n.methodList, n.varList);\n\t\t\n\t\t//seguindo o padrao do slide 21/47 parte 1 llvm...\n\t\t\n\t\tSystem.out.format(\"classdeclsimple*********************\\n\");\n\t\t\n\t\tint i, j;\n\t\t\n\t\t//criando uma string, onde sera colocado o assembly referente ao type. (type {...})\n\t\tStringBuilder classTypes = new StringBuilder();\n\t\t\n\t\t//criando uma string onde sera colocado o nome da classe\n\t\tStringBuilder className = new StringBuilder();\n\t\t\n\t\t//lista ligada onde serao armazenados os tipos das variaveis\n\t\tList<LlvmType> typeList = new LinkedList<LlvmType>();\n\t\t\n\t\t//%class.name\n\t\tclassName.append(\"%class.\");\n\t\tclassName.append(n.name.s);\n\t\t\n\t\t//type { type1, type2, ... } - vamos utilizar LlvmStructure\n\t\tclassTypes.append(\"type \");\n\t\t\n\t\tif (n.varList != null) {\n\t\t\tj = n.varList.size();\n\t\t\t//System.out.format(\"Numero de variaveis: %d\\n\", j);\n\t\t\t\n\t\t\t//itera a lista de variaveis para pegar todos os tipos e appendar em classTypes.\n\t\t\tfor (util.List<VarDecl> varList = n.varList; varList != null; varList = varList.tail){\n\t\t\t\t\n\t\t\t\tLlvmValue variable_type = varList.head.type.accept(this);\n\t\t\t\t\n\t\t\t\t//System.out.format(\"tipos das variaveis:%s \\n\", variable_type);\n\t\t\t\t\n\t\t\t\tif(variable_type.toString().contains(\"%class\")){\n\t\t\t\t\t//System.out.format(\"eh uma classe. alterando para pointer...\\n\");\n\t\t\t\t\tLlvmPointer ptr_class = new LlvmPointer((LlvmType) variable_type);\n\t\t\t\t\ttypeList.add(ptr_class);\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t//adiciona os tipos de variaveis\n\t\t\t\t\ttypeList.add((LlvmType) variable_type);\n\t\t\t\t}\n\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t//Structure onde serao colocados os tipos, formatados pelo LlvmStructure\n\t\tLlvmStructure listaDeTipos = new LlvmStructure(typeList);\n\t\t\n\t\tif(listaDeTipos.toString().contains(\"null\")){\n\t\t\t\n\t\t\t//System.out.format(\"listaDeTipos nula\\n\");\n\t\t\t\n\t\t\t//appenda a lista de tipos no classTypes\n\t\t\tclassTypes.append(\"{ }\");\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\n\t\t\t//System.out.format(\"listaDeTipos nao nula\\n\");\n\t\t\t\n\t\t\t//appenda a lista de tipos no classTypes\n\t\t\tclassTypes.append(listaDeTipos.toString());\n\t\t\t\n\t\t}\n\t\tSystem.out.format(\"\\nclassType final: %s\\n\", classTypes);\n\t\t\n\t\tSystem.out.format(\"className: %s\\n\",className);\n\t\t\n\t\t// Adiciona declaracao de classe no assembly\n\t\tassembler.add(new LlvmConstantDeclaration(className.toString(),classTypes.toString()));\n\n\t\t//System.out.format(\"antes methodenv: %s\\n\", n.methodList);\n\t\t\t\n\t\tif(n.methodList != null) {\n\t\t\tj = n.methodList.size();\n\t\t\t//System.out.format(\"methodList.size: %s\\n\",n.methodList.size());\n\t\t\t\n\t\t\t\n\t\t\tfor (util.List<MethodDecl> methodList = n.methodList; methodList != null; methodList = methodList.tail){\n\t\t\t\tMethodDecl method = methodList.head;\n\t\t\t\t\n\t\t\t\tSystem.out.format(\"@class - method: %s \", method);\n\t\t\t\t\n\t\t\t\t//desce para methods\n\t\t\t\t\n\t\t\t\tmethod.accept(this);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\n\t}", "public void testMethodInfo887() throws Exception {\n\t\tClassInfo var2782 = instantiateClassInfo428();\n\t\tLocalField var2783 = instantiateLocalField427();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tMethodInfo var2784 = new MethodInfo(var2782, \"voidX()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tvar2783.getDescription();\n\t\tvar2783.getDescription();\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2782.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2784.isSetter();\n\t\tvar2784.isSetter();\n\t}", "private void localVariableDeclaration(Modifier modify, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.FINALSY)\r\n {\r\n modify.add(nextSymbol.value);\r\n lookAhead();\r\n }\r\n\r\n modify.check(modify.fields | modify.access);\r\n Type t = type();\r\n\r\n variableDeclarators(modify, t, scope, queue);\r\n }", "@Test(timeout = 4000)\n public void test044() 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 FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"LocalVariableTable\");\n Label label0 = new Label();\n Edge edge0 = label0.successors;\n // Undeclared exception!\n try { \n methodWriter0.visitMethodInsn((-2894), \"/#p[v!vM>^U#((tz?0\", \"0T1MW_`O#}<L\", \"Code\");\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "public Object VisitInstanceVariableDef(ASTInstanceVariableDef variabledef)\n {\n //////System.out.println(\"VisitInstanceVariableDef()\");\n return CheckType(variabledef.type(), variabledef.arraydimension(), variabledef.line());\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 }", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"Label offset position has not been resolved yet\";\n stringArray0[1] = \"'0\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"tE\", \"Class not found\", \"&h'pH__a\", stringArray0, false, false);\n Object object0 = new Object();\n methodWriter0.visitFrame(76, (-1840700267), stringArray0, (-3070), stringArray0);\n methodWriter0.visitTypeInsn((-1739978762), \"Label offset position has not been resolved yet\");\n methodWriter0.visitAnnotation(\"^(V^iU1h\", false);\n methodWriter0.visitTypeInsn(218, \"xp:%03,6Y\");\n int int0 = methodWriter0.getSize();\n assertEquals(72, int0);\n }", "public void method(int a) {\r\n\t\tint tot = 7;\r\n\t\tSystem.out.println(\"localvariable a: \"+a);\r\n\t\tint b = a + 4;\r\n\t\tSystem.out.println(\"localvariable b: \"+b);\r\n\t\t\r\n\t}" ]
[ "0.5916051", "0.57766676", "0.5769804", "0.5699376", "0.56027734", "0.55349624", "0.5524847", "0.5522892", "0.5520112", "0.55054826", "0.5504954", "0.5487051", "0.54757214", "0.5443029", "0.54233265", "0.54196733", "0.54186046", "0.54165524", "0.538256", "0.53801036", "0.5376709", "0.53556204", "0.5342018", "0.5322852", "0.5309533", "0.5305359", "0.5288763", "0.52853286", "0.528466", "0.528466", "0.5274867", "0.52596027", "0.52499783", "0.5233836", "0.52280545", "0.5215765", "0.5195851", "0.5188336", "0.5177858", "0.5170835", "0.514831", "0.5135234", "0.51319253", "0.512969", "0.5117634", "0.509362", "0.5089879", "0.5080901", "0.5072248", "0.50718564", "0.50714463", "0.50680834", "0.5059744", "0.50426024", "0.50383055", "0.5032972", "0.5031169", "0.5023688", "0.50215375", "0.5017622", "0.50165105", "0.5006926", "0.5006722", "0.5006624", "0.50053763", "0.5002563", "0.4994744", "0.49890077", "0.49869746", "0.4984477", "0.4981726", "0.496893", "0.49682558", "0.4962719", "0.49537197", "0.49461672", "0.494479", "0.49336052", "0.49301386", "0.49247837", "0.49246922", "0.49237344", "0.49199504", "0.49157798", "0.49019003", "0.4900195", "0.48909533", "0.4890862", "0.48872757", "0.48867965", "0.48817363", "0.48777276", "0.48773795", "0.4875797", "0.487403", "0.4873666", "0.4869831", "0.48680344", "0.48656556", "0.48638403", "0.48597348" ]
0.0
-1
Create an emitter that generates the instruction needed to either store the TOS value into the variable (isStore==true) or push the variable's value onto the stack (isStore==false). The stack index must be set on var in the stackFrameSlot attribute.
public static Emitter makeEmitter( Variable var, boolean isStore ) { VariableInternal ivar = (VariableInternal)var ; Integer slot = ASMUtil.stackFrameSlot.get( ivar ) ; assert slot != null ; return new IntOperandEmitter( getVarInsnOpcode( ivar.type(), isStore ), slot ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public CodeFragment visitBlockAsgn(AlangParser.BlockAsgnContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n CodeFragment result = new CodeFragment();\n CodeFragment expr = visit(ctx.expression());\n\n result.addCode(expr);\n\n Variable v = this.getVariable(name);\n v.setHasValue();\n\n int arity = ctx.index_to_array().size();\n\n if (v.arity > 0) {\n if (!checkArityAssignment(v, arity)) {\n this.addError(ctx, name, \"Bad assignment to array\");\n return new CodeFragment(\"\");\n }\n }\n\n if (arity == 0) {\n result.addCode(String.format(\"store %s %s, %s* %s\\n\", v.llvmtype, expr.getRegister(), v.llvmtype, v.reg));\n } else {\n /* in case we assign to array */\n int pointers = ctx.index_to_array().size();\n ArrayList<String> registers = new ArrayList<String>();\n for (int i = 0; i < arity; i++) {\n CodeFragment index = visit(ctx.index_to_array(i).expression());\n result.addCode(index);\n registers.add(index.getRegister());\n }\n\n CodeFragment ptr = this.getPointerToArray(v, registers);\n result.addCode(ptr);\n\n ST store = this.group.getInstanceOf(\"store\");\n store.add(\"type\", v.llvmtype);\n store.add(\"reg\", expr.getRegister());\n store.add(\"where\", ptr.getRegister());\n result.addCode(store.render() + \"\\n\");\n }\n\n return result;\n }", "public static void store(String varName) {\n emit(newVariable(varName).getStore());\n }", "@Override\n public String generate() {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + variableSymbol + \" = alloca \" + variableLLVMType + \"\\n\";\n }", "private static int getVarInsnOpcode( Type type, boolean isStore ) {\n\tif (isStore) {\n\t if (!type.isPrimitive()) {\n\t\treturn ASTORE ;\n\t } else if (type == Type._float()) {\n\t\treturn FSTORE ;\n\t } else if (type == Type._double()) {\n\t\treturn DSTORE ;\n\t } else if (type == Type._long()) {\n\t\treturn LSTORE ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ISTORE ;\n\t }\n\t} else {\n\t if (!type.isPrimitive()) {\n\t\treturn ALOAD ;\n\t } else if (type == Type._float()) {\n\t\treturn FLOAD ;\n\t } else if (type == Type._double()) {\n\t\treturn DLOAD ;\n\t } else if (type == Type._long()) {\n\t\treturn LLOAD ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ILOAD ;\n\t }\n\t}\n }", "public void visitStoreInstruction(StoreInstruction o){\n\t\t//visitLocalVariableInstruction(o) is called before, because it is more generic.\n\n\t\tif (stack().isEmpty()){ // Don't bother about 1 or 2 stack slots used. This check is implicitely done below while type checking.\n\t\t\tconstraintViolated(o, \"Cannot STORE: Stack to read from is empty.\");\n\t\t}\n\n\t\tif ( (!(o instanceof ASTORE)) ){\n\t\t\tif (! (stack().peek() == o.getType(cpg)) ){// the other xSTORE types are singletons in BCEL.\n\t\t\t\tconstraintViolated(o, \"Stack top type and STOREing Instruction type mismatch: Stack top: '\"+stack().peek()+\"'; Instruction type: '\"+o.getType(cpg)+\"'.\");\n\t\t\t}\n\t\t}\n\t\telse{ // we deal with ASTORE\n\t\t\tType stacktop = stack().peek();\n\t\t\tif ( (!(stacktop instanceof ReferenceType)) && (!(stacktop instanceof ReturnaddressType)) ){\n\t\t\t\tconstraintViolated(o, \"Stack top type and STOREing Instruction type mismatch: Stack top: '\"+stack().peek()+\"'; Instruction expects a ReferenceType or a ReturnadressType.\");\n\t\t\t}\n\t\t\tif (stacktop instanceof ReferenceType){\n\t\t\t\treferenceTypeIsInitialized(o, (ReferenceType) stacktop);\n\t\t\t}\n\t\t}\n\t}", "public final Instruction store_op() throws RecognitionException {\r\n Instruction inst = null;\r\n\r\n\r\n Type t1 =null;\r\n\r\n Constant e1 =null;\r\n\r\n Type t2 =null;\r\n\r\n Constant e2 =null;\r\n\r\n int align60 =0;\r\n\r\n\r\n\r\n Constant dest = null;\r\n int opcode;\r\n boolean isVolatile = false;\r\n List<Type> types = new ArrayList<Type>();\r\n List<Constant> operands = new ArrayList<Constant>();\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:5: ( ( VOLATILE )? 'store' t1= first_class_type e1= expression ',' t2= pointer_type e2= expression ( ',' align )? )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:7: ( VOLATILE )? 'store' t1= first_class_type e1= expression ',' t2= pointer_type e2= expression ( ',' align )?\r\n {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:7: ( VOLATILE )?\r\n int alt51=2;\r\n int LA51_0 = input.LA(1);\r\n\r\n if ( (LA51_0==VOLATILE) ) {\r\n alt51=1;\r\n }\r\n switch (alt51) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:8: VOLATILE\r\n {\r\n match(input,VOLATILE,FOLLOW_VOLATILE_in_store_op2118); \r\n\r\n isVolatile=true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input,82,FOLLOW_82_in_store_op2124); \r\n\r\n opcode = InstType.storeInst;\r\n\r\n pushFollow(FOLLOW_first_class_type_in_store_op2139);\r\n t1=first_class_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_store_op2143);\r\n e1=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(t1); operands.add(e1);\r\n\r\n match(input,44,FOLLOW_44_in_store_op2146); \r\n\r\n pushFollow(FOLLOW_pointer_type_in_store_op2155);\r\n t2=pointer_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_store_op2159);\r\n e2=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(t2); operands.add(e2);\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:383:5: ( ',' align )?\r\n int alt52=2;\r\n int LA52_0 = input.LA(1);\r\n\r\n if ( (LA52_0==44) ) {\r\n alt52=1;\r\n }\r\n switch (alt52) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:383:6: ',' align\r\n {\r\n match(input,44,FOLLOW_44_in_store_op2168); \r\n\r\n pushFollow(FOLLOW_align_in_store_op2170);\r\n align60=align();\r\n\r\n state._fsp--;\r\n\r\n\r\n operands.add(valueFactory.createConstantValue(SimpleConstantValue.intConst, align60 + \"\"));\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n inst = instFactory.createLoadStoreInst(dest, opcode, operands, types, isVolatile);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return inst;\r\n }", "private void storeValue(Object value)\n {\n if (getParent() instanceof ValueSupport)\n {\n ((ValueSupport) getParent()).setValue(value);\n }\n\n if (getVar() != null)\n {\n getContext().setVariable(getVar(), value);\n }\n }", "public String generate(String registerName) {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + registerName + \" = alloca \" + variableLLVMType + \"\\n\";\n }", "public void MIPSme()\n\t{\n\t\t\n\t\tTEMP varAddress = null;\n\t\t//v := v - this is the right side of the assignment - we want to load the value of v from memory\n\t\tif (isRight){\n\t\t\tif(isParamFromStack){\n\t\t\t\t// we want value from stack\n\t\t\t\tsir_MIPS_a_lot.getInstance().loadFromFrame(dst,(this.localVarOffset+1)*4);\n\t\t\t}\n\t\t\t//need to be modified\n\t\t\telse{\n\t\t\t\tsir_MIPS_a_lot.getInstance().loadFromFrame(dst,-(this.localVarOffset+1)*4);\n\t\t\t}\n\t\t}\n\t\t//left side - we want to get variable address into temp t \n\t\telse{\n\t\t\t//variable is a parameter of a function\n\t\t\tif (isParamFromStack){\n\t\t\t\tvarAddress = sir_MIPS_a_lot.getInstance().addressParamVar(this.localVarOffset);\n\t\t\t}\n\t\t\t//for now it represents local variable but need to be changed.... (data members, globals...) \n\t\t\telse{\n\t\t\t\tvarAddress = sir_MIPS_a_lot.getInstance().addressLocalVar(this.localVarOffset);\n\t\t\t}\n\t\t\tsir_MIPS_a_lot.getInstance().move(dst,varAddress);\n\t\t}\n\t}", "Variable createVariable();", "Variable createVariable();", "public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;", "public interface AssignmentNode extends StackOperationNode {\n\n TemporaryVariableName getValueName();\n\n}", "public String visit(AStoreStmt n, Object argu)\r\n\t {\r\n\t\t int stackPos = 4*Integer.parseInt(n.f1.f1.f0.tokenImage);\r\n int RegNum = n.f2.f0.which;\r\n MipsOutPut.add(MipsOutPut.Space+\"sw \" + Regs.RegList[RegNum] +\", \" + stackPos + \"($sp) \\n\");\r\n return null;\r\n\t }", "public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }", "@Override String opStr() { return \"var\"; }", "@Override\n \tpublic void logVarCreated(String name, String type) {\n \t\tSystem.out.println(\"\\tVariable created: [\" + type + \"] \" + name );\n \t}", "public int store(int offset) {\n int result = runStack.get(runStack.size()-1);\n runStack.set(framePointers.peek()+offset, runStack.remove(runStack.size()-1));\n return result;\n }", "private void putVariable(String memVar, int value){\n\t\tram[Integer.parseInt(\n\t\t\t\tCharacter.toString(memVar.charAt(1)))]\n\t\t\t\t= value;\n\t}", "@Override\n\t\t\t\tpublic void push(State s) throws RPLException {\n\t\t\t\t\tif (function.containsCachedValue(values)) {\n\t\t\t\t\t\t// Push out rest\n\t\t\t\t\t\tboolean start = false;\n\t\t\t\t\t\tfor (RankedItem<Object> ci: getFunction().getCachedValue(values)) {\n\t\t\t\t\t\t\tState cs = new State(in.create(assignToVar, ci.item), ci.rank);\n\t\t\t\t\t\t\tif (!start && s.equals(cs)) {\n\t\t\t\t\t\t\t\tstart = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (start) {\n\t\t\t\t\t\t\t\tout.push(cs);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthrow stop;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tVarStore v = s.getVarStore();\n\t\t\t\t\t\tif (!v.containsVar(\"$return\")) {\n\t\t\t\t\t\t\tthrow new RPLMissingReturnValueException(function);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturnValues.add(new RankedItem<Object>(v.getValue(\"$return\"), s.getRank()));\n\t\t\t\t\t\tout.push(v.getParentOfClosure(assignToVar, new Variable(\"$return\")), s.getRank());\n\t\t\t\t\t}\n\t\t\t\t}", "void gen() {\n if (val != null) {\r\n\tX86.Operand r = val.gen_source_operand(true,X86.RAX); \r\n\tX86.emitMov(X86.Size.Q,r,X86.RAX);\r\n }\r\n // exit sequence\r\n // pop the frame\r\n if (frameSize != 0)\r\n\tX86.emit2(\"addq\",new X86.Imm(frameSize),X86.RSP);\r\n // restore any callee save registers\r\n for (int i = X86.calleeSaveRegs.length-1; i >= 0; i--) {\r\n\tX86.Reg r = X86.calleeSaveRegs[i]; \r\n\tif (env.containsValue(r))\r\n\t X86.emit1(\"popq\",r);\r\n }\r\n // and we're done\r\n X86.emit0(\"ret\");\r\n }", "public void storeIntegerVar(int index, int value) {\n\t\tstorage[index] = value;\n\t}", "public void emitWithOperand(OpCode opcode, int operandAddress){\n\t\t\n\t}", "public int store(int offset){\n return runStack.store(offset);\n }", "@Override\r\n public List<Machine.Instruction> emit() {\r\n\r\n List<Machine.Instruction> InstructionList = new LinkedList<Machine.Instruction>();\r\n InstructionList.add(new Machine.pushConstant(value));\r\n return InstructionList;\r\n\r\n }", "public final void mT__73() throws RecognitionException {\n try {\n int _type = T__73;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:141:7: ( 'store' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:141:9: 'store'\n {\n match(\"store\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "@Override\n public CodeFragment visitBlockVarDec(AlangParser.BlockVarDecContext ctx) {\n String name = ctx.ID().getText();\n\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n int arity = ctx.index_to_array().size();\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n String reg = this.generateNewRegister(false);\n\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n v.setArity(arity);\n this.vars.get(this.scope).put(name, v);\n\n CodeFragment result = new CodeFragment();\n result.setRegister(reg);\n if (llvmvartype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n\n if (arity > 0) {\n /* alloca n-dimensional array[a1]...[an] on stack with size a1*a2*...*an */\n v.setLocalArray();\n String prevreg = this.generateNewRegister(false);\n String newreg;\n result.addCode(String.format(\"%s = add i32 0, 1\\n\", prevreg));\n for (int i = 0; i < arity; i++) {\n CodeFragment exp = visit(ctx.index_to_array(i).expression());\n result.addCode(exp);\n v.addLevelReg(exp.getRegister());\n\n newreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", newreg, prevreg, exp.getRegister()));\n prevreg = newreg;\n }\n result.addCode(String.format(\"%s = alloca %s, i32 %s\\n\", reg, llvmvartype, prevreg));\n return result;\n }\n\n return this.generateNewDeclaration(reg, v.getLLVMDeclareType());\n }", "public void addStorage(StackType option);", "private static Store liftGlobals(ScriptNode script, Trace trace, Environment env, Store store) {\n\tSet<String> globals = GlobalVisitor.getGlobals(script);\n\tint i = -1000;\n\tfor (String global : globals) {\n\t Address address = trace.makeAddr(i, \"\");\n\t // Create a dummy variable declaration. This will not exist in the\n\t // output, because the value and variable initialization exists\n\t // outside the file.\n\t Name dummyVariable = new Name();\n\t env.strongUpdateNoCopy(global, Variable.inject(global, address, Change.bottom(),\n\t\t Dependencies.injectVariable(dummyVariable)));\n\t store = store.alloc(address,\n\t\t BValue.top(Change.u(), Dependencies.injectValue(dummyVariable)), dummyVariable);\n\t i--;\n\t}\n\n\treturn store;\n\n }", "@Override\n public void compile(LinkedList<Token> theStack, Compiler c) throws CompilerException {\n\n\tVariableToken vt;\n\tvt = c.getGlobalVariable(this.getTokenString());\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getLocalVariable(this.getTokenString());\n\t }\n\t}\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getParameter(this.getTokenString());\n\t }\n\t}\n\n\tif (vt == null) {\n\t throw new CompilerException(\"The variable \\\"\" + this.getTokenString() + \"\\\" cannot be used in an expression, as it is not a known variable in the current context!\");\n\t} else {\n\t NumberTokenFactory ntf = new NumberTokenFactory();\n\n//\t\t\tNumberToken nt = (NumberToken) ntf.create(Integer.toString(vt.getVariableID()), 0);\n\t //nt.compile(theStack, c);//when we compile the variable, we add the ID of the variable on the bytecode stack of the compiler c. We use NumberTokenFactory to decide, whether the ID is actually 1 byte long or 2 bytes long and then we add those bytes to the compiler bytecode stack.\n\t //theStack.pop();//well... the previous call had the side effect of placing the \"NumberToken\" on the working stack \"theStack\", which is not what we want, so we're removing it from the working stack here!\n\t extended = CompilableToken.compileNumber(vt.getVariableID(), c);\n\n\t //boolean extended = false;\n\t\t\t/*\n\t if (nt instanceof ByteNumberToken) {\n\t extended = false;\n\t } else {\n\t extended = true;\n\t }\n\t */\n\t this.type = vt.getType();\n\t this.context = vt.getContext();\n\n\t c.getByteCode().push(this);\n\n\t //TODO: Following code should have been here for ages, it seems suspicious\n\t // (impossible)\n\t //that everything even worked without it\n\t theStack.push(this.type);\n\t /*\n\t if (this.getType() == BYTE) {\n\t c.getByteCode().push(new PushByteVariableOnStackByteCodeToken(extended));\n\t theStack.push(new ByteNumberToken(\"0\"));\n\t } else if (this.getType() == INT) {\n\t c.getByteCode().push(new PushIntegerVariableOnStackByteCodeToken(extended));\n\t theStack.push(new IntegerNumberToken(\"0\"));\n\t } else {\n\t System.err.println(\"Cannot compile a variable reference; unknown variable type for variable \\\"\" + this.getTokenString() + \".\\\"\");\n\n\t }\n\t */\n\t}\n\n }", "@Override\n\tpublic Variable store(Variable variable) {\n\t\treturn variableJpaRepository.save(variable);\n\t}", "VariableExp createVariableExp();", "public void push(T value) {\n \tstack.add(value);\n }", "public void generateAssign(PhpWriter out, Expr value, boolean isTop)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n ExprGenerator valueGen = ((ExprPro) value).getGenerator();\n\n objGen.generateObject(out);\n out.print(\".putField(env, \");\n out.printIntern(_name);\n out.print(\", \");\n valueGen.generateCopy(out);\n out.print(\")\");\n }", "@Override\n public Expression assign(String var, Expression expression) {\n Expression e1 = getEx2().assign(var, expression);\n Expression e2 = getEx2().assign(var, expression);\n return new Log(e1, e2);\n }", "public String visit(VarDeclaration n, LLVMRedux argu) throws Exception {\n\n u.println(\"%\"+n.f1.accept(this, argu)+\" = alloca \"+n.f0.accept(this,argu));\n u.println(\"\");\n return null;\n }", "DynamicVariable createDynamicVariable();", "public void visitSASTORE(SASTORE o){\n\t\tif (stack().peek() != Type.INT){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'int', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tindexOfInt(o, stack().peek(1));\n\t\tif (stack().peek(2) == Type.NULL){\n\t\t\treturn;\n\t\t} \n\t\tif (! (stack().peek(2) instanceof ArrayType)){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type short[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t\tType t = ((ArrayType) (stack().peek(2))).getBasicType();\n\t\tif (t != Type.SHORT){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type short[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t}", "public void addToStack(String s, int adr){\n instructions.add(\"# start of adding variable to stack\");\n instructions.add(\"lw $a0, \" + adr + \"($fp)\");\n instructions.add(\"sw $a0, 0($sp)\");\n instructions.add(\"addiu $sp, $sp, -4\");\n instructions.add(\"# end of adding variable to stack\");\n }", "private void storeValue(String desc, int index) {\n\t\tif (desc.startsWith(\"L\") || desc.startsWith(\"[\")) {\n\t\t\tmv.visitInsn(DUP);\n\t\t\tmv.visitVarInsn(ASTORE, index);\n\t\t} else if (desc.startsWith(\"I\") || desc.startsWith(\"B\")\n\t\t\t\t|| desc.startsWith(\"S\") || desc.startsWith(\"Z\")\n\t\t\t\t|| desc.startsWith(\"C\")) {\n\t\t\tmv.visitInsn(DUP); //duplicate the value on top of stack\n\t\t\tmv.visitVarInsn(ISTORE, index); //store value to the #index variable\n\t\t} else if (desc.startsWith(\"J\")) {\n\t\t\tmv.visitInsn(DUP2);\n\t\t\tmv.visitVarInsn(LSTORE, index);\n\t\t\tmaxindex_cur++;\n\t\t} else if (desc.startsWith(\"F\")) {\n\t\t\tmv.visitInsn(DUP);\n\t\t\tmv.visitVarInsn(FSTORE, index);\n\t\t} else if (desc.startsWith(\"D\")) {\n\t\t\tmv.visitInsn(DUP2);\n\t\t\tmv.visitVarInsn(DSTORE, index);\n\t\t\tmaxindex_cur++;\n\t\t}\n\n\t\t// if(classname.equals(\"org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl\"))\n\t\t// System.out.println(\"Signature: \"+desc);\n\t}", "public Command createStoreCommand(Operand lhs, Operand rhs);", "@Override\n\tpublic void execute(Frame frame) {\n\t\tDSTORE._dstore(frame, 1);\n\t}", "public static Emitter makeEmitter( \n\tExpressionFactory.ArrayIndexExpression expr,\n\tboolean isStore ) {\n\tif (isStore) {\n\t return arrayStore ;\n\t} else {\n\t return arrayLoad ;\n\t}\n }", "VarAssignment createVarAssignment();", "private void _visitStackAccessor(Instruction o){\n\t\tint consume = o.consumeStack(cpg); // Stack values are always consumed first; then produced.\n\t\tif (consume > stack().slotsUsed()){\n\t\t\tconstraintViolated((Instruction) o, \"Cannot consume \"+consume+\" stack slots: only \"+stack().slotsUsed()+\" slot(s) left on stack!\\nStack:\\n\"+stack());\n\t\t}\n\n\t\tint produce = o.produceStack(cpg) - ((Instruction) o).consumeStack(cpg); // Stack values are always consumed first; then produced.\n\t\tif ( produce + stack().slotsUsed() > stack().maxStack() ){\n\t\t\tconstraintViolated((Instruction) o, \"Cannot produce \"+produce+\" stack slots: only \"+(stack().maxStack()-stack().slotsUsed())+\" free stack slot(s) left.\\nStack:\\n\"+stack());\n\t\t}\n\t}", "@Override\r\n public void visit(HStoreStmt n, Graph argu) {\r\n cur.addUse(Integer.parseInt(n.f1.f1.f0.tokenImage)); // Temp is used\r\n cur.addUse(Integer.parseInt(n.f3.f1.f0.tokenImage)); // Temp is used\r\n argu.addStatement(cur, true);\r\n }", "public VariableIF createVariable(VariableDecl decl);", "private void smem_variable_create(smem_variable_key variable_id, long variable_value) throws SQLException\n {\n final PreparedStatement var_create = db.var_create;\n \n var_create.setInt(1, variable_id.ordinal());\n var_create.setLong(2, variable_value);\n \n var_create.execute();\n }", "public void store(final String text, final String variableName);", "VarReference createVarReference();", "public void storeEval(final String expression, final String variableName);", "private void substituteStackPointerSet() {\n for (int i = 0; i < tokenization.size(); i++){\n\n if (tokenization.get(i).kind == Token.Kind.ASIS && tokenization.get(i).varName.strip().length() >= 4 && tokenization.get(i).varName.strip().substring(0,3).equals(\"xxx\")) {\n int stackNum = Integer.parseInt(tokenization.get(i).varName.substring(3));\n int stackAddressLower = (stackNum * Constants.stackSize + nextDataSegmentAddress) % 256;\n int upper = stackAddressLower / 16;\n int lower = stackAddressLower % 16;\n tokenization.get(i).varName = \"8\" + Integer.toHexString(upper) + Integer.toHexString(lower) + \"5\";\n tokenization.get(i).varName = \"8\" + Integer.toHexString(upper) + Integer.toHexString(lower) + \"5\";\n }\n else if (tokenization.get(i).kind == Token.Kind.ASIS && tokenization.get(i).varName.strip().length() >= 4 && tokenization.get(i).varName.strip().substring(0,3).equals(\"yyy\")) {\n int stackNum = Integer.parseInt(tokenization.get(i).varName.substring(3));\n int stackAddressUpper = (stackNum * Constants.stackSize + nextDataSegmentAddress) / 256;\n int upper = stackAddressUpper / 16;\n int lower = stackAddressUpper % 16;\n tokenization.get(i).varName = \"9\" + Integer.toHexString(upper) + Integer.toHexString(lower) + \"5\";\n tokenization.get(i).varName = \"9\" + Integer.toHexString(upper) + Integer.toHexString(lower) + \"5\";\n }\n }\n }", "public String visit(AssignmentStatement n, LLVMRedux argu) throws Exception {\n String Identifier = n.f0.accept(this, argu);\n String storeArg1 = u.decodeIdentifier(Identifier);\n String type = u.getIdentifierType(Identifier);\n String storeArg2 = n.f2.accept(this, argu);\n u.println(\"store \"+u.javaTypeToLLVMType(type)+\" \"+storeArg2+\", \"+u.pointer(u.javaTypeToLLVMType(type))+\" \"+storeArg1);\n return storeArg1;\n }", "@Override\n public CodeFragment visitVarDecStat(AlangParser.VarDecStatContext ctx) {\n String name = ctx.ID().getText();\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n\n String reg = this.generateNewRegister(true);\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n\n int arity = ctx.index_to_global_array().size();\n v.setArity(arity);\n if (arity > 0) {\n v.setGlobalArray();\n }\n\n for (int i = 0; i < arity; i++) {\n v.addLevel(Integer.valueOf(ctx.index_to_global_array(i).INT().getText()));\n }\n\n this.globals.put(name, v);\n\n return new CodeFragment(\"\");\n }", "@Override\n\t\t\tpublic Ast var(Var ast, Void arg) {\n\t\t\t\treturn super.var(ast, arg);\n\t\t\t}", "protected void sequence_Operand(ISerializationContext context, Operand semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "public static Emitter makeEmitter( \n\tExpressionFactory.NonStaticFieldAccessExpression expr,\n\tboolean isStore ) {\n\n\tType targetType = ((ExpressionInternal)expr.target()).type() ;\n\n\tClassInfo cinfo = targetType.classInfo() ;\n\tFieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ;\n\tif (fld == null) {\n\t throw new IllegalArgumentException( expr.fieldName() \n + \" is not a valid field in class \" + targetType.name() ) ;\n }\n\n\t// XXX we need access control checking here!!!\n\treturn makeFieldInsnEmitter( isStore, false, targetType, \n expr.fieldName(), fld.type() ) ;\n }", "public static void makeWriteOperation(int trans_id, int var_id, int var_value) {\n\n // System.out.println(\"makeWriteOperation\");\n System.out.println(\"T\" + trans_id + \" wishes to write x\" + var_id + \" to all available copies\");\n Transaction txn = null;\n Operation oper = new Operation(trans_id, var_id, var_value);\n\n if (transactions.containsKey(trans_id))\n txn = transactions.get(trans_id);\n\n if (txn != null) {\n writeOperation(txn, oper);\n } else {\n // aborted\n System.out.println(\"Aborted :T\" + trans_id);\n }\n\n }", "public static final <T> void m136539a(C0052o<T> oVar, T t) {\n C7573i.m23587b(oVar, \"$this$threadSoftValue\");\n if (C9653q.m28546a()) {\n oVar.setValue(t);\n } else {\n oVar.postValue(t);\n }\n }", "@Override\n public void enterInputs(FSMParser.InputsContext ctx) {\n for (int i = 0; i < ctx.getChildCount(); i++) {\n if (ctx.getChild(i) instanceof FSMParser.RegisterContext) {\n\n // if defining a new register\n FSMParser.RegisterContext regcont = (FSMParser.RegisterContext) ctx.getChild(i);\n Register reg = new Register(regcont.NAME().getText(), Integer.parseInt(regcont.getChild(1).getText()),\n true, false); //getChild(i-1) because size is always defined before the register\n\n this.comps.add(reg);\n this.regInputs.put(reg, new ArrayList<>());\n\n //if defining a new Variable\n } else if (ctx.getChild(i) instanceof FSMParser.VarContext) {\n FSMParser.VarContext varCont = (FSMParser.VarContext) ctx.getChild(i);\n\n // if this varaible is a clock (labled with C_)\n if (varCont.Clk() != null) {\n Var var = new Var(varCont.NAME().getText(), Integer.parseInt(varCont.getChild(1).getText()), true,\n false, false);\n VerilogComp.setClkName(var.getName());\n\n\n // if this varible is a reset(labled with R_)\n } else if (varCont.RESET() != null) {\n Var var = new Var(varCont.NAME().getText(), Integer.parseInt(varCont.getChild(1).getText()), true,\n false, false);\n VerilogComp.setResetName(var.getName());\n\n }\n // else just a standard variable\n else {\n Var var = new Var(varCont.NAME().getText(), Integer.parseInt(varCont.getChild(1).getText()), true,\n false, false);\n this.comps.add(var);\n\n }\n }\n\n }\n\n\n }", "public void mo38885a(C11113o oVar) {\n this.f30753x0 = oVar;\n }", "public Var_Act_Data(Action_Type type, Variable v1, Variable v2, int set_value) {\r\n super(type);\r\n var1 = v1;\r\n var2 = v2;\r\n set_val = set_value;\r\n }", "protected void sequence_VariableDirect(ISerializationContext context, VariableDirect semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__ALPHA) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__ALPHA));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__BETA) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__BETA));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getVariableDirectAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getVariableDirectAccess().getAlphaReelParserRuleCall_5_0(), semanticObject.getAlpha());\n\t\tfeeder.accept(grammarAccess.getVariableDirectAccess().getBetaReelParserRuleCall_8_0(), semanticObject.getBeta());\n\t\tfeeder.finish();\n\t}", "public void push(int x) {\n storeStack.push(x);\n }", "public void generateVar(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.generateVar(out);\n out.print(\".getFieldVar(env, \");\n out.printIntern(_name);\n out.print(\")\");\n }", "protected void sequence_VariableCalcule(ISerializationContext context, VariableCalcule semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getVariableCalculeAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getVariableCalculeAccess().getExpressionExpressionParserRuleCall_3_0(), semanticObject.getExpression());\n\t\tfeeder.finish();\n\t}", "public void variableChanged(VariableAttribute var);", "public IAspectVariable<V> createNewVariable(PartTarget target);", "public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }", "Variable getTargetVariable();", "@Override\r\n\tpublic void add(ShaderVar var) {\n\t\t\r\n\t}", "public final void store(final boolean store) {\n\t\tthis.store = store;\n\t}", "public void storeValue(final String elementLocator, final String variableName);", "public static Emitter makeEmitter( \n\tExpressionFactory.StaticFieldAccessExpression expr,\n\tboolean isStore ) {\n\tType targetType = expr.target() ;\n\n\tClassInfo cinfo = targetType.classInfo() ;\n\tFieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ;\n\tif (fld == null)\n\t throw new IllegalArgumentException( expr.fieldName() + \n\t\t\" is not a valid field in class \" + targetType.name() ) ;\n\n\t// XXX we need access control checking here!!!\n\n\treturn makeFieldInsnEmitter( isStore, true, targetType,\n\t expr.fieldName(), fld.type() ) ;\n }", "void emit(TrackerPayload payload);", "public abstract void mo53652a(PushCommand vVar);", "public void storeIntToVariable(int varid) {\n\t\tif (varid <= 3) {\n\t\t\tlines.append(\"istore_\");\n\t\t\tlines.append(varid);\n\t\t} else {\n\t\t\tlines.append(\"istore \");\n\t\t\tlines.append(varid);\n\t\t}\n\t\tlines.append(\"\\n\");\n\t}", "public void addGlobalToStack(int adr){\n instructions.add(\"# start of adding global variable to stack\");\n instructions.add(\"lw $a0, \" + adr + \"($gp)\");\n instructions.add(\"sw $a0, 0($sp)\");\n instructions.add(\"addiu $sp, $sp, -4\");\n instructions.add(\"# end of adding global variable to stack\");\n }", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Dynamic Stack\");\r\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 final PythonParser.with_var_return with_var() throws RecognitionException {\n PythonParser.with_var_return retval = new PythonParser.with_var_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token set172=null;\n PythonParser.expr_return expr173 = null;\n\n\n PythonTree set172_tree=null;\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:987:5: ( ( AS | NAME ) expr[expr_contextType.Store] )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:987:7: ( AS | NAME ) expr[expr_contextType.Store]\n {\n root_0 = (PythonTree)adaptor.nil();\n\n set172=(Token)input.LT(1);\n if ( input.LA(1)==NAME||input.LA(1)==AS ) {\n input.consume();\n if ( state.backtracking==0 ) adaptor.addChild(root_0, (PythonTree)adaptor.create(set172));\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n pushFollow(FOLLOW_expr_in_with_var4012);\n expr173=expr(expr_contextType.Store);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, expr173.getTree());\n if ( state.backtracking==0 ) {\n\n retval.etype = actions.castExpr((expr173!=null?((PythonTree)expr173.tree):null));\n \n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public DeclareEventHandlerNode(int var, Type type, SourceLocation sl) {\n\t\tsuper(sl);\n\t\tthis.var = var;\n this.type = type;\n\t}", "@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}", "@Converted(kind = Converted.Kind.MANUAL_COMPILATION,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp\", line = 1724,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitAtomicStore\", NM=\"_ZN5clang7CodeGen15CodeGenFunction15EmitAtomicStoreENS0_6RValueENS0_6LValueEN4llvm14AtomicOrderingEbb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction15EmitAtomicStoreENS0_6RValueENS0_6LValueEN4llvm14AtomicOrderingEbb\")\n//</editor-fold>\npublic final void EmitAtomicStore(RValue rvalue, LValue dest, \n AtomicOrdering AO, boolean IsVolatile, \n boolean isInit) {\n // If this is an aggregate r-value, it should agree in type except\n // maybe for address-space qualification.\n assert (!rvalue.isAggregate() || rvalue.getAggregateAddress().getElementType() == dest.getAddress().getElementType());\n \n AtomicInfo atomics/*J*/= new AtomicInfo(/*Deref*/$this(), dest);\n LValue LVal = new LValue(atomics.getAtomicLValue());\n \n // If this is an initialization, just put the value there normally.\n if (LVal.isSimple()) {\n if (isInit) {\n atomics.emitCopyIntoMemory(new RValue(rvalue));\n return;\n }\n \n // Check whether we should use a library call.\n if (atomics.shouldUseLibcall()) {\n CallArgList args = null;\n try {\n // Produce a source address.\n Address srcAddr = atomics.materializeRValue(new RValue(rvalue));\n \n // void __atomic_store(size_t size, void *mem, void *val, int order)\n args/*J*/= new CallArgList();\n args.add(RValue.get(atomics.getAtomicSizeValue()), \n $this().getContext().getSizeType().$QualType());\n args.add(RValue.get($this().EmitCastToVoidPtr(atomics.getAtomicPointer())), \n $this().getContext().VoidPtrTy.$QualType());\n args.add(RValue.get($this().EmitCastToVoidPtr(srcAddr.getPointer())), \n $this().getContext().VoidPtrTy.$QualType());\n args.add(RValue.get(ConstantInt.get(IntTy, $int2ulong(((int)AdtsupportLlvmGlobals.toCABI(AO).getValue())))), \n $this().getContext().IntTy.$QualType());\n CGAtomicStatics.emitAtomicLibcall(/*Deref*/$this(), new StringRef(/*KEEP_STR*/\"__atomic_store\"), $this().getContext().VoidTy.$QualType(), args);\n return;\n } finally {\n if (args != null) { args.$destroy(); }\n }\n }\n \n // Okay, we're doing this natively.\n Value /*P*/ intValue = atomics.convertRValueToInt(new RValue(rvalue));\n \n // Do the atomic store.\n Address addr = atomics.emitCastToAtomicIntPointer(atomics.getAtomicAddress());\n intValue = $this().Builder.CreateIntCast(intValue, addr.getElementType(), /*isSigned=*/ false);\n StoreInst /*P*/ store = $this().Builder.CreateStore(intValue, new Address(addr));\n \n // Initializations don't need to be atomic.\n if (!isInit) {\n store.setAtomic(AO);\n }\n \n // Other decoration.\n if (IsVolatile) {\n store.setVolatile(true);\n }\n if ((dest.getTBAAInfo() != null)) {\n $this().CGM.DecorateInstructionWithTBAA(store, dest.getTBAAInfo());\n }\n return;\n }\n \n // Emit simple atomic update operation.\n atomics.EmitAtomicUpdate(AO, new RValue(rvalue), IsVolatile);\n}", "public void generateAssignRef(PhpWriter out, Expr value, boolean isTop)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n ExprGenerator valueGen = ((ExprPro) value).getGenerator();\n\n objGen.generateObject(out);\n out.print(\".putField(env, \");\n out.printIntern(_name);\n out.print(\", \");\n valueGen.generateRef(out);\n out.print(\")\");\n }", "@Override\n public void invoke(Stack stack) {\n try {\n StackEffect se = (StackEffect) stack.pop().object;\n Symbol fieldName = (Symbol) stack.pop().object;\n Object instance = stack.pop().object;\n Object value = stack.pop().object;\n CheckedType className = se.getOutputTypes().get(0);\n\n Field field = Class.forName(className.toSymbol().symbol).getField(fieldName.symbol);\n field.set(instance,value);\n stack.push( new JavaType(instance.getClass()), instance );\n } catch (NoSuchFieldException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n }\n }", "@Override\n public Object visitVarSingleDeclarationAST(MiParser.VarSingleDeclarationASTContext ctx) {\n int tipo =(int) visit(ctx.typeDenoter());\n tabla.insertar(ctx.IDENT().getSymbol(),tipo,ctx);\n return null;\n }", "public void setValue(S s) { value = s; }", "Variable(String _var) {\n this._var = _var;\n }", "public void visitFSTORE(FSTORE o){\n\t\t//visitStoreInstruction(StoreInstruction) is called before.\n\t\t\n\t\t// Nothing else needs to be done here.\n\t}", "public void setValue(Winevt.EVT_VARIANT_TYPE type, Object value) {\n/* 272 */ allocateMemory();\n/* 273 */ if (type == null) {\n/* 274 */ throw new IllegalArgumentException(\"setValue must not be called with type set to NULL\");\n/* */ }\n/* 276 */ this.holder = null;\n/* 277 */ if (value == null || type == Winevt.EVT_VARIANT_TYPE.EvtVarTypeNull) {\n/* 278 */ this.Type = Winevt.EVT_VARIANT_TYPE.EvtVarTypeNull.ordinal();\n/* 279 */ this.Count = 0;\n/* 280 */ this.field1.writeField(\"pointerValue\", Pointer.NULL);\n/* */ } else {\n/* 282 */ switch (type) {\n/* */ case EvtVarTypeAnsiString:\n/* 284 */ if (value.getClass().isArray() && value.getClass().getComponentType() == String.class) {\n/* 285 */ this.Type = type.ordinal() | 0x80;\n/* 286 */ StringArray sa = new StringArray((String[])value, false);\n/* 287 */ this.holder = sa;\n/* 288 */ this.Count = ((String[])value).length;\n/* 289 */ this.field1.writeField(\"pointerValue\", sa); break;\n/* 290 */ } if (value.getClass() == String.class) {\n/* 291 */ this.Type = type.ordinal();\n/* 292 */ Memory mem = new Memory((((String)value).length() + 1));\n/* 293 */ mem.setString(0L, (String)value);\n/* 294 */ this.holder = mem;\n/* 295 */ this.Count = 0;\n/* 296 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* */ } \n/* 298 */ throw new IllegalArgumentException(type.name() + \" must be set from String/String[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeBoolean:\n/* 302 */ if (value.getClass().isArray() && value.getClass().getComponentType() == WinDef.BOOL.class) {\n/* 303 */ this.Type = type.ordinal() | 0x80;\n/* 304 */ Memory mem = new Memory((((WinDef.BOOL[])value).length * 4));\n/* 305 */ for (int i = 0; i < ((WinDef.BOOL[])value).length; i++) {\n/* 306 */ mem.setInt((i * 4), ((WinDef.BOOL[])value)[i].intValue());\n/* */ }\n/* 308 */ this.holder = mem;\n/* 309 */ this.Count = 0;\n/* 310 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 311 */ } if (value.getClass() == WinDef.BOOL.class) {\n/* 312 */ this.Type = type.ordinal();\n/* 313 */ this.Count = 0;\n/* 314 */ this.field1.writeField(\"intValue\", Integer.valueOf(((WinDef.BOOL)value).intValue())); break;\n/* */ } \n/* 316 */ throw new IllegalArgumentException(type.name() + \" must be set from BOOL/BOOL[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeString:\n/* */ case EvtVarTypeEvtXml:\n/* 321 */ if (value.getClass().isArray() && value.getClass().getComponentType() == String.class) {\n/* 322 */ this.Type = type.ordinal() | 0x80;\n/* 323 */ StringArray sa = new StringArray((String[])value, true);\n/* 324 */ this.holder = sa;\n/* 325 */ this.Count = ((String[])value).length;\n/* 326 */ this.field1.writeField(\"pointerValue\", sa); break;\n/* 327 */ } if (value.getClass() == String.class) {\n/* 328 */ this.Type = type.ordinal();\n/* 329 */ Memory mem = new Memory(((((String)value).length() + 1) * 2));\n/* 330 */ mem.setWideString(0L, (String)value);\n/* 331 */ this.holder = mem;\n/* 332 */ this.Count = 0;\n/* 333 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* */ } \n/* 335 */ throw new IllegalArgumentException(type.name() + \" must be set from String/String[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeSByte:\n/* */ case EvtVarTypeByte:\n/* 340 */ if (value.getClass().isArray() && value.getClass().getComponentType() == byte.class) {\n/* 341 */ this.Type = type.ordinal() | 0x80;\n/* 342 */ Memory mem = new Memory((((byte[])value).length * 1));\n/* 343 */ mem.write(0L, (byte[])value, 0, ((byte[])value).length);\n/* 344 */ this.holder = mem;\n/* 345 */ this.Count = 0;\n/* 346 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 347 */ } if (value.getClass() == byte.class) {\n/* 348 */ this.Type = type.ordinal();\n/* 349 */ this.Count = 0;\n/* 350 */ this.field1.writeField(\"byteValue\", value); break;\n/* */ } \n/* 352 */ throw new IllegalArgumentException(type.name() + \" must be set from byte/byte[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeInt16:\n/* */ case EvtVarTypeUInt16:\n/* 357 */ if (value.getClass().isArray() && value.getClass().getComponentType() == short.class) {\n/* 358 */ this.Type = type.ordinal() | 0x80;\n/* 359 */ Memory mem = new Memory((((short[])value).length * 2));\n/* 360 */ mem.write(0L, (short[])value, 0, ((short[])value).length);\n/* 361 */ this.holder = mem;\n/* 362 */ this.Count = 0;\n/* 363 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 364 */ } if (value.getClass() == short.class) {\n/* 365 */ this.Type = type.ordinal();\n/* 366 */ this.Count = 0;\n/* 367 */ this.field1.writeField(\"shortValue\", value); break;\n/* */ } \n/* 369 */ throw new IllegalArgumentException(type.name() + \" must be set from short/short[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeHexInt32:\n/* */ case EvtVarTypeInt32:\n/* */ case EvtVarTypeUInt32:\n/* 375 */ if (value.getClass().isArray() && value.getClass().getComponentType() == int.class) {\n/* 376 */ this.Type = type.ordinal() | 0x80;\n/* 377 */ Memory mem = new Memory((((int[])value).length * 4));\n/* 378 */ mem.write(0L, (int[])value, 0, ((int[])value).length);\n/* 379 */ this.holder = mem;\n/* 380 */ this.Count = 0;\n/* 381 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 382 */ } if (value.getClass() == int.class) {\n/* 383 */ this.Type = type.ordinal();\n/* 384 */ this.Count = 0;\n/* 385 */ this.field1.writeField(\"intValue\", value); break;\n/* */ } \n/* 387 */ throw new IllegalArgumentException(type.name() + \" must be set from int/int[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeHexInt64:\n/* */ case EvtVarTypeInt64:\n/* */ case EvtVarTypeUInt64:\n/* 393 */ if (value.getClass().isArray() && value.getClass().getComponentType() == long.class) {\n/* 394 */ this.Type = type.ordinal() | 0x80;\n/* 395 */ Memory mem = new Memory((((long[])value).length * 4));\n/* 396 */ mem.write(0L, (long[])value, 0, ((long[])value).length);\n/* 397 */ this.holder = mem;\n/* 398 */ this.Count = 0;\n/* 399 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 400 */ } if (value.getClass() == long.class) {\n/* 401 */ this.Type = type.ordinal();\n/* 402 */ this.Count = 0;\n/* 403 */ this.field1.writeField(\"longValue\", value); break;\n/* */ } \n/* 405 */ throw new IllegalArgumentException(type.name() + \" must be set from long/long[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeSingle:\n/* 409 */ if (value.getClass().isArray() && value.getClass().getComponentType() == float.class) {\n/* 410 */ this.Type = type.ordinal() | 0x80;\n/* 411 */ Memory mem = new Memory((((float[])value).length * 4));\n/* 412 */ mem.write(0L, (float[])value, 0, ((float[])value).length);\n/* 413 */ this.holder = mem;\n/* 414 */ this.Count = 0;\n/* 415 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 416 */ } if (value.getClass() == float.class) {\n/* 417 */ this.Type = type.ordinal();\n/* 418 */ this.Count = 0;\n/* 419 */ this.field1.writeField(\"floatValue\", value); break;\n/* */ } \n/* 421 */ throw new IllegalArgumentException(type.name() + \" must be set from float/float[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeDouble:\n/* 425 */ if (value.getClass().isArray() && value.getClass().getComponentType() == double.class) {\n/* 426 */ this.Type = type.ordinal() | 0x80;\n/* 427 */ Memory mem = new Memory((((double[])value).length * 4));\n/* 428 */ mem.write(0L, (double[])value, 0, ((double[])value).length);\n/* 429 */ this.holder = mem;\n/* 430 */ this.Count = 0;\n/* 431 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* 432 */ } if (value.getClass() == double.class) {\n/* 433 */ this.Type = type.ordinal();\n/* 434 */ this.Count = 0;\n/* 435 */ this.field1.writeField(\"doubleVal\", value); break;\n/* */ } \n/* 437 */ throw new IllegalArgumentException(type.name() + \" must be set from double/double[]\");\n/* */ \n/* */ \n/* */ case EvtVarTypeBinary:\n/* 441 */ if (value.getClass().isArray() && value.getClass().getComponentType() == byte.class) {\n/* 442 */ this.Type = type.ordinal();\n/* 443 */ Memory mem = new Memory((((byte[])value).length * 1));\n/* 444 */ mem.write(0L, (byte[])value, 0, ((byte[])value).length);\n/* 445 */ this.holder = mem;\n/* 446 */ this.Count = 0;\n/* 447 */ this.field1.writeField(\"pointerValue\", mem); break;\n/* */ } \n/* 449 */ throw new IllegalArgumentException(type.name() + \" must be set from byte[]\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default:\n/* 459 */ throw new IllegalStateException(String.format(\"NOT IMPLEMENTED: getValue(%s) (Array: %b, Count: %d)\", new Object[] { type, Boolean.valueOf(isArray()), Integer.valueOf(this.Count) }));\n/* */ } \n/* */ } \n/* 462 */ write();\n/* */ }", "public R visit(HStoreStmt n) {\n R _ret=null;\n n.f0.accept(this);\n //System.out.print(\"HSTORE \");\n simple_exp=0;\n String s = new String();\n s=\" \";\n int flag1=0;\n int flag3=0;\n String s1 = (String)n.f1.accept(this);\n \tif(simple_exp==0)\n \t\tflag1=1;\n \t/*else \n \t{\n \t\tint temp =new_temp++;\n \t\ts=s+\"MOVE TEMP \"+temp+\" \"+s1;\n \t}*/\n simple_exp=0;\n String s2 = (String)n.f2.accept(this);\n\t \t/*else \n\t \t{\n\t \t\tint temp =new_temp++;\n\t \t\ts=s+\"MOVE TEMP \"+temp+\" \"+s2;\n\t \t}*/\n simple_exp=0;\n String s3 = (String)n.f3.accept(this);\n if(simple_exp==0)\n \t\tflag3=1;\n \t\t/*else \n \t\t{\n \t\t\tint temp =new_temp++;\n \t\t\ts=s+\"MOVE TEMP \"+temp+\" \"+s1;\n \t\t}*/\n if(flag1==1 && flag3==0)\n {\n \t int temp =new_temp++;\n \t\t\ts=s+\"MOVE TEMP \"+temp+\" \"+s1;\n \t\t\ts=s+\"\\n HSTORE TEMP \"+temp+ \" \"+s2+\" \"+s3;\n }\n else if(flag3==1 && flag1==0)\n {\n \t int temp =new_temp++;\n \t s=s+\"MOVE TEMP \"+temp+\" \"+s3;\n \t s=s+\"\\n HSTORE \"+s1+ \" \"+s2+\" TEMP \"+temp;\n }\n else if(flag1==0 && flag3==0)\n {\n \t s=\"\\n HSTORE \"+s1+\" \"+s2+\" \"+s3;\n }\n else\n {\n \t int temp1 =new_temp++;\n \t int temp3 =new_temp++;\n \t s=s+\"\\n MOVE TEMP \"+temp1+\" \"+s1;\n \t s=s+\"\\n MOVE TEMP \"+temp3+\" \"+s3;\n \t s=s+\"\\n HSTORE TEMP \"+temp1+ \" \"+s2+\" TEMP \"+temp3; \n }\n \t simple_exp=0;\n return (R)s;\n }", "public interface Register {\n // M E T H O D S -------------------------------------------------------------------------\n\n /**\n * Returns the object to bind to the variable map for this workflow instance.\n *\n * @param context The current workflow context\n * @param entry The workflow entry. Note that this might be null, for example in a pre function\n * before the workflow has been initialised\n * @param args Map of arguments as set in the workflow descriptor\n *\n * @param ps\n * @return the object to bind to the variable map for this workflow instance\n */\n public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;\n}", "public LocalVariableGen addLocalVariable2(String name, Type type, InstructionHandle start) {\n/* 177 */ return addLocalVariable(name, type, this._slotAllocator.allocateSlot(type), start, null);\n/* */ }", "public void storeState(StateInfo stateInfo) {\n \n// Thread.dumpStack();\n super.storeState(stateInfo); \n \n JJStateInfo info = (JJStateInfo) stateInfo;\n info.setSubStates(lexan.getStateInfo());\n \n if (DEBUG) debug.println(\"Storing state [\"+ offset + \",\" + tokenOffset + \"]: \" + info + \"@\" + stopOffset); // NOI18N\n \n }", "InstrumentedType withTypeVariable(TypeVariableToken typeVariable);", "public boolean store(String str){\n if(stack.isEmpty()){\n System.out.println(\"the stack is empty\");\n return false;\n }\n variables.put(str,stack.pop());\n return true;\n }", "public void push(int stackNum, int value) {\n\t\tint index = stackNum * STACK_SIZE + stackPointer[stackNum] + 1;\n\t\tstackPointer[stackNum]++;\n\t\tbuffer[index] = value;\n\t}", "public void setVar128(java.lang.Boolean value) {\n this.var128 = value;\n }" ]
[ "0.5687055", "0.5685033", "0.5629114", "0.55759704", "0.55371386", "0.5467009", "0.53274035", "0.50779897", "0.5068366", "0.502208", "0.502208", "0.49920627", "0.4981525", "0.49796143", "0.4957389", "0.4904216", "0.4896358", "0.48962277", "0.48750377", "0.48646843", "0.48444924", "0.4840718", "0.4820288", "0.48176876", "0.47992554", "0.47874618", "0.47689414", "0.47562605", "0.47511113", "0.4741947", "0.4733726", "0.47324798", "0.47290143", "0.47122288", "0.4711791", "0.46979785", "0.469606", "0.46714544", "0.46700191", "0.46679604", "0.46654993", "0.4655706", "0.46497375", "0.4637674", "0.46370628", "0.46317768", "0.4596866", "0.459246", "0.45882258", "0.45750818", "0.45654333", "0.45599064", "0.45570725", "0.45457563", "0.45435253", "0.45410278", "0.45407143", "0.45302504", "0.45265642", "0.45017013", "0.44983667", "0.44942084", "0.4486997", "0.447649", "0.44760695", "0.44661367", "0.44639745", "0.44619682", "0.4454401", "0.4441078", "0.44365978", "0.44338223", "0.44307807", "0.44267234", "0.44210827", "0.4414484", "0.44080254", "0.44014496", "0.43899122", "0.4380518", "0.43710953", "0.43691522", "0.43690515", "0.43684092", "0.43683338", "0.43646196", "0.43634853", "0.43562442", "0.434783", "0.43464884", "0.43433675", "0.43421513", "0.43364286", "0.43325645", "0.43316147", "0.4331546", "0.43228537", "0.43202904", "0.431962", "0.43177772" ]
0.7086374
0
XXX refactor makeEmitter methods for FieldAccessExpression: most of the code is shareable. Create an emitter that generates the instruction needed to either store the TOS value into the nonstatic field (isStore==true) or push the nonstatic fields's value onto the stack (isStore==false).
public static Emitter makeEmitter( ExpressionFactory.NonStaticFieldAccessExpression expr, boolean isStore ) { Type targetType = ((ExpressionInternal)expr.target()).type() ; ClassInfo cinfo = targetType.classInfo() ; FieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ; if (fld == null) { throw new IllegalArgumentException( expr.fieldName() + " is not a valid field in class " + targetType.name() ) ; } // XXX we need access control checking here!!! return makeFieldInsnEmitter( isStore, false, targetType, expr.fieldName(), fld.type() ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Emitter makeEmitter( \n\tExpressionFactory.StaticFieldAccessExpression expr,\n\tboolean isStore ) {\n\tType targetType = expr.target() ;\n\n\tClassInfo cinfo = targetType.classInfo() ;\n\tFieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ;\n\tif (fld == null)\n\t throw new IllegalArgumentException( expr.fieldName() + \n\t\t\" is not a valid field in class \" + targetType.name() ) ;\n\n\t// XXX we need access control checking here!!!\n\n\treturn makeFieldInsnEmitter( isStore, true, targetType,\n\t expr.fieldName(), fld.type() ) ;\n }", "public static Emitter makeEmitter( Variable var, boolean isStore ) {\n VariableInternal ivar = (VariableInternal)var ;\n\tInteger slot = ASMUtil.stackFrameSlot.get( ivar ) ;\n\tassert slot != null ;\n\treturn new IntOperandEmitter( getVarInsnOpcode( ivar.type(), isStore ),\n\t slot ) ;\n }", "@Override\n public void visitFieldInsn(int opcode, String owner, String name, String desc) {\n // GETFIELD I,F,L,D + B,S\n if ((opcode == Opcodes.GETFIELD)) {\n if (desc.equals(\"I\")) {\n if (this.shouldMutate(\"Incremented (++a) integer field \" + name)) {\n mv.visitInsn(Opcodes.DUP); // stack = .. [ref] [ref]\n mv.visitFieldInsn(opcode, owner, name, desc); // stack = ... [ref] [ref.field]\n mv.visitInsn(Opcodes.ICONST_1); // stack = ... [ref] [ref.field] [1]\n mv.visitInsn(Opcodes.IADD); // stack = ... [ref] [ref.field + 1]\n mv.visitInsn(Opcodes.DUP_X1); // stack = ... [ref.field +1] [ref] [ref.field +1]\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); // stack = ... [ref.field +1]\n return;\n }\n }\n if (desc.equals(\"F\")) {\n if (this.shouldMutate(\"Incremented (++a) float field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.FCONST_1);\n mv.visitInsn(Opcodes.FADD);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"J\")) {\n if (this.shouldMutate(\"Incremented (++a) long field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.LCONST_1);\n mv.visitInsn(Opcodes.LADD);\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"D\")) {\n if (this.shouldMutate(\"Incremented (++a) double field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.DCONST_1);\n mv.visitInsn(Opcodes.DADD);\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"B\")) {\n if (this.shouldMutate(\"Incremented (++a) byte field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2B);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"S\")) {\n if (this.shouldMutate(\"Incremented (++a) short field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2S);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n }\n\n // GETSTATIC I,F,L,D + B,S\n if (opcode == Opcodes.GETSTATIC) {\n if (desc.equals(\"I\")) {\n if (this.shouldMutate(\"Incremented (++a) static integer field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"F\")) {\n if (this.shouldMutate(\"Incremented (++a) static float field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.FCONST_1);\n mv.visitInsn(Opcodes.FADD);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"J\")) {\n if (this.shouldMutate(\"Incremented (++a) static long field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.LCONST_1);\n mv.visitInsn(Opcodes.LADD);\n mv.visitInsn(Opcodes.DUP2);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"D\")) {\n if (this.shouldMutate(\"Incremented (++a) static double field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.DCONST_1);\n mv.visitInsn(Opcodes.DADD);\n mv.visitInsn(Opcodes.DUP2);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"B\")) {\n if (this.shouldMutate(\"Incremented (++a) static byte field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2B);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"S\")) {\n if (this.shouldMutate(\"Incremented (++a) static short field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2S);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n }\n mv.visitFieldInsn(opcode, owner, name, desc);\n }", "@Override\n public void invoke(Stack stack) {\n try {\n StackEffect se = (StackEffect) stack.pop().object;\n Symbol fieldName = (Symbol) stack.pop().object;\n Object instance = stack.pop().object;\n Object value = stack.pop().object;\n CheckedType className = se.getOutputTypes().get(0);\n\n Field field = Class.forName(className.toSymbol().symbol).getField(fieldName.symbol);\n field.set(instance,value);\n stack.push( new JavaType(instance.getClass()), instance );\n } catch (NoSuchFieldException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n }\n }", "@Override\r\n public List<Machine.Instruction> emit() {\r\n\r\n List<Machine.Instruction> InstructionList = new LinkedList<Machine.Instruction>();\r\n InstructionList.add(new Machine.pushConstant(value));\r\n return InstructionList;\r\n\r\n }", "@Override\n\tpublic void outAFieldAccessExpr(AFieldAccessExpr node) {\n\t\tType target = nodeTypes.get(node.getTarget());\n\t\tClassAttributes c = topLevelSymbolTable.get(target.getTypeName());\n\t\tVariableAttributes f = c.getField(node.getId().getText()); \n\t\til.append(fi.createGetField(getName(target), node.getId().getText(), getBecelType(f.getType())));\n\t\tunboxIt(f.getType()); \n\t}", "private void informSchedulerAboutFieldAccess(boolean isBefore, boolean isRead, String fieldOwner, String fieldName, String fieldDesc) {\n super.mv.visitInsn(isRead ? Opcodes.ICONST_1 : Opcodes.ICONST_0);\n super.mv.visitLdcInsn(fieldOwner);\n super.mv.visitLdcInsn(fieldName);\n super.mv.visitLdcInsn(fieldDesc);\n if (isBefore) {\n super.mv.visitMethodInsn(Opcodes.INVOKESTATIC, RVInstrumentor.INSTR_EVENTS_RECEIVER, BEFORE_FIELD_ACCESS, BOOL_3STRINGS_VOID);\n } else {\n super.mv.visitMethodInsn(Opcodes.INVOKESTATIC, RVInstrumentor.INSTR_EVENTS_RECEIVER, AFTER_FIELD_ACCESS, BOOL_3STRINGS_VOID);\n }\n }", "@Override\n public void visitFieldInsn(int opcode, String owner, String name, String desc) {\n if(!isFinal(owner, name)) {\n if (isFieldRead(opcode)) {\n callBeforeGetField(opcode, owner, name, getClassName(), getMethodName(), getLastLineNumber());\n } else if(isFieldUpdate(opcode)) {\n callBeforeSetField(opcode, owner, name, Type.getType(desc), getClassName(), getMethodName(), getLastLineNumber());\n }\n }\n\n super.visitFieldInsn(opcode, owner, name, desc);\n }", "public static Emitter makeEmitter( \n\tExpressionFactory.ArrayIndexExpression expr,\n\tboolean isStore ) {\n\tif (isStore) {\n\t return arrayStore ;\n\t} else {\n\t return arrayLoad ;\n\t}\n }", "public FieldTransformer makeFieldTransformer(Value symbol, Stmt stmt, String op) {\n throw new RuntimeException(\"makeFieldTransformer(symbol, stmt) not implemented in factory \"\n + this.getClass().toString());\n }", "public void interceptPutField(int opcode, String owner, String name, String desc) {\n FieldDefinition fieldDefn = classDefn.managedFields.get(name);\n if (fieldDefn != null && !isCurrentMethodAccessorOfField(name)) {\n if (fieldDefn.isCollection() && (fieldDefn.isEntity() || fieldDefn.isEmbedded())) {\n super.visitFieldInsn(opcode, owner, name, desc);\n return;\n }\n char[] field = name.toCharArray();\n field[0] = Character.toUpperCase(field[0]);\n String getterMethodName = \"get\" + String.valueOf(field);\n String getterMethodDesc = \"()\" + desc;\n \n /* inject preSet before PUTFIELD and postSet after PUTFIELD\n */ \n // at this point stack has (..., [this], [fieldX]) which is ready for PUTFIELD \n // push [this]\n mv.visitVarInsn(ALOAD, 0);\n // stack has (..., [this], [fieldX], [this])\n mv.visitInsn(DUP2);\n // stack has (..., [this], [fieldX], [this], [fieldX], [this])\n // push \"fieldX\"\n mv.visitLdcInsn(name);\n // stack has (..., [this], [fieldX], [this], [fieldX], [this], \"fieldX\")\n mv.visitInsn(DUP_X2);\n // stack has (..., [this], [fieldX], [this], \"fieldX\", [fieldX], [this], \"fieldX\")\n // pop \n mv.visitInsn(POP);\n // stack has (..., [this], [fieldX], [this], \"fieldX\", [fieldX], [this])\n // invoke getFieldX()\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, getterMethodName, getterMethodDesc);\n // stack has (..., [this], [fieldX], [this], \"fieldX\", [fieldX], getFieldX())\n mv.visitInsn(SWAP);\n // stack has (..., [this], [fieldX], [this], \"fieldX\", getFieldX(), [fieldX])\n if (fieldDefn.isEntity()) {\n // invoke preSet(\"fieldX\", getFieldX(), [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preSetMethodName, preSetMethodDesc);\n } else if (fieldDefn.isEmbedded()) {\n // invoke preSetEmbedded(\"fieldX\", getFieldX(), [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preSetEmbeddedMethodName, preSetEmbeddedMethodDesc);\n } else if (fieldDefn.isBasic()) {\n // invoke preSetBasic(\"fieldX\", getFieldX(), [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preSetBasicMethodName, preSetBasicMethodDesc);\n } else {\n // invoke preSetAmbiguous(\"fieldX\", getFieldX(), [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preSetAmbiguousMethodName, preSetAmbiguousMethodDesc);\n }\n // stack has (..., [this], [fieldX], preSet())\n // DUP IRETURN value of preSet() beneath third word\n mv.visitInsn(DUP_X2);\n // stack has (..., preSet(), [this], [fieldX], preSet())\n mv.visitInsn(POP);\n // stack has (..., preSet(), [this], [fieldX])\n mv.visitInsn(DUP_X2);\n // stack has (..., [fieldX], preSet(), [this], [fieldX])\n \n // PUTFIELD in [this].[fieldX]\n super.visitFieldInsn(opcode, owner, name, desc);\n // stack has (..., [fieldX], preSet())\n \n /* inject postSet after PUTFIELD\n if (IRETURN value of preSet() is false && [this].[fieldX] == [fieldX])\n postSet...\n */\n Label label1 = new Label();\n // stack has (..., [fieldX], preSet())\n // if true goto label, there is not change by PUTFIELD\n mv.visitJumpInsn(IFGT, label1);\n // stack has (..., [fieldX])\n mv.visitInsn(DUP);\n // stack has (..., [fieldX], [fieldX])\n // push [this]\n mv.visitVarInsn(ALOAD, 0); \n // stack has (..., [fieldX], [fieldX], [this])\n // get [this].[fieldX]\n mv.visitFieldInsn(GETFIELD, classDefn.internalClassName, name, desc);\n // stack has (..., [fieldX], [fieldX], [this].[fieldX])\n // if ([this].[fieldX] == [fieldX])\n mv.visitJumpInsn(IF_ACMPNE, label1); // jump if !=\n // stack has (..., [fieldX])\n // push [this]\n mv.visitVarInsn(ALOAD, 0);\n // stack has (..., [fieldX], [this])\n mv.visitInsn(SWAP);\n // stack has (..., [this], [fieldX])\n // push \"fieldX\"\n mv.visitLdcInsn(name);\n // stack has (..., [this], [fieldX], \"fieldX\")\n mv.visitInsn(SWAP);\n // stack has (..., [this], \"fieldX\", [fieldX])\n if (fieldDefn.isEntity()) {\n // stack has (..., [this], \"fieldX\", [fieldX])\n mv.visitInsn(POP);\n // stack has (..., [this], \"fieldX\") \n // invoke postSet(\"fieldX\")\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n postSetMethodName, postSetMethodDesc);\n // stack has (...)\n } else if (fieldDefn.isEmbedded()) {\n // stack has (..., [this], \"fieldX\", [fieldX])\n // invoke postSetEmbedded(\"fieldX\", [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n postSetEmbeddedMethodName, postSetEmbeddedMethodDesc);\n // stack has (...)\n } else if (fieldDefn.isBasic()) {\n // stack has (..., [this], \"fieldX\", [fieldX])\n // invoke postSetBasic(\"fieldX\", [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n postSetBasicMethodName, postSetBasicMethodDesc);\n // stack has (...)\n } else {\n // stack has (..., [this], \"fieldX\", [fieldX])\n // invoke postSetAmbiguous(\"fieldX\", [fieldX])\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n postSetAmbiguousMethodName, postSetAmbiguousMethodDesc);\n // stack has (...)\n }\n Label label2 = new Label();\n mv.visitJumpInsn(GOTO, label2);\n // label1:\n mv.visitLabel(label1);\n // stack has (..., [fieldX])\n mv.visitInsn(POP);\n // stack has (...)\n // label2:\n mv.visitLabel(label2);\n // stack has (...)\n\n // Frame TODO\n // mv.visitFrame(F_SAME, 0, null, 0, null);\n if (oprandStackIncrement < 9) {\n oprandStackIncrement = 9;\n }\n return;\n }\n super.visitFieldInsn(opcode, owner, name, desc);\n }", "public static boolean handleStaticFieldWrite(Node sf, Node x, Node m) {\n\t\tif(ImmutabilityPreferences.isInferenceRuleLoggingEnabled()){\n\t\t\tString values = \"x:\" + getTypes(x).toString() + \", sf:\" + getTypes(sf).toString() + \", m:\" + getTypes(m).toString();\n\t\t\tLog.info(\"TSWRITE (sf=x in m, sf=\" + sf.getAttr(XCSG.name) + \", x=\" + x.getAttr(XCSG.name) + \", m=\" + m.getAttr(XCSG.name) + \")\\n\" + values);\n\t\t}\n\t\t// a write to a static field means the containing method cannot be pure (readonly or polyread)\n\t\treturn removeTypes(m, ImmutabilityTypes.READONLY, ImmutabilityTypes.POLYREAD);\n\t}", "private void _visitStackAccessor(Instruction o){\n\t\tint consume = o.consumeStack(cpg); // Stack values are always consumed first; then produced.\n\t\tif (consume > stack().slotsUsed()){\n\t\t\tconstraintViolated((Instruction) o, \"Cannot consume \"+consume+\" stack slots: only \"+stack().slotsUsed()+\" slot(s) left on stack!\\nStack:\\n\"+stack());\n\t\t}\n\n\t\tint produce = o.produceStack(cpg) - ((Instruction) o).consumeStack(cpg); // Stack values are always consumed first; then produced.\n\t\tif ( produce + stack().slotsUsed() > stack().maxStack() ){\n\t\t\tconstraintViolated((Instruction) o, \"Cannot produce \"+produce+\" stack slots: only \"+(stack().maxStack()-stack().slotsUsed())+\" free stack slot(s) left.\\nStack:\\n\"+stack());\n\t\t}\n\t}", "public FieldInsnEmitter( int opcode, String owner, String name, \n\t String desc ) {\n\t check( visitFieldInsnSet, opcode ) ;\n\t this.opcode = opcode ;\n\t this.owner = owner ;\n\t this.name = name ;\n\t this.desc = desc ;\n\t}", "public void visit(BinFieldInvocationExpression x){\n }", "@Override\n\tpublic void VisitGetFieldNode(GetFieldNode Node) {\n\n\t}", "@Override\n public Expression visit(MemberNode node) {\n Expression expression = transformExpression(node.getExpression());\n node.setInstance (expression);\n if (!node.getType().isFunction()) {\n Expression offset = ptrdiff(node.getOffset());\n Expression address = new Binary(ptr_t(), Op.ADD, expression, offset);\n return memory(address, node.getType());\n }\n else {\n java.lang.String typeName = node.getTypeName();\n Entity entity = ast.getTypeDefinition(typeName).getScope().get(node.getName());\n return ref (entity);\n }\n }", "InstrumentedType withField(FieldDescription.Token token);", "@Override // kotlinx.coroutines.flow.FlowCollector\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public java.lang.Object emit(java.lang.Object r9, kotlin.coroutines.Continuation r10) {\n /*\n r8 = this;\n boolean r0 = r10 instanceof kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.AnonymousClass1\n if (r0 == 0) goto L_0x0013\n r0 = r10\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1 r0 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.AnonymousClass1) r0\n int r1 = r0.label\n r2 = -2147483648(0xffffffff80000000, float:-0.0)\n r3 = r1 & r2\n if (r3 == 0) goto L_0x0013\n int r1 = r1 - r2\n r0.label = r1\n goto L_0x0018\n L_0x0013:\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1 r0 = new kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1\n r0.<init>(r10)\n L_0x0018:\n java.lang.Object r10 = r0.result\n java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()\n int r2 = r0.label\n r3 = 2\n r4 = 1\n if (r2 == 0) goto L_0x005e\n if (r2 == r4) goto L_0x0044\n if (r2 != r3) goto L_0x003c\n java.lang.Object r8 = r0.L$6\n kotlinx.coroutines.flow.FlowCollector r8 = (kotlinx.coroutines.flow.FlowCollector) r8\n java.lang.Object r8 = r0.L$4\n kotlin.coroutines.Continuation r8 = (kotlin.coroutines.Continuation) r8\n java.lang.Object r8 = r0.L$2\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1 r8 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.AnonymousClass1) r8\n java.lang.Object r8 = r0.L$0\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2 r8 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2) r8\n kotlin.ResultKt.throwOnFailure(r10)\n goto L_0x009b\n L_0x003c:\n java.lang.IllegalStateException r8 = new java.lang.IllegalStateException\n java.lang.String r9 = \"call to 'resume' before 'invoke' with coroutine\"\n r8.<init>(r9)\n throw r8\n L_0x0044:\n java.lang.Object r8 = r0.L$6\n kotlinx.coroutines.flow.FlowCollector r8 = (kotlinx.coroutines.flow.FlowCollector) r8\n java.lang.Object r9 = r0.L$5\n java.lang.Object r2 = r0.L$4\n kotlin.coroutines.Continuation r2 = (kotlin.coroutines.Continuation) r2\n java.lang.Object r4 = r0.L$3\n java.lang.Object r5 = r0.L$2\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1 r5 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.AnonymousClass1) r5\n java.lang.Object r6 = r0.L$1\n java.lang.Object r7 = r0.L$0\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2 r7 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2) r7\n kotlin.ResultKt.throwOnFailure(r10)\n goto L_0x0084\n L_0x005e:\n kotlin.ResultKt.throwOnFailure(r10)\n kotlinx.coroutines.flow.FlowCollector r10 = kotlinx.coroutines.flow.FlowCollector.this\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1 r2 = r2\n kotlin.jvm.functions.Function2 r2 = r2.$action$inlined\n r0.L$0 = r8\n r0.L$1 = r9\n r0.L$2 = r0\n r0.L$3 = r9\n r0.L$4 = r0\n r0.L$5 = r9\n r0.L$6 = r10\n r0.label = r4\n java.lang.Object r2 = r2.invoke(r9, r0)\n if (r2 != r1) goto L_0x007e\n return r1\n L_0x007e:\n r7 = r8\n r4 = r9\n r6 = r4\n r8 = r10\n r2 = r0\n r5 = r2\n L_0x0084:\n r0.L$0 = r7\n r0.L$1 = r6\n r0.L$2 = r5\n r0.L$3 = r4\n r0.L$4 = r2\n r0.L$5 = r9\n r0.L$6 = r8\n r0.label = r3\n java.lang.Object r10 = r8.emit(r9, r0)\n if (r10 != r1) goto L_0x009b\n return r1\n L_0x009b:\n return r10\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object\");\n }", "public void generateAssign(PhpWriter out, Expr value, boolean isTop)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n ExprGenerator valueGen = ((ExprPro) value).getGenerator();\n\n objGen.generateObject(out);\n out.print(\".putField(env, \");\n out.printIntern(_name);\n out.print(\", \");\n valueGen.generateCopy(out);\n out.print(\")\");\n }", "private void taint(Value v, Unit d, Set<FlowAbstraction> out) {\n if(v instanceof Local) {\n out.add(new FlowAbstraction(d, (Local)v));\n } else {\n FieldRef ref = (FieldRef) v;\n // add a tag to the declaring class, which marks it tainted\n ref.getField().getDeclaringClass().addTag(new Tainted(\"class contains tainted field [\" + ref.getField().getName()+\"]\"));\n // add the field to the set of taints\n out.add(new FlowAbstraction(d, ref.getField()));\n }\n }", "InstrumentedType withAuxiliaryField(FieldDescription.Token token, Object value);", "void gen() {\n if (val != null) {\r\n\tX86.Operand r = val.gen_source_operand(true,X86.RAX); \r\n\tX86.emitMov(X86.Size.Q,r,X86.RAX);\r\n }\r\n // exit sequence\r\n // pop the frame\r\n if (frameSize != 0)\r\n\tX86.emit2(\"addq\",new X86.Imm(frameSize),X86.RSP);\r\n // restore any callee save registers\r\n for (int i = X86.calleeSaveRegs.length-1; i >= 0; i--) {\r\n\tX86.Reg r = X86.calleeSaveRegs[i]; \r\n\tif (env.containsValue(r))\r\n\t X86.emit1(\"popq\",r);\r\n }\r\n // and we're done\r\n X86.emit0(\"ret\");\r\n }", "public void emitWithOperand(OpCode opcode, int operandAddress){\n\t\t\n\t}", "protected void cloneValAtTopOfStack(String typeOfField) {\n _generateClone(typeOfField, Constants.OUTER_COPY_METHOD_NAME, null, false);\n }", "@AfterReturning(marker = BytecodeMarker.class, args = \"GETFIELD\", scope = \"TargetClass.printInstanceFields\", order = 0)\n public static void printInstanceFieldsRead (final FieldAccessStaticContext fasc, final DynamicContext dc) {\n if (\"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\".equals (fasc.getOwnerInternalName ())) {\n System.out.printf (\"disl: %s=%s\\n\", fasc.getName (), dc.getInstanceFieldValue (\n dc.getThis (), fasc.getOwnerInternalName (), fasc.getName (), fasc.getDescriptor (), Object.class\n ));\n }\n }", "@Override\r\n public DataField[] registerAndGetStructure() throws RuntimeException{ \r\n \tDataField[] s = getActiveAddressBean().getOutputStructure();\r\n \tif (s == null){throw new RuntimeException(\"Direct Push wrapper has an undefined output structure.\");}\r\n \treturn s;\r\n }", "private void addAccessor(ThreadContext context, String internedName, Visibility visibility, boolean readable, boolean writeable) {\n assert internedName == internedName.intern() : internedName + \" is not interned\";\n \n final Ruby runtime = context.getRuntime();\n \n if (visibility == PRIVATE) {\n //FIXME warning\n } else if (visibility == MODULE_FUNCTION) {\n visibility = PRIVATE;\n // FIXME warning\n }\n final String variableName = (\"@\" + internedName).intern();\n if (readable) {\n addMethod(internedName, new JavaMethodZero(this, visibility, CallConfiguration.FrameNoneScopeNone) {\n private RubyClass.VariableAccessor accessor = RubyClass.VariableAccessor.DUMMY_ACCESSOR;\n public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) {\n IRubyObject variable = (IRubyObject)verifyAccessor(self.getMetaClass().getRealClass()).get(self);\n \n return variable == null ? runtime.getNil() : variable;\n }\n \n private RubyClass.VariableAccessor verifyAccessor(RubyClass cls) {\n RubyClass.VariableAccessor localAccessor = accessor;\n if (localAccessor.getClassId() != cls.hashCode()) {\n localAccessor = cls.getVariableAccessorForRead(variableName);\n accessor = localAccessor;\n }\n return localAccessor;\n }\n });\n callMethod(context, \"method_added\", runtime.fastNewSymbol(internedName));\n }\n if (writeable) {\n internedName = (internedName + \"=\").intern();\n addMethod(internedName, new JavaMethodOne(this, visibility, CallConfiguration.FrameNoneScopeNone) {\n private RubyClass.VariableAccessor accessor = RubyClass.VariableAccessor.DUMMY_ACCESSOR;\n public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg1) {\n verifyAccessor(self.getMetaClass().getRealClass()).set(self, arg1);\n return arg1;\n }\n \n private RubyClass.VariableAccessor verifyAccessor(RubyClass cls) {\n RubyClass.VariableAccessor localAccessor = accessor;\n if (localAccessor.getClassId() != cls.hashCode()) {\n localAccessor = cls.getVariableAccessorForWrite(variableName);\n accessor = localAccessor;\n }\n return localAccessor;\n }\n });\n callMethod(context, \"method_added\", runtime.fastNewSymbol(internedName));\n }\n }", "@Override\n public Object visitExprField(ExprField ef) {\n Type tb = getType(ef.getLeft());\n String struct = tb.toString();\n Finality f = getFieldFinality(struct, ef.getName());\n if (f == Finality.UNKNOWN) {\n setFieldFinality(struct, ef.getName(), Finality.NOTFINAL);\n }\n if (f == Finality.FINAL) {\n throw new TypeErrorException(\": Using final field \" + ef +\n \" in the LHS of an assignment.\", ef);\n }\n if (f == Finality.FIRSTWRITE) {\n assert false : \"This is a bug\";\n }\n return ef;\n }", "public void generateVar(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.generateVar(out);\n out.print(\".getFieldVar(env, \");\n out.printIntern(_name);\n out.print(\")\");\n }", "public void generateRef(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.generateVar(out);\n out.print(\".getFieldVar(env, \");\n out.printIntern(_name);\n out.print(\")\");\n }", "private void checkAssignmentOfTaintedClassField(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n if (d instanceof AbstractDefinitionStmt) {\n AbstractDefinitionStmt def = (AbstractDefinitionStmt) d;\n Value leftSide = def.getLeftOp();\n Value rightSide = def.getRightOp();\n if ((leftSide instanceof Local || leftSide instanceof FieldRef) && rightSide instanceof FieldRef) {\n FieldRef ref = (FieldRef) rightSide;\n SootClass declaringClass = ref.getField().getDeclaringClass();\n if(declaringClass.hasTag(Tainted.NAME)) {\n taint(leftSide, d, out);\n d.addTag(declaringClass.getTag(Tainted.NAME));\n \n d.addTag(new Tag() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic byte[] getValue() throws AttributeValueException {\n\t\t\t\t\t\t\treturn \"foobar\".getBytes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic String getName() {\n\t\t\t\t\t\t\treturn \"visuflow.attrubte\";\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n \n \n }\n }\n }\n }", "@Override\r\n public Serializable createStaticState() {\r\n return this.m_func.createStaticState();\r\n }", "public void generateAssignRef(PhpWriter out, Expr value, boolean isTop)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n ExprGenerator valueGen = ((ExprPro) value).getGenerator();\n\n objGen.generateObject(out);\n out.print(\".putField(env, \");\n out.printIntern(_name);\n out.print(\", \");\n valueGen.generateRef(out);\n out.print(\")\");\n }", "@RegionEffects(\"writes test.D:Static\") // BAD\n public void n1() {\n s1 = 1;\n }", "@Override\n\tpublic void display() {\n\t\tDexUtil qualifiedName = new DexUtil();\n\t\tsuper.display();\n\t\n\t\tint dest = ((OneRegisterInstruction) instruction).getRegisterA();\n\t FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();\n\t \n\t String name= qualifiedName.getQualifiedName(f.getDefiningClass())+\".\"+qualifiedName.getQualifiedName(f.getName());\n\t String type= qualifiedName.getQualifiedName(f.getType());\n\t \n\t \n\t Variable variable=new Variable(null, 0, 0, 0, 0);\n\t \n\t variable.setName(name);\n\t variable.setType(type);\n\t DexMethodDefinition.registerLocals[dest]=variable;\n\t System.out.println(variable.getName());\n\t \n\t}", "private Expression getRetainedWithTarget(Assignment node, VariableElement var) {\n Expression lhs = node.getLeftHandSide();\n if (!(lhs instanceof FieldAccess)) {\n return new ThisExpression(ElementUtil.getDeclaringClass(var).asType());\n }\n // To avoid duplicating the target expression we must save the result to a local variable.\n FieldAccess fieldAccess = (FieldAccess) lhs;\n Expression target = fieldAccess.getExpression();\n VariableElement targetVar = GeneratedVariableElement.newLocalVar(\n \"__rw$\" + rwCount++, target.getTypeMirror(), null);\n TreeUtil.asStatementList(TreeUtil.getOwningStatement(lhs))\n .add(0, new VariableDeclarationStatement(targetVar, null));\n fieldAccess.setExpression(new SimpleName(targetVar));\n CommaExpression commaExpr =\n new CommaExpression(\n new CastExpression(\n typeUtil.getVoid(),\n new ParenthesizedExpression(new Assignment(new SimpleName(targetVar), target))));\n node.replaceWith(commaExpr);\n commaExpr.addExpression(node);\n return new SimpleName(targetVar);\n }", "private static int getVarInsnOpcode( Type type, boolean isStore ) {\n\tif (isStore) {\n\t if (!type.isPrimitive()) {\n\t\treturn ASTORE ;\n\t } else if (type == Type._float()) {\n\t\treturn FSTORE ;\n\t } else if (type == Type._double()) {\n\t\treturn DSTORE ;\n\t } else if (type == Type._long()) {\n\t\treturn LSTORE ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ISTORE ;\n\t }\n\t} else {\n\t if (!type.isPrimitive()) {\n\t\treturn ALOAD ;\n\t } else if (type == Type._float()) {\n\t\treturn FLOAD ;\n\t } else if (type == Type._double()) {\n\t\treturn DLOAD ;\n\t } else if (type == Type._long()) {\n\t\treturn LLOAD ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ILOAD ;\n\t }\n\t}\n }", "@Override\r\n public void visit(Store n, functionStruct fStruct) {\r\n String baseObject = n.f1.f0.toString();\r\n addId(baseObject, fStruct.functionName, fStruct.lineNumber);\r\n //String offsetObject = n.f3.f0.toString();\r\n String storedObject = n.f6.f0.toString();\r\n addId(storedObject, fStruct.functionName, fStruct.lineNumber);\r\n }", "@Override\n public Object visitExprField(ExprField ef) {\n ef.getLeft().accept(this);\n Type tb = getType(ef.getLeft());\n String struct = tb.toString();\n Finality f = getFieldFinality(struct, ef.getName());\n if (f == Finality.UNKNOWN) {\n if (verbosity > 4) {\n System.out.println(ef.getCx() + \": Making final \" + ef);\n }\n setFieldFinality(struct, ef.getName(), Finality.FINAL);\n }\n if (f == Finality.NOTFINAL) {\n throw new TypeErrorException(\"Using final field \" + ef +\n \" in the LHS of an assignment.\", ef);\n }\n if (f == Finality.FIRSTWRITE) {\n assert false : \"This is a bug\";\n }\n\n return ef;\n }", "public void tox86(Genx86 generate) throws IOException{\n \texpr.register = register;\n \tString expReg = generate.regName(expr.register);\n \n \texpr.tox86(generate);\n \n \tgenerate.write(generate.push(\"rdi\"));\n \n \tif (expr.type.getType() instanceof IntType){\n \t generate.write(generate.movInt(\"rdi\",expReg));\n\t generate.write(\"call print_int\\n\");\n \t}\n \telse if (expr.type.getType() instanceof BoolType){\n \t generate.write(generate.movBool(\"rdi\",expReg));\n\t generate.write(\"call print_int\\n\");\n \t}\n \telse if (expr.type.getType() instanceof FloatType){\n \t generate.write(generate.movReal(\"rdi\",expReg));\n\t generate.write(\"call print_float\\n\");\n \t}\n \telse if (expr.type.getType() instanceof CharType){\n \t generate.write(generate.movChar(\"rdi\",expReg));\n\t generate.write(\"call print_char\\n\");\n \t}\n \telse{\n \t generate.write(\"print de \"+expr.type.getType()+\" no implementado\");\n \t System.out.println(\"====================\");\n \t System.out.println(\"print de \"+expr.type.getType()+\" no implementado\");\n \t System.out.println(\"====================\");\n \t}\n \t\n\tgenerate.write(generate.pop(\"rdi\"));\n \t// // Por ahora se asume que todas las expresiones son numeros enteros\n \t// //de un solo digito.\n \t// String code = \"\";\n \t// String expReg = generate.current_reg();\n \n \t// expr.tox86(generate);\n \n \t// //\"Transformo\" a ASCII\n \t// code += generate.add(expReg,\"48\");\n \n \t// code += generate.save_print_regs();\n \n \t// code += generate.mov(\"[\"+generate.stack_pointer()+\"]\",expReg);\n \t// // Pongo el valor de la expresion en la pila, ya que la llamada\n // //sys_write necesita que el String este en memoria.\n \t\n \t// code += generate.setup_print(generate.stack_pointer(),\"1\",\"4\");\n \t// code += generate.syscall();\n \t// code += generate.restore_print_regs();\n \t \t \n \t// generate.write(code);\n }", "@Converted(kind = Converted.Kind.MANUAL_COMPILATION,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp\", line = 1724,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitAtomicStore\", NM=\"_ZN5clang7CodeGen15CodeGenFunction15EmitAtomicStoreENS0_6RValueENS0_6LValueEN4llvm14AtomicOrderingEbb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction15EmitAtomicStoreENS0_6RValueENS0_6LValueEN4llvm14AtomicOrderingEbb\")\n//</editor-fold>\npublic final void EmitAtomicStore(RValue rvalue, LValue dest, \n AtomicOrdering AO, boolean IsVolatile, \n boolean isInit) {\n // If this is an aggregate r-value, it should agree in type except\n // maybe for address-space qualification.\n assert (!rvalue.isAggregate() || rvalue.getAggregateAddress().getElementType() == dest.getAddress().getElementType());\n \n AtomicInfo atomics/*J*/= new AtomicInfo(/*Deref*/$this(), dest);\n LValue LVal = new LValue(atomics.getAtomicLValue());\n \n // If this is an initialization, just put the value there normally.\n if (LVal.isSimple()) {\n if (isInit) {\n atomics.emitCopyIntoMemory(new RValue(rvalue));\n return;\n }\n \n // Check whether we should use a library call.\n if (atomics.shouldUseLibcall()) {\n CallArgList args = null;\n try {\n // Produce a source address.\n Address srcAddr = atomics.materializeRValue(new RValue(rvalue));\n \n // void __atomic_store(size_t size, void *mem, void *val, int order)\n args/*J*/= new CallArgList();\n args.add(RValue.get(atomics.getAtomicSizeValue()), \n $this().getContext().getSizeType().$QualType());\n args.add(RValue.get($this().EmitCastToVoidPtr(atomics.getAtomicPointer())), \n $this().getContext().VoidPtrTy.$QualType());\n args.add(RValue.get($this().EmitCastToVoidPtr(srcAddr.getPointer())), \n $this().getContext().VoidPtrTy.$QualType());\n args.add(RValue.get(ConstantInt.get(IntTy, $int2ulong(((int)AdtsupportLlvmGlobals.toCABI(AO).getValue())))), \n $this().getContext().IntTy.$QualType());\n CGAtomicStatics.emitAtomicLibcall(/*Deref*/$this(), new StringRef(/*KEEP_STR*/\"__atomic_store\"), $this().getContext().VoidTy.$QualType(), args);\n return;\n } finally {\n if (args != null) { args.$destroy(); }\n }\n }\n \n // Okay, we're doing this natively.\n Value /*P*/ intValue = atomics.convertRValueToInt(new RValue(rvalue));\n \n // Do the atomic store.\n Address addr = atomics.emitCastToAtomicIntPointer(atomics.getAtomicAddress());\n intValue = $this().Builder.CreateIntCast(intValue, addr.getElementType(), /*isSigned=*/ false);\n StoreInst /*P*/ store = $this().Builder.CreateStore(intValue, new Address(addr));\n \n // Initializations don't need to be atomic.\n if (!isInit) {\n store.setAtomic(AO);\n }\n \n // Other decoration.\n if (IsVolatile) {\n store.setVolatile(true);\n }\n if ((dest.getTBAAInfo() != null)) {\n $this().CGM.DecorateInstructionWithTBAA(store, dest.getTBAAInfo());\n }\n return;\n }\n \n // Emit simple atomic update operation.\n atomics.EmitAtomicUpdate(AO, new RValue(rvalue), IsVolatile);\n}", "@AfterReturning(marker = BytecodeMarker.class, args = \"GETSTATIC\", scope = \"TargetClass.printStaticFields\", order = 0)\n public static void printStaticFieldsRead (final FieldAccessStaticContext fasc, final DynamicContext dc) {\n if (\"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\".equals (fasc.getOwnerInternalName ())) {\n System.out.printf (\"disl: %s=%s\\n\", fasc.getName (), dc.getStaticFieldValue (\n fasc.getOwnerInternalName (), fasc.getName (), fasc.getDescriptor (), Object.class\n ));\n }\n }", "private void translateFIELDAddress(Tree tree, int registerIndex) {\n\t\tTree exp = tree.getChild(0);\n\t\tthis.translate(exp, registerIndex); // Evaluation de la partie gauche, le pointeur du Record est maintenant dans registerIndex\n\n\t\t// Teste l'erreur à l'exécution : accès à un champ d'un record valant nil\n\t\tthis.writer.writeFunction(String.format(\"TST R%d\", registerIndex));\n\t\tthis.writer.writeFunction(\"BNE 4 // Vérifie que la structure n'est pas nil\");\n\t\tthis.writer.writeFunction(\"TRP #EXIT_EXC\");\n\n\t\tRecord record = (Record) this.treeTypes.get(exp); // Récupère le type de exp\n\t\tNamespace<Variable> fields = record.getNamespace();\n\t\tString nameOfField = tree.getChild(1).toString(); // Récupère le nom du field\n\n\t\tthis.writer.writeFunction(String.format(\"ADI R%d, R%d, #%d // FIELD : Calcul de l'adresse du champ \\\"%s\\\"\", registerIndex, registerIndex, fields.get(nameOfField).getOffset(), nameOfField));\n\t}", "X86.Reg gen_dest_operand();", "@Override\n public String generate() {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + variableSymbol + \" = alloca \" + variableLLVMType + \"\\n\";\n }", "@RegionEffects(\"writes test.D:Static\")\n public void x1() {\n s1 = 1;\n }", "public void visitStackInstruction(StackInstruction o){\n\t\t_visitStackAccessor(o);\n\t}", "public interface Opcodes {\n int T_INT = 10;\n // versions\n // int V1_1 = 3 << 16 | 45;\n // int V1_2 = 0 << 16 | 46;\n // int V1_3 = 0 << 16 | 47;\n // int V1_4 = 0 << 16 | 48;\n int V1_5 = 0 << 16 | 49;\n // int V1_6 = 0 << 16 | 50;\n // int V1_7 = 0 << 16 | 51;\n // access flags\n int ACC_PUBLIC = 0x0001; // class, field, method\n int ACC_SUPER = 0x0020; // class\n // opcodes // visit method (- = idem)\n int ACONST_NULL = 1; // -\n int ICONST_0 = 3; // -\n int ICONST_1 = 4; // -\n int LCONST_0 = 9; // -\n int LCONST_1 = 10; // -\n int FCONST_0 = 11; // -\n int DCONST_0 = 14; // -\n int BIPUSH = 16; // visitIntInsn\n // int SIPUSH = 17; // -\n // int LDC = 18; // visitLdcInsn\n // int LDC_W = 19; // -\n // int LDC2_W = 20; // -\n int ILOAD = 21; // visitVarInsn\n int LLOAD = 22; // -\n int FLOAD = 23; // -\n int DLOAD = 24; // -\n int ALOAD = 25; // -\n int ISTORE = 54; // visitVarInsn\n int LSTORE = 55; // -\n int FSTORE = 56; // -\n int DSTORE = 57; // -\n int ASTORE = 58; // -\n int IASTORE = 79; // visitInsn\n int POP = 87; // -\n // int POP2 = 88; // -\n int DUP = 89; // -\n int IADD = 96; // -\n // int ISUB = 100; // -\n int IAND = 126; // -\n // int LAND = 127; // -\n int IOR = 128; // -\n // int LOR = 129; // -\n // int IXOR = 130; // -\n // int LXOR = 131; // -\n // int IINC = 132; // visitIincInsn\n int LCMP = 148; // -\n int FCMPL = 149; // -\n int DCMPL = 151; // -\n int IFEQ = 153; // visitJumpInsn\n int IFNE = 154; // -\n int IFLE = 158; // -\n int IF_ICMPEQ = 159; // -\n int IF_ICMPNE = 160; // -\n int IF_ICMPLT = 161; // -\n int IF_ICMkgE = 162; // -\n int IF_ICMkgT = 163; // -\n int IF_ACMPEQ = 165; // -\n int IF_ACMPNE = 166; // -\n int GOTO = 167; // -\n int RET = 169; // visitVarInsn\n int ARETURN = 176; // -\n int RETURN = 177; // -\n int GETSTATIC = 178; // visitFieldInsn\n int GETFIELD = 180; // -\n int PUTFIELD = 181; // -\n int INVOKEVIRTUAL = 182; // visitMethodInsn\n int INVOKESPECIAL = 183; // -\n int INVOKESTATIC = 184; // -\n int INVOKEINTERFACE = 185; // -\n // int INVOKEDYNAMIC = 186; // -\n int NEW = 187; // visitTypeInsn\n int NEWARRAY = 188; // visitIntInsn\n // int ANEWARRAY = 189; // visitTypeInsn\n // int ARRAYLENGTH = 190; // visitInsn\n // int ATHROW = 191; // -\n int CHECKCAST = 192; // visitTypeInsn\n int INSTANCEOF = 193;\n int IFNULL = 198; // visitJumpInsn\n int IFNONNULL = 199; // -\n // int GOTO_W = 200; // -\n // int JSR_W = 201; // -\n}", "private void addInstanceVariables(ClassWriterTracker ct) {\n // variable #1, the state manager\n ct.getCw().visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_TRANSIENT,\n \"sm\", Type.getDescriptor(OpenJPAStateManager.class), null, null).visitEnd();\n\n // variable #2, the state manager\n ct.getCw().visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_TRANSIENT,\n \"field\", Type.getDescriptor(int.class), null, null).visitEnd();\n }", "public void interceptGetField(int opcode, String owner, String name, String desc) {\n FieldDefinition fieldDefn = classDefn.managedFields.get(name);\n if (fieldDefn != null && !isCurrentMethodAccessorOfField(name)) {\n /* inject preGet(\"fieldX\") before GETFIELD\n */\n // at this point stack has (..., [object]) which is ready for GETFIELD\n // DUP [object]\n mv.visitInsn(DUP);\n // stack has (..., [object], [object]) \n // push [this]\n mv.visitVarInsn(ALOAD, 0);\n // stack has (..., [object], [object], [this])\n Label label = new Label();\n // if ([object] == [this])\n mv.visitJumpInsn(IF_ACMPNE, label);\n // stack has (..., [this]) because (object == this)\n // DUP [this]\n mv.visitInsn(DUP);\n // stack has (..., [this], [this])\n // push \"fieldX\"\n mv.visitLdcInsn(name);\n // stack has (..., [this], [this], \"fieldX\")\n // invoke preGet(\"fieldX\")\n mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, \n preGetMethodName, preGetMethodDesc);\n // stack has (..., [this])\n // label:\n mv.visitLabel(label);\n // Frame TODO\n // mv.visitFrame(??, 0, null, 0, null);\n // stack has (..., [object])\n if (oprandStackIncrement < 3) {\n oprandStackIncrement = 3;\n }\n }\n // stack has (..., [object])\n // GETFIELD\n super.visitFieldInsn(opcode, owner, name, desc);\n }", "public final Instruction store_op() throws RecognitionException {\r\n Instruction inst = null;\r\n\r\n\r\n Type t1 =null;\r\n\r\n Constant e1 =null;\r\n\r\n Type t2 =null;\r\n\r\n Constant e2 =null;\r\n\r\n int align60 =0;\r\n\r\n\r\n\r\n Constant dest = null;\r\n int opcode;\r\n boolean isVolatile = false;\r\n List<Type> types = new ArrayList<Type>();\r\n List<Constant> operands = new ArrayList<Constant>();\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:5: ( ( VOLATILE )? 'store' t1= first_class_type e1= expression ',' t2= pointer_type e2= expression ( ',' align )? )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:7: ( VOLATILE )? 'store' t1= first_class_type e1= expression ',' t2= pointer_type e2= expression ( ',' align )?\r\n {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:7: ( VOLATILE )?\r\n int alt51=2;\r\n int LA51_0 = input.LA(1);\r\n\r\n if ( (LA51_0==VOLATILE) ) {\r\n alt51=1;\r\n }\r\n switch (alt51) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:8: VOLATILE\r\n {\r\n match(input,VOLATILE,FOLLOW_VOLATILE_in_store_op2118); \r\n\r\n isVolatile=true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input,82,FOLLOW_82_in_store_op2124); \r\n\r\n opcode = InstType.storeInst;\r\n\r\n pushFollow(FOLLOW_first_class_type_in_store_op2139);\r\n t1=first_class_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_store_op2143);\r\n e1=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(t1); operands.add(e1);\r\n\r\n match(input,44,FOLLOW_44_in_store_op2146); \r\n\r\n pushFollow(FOLLOW_pointer_type_in_store_op2155);\r\n t2=pointer_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_store_op2159);\r\n e2=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(t2); operands.add(e2);\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:383:5: ( ',' align )?\r\n int alt52=2;\r\n int LA52_0 = input.LA(1);\r\n\r\n if ( (LA52_0==44) ) {\r\n alt52=1;\r\n }\r\n switch (alt52) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:383:6: ',' align\r\n {\r\n match(input,44,FOLLOW_44_in_store_op2168); \r\n\r\n pushFollow(FOLLOW_align_in_store_op2170);\r\n align60=align();\r\n\r\n state._fsp--;\r\n\r\n\r\n operands.add(valueFactory.createConstantValue(SimpleConstantValue.intConst, align60 + \"\"));\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n inst = instFactory.createLoadStoreInst(dest, opcode, operands, types, isVolatile);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return inst;\r\n }", "public void generate(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.generate(out);\n out.print(\".getField(env, \");\n out.printIntern(_name);\n out.print(\")\");\n }", "private static Instruction propagateCastAsScalarVariablePrivacy(VariableCPInstruction inst, ExecutionContext ec){\n\t\tinst = (VariableCPInstruction) propagateFirstInputPrivacy(inst, ec); \n\t\treturn preprocessInstructionSimple(inst, ec);\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 }", "void emit(int i) {}", "interface TypeMap {\n\n\tCompiledFieldReference makeFieldReference(CollectedItem original, Getter inputGetter, CompiledGetterSetterCache cache) throws CompileException;\n\n}", "@Override\n public void serializeAsField(Object object, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws Exception {\n JsonSerializer<Object> jsonSerializer;\n Object object2 = this._accessorMethod == null ? this._field.get(object) : this._accessorMethod.invoke(object, new Object[0]);\n if (object2 == null) {\n if (this._nullSerializer == null) return;\n {\n jsonGenerator.writeFieldName(this._name);\n this._nullSerializer.serialize(null, jsonGenerator, serializerProvider);\n }\n return;\n }\n JsonSerializer<Object> jsonSerializer2 = jsonSerializer = this._serializer;\n if (jsonSerializer == null) {\n Class class_ = object2.getClass();\n PropertySerializerMap propertySerializerMap = this._dynamicSerializers;\n jsonSerializer2 = jsonSerializer = propertySerializerMap.serializerFor(class_);\n if (jsonSerializer == null) {\n jsonSerializer2 = this._findAndAddDynamic(propertySerializerMap, class_, serializerProvider);\n }\n }\n if (this._suppressableValue != null) {\n if (MARKER_FOR_EMPTY == this._suppressableValue) {\n if (jsonSerializer2.isEmpty(object2)) return;\n } else if (this._suppressableValue.equals(object2)) {\n return;\n }\n }\n if (object2 == object && this._handleSelfReference(object, jsonGenerator, serializerProvider, jsonSerializer2)) return;\n {\n jsonGenerator.writeFieldName(this._name);\n if (this._typeSerializer == null) {\n jsonSerializer2.serialize(object2, jsonGenerator, serializerProvider);\n return;\n }\n }\n jsonSerializer2.serializeWithType(object2, jsonGenerator, serializerProvider, this._typeSerializer);\n }", "protected Expr visitFieldAssign(FieldAssign n) throws SemanticException { \n Position pos = n.position();\n if (n.operator() == Assign.ASSIGN) return n;\n X10Binary_c.Operator op = n.operator().binaryOperator();\n Field left = (Field) n.left();\n Expr right = n.right();\n Type R = left.type();\n if (left.flags().isStatic()) {\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos, left, op, right).type(R));\n return assign(pos, left, Assign.ASSIGN, val);\n }\n Expr e = (Expr) left.target();\n Type E = e.type();\n List<Formal> parms = new ArrayList<Formal>();\n Name xn = Name.make(\"x\");\n LocalDef xDef = xts.localDef(pos, xts.Final(), Types.ref(E), xn);\n Formal x = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, E), xnf.Id(pos, xn)).localDef(xDef);\n parms.add(x);\n Name yn = Name.make(\"y\");\n Type T = right.type();\n LocalDef yDef = xts.localDef(pos, xts.Final(), Types.ref(T), yn);\n Formal y = xnf.Formal(pos, xnf.FlagsNode(pos, xts.Final()),\n xnf.CanonicalTypeNode(pos, T), xnf.Id(pos, yn)).localDef(yDef);\n parms.add(y);\n Expr lhs = xnf.Field(pos,\n xnf.Local(pos, xnf.Id(pos, xn)).localInstance(xDef.asInstance()).type(E),\n xnf.Id(pos, left.name().id())).fieldInstance(left.fieldInstance()).type(R);\n Expr val = visitBinary((X10Binary_c) xnf.Binary(pos,\n lhs, op, xnf.Local(pos, xnf.Id(pos, yn)).localInstance(yDef.asInstance()).type(T)).type(R));\n Expr res = assign(pos, lhs, Assign.ASSIGN, val);\n Block body = xnf.Block(pos, xnf.Return(pos, res));\n Closure c = synth.makeClosure(pos, R, parms, body, context());\n X10MethodInstance ci = c.closureDef().asType().applyMethod();\n List<Expr> args = new ArrayList<Expr>();\n args.add(0, e);\n args.add(right);\n return xnf.ClosureCall(pos, c, args).closureInstance(ci).type(R);\n }", "@Override\n public CodeFragment visitBlockAsgn(AlangParser.BlockAsgnContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n CodeFragment result = new CodeFragment();\n CodeFragment expr = visit(ctx.expression());\n\n result.addCode(expr);\n\n Variable v = this.getVariable(name);\n v.setHasValue();\n\n int arity = ctx.index_to_array().size();\n\n if (v.arity > 0) {\n if (!checkArityAssignment(v, arity)) {\n this.addError(ctx, name, \"Bad assignment to array\");\n return new CodeFragment(\"\");\n }\n }\n\n if (arity == 0) {\n result.addCode(String.format(\"store %s %s, %s* %s\\n\", v.llvmtype, expr.getRegister(), v.llvmtype, v.reg));\n } else {\n /* in case we assign to array */\n int pointers = ctx.index_to_array().size();\n ArrayList<String> registers = new ArrayList<String>();\n for (int i = 0; i < arity; i++) {\n CodeFragment index = visit(ctx.index_to_array(i).expression());\n result.addCode(index);\n registers.add(index.getRegister());\n }\n\n CodeFragment ptr = this.getPointerToArray(v, registers);\n result.addCode(ptr);\n\n ST store = this.group.getInstanceOf(\"store\");\n store.add(\"type\", v.llvmtype);\n store.add(\"reg\", expr.getRegister());\n store.add(\"where\", ptr.getRegister());\n result.addCode(store.render() + \"\\n\");\n }\n\n return result;\n }", "public void emit(OpCode opcode){\n\t\t\n\t}", "private List<JCTree> makeAttributeFields(DiagnosticPosition diagPos, List<? extends AttributeInfo> attrInfos) {\n ListBuffer<JCTree> fields = ListBuffer.lb();\n for (AttributeInfo ai : attrInfos) {\n if (ai.needsCloning()) {\n JCVariableDecl var = make.at(diagPos).VarDef(\n make.Modifiers(Flags.PUBLIC | Flags.FINAL | (ai.getFlags() & Flags.STATIC)),\n ai.getName(),\n toJava.makeTypeTree(ai.getMorphedType(), diagPos),\n typeMorpher.makeLocationAttributeVariable(ai.getVMI(), diagPos));\n fields.append(var);\n }\n }\n return fields.toList();\n }", "public void internalStore() {\r\n\t\tdata = busInt.get();\r\n\t}", "public void createValue() {\n value = new GisInfoCaptureDO();\n }", "public interface AddressField extends Field {\n /** This accessor requires that the field be nonstatic, or a WrongTypeException will be thrown. */\n public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;\n\n /** This accessor requires that the field be static, or a WrongTypeException will be thrown. */\n public Address getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;\n}", "public interface AssignmentNode extends StackOperationNode {\n\n TemporaryVariableName getValueName();\n\n}", "public void putStatic(String desc, String owner, String name, int opcode, int ID, int SID, int index)\n\t{\n\t mv.visitFieldInsn(opcode, owner, name, desc); // putstatic \n logFieldAccess(desc, ID, SID, index); \n\t}", "public void visitStoreInstruction(StoreInstruction o){\n\t\t//visitLocalVariableInstruction(o) is called before, because it is more generic.\n\n\t\tif (stack().isEmpty()){ // Don't bother about 1 or 2 stack slots used. This check is implicitely done below while type checking.\n\t\t\tconstraintViolated(o, \"Cannot STORE: Stack to read from is empty.\");\n\t\t}\n\n\t\tif ( (!(o instanceof ASTORE)) ){\n\t\t\tif (! (stack().peek() == o.getType(cpg)) ){// the other xSTORE types are singletons in BCEL.\n\t\t\t\tconstraintViolated(o, \"Stack top type and STOREing Instruction type mismatch: Stack top: '\"+stack().peek()+\"'; Instruction type: '\"+o.getType(cpg)+\"'.\");\n\t\t\t}\n\t\t}\n\t\telse{ // we deal with ASTORE\n\t\t\tType stacktop = stack().peek();\n\t\t\tif ( (!(stacktop instanceof ReferenceType)) && (!(stacktop instanceof ReturnaddressType)) ){\n\t\t\t\tconstraintViolated(o, \"Stack top type and STOREing Instruction type mismatch: Stack top: '\"+stack().peek()+\"'; Instruction expects a ReferenceType or a ReturnadressType.\");\n\t\t\t}\n\t\t\tif (stacktop instanceof ReferenceType){\n\t\t\t\treferenceTypeIsInitialized(o, (ReferenceType) stacktop);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void generateIsset(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.generate(out);\n out.print(\".issetField(env, \");\n out.printIntern(_name);\n out.print(\")\");\n }", "@RegionEffects(\"writes publicField; reads defaultField\")\n private void someButNotAll() {\n publicField = privateField;\n protectedField = defaultField;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/DebugInfoMetadata.h\", line = 783,\n FQN=\"llvm::DICompositeType::mutate\", NM=\"_ZN4llvm15DICompositeType6mutateEjjjyyyj\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/DebugInfoMetadata.cpp -nm=_ZN4llvm15DICompositeType6mutateEjjjyyyj\")\n //</editor-fold>\n private void mutate(/*uint*/int Tag, /*uint*/int Line, /*uint*/int RuntimeLang,\n long/*uint64_t*/ SizeInBits, long/*uint64_t*/ AlignInBits, long/*uint64_t*/ OffsetInBits,\n /*uint*/int Flags) {\n assert (isDistinct()) : \"Only distinct nodes can mutate\";\n assert ((getRawIdentifier() != null)) : \"Only ODR-uniqued nodes should mutate\";\n this.RuntimeLang = RuntimeLang;\n super.mutate(Tag, Line, SizeInBits, AlignInBits, OffsetInBits, Flags);\n }", "@Override\r\n\tpublic void translateToAsm(PrintWriter writer, Memory stack) {\n\t\t\r\n\t}", "public static boolean handleFieldWrite(Node x, Node f, Node y) {\n\n\t\tif(ImmutabilityPreferences.isInferenceRuleLoggingEnabled()) {\n\t\t\tString values = \"x:\" + getTypes(x).toString() + \", f:\" + getTypes(f).toString() + \", y:\" + getTypes(y).toString();\n\t\t\tLog.info(\"TWRITE (x.f=y, x=\" + x.getAttr(XCSG.name) + \", f=\" + f.getAttr(XCSG.name) + \", y=\" + y.getAttr(XCSG.name) + \")\\n\" + values);\n\t\t}\n\t\t\n\t\tboolean typesChanged = false;\n\t\t\n\t\t// x must be mutable\n\t\tif (x.taggedWith(XCSG.InstanceVariable)) {\n\t\t\tif (ImmutabilityPreferences.isAllowAddMutableInstanceVariablesEnabled()) {\n\t\t\t\taddMutable(x); // doesn't count as a type change\n\t\t\t}\n\t\t\tif(ImmutabilityPreferences.isAllowDefaultMutableInstancesVariablesEnabled() || ImmutabilityPreferences.isAllowAddMutableInstanceVariablesEnabled()){\n\t\t\t\tif(XEqualsYConstraintSolver.satisfy(x, ImmutabilityTypes.MUTABLE)){\n\t\t\t\t\tif(ImmutabilityPreferences.isAllowAddMutableInstanceVariablesEnabled() && getTypes(x).isEmpty()){\n\t\t\t\t\t\taddMutable(x);\n\t\t\t\t\t}\n\t\t\t\t\ttypesChanged = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// vanilla paper description\n\t\t\t\tif(removeTypes(x, ImmutabilityTypes.READONLY)){\n\t\t\t\t\ttypesChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif(XEqualsYConstraintSolver.satisfy(x, ImmutabilityTypes.MUTABLE)){\n\t\t\t\ttypesChanged = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ImmutabilityPreferences.isFieldAdaptationsEnabled()){\n\t\t\t// qy <: MUTABLE fadapt qf\n\t\t\t// = MUTABLE fadapt qf :> qy\n\t\t\t// FSE 2012 implementation\n\t\t\tif(XFieldAdaptYGreaterThanEqualZConstraintSolver.satisify(ImmutabilityTypes.MUTABLE, f, y)){\n\t\t\t\ttypesChanged = true;\n\t\t\t}\n\t\t} else {\n\t\t\t// qy <: MUTABLE fadapt qf\n\t\t\t// = MUTABLE madapt qf :> qy\n\t\t\t// vanilla OOPSLA 2012 implementation\n\t\t\tif(XMethodAdaptYGreaterThanEqualZConstraintSolver.satisify(x, f, y)){\n\t\t\t\ttypesChanged = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn typesChanged;\n\t}", "public String visit(AStoreStmt n, Object argu)\r\n\t {\r\n\t\t int stackPos = 4*Integer.parseInt(n.f1.f1.f0.tokenImage);\r\n int RegNum = n.f2.f0.which;\r\n MipsOutPut.add(MipsOutPut.Space+\"sw \" + Regs.RegList[RegNum] +\", \" + stackPos + \"($sp) \\n\");\r\n return null;\r\n\t }", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(1977);\n FieldWriter fieldWriter0 = (FieldWriter)classWriter0.visitField(2, \"AS \", \"AS \", \"AS \", \"AS \");\n fieldWriter0.visitAnnotation(\"AS \", false);\n ByteVector byteVector0 = classWriter0.pool;\n fieldWriter0.put(byteVector0);\n }", "@Override\n public Expression assign(String var, Expression expression) {\n Expression e1 = getEx2().assign(var, expression);\n Expression e2 = getEx2().assign(var, expression);\n return new Log(e1, e2);\n }", "public void visitPUTFIELD(PUTFIELD o){\n\n\t\tType objectref = stack().peek(1);\n\t\tif (! ( (objectref instanceof ObjectType) || (objectref == Type.NULL) ) ){\n\t\t\tconstraintViolated(o, \"Stack next-to-top should be an object reference that's not an array reference, but is '\"+objectref+\"'.\");\n\t\t}\n\t\t\n\t\tString field_name = o.getFieldName(cpg);\n\t\t\n\t\tJavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());\n\t\tField[] fields = jc.getFields();\n\t\tField f = null;\n\t\tfor (int i=0; i<fields.length; i++){\n\t\t\tif (fields[i].getName().equals(field_name)){\n\t\t\t\tf = fields[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (f == null){\n\t\t\tthrow new AssertionViolatedException(\"Field not found?!?\");\n\t\t}\n\n\t\tType value = stack().peek();\n\t\tType t = Type.getType(f.getSignature());\n\t\tType shouldbe = t;\n\t\tif (shouldbe == Type.BOOLEAN ||\n\t\t\t\tshouldbe == Type.BYTE ||\n\t\t\t\tshouldbe == Type.CHAR ||\n\t\t\t\tshouldbe == Type.SHORT){\n\t\t\tshouldbe = Type.INT;\n\t\t}\n\t\tif (t instanceof ReferenceType){\n\t\t\tReferenceType rvalue = null;\n\t\t\tif (value instanceof ReferenceType){\n\t\t\t\trvalue = (ReferenceType) value;\n\t\t\t\treferenceTypeIsInitialized(o, rvalue);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of a reference type as expected.\");\n\t\t\t}\n\t\t\t// TODO: This can possibly only be checked using Staerk-et-al's \"set-of-object types\", not\n\t\t\t// using \"wider cast object types\" created during verification.\n\t\t\t// Comment it out if you encounter problems. See also the analogon at visitPUTSTATIC.\n\t\t\tif (!(rvalue.isAssignmentCompatibleWith(shouldbe))){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not assignment compatible with '\"+shouldbe+\"'.\");\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (shouldbe != value){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of type '\"+shouldbe+\"' as expected.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (f.isProtected()){\n\t\t\tObjectType classtype = o.getClassType(cpg);\n\t\t\tObjectType curr = new ObjectType(mg.getClassName());\n\n\t\t\tif (\tclasstype.equals(curr) ||\n\t\t\t\t\t\tcurr.subclassOf(classtype)\t){\n\t\t\t\tType tp = stack().peek(1);\n\t\t\t\tif (tp == Type.NULL){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (! (tp instanceof ObjectType) ){\n\t\t\t\t\tconstraintViolated(o, \"The 'objectref' must refer to an object that's not an array. Found instead: '\"+tp+\"'.\");\n\t\t\t\t}\n\t\t\t\tObjectType objreftype = (ObjectType) tp;\n\t\t\t\tif (! ( objreftype.equals(curr) ||\n\t\t\t\t\t\t objreftype.subclassOf(curr) ) ){\n\t\t\t\t\tconstraintViolated(o, \"The referenced field has the ACC_PROTECTED modifier, and it's a member of the current class or a superclass of the current class. However, the referenced object type '\"+stack().peek()+\"' is not the current class or a subclass of the current class.\");\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\n\t\t// TODO: Could go into Pass 3a.\n\t\tif (f.isStatic()){\n\t\t\tconstraintViolated(o, \"Referenced field '\"+f+\"' is static which it shouldn't be.\");\n\t\t}\n\t}", "@Override\n\tpublic OpTarget genAssem(StringWriter sw, IRFuncDecl f, FuncSymbolTable funcs) {\n\t\treturn operand;\n\t}", "protected String addMethodInfoField(int modifiers, CtClass addTo, MethodTransformation trans, CtField.Initializer init) throws NotFoundException, CannotCompileException\n {\n String name = getMethodInfoFieldName(trans.getOriginalName(), trans.getHash());\n TransformerCommon.addInfoField(instrumentor, METHOD_INFO_CLASS_NAME, name, modifiers, addTo, addInfoAsWeakReference(), init);\n \n return name;\n }", "public MyMemory(){\n super();\n this.instruction = new Instruction(); //Only the IR register will use this attribute\n }", "public void push(int x, int y) throws FieldIsPushedException, FieldIsMineException;", "private void assign(DefinitionStmt stmt) {\n \n soot.Value rightOp = stmt.getRightOp();\n Value result;\n \n if (rightOp instanceof Immediate) {\n Immediate immediate = (Immediate) rightOp;\n result = immediate(stmt, immediate);\n } else if (rightOp instanceof ThisRef) {\n result = function.getParameterRef(1);\n } else if (rightOp instanceof ParameterRef) {\n ParameterRef ref = (ParameterRef) rightOp;\n int index = (sootMethod.isStatic() ? 1 : 2) + ref.getIndex();\n Value p = new VariableRef(\"p\" + index, getType(ref.getType()));\n result = widenToI32Value(p, isUnsigned(ref.getType()));\n } else if (rightOp instanceof CaughtExceptionRef) {\n result = call(BC_EXCEPTION_CLEAR, env);\n } else if (rightOp instanceof ArrayRef) {\n ArrayRef ref = (ArrayRef) rightOp;\n VariableRef base = (VariableRef) immediate(stmt, (Immediate) ref.getBase());\n if (ref.getType() instanceof NullType) {\n // The base value is always null. Do a null check which will\n // always throw NPE.\n checkNull(stmt, base);\n return;\n } else {\n Value index = immediate(stmt, (Immediate) ref.getIndex());\n checkNull(stmt, base);\n checkBounds(stmt, base, index);\n result = call(getArrayLoad(ref.getType()), base, index);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n }\n } else if (rightOp instanceof InstanceFieldRef) {\n InstanceFieldRef ref = (InstanceFieldRef) rightOp;\n Value base = immediate(stmt, (Immediate) ref.getBase());\n checkNull(stmt, base);\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_getter\", \n new FunctionType(getType(ref.getType()), ENV_PTR, OBJECT_PTR));\n } else {\n soot.Type runtimeType = ref.getBase().getType();\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n String runtimeClassName = runtimeType == NullType.v() ? targetClassName : getInternalName(runtimeType);\n Trampoline trampoline = new GetField(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()), runtimeClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n result = call(fn, env, base);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n } else if (rightOp instanceof StaticFieldRef) {\n StaticFieldRef ref = (StaticFieldRef) rightOp;\n FunctionRef fn = Intrinsics.getIntrinsic(sootMethod, stmt);\n if (fn == null) {\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_getter\", \n new FunctionType(getType(ref.getType()), ENV_PTR));\n } else {\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n Trampoline trampoline = new GetStatic(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()));\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n }\n result = call(fn, env);\n result = widenToI32Value(result, isUnsigned(ref.getType()));\n } else if (rightOp instanceof Expr) {\n if (rightOp instanceof BinopExpr) {\n BinopExpr expr = (BinopExpr) rightOp;\n Type rightType = getLocalType(expr.getType());\n Variable resultVar = function.newVariable(rightType);\n result = resultVar.ref();\n Value op1 = immediate(stmt, (Immediate) expr.getOp1());\n Value op2 = immediate(stmt, (Immediate) expr.getOp2());\n if (rightOp instanceof AddExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Add(resultVar, op1, op2));\n } else {\n function.add(new Fadd(resultVar, op1, op2));\n }\n } else if (rightOp instanceof AndExpr) {\n function.add(new And(resultVar, op1, op2));\n } else if (rightOp instanceof CmpExpr) {\n Variable t1 = function.newVariable(I1);\n Variable t2 = function.newVariable(I1);\n Variable t3 = function.newVariable(resultVar.getType());\n Variable t4 = function.newVariable(resultVar.getType());\n function.add(new Icmp(t1, Condition.slt, op1, op2));\n function.add(new Icmp(t2, Condition.sgt, op1, op2));\n function.add(new Zext(t3, new VariableRef(t1), resultVar.getType()));\n function.add(new Zext(t4, new VariableRef(t2), resultVar.getType()));\n function.add(new Sub(resultVar, new VariableRef(t4), new VariableRef(t3)));\n } else if (rightOp instanceof DivExpr) {\n if (rightType instanceof IntegerType) {\n FunctionRef f = rightType == I64 ? LDIV : IDIV;\n result = call(f, env, op1, op2);\n } else {\n // float or double\n function.add(new Fdiv(resultVar, op1, op2));\n }\n } else if (rightOp instanceof MulExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Mul(resultVar, op1, op2));\n } else {\n function.add(new Fmul(resultVar, op1, op2));\n }\n } else if (rightOp instanceof OrExpr) {\n function.add(new Or(resultVar, op1, op2));\n } else if (rightOp instanceof RemExpr) {\n if (rightType instanceof IntegerType) {\n FunctionRef f = rightType == I64 ? LREM : IREM;\n result = call(f, env, op1, op2);\n } else {\n FunctionRef f = rightType == DOUBLE ? DREM : FREM;\n result = call(f, env, op1, op2);\n }\n } else if (rightOp instanceof ShlExpr || rightOp instanceof ShrExpr || rightOp instanceof UshrExpr) {\n IntegerType type = (IntegerType) op1.getType();\n int bits = type.getBits();\n Variable t = function.newVariable(op2.getType());\n function.add(new And(t, op2, new IntegerConstant(bits - 1, (IntegerType) op2.getType())));\n Value shift = t.ref();\n if (((IntegerType) shift.getType()).getBits() < bits) {\n Variable tmp = function.newVariable(type);\n function.add(new Zext(tmp, shift, type));\n shift = tmp.ref();\n }\n if (rightOp instanceof ShlExpr) {\n function.add(new Shl(resultVar, op1, shift));\n } else if (rightOp instanceof ShrExpr) {\n function.add(new Ashr(resultVar, op1, shift));\n } else {\n function.add(new Lshr(resultVar, op1, shift));\n }\n } else if (rightOp instanceof SubExpr) {\n if (rightType instanceof IntegerType) {\n function.add(new Sub(resultVar, op1, op2));\n } else {\n function.add(new Fsub(resultVar, op1, op2));\n }\n } else if (rightOp instanceof XorExpr) {\n function.add(new Xor(resultVar, op1, op2));\n } else if (rightOp instanceof XorExpr) {\n function.add(new Xor(resultVar, op1, op2));\n } else if (rightOp instanceof CmplExpr) {\n FunctionRef f = op1.getType() == FLOAT ? FCMPL : DCMPL;\n function.add(new Call(resultVar, f, op1, op2));\n } else if (rightOp instanceof CmpgExpr) {\n FunctionRef f = op1.getType() == FLOAT ? FCMPG : DCMPG;\n function.add(new Call(resultVar, f, op1, op2));\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n } else if (rightOp instanceof CastExpr) {\n Value op = immediate(stmt, (Immediate) ((CastExpr) rightOp).getOp());\n soot.Type sootTargetType = ((CastExpr) rightOp).getCastType();\n soot.Type sootSourceType = ((CastExpr) rightOp).getOp().getType();\n if (sootTargetType instanceof PrimType) {\n Type targetType = getType(sootTargetType);\n Type sourceType = getType(sootSourceType);\n if (targetType instanceof IntegerType && sourceType instanceof IntegerType) {\n // op is at least I32 and has already been widened if source type had fewer bits then I32\n IntegerType toType = (IntegerType) targetType;\n IntegerType fromType = (IntegerType) op.getType();\n Variable v = function.newVariable(toType);\n if (fromType.getBits() < toType.getBits()) {\n // Widening\n if (isUnsigned(sootSourceType)) {\n function.add(new Zext(v, op, toType));\n } else {\n function.add(new Sext(v, op, toType));\n }\n } else if (fromType.getBits() == toType.getBits()) {\n function.add(new Bitcast(v, op, toType));\n } else {\n // Narrow\n function.add(new Trunc(v, op, toType));\n }\n result = widenToI32Value(v.ref(), isUnsigned(sootTargetType));\n } else if (targetType instanceof FloatingPointType && sourceType instanceof IntegerType) {\n // we always to a signed conversion since if op is char it has already been zero extended to I32\n Variable v = function.newVariable(targetType);\n function.add(new Sitofp(v, op, targetType));\n result = v.ref();\n } else if (targetType instanceof FloatingPointType && sourceType instanceof FloatingPointType) {\n Variable v = function.newVariable(targetType);\n if (targetType == FLOAT && sourceType == DOUBLE) {\n function.add(new Fptrunc(v, op, targetType));\n } else if (targetType == DOUBLE && sourceType == FLOAT) {\n function.add(new Fpext(v, op, targetType));\n } else {\n function.add(new Bitcast(v, op, targetType));\n }\n result = v.ref();\n } else {\n // F2I, F2L, D2I, D2L\n FunctionRef f = null;\n if (targetType == I32 && sourceType == FLOAT) {\n f = F2I;\n } else if (targetType == I64 && sourceType == FLOAT) {\n f = F2L;\n } else if (targetType == I32 && sourceType == DOUBLE) {\n f = D2I;\n } else if (targetType == I64 && sourceType == DOUBLE) {\n f = D2L;\n } else {\n throw new IllegalArgumentException();\n }\n Variable v = function.newVariable(targetType);\n function.add(new Call(v, f, op));\n result = v.ref();\n }\n } else {\n if (sootTargetType instanceof soot.ArrayType \n && ((soot.ArrayType) sootTargetType).getElementType() instanceof PrimType) {\n soot.Type primType = ((soot.ArrayType) sootTargetType).getElementType();\n GlobalRef arrayClassPtr = new GlobalRef(\"array_\" + getDescriptor(primType), CLASS_PTR);\n Variable arrayClass = function.newVariable(CLASS_PTR);\n function.add(new Load(arrayClass, arrayClassPtr));\n result = call(CHECKCAST_PRIM_ARRAY, env, arrayClass.ref(), op);\n } else {\n String targetClassName = getInternalName(sootTargetType);\n Trampoline trampoline = new Checkcast(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, op);\n }\n }\n } else if (rightOp instanceof InstanceOfExpr) {\n Value op = immediate(stmt, (Immediate) ((InstanceOfExpr) rightOp).getOp());\n soot.Type checkType = ((InstanceOfExpr) rightOp).getCheckType();\n if (checkType instanceof soot.ArrayType \n && ((soot.ArrayType) checkType).getElementType() instanceof PrimType) {\n soot.Type primType = ((soot.ArrayType) checkType).getElementType();\n GlobalRef arrayClassPtr = new GlobalRef(\"array_\" + getDescriptor(primType), CLASS_PTR);\n Variable arrayClass = function.newVariable(CLASS_PTR);\n function.add(new Load(arrayClass, arrayClassPtr));\n result = call(INSTANCEOF_PRIM_ARRAY, env, arrayClass.ref(), op);\n } else {\n String targetClassName = getInternalName(checkType);\n Trampoline trampoline = new Instanceof(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, op);\n }\n } else if (rightOp instanceof NewExpr) {\n String targetClassName = getInternalName(((NewExpr) rightOp).getBaseType());\n FunctionRef fn = null;\n if (targetClassName.equals(this.className)) {\n fn = FunctionBuilder.allocator(sootMethod.getDeclaringClass()).ref();\n } else {\n Trampoline trampoline = new New(this.className, targetClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n result = call(fn, env);\n } else if (rightOp instanceof NewArrayExpr) {\n NewArrayExpr expr = (NewArrayExpr) rightOp;\n Value size = immediate(stmt, (Immediate) expr.getSize());\n if (expr.getBaseType() instanceof PrimType) {\n result = call(getNewArray(expr.getBaseType()), env, size);\n } else {\n String targetClassName = getInternalName(expr.getType());\n Trampoline trampoline = new Anewarray(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, size);\n }\n } else if (rightOp instanceof NewMultiArrayExpr) {\n NewMultiArrayExpr expr = (NewMultiArrayExpr) rightOp;\n if (expr.getBaseType().numDimensions == 1 && expr.getBaseType().getElementType() instanceof PrimType) {\n Value size = immediate(stmt, (Immediate) expr.getSize(0));\n result = call(getNewArray(expr.getBaseType().getElementType()), env, size);\n } else {\n for (int i = 0; i < expr.getSizeCount(); i++) {\n Value size = immediate(stmt, (Immediate) expr.getSize(i));\n Variable ptr = function.newVariable(new PointerType(I32));\n function.add(new Getelementptr(ptr, dims.ref(), 0, i));\n function.add(new Store(size, ptr.ref()));\n }\n Variable dimsI32 = function.newVariable(new PointerType(I32));\n function.add(new Bitcast(dimsI32, dims.ref(), dimsI32.getType()));\n String targetClassName = getInternalName(expr.getType());\n Trampoline trampoline = new Multianewarray(this.className, targetClassName);\n trampolines.add(trampoline);\n result = call(trampoline.getFunctionRef(), env, new IntegerConstant(expr.getSizeCount()), dimsI32.ref());\n }\n } else if (rightOp instanceof InvokeExpr) {\n result = invokeExpr(stmt, (InvokeExpr) rightOp);\n } else if (rightOp instanceof LengthExpr) {\n Value op = immediate(stmt, (Immediate) ((LengthExpr) rightOp).getOp());\n checkNull(stmt, op);\n Variable v = function.newVariable(I32);\n function.add(new Call(v, ARRAY_LENGTH, op));\n result = v.ref();\n } else if (rightOp instanceof NegExpr) {\n NegExpr expr = (NegExpr) rightOp;\n Value op = immediate(stmt, (Immediate) expr.getOp());\n Type rightType = op.getType();\n Variable v = function.newVariable(op.getType());\n if (rightType instanceof IntegerType) {\n function.add(new Sub(v, new IntegerConstant(0, (IntegerType) rightType), op));\n } else {\n function.add(new Fmul(v, new FloatingPointConstant(-1.0, (FloatingPointType) rightType), op));\n }\n result = v.ref();\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n } else {\n throw new IllegalArgumentException(\"Unknown type for rightOp: \" + rightOp.getClass());\n }\n \n soot.Value leftOp = stmt.getLeftOp();\n \n if (leftOp instanceof Local) {\n Local local = (Local) leftOp;\n VariableRef v = new VariableRef(local.getName(), new PointerType(getLocalType(leftOp.getType())));\n function.add(new Store(result, v, !sootMethod.getActiveBody().getTraps().isEmpty()));\n } else {\n Type leftType = getType(leftOp.getType());\n Value narrowedResult = narrowFromI32Value(leftType, result);\n if (leftOp instanceof ArrayRef) {\n ArrayRef ref = (ArrayRef) leftOp;\n VariableRef base = (VariableRef) immediate(stmt, (Immediate) ref.getBase());\n Value index = immediate(stmt, (Immediate) ref.getIndex());\n checkNull(stmt, base);\n checkBounds(stmt, base, index);\n if (leftOp.getType() instanceof RefLikeType) {\n call(BC_SET_OBJECT_ARRAY_ELEMENT, env, base, index, narrowedResult);\n } else {\n call(getArrayStore(leftOp.getType()), base, index, narrowedResult);\n }\n } else if (leftOp instanceof InstanceFieldRef) {\n InstanceFieldRef ref = (InstanceFieldRef) leftOp;\n Value base = immediate(stmt, (Immediate) ref.getBase());\n checkNull(stmt, base);\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_setter\", \n new FunctionType(VOID, ENV_PTR, OBJECT_PTR, getType(ref.getType())));\n } else {\n soot.Type runtimeType = ref.getBase().getType();\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n String runtimeClassName = runtimeType == NullType.v() ? targetClassName : getInternalName(runtimeType);\n Trampoline trampoline = new PutField(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()), runtimeClassName);\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n call(fn, env, base, narrowedResult);\n } else if (leftOp instanceof StaticFieldRef) {\n StaticFieldRef ref = (StaticFieldRef) leftOp;\n FunctionRef fn = null;\n if (canAccessDirectly(ref)) {\n fn = new FunctionRef(mangleField(ref.getFieldRef()) + \"_setter\", \n new FunctionType(VOID, ENV_PTR, getType(ref.getType())));\n } else {\n String targetClassName = getInternalName(ref.getFieldRef().declaringClass());\n Trampoline trampoline = new PutStatic(this.className, targetClassName, \n ref.getFieldRef().name(), getDescriptor(ref.getFieldRef().type()));\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n call(fn, env, narrowedResult);\n } else {\n throw new IllegalArgumentException(\"Unknown type for leftOp: \" + leftOp.getClass());\n }\n }\n }", "@RegionEffects(\"writes Static\") // GOOD\n public void m1() {\n s1 = 1;\n }", "@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 }", "@RegionEffects(\"writes test.C:Static\")\n public void y1() {\n s1 = 1;\n }", "public void visitFSTORE(FSTORE o){\n\t\t//visitStoreInstruction(StoreInstruction) is called before.\n\t\t\n\t\t// Nothing else needs to be done here.\n\t}", "public void generateExpr(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n out.print(\"new ObjectFieldExpr(\");\n\n objGen.generateExpr(out);\n\n out.print(\", \\\"\");\n out.printJavaString(_name.toString());\n out.print(\"\\\")\");\n }", "public Log_Expr_TElements getLog_Expr_TAccess() {\n\t\treturn (pLog_Expr_T != null) ? pLog_Expr_T : (pLog_Expr_T = new Log_Expr_TElements());\n\t}", "@Override\n public List<Machine.Instruction> emit() {\n ArrayList<Machine.Instruction> data = new ArrayList<>();\n data.add(new Machine.Load(name));\n return data;\n }", "@Override\r\n public void afterVisit() {\n final MethodCallUtils.EnclosingRefs enclosing = \r\n MethodCallUtils.getEnclosingInstanceReferences(\r\n thisExprBinder, expr,\r\n superClassDecl,\r\n context.theReceiverNode, getEnclosingSyntacticDecl());\r\n /* The transformer will already be set in the map correctly for these\r\n * effects when they are original generated. We are just modifying\r\n * the lock and evidence information for the effects.\r\n */\r\n for (final Effect e : newContext.theEffects.build()) {\r\n Effect maskedEffect = e.mask(thisExprBinder);\r\n if (maskedEffect != null) {\r\n // Mask again if the effect is on the receiver of the anonymous class\r\n if (maskedEffect.affectsReceiver(newContext.theReceiverNode)) {\r\n context.theEffects.add(\r\n Effect.effect(\r\n maskedEffect.getSource(), maskedEffect.isRead(),\r\n new EmptyTarget(new EmptyEvidence(Reason.UNDER_CONSTRUCTION)),\r\n new MaskedEffectEvidence(maskedEffect),\r\n maskedEffect.getNeededLocks()));\r\n } else {\r\n final Target target = maskedEffect.getTarget();\r\n \r\n final TargetEvidence te = target.getEvidence();\r\n if (te instanceof EmptyEvidence\r\n && ((EmptyEvidence) te).getReason() == Reason.METHOD_CALL) {\r\n /* Special case: empty effect that carries lock preconditions */\r\n final ImmutableSet.Builder<NeededLock> newLockSet = ImmutableSet.builder();\r\n for (final NeededLock lock : maskedEffect.getNeededLocks()) {\r\n newLockSet.add(lock.replaceEnclosingInstanceReference(enclosing));\r\n }\r\n context.theEffects.add(\r\n Effect.empty(maskedEffect.getSource(),\r\n new EmptyEvidence(Reason.METHOD_CALL), \r\n ImmutableSet.of(getEvidence()), newLockSet.build()));\r\n } else if (target instanceof InstanceTarget) {\r\n final IRNode ref = target.getReference();\r\n \r\n final IRNode newRef = enclosing.replace(ref);\r\n if (newRef != null) {\r\n final IRNode objectExpr = thisExprBinder.bindThisExpression(newRef);\r\n final Target newTarget = new InstanceTarget(\r\n objectExpr, target.getRegion(),\r\n new EnclosingRefEvidence(maskedEffect.getSource(), ref, newRef));\r\n final Set<NeededLock> newLocks = new HashSet<>();\r\n for (final NeededLock lock : maskedEffect.getNeededLocks()) {\r\n newLocks.add(lock.replaceEnclosingInstanceReference(enclosing));\r\n }\r\n elaborateInstanceTarget(\r\n context.bcaQuery, lockFactory, thisExprBinder, lockModel.get(),\r\n maskedEffect.getSource(), maskedEffect.isRead(), newTarget, getEvidence(),\r\n newLocks, context.theEffects);\r\n } else {\r\n /* XXX: Not sure if it is possible to get here. External\r\n * variable references are turned into ANyInstance targets\r\n * during elaboration.\r\n */\r\n /* 2012-08-24: We have to clean the type to make sure it is not a \r\n * type formal.\r\n */\r\n IJavaType type = thisExprBinder.getJavaType(ref);\r\n if (type instanceof IJavaTypeFormal) {\r\n type = TypeUtil.typeFormalToDeclaredClass(\r\n thisExprBinder.getTypeEnvironment(), (IJavaTypeFormal) type);\r\n }\r\n context.theEffects.add(Effect.effect(\r\n maskedEffect.getSource(), maskedEffect.isRead(),\r\n new AnyInstanceTarget(\r\n (IJavaReferenceType) type, target.getRegion(),\r\n new UnknownReferenceConversionEvidence(\r\n maskedEffect, ref, (IJavaReferenceType) type)),\r\n getEvidence(), maskedEffect.getNeededLocks()));\r\n }\r\n } else {\r\n context.theEffects.add(\r\n maskedEffect.updateEvidence(target.getEvidence(), ImmutableSet.of(getEvidence())));\r\n }\r\n }\r\n }\r\n }\r\n }", "protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }", "@Override\n public void compile(LinkedList<Token> theStack, Compiler c) throws CompilerException {\n\n\tVariableToken vt;\n\tvt = c.getGlobalVariable(this.getTokenString());\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getLocalVariable(this.getTokenString());\n\t }\n\t}\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getParameter(this.getTokenString());\n\t }\n\t}\n\n\tif (vt == null) {\n\t throw new CompilerException(\"The variable \\\"\" + this.getTokenString() + \"\\\" cannot be used in an expression, as it is not a known variable in the current context!\");\n\t} else {\n\t NumberTokenFactory ntf = new NumberTokenFactory();\n\n//\t\t\tNumberToken nt = (NumberToken) ntf.create(Integer.toString(vt.getVariableID()), 0);\n\t //nt.compile(theStack, c);//when we compile the variable, we add the ID of the variable on the bytecode stack of the compiler c. We use NumberTokenFactory to decide, whether the ID is actually 1 byte long or 2 bytes long and then we add those bytes to the compiler bytecode stack.\n\t //theStack.pop();//well... the previous call had the side effect of placing the \"NumberToken\" on the working stack \"theStack\", which is not what we want, so we're removing it from the working stack here!\n\t extended = CompilableToken.compileNumber(vt.getVariableID(), c);\n\n\t //boolean extended = false;\n\t\t\t/*\n\t if (nt instanceof ByteNumberToken) {\n\t extended = false;\n\t } else {\n\t extended = true;\n\t }\n\t */\n\t this.type = vt.getType();\n\t this.context = vt.getContext();\n\n\t c.getByteCode().push(this);\n\n\t //TODO: Following code should have been here for ages, it seems suspicious\n\t // (impossible)\n\t //that everything even worked without it\n\t theStack.push(this.type);\n\t /*\n\t if (this.getType() == BYTE) {\n\t c.getByteCode().push(new PushByteVariableOnStackByteCodeToken(extended));\n\t theStack.push(new ByteNumberToken(\"0\"));\n\t } else if (this.getType() == INT) {\n\t c.getByteCode().push(new PushIntegerVariableOnStackByteCodeToken(extended));\n\t theStack.push(new IntegerNumberToken(\"0\"));\n\t } else {\n\t System.err.println(\"Cannot compile a variable reference; unknown variable type for variable \\\"\" + this.getTokenString() + \".\\\"\");\n\n\t }\n\t */\n\t}\n\n }", "final void deriveDisAssemblerFunction() {\n\n if ( tryAsPart() ) {\n return;\n }\n\n tryFieldAndMethodReflection();\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(953);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 63485, \"O8\", \"\", \"O8\", \"O8\");\n fieldWriter0.visitAnnotation(\"x!|VK3#k&ddT\", true);\n ByteVector byteVector0 = classWriter0.pool;\n fieldWriter0.put(byteVector0);\n }", "public void visitPUTSTATIC(PUTSTATIC o){\n\t\tString field_name = o.getFieldName(cpg);\n\t\tJavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());\n\t\tField[] fields = jc.getFields();\n\t\tField f = null;\n\t\tfor (int i=0; i<fields.length; i++){\n\t\t\tif (fields[i].getName().equals(field_name)){\n\t\t\t\tf = fields[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (f == null){\n\t\t\tthrow new AssertionViolatedException(\"Field not found?!?\");\n\t\t}\n\t\tType value = stack().peek();\n\t\tType t = Type.getType(f.getSignature());\n\t\tType shouldbe = t;\n\t\tif (shouldbe == Type.BOOLEAN ||\n\t\t\t\tshouldbe == Type.BYTE ||\n\t\t\t\tshouldbe == Type.CHAR ||\n\t\t\t\tshouldbe == Type.SHORT){\n\t\t\tshouldbe = Type.INT;\n\t\t}\n\t\tif (t instanceof ReferenceType){\n\t\t\tReferenceType rvalue = null;\n\t\t\tif (value instanceof ReferenceType){\n\t\t\t\trvalue = (ReferenceType) value;\n\t\t\t\treferenceTypeIsInitialized(o, rvalue);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of a reference type as expected.\");\n\t\t\t}\n\t\t\t// TODO: This can possibly only be checked using Staerk-et-al's \"set-of-object types\", not\n\t\t\t// using \"wider cast object types\" created during verification.\n\t\t\t// Comment it out if you encounter problems. See also the analogon at visitPUTFIELD.\n\t\t\tif (!(rvalue.isAssignmentCompatibleWith(shouldbe))){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not assignment compatible with '\"+shouldbe+\"'.\");\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (shouldbe != value){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of type '\"+shouldbe+\"' as expected.\");\n\t\t\t}\n\t\t}\n\t\t// TODO: Interface fields may be assigned to only once. (Hard to implement in\n\t\t// JustIce's execution model). This may only happen in <clinit>, see Pass 3a.\n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(131072);\n FieldWriter fieldWriter0 = (FieldWriter)classWriter0.visitField(2, \"\", \"\", (String) null, \"\");\n ByteVector byteVector0 = classWriter0.pool;\n fieldWriter0.put(byteVector0);\n }", "private OtherRootTracer createDispatcherTracer() {\n Transaction tx = Transaction.getTransaction();\n ClassMethodSignature sig = new ClassMethodSignature(getClass().getName(), \"dude\", \"()V\");\n return new OtherRootTracer(tx, sig, this, new OtherTransSimpleMetricNameFormat(\"myMetricName\"));\n }", "@AfterReturning(marker = BodyMarker.class, scope = \"TargetClass.printStaticFields\", order = 1)\n public static void printSpecificStaticFieldsTedious (final DynamicContext dc) {\n final String format = \"disl: tedious %s=%s\\n\";\n\n //\n\n final Class <?> staticType = dc.getStaticFieldValue (\n \"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\",\n \"STATIC_TYPE\", \"Ljava/lang/Class;\", Class.class\n );\n\n System.out.printf (format, \"STATIC_TYPE\", staticType);\n\n //\n\n final String staticName = dc.getStaticFieldValue (\n \"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\",\n \"STATIC_NAME\", \"Ljava/lang/String;\", String.class\n );\n\n System.out.printf (format, \"STATIC_NAME\", staticName);\n\n //\n\n final int staticRand = dc.getStaticFieldValue (\n \"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\",\n \"STATIC_RAND\", \"I\", int.class\n );\n\n System.out.printf (format, \"STATIC_RAND\", staticRand);\n\n //\n\n final double staticMath = dc.getStaticFieldValue (\n \"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\",\n \"STATIC_MATH\", \"D\", double.class\n );\n\n System.out.printf (format, \"STATIC_MATH\", staticMath);\n }", "@Override\r\n public void inject(ConcurrentMap<String, Object> singleton, Object bean, Field field) {\n Reflections.setField(bean, field, field.getAnnotation(Value.class).value());\r\n }", "@Override\n\t\t\tpublic void visit(FieldDeclaration arg0, Object arg1) {\n\t\t\t\tchar type = ' ';\n\t\t\t\tif((arg0.getModifiers() & Modifier.PUBLIC) == Modifier.PUBLIC) {\n\t\t\t\t\ttype = '+';\n\t\t\t\t\tfor(Iterator<?> it = arg0.getVariables().iterator(); it.hasNext(); ) {\n\t\t\t\t\t\tif(getTemplateValue(arg0.getType().toString()) != \"\")\n\t\t\t\t\t\t\tusingTypes.add(new Pair(className, getTemplateValue(arg0.getType().toString()), true));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfields.add(type + \" \" + it.next() + \":\" + arg0.getType());\n\t\t\t\t\t\t\tusingTypes.add(new Pair(className, arg0.getType().toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if((arg0.getModifiers() & Modifier.PRIVATE) == Modifier.PRIVATE) {\n\t\t\t\t\tfor(Iterator<?> it = arg0.getVariables().iterator(); it.hasNext(); ) {\n\t\t\t\t\t\tVariableDeclarator v = (VariableDeclarator) it.next();\n\t\t\t\t\t\tif(getTemplateValue(arg0.getType().toString()) != \"\")\n\t\t\t\t\t\t\tusingTypes.add(new Pair(className, getTemplateValue(arg0.getType().toString()), true));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tnonPublic.add(new Variable(v.toString(), arg0.getType().toString(), Modifier.PRIVATE));\n\t\t\t\t\t\t\tusingTypes.add(new Pair(className, arg0.getType().toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(type != ' ')\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}" ]
[ "0.7072164", "0.60071", "0.5680197", "0.55722284", "0.5403987", "0.5335263", "0.520401", "0.5158351", "0.5121712", "0.5018868", "0.49703172", "0.49645185", "0.49318105", "0.49278456", "0.4879873", "0.47959659", "0.47761908", "0.4758418", "0.47492358", "0.47277084", "0.4690895", "0.4688155", "0.46856585", "0.46853864", "0.46751228", "0.46660766", "0.466491", "0.46309274", "0.46306336", "0.46276376", "0.46177632", "0.46042454", "0.4600896", "0.45599863", "0.4556596", "0.45508516", "0.45489806", "0.4543605", "0.4541479", "0.44993857", "0.44968045", "0.44860372", "0.44807705", "0.4480071", "0.44766816", "0.44739825", "0.4439221", "0.4436946", "0.44365412", "0.441962", "0.44005403", "0.43957976", "0.43874806", "0.4384066", "0.43668965", "0.43454504", "0.4343281", "0.43399996", "0.43301132", "0.43290475", "0.43229708", "0.43209726", "0.43160412", "0.43135548", "0.43082717", "0.4302245", "0.42999312", "0.4296676", "0.4295829", "0.42876256", "0.42861912", "0.42831337", "0.42786565", "0.42746788", "0.4266144", "0.42652905", "0.42622453", "0.4251301", "0.42484406", "0.42455375", "0.42452568", "0.42364287", "0.42250574", "0.42218432", "0.42187515", "0.42071974", "0.4204509", "0.42013317", "0.4200244", "0.41873074", "0.41859525", "0.41836768", "0.41764444", "0.41739783", "0.41725332", "0.41684166", "0.41638333", "0.4161998", "0.41601956", "0.41502842" ]
0.68549144
1
Create an emitter that generates the instruction needed to either store the TOS value into the static field (isStore==true) or push the static fields's value onto the stack (isStore==false).
public static Emitter makeEmitter( ExpressionFactory.StaticFieldAccessExpression expr, boolean isStore ) { Type targetType = expr.target() ; ClassInfo cinfo = targetType.classInfo() ; FieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ; if (fld == null) throw new IllegalArgumentException( expr.fieldName() + " is not a valid field in class " + targetType.name() ) ; // XXX we need access control checking here!!! return makeFieldInsnEmitter( isStore, true, targetType, expr.fieldName(), fld.type() ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Emitter makeEmitter( Variable var, boolean isStore ) {\n VariableInternal ivar = (VariableInternal)var ;\n\tInteger slot = ASMUtil.stackFrameSlot.get( ivar ) ;\n\tassert slot != null ;\n\treturn new IntOperandEmitter( getVarInsnOpcode( ivar.type(), isStore ),\n\t slot ) ;\n }", "@Override\r\n public List<Machine.Instruction> emit() {\r\n\r\n List<Machine.Instruction> InstructionList = new LinkedList<Machine.Instruction>();\r\n InstructionList.add(new Machine.pushConstant(value));\r\n return InstructionList;\r\n\r\n }", "public final Instruction store_op() throws RecognitionException {\r\n Instruction inst = null;\r\n\r\n\r\n Type t1 =null;\r\n\r\n Constant e1 =null;\r\n\r\n Type t2 =null;\r\n\r\n Constant e2 =null;\r\n\r\n int align60 =0;\r\n\r\n\r\n\r\n Constant dest = null;\r\n int opcode;\r\n boolean isVolatile = false;\r\n List<Type> types = new ArrayList<Type>();\r\n List<Constant> operands = new ArrayList<Constant>();\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:5: ( ( VOLATILE )? 'store' t1= first_class_type e1= expression ',' t2= pointer_type e2= expression ( ',' align )? )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:7: ( VOLATILE )? 'store' t1= first_class_type e1= expression ',' t2= pointer_type e2= expression ( ',' align )?\r\n {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:7: ( VOLATILE )?\r\n int alt51=2;\r\n int LA51_0 = input.LA(1);\r\n\r\n if ( (LA51_0==VOLATILE) ) {\r\n alt51=1;\r\n }\r\n switch (alt51) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:8: VOLATILE\r\n {\r\n match(input,VOLATILE,FOLLOW_VOLATILE_in_store_op2118); \r\n\r\n isVolatile=true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input,82,FOLLOW_82_in_store_op2124); \r\n\r\n opcode = InstType.storeInst;\r\n\r\n pushFollow(FOLLOW_first_class_type_in_store_op2139);\r\n t1=first_class_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_store_op2143);\r\n e1=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(t1); operands.add(e1);\r\n\r\n match(input,44,FOLLOW_44_in_store_op2146); \r\n\r\n pushFollow(FOLLOW_pointer_type_in_store_op2155);\r\n t2=pointer_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_store_op2159);\r\n e2=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(t2); operands.add(e2);\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:383:5: ( ',' align )?\r\n int alt52=2;\r\n int LA52_0 = input.LA(1);\r\n\r\n if ( (LA52_0==44) ) {\r\n alt52=1;\r\n }\r\n switch (alt52) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:383:6: ',' align\r\n {\r\n match(input,44,FOLLOW_44_in_store_op2168); \r\n\r\n pushFollow(FOLLOW_align_in_store_op2170);\r\n align60=align();\r\n\r\n state._fsp--;\r\n\r\n\r\n operands.add(valueFactory.createConstantValue(SimpleConstantValue.intConst, align60 + \"\"));\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n inst = instFactory.createLoadStoreInst(dest, opcode, operands, types, isVolatile);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return inst;\r\n }", "@Override\r\n public Serializable createStaticState() {\r\n return this.m_func.createStaticState();\r\n }", "public static Emitter makeEmitter( \n\tExpressionFactory.NonStaticFieldAccessExpression expr,\n\tboolean isStore ) {\n\n\tType targetType = ((ExpressionInternal)expr.target()).type() ;\n\n\tClassInfo cinfo = targetType.classInfo() ;\n\tFieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ;\n\tif (fld == null) {\n\t throw new IllegalArgumentException( expr.fieldName() \n + \" is not a valid field in class \" + targetType.name() ) ;\n }\n\n\t// XXX we need access control checking here!!!\n\treturn makeFieldInsnEmitter( isStore, false, targetType, \n expr.fieldName(), fld.type() ) ;\n }", "@Override\n public String generate() {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + variableSymbol + \" = alloca \" + variableLLVMType + \"\\n\";\n }", "private static int getVarInsnOpcode( Type type, boolean isStore ) {\n\tif (isStore) {\n\t if (!type.isPrimitive()) {\n\t\treturn ASTORE ;\n\t } else if (type == Type._float()) {\n\t\treturn FSTORE ;\n\t } else if (type == Type._double()) {\n\t\treturn DSTORE ;\n\t } else if (type == Type._long()) {\n\t\treturn LSTORE ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ISTORE ;\n\t }\n\t} else {\n\t if (!type.isPrimitive()) {\n\t\treturn ALOAD ;\n\t } else if (type == Type._float()) {\n\t\treturn FLOAD ;\n\t } else if (type == Type._double()) {\n\t\treturn DLOAD ;\n\t } else if (type == Type._long()) {\n\t\treturn LLOAD ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ILOAD ;\n\t }\n\t}\n }", "void gen() {\n if (val != null) {\r\n\tX86.Operand r = val.gen_source_operand(true,X86.RAX); \r\n\tX86.emitMov(X86.Size.Q,r,X86.RAX);\r\n }\r\n // exit sequence\r\n // pop the frame\r\n if (frameSize != 0)\r\n\tX86.emit2(\"addq\",new X86.Imm(frameSize),X86.RSP);\r\n // restore any callee save registers\r\n for (int i = X86.calleeSaveRegs.length-1; i >= 0; i--) {\r\n\tX86.Reg r = X86.calleeSaveRegs[i]; \r\n\tif (env.containsValue(r))\r\n\t X86.emit1(\"popq\",r);\r\n }\r\n // and we're done\r\n X86.emit0(\"ret\");\r\n }", "void emit(DataOutputStream out, ConstantPool cp) throws IOException, ClassException {\n out.write(getType());\n // The rest is dependent on what type of constant this is.\n emit2(out, cp);\n }", "public void putStatic(String desc, String owner, String name, int opcode, int ID, int SID, int index)\n\t{\n\t mv.visitFieldInsn(opcode, owner, name, desc); // putstatic \n logFieldAccess(desc, ID, SID, index); \n\t}", "public void visitPutstatic(Quad obj) {\n if (TRACE_INTRA) out.println(\"Visiting: \"+obj);\n Operand val = Putstatic.getSrc(obj);\n Putstatic.getField(obj).resolve();\n jq_Field f = Putstatic.getField(obj).getField();\n if (IGNORE_STATIC_FIELDS) f = null;\n if (val instanceof RegisterOperand) {\n Register src_r = ((RegisterOperand)val).getRegister();\n heapStore(my_global, getRegister(src_r), f);\n } else {\n Node n = handleConst((ConstOperand) val, new QuadProgramLocation(method, obj));\n Assert._assert(n != null); \n heapStore(my_global, n, f);\n }\n }", "public void visitStoreInstruction(StoreInstruction o){\n\t\t//visitLocalVariableInstruction(o) is called before, because it is more generic.\n\n\t\tif (stack().isEmpty()){ // Don't bother about 1 or 2 stack slots used. This check is implicitely done below while type checking.\n\t\t\tconstraintViolated(o, \"Cannot STORE: Stack to read from is empty.\");\n\t\t}\n\n\t\tif ( (!(o instanceof ASTORE)) ){\n\t\t\tif (! (stack().peek() == o.getType(cpg)) ){// the other xSTORE types are singletons in BCEL.\n\t\t\t\tconstraintViolated(o, \"Stack top type and STOREing Instruction type mismatch: Stack top: '\"+stack().peek()+\"'; Instruction type: '\"+o.getType(cpg)+\"'.\");\n\t\t\t}\n\t\t}\n\t\telse{ // we deal with ASTORE\n\t\t\tType stacktop = stack().peek();\n\t\t\tif ( (!(stacktop instanceof ReferenceType)) && (!(stacktop instanceof ReturnaddressType)) ){\n\t\t\t\tconstraintViolated(o, \"Stack top type and STOREing Instruction type mismatch: Stack top: '\"+stack().peek()+\"'; Instruction expects a ReferenceType or a ReturnadressType.\");\n\t\t\t}\n\t\t\tif (stacktop instanceof ReferenceType){\n\t\t\t\treferenceTypeIsInitialized(o, (ReferenceType) stacktop);\n\t\t\t}\n\t\t}\n\t}", "private void addInstanceVariables(ClassWriterTracker ct) {\n // variable #1, the state manager\n ct.getCw().visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_TRANSIENT,\n \"sm\", Type.getDescriptor(OpenJPAStateManager.class), null, null).visitEnd();\n\n // variable #2, the state manager\n ct.getCw().visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_TRANSIENT,\n \"field\", Type.getDescriptor(int.class), null, null).visitEnd();\n }", "@Override\n public void invoke(Stack stack) {\n try {\n StackEffect se = (StackEffect) stack.pop().object;\n Symbol fieldName = (Symbol) stack.pop().object;\n Object instance = stack.pop().object;\n Object value = stack.pop().object;\n CheckedType className = se.getOutputTypes().get(0);\n\n Field field = Class.forName(className.toSymbol().symbol).getField(fieldName.symbol);\n field.set(instance,value);\n stack.push( new JavaType(instance.getClass()), instance );\n } catch (NoSuchFieldException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n }\n }", "public String generate(String registerName) {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + registerName + \" = alloca \" + variableLLVMType + \"\\n\";\n }", "X86.Reg gen_dest_operand();", "@RegionEffects(\"writes test.D:Static\")\n public void x1() {\n s1 = 1;\n }", "public static Emitter makeEmitter( \n\tExpressionFactory.ArrayIndexExpression expr,\n\tboolean isStore ) {\n\tif (isStore) {\n\t return arrayStore ;\n\t} else {\n\t return arrayLoad ;\n\t}\n }", "@Converted(kind = Converted.Kind.MANUAL_COMPILATION,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp\", line = 1724,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitAtomicStore\", NM=\"_ZN5clang7CodeGen15CodeGenFunction15EmitAtomicStoreENS0_6RValueENS0_6LValueEN4llvm14AtomicOrderingEbb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction15EmitAtomicStoreENS0_6RValueENS0_6LValueEN4llvm14AtomicOrderingEbb\")\n//</editor-fold>\npublic final void EmitAtomicStore(RValue rvalue, LValue dest, \n AtomicOrdering AO, boolean IsVolatile, \n boolean isInit) {\n // If this is an aggregate r-value, it should agree in type except\n // maybe for address-space qualification.\n assert (!rvalue.isAggregate() || rvalue.getAggregateAddress().getElementType() == dest.getAddress().getElementType());\n \n AtomicInfo atomics/*J*/= new AtomicInfo(/*Deref*/$this(), dest);\n LValue LVal = new LValue(atomics.getAtomicLValue());\n \n // If this is an initialization, just put the value there normally.\n if (LVal.isSimple()) {\n if (isInit) {\n atomics.emitCopyIntoMemory(new RValue(rvalue));\n return;\n }\n \n // Check whether we should use a library call.\n if (atomics.shouldUseLibcall()) {\n CallArgList args = null;\n try {\n // Produce a source address.\n Address srcAddr = atomics.materializeRValue(new RValue(rvalue));\n \n // void __atomic_store(size_t size, void *mem, void *val, int order)\n args/*J*/= new CallArgList();\n args.add(RValue.get(atomics.getAtomicSizeValue()), \n $this().getContext().getSizeType().$QualType());\n args.add(RValue.get($this().EmitCastToVoidPtr(atomics.getAtomicPointer())), \n $this().getContext().VoidPtrTy.$QualType());\n args.add(RValue.get($this().EmitCastToVoidPtr(srcAddr.getPointer())), \n $this().getContext().VoidPtrTy.$QualType());\n args.add(RValue.get(ConstantInt.get(IntTy, $int2ulong(((int)AdtsupportLlvmGlobals.toCABI(AO).getValue())))), \n $this().getContext().IntTy.$QualType());\n CGAtomicStatics.emitAtomicLibcall(/*Deref*/$this(), new StringRef(/*KEEP_STR*/\"__atomic_store\"), $this().getContext().VoidTy.$QualType(), args);\n return;\n } finally {\n if (args != null) { args.$destroy(); }\n }\n }\n \n // Okay, we're doing this natively.\n Value /*P*/ intValue = atomics.convertRValueToInt(new RValue(rvalue));\n \n // Do the atomic store.\n Address addr = atomics.emitCastToAtomicIntPointer(atomics.getAtomicAddress());\n intValue = $this().Builder.CreateIntCast(intValue, addr.getElementType(), /*isSigned=*/ false);\n StoreInst /*P*/ store = $this().Builder.CreateStore(intValue, new Address(addr));\n \n // Initializations don't need to be atomic.\n if (!isInit) {\n store.setAtomic(AO);\n }\n \n // Other decoration.\n if (IsVolatile) {\n store.setVolatile(true);\n }\n if ((dest.getTBAAInfo() != null)) {\n $this().CGM.DecorateInstructionWithTBAA(store, dest.getTBAAInfo());\n }\n return;\n }\n \n // Emit simple atomic update operation.\n atomics.EmitAtomicUpdate(AO, new RValue(rvalue), IsVolatile);\n}", "public void visitPUTSTATIC(PUTSTATIC o){\n\t\tString field_name = o.getFieldName(cpg);\n\t\tJavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());\n\t\tField[] fields = jc.getFields();\n\t\tField f = null;\n\t\tfor (int i=0; i<fields.length; i++){\n\t\t\tif (fields[i].getName().equals(field_name)){\n\t\t\t\tf = fields[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (f == null){\n\t\t\tthrow new AssertionViolatedException(\"Field not found?!?\");\n\t\t}\n\t\tType value = stack().peek();\n\t\tType t = Type.getType(f.getSignature());\n\t\tType shouldbe = t;\n\t\tif (shouldbe == Type.BOOLEAN ||\n\t\t\t\tshouldbe == Type.BYTE ||\n\t\t\t\tshouldbe == Type.CHAR ||\n\t\t\t\tshouldbe == Type.SHORT){\n\t\t\tshouldbe = Type.INT;\n\t\t}\n\t\tif (t instanceof ReferenceType){\n\t\t\tReferenceType rvalue = null;\n\t\t\tif (value instanceof ReferenceType){\n\t\t\t\trvalue = (ReferenceType) value;\n\t\t\t\treferenceTypeIsInitialized(o, rvalue);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of a reference type as expected.\");\n\t\t\t}\n\t\t\t// TODO: This can possibly only be checked using Staerk-et-al's \"set-of-object types\", not\n\t\t\t// using \"wider cast object types\" created during verification.\n\t\t\t// Comment it out if you encounter problems. See also the analogon at visitPUTFIELD.\n\t\t\tif (!(rvalue.isAssignmentCompatibleWith(shouldbe))){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not assignment compatible with '\"+shouldbe+\"'.\");\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (shouldbe != value){\n\t\t\t\tconstraintViolated(o, \"The stack top type '\"+value+\"' is not of type '\"+shouldbe+\"' as expected.\");\n\t\t\t}\n\t\t}\n\t\t// TODO: Interface fields may be assigned to only once. (Hard to implement in\n\t\t// JustIce's execution model). This may only happen in <clinit>, see Pass 3a.\n\t}", "@Override\n \tpublic void logVarCreated(String name, String type) {\n \t\tSystem.out.println(\"\\tVariable created: [\" + type + \"] \" + name );\n \t}", "public static boolean handleStaticFieldWrite(Node sf, Node x, Node m) {\n\t\tif(ImmutabilityPreferences.isInferenceRuleLoggingEnabled()){\n\t\t\tString values = \"x:\" + getTypes(x).toString() + \", sf:\" + getTypes(sf).toString() + \", m:\" + getTypes(m).toString();\n\t\t\tLog.info(\"TSWRITE (sf=x in m, sf=\" + sf.getAttr(XCSG.name) + \", x=\" + x.getAttr(XCSG.name) + \", m=\" + m.getAttr(XCSG.name) + \")\\n\" + values);\n\t\t}\n\t\t// a write to a static field means the containing method cannot be pure (readonly or polyread)\n\t\treturn removeTypes(m, ImmutabilityTypes.READONLY, ImmutabilityTypes.POLYREAD);\n\t}", "public void emitWithOperand(OpCode opcode, int operandAddress){\n\t\t\n\t}", "private void createDataProcMovShiftReg(Code32 code, int op, int cond, int Rd, int Rm, int shiftType, int Rs) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 12) | (Rs << 8) | (shiftType << 5) | (1 << 4) | Rm;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public void internalStore() {\r\n\t\tdata = busInt.get();\r\n\t}", "@Override\r\n public DataField[] registerAndGetStructure() throws RuntimeException{ \r\n \tDataField[] s = getActiveAddressBean().getOutputStructure();\r\n \tif (s == null){throw new RuntimeException(\"Direct Push wrapper has an undefined output structure.\");}\r\n \treturn s;\r\n }", "@RegionEffects(\"writes test.C:Static\")\n public void y1() {\n s1 = 1;\n }", "@RegionEffects(\"writes test.D:Static\") // BAD\n public void n1() {\n s1 = 1;\n }", "public static void main(String[] args) \r\n\t{\r\n\t\tVariable_Types obj=new Variable_Types();\r\n\t\tString tname=obj.toolname;\r\n\t\tSystem.out.println(\"Instant Variable name is => \"+tname);\r\n\r\n\t\t\r\n\t\t/*\r\n\t\t * Calling Class variables [Variable with static specifier]\r\n\t\t * \t\t\r\n\t\t */\r\n\t\tString mail=email;\r\n\t\tSystem.out.println(\"static variable value is => \"+mail);\r\n\t}", "public void tox86(Genx86 generate) throws IOException{\n \texpr.register = register;\n \tString expReg = generate.regName(expr.register);\n \n \texpr.tox86(generate);\n \n \tgenerate.write(generate.push(\"rdi\"));\n \n \tif (expr.type.getType() instanceof IntType){\n \t generate.write(generate.movInt(\"rdi\",expReg));\n\t generate.write(\"call print_int\\n\");\n \t}\n \telse if (expr.type.getType() instanceof BoolType){\n \t generate.write(generate.movBool(\"rdi\",expReg));\n\t generate.write(\"call print_int\\n\");\n \t}\n \telse if (expr.type.getType() instanceof FloatType){\n \t generate.write(generate.movReal(\"rdi\",expReg));\n\t generate.write(\"call print_float\\n\");\n \t}\n \telse if (expr.type.getType() instanceof CharType){\n \t generate.write(generate.movChar(\"rdi\",expReg));\n\t generate.write(\"call print_char\\n\");\n \t}\n \telse{\n \t generate.write(\"print de \"+expr.type.getType()+\" no implementado\");\n \t System.out.println(\"====================\");\n \t System.out.println(\"print de \"+expr.type.getType()+\" no implementado\");\n \t System.out.println(\"====================\");\n \t}\n \t\n\tgenerate.write(generate.pop(\"rdi\"));\n \t// // Por ahora se asume que todas las expresiones son numeros enteros\n \t// //de un solo digito.\n \t// String code = \"\";\n \t// String expReg = generate.current_reg();\n \n \t// expr.tox86(generate);\n \n \t// //\"Transformo\" a ASCII\n \t// code += generate.add(expReg,\"48\");\n \n \t// code += generate.save_print_regs();\n \n \t// code += generate.mov(\"[\"+generate.stack_pointer()+\"]\",expReg);\n \t// // Pongo el valor de la expresion en la pila, ya que la llamada\n // //sys_write necesita que el String este en memoria.\n \t\n \t// code += generate.setup_print(generate.stack_pointer(),\"1\",\"4\");\n \t// code += generate.syscall();\n \t// code += generate.restore_print_regs();\n \t \t \n \t// generate.write(code);\n }", "public void emit(OpCode opcode){\n\t\t\n\t}", "@Override\n\tpublic void display() {\n\t\tDexUtil qualifiedName = new DexUtil();\n\t\tsuper.display();\n\t\n\t\tint dest = ((OneRegisterInstruction) instruction).getRegisterA();\n\t FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();\n\t \n\t String name= qualifiedName.getQualifiedName(f.getDefiningClass())+\".\"+qualifiedName.getQualifiedName(f.getName());\n\t String type= qualifiedName.getQualifiedName(f.getType());\n\t \n\t \n\t Variable variable=new Variable(null, 0, 0, 0, 0);\n\t \n\t variable.setName(name);\n\t variable.setType(type);\n\t DexMethodDefinition.registerLocals[dest]=variable;\n\t System.out.println(variable.getName());\n\t \n\t}", "void emit(TrackerPayload payload);", "Instruction createInstruction();", "private int emitInstruction(int var1_1, int var2_2, int var3_3) {\n var4_4 = this.mg;\n if (var2_2 == -1) {\n throw new Compiler$Exn(\"insn is -1\");\n }\n var5_5 = 0;\n var6_6 = var2_2 >>> 26 & 255;\n var7_7 = var2_2 >>> 21 & 31;\n var8_8 = var2_2 >>> 16 & 31;\n var9_9 = var2_2 >>> 16 & 31;\n var10_10 = var2_2 >>> 11 & 31;\n var11_11 = var2_2 >>> 11 & 31;\n var12_12 = var2_2 >>> 6 & 31;\n var13_13 = var2_2 >>> 6 & 31;\n var14_14 = var2_2 & 63;\n var15_15 = var2_2 >>> 6 & 1048575;\n var16_16 = var2_2 & 67108863;\n var17_17 = var2_2 & 65535;\n var19_19 = var18_18 = var2_2 << 16 >> 16;\n switch (var6_6) {\n case 0: {\n switch (var14_14) {\n case 0: {\n if (var2_2 == 0) {\n return var5_5;\n }\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, var12_12);\n var4_4.add(120);\n this.setReg();\n return var5_5;\n }\n case 2: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, var12_12);\n var4_4.add(124);\n this.setReg();\n return var5_5;\n }\n case 3: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, var12_12);\n var4_4.add(122);\n this.setReg();\n return var5_5;\n }\n case 4: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(120);\n this.setReg();\n return var5_5;\n }\n case 6: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(124);\n this.setReg();\n return var5_5;\n }\n case 7: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(122);\n this.setReg();\n return var5_5;\n }\n case 8: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.emitInstruction(-1, var3_3, -1);\n this.preSetPC();\n this.pushRegWZ(0 + var7_7);\n this.setPC();\n this.leaveMethod();\n return var5_5 |= 1;\n }\n case 9: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.emitInstruction(-1, var3_3, -1);\n this.link(var1_1);\n this.preSetPC();\n this.pushRegWZ(0 + var7_7);\n this.setPC();\n this.leaveMethod();\n return var5_5 |= 1;\n }\n case 12: {\n this.preSetPC();\n var4_4.add(18, var1_1);\n this.setPC();\n this.restoreChangedRegs();\n this.preSetReg(2);\n var4_4.add(42);\n this.pushRegZ(2);\n this.pushRegZ(4);\n this.pushRegZ(5);\n this.pushRegZ(6);\n this.pushRegZ(7);\n this.pushRegZ(8);\n this.pushRegZ(9);\n var4_4.add(-74, (Object)this.me.method(\"syscall\", Type.INT, new Type[]{Type.INT, Type.INT, Type.INT, Type.INT, Type.INT, Type.INT, Type.INT}));\n this.setReg();\n var4_4.add(42);\n var4_4.add(-76, (Object)this.me.field(\"state\", Type.INT));\n var20_20 = var4_4.add(-103);\n this.preSetPC();\n var4_4.add(18, var1_1 + 4);\n this.setPC();\n this.leaveMethod();\n var4_4.setArg(var20_20, var4_4.size());\n return var5_5;\n }\n case 13: {\n var4_4.add(-69, (Object)Type.Class.instance((String)\"org.ibex.nestedvm.Runtime$ExecutionException\"));\n var4_4.add(89);\n var4_4.add(18, (Object)new StringBuffer().append(\"BREAK Code \").append(ClassFileCompiler.toHex(var15_15)).toString());\n var4_4.add(-73, (Object)Type.Class.instance((String)\"org.ibex.nestedvm.Runtime$ExecutionException\").method(\"<init>\", Type.VOID, new Type[]{Type.STRING}));\n var4_4.add(-65);\n return var5_5 |= 1;\n }\n case 16: {\n this.preSetReg(0 + var10_10);\n this.pushReg(64);\n this.setReg();\n return var5_5;\n }\n case 17: {\n this.preSetReg(64);\n this.pushRegZ(0 + var7_7);\n this.setReg();\n return var5_5;\n }\n case 18: {\n this.preSetReg(0 + var10_10);\n this.pushReg(65);\n this.setReg();\n return var5_5;\n }\n case 19: {\n this.preSetReg(65);\n this.pushRegZ(0 + var7_7);\n this.setReg();\n return var5_5;\n }\n case 24: {\n this.pushRegWZ(0 + var7_7);\n var4_4.add(-123);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(-123);\n var4_4.add(105);\n var4_4.add(92);\n var4_4.add(-120);\n if (this.preSetReg(65)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.add(18, 32);\n var4_4.add(125);\n var4_4.add(-120);\n if (this.preSetReg(64)) {\n var4_4.add(95);\n }\n this.setReg();\n return var5_5;\n }\n case 25: {\n this.pushRegWZ(0 + var7_7);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(105);\n var4_4.add(92);\n var4_4.add(-120);\n if (this.preSetReg(65)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.add(18, 32);\n var4_4.add(125);\n var4_4.add(-120);\n if (this.preSetReg(64)) {\n var4_4.add(95);\n }\n this.setReg();\n return var5_5;\n }\n case 26: {\n this.pushRegWZ(0 + var7_7);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(92);\n var4_4.add(108);\n if (this.preSetReg(65)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.add(112);\n if (this.preSetReg(64)) {\n var4_4.add(95);\n }\n this.setReg();\n return var5_5;\n }\n case 27: {\n this.pushRegWZ(0 + var8_8);\n var4_4.add(89);\n this.setTmp();\n var20_21 = var4_4.add(-103);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(92);\n this.pushTmp();\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(94);\n var4_4.add(109);\n var4_4.add(-120);\n if (this.preSetReg(65)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.add(113);\n var4_4.add(-120);\n if (this.preSetReg(64)) {\n var4_4.add(95);\n }\n this.setReg();\n var4_4.setArg(var20_21, var4_4.size());\n return var5_5;\n }\n case 32: {\n throw new Compiler$Exn(\"ADD (add with oveflow trap) not suported\");\n }\n case 33: {\n this.preSetReg(0 + var10_10);\n if (var8_8 != 0 && var7_7 != 0) {\n this.pushReg(0 + var7_7);\n this.pushReg(0 + var8_8);\n var4_4.add(96);\n } else if (var7_7 != 0) {\n this.pushReg(0 + var7_7);\n } else {\n this.pushRegZ(0 + var8_8);\n }\n this.setReg();\n return var5_5;\n }\n case 34: {\n throw new Compiler$Exn(\"SUB (add with oveflow trap) not suported\");\n }\n case 35: {\n this.preSetReg(0 + var10_10);\n if (var8_8 != 0 && var7_7 != 0) {\n this.pushReg(0 + var7_7);\n this.pushReg(0 + var8_8);\n var4_4.add(100);\n } else if (var8_8 != 0) {\n this.pushReg(0 + var8_8);\n var4_4.add(116);\n } else {\n this.pushRegZ(0 + var7_7);\n }\n this.setReg();\n return var5_5;\n }\n case 36: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var7_7);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(126);\n this.setReg();\n return var5_5;\n }\n case 37: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var7_7);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(-128);\n this.setReg();\n return var5_5;\n }\n case 38: {\n this.preSetReg(0 + var10_10);\n this.pushRegWZ(0 + var7_7);\n this.pushRegWZ(0 + var8_8);\n var4_4.add(-126);\n this.setReg();\n return var5_5;\n }\n case 39: {\n this.preSetReg(0 + var10_10);\n if (var7_7 != 0 || var8_8 != 0) {\n if (var7_7 != 0 && var8_8 != 0) {\n this.pushReg(0 + var7_7);\n this.pushReg(0 + var8_8);\n var4_4.add(-128);\n } else if (var7_7 != 0) {\n this.pushReg(0 + var7_7);\n } else {\n this.pushReg(0 + var8_8);\n }\n var4_4.add(2);\n var4_4.add(-126);\n } else {\n var4_4.add(18, -1);\n }\n this.setReg();\n return var5_5;\n }\n case 42: {\n this.preSetReg(0 + var10_10);\n if (var7_7 != var8_8) {\n this.pushRegZ(0 + var7_7);\n this.pushRegZ(0 + var8_8);\n var20_22 = var4_4.add(-95);\n var4_4.add(3);\n var21_31 = var4_4.add(-89);\n var4_4.setArg(var20_22, var4_4.add(4));\n var4_4.setArg(var21_31, var4_4.size());\n } else {\n var4_4.add(18, 0);\n }\n this.setReg();\n return var5_5;\n }\n case 43: {\n this.preSetReg(0 + var10_10);\n if (var7_7 != var8_8) {\n if (var7_7 != 0) {\n this.pushReg(0 + var7_7);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n this.pushReg(0 + var8_8);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(-108);\n var20_23 = var4_4.add(-101);\n } else {\n this.pushReg(0 + var8_8);\n var20_23 = var4_4.add(-102);\n }\n var4_4.add(3);\n var21_32 = var4_4.add(-89);\n var4_4.setArg(var20_23, var4_4.add(4));\n var4_4.setArg(var21_32, var4_4.size());\n } else {\n var4_4.add(18, 0);\n }\n this.setReg();\n return var5_5;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Illegal instruction 0/\").append(var14_14).toString());\n }\n case 1: {\n switch (var8_8) {\n case 0: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n return this.doIfInstruction(-101, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 1: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n return this.doIfInstruction(-100, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 16: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n var20_24 = var4_4.add(-100);\n this.emitInstruction(-1, var3_3, -1);\n this.link(var1_1);\n this.branch(var1_1, var1_1 + var19_19 * 4 + 4);\n var4_4.setArg(var20_24, var4_4.size());\n return var5_5;\n }\n case 17: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n var20_25 = -1;\n if (var7_7 != 0) {\n this.pushRegWZ(0 + var7_7);\n var20_25 = var4_4.add(-101);\n }\n this.emitInstruction(-1, var3_3, -1);\n this.link(var1_1);\n this.branch(var1_1, var1_1 + var19_19 * 4 + 4);\n if (var20_25 != -1) {\n var4_4.setArg(var20_25, var4_4.size());\n }\n if (var20_25 != -1) return var5_5;\n return var5_5 |= 1;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Illegal Instruction 1/\").append(var8_8).toString());\n }\n case 2: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.emitInstruction(-1, var3_3, -1);\n this.branch(var1_1, var1_1 & -268435456 | var16_16 << 2);\n return var5_5 |= 1;\n }\n case 3: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n var22_35 = var1_1 & -268435456 | var16_16 << 2;\n this.emitInstruction(-1, var3_3, -1);\n this.link(var1_1);\n this.branch(var1_1, var22_35);\n return var5_5 |= 1;\n }\n case 4: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n if (var7_7 == var8_8) {\n this.emitInstruction(-1, var3_3, -1);\n this.branch(var1_1, var1_1 + var19_19 * 4 + 4);\n return var5_5 |= 1;\n }\n if (var7_7 != 0 && var8_8 != 0) {\n this.pushReg(0 + var7_7);\n this.pushReg(0 + var8_8);\n return this.doIfInstruction(-97, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n this.pushReg(var8_8 == 0 ? 0 + var7_7 : 0 + var8_8);\n return this.doIfInstruction(-103, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 5: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n if (var8_8 == 0) {\n return this.doIfInstruction(-102, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n this.pushReg(0 + var8_8);\n return this.doIfInstruction(-96, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 6: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n return this.doIfInstruction(-98, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 7: {\n if (var1_1 == -1) {\n throw new Compiler$Exn(\"pc modifying insn in delay slot\");\n }\n this.pushRegWZ(0 + var7_7);\n return this.doIfInstruction(-99, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 8: {\n throw new Compiler$Exn(\"ADDI (add immediate with oveflow trap) not suported\");\n }\n case 9: {\n if (var7_7 != 0 && var18_18 != 0 && var7_7 == var8_8 && this.doLocal(var8_8) && var18_18 >= -32768 && var18_18 <= 32767) {\n this.regLocalWritten[var8_8] = true;\n var4_4.add(-124, (Object)new MethodGen.Pair(this.getLocalForReg(var8_8), var18_18));\n return var5_5;\n }\n this.preSetReg(0 + var8_8);\n this.addiu(var7_7, var18_18);\n this.setReg();\n return var5_5;\n }\n case 10: {\n this.preSetReg(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(18, var18_18);\n var20_26 = var4_4.add(-95);\n var4_4.add(3);\n var21_33 = var4_4.add(-89);\n var4_4.setArg(var20_26, var4_4.add(4));\n var4_4.setArg(var21_33, var4_4.size());\n this.setReg();\n return var5_5;\n }\n case 11: {\n this.preSetReg(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(-123);\n var4_4.add(18, (Object)ClassFileCompiler.FFFFFFFF);\n var4_4.add(127);\n var4_4.add(18, (Object)new Long((long)var18_18 & 0xFFFFFFFFL));\n var4_4.add(-108);\n var20_27 = var4_4.add(-101);\n var4_4.add(3);\n var21_34 = var4_4.add(-89);\n var4_4.setArg(var20_27, var4_4.add(4));\n var4_4.setArg(var21_34, var4_4.size());\n this.setReg();\n return var5_5;\n }\n case 12: {\n this.preSetReg(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(18, var17_17);\n var4_4.add(126);\n this.setReg();\n return var5_5;\n }\n case 13: {\n this.preSetReg(0 + var8_8);\n if (var7_7 != 0 && var17_17 != 0) {\n this.pushReg(0 + var7_7);\n var4_4.add(18, var17_17);\n var4_4.add(-128);\n } else if (var7_7 != 0) {\n this.pushReg(0 + var7_7);\n } else {\n var4_4.add(18, var17_17);\n }\n this.setReg();\n return var5_5;\n }\n case 14: {\n this.preSetReg(0 + var8_8);\n this.pushRegWZ(0 + var7_7);\n var4_4.add(18, var17_17);\n var4_4.add(-126);\n this.setReg();\n return var5_5;\n }\n case 15: {\n this.preSetReg(0 + var8_8);\n var4_4.add(18, var17_17 << 16);\n this.setReg();\n return var5_5;\n }\n case 16: {\n throw new Compiler$Exn(\"TLB/Exception support not implemented\");\n }\n case 17: {\n switch (var7_7) {\n case 0: {\n this.preSetReg(0 + var8_8);\n this.pushReg(32 + var10_10);\n this.setReg();\n return var5_5;\n }\n case 2: {\n if (var11_11 != 31) {\n throw new Compiler$Exn(new StringBuffer().append(\"FCR \").append(var11_11).append(\" unavailable\").toString());\n }\n this.preSetReg(0 + var8_8);\n this.pushReg(66);\n this.setReg();\n return var5_5;\n }\n case 4: {\n this.preSetReg(32 + var10_10);\n if (var8_8 != 0) {\n this.pushReg(0 + var8_8);\n } else {\n var4_4.add(3);\n }\n this.setReg();\n return var5_5;\n }\n case 6: {\n if (var11_11 != 31) {\n throw new Compiler$Exn(new StringBuffer().append(\"FCR \").append(var11_11).append(\" unavailable\").toString());\n }\n this.preSetReg(66);\n this.pushReg(0 + var8_8);\n this.setReg();\n return var5_5;\n }\n case 8: {\n this.pushReg(66);\n var4_4.add(18, 8388608);\n var4_4.add(126);\n if ((var2_2 >>> 16 & 1) == 0) {\n v0 = -103;\n return this.doIfInstruction(v0, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n v0 = -102;\n return this.doIfInstruction(v0, var1_1, var1_1 + var19_19 * 4 + 4, var3_3);\n }\n case 16: \n case 17: {\n var22_36 = var7_7 == 17;\n switch (var14_14) {\n case 0: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? 99 : 98);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 1: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? 103 : 102);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 2: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? 107 : 106);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 3: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? 111 : 110);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 5: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n var4_4.add(var22_36 != false ? 92 : 89);\n var4_4.add(var22_36 != false ? 14 : 11);\n var4_4.add(var22_36 != false ? -104 : -106);\n var20_28 = var4_4.add(-99);\n var4_4.add(var22_36 != false ? 14 : 11);\n if (var22_36) {\n var4_4.add(94);\n var4_4.add(88);\n } else {\n var4_4.add(95);\n }\n var4_4.add(var22_36 != false ? 103 : 102);\n var4_4.setArg(var20_28, var4_4.size());\n this.setDouble(var22_36);\n return var5_5;\n }\n case 6: {\n this.preSetReg(32 + var13_13);\n this.pushReg(32 + var11_11);\n this.setReg();\n if (var22_36 == false) return var5_5;\n this.preSetReg(32 + var13_13 + 1);\n this.pushReg(32 + var11_11 + 1);\n this.setReg();\n return var5_5;\n }\n case 7: {\n this.preSetDouble(32 + var13_13, var22_36);\n this.pushDouble(32 + var11_11, var22_36);\n var4_4.add(var22_36 != false ? 119 : 118);\n this.setDouble(var22_36);\n return var5_5;\n }\n case 32: {\n this.preSetFloat(32 + var13_13);\n this.pushDouble(32 + var11_11, var22_36);\n if (var22_36) {\n var4_4.add(-112);\n }\n this.setFloat();\n return var5_5;\n }\n case 33: {\n this.preSetDouble(32 + var13_13);\n this.pushDouble(32 + var11_11, var22_36);\n if (!var22_36) {\n var4_4.add(-115);\n }\n this.setDouble();\n return var5_5;\n }\n case 36: {\n var23_37 = new MethodGen.Switch.Table(0, 3);\n this.preSetReg(32 + var13_13);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushReg(66);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(-86, (Object)var23_37);\n var23_37.setTarget(2, var4_4.size());\n if (!var22_36) {\n var4_4.add(-115);\n }\n var4_4.add(-72, (Object)Type.Class.instance((String)\"java.lang.Math\").method(\"ceil\", Type.DOUBLE, new Type[]{Type.DOUBLE}));\n if (!var22_36) {\n var4_4.add(-112);\n }\n var20_29 = var4_4.add(-89);\n var23_37.setTarget(0, var4_4.size());\n var4_4.add(18, (Object)(var22_36 != false ? ClassFileCompiler.POINT_5_D : ClassFileCompiler.POINT_5_F));\n var4_4.add(var22_36 != false ? 99 : 98);\n var23_37.setTarget(3, var4_4.size());\n if (!var22_36) {\n var4_4.add(-115);\n }\n var4_4.add(-72, (Object)Type.Class.instance((String)\"java.lang.Math\").method(\"floor\", Type.DOUBLE, new Type[]{Type.DOUBLE}));\n if (!var22_36) {\n var4_4.add(-112);\n }\n var23_37.setTarget(1, var4_4.size());\n var23_37.setDefaultTarget(var4_4.size());\n var4_4.setArg(var20_29, var4_4.size());\n var4_4.add(var22_36 != false ? -114 : -117);\n this.setReg();\n return var5_5;\n }\n case 50: \n case 60: \n case 62: {\n this.preSetReg(66);\n this.pushReg(66);\n var4_4.add(18, -8388609);\n var4_4.add(126);\n this.pushDouble(32 + var11_11, var22_36);\n this.pushDouble(32 + var9_9, var22_36);\n var4_4.add(var22_36 != false ? -104 : -106);\n switch (var14_14) {\n case 50: {\n var20_30 = var4_4.add(-102);\n ** break;\n }\n case 60: {\n var20_30 = var4_4.add(-100);\n ** break;\n }\n case 62: {\n var20_30 = var4_4.add(-99);\n ** break;\n }\n }\n var20_30 = -1;\nlbl643: // 4 sources:\n var4_4.add(18, 8388608);\n var4_4.add(-128);\n var4_4.setArg(var20_30, var4_4.size());\n this.setReg();\n return var5_5;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Invalid Instruction 17/\").append(var7_7).append(\"/\").append(var14_14).toString());\n }\n case 20: {\n switch (var14_14) {\n case 32: {\n this.preSetFloat(32 + var13_13);\n this.pushReg(32 + var11_11);\n var4_4.add(-122);\n this.setFloat();\n return var5_5;\n }\n case 33: {\n this.preSetDouble(32 + var13_13);\n this.pushReg(32 + var11_11);\n var4_4.add(-121);\n this.setDouble();\n return var5_5;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Invalid Instruction 17/\").append(var7_7).append(\"/\").append(var14_14).toString());\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Invalid Instruction 17/\").append(var7_7).toString());\n }\n case 18: \n case 19: {\n throw new Compiler$Exn(\"coprocessor 2 and 3 instructions not available\");\n }\n case 32: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-111);\n this.setReg();\n return var5_5;\n }\n case 33: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(5);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-109);\n this.setReg();\n return var5_5;\n }\n case 34: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, 16777215);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(126);\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(-128);\n this.setReg();\n return var5_5;\n }\n case 35: {\n this.preSetReg(0 + var8_8);\n this.memRead(0 + var7_7, var18_18);\n this.setReg();\n return var5_5;\n }\n case 36: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(18, 255);\n var4_4.add(126);\n this.setReg();\n return var5_5;\n }\n case 37: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(5);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-110);\n this.setReg();\n return var5_5;\n }\n case 38: {\n this.preSetReg(0 + var8_8);\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.pushRegWZ(0 + var8_8);\n var4_4.add(18, -256);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(126);\n this.preMemRead();\n this.pushTmp();\n this.memRead(true);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-128);\n this.setReg();\n return var5_5;\n }\n case 40: {\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead(true);\n this.pushTmp();\n this.memRead(true);\n var4_4.add(18, -16777216);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(126);\n if (var8_8 != 0) {\n this.pushReg(0 + var8_8);\n var4_4.add(18, 255);\n var4_4.add(126);\n } else {\n var4_4.add(18, 0);\n }\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(-128);\n this.memWrite();\n return var5_5;\n }\n case 41: {\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead(true);\n this.pushTmp();\n this.memRead(true);\n var4_4.add(18, 65535);\n this.pushTmp();\n var4_4.add(5);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(126);\n if (var8_8 != 0) {\n this.pushReg(0 + var8_8);\n var4_4.add(18, 65535);\n var4_4.add(126);\n } else {\n var4_4.add(18, 0);\n }\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(5);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(-128);\n this.memWrite();\n return var5_5;\n }\n case 42: {\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead(true);\n this.pushTmp();\n this.memRead(true);\n var4_4.add(18, -256);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(126);\n this.pushRegWZ(0 + var8_8);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(-128);\n this.memWrite();\n return var5_5;\n }\n case 43: {\n this.preMemWrite1();\n this.preMemWrite2(0 + var7_7, var18_18);\n this.pushRegZ(0 + var8_8);\n this.memWrite();\n return var5_5;\n }\n case 46: {\n this.addiu(0 + var7_7, var18_18);\n this.setTmp();\n this.preMemRead(true);\n this.pushTmp();\n this.memRead(true);\n var4_4.add(18, 16777215);\n this.pushTmp();\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(124);\n var4_4.add(126);\n this.pushRegWZ(0 + var8_8);\n this.pushTmp();\n var4_4.add(2);\n var4_4.add(-126);\n var4_4.add(6);\n var4_4.add(126);\n var4_4.add(6);\n var4_4.add(120);\n var4_4.add(120);\n var4_4.add(-128);\n this.memWrite();\n return var5_5;\n }\n case 48: {\n this.preSetReg(0 + var8_8);\n this.memRead(0 + var7_7, var18_18);\n this.setReg();\n return var5_5;\n }\n case 49: {\n this.preSetReg(32 + var8_8);\n this.memRead(0 + var7_7, var18_18);\n this.setReg();\n return var5_5;\n }\n case 56: {\n this.preSetReg(0 + var8_8);\n this.preMemWrite1();\n this.preMemWrite2(0 + var7_7, var18_18);\n this.pushReg(0 + var8_8);\n this.memWrite();\n var4_4.add(18, 1);\n this.setReg();\n return var5_5;\n }\n case 57: {\n this.preMemWrite1();\n this.preMemWrite2(0 + var7_7, var18_18);\n this.pushReg(32 + var8_8);\n this.memWrite();\n return var5_5;\n }\n }\n throw new Compiler$Exn(new StringBuffer().append(\"Invalid Instruction: \").append(var6_6).append(\" at \").append(ClassFileCompiler.toHex(var1_1)).toString());\n }", "@Override\n public List<Machine.Instruction> emit() {\n ArrayList<Machine.Instruction> data = new ArrayList<>();\n data.add(new Machine.Load(name));\n return data;\n }", "public void createValue() {\n value = new GisInfoCaptureDO();\n }", "@RegionEffects(\"writes Static\") // GOOD\n public void m1() {\n s1 = 1;\n }", "public MyMemory(){\n super();\n this.instruction = new Instruction(); //Only the IR register will use this attribute\n }", "private void createDataProcRegShiftReg(Code32 code, int op, int cond, int Rd, int Rn, int Rm, int shiftType, int Rs) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rn << 16) | (Rd << 12) | (Rs << 8) | (shiftType << 5) | (1 << 4) | Rm;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public String visit(AStoreStmt n, Object argu)\r\n\t {\r\n\t\t int stackPos = 4*Integer.parseInt(n.f1.f1.f0.tokenImage);\r\n int RegNum = n.f2.f0.which;\r\n MipsOutPut.add(MipsOutPut.Space+\"sw \" + Regs.RegList[RegNum] +\", \" + stackPos + \"($sp) \\n\");\r\n return null;\r\n\t }", "StaticVariable(){\n count++;//incrementing the value of static variable\n System.out.println(count);\n }", "@Test\n public void testReflectionStatics() {\n final ReflectionStaticFieldsFixture instance1 = new ReflectionStaticFieldsFixture();\n assertEquals(\n this.toBaseString(instance1) + \"[instanceInt=67890,instanceString=instanceString,staticInt=12345,staticString=staticString]\",\n ReflectionToStringBuilder.toString(instance1, null, false, true, ReflectionStaticFieldsFixture.class));\n assertEquals(\n this.toBaseString(instance1) + \"[instanceInt=67890,instanceString=instanceString,staticInt=12345,staticString=staticString,staticTransientInt=54321,staticTransientString=staticTransientString,transientInt=98765,transientString=transientString]\",\n ReflectionToStringBuilder.toString(instance1, null, true, true, ReflectionStaticFieldsFixture.class));\n assertEquals(\n this.toBaseString(instance1) + \"[instanceInt=67890,instanceString=instanceString,staticInt=12345,staticString=staticString]\",\n this.toStringWithStatics(instance1, null, ReflectionStaticFieldsFixture.class));\n assertEquals(\n this.toBaseString(instance1) + \"[instanceInt=67890,instanceString=instanceString,staticInt=12345,staticString=staticString]\",\n this.toStringWithStatics(instance1, null, ReflectionStaticFieldsFixture.class));\n }", "public interface Opcodes {\n int T_INT = 10;\n // versions\n // int V1_1 = 3 << 16 | 45;\n // int V1_2 = 0 << 16 | 46;\n // int V1_3 = 0 << 16 | 47;\n // int V1_4 = 0 << 16 | 48;\n int V1_5 = 0 << 16 | 49;\n // int V1_6 = 0 << 16 | 50;\n // int V1_7 = 0 << 16 | 51;\n // access flags\n int ACC_PUBLIC = 0x0001; // class, field, method\n int ACC_SUPER = 0x0020; // class\n // opcodes // visit method (- = idem)\n int ACONST_NULL = 1; // -\n int ICONST_0 = 3; // -\n int ICONST_1 = 4; // -\n int LCONST_0 = 9; // -\n int LCONST_1 = 10; // -\n int FCONST_0 = 11; // -\n int DCONST_0 = 14; // -\n int BIPUSH = 16; // visitIntInsn\n // int SIPUSH = 17; // -\n // int LDC = 18; // visitLdcInsn\n // int LDC_W = 19; // -\n // int LDC2_W = 20; // -\n int ILOAD = 21; // visitVarInsn\n int LLOAD = 22; // -\n int FLOAD = 23; // -\n int DLOAD = 24; // -\n int ALOAD = 25; // -\n int ISTORE = 54; // visitVarInsn\n int LSTORE = 55; // -\n int FSTORE = 56; // -\n int DSTORE = 57; // -\n int ASTORE = 58; // -\n int IASTORE = 79; // visitInsn\n int POP = 87; // -\n // int POP2 = 88; // -\n int DUP = 89; // -\n int IADD = 96; // -\n // int ISUB = 100; // -\n int IAND = 126; // -\n // int LAND = 127; // -\n int IOR = 128; // -\n // int LOR = 129; // -\n // int IXOR = 130; // -\n // int LXOR = 131; // -\n // int IINC = 132; // visitIincInsn\n int LCMP = 148; // -\n int FCMPL = 149; // -\n int DCMPL = 151; // -\n int IFEQ = 153; // visitJumpInsn\n int IFNE = 154; // -\n int IFLE = 158; // -\n int IF_ICMPEQ = 159; // -\n int IF_ICMPNE = 160; // -\n int IF_ICMPLT = 161; // -\n int IF_ICMkgE = 162; // -\n int IF_ICMkgT = 163; // -\n int IF_ACMPEQ = 165; // -\n int IF_ACMPNE = 166; // -\n int GOTO = 167; // -\n int RET = 169; // visitVarInsn\n int ARETURN = 176; // -\n int RETURN = 177; // -\n int GETSTATIC = 178; // visitFieldInsn\n int GETFIELD = 180; // -\n int PUTFIELD = 181; // -\n int INVOKEVIRTUAL = 182; // visitMethodInsn\n int INVOKESPECIAL = 183; // -\n int INVOKESTATIC = 184; // -\n int INVOKEINTERFACE = 185; // -\n // int INVOKEDYNAMIC = 186; // -\n int NEW = 187; // visitTypeInsn\n int NEWARRAY = 188; // visitIntInsn\n // int ANEWARRAY = 189; // visitTypeInsn\n // int ARRAYLENGTH = 190; // visitInsn\n // int ATHROW = 191; // -\n int CHECKCAST = 192; // visitTypeInsn\n int INSTANCEOF = 193;\n int IFNULL = 198; // visitJumpInsn\n int IFNONNULL = 199; // -\n // int GOTO_W = 200; // -\n // int JSR_W = 201; // -\n}", "@AfterReturning(marker = BodyMarker.class, scope = \"TargetClass.printStaticFields\", order = 1)\n public static void printSpecificStaticFieldsTedious (final DynamicContext dc) {\n final String format = \"disl: tedious %s=%s\\n\";\n\n //\n\n final Class <?> staticType = dc.getStaticFieldValue (\n \"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\",\n \"STATIC_TYPE\", \"Ljava/lang/Class;\", Class.class\n );\n\n System.out.printf (format, \"STATIC_TYPE\", staticType);\n\n //\n\n final String staticName = dc.getStaticFieldValue (\n \"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\",\n \"STATIC_NAME\", \"Ljava/lang/String;\", String.class\n );\n\n System.out.printf (format, \"STATIC_NAME\", staticName);\n\n //\n\n final int staticRand = dc.getStaticFieldValue (\n \"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\",\n \"STATIC_RAND\", \"I\", int.class\n );\n\n System.out.printf (format, \"STATIC_RAND\", staticRand);\n\n //\n\n final double staticMath = dc.getStaticFieldValue (\n \"ch/usi/dag/disl/test/suite/dynamiccontext/app/TargetClass\",\n \"STATIC_MATH\", \"D\", double.class\n );\n\n System.out.printf (format, \"STATIC_MATH\", staticMath);\n }", "public final void mT__73() throws RecognitionException {\n try {\n int _type = T__73;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:141:7: ( 'store' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:141:9: 'store'\n {\n match(\"store\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "@Override\n public void visitFieldInsn(int opcode, String owner, String name, String desc) {\n // GETFIELD I,F,L,D + B,S\n if ((opcode == Opcodes.GETFIELD)) {\n if (desc.equals(\"I\")) {\n if (this.shouldMutate(\"Incremented (++a) integer field \" + name)) {\n mv.visitInsn(Opcodes.DUP); // stack = .. [ref] [ref]\n mv.visitFieldInsn(opcode, owner, name, desc); // stack = ... [ref] [ref.field]\n mv.visitInsn(Opcodes.ICONST_1); // stack = ... [ref] [ref.field] [1]\n mv.visitInsn(Opcodes.IADD); // stack = ... [ref] [ref.field + 1]\n mv.visitInsn(Opcodes.DUP_X1); // stack = ... [ref.field +1] [ref] [ref.field +1]\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); // stack = ... [ref.field +1]\n return;\n }\n }\n if (desc.equals(\"F\")) {\n if (this.shouldMutate(\"Incremented (++a) float field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.FCONST_1);\n mv.visitInsn(Opcodes.FADD);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"J\")) {\n if (this.shouldMutate(\"Incremented (++a) long field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.LCONST_1);\n mv.visitInsn(Opcodes.LADD);\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"D\")) {\n if (this.shouldMutate(\"Incremented (++a) double field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.DCONST_1);\n mv.visitInsn(Opcodes.DADD);\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"B\")) {\n if (this.shouldMutate(\"Incremented (++a) byte field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2B);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"S\")) {\n if (this.shouldMutate(\"Incremented (++a) short field \" + name)) {\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2S);\n mv.visitInsn(Opcodes.DUP_X1);\n mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);\n return;\n }\n }\n }\n\n // GETSTATIC I,F,L,D + B,S\n if (opcode == Opcodes.GETSTATIC) {\n if (desc.equals(\"I\")) {\n if (this.shouldMutate(\"Incremented (++a) static integer field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"F\")) {\n if (this.shouldMutate(\"Incremented (++a) static float field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.FCONST_1);\n mv.visitInsn(Opcodes.FADD);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"J\")) {\n if (this.shouldMutate(\"Incremented (++a) static long field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.LCONST_1);\n mv.visitInsn(Opcodes.LADD);\n mv.visitInsn(Opcodes.DUP2);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"D\")) {\n if (this.shouldMutate(\"Incremented (++a) static double field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.DCONST_1);\n mv.visitInsn(Opcodes.DADD);\n mv.visitInsn(Opcodes.DUP2);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"B\")) {\n if (this.shouldMutate(\"Incremented (++a) static byte field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2B);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n if (desc.equals(\"S\")) {\n if (this.shouldMutate(\"Incremented (++a) static short field \" + name)) {\n mv.visitFieldInsn(opcode, owner, name, desc);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitInsn(Opcodes.IADD);\n mv.visitInsn(Opcodes.I2S);\n mv.visitInsn(Opcodes.DUP);\n mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);\n return;\n }\n }\n }\n mv.visitFieldInsn(opcode, owner, name, desc);\n }", "public static void store(String varName) {\n emit(newVariable(varName).getStore());\n }", "Variable createVariable();", "Variable createVariable();", "@Override\n public void insertLoadAndStores(InstructionListIterator it, LoadStoreHelper helper) {\n helper.loadInValues(this, it);\n if (getCallSite().methodProto.returnType.isVoidType()) {\n return;\n }\n if (outValue == null) {\n helper.popOutType(getCallSite().methodProto.returnType, this, it);\n } else {\n assert outValue.isUsed();\n helper.storeOutValue(this, it);\n }\n }", "public ReoSystemValue(SignatureExpression sign, Assembly<T> prog) {\n\t\tif (sign == null || prog == null)\n\t\t\tthrow new NullPointerException();\n\t\tthis.sign = sign;\n\t\tthis.prog = prog;\n\t}", "private static Store liftGlobals(ScriptNode script, Trace trace, Environment env, Store store) {\n\tSet<String> globals = GlobalVisitor.getGlobals(script);\n\tint i = -1000;\n\tfor (String global : globals) {\n\t Address address = trace.makeAddr(i, \"\");\n\t // Create a dummy variable declaration. This will not exist in the\n\t // output, because the value and variable initialization exists\n\t // outside the file.\n\t Name dummyVariable = new Name();\n\t env.strongUpdateNoCopy(global, Variable.inject(global, address, Change.bottom(),\n\t\t Dependencies.injectVariable(dummyVariable)));\n\t store = store.alloc(address,\n\t\t BValue.top(Change.u(), Dependencies.injectValue(dummyVariable)), dummyVariable);\n\t i--;\n\t}\n\n\treturn store;\n\n }", "public void generate(){\n\t// Write constants/static vars section\n\twriteln(\".data\");\n\tfor ( String global : globalVars ) {\n\t // Initialized to zero. Why not?\n\t writeln(global+\":\\t.word 0\");\n\t}\n\twriteln(\"nl:\\t.asciiz \\\"\\\\n\\\"\");\n writeln(\"\\t.align\\t4\");\n\n\t// Write the prefix\n\twriteln(\".text\");\n\twriteln(\"entry:\");\n writeln(\"\\tjal main\");\n writeln(\"\\tli $v0, 10\");\n writeln(\"\\tsyscall\");\n\twriteln(\"printint:\");\n writeln(\"\\tli $v0, 1\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tla $a0, nl\");\n writeln(\"\\tli $v0, 4\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tjr $ra\");\n\n\tString defun = \"\";\t// Holds the place of the current function\n\tint spDisplacement=0;\t// Stores any displacement we do with $sp\n\n\tfor ( int i=0; i<codeTable.size(); i++ ) {\n\t CodeEntry line = codeTable.get(i);\n\n\t if ( line instanceof Label ) {\n\t\tLabel label = (Label)line;\n\t\twriteln( line.toString() );\n\t\tif ( label.isFunction() )\n\t\t makeFrame( defun = label.name() );\n\t }\n\t else if ( line instanceof Tuple ) {\n\t\tTuple tuple = (Tuple)line;\n\t\t// \n\t\t// Pushing arguments onto the stack (op = \"pusharg\"|\"pushaddr\")\n\t\t// \n\t\tif ( tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") ) {\n\t\t ArrayList<Tuple> argLines = new ArrayList<Tuple>();\n\t\t ArrayList<String> lvOrAddr = new ArrayList<String>();\n\t\t while ( (tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") )\n\t\t\t && i < codeTable.size() ) {\n\t\t\targLines.add( tuple );\n\t\t\tlvOrAddr.add( tuple.op );\n\t\t\tline = codeTable.get( ++i );\n\t\t\tif ( line instanceof Tuple )\n\t\t\t tuple = (Tuple)line;\n\t\t }\n\t\t // Move the stack pointer to accomodate args\n\t\t writeInst(\"subi\t$sp, $sp, \"+(4*argLines.size()));\n\t\t spDisplacement = 4;\n\t\t for ( int j=0; j < argLines.size(); j++ ) {\n\t\t\tTuple argLine = argLines.get(j);\n\t\t\tString theOp = lvOrAddr.get(j);\n\t\t\t// Pass a copy of the argument\n\t\t\tif ( theOp.equals(\"pusharg\") ) {\n\t\t\t if ( isNumber(argLine.place) )\n\t\t\t\twriteInst(\"li\t$t0, \"+argLine.place);\n\t\t\t else\n\t\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, argLine.place ));\n\t\t\t}\n\t\t\t// Pass-by-reference\n\t\t\telse {\n\t\t\t writeInst(\"la\t$t0, \"+printOffset( defun, argLine.place));\n\t\t\t}\n\t\t\twriteInst(\"sw\t$t0, \"+spDisplacement+\"($sp)\");\n\t\t\tspDisplacement+=4;\n\t\t }\n\t\t spDisplacement-=4;\n\n\t\t // Reset counter, put back instruction we didn't use.\n\t\t i--;\n\t\t continue;\n\t\t}\n\t\t// \n\t\t// Calling a function\n\t\t// \n\t\telse if ( tuple.op.equals(\"jal\") ) {\n\t\t writeInst(\"jal\t\"+tuple.arg1);\n\t\t if ( ! tuple.place.equals(\"\") )\n\t\t\twriteInst(\"sw\t$v0, \"+printOffset( defun, tuple.place ));\n\t\t // Move back the $sp from all the \"pushargs\" we probably did\n\t\t if ( spDisplacement > 0 )\n\t\t\twriteInst(\"addi\t$sp, $sp, \"+spDisplacement);\n\t\t}\n\t\t//\n\t\t// Returning from a function (\"return\")\n\t\t//\n\t\telse if ( tuple.op.equals(\"return\") ) {\n\t\t if ( ! tuple.place.equals(\"\") ) {\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t\twriteInst(\"move\t$v0, $t0\");\n\t\t }\n\t\t writeInst(\"move\t$sp, $fp\");\n\t\t writeInst(\"lw\t$ra, -4($sp)\");\n\t\t writeInst(\"lw\t$fp, 0($fp)\");\n\t\t writeInst(\"jr\t$ra\");\n\t\t \n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring two registers for operands\n\t\t//\n\t\telse if ( tuple.op.equals(\"sub\") ||\n\t\t\t tuple.op.equals(\"mul\") ||\n\t\t\t tuple.op.equals(\"div\") ||\n\t\t\t tuple.op.equals(\"rem\") ) {\n\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t if ( tuple.op.equals(\"sub\") && isNumber(tuple.arg2) ) {\n\t\t\twriteInst(\"subi\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t2, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t// \n\t\t// Arithmetic operations that have a separate 'immediate' function,\n\t\t// and where we can reduce # of instructions\n\t\t//\n\t\telse if ( tuple.op.equals(\"add\") ||\n\t\t\t tuple.op.equals(\"and\") ||\n\t\t\t tuple.op.equals(\"or\") ) {\n\t\t if ( isNumber(tuple.arg2) ) {\n\t\t\tif ( isNumber(tuple.arg1) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg1);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else if ( isNumber(tuple.arg1) ) {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg1);\n\t\t }\n\t\t else {\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring only one register for an operand\n\t\t// \n\t\telse if ( tuple.op.equals(\"not\") ||\n\t\t\t tuple.op.equals(\"neg\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Immediate arithmetic expressions\n\t\t//\n\t\telse if ( tuple.op.equals(\"addi\") ||\n\t\t\t tuple.op.equals(\"subi\") ) {\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Assignment and other stuff that does '='\n\t\t//\n\t\telse if ( tuple.op.equals(\"copy\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t0, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"lw\") ) {\n\t\t // Find the location of the base address, put it in t0\n\t\t // writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays that are passed by reference\n\t\t//\n\t\telse if ( tuple.op.equals(\"la\") ) {\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Writing to arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"putarray\") || tuple.op.equals(\"putarrayref\") ) {\n\t\t // tuple.place = thing to be stored\n\t\t // tuple.arg1 = base address\n\t\t // tuple.arg2 = offset\n\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( tuple.op.equals(\"putarray\") )\n\t\t\twriteInst(\"la\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t writeInst(\"sub\t$t1, $t1, $t2\");\n\t\t writeInst(\"sw\t$t0, 0($t1)\");\n\t\t}\n\t\t//\n\t\t// Writing to pointers\n\t\t//\n\t\telse if ( tuple.op.equals(\"putpointer\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Performing conditional branches\n\t\t// \n\t\telse if ( tuple.op.equals(\"ble\") ||\n\t\t\t tuple.op.equals(\"bge\") ||\n\t\t\t tuple.op.equals(\"beq\") ||\n\t\t\t tuple.op.equals(\"bne\") ||\n\t\t\t tuple.op.equals(\"bgt\") ||\n\t\t\t tuple.op.equals(\"blt\") ||\n\t\t\t tuple.op.equals(\"beq\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t}\n\t\t//\n\t\t// Unconditional branch\n\t\t//\n\t\telse if ( tuple.op.equals(\"b\") ) {\n\t\t writeInst(\"b\t\"+tuple.place);\n\t\t}\n\t\t//\n\t\t// Branch equal to zero\n\t\t//\n\t\telse if ( tuple.op.equals(\"beqz\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"beqz\t$t0, \"+tuple.arg1);\n\t\t}\n\t\t//\n\t\t// Dereferences\n\t\t//\n\t\telse if ( tuple.op.equals(\"deref\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Address-of (&)\n\t\t//\n\t\telse if ( tuple.op.equals(\"addrof\") ) {\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t }\n\t}\n\n }", "public DynamicShipClass() {\n\t\tthis.ts = new Long(ts);\n\t}", "@Override\n public void addStoreConstIni() {\n if (AmbientGen.getArrayutcc().size()>0) {\n synchronized (AmbientGen.getArrayutcc()) {\n\n for (Vars varis: AmbientGen.getArrayutcc() ){\n if (varis.iniCons == true) {\n Store.addConstra(varis.getConstraint());\n System.out.println(\" -> Constraint Cargado Al Store - Variable - \" );\n }\n }\n }\n }\n }", "public void generateVar(PhpWriter out)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n objGen.generateVar(out);\n out.print(\".getFieldVar(env, \");\n out.printIntern(_name);\n out.print(\")\");\n }", "DynamicVariable createDynamicVariable();", "@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 }", "@Override\r\n public void visit(Store n, functionStruct fStruct) {\r\n String baseObject = n.f1.f0.toString();\r\n addId(baseObject, fStruct.functionName, fStruct.lineNumber);\r\n //String offsetObject = n.f3.f0.toString();\r\n String storedObject = n.f6.f0.toString();\r\n addId(storedObject, fStruct.functionName, fStruct.lineNumber);\r\n }", "public int store(int offset){\n return runStack.store(offset);\n }", "private void createDataProcReg(Code32 code, int op, int cond, int Rd, int Rn, int Rm, int shiftType, int shiftAmount) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rn << 16) | (Rd << 12) | (shiftAmount << 7) | (shiftType << 5) | Rm;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public Command createStoreCommand(Operand lhs, Operand rhs);", "public void generateAssign(PhpWriter out, Expr value, boolean isTop)\n throws IOException\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n ExprGenerator valueGen = ((ExprPro) value).getGenerator();\n\n objGen.generateObject(out);\n out.print(\".putField(env, \");\n out.printIntern(_name);\n out.print(\", \");\n valueGen.generateCopy(out);\n out.print(\")\");\n }", "public PUSH (ConstantPoolGen cp, int value) {\n if ((value >= -1) && (value <= 5)) // Use ICONST_n\n instruction = new ICONST(value); else if ((value >= -128) && (value <= 127)) // Use BIPUSH\n instruction = new BIPUSH((byte)value); else if ((value >= -32768) && (value <= 32767)) // Use SIPUSH\n instruction = new SIPUSH((short)value); else // If everything fails create a Constant pool entry\n instruction = new LDC(cp.addInteger(value));\n }", "@AfterReturning(marker = BodyMarker.class, scope = \"TargetClass.printStaticFields\", order = 2)\n public static void printSpecificStaticFieldConcise (final DynamicContext dc) {\n final String format = \"disl: concise %s=%s\\n\";\n\n //\n\n final Class <?> staticType = dc.getStaticFieldValue (\n TargetClass.class, \"STATIC_TYPE\", Class.class\n );\n\n System.out.printf (format, \"STATIC_TYPE\", staticType);\n\n //\n\n final String staticName = dc.getStaticFieldValue (\n TargetClass.class, \"STATIC_NAME\", String.class\n );\n\n System.out.printf (format, \"STATIC_NAME\", staticName);\n\n //\n\n final int staticRand = dc.getStaticFieldValue (\n TargetClass.class, \"STATIC_RAND\", int.class\n );\n\n System.out.printf (format, \"STATIC_RAND\", staticRand);\n\n //\n\n final double staticMath = dc.getStaticFieldValue (\n TargetClass.class, \"STATIC_MATH\", double.class\n );\n\n System.out.printf (format, \"STATIC_MATH\", staticMath);\n }", "private void createDataProcMovImm(Code32 code, int op, int cond, int Rd, int imm12) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | (1 << 25) | op | (Rd << 12) | imm12;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public void setStatic() {\r\n\t\tthis.isStatic = true;\r\n\t}", "public void visitFSTORE(FSTORE o){\n\t\t//visitStoreInstruction(StoreInstruction) is called before.\n\t\t\n\t\t// Nothing else needs to be done here.\n\t}", "public String visit(HStoreStmt n, Object argu)\r\n\t {\r\n int RegRsNum = n.f3.f0.which;\r\n\t\t int RegRtNum = n.f1.f0.which;\r\n\t\t MipsOutPut.add(MipsOutPut.Space+\"sw \" + Regs.RegList[RegRsNum ] +\", \"+ n.f2.f0.toString() + \"(\" + Regs.RegList[RegRtNum] +\") \\n\");\r\n\t\t return null;\r\n\t }", "private void addStaticInitAndConstructors() {\n MethodNode mn = new MethodNode(ASM5, ACC_STATIC, \"<clinit>\", \"()V\", null, null);\n InsnList il = mn.instructions;\n il.add(new MethodInsnNode(INVOKESTATIC, \n \"org/apache/uima/type_system/impl/TypeSystemImpl\", \n \"getTypeImplBeingLoaded\", \n \"()Lorg/apache/uima/type_system/impl/TypeImpl;\", \n false));\n il.add(new FieldInsnNode(PUTSTATIC, \n \"pkg/sample/name/SeeSample\", \n \"_typeImpl\", \n \"Lorg/apache/uima/type_system/impl/TypeImpl;\"));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 1;\n mn.maxLocals = 0;\n cn.methods.add(mn);\n \n // instance constructors method\n \n mn = new MethodNode(ACC_PUBLIC, \"<init>\", \"(ILorg/apache/uima/jcas/cas/TOP_Type;)V\", null, null);\n il = mn.instructions;\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ILOAD, 1));\n il.add(new VarInsnNode(ALOAD, 2));\n il.add(new MethodInsnNode(INVOKESPECIAL, \"org/apache/uima/jcas/tcas/Annotation\", \"<init>\", \"(ILorg/apache/uima/jcas/cas/TOP_Type;)V\", false));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 3;\n mn.maxLocals = 3;\n cn.methods.add(mn);\n \n mn = new MethodNode(ACC_PUBLIC, \"<init>\", \"(Lorg/apache/uima/jcas/JCas;)V\", null, null);\n il = mn.instructions;\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ALOAD, 1));\n il.add(new MethodInsnNode(INVOKESPECIAL, \"org/apache/uima/jcas/tcas/Annotation\", \"<init>\", \"(Lorg/apache/uima/jcas/JCas;)V\", false));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 2;\n mn.maxLocals = 2;\n cn.methods.add(mn);\n \n // constructor for annotation\n if (type.isAnnotation) {\n mn = new MethodNode(ACC_PUBLIC, \"<init>\", \"(Lorg/apache/uima/jcas/JCas;II)V\", null, null);\n il = mn.instructions;\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ALOAD, 1));\n il.add(new MethodInsnNode(INVOKESPECIAL, \"org/apache/uima/jcas/tcas/Annotation\", \"<init>\", \"(Lorg/apache/uima/jcas/JCas;)V\", false));\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ILOAD, 2));\n il.add(new MethodInsnNode(INVOKEVIRTUAL, \"org/apache/uima/tutorial/RoomNumberv3\", \"setBegin\", \"(I)V\", false));\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ILOAD, 3));\n il.add(new MethodInsnNode(INVOKEVIRTUAL, \"org/apache/uima/tutorial/RoomNumberv3\", \"setEnd\", \"(I)V\", false));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 2;\n mn.maxLocals = 4;\n cn.methods.add(mn);\n }\n }", "public Var_Act_Data(Action_Type type, Variable v1, Variable v2, int set_value) {\r\n super(type);\r\n var1 = v1;\r\n var2 = v2;\r\n set_val = set_value;\r\n }", "public void createValue() {\n value = new AES_GetBusa_Lib_1_0.AES_GetBusa_Request();\n }", "public void addStorage(StackType option);", "protected void sequence_Operand(ISerializationContext context, Operand semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public void gen_const() {\r\n X86.emit1(\".quad\", new X86.GLabel(toString()));\r\n }", "public int store(int offset) {\n int result = runStack.get(runStack.size()-1);\n runStack.set(framePointers.peek()+offset, runStack.remove(runStack.size()-1));\n return result;\n }", "@Override\r\n\tpublic void translateToAsm(PrintWriter writer, Memory stack) {\n\t\t\r\n\t}", "public static void insert(Any paramAny, ValueMember paramValueMember) {\n/* 49 */ OutputStream outputStream = paramAny.create_output_stream();\n/* 50 */ paramAny.type(type());\n/* 51 */ write(outputStream, paramValueMember);\n/* 52 */ paramAny.read_value(outputStream.create_input_stream(), type());\n/* */ }", "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 void store(String name, String val, String register, int i) {\r\n registerName.add(name);\r\n registerValues.add(val);\r\n registerRegister.add(register);\r\n }", "@Override\n\tpublic OpTarget genAssem(StringWriter sw, IRFuncDecl f, FuncSymbolTable funcs) {\n\t\treturn operand;\n\t}", "void emit(int i) {}", "@Override\n public void enterInputs(FSMParser.InputsContext ctx) {\n for (int i = 0; i < ctx.getChildCount(); i++) {\n if (ctx.getChild(i) instanceof FSMParser.RegisterContext) {\n\n // if defining a new register\n FSMParser.RegisterContext regcont = (FSMParser.RegisterContext) ctx.getChild(i);\n Register reg = new Register(regcont.NAME().getText(), Integer.parseInt(regcont.getChild(1).getText()),\n true, false); //getChild(i-1) because size is always defined before the register\n\n this.comps.add(reg);\n this.regInputs.put(reg, new ArrayList<>());\n\n //if defining a new Variable\n } else if (ctx.getChild(i) instanceof FSMParser.VarContext) {\n FSMParser.VarContext varCont = (FSMParser.VarContext) ctx.getChild(i);\n\n // if this varaible is a clock (labled with C_)\n if (varCont.Clk() != null) {\n Var var = new Var(varCont.NAME().getText(), Integer.parseInt(varCont.getChild(1).getText()), true,\n false, false);\n VerilogComp.setClkName(var.getName());\n\n\n // if this varible is a reset(labled with R_)\n } else if (varCont.RESET() != null) {\n Var var = new Var(varCont.NAME().getText(), Integer.parseInt(varCont.getChild(1).getText()), true,\n false, false);\n VerilogComp.setResetName(var.getName());\n\n }\n // else just a standard variable\n else {\n Var var = new Var(varCont.NAME().getText(), Integer.parseInt(varCont.getChild(1).getText()), true,\n false, false);\n this.comps.add(var);\n\n }\n }\n\n }\n\n\n }", "@Override\n public CodeFragment visitBlockAsgn(AlangParser.BlockAsgnContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n CodeFragment result = new CodeFragment();\n CodeFragment expr = visit(ctx.expression());\n\n result.addCode(expr);\n\n Variable v = this.getVariable(name);\n v.setHasValue();\n\n int arity = ctx.index_to_array().size();\n\n if (v.arity > 0) {\n if (!checkArityAssignment(v, arity)) {\n this.addError(ctx, name, \"Bad assignment to array\");\n return new CodeFragment(\"\");\n }\n }\n\n if (arity == 0) {\n result.addCode(String.format(\"store %s %s, %s* %s\\n\", v.llvmtype, expr.getRegister(), v.llvmtype, v.reg));\n } else {\n /* in case we assign to array */\n int pointers = ctx.index_to_array().size();\n ArrayList<String> registers = new ArrayList<String>();\n for (int i = 0; i < arity; i++) {\n CodeFragment index = visit(ctx.index_to_array(i).expression());\n result.addCode(index);\n registers.add(index.getRegister());\n }\n\n CodeFragment ptr = this.getPointerToArray(v, registers);\n result.addCode(ptr);\n\n ST store = this.group.getInstanceOf(\"store\");\n store.add(\"type\", v.llvmtype);\n store.add(\"reg\", expr.getRegister());\n store.add(\"where\", ptr.getRegister());\n result.addCode(store.render() + \"\\n\");\n }\n\n return result;\n }", "ControlVariable createControlVariable();", "private void createDataProcMovReg(Code32 code, int op, int cond, int Rd, int Rm, int shiftType, int shiftAmount) {\r\n\t\tif ((Rd == Rm) && (shiftAmount == 0)) return;\t// mov Rx, Rx makes no sense\t\r\n\t\tif (shiftAmount == 0) code.instructions[code.iCount] = (cond << 28) | op | (Rd << 12) | Rm;\t// shifting with imm=0 is not valid\r\n\t\telse code.instructions[code.iCount] = (cond << 28) | op | (Rd << 12) | (shiftAmount << 7) | (shiftType << 5) | Rm;\r\n\t\tcode.incInstructionNum();\r\n\t}", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Dynamic Stack\");\r\n\t}", "private void createValue()\n\t{\n\t\ttry\n\t\t{\n\t\t\tm_usage = ((DERBitString)new ASN1InputStream(\n\t\t\t\t\t new ByteArrayInputStream(getDEROctets())).readObject()).intValue();\n\t\t} catch (Exception a_e)\n\t\t{\n\t\t\tthrow new RuntimeException(\"Could not read key usage from byte array!\");\n\t\t}\n\t}", "public interface Constants {\r\n\r\n /** The factory. */\r\n FieldFactory FACTORY = new FieldFactoryImpl();\r\n\r\n /** The 64 K chunk size */\r\n int _64K = 40 * 40 * 40;\r\n\r\n /** The Aligned 64 compiler */\r\n Aligned64Compiler ALIGNED64 = new Aligned64Compiler();\r\n\r\n /** Number of Elements to be READ */\r\n int ELEMENTS_READ = _64K;\r\n\r\n /** Number of Elements to be Written */\r\n int ELEMENTS_WRITTEN = _64K;\r\n\r\n /** The packed compiler*/\r\n CompilerBase PACKED = new PackedCompiler();\r\n\r\n /** The * iterations. */\r\n int _ITERATIONS = 20;\r\n\r\n /** The read iterations. */\r\n int READ_ITERATIONS = _ITERATIONS;\r\n\r\n /** The read union iterations. */\r\n int READ_ITERATIONS_UNION = _ITERATIONS;\r\n\r\n /** The write iterations non-transactional. */\r\n int WRITE_ITERATIONS_NON_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write iterations transactional. */\r\n int WRITE_ITERATIONS_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write union iterations non-transactional. */\r\n int WRITE_ITERATIONS_UNION_NON_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write union iterations transactional. */\r\n int WRITE_ITERATIONS_UNION_TRANSACTIONAL = _ITERATIONS;\r\n\r\n}", "public void createValue() {\r\n value = new com.timeinc.tcs.epay2.EPay2DTO();\r\n }", "protected void sequence_ConstantValue(ISerializationContext context, ConstantValue semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "@Override\n\tpublic void generateOutput(ModInstance callingInst, OutputBuilder outputBuilder) {\n\t\tif (callingInst == null) return;\n\t\t\n\t\tSignalProperties signalProperties = new SignalProperties(callingInst); // extract properties\n\t\toutputBuilder.pushInstance(signalProperties); // instance path is valid after this\n\n\t\toutputBuilder.addSignal(signalProperties); // add signal to verilog structures\n\t\toutputBuilder.popInstance();\n\t}", "public void store() {\r\n\t\tdata = busExt.get();\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tMyStatic.x += 5;\n\t\tMyStatic.x += 5;\n\t\tSystem.out.println(MyStatic.x);//block static only run one time\n\t\t\t\n\t}", "public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;", "public String emitCode(PrintStream os, boolean isValue) {\n String e1Index = getE1().emitCode(os, true), e2Index = getE2().emitCode(os, true);\n\n String type = getE1().getTypeData().getName();\n String index = \"%\" + Properties.index++;;\n\n if (type.compareTo(\"Int\") == 0) {\n // Adunam intregi\n os.println(\n \"\\t\" + index + \" = add i32 \" + e1Index+ \", \" + e2Index + \"\\n\"\n );\n\n return index;\n }\n\n // Concatenam stringuri\n os.println(\n \"\\t\" + index + \" = call %struct.TString* @M6_String_concat(%struct.TString* \" + e1Index +\n \", %struct.TString* \" + e2Index + \")\\n\"\n );\n\n return index;\n }", "public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }", "private void createDataProcImm(Code32 code, int op, int cond, int Rd, int Rn, int imm12) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | (1 << 25) | op | (Rn << 16) | (Rd << 12) | imm12;\r\n\t\tcode.incInstructionNum();\r\n\t}", "public void registerStaticEntity(StaticEntity entity) {\n\t\tputInVisLayerList(entity);\n\t}" ]
[ "0.59588045", "0.5472373", "0.53247786", "0.5257215", "0.5197064", "0.5132733", "0.50731224", "0.49661735", "0.49653736", "0.49511075", "0.49171117", "0.49019012", "0.48569334", "0.4838014", "0.46634296", "0.4657476", "0.46512228", "0.4620435", "0.46059117", "0.4587408", "0.45531625", "0.45322025", "0.4525929", "0.45107386", "0.45050007", "0.44649443", "0.4458113", "0.44547048", "0.44503635", "0.4440891", "0.44166514", "0.43927968", "0.43797886", "0.43761194", "0.43533957", "0.43344444", "0.4320167", "0.43124074", "0.43121368", "0.42893592", "0.4288784", "0.4288653", "0.42592406", "0.4256858", "0.42554706", "0.42523578", "0.42517397", "0.42435157", "0.42401293", "0.42401293", "0.42307517", "0.4218967", "0.4218556", "0.42061618", "0.4203787", "0.42030367", "0.4194477", "0.41907716", "0.4190545", "0.41896266", "0.4185286", "0.41841823", "0.41723457", "0.41692102", "0.41620025", "0.41616282", "0.41549924", "0.4149427", "0.41485912", "0.41427597", "0.4138724", "0.41317588", "0.41307393", "0.4129888", "0.41278014", "0.4127554", "0.41253218", "0.41252226", "0.41246632", "0.41244817", "0.41228393", "0.41211188", "0.41158047", "0.41033295", "0.41002545", "0.4098926", "0.4098767", "0.408612", "0.4082169", "0.40814587", "0.40739205", "0.4072495", "0.40678748", "0.40649998", "0.40615702", "0.40590623", "0.40588757", "0.4056515", "0.40483484", "0.40409777" ]
0.5824117
1
Create an emitter that generates the instruction needed to either store the TOS value into an array (aastore) (isStore==true) or push the array element's value onto the stack (aaload) (isStore==false). This emitter assumes that arrayref and index are already on the stack, and value is on the stack either before (aastore) or after (aaload) the instruction executes.
public static Emitter makeEmitter( ExpressionFactory.ArrayIndexExpression expr, boolean isStore ) { if (isStore) { return arrayStore ; } else { return arrayLoad ; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void visitSASTORE(SASTORE o){\n\t\tif (stack().peek() != Type.INT){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'int', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tindexOfInt(o, stack().peek(1));\n\t\tif (stack().peek(2) == Type.NULL){\n\t\t\treturn;\n\t\t} \n\t\tif (! (stack().peek(2) instanceof ArrayType)){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type short[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t\tType t = ((ArrayType) (stack().peek(2))).getBasicType();\n\t\tif (t != Type.SHORT){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type short[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t}", "public void visitAASTORE(AASTORE o){\n\t\tType arrayref = stack().peek(2);\n\t\tType index = stack().peek(1);\n\t\tType value = stack().peek(0);\n\n\t\tindexOfInt(o, index);\n\t\tif (!(value instanceof ReferenceType)){\n\t\t\tconstraintViolated(o, \"The 'value' is not of a ReferenceType but of type \"+value+\".\");\n\t\t}else{\n\t\t\treferenceTypeIsInitialized(o, (ReferenceType) value);\n\t\t}\n\t\t// Don't bother further with \"referenceTypeIsInitialized()\", there are no arrays\n\t\t// of an uninitialized object type. \n\t\tif (arrayrefOfArrayType(o, arrayref)){\n\t\t\tif (! (((ArrayType) arrayref).getElementType() instanceof ReferenceType)){\n\t\t\t\tconstraintViolated(o, \"The 'arrayref' does not refer to an array with elements of a ReferenceType but to an array of \"+((ArrayType) arrayref).getElementType()+\".\");\n\t\t\t}\n\t\t\tif (! ((ReferenceType)value).isAssignmentCompatibleWith((ReferenceType) ((ArrayType) arrayref).getElementType())){\n\t\t\t\tconstraintViolated(o, \"The type of 'value' ('\"+value+\"') is not assignment compatible to the components of the array 'arrayref' refers to. ('\"+((ArrayType) arrayref).getElementType()+\"')\");\n\t\t\t}\n\t\t}\n\t}", "public void visitDASTORE(DASTORE o){\n\t\tif (stack().peek() != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'double', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tindexOfInt(o, stack().peek(1));\n\t\tif (stack().peek(2) == Type.NULL){\n\t\t\treturn;\n\t\t} \n\t\tif (! (stack().peek(2) instanceof ArrayType)){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type double[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t\tType t = ((ArrayType) (stack().peek(2))).getBasicType();\n\t\tif (t != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type double[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t}", "public static Emitter makeEmitter( Variable var, boolean isStore ) {\n VariableInternal ivar = (VariableInternal)var ;\n\tInteger slot = ASMUtil.stackFrameSlot.get( ivar ) ;\n\tassert slot != null ;\n\treturn new IntOperandEmitter( getVarInsnOpcode( ivar.type(), isStore ),\n\t slot ) ;\n }", "private FlowGraph<Instruction> calculateStoreToArray(ArrayLocation target, Scope scope){\n return VariableLoadGraphFactory.calculateStoreToArray(target, scope, allocations, check);\n }", "public final Instruction store_op() throws RecognitionException {\r\n Instruction inst = null;\r\n\r\n\r\n Type t1 =null;\r\n\r\n Constant e1 =null;\r\n\r\n Type t2 =null;\r\n\r\n Constant e2 =null;\r\n\r\n int align60 =0;\r\n\r\n\r\n\r\n Constant dest = null;\r\n int opcode;\r\n boolean isVolatile = false;\r\n List<Type> types = new ArrayList<Type>();\r\n List<Constant> operands = new ArrayList<Constant>();\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:5: ( ( VOLATILE )? 'store' t1= first_class_type e1= expression ',' t2= pointer_type e2= expression ( ',' align )? )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:7: ( VOLATILE )? 'store' t1= first_class_type e1= expression ',' t2= pointer_type e2= expression ( ',' align )?\r\n {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:7: ( VOLATILE )?\r\n int alt51=2;\r\n int LA51_0 = input.LA(1);\r\n\r\n if ( (LA51_0==VOLATILE) ) {\r\n alt51=1;\r\n }\r\n switch (alt51) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:379:8: VOLATILE\r\n {\r\n match(input,VOLATILE,FOLLOW_VOLATILE_in_store_op2118); \r\n\r\n isVolatile=true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input,82,FOLLOW_82_in_store_op2124); \r\n\r\n opcode = InstType.storeInst;\r\n\r\n pushFollow(FOLLOW_first_class_type_in_store_op2139);\r\n t1=first_class_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_store_op2143);\r\n e1=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(t1); operands.add(e1);\r\n\r\n match(input,44,FOLLOW_44_in_store_op2146); \r\n\r\n pushFollow(FOLLOW_pointer_type_in_store_op2155);\r\n t2=pointer_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n pushFollow(FOLLOW_expression_in_store_op2159);\r\n e2=expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n types.add(t2); operands.add(e2);\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:383:5: ( ',' align )?\r\n int alt52=2;\r\n int LA52_0 = input.LA(1);\r\n\r\n if ( (LA52_0==44) ) {\r\n alt52=1;\r\n }\r\n switch (alt52) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:383:6: ',' align\r\n {\r\n match(input,44,FOLLOW_44_in_store_op2168); \r\n\r\n pushFollow(FOLLOW_align_in_store_op2170);\r\n align60=align();\r\n\r\n state._fsp--;\r\n\r\n\r\n operands.add(valueFactory.createConstantValue(SimpleConstantValue.intConst, align60 + \"\"));\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n inst = instFactory.createLoadStoreInst(dest, opcode, operands, types, isVolatile);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return inst;\r\n }", "public void visitFASTORE(FASTORE o){\n\t\tif (stack().peek() != Type.FLOAT){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'float', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tindexOfInt(o, stack().peek(1));\n\t\tif (stack().peek(2) == Type.NULL){\n\t\t\treturn;\n\t\t} \n\t\tif (! (stack().peek(2) instanceof ArrayType)){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type float[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t\tType t = ((ArrayType) (stack().peek(2))).getBasicType();\n\t\tif (t != Type.FLOAT){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type float[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t}", "@Override\n public CodeFragment visitBlockAsgn(AlangParser.BlockAsgnContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n CodeFragment result = new CodeFragment();\n CodeFragment expr = visit(ctx.expression());\n\n result.addCode(expr);\n\n Variable v = this.getVariable(name);\n v.setHasValue();\n\n int arity = ctx.index_to_array().size();\n\n if (v.arity > 0) {\n if (!checkArityAssignment(v, arity)) {\n this.addError(ctx, name, \"Bad assignment to array\");\n return new CodeFragment(\"\");\n }\n }\n\n if (arity == 0) {\n result.addCode(String.format(\"store %s %s, %s* %s\\n\", v.llvmtype, expr.getRegister(), v.llvmtype, v.reg));\n } else {\n /* in case we assign to array */\n int pointers = ctx.index_to_array().size();\n ArrayList<String> registers = new ArrayList<String>();\n for (int i = 0; i < arity; i++) {\n CodeFragment index = visit(ctx.index_to_array(i).expression());\n result.addCode(index);\n registers.add(index.getRegister());\n }\n\n CodeFragment ptr = this.getPointerToArray(v, registers);\n result.addCode(ptr);\n\n ST store = this.group.getInstanceOf(\"store\");\n store.add(\"type\", v.llvmtype);\n store.add(\"reg\", expr.getRegister());\n store.add(\"where\", ptr.getRegister());\n result.addCode(store.render() + \"\\n\");\n }\n\n return result;\n }", "@Converted(kind = Converted.Kind.MANUAL_COMPILATION,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp\", line = 1724,\n FQN=\"clang::CodeGen::CodeGenFunction::EmitAtomicStore\", NM=\"_ZN5clang7CodeGen15CodeGenFunction15EmitAtomicStoreENS0_6RValueENS0_6LValueEN4llvm14AtomicOrderingEbb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction15EmitAtomicStoreENS0_6RValueENS0_6LValueEN4llvm14AtomicOrderingEbb\")\n//</editor-fold>\npublic final void EmitAtomicStore(RValue rvalue, LValue dest, \n AtomicOrdering AO, boolean IsVolatile, \n boolean isInit) {\n // If this is an aggregate r-value, it should agree in type except\n // maybe for address-space qualification.\n assert (!rvalue.isAggregate() || rvalue.getAggregateAddress().getElementType() == dest.getAddress().getElementType());\n \n AtomicInfo atomics/*J*/= new AtomicInfo(/*Deref*/$this(), dest);\n LValue LVal = new LValue(atomics.getAtomicLValue());\n \n // If this is an initialization, just put the value there normally.\n if (LVal.isSimple()) {\n if (isInit) {\n atomics.emitCopyIntoMemory(new RValue(rvalue));\n return;\n }\n \n // Check whether we should use a library call.\n if (atomics.shouldUseLibcall()) {\n CallArgList args = null;\n try {\n // Produce a source address.\n Address srcAddr = atomics.materializeRValue(new RValue(rvalue));\n \n // void __atomic_store(size_t size, void *mem, void *val, int order)\n args/*J*/= new CallArgList();\n args.add(RValue.get(atomics.getAtomicSizeValue()), \n $this().getContext().getSizeType().$QualType());\n args.add(RValue.get($this().EmitCastToVoidPtr(atomics.getAtomicPointer())), \n $this().getContext().VoidPtrTy.$QualType());\n args.add(RValue.get($this().EmitCastToVoidPtr(srcAddr.getPointer())), \n $this().getContext().VoidPtrTy.$QualType());\n args.add(RValue.get(ConstantInt.get(IntTy, $int2ulong(((int)AdtsupportLlvmGlobals.toCABI(AO).getValue())))), \n $this().getContext().IntTy.$QualType());\n CGAtomicStatics.emitAtomicLibcall(/*Deref*/$this(), new StringRef(/*KEEP_STR*/\"__atomic_store\"), $this().getContext().VoidTy.$QualType(), args);\n return;\n } finally {\n if (args != null) { args.$destroy(); }\n }\n }\n \n // Okay, we're doing this natively.\n Value /*P*/ intValue = atomics.convertRValueToInt(new RValue(rvalue));\n \n // Do the atomic store.\n Address addr = atomics.emitCastToAtomicIntPointer(atomics.getAtomicAddress());\n intValue = $this().Builder.CreateIntCast(intValue, addr.getElementType(), /*isSigned=*/ false);\n StoreInst /*P*/ store = $this().Builder.CreateStore(intValue, new Address(addr));\n \n // Initializations don't need to be atomic.\n if (!isInit) {\n store.setAtomic(AO);\n }\n \n // Other decoration.\n if (IsVolatile) {\n store.setVolatile(true);\n }\n if ((dest.getTBAAInfo() != null)) {\n $this().CGM.DecorateInstructionWithTBAA(store, dest.getTBAAInfo());\n }\n return;\n }\n \n // Emit simple atomic update operation.\n atomics.EmitAtomicUpdate(AO, new RValue(rvalue), IsVolatile);\n}", "public void visitStoreInstruction(StoreInstruction o){\n\t\t//visitLocalVariableInstruction(o) is called before, because it is more generic.\n\n\t\tif (stack().isEmpty()){ // Don't bother about 1 or 2 stack slots used. This check is implicitely done below while type checking.\n\t\t\tconstraintViolated(o, \"Cannot STORE: Stack to read from is empty.\");\n\t\t}\n\n\t\tif ( (!(o instanceof ASTORE)) ){\n\t\t\tif (! (stack().peek() == o.getType(cpg)) ){// the other xSTORE types are singletons in BCEL.\n\t\t\t\tconstraintViolated(o, \"Stack top type and STOREing Instruction type mismatch: Stack top: '\"+stack().peek()+\"'; Instruction type: '\"+o.getType(cpg)+\"'.\");\n\t\t\t}\n\t\t}\n\t\telse{ // we deal with ASTORE\n\t\t\tType stacktop = stack().peek();\n\t\t\tif ( (!(stacktop instanceof ReferenceType)) && (!(stacktop instanceof ReturnaddressType)) ){\n\t\t\t\tconstraintViolated(o, \"Stack top type and STOREing Instruction type mismatch: Stack top: '\"+stack().peek()+\"'; Instruction expects a ReferenceType or a ReturnadressType.\");\n\t\t\t}\n\t\t\tif (stacktop instanceof ReferenceType){\n\t\t\t\treferenceTypeIsInitialized(o, (ReferenceType) stacktop);\n\t\t\t}\n\t\t}\n\t}", "public void visitAStore(Quad obj) {\n if (TRACE_INTRA) out.println(\"Visiting: \"+obj);\n Operand val_op = AStore.getValue(obj);\n Operand base_op = AStore.getBase(obj);\n Object val, base;\n if (base_op instanceof RegisterOperand) {\n Register base_r = ((RegisterOperand)base_op).getRegister();\n base = getRegister(base_r);\n } else {\n // base is not a register?!\n base = handleConst((AConstOperand) base_op, new QuadProgramLocation(method, obj), 0);\n }\n if (val_op instanceof RegisterOperand) {\n Register src_r = ((RegisterOperand)val_op).getRegister();\n val = getRegister(src_r);\n } else {\n val = handleConst((ConstOperand) val_op, new QuadProgramLocation(method, obj), 1);\n }\n heapStore(base, val, null);\n }", "public void push(double value) {\n memory[pointer] = value;\n pointer = (pointer + 1) % memory.length;\n }", "public void push(T val){ if(this.isUpgraded) this.linkArray.push(val); else this.nativeArray.add(val); }", "private void executeArrayAccessExpression(ArrayAccessExpressionTree tree) {\n ProgramState.Pop unstack = programState.unstackValue(2);\n programState = unstack.state;\n programState = programState.stackValue(constraintManager.createSymbolicValue(tree));\n }", "public String visit(ArrayAssignmentStatement n, LLVMRedux argu) throws Exception {\n String storeArg1 = u.arrayAssignment(n.f0.accept(this,argu),n.f2.accept(this,argu));\n //if identifier's type is boolean array, zext i1 f5 to i8 and then store to the f1 result\n if(u.getRegType(storeArg1).equals(\"boolean[]\")){\n String zext = u.getReg();\n u.println(zext+\" = zext i1 \"+ n.f5.accept(this, argu)+\" to i8\");\n u.println(\"store \"+u.dereference(u.javaTypeToLLVMType(u.getRegType(storeArg1)))+\" \"+zext+\", \"+(u.javaTypeToLLVMType(u.getRegType(storeArg1)))+\" \"+storeArg1);\n }else{\n u.println(\"store \"+u.dereference(u.javaTypeToLLVMType(u.getRegType(storeArg1)))+\" \"+n.f5.accept(this, argu)+\", \"+(u.javaTypeToLLVMType(u.getRegType(storeArg1)))+\" \"+storeArg1);\n }\n\n\n\n return null;\n }", "public void putValueBeforeArrayAddrIndex() {\n\t\tObj index = Tab.currentScope().findSymbol(\"@@TEMPOBJ\");\n\t\tObj address = Tab.currentScope().findSymbol(\"@@TEMPOBJ2\");\n\t\tObj value = Tab.currentScope().findSymbol(\"@@TEMPOBJ3\");\n\t\t\n\t\tCode.store(index);\n\t\tCode.store(address);\n\t\tCode.store(value);\n\t\t\n\t\tCode.load(address);\n\t\tCode.load(index);\n\t\tCode.load(value);\t\t\n\t}", "void tickHostWrite(INDArray array);", "void tackDevice(INDArray array);", "@Override\n public void push(Integer value) {\n ar[pos++] = value; \n }", "private static int getVarInsnOpcode( Type type, boolean isStore ) {\n\tif (isStore) {\n\t if (!type.isPrimitive()) {\n\t\treturn ASTORE ;\n\t } else if (type == Type._float()) {\n\t\treturn FSTORE ;\n\t } else if (type == Type._double()) {\n\t\treturn DSTORE ;\n\t } else if (type == Type._long()) {\n\t\treturn LSTORE ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ISTORE ;\n\t }\n\t} else {\n\t if (!type.isPrimitive()) {\n\t\treturn ALOAD ;\n\t } else if (type == Type._float()) {\n\t\treturn FLOAD ;\n\t } else if (type == Type._double()) {\n\t\treturn DLOAD ;\n\t } else if (type == Type._long()) {\n\t\treturn LLOAD ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ILOAD ;\n\t }\n\t}\n }", "public final void rule__OutStoreReference__RefAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10160:1: ( ( ruleStoreExpression ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10161:1: ( ruleStoreExpression )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10161:1: ( ruleStoreExpression )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10162:1: ruleStoreExpression\n {\n before(grammarAccess.getOutStoreReferenceAccess().getRefStoreExpressionParserRuleCall_1_0()); \n pushFollow(FOLLOW_ruleStoreExpression_in_rule__OutStoreReference__RefAssignment_119961);\n ruleStoreExpression();\n\n state._fsp--;\n\n after(grammarAccess.getOutStoreReferenceAccess().getRefStoreExpressionParserRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public String getOpcode() {\n\t\treturn \"fstoreAO\";\n\t}", "public void push(E value);", "public void visitIASTORE(IASTORE o){\n\t\tif (stack().peek() != Type.INT){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'int', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tindexOfInt(o, stack().peek(1));\n\t\tif (stack().peek(2) == Type.NULL){\n\t\t\treturn;\n\t\t} \n\t\tif (! (stack().peek(2) instanceof ArrayType)){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type int[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t\tType t = ((ArrayType) (stack().peek(2))).getBasicType();\n\t\tif (t != Type.INT){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type int[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t}", "public void push(T e) {\n\t\tif(size == data.length){\n\t\t\tresize(size * 2);\n\t\t}\n\t\tthis.data[size++] = e;\n\t}", "ArrayValue createArrayValue();", "stack() {\n arr = (E[]) new Object[size];\n }", "void push(int t) {\r\n\r\n for (int i = registerArray.length - 1; i > 0; i--) {\r\n registerArray[i] = registerArray[i - 1];\r\n }\r\n registerArray[0] = t;\r\n }", "public LlvmValue visit(ArrayLength n){\n\t\t\n\t\tint index = 0;\n\t\tchar type_char;\n\t\tSystem.out.format(\"arraylength:******\\n\");\n\n\t\t//System.out.format(\"****n, n.array: %s \\n%s\\n\",n,n.array);\n\t\t\n\t\t//Desce para o array, e pega o registrador que aponta para ela\n\t\tLlvmValue array = n.array.accept(this);\n\t\t\n\t\t//System.out.format(\"array e array.type: %s \\n%s\\n\",array,array.type);\n\t\t\n\t\tStringBuilder type = new StringBuilder();\n\t\ttype.append(array.type.toString());\n\t\t\n\t\t//System.out.format(\"type: %s\\n\",type);\n\t\t\n\t\tStringBuilder lengths = new StringBuilder();\n\t\t\n\t\t//Temos que verificar se a array foi alocada dinamicamente ou estaticamente, para poder\n\t\t//alterar a forma de pegar o length.\n\t\tif(array.type.toString().contains(\"* *\")){\n\t\t\t//Dinamicamente... nesse caso alocamos o primeiro slot da array para colocar o tamanho\n\t\t\t//System.out.format(\"array declarada dinamicamente... carregando tamanho do primeiro endereco\\n\");\n\t\t\t\n\t\t\t//Carregando tamanho do inicio da array\n\t\t\tLinkedList<LlvmValue> offsets = new LinkedList<LlvmValue>();\n\t\t\t\n\t\t\t//Offsets do getelementptr\n\t\t\toffsets.add(new LlvmIntegerLiteral(0));\n\t\t\t\n\t\t\t//Registrador onde receberemos o pointer para o array (**)\n\t\t\tLlvmRegister length_ptr = new LlvmRegister(new LlvmPointer(LlvmPrimitiveType.I32PTR));\n\n\t\t\t//Pegando o endereco da array\n\t\t\tassembler.add(new LlvmGetElementPointer(length_ptr, array, offsets));\n\t\t\t\n\t\t\t//Registrador no qual vamos carregar a array (*)\n\t\t\tLlvmRegister array_reg = new LlvmRegister(new LlvmPointer(LlvmPrimitiveType.I32));\n\t\t\t\n\t\t\t//Array carregada\n\t\t\tassembler.add(new LlvmLoad(array_reg, length_ptr));\n\t\t\t\n\t\t\t//Registrador no qual vamos carregar o primeiro elemento da array\n\t\t\tLlvmRegister array_size = new LlvmRegister(LlvmPrimitiveType.I32);\n\t\t\t\n\t\t\t//Carrega o size do endereco inicial da array.\n\t\t\tassembler.add(new LlvmLoad(array_size, array_reg));\n\t\t\t\n\t\t\treturn array_size;\n\t\t}\n\t\telse{\n\t\t\t//estaticamente. dessa forma conseguimos retirar o tamanho da array pelo tipo dela.\n\t\t\t//agora vamos parsear esse tamanho, em busca do tamanho total da string...\n\t\t\t\n\t\t\twhile(true){\n\t\t\t\ttype_char = type.charAt(index);\n\t\t\t\tif(type_char=='i'){\n\t\t\t\t\t//System.out.format(\"fim\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//System.out.format(\"char atual:%c\\n\",type.charAt(index));\n\t\t\t\tif(type_char=='x'){\n\t\t\t\t\t//System.out.format(\"x\\n\");\n\t\t\t\t\tlengths.append(\" \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Achei um numero...\n\t\t\t\tif(type_char != 'x' && type_char != ' ' && type_char != '['){\n\t\t\t\t\t//System.out.format(\"numero: %c\\n\", type_char);\n\t\t\t\t\tlengths.append(type_char);\n\t\t\t\t}\n\t\t\t\tif(type_char == '['){\n\t\t\t\t\t//System.out.format(\"[\\n\");\n\t\t\t\t}\n\t\t\t\tif(type_char == ' '){\n\t\t\t\t\t//System.out.format(\"space\\n\");\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.format(\"lengths: %s\\n\", lengths);\n\t\t\t//System.out.format(\"lengths.length: %s\\n\", lengths.length());\n\t\t\tindex = 0;\n\t\t\t\n\t\t\tStringBuilder length = new StringBuilder();\n\t\t\tint total_length = 1;\n\t\t\twhile(index < lengths.length()){\n\t\t\t\ttype_char = lengths.charAt(index);\n\t\t\t\tif(type_char == '\\0'){\n\t\t\t\t\t//System.out.format(\"fim\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(type_char!=' '){\n\t\t\t\t\tlength.append(type_char);\n\t\t\t\t}else{\n\t\t\t\t\t//System.out.format(\"space\\n\");\n\t\t\t\t\t//para cada nivel de array, multiplicamos pelo nivel anterior.\n\t\t\t\t\t//por exemplo, se for [10 x [20 x i32]] fica 10x20\n\t\t\t\t\ttotal_length = total_length * Integer.parseInt(length.toString());\n\t\t\t\t\t//System.out.format(\"total_length: %d\\n\",total_length);\n\t\t\t\t\tlength = new StringBuilder();\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\tLlvmIntegerLiteral length_final = new LlvmIntegerLiteral(total_length);\n\t\t\t\n\t\t\treturn length_final;\n\t\t}\n\t}", "public void visitBASTORE(BASTORE o){\n\t\tType arrayref = stack().peek(2);\n\t\tType index = stack().peek(1);\n\t\tType value = stack().peek(0);\n\n\t\tindexOfInt(o, index);\n\t\tvalueOfInt(o, value);\n\t\tif (arrayrefOfArrayType(o, arrayref)){\n\t\t\tif (! ( (((ArrayType) arrayref).getElementType().equals(Type.BOOLEAN)) ||\n\t\t\t (((ArrayType) arrayref).getElementType().equals(Type.BYTE)) ) )\n\t\t\t\t\tconstraintViolated(o, \"The 'arrayref' does not refer to an array with elements of a Type.BYTE or Type.BOOLEAN but to an array of '\"+((ArrayType) arrayref).getElementType()+\"'.\");\n\t\t}\n\t}", "private void computeStoreIndices(CCTerm index, CCTerm array1,\n\t\t\tCCTerm array2, Set<CCTerm> storeIndices) {\n\t\tfinal ArrayNode node1 = mCongRoots.get(array1.getRepresentative());\n\t\tfinal ArrayNode node2 = mCongRoots.get(array2.getRepresentative());\n\t\tfinal Cursor cursor1 = new Cursor(array1, node1); \n\t\tfinal Cursor cursor2 = new Cursor(array2, node2); \n\t\tassert index == index.getRepresentative();\n\t\tcursor1.collect(index, cursor2, storeIndices);\n\t}", "@Override\n public void inject(T value) {\n T[] tempArray = (T[]) new Object[myLength];\n\n if(myLength == 0) {\n myQ[0] = value;\n }\n for(int i = 0; i < myLength; i++) {\n tempArray[i] = myQ[i];\n }\n for(int i = 1; i <= myLength; i++) {\n myQ[0] = value;\n myQ[i] = tempArray[i - 1];\n }\n myLength++;\n }", "void tickDeviceWrite(INDArray array);", "@Override\r\n\tpublic void push(E e) {\r\n\t\tif (size() == stack.length)\r\n\t\t\texpandArray();\r\n\t\tstack[++t] = e; // increment t before storing new item\r\n\t}", "void push(T value) {\n if (stackSize == stackArray.length) {\n resizeArray();\n }\n stackArray[stackSize++] = value;\n }", "public final void store(final boolean store) {\n\t\tthis.store = store;\n\t}", "@Override\r\n\tpublic void visit(ArrayExpression arrayExpression) {\n\r\n\t}", "public void push(T aValue);", "public int store(int offset){\n return runStack.store(offset);\n }", "public void pushArrayElementAddress(Obj element) {\t\t\t\n\t\tArrayElementAddress aea = Helper.elementToArrayElementAddress.get(element);\n\t\tCode.load(aea.array);\t\t\n\t\tCode.loadConst(aea.expr.getAdr());\t\t\t\t\t\t\t\n\t}", "public void add(E value){\n if (maxIndex != array.length-1){\n array[++maxIndex] = value;\n }else {\n Object[] tmpArray = new Object[array.length+ capacity];\n for (int i = 0; i < array.length; i++) {\n tmpArray[i] = array[i];\n }\n array = tmpArray;\n array[++maxIndex] = value;\n }\n }", "public void assegnaPastore(Pastore pastore, boolean secondoPastore) {\n\t\tif (!secondoPastore)\n\t\t\tthis.pastore = pastore;\n\t\telse\n\t\t\tthis.pastore2 = pastore;\n\t}", "public int store(int offset) {\n int result = runStack.get(runStack.size()-1);\n runStack.set(framePointers.peek()+offset, runStack.remove(runStack.size()-1));\n return result;\n }", "public void add(T val){\n myCustomStack[numElements] = val; // myCustomStack[0] = new value, using numElements as index of next open space\n numElements++; //increase numElements by one each time a value is added to the stack, numElements will always be one more than number of elements in stack\n resize(); //call resize to check if array needs resizing\n }", "public void onStore(boolean b);", "public void visitCASTORE(CASTORE o){\n\t\tType arrayref = stack().peek(2);\n\t\tType index = stack().peek(1);\n\t\tType value = stack().peek(0);\n\t\t\n\t\tindexOfInt(o, index);\n\t\tvalueOfInt(o, value);\n\t\tif (arrayrefOfArrayType(o, arrayref)){\n\t\t\tif (! ((ArrayType) arrayref).getElementType().equals(Type.CHAR) ){\n\t\t\t\tconstraintViolated(o, \"The 'arrayref' does not refer to an array with elements of type char but to an array of type \"+((ArrayType) arrayref).getElementType()+\".\");\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public List<Machine.Instruction> emit() {\r\n\r\n List<Machine.Instruction> InstructionList = new LinkedList<Machine.Instruction>();\r\n InstructionList.add(new Machine.pushConstant(value));\r\n return InstructionList;\r\n\r\n }", "public void visitSALOAD(SALOAD o){\n\t\tindexOfInt(o, stack().peek());\n\t\tif (stack().peek(1) == Type.NULL){\n\t\t\treturn;\n\t\t} \n\t\tif (! (stack().peek(1) instanceof ArrayType)){\n\t\t\tconstraintViolated(o, \"Stack next-to-top must be of type short[] but is '\"+stack().peek(1)+\"'.\");\n\t\t}\n\t\tType t = ((ArrayType) (stack().peek(1))).getBasicType();\n\t\tif (t != Type.SHORT){\n\t\t\tconstraintViolated(o, \"Stack next-to-top must be of type short[] but is '\"+stack().peek(1)+\"'.\");\n\t\t}\n\t}", "public void push(E data);", "public void visit(BinArrayUseExpression x){\n }", "int store(@SuppressWarnings(\"unchecked\") T... instance);", "public Snippet visit(NewValueArray n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t Snippet elementType = n.nonArrayType.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t String identifier = n.identifier.accept(this, argu).returnTemp;\n\t n.arrayInitializer.accept(this, argu);\n\t \n\t n.nodeToken3.accept(this, argu);\n\t \n\t String arrayInit = \"new \" + \" \" + elementType.expType.getTypeName() + \"\" + \"/*value*/\" + \"[\" + identifier + \"]\";\n\t if(inTypeAnnotatedExpression ){ \n\t _ret = new Snippet(\"\", \n\t\t\t\t\"new\" + \" \" + elementType.expType.getTypeName() + \"\" + \"/*value*/\" + \"[\" + identifier + \"]);\\n/*arrayInitBlock*/\\n\" + arrayInitializerBlock, \n\t\t\t\tnew X10ValueArray(1, elementType.expType), false);\n\t }else{\n\t \t_ret = new Snippet(\"\", \n\t\t\t\t\t\"new\" + \" \" + elementType.expType.getTypeName() + \"\" + \"/*value*/\" + \"[\" + identifier + \"];\\n/*arrayInitBlock*/\\n\" + arrayInitializerBlock, \n\t\t\t\t\tnew X10ValueArray(1, elementType.expType), false);\n\t }\n\t \n\t arrayInit = \"\";\n\t arrayInitializerBlock = \"\";\n\t arrayInitializer = false;\n\t inTypeAnnotatedExpression = false;\n\t return _ret;\n\t }", "public void storeIntegerVar(int index, int value) {\n\t\tstorage[index] = value;\n\t}", "public synchronized void add(E value) {\n this.array.add(value);\n }", "public void internalStore() {\r\n\t\tdata = busInt.get();\r\n\t}", "public void push(T value) {\n \tstack.add(value);\n }", "@Override\r\n\tpublic void visit(Array array) {\n\r\n\t}", "public void store() {\r\n\t\tdata = busExt.get();\r\n\t}", "@Override\r\n\tpublic void compile(tp.pr1.elements.Compiler compiler) throws ArrayException {\r\n\t\ttry{\r\n\t\t\tcompiler.addByteCode(rhs.compile(compiler));\r\n\t\t\tcompiler.addByteCode(new Store(compiler.indexOf(varName)));\r\n\t\t}\r\n\t\tcatch(ArrayException e){\r\n\t\t\tthrow new ArrayException(); \r\n\t\t}\r\n\t}", "@Override\n public Object accept(ESTreeBaseVisitor visitor) {\n return visitor.visitArrayExpression(this);\n }", "public final void rule__Expressions__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2294:1: ( ( ruleOutStoreReference ) | ( ( rule__Expressions__Group_1__0 ) ) )\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( (LA8_0==RULE_LOWER||LA8_0==22) ) {\n alt8=1;\n }\n else if ( (LA8_0==RULE_INT) ) {\n alt8=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 8, 0, input);\n\n throw nvae;\n }\n switch (alt8) {\n case 1 :\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2295:1: ( ruleOutStoreReference )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2295:1: ( ruleOutStoreReference )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2296:1: ruleOutStoreReference\n {\n before(grammarAccess.getExpressionsAccess().getOutStoreReferenceParserRuleCall_0()); \n pushFollow(FOLLOW_ruleOutStoreReference_in_rule__Expressions__Alternatives4442);\n ruleOutStoreReference();\n\n state._fsp--;\n\n after(grammarAccess.getExpressionsAccess().getOutStoreReferenceParserRuleCall_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2301:6: ( ( rule__Expressions__Group_1__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2301:6: ( ( rule__Expressions__Group_1__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2302:1: ( rule__Expressions__Group_1__0 )\n {\n before(grammarAccess.getExpressionsAccess().getGroup_1()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2303:1: ( rule__Expressions__Group_1__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2303:2: rule__Expressions__Group_1__0\n {\n pushFollow(FOLLOW_rule__Expressions__Group_1__0_in_rule__Expressions__Alternatives4459);\n rule__Expressions__Group_1__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getExpressionsAccess().getGroup_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setStoreValue(Object oStoreValue)\n {\n m_processor = oStoreValue == null ? NullImplementation.getEntryProcessor()\n : new ConditionalPut(AlwaysFilter.INSTANCE, oStoreValue);\n }", "@Override\r\n public void push (T operando){\r\n miLista.add(operando);\r\n posicion++;\r\n }", "private void storeValue(String desc, int index) {\n\t\tif (desc.startsWith(\"L\") || desc.startsWith(\"[\")) {\n\t\t\tmv.visitInsn(DUP);\n\t\t\tmv.visitVarInsn(ASTORE, index);\n\t\t} else if (desc.startsWith(\"I\") || desc.startsWith(\"B\")\n\t\t\t\t|| desc.startsWith(\"S\") || desc.startsWith(\"Z\")\n\t\t\t\t|| desc.startsWith(\"C\")) {\n\t\t\tmv.visitInsn(DUP); //duplicate the value on top of stack\n\t\t\tmv.visitVarInsn(ISTORE, index); //store value to the #index variable\n\t\t} else if (desc.startsWith(\"J\")) {\n\t\t\tmv.visitInsn(DUP2);\n\t\t\tmv.visitVarInsn(LSTORE, index);\n\t\t\tmaxindex_cur++;\n\t\t} else if (desc.startsWith(\"F\")) {\n\t\t\tmv.visitInsn(DUP);\n\t\t\tmv.visitVarInsn(FSTORE, index);\n\t\t} else if (desc.startsWith(\"D\")) {\n\t\t\tmv.visitInsn(DUP2);\n\t\t\tmv.visitVarInsn(DSTORE, index);\n\t\t\tmaxindex_cur++;\n\t\t}\n\n\t\t// if(classname.equals(\"org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl\"))\n\t\t// System.out.println(\"Signature: \"+desc);\n\t}", "public void push(Employee employee){\n if(isFull()){\n Employee[] newArray = new Employee[2 * employeeStack.length];\n // System.arraycopy(srcArray, srcPos, destisnationArray, destPos, length);\n System.arraycopy(employeeStack, 0, newArray, 0, employeeStack.length);\n employeeStack = newArray;\n }\n employeeStack[top++] = employee;\n }", "public myStackUsingDynamicArray(){\n A = new dynamicArray();\n top=-1;\n bottom=-1;\n localSize=0;\n //Othe initializations to be done by student\n }", "private CodeFragment getPointerToArray(Variable v, ArrayList<String> registers) {\n CodeFragment result = new CodeFragment();\n String prevLoadRegister = v.reg;\n if (v.isGlobalArray) {\n /* assignment to global array */\n for (int i = 0; i < registers.size(); i++) {\n ST template = this.group.getInstanceOf(\"indextoglobalarray\");\n String ptrRegister = this.generateNewRegister(false);\n\n template.add(\"ptrregister\", ptrRegister);\n template.add(\"type\", v.getLLVMDeclareGlobalFromIndex(i));\n template.add(\"loadregister\", prevLoadRegister);\n template.add(\"exprreg\", registers.get(i));\n\n result.addCode(template.render() + \"\\n\");\n prevLoadRegister = ptrRegister;\n }\n } else {\n /* array defined in this function (or array as a function parameter) */\n for (int i = 0; i < registers.size(); i++) {\n String prevreg = \"1\";\n for (int muls = i+1; muls < v.levelregs.size(); muls++) {\n\n /* if the array we are accessing is function's parameter, we need to load dimensions */\n String loaddimensionreg = v.levelregs.get(muls);\n if (!v.isLocalArray) {\n loaddimensionreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = load i32, i32* %s\\n\", loaddimensionreg, v.levelregs.get(muls)));\n }\n\n String reg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", reg, prevreg, loaddimensionreg));\n prevreg = reg;\n }\n\n /* generate final jump */\n String reg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", reg, prevreg, registers.get(i)));\n prevreg = reg;\n\n if (!v.isLocalArray && i == 0) {\n prevLoadRegister = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = load %s*, %s** %s\\n\", prevLoadRegister, v.llvmtype, v.llvmtype, v.reg));\n }\n\n String ptrRegister = this.generateNewRegister(false);\n\n ST template = this.group.getInstanceOf(\"indextolocalarray\");\n template.add(\"ptrregister\", ptrRegister);\n template.add(\"type\", v.llvmtype);\n template.add(\"loadregister\", prevLoadRegister);\n template.add(\"exprreg\", prevreg);\n\n result.addCode(template.render() + \"\\n\");\n\n prevLoadRegister = ptrRegister;\n }\n }\n result.setRegister(prevLoadRegister);\n if (v.llvmtype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n return result;\n }", "public final void rule__UpdateExpressionStoreReference__RefAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10505:1: ( ( ruleStoreExpression ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10506:1: ( ruleStoreExpression )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10506:1: ( ruleStoreExpression )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10507:1: ruleStoreExpression\n {\n before(grammarAccess.getUpdateExpressionStoreReferenceAccess().getRefStoreExpressionParserRuleCall_1_0()); \n pushFollow(FOLLOW_ruleStoreExpression_in_rule__UpdateExpressionStoreReference__RefAssignment_120674);\n ruleStoreExpression();\n\n state._fsp--;\n\n after(grammarAccess.getUpdateExpressionStoreReferenceAccess().getRefStoreExpressionParserRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public void workOn(Assembly<Token, NullCloneable, RunningAverage> a) {\n Token t = a.popTok();\n String s = t.sval();\n RunningAverage avg = a.getTarget();\n avg.add(s.length());\n }", "public static void insertValue(int [] array, int location, int value){\n array[location -1] = value;\n System.out.println(Arrays.toString(array));\n }", "public void push(AnyType e) throws StackException;", "public void visitFSTORE(FSTORE o){\n\t\t//visitStoreInstruction(StoreInstruction) is called before.\n\t\t\n\t\t// Nothing else needs to be done here.\n\t}", "public static Emitter makeEmitter( \n\tExpressionFactory.StaticFieldAccessExpression expr,\n\tboolean isStore ) {\n\tType targetType = expr.target() ;\n\n\tClassInfo cinfo = targetType.classInfo() ;\n\tFieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ;\n\tif (fld == null)\n\t throw new IllegalArgumentException( expr.fieldName() + \n\t\t\" is not a valid field in class \" + targetType.name() ) ;\n\n\t// XXX we need access control checking here!!!\n\n\treturn makeFieldInsnEmitter( isStore, true, targetType,\n\t expr.fieldName(), fld.type() ) ;\n }", "void emit(TrackerPayload payload);", "public void push(E value) {\n list.addLast(value);\n index++;\n }", "@Override\n public long[] createAccumulator() {\n return new long[] {0};\n }", "private void handleArrayElementFeature(XMLStreamReader reader, int attributeIndex, String attrName, String typeName, Type nodeType, Feature feature, ByteArrayOutputStream baos, TypeSystem ts) {\n final String[] valueSplit = reader.getAttributeValue(attributeIndex).split(\" \");\n writeInt(valueSplit.length, baos);\n Stream<String> arrayValues = Stream.of(valueSplit);\n // The list subtype names have already been resolved at the calling method\n String arrayTypeName = XmiSplitUtilities.isMultiValuedFeatureAttribute(nodeType, attrName) ? typeName : feature.getRange().getName();\n Type arrayType = ts.getType(arrayTypeName);\n if (ts.subsumes(ts.getType(CAS.TYPE_NAME_DOUBLE_ARRAY), arrayType) || ts.subsumes(ts.getType(CAS.TYPE_NAME_FLOAT_LIST), arrayType)) {\n arrayValues.mapToDouble(Double::valueOf).forEach(d -> writeDouble(d, baos));\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_SHORT_ARRAY), arrayType)) {\n arrayValues.mapToInt(Integer::valueOf).forEach(i -> writeShort((short) i, baos));\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_BYTE_ARRAY), arrayType)) {\n arrayValues.mapToInt(Integer::valueOf).forEach(baos::write);\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_BOOLEAN_ARRAY), arrayType)) {\n arrayValues.map(s -> Boolean.valueOf(s) ? 1 : 0).forEach(baos::write);\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_INTEGER_ARRAY), arrayType) || ts.subsumes(ts.getType(CAS.TYPE_NAME_INTEGER_LIST), arrayType)) {\n arrayValues.mapToInt(Integer::valueOf).forEach(i -> writeInt(i, baos));\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_LONG_ARRAY), arrayType)) {\n arrayValues.mapToLong(Long::valueOf).forEach(l -> writeLong(l, baos));\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_STRING_ARRAY), arrayType)) {\n // String arrays should only be embedded into the element if they are empty\n if (arrayValues.filter(Predicate.not(String::isBlank)).count() > 0)\n throw new IllegalArgumentException(\"Unhandled case of a StringArray that is embedded into the type element but is not empty for feature '\" + attrName + \"' of type '\" + typeName + \"'.\");\n // String of length 0\n writeInt(0, baos);\n } else throw new IllegalArgumentException(\"Unhandled feature '\" + attrName + \"' of type '\" + typeName + \"'.\");\n }", "public void visitLASTORE(LASTORE o){\n\t\tif (stack().peek() != Type.LONG){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'long', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tindexOfInt(o, stack().peek(1));\n\t\tif (stack().peek(2) == Type.NULL){\n\t\t\treturn;\n\t\t} \n\t\tif (! (stack().peek(2) instanceof ArrayType)){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type long[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t\tType t = ((ArrayType) (stack().peek(2))).getBasicType();\n\t\tif (t != Type.LONG){\n\t\t\tconstraintViolated(o, \"Stack next-to-next-to-top must be of type long[] but is '\"+stack().peek(2)+\"'.\");\n\t\t}\n\t}", "public void emitWithOperand(OpCode opcode, int operandAddress){\n\t\t\n\t}", "public ArrayStack(){\r\n\t\tstack= new Object[DEFAULT_SIZE];\r\n\t\t}", "public void push(T dato );", "public static Emitter makeEmitter( \n\tExpressionFactory.NonStaticFieldAccessExpression expr,\n\tboolean isStore ) {\n\n\tType targetType = ((ExpressionInternal)expr.target()).type() ;\n\n\tClassInfo cinfo = targetType.classInfo() ;\n\tFieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ;\n\tif (fld == null) {\n\t throw new IllegalArgumentException( expr.fieldName() \n + \" is not a valid field in class \" + targetType.name() ) ;\n }\n\n\t// XXX we need access control checking here!!!\n\treturn makeFieldInsnEmitter( isStore, false, targetType, \n expr.fieldName(), fld.type() ) ;\n }", "public void add( Object value )\n\t{\n\t\tint n = size();\n\t\tif (addIndex >= n)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\tn = 8;\n\t\t\telse\n\t\t\t\tn *= 2;\n\t\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), n );\n\t\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\t\tarray = narray;\n\t\t}\n\t\tArray.set( array, addIndex++, value );\n\t}", "protected interface Dispatcher {\n\n /**\n * Invokes the proxied action.\n *\n * @param argument The arguments provided.\n * @return The return value.\n * @throws Throwable If any error occurs.\n */\n @MaybeNull\n Object invoke(Object[] argument) throws Throwable;\n\n /**\n * Implements this dispatcher in a generated proxy.\n *\n * @param methodVisitor The method visitor to implement the method with.\n * @param method The method being implemented.\n * @return The maximal size of the operand stack.\n */\n int apply(MethodVisitor methodVisitor, Method method);\n\n /**\n * A dispatcher that performs an instance check.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForInstanceCheck implements Dispatcher {\n\n /**\n * The checked type.\n */\n private final Class<?> target;\n\n /**\n * Creates a dispatcher for an instance check.\n *\n * @param target The checked type.\n */\n protected ForInstanceCheck(Class<?> target) {\n this.target = target;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) {\n return target.isInstance(argument[0]);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitVarInsn(Opcodes.ALOAD, 1);\n methodVisitor.visitTypeInsn(Opcodes.INSTANCEOF, Type.getInternalName(target));\n methodVisitor.visitInsn(Opcodes.IRETURN);\n return 1;\n }\n }\n\n /**\n * A dispatcher that creates an array.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForContainerCreation implements Dispatcher {\n\n /**\n * The component type.\n */\n private final Class<?> target;\n\n /**\n * Creates a dispatcher for an array creation.\n *\n * @param target The component type.\n */\n protected ForContainerCreation(Class<?> target) {\n this.target = target;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) {\n return Array.newInstance(target, (Integer) argument[0]);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitVarInsn(Opcodes.ILOAD, 1);\n methodVisitor.visitTypeInsn(Opcodes.ANEWARRAY, Type.getInternalName(target));\n methodVisitor.visitInsn(Opcodes.ARETURN);\n return 1;\n }\n }\n\n /**\n * A dispatcher that returns a fixed value.\n */\n enum ForDefaultValue implements Dispatcher {\n\n /**\n * A dispatcher for a {@code void} type.\n */\n VOID(null, Opcodes.NOP, Opcodes.RETURN, 0),\n\n /**\n * A dispatcher for a {@code boolean} type.\n */\n BOOLEAN(false, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code boolean} type that returns {@code true}.\n */\n BOOLEAN_REVERSE(true, Opcodes.ICONST_1, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code byte} type.\n */\n BYTE((byte) 0, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code short} type.\n */\n SHORT((short) 0, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code char} type.\n */\n CHARACTER((char) 0, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for an {@code int} type.\n */\n INTEGER(0, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code long} type.\n */\n LONG(0L, Opcodes.LCONST_0, Opcodes.LRETURN, 2),\n\n /**\n * A dispatcher for a {@code float} type.\n */\n FLOAT(0f, Opcodes.FCONST_0, Opcodes.FRETURN, 1),\n\n /**\n * A dispatcher for a {@code double} type.\n */\n DOUBLE(0d, Opcodes.DCONST_0, Opcodes.DRETURN, 2),\n\n /**\n * A dispatcher for a reference type.\n */\n REFERENCE(null, Opcodes.ACONST_NULL, Opcodes.ARETURN, 1);\n\n /**\n * The default value.\n */\n @MaybeNull\n private final Object value;\n\n /**\n * The opcode to load the default value.\n */\n private final int load;\n\n /**\n * The opcode to return the default value.\n */\n private final int returned;\n\n /**\n * The operand stack size of default value.\n */\n private final int size;\n\n /**\n * Creates a new default value dispatcher.\n *\n * @param value The default value.\n * @param load The opcode to load the default value.\n * @param returned The opcode to return the default value.\n * @param size The operand stack size of default value.\n */\n ForDefaultValue(@MaybeNull Object value, int load, int returned, int size) {\n this.value = value;\n this.load = load;\n this.returned = returned;\n this.size = size;\n }\n\n /**\n * Resolves a fixed value for a given type.\n *\n * @param type The type to resolve.\n * @return An appropriate dispatcher.\n */\n protected static Dispatcher of(Class<?> type) {\n if (type == void.class) {\n return VOID;\n } else if (type == boolean.class) {\n return BOOLEAN;\n } else if (type == byte.class) {\n return BYTE;\n } else if (type == short.class) {\n return SHORT;\n } else if (type == char.class) {\n return CHARACTER;\n } else if (type == int.class) {\n return INTEGER;\n } else if (type == long.class) {\n return LONG;\n } else if (type == float.class) {\n return FLOAT;\n } else if (type == double.class) {\n return DOUBLE;\n } else if (type.isArray()) {\n if (type.getComponentType() == boolean.class) {\n return OfPrimitiveArray.BOOLEAN;\n } else if (type.getComponentType() == byte.class) {\n return OfPrimitiveArray.BYTE;\n } else if (type.getComponentType() == short.class) {\n return OfPrimitiveArray.SHORT;\n } else if (type.getComponentType() == char.class) {\n return OfPrimitiveArray.CHARACTER;\n } else if (type.getComponentType() == int.class) {\n return OfPrimitiveArray.INTEGER;\n } else if (type.getComponentType() == long.class) {\n return OfPrimitiveArray.LONG;\n } else if (type.getComponentType() == float.class) {\n return OfPrimitiveArray.FLOAT;\n } else if (type.getComponentType() == double.class) {\n return OfPrimitiveArray.DOUBLE;\n } else {\n return OfNonPrimitiveArray.of(type.getComponentType());\n }\n } else {\n return REFERENCE;\n }\n }\n\n /**\n * {@inheritDoc}\n */\n @MaybeNull\n public Object invoke(Object[] argument) {\n return value;\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n if (load != Opcodes.NOP) {\n methodVisitor.visitInsn(load);\n }\n methodVisitor.visitInsn(returned);\n return size;\n }\n\n /**\n * A dispatcher for returning a default value for a primitive array.\n */\n protected enum OfPrimitiveArray implements Dispatcher {\n\n /**\n * A dispatcher for a {@code boolean} array.\n */\n BOOLEAN(new boolean[0], Opcodes.T_BOOLEAN),\n\n /**\n * A dispatcher for a {@code byte} array.\n */\n BYTE(new byte[0], Opcodes.T_BYTE),\n\n /**\n * A dispatcher for a {@code short} array.\n */\n SHORT(new short[0], Opcodes.T_SHORT),\n\n /**\n * A dispatcher for a {@code char} array.\n */\n CHARACTER(new char[0], Opcodes.T_CHAR),\n\n /**\n * A dispatcher for a {@code int} array.\n */\n INTEGER(new int[0], Opcodes.T_INT),\n\n /**\n * A dispatcher for a {@code long} array.\n */\n LONG(new long[0], Opcodes.T_LONG),\n\n /**\n * A dispatcher for a {@code float} array.\n */\n FLOAT(new float[0], Opcodes.T_FLOAT),\n\n /**\n * A dispatcher for a {@code double} array.\n */\n DOUBLE(new double[0], Opcodes.T_DOUBLE);\n\n /**\n * The default value.\n */\n private final Object value;\n\n /**\n * The operand for creating an array of the represented type.\n */\n private final int operand;\n\n /**\n * Creates a new dispatcher for a primitive array.\n *\n * @param value The default value.\n * @param operand The operand for creating an array of the represented type.\n */\n OfPrimitiveArray(Object value, int operand) {\n this.value = value;\n this.operand = operand;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) {\n return value;\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitInsn(Opcodes.ICONST_0);\n methodVisitor.visitIntInsn(Opcodes.NEWARRAY, operand);\n methodVisitor.visitInsn(Opcodes.ARETURN);\n return 1;\n }\n }\n\n /**\n * A dispatcher for a non-primitive array type.\n */\n @HashCodeAndEqualsPlugin.Enhance\n protected static class OfNonPrimitiveArray implements Dispatcher {\n\n /**\n * The default value.\n */\n @HashCodeAndEqualsPlugin.ValueHandling(HashCodeAndEqualsPlugin.ValueHandling.Sort.IGNORE)\n private final Object value;\n\n /**\n * The represented component type.\n */\n private final Class<?> componentType;\n\n /**\n * Creates a new dispatcher for the default value of a non-primitive array.\n *\n * @param value The default value.\n * @param componentType The represented component type.\n */\n protected OfNonPrimitiveArray(Object value, Class<?> componentType) {\n this.value = value;\n this.componentType = componentType;\n }\n\n /**\n * Creates a new dispatcher.\n *\n * @param componentType The represented component type.\n * @return A dispatcher for the supplied component type.\n */\n protected static Dispatcher of(Class<?> componentType) {\n return new OfNonPrimitiveArray(Array.newInstance(componentType, 0), componentType);\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) {\n return value;\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitInsn(Opcodes.ICONST_0);\n methodVisitor.visitTypeInsn(Opcodes.ANEWARRAY, Type.getInternalName(componentType));\n methodVisitor.visitInsn(Opcodes.ARETURN);\n return 1;\n }\n }\n }\n\n /**\n * A dispatcher for invoking a constructor.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForConstructor implements Dispatcher {\n\n /**\n * The proxied constructor.\n */\n private final Constructor<?> constructor;\n\n /**\n * Creates a dispatcher for invoking a constructor.\n *\n * @param constructor The proxied constructor.\n */\n protected ForConstructor(Constructor<?> constructor) {\n this.constructor = constructor;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) throws Throwable {\n return INVOKER.newInstance(constructor, argument);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n Class<?>[] source = method.getParameterTypes(), target = constructor.getParameterTypes();\n methodVisitor.visitTypeInsn(Opcodes.NEW, Type.getInternalName(constructor.getDeclaringClass()));\n methodVisitor.visitInsn(Opcodes.DUP);\n int offset = 1;\n for (int index = 0; index < source.length; index++) {\n Type type = Type.getType(source[index]);\n methodVisitor.visitVarInsn(type.getOpcode(Opcodes.ILOAD), offset);\n if (source[index] != target[index]) {\n methodVisitor.visitTypeInsn(Opcodes.CHECKCAST, Type.getInternalName(target[index]));\n }\n offset += type.getSize();\n }\n methodVisitor.visitMethodInsn(Opcodes.INVOKESPECIAL,\n Type.getInternalName(constructor.getDeclaringClass()),\n MethodDescription.CONSTRUCTOR_INTERNAL_NAME,\n Type.getConstructorDescriptor(constructor),\n false);\n methodVisitor.visitInsn(Opcodes.ARETURN);\n return offset + 1;\n }\n }\n\n /**\n * A dispatcher for invoking a static proxied method.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForStaticMethod implements Dispatcher {\n\n /**\n * The proxied method.\n */\n private final Method method;\n\n /**\n * Creates a dispatcher for invoking a static method.\n *\n * @param method The proxied method.\n */\n protected ForStaticMethod(Method method) {\n this.method = method;\n }\n\n /**\n * {@inheritDoc}\n */\n @MaybeNull\n public Object invoke(Object[] argument) throws Throwable {\n return INVOKER.invoke(method, null, argument);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n Class<?>[] source = method.getParameterTypes(), target = this.method.getParameterTypes();\n int offset = 1;\n for (int index = 0; index < source.length; index++) {\n Type type = Type.getType(source[index]);\n methodVisitor.visitVarInsn(type.getOpcode(Opcodes.ILOAD), offset);\n if (source[index] != target[index]) {\n methodVisitor.visitTypeInsn(Opcodes.CHECKCAST, Type.getInternalName(target[index]));\n }\n offset += type.getSize();\n }\n methodVisitor.visitMethodInsn(Opcodes.INVOKESTATIC,\n Type.getInternalName(this.method.getDeclaringClass()),\n this.method.getName(),\n Type.getMethodDescriptor(this.method),\n this.method.getDeclaringClass().isInterface());\n methodVisitor.visitInsn(Type.getReturnType(this.method).getOpcode(Opcodes.IRETURN));\n return Math.max(offset - 1, Type.getReturnType(this.method).getSize());\n }\n }\n\n /**\n * A dispatcher for invoking a non-static proxied method.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForNonStaticMethod implements Dispatcher {\n\n /**\n * Indicates a call without arguments.\n */\n private static final Object[] NO_ARGUMENTS = new Object[0];\n\n /**\n * The proxied method.\n */\n private final Method method;\n\n /**\n * Creates a dispatcher for invoking a non-static method.\n *\n * @param method The proxied method.\n */\n protected ForNonStaticMethod(Method method) {\n this.method = method;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) throws Throwable {\n Object[] reduced;\n if (argument.length == 1) {\n reduced = NO_ARGUMENTS;\n } else {\n reduced = new Object[argument.length - 1];\n System.arraycopy(argument, 1, reduced, 0, reduced.length);\n }\n return INVOKER.invoke(method, argument[0], reduced);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n Class<?>[] source = method.getParameterTypes(), target = this.method.getParameterTypes();\n int offset = 1;\n for (int index = 0; index < source.length; index++) {\n Type type = Type.getType(source[index]);\n methodVisitor.visitVarInsn(type.getOpcode(Opcodes.ILOAD), offset);\n if (source[index] != (index == 0 ? this.method.getDeclaringClass() : target[index - 1])) {\n methodVisitor.visitTypeInsn(Opcodes.CHECKCAST, Type.getInternalName(index == 0\n ? this.method.getDeclaringClass()\n : target[index - 1]));\n }\n offset += type.getSize();\n }\n methodVisitor.visitMethodInsn(this.method.getDeclaringClass().isInterface() ? Opcodes.INVOKEINTERFACE : Opcodes.INVOKEVIRTUAL,\n Type.getInternalName(this.method.getDeclaringClass()),\n this.method.getName(),\n Type.getMethodDescriptor(this.method),\n this.method.getDeclaringClass().isInterface());\n methodVisitor.visitInsn(Type.getReturnType(this.method).getOpcode(Opcodes.IRETURN));\n return Math.max(offset - 1, Type.getReturnType(this.method).getSize());\n }\n }\n\n /**\n * A dispatcher for an unresolved method.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForUnresolvedMethod implements Dispatcher {\n\n /**\n * The message for describing the reason why the method could not be resolved.\n */\n private final String message;\n\n /**\n * Creates a dispatcher for an unresolved method.\n *\n * @param message The message for describing the reason why the method could not be resolved.\n */\n protected ForUnresolvedMethod(String message) {\n this.message = message;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) throws Throwable {\n throw new IllegalStateException(\"Could not invoke proxy: \" + message);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitTypeInsn(Opcodes.NEW, Type.getInternalName(IllegalStateException.class));\n methodVisitor.visitInsn(Opcodes.DUP);\n methodVisitor.visitLdcInsn(message);\n methodVisitor.visitMethodInsn(Opcodes.INVOKESPECIAL,\n Type.getInternalName(IllegalStateException.class),\n MethodDescription.CONSTRUCTOR_INTERNAL_NAME,\n Type.getMethodDescriptor(Type.VOID_TYPE, Type.getType(String.class)),\n false);\n methodVisitor.visitInsn(Opcodes.ATHROW);\n return 3;\n }\n }\n }", "public static void main(String[] args) {\n\nint[] numbers = new int[5];// must tell Java how many elements it has-- it cannot shrink or grow \nnumbers[2]= 5; //number 5 is stores in array\nSystem.out.println(numbers [2]);// print out stored array\n\n// numbers is the entirre array-- to work with data in the array you must use the index\n\n\n }", "public void push(T data);", "public void push(T data);", "public final void rule__UniformReference__RefAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10415:1: ( ( ruleStoreExpression ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10416:1: ( ruleStoreExpression )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10416:1: ( ruleStoreExpression )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10417:1: ruleStoreExpression\n {\n before(grammarAccess.getUniformReferenceAccess().getRefStoreExpressionParserRuleCall_1_0()); \n pushFollow(FOLLOW_ruleStoreExpression_in_rule__UniformReference__RefAssignment_120488);\n ruleStoreExpression();\n\n state._fsp--;\n\n after(grammarAccess.getUniformReferenceAccess().getRefStoreExpressionParserRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void push(T o) {\r\n\t\tadd(o);\t\r\n\t}", "public static void main(String[] args) {\n\n\n\n int[] myArray = new int[5];\n\n Array.set(myArray,0,100); // another way as shown above --> myArray[0] = 100;\n Array.set(myArray,1,81);\n Array.set(myArray,2,64);\n Array.set(myArray,3,49);\n Array.set(myArray,4, 36);\n\n// int getValue = Array.get(myArray,3); //--> Array onune int yazmadigimiz icin object\n // farzediyor. (int) yazarak tipini belirlemeliyiz\n // bu type casting ornegidir\n int getValue = (int)Array.get(myArray,3);\n System.out.println(\"The value at index 3 is : \" + getValue);\n\n// System.out.println(Arrays.toString(myArray));\n\n /**\n * java.lang.reflect.Array -->\n * The Array class provides static methods to dynamically create and access Java arrays.\n *\n * java.util.Arrays -->\n * This class contains various methods for manipulating arrays (such as sorting and searching).\n * This class also contains a static factory that allows arrays to be viewed as lists.\n * Utility class,which contains static methods to manipulate(sort,max,min etc.) the values stored in array.\n */\n\n /**\n * getArray METHOD\n * get Array Class method = Allows you to return the value at a specific index\n * Syntax = Array.get(Object [], int index)\n */\n\n// int[] myArray = {2,4,6,8};\n// for(int i = 0; i < myArray.length; i++){\n// int storageValue =(int) Array.get(myArray,i);\n// System.out.println(\"The value at \" + i + \" index is: \" + storageValue);\n// }\n\n // similar code\n// int[] myArray = {2,4,6,8};\n// for(int i = 0; i < myArray.length; i++){\n// int storeValue = myArray[i];\n// System.out.println(\"The value at \" + i + \" index is \" + storeValue);\n// }\n\n\n\n\n\n\n\n }", "@Override\n\tpublic void execute(Frame frame) {\n\t\tDSTORE._dstore(frame, 1);\n\t}", "private void writeValueToInitArrayExp(int opcode, VariableExp iteratorExp, Exp initExp, String arrayPrefix, String sizeVar) throws CodeGeneratorException {\n final Label head = new Label();\n final Label afterFor = new Label();\n VariableEntry entry;\n writeIntLiteral(0);\n entry = addEntry(new VariableExp(arrayPrefix + \".index\"), BasicType.TYPE_INT);\n entry.store(this, methodVisitor);\n methodVisitor.visitLabel(head);\n loadVariable(new VariableExp(arrayPrefix + \".index\"));\n loadVariable(new VariableExp(sizeVar));\n methodVisitor.visitJumpInsn(IF_ICMPGE, afterFor);\n methodVisitor.visitInsn(DUP);\n loadVariable(new VariableExp(arrayPrefix + \".index\"));\n writeExp(initExp);\n methodVisitor.visitInsn(opcode);\n entry = getEntryFor(new VariableExp(arrayPrefix + \".index\"));\n methodVisitor.visitIincInsn(entry.index, 1);\n if(iteratorExp != null) {\n entry = getEntryFor(iteratorExp);\n methodVisitor.visitIincInsn(entry.index, 1);\n }\n methodVisitor.visitJumpInsn(GOTO, head);\n methodVisitor.visitLabel(afterFor);\n }", "public Snippet visit(UpdatableArrayType n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null, false);\n\t\t\tSnippet f0 = n.nonArrayType.accept(this, argu);\n\t\t\t_ret.expType = new X10ReferenceArray(1,f0.expType);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.rankEquation.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret.returnTemp = _ret.expType.typeName+\"[]\";\n\t\t\tallMyTypes.put(f0.expType.typeName, _ret.expType.typeName);\n\t return _ret;\n\t }", "public ArrayStack()\r\n {\r\n top = 0;\r\n stack = (T[])(new Object[DEFAULT_CAPACITY]);\r\n }", "public static void main(String[] args) {\n\t\tInteger[] iStore = new Integer[10];\n\t\tGenStack2<Integer> stk1 = new GenStack2<Integer>(iStore);\n\n\t\t// Create stack for array\n\t\tString[] name = { \"One\", \"Two\", \"Three\" };\n\t\tString[] strStore = new String[3];\n\t\tGenStack2<String> stk2 = new GenStack2<String>(strStore, name);\n\n\t\tString str;\n\t\tint n;\n\n\t\ttry {\n\t\t\tfor (int i = 0; i < iStore.length; i++) {\n\t\t\t\tstk1.push(i);\n\t\t\t}\n\t\t} catch (StackFullExeption exc) {\n\t\t\tSystem.out.println(exc);\n\t\t}\n\n\t\t// One stack from another\n\t\tString[] strStore2 = new String[3];\n\t\tGenStack2<String> stk3 = new GenStack2<String>(strStore2, stk2);\n\n\t\t// Display all stacks\n\t\ttry {\n\t\t\tSystem.out.print(\"stk1: \");\n\t\t\tfor (int i = 0; i < iStore.length; i++) {\n\t\t\t\tn = stk1.get();\n\t\t\t\tSystem.out.print(n + \" \");\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\n\");\n\n\t\t\tSystem.out.print(\"stk2: \");\n\t\t\tfor (int i = 0; i < strStore2.length; i++) {\n\t\t\t\tstr = stk2.get();\n\t\t\t\tSystem.out.print(str + \" \");\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\n\");\n\n\t\t\tSystem.out.print(\"stk3: \");\n\t\t\tfor (int i = 0; i < strStore2.length; i++) {\n\t\t\t\tstr = stk3.get();\n\t\t\t\tSystem.out.print(str + \" \");\n\t\t\t}\n\n\t\t} catch (StackEmptyExeption exc) {\n\t\t\tSystem.out.println(exc);\n\t\t}\n\n\t\tSystem.out.println();\n\t}", "public Snippet visit(ValueArrayType n, Snippet argu) {\n\t\t Snippet _ret=new Snippet(\"\",\"\",null,false);\n\t\t\tSnippet f0 = n.nonArrayType.accept(this, argu);\n\t _ret.expType = new X10ValueArray(1, f0.expType);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f4 = n.rankEquation.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t _ret.returnTemp = _ret.expType.typeName+\" /*value*/ [\"+f4.returnTemp+\"]\";\n\t return _ret;\n\t }", "public void visitISTORE(ISTORE o){\n\t\t//visitStoreInstruction(StoreInstruction) is called before.\n\t\t\n\t\t// Nothing else needs to be done here.\n\t}", "public void addValue(OOTreeIter ootiTemp,String... apples)\r\n\t{\n\t\tthis.append(ootiTemp); //指针下移\r\n\t\tfor(int i = 0 ; i < apples.length; i++)\r\n\t\t{\r\n\t\t\tif(i < column) //如果赋了太多的值 则无效\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tthis.setValue(ootiTemp, i, apples[i]); //添加数据,这是一个重载的方法\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tbreak; //否则退出\r\n\t\t\t}\r\n\t\t}\r\n//\t\tootiTemp.free();\r\n\t}", "public void setArray(int i, Array x);", "public void push(int value){\n //To be written by student\n localSize++;\n top++;\n if(localSize>A.getSize()){\n A.doubleSize();\n try{\n A.modifyElement(value,top);\n }catch(Exception c){c.printStackTrace();}\n }\n else{try{\n A.modifyElement(value,top);\n }catch(Exception a){a.printStackTrace();} }\n }" ]
[ "0.5860105", "0.5690854", "0.5439598", "0.5379029", "0.5356894", "0.5325345", "0.5265868", "0.52116424", "0.51972103", "0.5183537", "0.5102228", "0.5039362", "0.49650636", "0.4882642", "0.4879098", "0.48365474", "0.48039585", "0.47838727", "0.4743571", "0.46863595", "0.46629444", "0.46468827", "0.46468827", "0.46363404", "0.46038678", "0.45942846", "0.45931372", "0.45739767", "0.45677978", "0.4561664", "0.45581988", "0.45540732", "0.4527619", "0.4512164", "0.45108125", "0.45006704", "0.4484137", "0.4477875", "0.44768125", "0.44676372", "0.4467346", "0.446296", "0.44545582", "0.4414953", "0.4409817", "0.44067663", "0.4390741", "0.43843573", "0.43829012", "0.43662784", "0.4358175", "0.43563443", "0.43549344", "0.43544117", "0.43543172", "0.43409058", "0.43394634", "0.43199757", "0.43158183", "0.43154594", "0.43103746", "0.4301514", "0.42924216", "0.42892584", "0.42871583", "0.42839742", "0.42753756", "0.42687762", "0.42668712", "0.42645687", "0.42635638", "0.42560005", "0.42532536", "0.4250746", "0.42443746", "0.4242903", "0.4242408", "0.42396316", "0.4236488", "0.42293295", "0.42262572", "0.42177585", "0.4212555", "0.42124993", "0.42121762", "0.42096877", "0.42096877", "0.41952085", "0.41874647", "0.41858768", "0.41839653", "0.41823393", "0.4181516", "0.41745436", "0.4172821", "0.41721782", "0.41671702", "0.4156873", "0.41528687", "0.41495362" ]
0.6321213
0
returning a children count of one (1) because we only want our child view to be loaded once
@Override public int getChildrenCount(int groupPosition) { return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getChildCount() {return children.size();}", "int getChildCount();", "public abstract int getNumChildren();", "public int getChildCount();", "public int getChildCount()\n/* */ {\n/* 500 */ return this.children.size();\n/* */ }", "@Override\n public int getNumChildren() {\n\t return this._children.size();\n }", "@Override\n\tpublic int getChildrenNum() {\n\t\treturn children.size();\n\t}", "@Override\n public int getChildrenCount()\n {\n return children.getSubNodes().size();\n }", "public int getChildCount() { return 0; }", "public int countChildren() {\n return this.children.size();\n }", "public int getChildCount() {\r\n if (_children == null) {\r\n return 0;\r\n }\r\n return _children.size();\r\n }", "@Override\n public final int size() {\n return children.size();\n }", "int childrenSize();", "int childCount(){\n return this.children.size();\n }", "public int numberOfChildren() {\n\t\tif(children == null) return 0;\n\t\telse return children.size();\n\t}", "public int getChildCount()\n {\n return mChildren.length; // The indexes and constraints\n }", "public @Override int getViewCount() {\n return getChildren().getChildCount();\n }", "protected int numChildren() {\r\n return 3;\r\n }", "public int countChildren() {\n return this.children.size();\n }", "public int getChildCount() {\n return this.children.size();\n }", "public int getChildCount () {\n return childCount;\n }", "@Override\n public int getChildrenCount(String name)\n {\n return children.getSubNodes(name).size();\n }", "public int getChildCount() { return data.length; }", "public int childrenSize()\r\n\t{\r\n\t\treturn this.children.size();\r\n\t}", "@Override\n\tpublic int size() {\n\t\tmodCount = root.numChildren();\n\t\treturn modCount;\n\t}", "@Override\n public int getChildrenCount() {\n return 1 + mRecentTabsManager.getRecentlyClosedEntries().size();\n }", "@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(20)\n\tint childrenCount();", "public StringWithCustomFacts getNumChildren() {\n return numChildren;\n }", "private int numChildren(int index){\n\t\t\n\t\tint children = 0;\n\t\t\n\t\tif((index*2) + 1 <= this.currentSize){\n\t\t\tif(array[(index * 2) + 1] != null){\n\t\t\t\tchildren++;\n\t\t\t}\n\t\t}\n\t\tif((index*2) + 1 <= this.currentSize){\n\t\t\tif(array[(index * 2) + 2] != null){\n\t\t\t\tchildren++;\n\t\t\t}\n\t\t}\n\t\treturn children;\n\t}", "@Override\r\n\tpublic int getChildCount(Object parent) {\r\n\t\r\n\t\treturn 0;\r\n\t}", "int getChildrenCount(int groupPosition);", "@FameProperty(name = \"numberOfChildren\", derived = true)\n public Number getNumberOfChildren() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "@Override\n public int getChildrenCount(int groupPosition) {\n return children[groupPosition].length;\n }", "@Override\n\t\tpublic int getChildrenCount(int groupPosition) {\n\t\t\treturn 1;\n\t\t}", "@Override\r\n \tpublic boolean hasChildren() {\n \t\treturn getChildren().length > 0;\r\n \t}", "@Override\n\tpublic int getChildrenCount(int sectionPosition) {\n\t\treturn sections.get(sectionPosition).getArrayChildren().size();\n\t}", "@Override\n\tpublic int getChildrenCount(int groupPosition) {\n\t\treturn 1;\n\t}", "@Override\n public int getChildrenCount(int groupPosition)\n {\n return children.get(headers.get(groupPosition)).size();\n }", "public int getTotalChildren() {\n\t\treturn _nTotalChildren;\n\t}", "public int shapeCount()\n {\n // return the number of children in the list\n return children.size();\n }", "int getNumberOfChildren(int nodeID){\n check(nodeID);\n return nodes_[nodeID].size_;\n }", "@Override\n public int getChildrenCount(int groupPosition) {\n return 1;\n }", "@Override\n\tpublic int getChildrenCount(int groupPosition) {\n\t\treturn listChildren.get(listTitles.get(groupPosition)).size();\n\t}", "@Override\n public int getChildrenCount(int groupPosition) {\n return getGroup(groupPosition).getChildrenCount();\n }", "public abstract int getMaxChildren();", "boolean hasChildren();", "@Override\r\n\tpublic int getChildrenCount(int groupPosition) {\n\t\treturn 0;\r\n\t}", "public int getItemCount() {\n return itemCount(root);\n }", "public int getAccessibleChildrenCount() {\n try {\n return unoAccessibleContext.getAccessibleChildCount();\n } catch (com.sun.star.uno.RuntimeException e) {\n return 0;\n }\n }", "public int size() {\r\n\t\tint i = 0;\r\n\t\tif (this.value != 0) {\r\n\t\t\ti++;\r\n\t\t\tif(this.leftChild != null) {\r\n\t\t\t\ti = i + this.leftChild.size();\r\n\t\t\t}\r\n\t\t\tif(rightChild != null){\r\n\t\t\t\ti = i + this.rightChild.size();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn i; \r\n\t}", "public int size() {\n int count = terminal ? 1 : 0;\n for (Set<String> child : children)\n if (child != null) count += child.size();\n return count;\n }", "public int getLengthOfChildren() {\n int length = 0;\n IBiNode childTmp;\n\n if (this.child != null) {\n // length of first child\n length += this.child.getLength();\n\n childTmp = this.child.getSibling();\n while (childTmp != null) {\n // length of 2nd - nth children\n length += childTmp.getLength();\n childTmp = childTmp.getSibling();\n }\n\n }\n\n return length;\n }", "public Integer GetNumOfChild() {\n\t\treturn this.ChildSMILES.size();\n\t}", "public int childListCount() // 페이징, 검색 뺐음, A반 기준 -> 나중에 반 생성 시 변경하기. ★학부모 정보 제외함 (회원가입안할 시 에러)\r\n\t\t\tthrows Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tint result = 0;\r\n\r\n\t\ttry {\r\n\t\t\tconn = getConnection();\r\n\r\n\t\t\tpstmt = conn.prepareStatement(\"select count(child_num) from child where child_class = 'A'\");\r\n\t\t\trs = pstmt.executeQuery();\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tresult = rs.getInt(1);\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (rs != null)\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t}\r\n\t\t\tif (pstmt != null)\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t}\r\n\t\t\tif (conn != null)\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "protected int getChildrenCount(final ChoiceComposite control) {\n \t\tif (SwtUtilities.isDisposed(control)) {\n \t\t\treturn 0;\n \t\t}\n\t\treturn control.getChildren().length;\n \t}", "public int size() {\n\t\treturn root.count();\n\t}", "public boolean hasChildren()\n/* */ {\n/* 487 */ return !this.children.isEmpty();\n/* */ }", "public int order()\n\t{\n\t\treturn null == _children ? 0 : _children.size();\n\t}", "@Override\n\tpublic boolean hasChildren() {\n\t\treturn this.children!=null && this.children.length>0 ;\n\t}", "@Override\n\tpublic boolean hasChildren() {\n\t\treturn this.children!=null && this.children.length>0 ;\n\t}", "abstract long calculateChildCount() throws TskCoreException;", "@Override\r\n\tpublic int getCount() {\n\t\treturn mViews.size();\r\n\t}", "private static int getNumChildren() {\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Enter number of children: \");\n int numChildren = input.nextInt();\n return numChildren;\n }", "@Override\r\n public int getChildrenCount(int groupPosition) {\n return mDataList.get(\"\" + groupPosition).size();\r\n }", "public int getCount()\r\n {\r\n int answer=0;\r\n answer+=recCount(root);\r\n return answer;\r\n }", "public int size() {\n return tree.count();\n }", "private int getNumberOfChildren(String elemId) {\n return selenium.getXpathCount(\"//*[@id='\" + elemId + \"']/*\").intValue();\n }", "public void setChildCount (int childCount) {\n this.childCount = childCount;\n }", "@Override\r\n\tpublic int getChildrenCount(int groupPosition) {\n\t\treturn musicMap.get(arrSongHeader.get(groupPosition)).size();\r\n\t}", "int numChildren(Position<E> p) throws IllegalArgumentException;", "public int getAncestorCount() { return _parent!=null? getParent().getAncestorCount() + 1 : 0; }", "@Override\r\n\tpublic boolean hasChildren() {\n\t\tSystem.out.println(\"this children is=\"+this.children);\r\n\t\tif(this.children==null||this.children.isEmpty()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn !this.children.isEmpty();\r\n\t}", "@Override\r\n\tpublic int getNumberOfDescendants(Node<T> node) {\r\n\t\tif (node.getChildren() != null) {// Si tiene hijos\r\n\t\t\treturn (node.getChildren()).size();// El tamaņo de la lista de hijos\r\n\t\t}\r\n\t\treturn 0; // Si no tiene entonces 0\r\n\t}", "public int getEmptyChild() {\r\n\t\t\tfor (int i = 0; i < children.size(); i++) {\r\n\t\t\t\t//System.out.println(\"Checking child #\" + i + \"\\t\\tChild: \" + getChild(i).debug());\r\n\t\t\t\tif (getChild(i).getData().size() == 0)\r\n\t\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn -1;\r\n\t\t}", "public boolean hasChildren()\n\t{\n\t\treturn !getChildren().isEmpty();\n\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn views.size();\n\t\t}", "public int getLoadMoreViewCount() {\n if (mRequestLoadMoreListener == null || !mLoadMoreEnable) {\n return 0;\n }\n if (!mNextLoadEnable && mLoadMoreView.isLoadEndMoreGone()) {\n return 0;\n }\n if (mData.size() == 0) {\n return 0;\n }\n return 1;\n }", "public int getViewCount() {\n return 1;\n }", "@Override\n \t\t\tpublic int getCount() {\n \t\t\t\t// return the number of views we have put in our list. If\n \t\t\t\t// adding/removing views need to update the integer-constant at\n \t\t\t\t// the top of this activity\n \t\t\t\treturn NUMBER_OF_VIEWS;\n \t\t\t}", "private int getCountOfWrapper() {\n if (wrapperPagerAdapter != null) {\n return wrapperPagerAdapter.getCount();\n }\n return 0;\n }", "int getParentIdCount();", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn App.getInstance().getSettlements().size();\n\t\t}", "@Override\n\tpublic int size() {\n\t\tint s = valCount; // saves value of current node\n\t\tfor (int i = 0; i < childCount; ++i) { // then checks all children\n\t\t\ts += children[i].size();\n\t\t}\n\t\treturn s;\n\t}", "@Override\n public int getItemCount() {\n return contactParentsList.size();\n }", "@Override\n\tpublic int getCount() {\n\t\treturn treePlanterNameList.size();\n\t}", "int getContentsCount();", "@Override\n public int getViewsCount() {\n return views_.size();\n }", "public int getEmptyViewCount() {\n if (mEmptyLayout == null || mEmptyLayout.getChildCount() == 0) {\n return 0;\n }\n if (!mIsUseEmpty) {\n return 0;\n }\n if (mData.size() != 0) {\n return 0;\n }\n return 1;\n }", "public int getChildCount() {\n/* 179 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private int countChildElements(final Node parent)\r\n {\r\n NodeList listOfChildren = parent.getChildNodes();\r\n return listOfChildren.getLength();\r\n }", "public void init$Children() {\n }", "public void init$Children() {\n }", "public void init$Children() {\n }", "public boolean hasChilds() {\n return childs != null && !childs.isEmpty();\n }", "int getPartsCount();", "int getPartsCount();", "public int getRowCount()\n {\n // Get level of the node to be displayed\n int rowCount = displayNode.getLevel();\n \n // Add number of children\n rowCount = rowCount + displayNode.getChildCount();\n \n // Increment by 1 if the root node is being displayed\n if (rootVisible) \n { \n rowCount++; \n }\n \n // Return number of rows\n return rowCount;\n }", "public static int size(Node root){\r\n int count = 0;\r\n for(int i=0; i<root.children.size(); i++){\r\n Node child = root.children.get(i);\r\n count += size(child);\r\n }\r\n return count + 1;\r\n }", "int getViewsCount();" ]
[ "0.8121232", "0.7966312", "0.7964724", "0.78922683", "0.78916967", "0.7852276", "0.781532", "0.7758482", "0.7703504", "0.7674644", "0.76614493", "0.76474494", "0.7640194", "0.76309854", "0.76148474", "0.75862765", "0.7585735", "0.7561974", "0.75274485", "0.7388771", "0.73700726", "0.716198", "0.7150666", "0.70958936", "0.70336854", "0.69830704", "0.69783133", "0.69743156", "0.69600564", "0.6887046", "0.6885493", "0.68716437", "0.68139225", "0.6765885", "0.67372257", "0.6736916", "0.67309994", "0.671339", "0.66640013", "0.6661748", "0.6586657", "0.6585875", "0.65490854", "0.65441877", "0.6507436", "0.6490121", "0.64853686", "0.6470939", "0.6464071", "0.6404012", "0.6388086", "0.638502", "0.6369613", "0.6350854", "0.63411415", "0.63410354", "0.63180983", "0.63147324", "0.6293681", "0.6293681", "0.6289928", "0.6270365", "0.62553835", "0.6255015", "0.6251744", "0.6250302", "0.6237676", "0.6236373", "0.6222005", "0.6213671", "0.61992216", "0.6171624", "0.61521", "0.61491036", "0.6128514", "0.61215997", "0.6094701", "0.60808414", "0.6075546", "0.6068223", "0.60540944", "0.6051914", "0.6049206", "0.6031757", "0.60245854", "0.6022291", "0.6022208", "0.6013668", "0.60043406", "0.6001594", "0.5997793", "0.5997793", "0.5997793", "0.5978605", "0.59720635", "0.59720635", "0.5961839", "0.59589124", "0.5940326" ]
0.67322594
37
TODO Autogenerated method stub
@Override public double calcMinCostFlow(Graph graph) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Finds a Hudson master that supports swarming, and join it. This method never returns.
public void run() throws InterruptedException { System.out.println("Discovering Hudson master"); // wait until we get the ACK back while (true) { try { List<Candidate> candidates = new ArrayList<Candidate>(); for (DatagramPacket recv : discover()) { String responseXml = new String(recv.getData(), 0, recv.getLength()); Document xml; System.out.println(); try { xml = DocumentBuilderFactory .newInstance() .newDocumentBuilder() .parse(new ByteArrayInputStream(recv.getData(), 0, recv.getLength())); } catch (SAXException e) { System.out.println("Invalid response XML from " + recv.getAddress() + ": " + responseXml); continue; } String swarm = getChildElementString( xml.getDocumentElement(), "swarm"); if (swarm == null) { System.out.println(recv.getAddress() + " doesn't support swarm"); continue; } String url = master == null ? getChildElementString( xml.getDocumentElement(), "url") : master; if (url == null) { System.out .println(recv.getAddress() + " doesn't have the configuration set yet. Please go to the sytem configuration page of this Hudson and submit it: " + responseXml); continue; } candidates.add(new Candidate(url, swarm)); } if (candidates.size() == 0) throw new RetryException( "No nearby Hudson supports swarming"); System.out.println("Found " + candidates.size() + " eligible Hudson."); // randomly pick up the Hudson to connect to target = candidates .get(new Random().nextInt(candidates.size())); if (password == null && username == null) { verifyThatUrlIsHudson(); } // create a new swarm slave createSwarmSlave(); connect(); } catch (IOException e) { e.printStackTrace(); } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (RetryException e) { System.out.println(e.getMessage()); if (e.getCause() != null) e.getCause().printStackTrace(); } // retry System.out.println("Retrying in 10 seconds"); Thread.sleep(10 * 1000); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void launchAsMaster();", "private void connectToMaster(int masterPort) throws Exception {\n // Getting the registry \n Registry registry = LocateRegistry.getRegistry(null, masterPort); \n \n // Looking up the registry for the remote object \n this.master = (Master) registry.lookup(\"master\"); \n }", "public boolean isMaster();", "protected boolean pingFromMaster(String who) throws Throwable {\n Log.INFO(\"Attempting to ping \" + who + \" from the master node\");\n if (runSystemCommand(\n SSH_ROOT + adminVIP +\" \\\"\"+ PING + \" \" + who + \"\\\"\" ))\n {\n Log.INFO(who + \" is pingable\");\n return true;\n } else {\n Log.ERROR(who + \" is not pingable\");\n return false;\n }\n }", "protected NodeDetails findReplacementMaster(Universe universe, NodeDetails currentNode) {\n if ((currentNode.isMaster || currentNode.masterState == MasterState.ToStop)\n && currentNode.dedicatedTo == null) {\n List<NodeDetails> candidates =\n universe.getNodes().stream()\n .filter(\n n ->\n (n.dedicatedTo == null || n.dedicatedTo != ServerType.TSERVER)\n && Objects.equals(n.placementUuid, currentNode.placementUuid)\n && !n.getNodeName().equals(currentNode.getNodeName())\n && n.getZone().equals(currentNode.getZone()))\n .collect(Collectors.toList());\n // This takes care of picking up the node that was previously selected.\n Optional<NodeDetails> optional =\n candidates.stream()\n .filter(\n n ->\n n.masterState == MasterState.ToStart\n || n.masterState == MasterState.Configured)\n .peek(n -> log.info(\"Found candidate master node: {}.\", n.getNodeName()))\n .findFirst();\n if (optional.isPresent()) {\n return optional.get();\n }\n // This picks up an eligible node from the candidates.\n return candidates.stream()\n .filter(n -> NodeState.Live.equals(n.state) && !n.isMaster)\n .peek(n -> log.info(\"Found candidate master node: {}.\", n.getNodeName()))\n .findFirst()\n .orElse(null);\n }\n return null;\n }", "public HMasterInterface getMaster()\n throws MasterNotRunningException, ZooKeeperConnectionException {\n try {\n if (master != null && master.isMasterRunning()) {\n return master;\n }\n } catch (UndeclaredThrowableException ute) {\n // log, but ignore, the loop below will attempt to reconnect\n LOG.info(\"Exception contacting master. Retrying...\", ute.getCause());\n }\n\n ensureZookeeperTrackers();\n checkIfBaseNodeAvailable();\n ServerName sn = null;\n synchronized (this.masterLock) {\n try {\n if (master != null && master.isMasterRunning()) {\n return master;\n }\n } catch (UndeclaredThrowableException ute) {\n // log, but ignore, the loop below will attempt to reconnect\n LOG.info(\"Exception contacting master. Retrying...\", ute.getCause());\n }\n this.master = null;\n\n for (int tries = 0;\n !this.closed && this.master == null && tries < numRetries;\n tries++) {\n\n try {\n sn = masterAddressTracker.getMasterAddress();\n if (sn == null) {\n LOG.info(\"ZooKeeper available but no active master location found\");\n throw new MasterNotRunningException();\n }\n\n InetSocketAddress isa =\n new InetSocketAddress(sn.getHostname(), sn.getPort());\n HMasterInterface tryMaster = rpcEngine.getProxy(\n HMasterInterface.class, HMasterInterface.VERSION, isa, this.conf,\n this.rpcTimeout);\n\n if (tryMaster.isMasterRunning()) {\n this.master = tryMaster;\n this.masterLock.notifyAll();\n break;\n }\n\n } catch (IOException e) {\n if (!shouldRetryGetMaster(tries, e)) break;\n } catch (UndeclaredThrowableException ute) {\n if (!shouldRetryGetMaster(tries, ute)) break;\n }\n\n // Cannot connect to master or it is not running. Sleep & retry\n try {\n this.masterLock.wait(ConnectionUtils.getPauseTime(this.pause, tries));\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n throw new RuntimeException(\"Thread was interrupted while trying to connect to master.\");\n }\n }\n\n if (this.master == null) {\n if (sn == null) {\n throw new MasterNotRunningException();\n }\n throw new MasterNotRunningException(sn.toString());\n }\n return this.master;\n }\n }", "Swarm createSwarm();", "public void kickStart() {\n startLobby();\n }", "protected boolean masterFailoverWithDNS() throws Throwable {\n return (pingFromMaster(hostname) &&\n masterFailover() &&\n pingFromMaster(hostname));\n }", "public Optional<String> getCurrentDatabaseMaster(String databaseId) {\n Optional<String> cachedHost = databaseToCurrentHostnameCache != null ?\n databaseToCurrentHostnameCache.getUnchecked(databaseId) : null;\n if (cachedHost != null && cachedHost.isPresent()) {\n return cachedHost;\n }\n return driverConfig.getCurrentMasterForDatabase(databaseId, masterEndpointsCache);\n }", "public void StartReplicationMgr()\n\t{\n\t\tif( hostIP.equals(m_oElection.GetLeaderIP()))\n\t\t{\n\t\t\tm_oSDFSMaster.StartReplicationMgr();\n\t\t}\n\t}", "public boolean spawnWorker() {\n JSONObject args = new JSONObject();\n return (boolean)this.runOnServer(\"spawnWorker\", args);\n }", "private CompletableFuture<JobMasterGateway> getJobMasterGateway(JobID jobId) {\n if (!jobManagerRunnerRegistry.isRegistered(jobId)) {\n return FutureUtils.completedExceptionally(new FlinkJobNotFoundException(jobId));\n }\n\n final JobManagerRunner job = jobManagerRunnerRegistry.get(jobId);\n if (!job.isInitialized()) {\n return FutureUtils.completedExceptionally(\n new UnavailableDispatcherOperationException(\n \"Unable to get JobMasterGateway for initializing job. \"\n + \"The requested operation is not available while the JobManager is initializing.\"));\n }\n return job.getJobMasterGateway();\n }", "public boolean join(){\n\t\tif (joined) return true;\n\t\t\n StructuredDocument creds = null;\n try {\n AuthenticationCredential authCred = new AuthenticationCredential(peerGroup, null, creds );\n MembershipService membership = peerGroup.getMembershipService();\n Authenticator auth = membership.apply( authCred );\n \n // Check if everything is okay to join the group\n if (auth.isReadyForJoin()){\n Credential myCred = membership.join(auth);\n StructuredTextDocument doc = (StructuredTextDocument)\n myCred.getDocument(new MimeMediaType(\"text/plain\"));\n }\n else\n log.error(\"You cannot join repository\");\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n log.info(\"Joined to Virtual Repository (low-level)\");\n //change DatabaseDiscovery\n DatabaseDiscovery dd = new DatabaseDiscovery(peerGroup.getParentGroup());\n \n try {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n //looking for cmu service\n try {\n\t\t\tmanagementModule = dd.obtainManagementServ(peerGroup.getPeerID().toString());\n\t\t} catch (GridException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n \n \n //point to discovery service in joined group\n new DatabaseDiscovery(peerGroup);\n\n this.joined = true; \n \n\t\treturn true;\n\t}", "@Override\n\tpublic MasterInterface getMaster() {\n\t\treturn master;\n\t}", "public int joinAgentServer(short sid) throws Exception {\n return scadmin.joinAgentServer(sid);\n }", "public void launchSlave()\n {\n \tIntent mIntent = new Intent(MainActivity.this, SlaveActivity.class);\n \tstartActivityForResult(mIntent, NEW_SLAVE_ACTIVITY);\n }", "protected ServerConnection getMasterServer()\n {\n if (!m_lMasterLoaded && m_oMasterServerConnection == null)\n {\n m_lMasterLoaded = true;\n m_oMasterServerConnection = Application.getInstance().getPropertyHandlerProperty(\"WebServer.MasterServerConnection\");\n }\n return m_oMasterServerConnection;\n }", "public void createStartMasterOnNodeTasks(\n Universe universe,\n NodeDetails currentNode,\n @Nullable NodeDetails stoppingNode,\n boolean isStoppable) {\n\n Set<NodeDetails> nodeSet = ImmutableSet.of(currentNode);\n\n // Check that installed MASTER software version is consistent.\n createSoftwareInstallTasks(\n nodeSet, ServerType.MASTER, null, SubTaskGroupType.InstallingSoftware);\n\n if (currentNode.masterState != MasterState.Configured) {\n // TODO Configuration subtasks may be skipped if it is already a master.\n // Update master configuration on the node.\n createConfigureServerTasks(\n nodeSet,\n params -> {\n params.isMasterInShellMode = true;\n params.updateMasterAddrsOnly = true;\n params.isMaster = true;\n params.resetMasterState = true;\n })\n .setSubTaskGroupType(SubTaskGroupType.ConfigureUniverse);\n\n // Set gflags for master.\n createGFlagsOverrideTasks(\n nodeSet,\n ServerType.MASTER,\n true /* isShell */,\n VmUpgradeTaskType.None,\n false /*ignoreUseCustomImageConfig*/);\n }\n\n // Copy the source root certificate to the node.\n createTransferXClusterCertsCopyTasks(nodeSet, universe, SubTaskGroupType.InstallingSoftware);\n\n // Start a master process.\n createStartMasterProcessTasks(nodeSet);\n\n // Add master to the quorum.\n createChangeConfigTask(currentNode, true /* isAdd */, SubTaskGroupType.ConfigureUniverse);\n\n if (stoppingNode != null && stoppingNode.isMaster) {\n // Perform master change only after the new master is added.\n createChangeConfigTask(stoppingNode, false /* isAdd */, SubTaskGroupType.ConfigureUniverse);\n if (isStoppable) {\n createStopMasterTasks(Collections.singleton(stoppingNode))\n .setSubTaskGroupType(SubTaskGroupType.ConfigureUniverse);\n // TODO this may not be needed as change master config is already done.\n createWaitForMasterLeaderTask().setSubTaskGroupType(SubTaskGroupType.ConfigureUniverse);\n }\n // Update this so that it is not added as a master in config update.\n createUpdateNodeProcessTask(stoppingNode.nodeName, ServerType.MASTER, false)\n .setSubTaskGroupType(SubTaskGroupType.ConfigureUniverse);\n }\n\n // Update all server conf files because there was a master change.\n createMasterInfoUpdateTask(universe, currentNode, stoppingNode);\n }", "@Test\n public void testRoundRobinMasters()\n throws Exception {\n\n RepEnvInfo[] repEnvInfo = null;\n Logger logger = LoggerUtils.getLoggerFixedPrefix(getClass(), \"Test\");\n\n try {\n /* Create a replicator for each environment directory. */\n EnvironmentConfig envConfig =\n RepTestUtils.createEnvConfig\n (new Durability(Durability.SyncPolicy.WRITE_NO_SYNC,\n Durability.SyncPolicy.WRITE_NO_SYNC,\n Durability.ReplicaAckPolicy.SIMPLE_MAJORITY));\n envConfig.setConfigParam\n (EnvironmentConfig.LOG_FILE_MAX,\n EnvironmentParams.LOG_FILE_MAX.getDefault());\n\n // TODO: Is this needed now that hard recovery works?\n LocalCBVLSNUpdater.setSuppressGroupDBUpdates(true);\n envConfig.setConfigParam(\"je.env.runCleaner\", \"false\");\n\n repEnvInfo =\n RepTestUtils.setupEnvInfos(envRoot, nNodes, envConfig);\n\n /* Increase the ack timeout, to deal with slow test machines. */\n RepTestUtils.setConfigParam(RepParams.REPLICA_ACK_TIMEOUT, \"30 s\",\n repEnvInfo);\n\n /* Start all members of the group. */\n ReplicatedEnvironment master = RepTestUtils.joinGroup(repEnvInfo);\n assert(master != null);\n\n /* Do work */\n int startVal = 1;\n doWork(master, startVal);\n\n VLSN commitVLSN =\n RepTestUtils.syncGroupToLastCommit(repEnvInfo,\n repEnvInfo.length);\n RepTestUtils.checkNodeEquality(commitVLSN, verbose , repEnvInfo);\n\n logger.fine(\"--> All nodes in sync\");\n\n /*\n * Round robin through the group, letting each one have a turn\n * as the master.\n */\n for (int i = 0; i < nNodes; i++) {\n /*\n * Shut just under a quorum of the nodes. Let the remaining\n * nodes vote, and then do some work. Then bring\n * the rest of the group back in a staggered fashion. Check for\n * consistency among the entire group.\n */\n logger.fine(\"--> Shutting down, oldMaster=\" +\n master.getNodeName());\n int activeNodes =\n shutdownAllButQuorum(logger,\n repEnvInfo,\n RepInternal.getNodeId(master));\n\n master = RepTestUtils.openRepEnvsJoin(repEnvInfo);\n\n assertNotNull(master);\n logger.fine(\"--> New master = \" + master.getNodeName());\n\n startVal += 5;\n\n /*\n * This test is very timing dependent, so\n * InsufficientReplicasException is allowed.\n */\n int retries = 5;\n for (int retry = 0;; retry++) {\n try{\n doWork(master, startVal);\n break;\n } catch (InsufficientReplicasException e) {\n if (retry >= retries) {\n throw e;\n }\n }\n }\n\n /* Re-open the closed nodes and have them re-join the group. */\n logger.fine(\"--> Before closed nodes rejoin\");\n ReplicatedEnvironment newMaster =\n RepTestUtils.joinGroup(repEnvInfo);\n\n assertEquals(\"Round \" + i +\n \" expected master to stay unchanged. \",\n master.getNodeName(),\n newMaster.getNodeName());\n VLSN vlsn =\n RepTestUtils.syncGroupToLastCommit(repEnvInfo,\n activeNodes);\n RepTestUtils.checkNodeEquality(vlsn, verbose, repEnvInfo);\n }\n } catch (Throwable e) {\n e.printStackTrace();\n throw e;\n } finally {\n RepTestUtils.shutdownRepEnvs(repEnvInfo);\n }\n }", "public boolean isMaster() {\n return this.isMaster;\n }", "public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }", "public void masterNode(Board initState, boolean useCache) throws Exception {\n ReceivePort receiver = myIbis.createReceivePort(requestPortType,\n \"server\", this);\n\n synchronized (jobListBusy){\n // enable connections\n receiver.enableConnections();\n // enable upcalls\n receiver.enableMessageUpcalls();\n masterJobsList = getjobs(initState, useCache);\n jobCounter = masterJobsList.size();\n startTime = System.currentTimeMillis();\n while(masterJobsList.size() > 0)\n jobListBusy.wait();\n }\n System.err.println(\"Job is done. Solutions number = \" + solutionsNum + \"; Time spent on task is \" + (endTime - startTime));\n\n }", "public void enterMasterInfo(DiscoveredService discovered_service) {\n String newMasterUri = null;\n if ( discovered_service.ipv4_addresses.size() != 0 ) {\n newMasterUri = \"http://\" + discovered_service.ipv4_addresses.get(0) + \":\"\n + discovered_service.port + \"/\";\n }\n if (newMasterUri != null && newMasterUri.length() > 0) {\n android.util.Log.i(\"Remocon\", newMasterUri);\n Map<String, Object> data = new HashMap<String, Object>();\n data.put(\"URL\", newMasterUri);\n try {\n addMaster(new MasterId(data));\n } catch (Exception e) {\n Toast.makeText(MasterChooser.this, \"Invalid Parameters.\",\n Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(MasterChooser.this, \"No valid resolvable master URI.\",\n Toast.LENGTH_SHORT).show();\n }\n\t}", "void startToPerformAsLeader();", "Switch getHostSwitch();", "@Override\n\tpublic boolean canJoin() {\n\t\treturn isOpen() || isRunning();\n\t}", "public void createMasterReplacementTasks(\n Universe universe,\n NodeDetails currentNode,\n Supplier<NodeDetails> replacementSupplier,\n boolean isStoppable) {\n if (currentNode.masterState != MasterState.ToStop) {\n log.info(\n \"Current node {} is not a master to be stopped. Ignoring master replacement\",\n currentNode.getNodeName());\n return;\n }\n NodeDetails newMasterNode = replacementSupplier.get();\n if (newMasterNode == null) {\n log.info(\"No eligible node found to move master from node {}\", currentNode.getNodeName());\n createChangeConfigTask(\n currentNode, false /* isAdd */, SubTaskGroupType.StoppingNodeProcesses);\n // Stop the master process on this node after this current master is removed.\n if (isStoppable) {\n createStopMasterTasks(Collections.singleton(currentNode))\n .setSubTaskGroupType(SubTaskGroupType.StoppingNodeProcesses);\n // TODO this may not be needed as change master config is already done.\n createWaitForMasterLeaderTask().setSubTaskGroupType(SubTaskGroupType.StoppingNodeProcesses);\n }\n // Update this so that it is not added as a master in config update.\n createUpdateNodeProcessTask(currentNode.getNodeName(), ServerType.MASTER, false)\n .setSubTaskGroupType(SubTaskGroupType.StoppingNodeProcesses);\n // Now isTserver and isMaster are both false for this stopped node.\n createMasterInfoUpdateTask(universe, null, currentNode);\n // Update the master addresses on the target universes whose source universe belongs to\n // this task.\n createXClusterConfigUpdateMasterAddressesTask();\n } else if (newMasterNode.masterState == MasterState.ToStart\n || newMasterNode.masterState == MasterState.Configured) {\n log.info(\n \"Automatically bringing up master for under replicated universe {} ({}) on node {}.\",\n universe.getUniverseUUID(),\n universe.getName(),\n newMasterNode.getNodeName());\n // Update node state to Starting Master.\n createSetNodeStateTask(newMasterNode, NodeState.Starting)\n .setSubTaskGroupType(SubTaskGroupType.StartingMasterProcess);\n // This method takes care of master config change.\n createStartMasterOnNodeTasks(universe, newMasterNode, currentNode, isStoppable);\n createSetNodeStateTask(newMasterNode, NodeDetails.NodeState.Live)\n .setSubTaskGroupType(SubTaskGroupType.StartingMasterProcess);\n }\n // This is automatically cleared when the task is successful. It is done\n // proactively to not run this conditional block on re-run or retry.\n createSetNodeStatusTasks(\n Collections.singleton(currentNode),\n NodeStatus.builder().masterState(MasterState.None).build())\n .setSubTaskGroupType(SubTaskGroupType.StoppingNodeProcesses);\n }", "static void respawnReplicaServers(Master master) throws IOException {\n System.out.println(\"[@main] respawning replica servers \");\n // TODO make file names global\n BufferedReader br = new BufferedReader(new FileReader(\"repServers.txt\"));\n int n = Integer.parseInt(br.readLine().trim());\n ReplicaLoc replicaLoc;\n String s;\n\n for (int i = 0; i < n; i++) {\n s = br.readLine().trim();\n replicaLoc = new ReplicaLoc(i, s.substring(0, s.indexOf(':')), true);\n ReplicaServer rs = new ReplicaServer(i, \"./\");\n\n ReplicaInterface stub = (ReplicaInterface) UnicastRemoteObject.exportObject(rs, 0);\n registry.rebind(\"ReplicaClient\" + i, stub);\n\n master.registerReplicaServer(replicaLoc, stub);\n\n System.out.println(\"replica server state [@ main] = \" + rs.isAlive());\n }\n br.close();\n }", "@Override\n\tpublic void execute(DelegateExecution execution) throws Exception {\n\t\tString ip = (String) execution.getVariable(\"ip\");\n\t\tString serviceHome = (String) execution.getVariable(\"serviceHome\");\n\t\tString coRoot = (String) execution.getVariable(\"coRoot\");\n\t\tString customizationId = (String) execution.getVariable(\"customizationId\");\n\t\tHashMap<String, String> data = toscaService.getCloudData(customizationId);\n\n\t\t// TODO al momento è vuoto perchè non lo leggiamo da nulla valutare se\n\t\t// leggerlo dinamicamente o da file di configurazione\n\t\tString privateKeyPath = (String) execution.getVariable(\"privateKeyPath\");\n\t\tString passphrase = (String) execution.getVariable(\"passphrase\");\n\n\t\t// prepare the certificates\n\t\tshellCert(serviceHome, caPath, data.get(\"vmname\"), ip, caPassword);\n\t\t// send the key\n\t\ttransferFile(serviceHome, \"key.pem\", privateKeyPath, passphrase, ip);\n\t\t// send the cert\n\t\ttransferFile(serviceHome, \"cert.pem\", privateKeyPath, passphrase, ip);\n\n\t\t// now that all the pieces are in the machine we can join it to swarm\n\t\tString remote_command = \"systemctl start docker && /usr/bin/docker run -itd --name=swarm-agent --expose=2376 -e SWARM_HOST=:2376 swarm join --advertise=\"\n\t\t\t\t+ ip + \":\" + dockerPort + \" consul://\" + hostip + \":8500\";\n\n\t\tProperties config = new Properties();\n\t\tconfig.put(\"StrictHostKeyChecking\", \"no\"); // without this it cannot\n\t\t\t\t\t\t\t\t\t\t\t\t\t// connect because the host\n\t\t\t\t\t\t\t\t\t\t\t\t\t// key verification fails\n\t\t\t\t\t\t\t\t\t\t\t\t\t// the right way would be to\n\t\t\t\t\t\t\t\t\t\t\t\t\t// somehow get the server\n\t\t\t\t\t\t\t\t\t\t\t\t\t// key and add it to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t// trusted keys\n\t\t\t\t\t\t\t\t\t\t\t\t\t// jsch.setKnownHosts()\n\t\t\t\t\t\t\t\t\t\t\t\t\t// https://epaul.github.io/jsch-documentation/javadoc/com/jcraft/jsch/JSch.html#setKnownHosts-java.lang.String-\n\t\t\t\t\t\t\t\t\t\t\t\t\t// see also\n\t\t\t\t\t\t\t\t\t\t\t\t\t// http://stackoverflow.com/a/32858953/28582\n\t\tJSch jsch = new JSch();\n\t\tjsch.addIdentity(privateKeyPath, passphrase);\n\n\t\tSession session = jsch.getSession(ROOT_USER, ip, SSH_PORT);\n\t\tsession.setConfig(config);\n\t\tsession.connect();\n\n\t\tChannelExec channel = (ChannelExec) session.openChannel(\"exec\");\n\t\tint exitStatus = sendCommand(remote_command, channel);\n\t\tlog.debug(\"Command: [\" + remote_command + \"]\");\n\t\tif (exitStatus != 0) {\n\t\t\tlog.debug(\"FAILED - exit status: \" + exitStatus);\n\t\t} else {\n\t\t\tlog.debug(\"Executed successfully\");\n\t\t}\n\t\tchannel.disconnect();\n\t\tsession.disconnect();\n\n\t\tlog.debug(\"in DeployDockerSwarm\");\n\t\t// toscaService.getNodeType(\"\");\n\t\t// dockerService.addMachine(ip, 2376); //SSL\n\t\tString clusterToken = dockerService.addMachine(swarmIp, Integer.parseInt(swarmPort)); // no SSL\n\t\texecution.setVariable(\"clusterToken\", clusterToken);\n\t\tString clusterInfo = dockerService.clusterDetail(clusterToken);\n\t}", "private boolean switchFailoverWithDNS() throws Throwable {\n \t// switch failover\n \t// ping from master\n \t// switch failback\n \t// ping from master\n \treturn (setupAPCScript() &&\n \t\t\tpingFromMaster(hostname) &&\n \t\t\tapcCommand(1, \"Off\") &&\n \t\t\tpingFromMaster(hostname) &&\n \t\t\tapcCommand(1, \"On\") &&\n \t\t\tpingFromMaster(hostname));\n\t}", "void willStartFromRespawn() throws RemoteException;", "private void SwitchToSlaveRemoteController(final String hostname, final String password) {\n\t\tproduct = FPVDemoApplication.getProductInstance();\n\t\tif (product != null) {\n\t\t\tfinal RemoteController remoteController = ((Aircraft) product).getRemoteController();\n\t\t\t//final LightbridgeLink lightbridge = product.getAirLink().getLightbridgeLink();\n\t\t\tif (remoteController.isMasterSlaveModeSupported()) {\n\t\t\t\tremoteController.setMode(SLAVE, new CommonCallbacks.CompletionCallback() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResult(DJIError djiError) {\n\t\t\t\t\t\tif (djiError == null) {\n\t\t\t\t\t\t\tshowToast(\"模式切换成功!\");\n\t\t\t\t\t\t\tremoteController.connectToMaster(new Credentials(1, hostname, password), new CommonCallbacks.CompletionCallbackWith<ConnectToMasterResult>() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onSuccess(ConnectToMasterResult connectToMasterResult) {\n\t\t\t\t\t\t\t\t\tif (connectToMasterResult.value() == 0) {\n\t\t\t\t\t\t\t\t\t\tshowToast(\"连接主机成功!\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tshowToast(connectToMasterResult.toString());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onFailure(DJIError djiError) {\n\t\t\t\t\t\t\t\t\tshowToast(\"连接主机失败!\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tshowToast(djiError.getDescription());\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 updateSwarm();", "protected void connect(Candidate target) throws InterruptedException {\n logger.fine(\"connect() invoked\");\n\n Launcher launcher = new Launcher();\n List<String> jnlpArgs = Collections.emptyList();\n\n try {\n launcher.slaveJnlpURL = new URL(target.url + \"computer/\" + name\n + \"/slave-agent.jnlp\");\n } catch (MalformedURLException e) {\n e.printStackTrace();\n logger.log(Level.SEVERE, \"Failed to establish JNLP connection to \" + target.url, e);\n Thread.sleep(10 * 1000);\n }\n\n if (options.username != null && options.password != null) {\n launcher.auth = options.username + \":\" + options.password;\n launcher.slaveJnlpCredentials = options.username + \":\" + options.password;\n }\n\n try {\n jnlpArgs = launcher.parseJnlpArguments();\n } catch (Exception e) {\n e.printStackTrace();\n logger.log(Level.SEVERE, \"Failed to establish JNLP connection to \" + target.url, e);\n Thread.sleep(10 * 1000);\n }\n\n List<String> args = new LinkedList<String>();\n args.add(jnlpArgs.get(0));\n args.add(jnlpArgs.get(1));\n\n args.add(\"-url\");\n args.add(target.url);\n\n // if the tunnel option is set in the command line, use it\n if (options.tunnel != null) {\n args.add(\"-tunnel\");\n args.add(options.tunnel);\n logger.fine(\"Using tunnel through \" + options.tunnel);\n }\n\n if (options.username != null && options.password != null) {\n args.add(\"-credentials\");\n args.add(options.username + \":\" + options.password);\n }\n args.add(\"-headless\");\n args.add(\"-noreconnect\");\n\n try {\n Main.main(args.toArray(new String[args.size()]));\n } catch (Exception e) {\n e.printStackTrace();\n logger.log(Level.SEVERE, \"Failed to establish JNLP connection to \" + target.url, e);\n Thread.sleep(10 * 1000);\n }\n }", "public void start(MasterAddress master_to_connect)\n {\n if(Config.isVerbose())\n {\n String sz = String.format(\"ABCWorker version:%s\\nHOME: %s\\nABCMaster: %s\",\n Config.getVersion(),Config.getHome(),Config.getMasterAddress());\n System.out.println(sz);\n }\n //connect to Master\n MasterProxy.connect(master_to_connect);\n JobManager jm = JobManager.getInstance();\n //start task runner threads\n jm.startTaskRunner();\n }", "@Override\n\tpublic boolean canRespawnHere() {\n\t\treturn true;\n\t}", "private DHTFuture<BootstrapEntity> bootstrap(final Object lock, \n final DHTFuture<PingEntity> pingFuture, \n final BootstrapConfig config) {\n assert (Thread.holdsLock(lock));\n \n DHTProcess<BootstrapEntity> process = NopProcess.create();\n final DHTFuture<BootstrapEntity> userFuture \n = dht.submit(process, config);\n \n final ValueReference<DHTFuture<NodeEntity>> lookupFutureRef\n = new ValueReference<DHTFuture<NodeEntity>>();\n \n pingFuture.addAsyncFutureListener(new AsyncFutureListener<PingEntity>() {\n @Override\n public void operationComplete(AsyncFuture<PingEntity> future) {\n synchronized (lock) {\n try {\n if (!future.isCancelled()) {\n handlePingEntity(future.get());\n } else {\n handleCancelled();\n }\n } catch (Throwable t) {\n handleException(t);\n }\n }\n }\n \n private void handlePingEntity(final PingEntity pingEntity) {\n Contact[] contacts = new Contact[] { pingEntity.getContact() };\n LookupManager lookupManager = dht.getLookupManager();\n \n Contact localhost = dht.getLocalhost();\n KUID localhostId = localhost.getId();\n AsyncFuture<NodeEntity> lookupFuture \n = lookupFutureRef.make(\n lookupManager.lookup(contacts, \n localhostId, config.getLookupConfig()));\n \n lookupFuture.addAsyncFutureListener(new AsyncFutureListener<NodeEntity>() {\n @Override\n public void operationComplete(AsyncFuture<NodeEntity> future) {\n synchronized (lock) {\n try {\n if (!future.isCancelled()) {\n handleNodeEntity(future.get());\n } else {\n handleCancelled();\n }\n } catch (Throwable t) {\n handleException(t);\n }\n }\n }\n \n private void handleNodeEntity(NodeEntity nodeEntity) {\n userFuture.setValue(new DefaultBootstrapEntity(\n pingEntity, nodeEntity));\n }\n });\n }\n \n private void handleCancelled() {\n userFuture.cancel(true);\n }\n \n private void handleException(Throwable t) {\n userFuture.setException(t);\n }\n });\n \n userFuture.addAsyncFutureListener(new AsyncFutureListener<BootstrapEntity>() {\n @Override\n public void operationComplete(AsyncFuture<BootstrapEntity> future) {\n synchronized (lock) {\n FutureUtils.cancel(pingFuture, true);\n FutureUtils.cancel(lookupFutureRef, true);\n }\n }\n });\n \n userFuture.setAttachment(new Attachment(pingFuture, lookupFutureRef));\n return userFuture;\n }", "private void joinQuorum() {\n AddQuorumServerRequest request = AddQuorumServerRequest.newBuilder()\n .setServerAddress(NetAddress.newBuilder()\n .setHost(mLocalAddress.getHostString())\n .setRpcPort(mLocalAddress.getPort()))\n .build();\n RaftClient client = createClient();\n client.async().sendReadOnly(Message.valueOf(\n UnsafeByteOperations.unsafeWrap(\n JournalQueryRequest\n .newBuilder()\n .setAddQuorumServerRequest(request)\n .build().toByteArray()\n ))).whenComplete((reply, t) -> {\n if (t != null) {\n LogUtils.warnWithException(LOG, \"Exception occurred while joining quorum\", t);\n }\n if (reply != null && reply.getException() != null) {\n LogUtils.warnWithException(LOG,\n \"Received an error while joining quorum\", reply.getException());\n }\n try {\n client.close();\n } catch (IOException e) {\n LogUtils.warnWithException(LOG, \"Exception occurred closing raft client\", e);\n }\n });\n }", "public boolean joinLobby(Lobby lobby)\n {\n if (lobby.assignSlot(this))\n {\n this.currentLobby = lobby;\n return true;\n }\n return false;\n }", "private ProcessProfile findMasterNode(String masterId, List<ProcessProfile> nodeProfiles) {\n ProcessProfile targetNode = nodeProfiles.stream()\n .filter(node -> (masterId.equals(node.id)))\n .findAny()\n .orElse(null);\n\n if (targetNode == null) {\n logger.warn(Constants.CONSOLE, \"Could not find current master in node list.\");\n throw new RuntimeException();\n }\n\n targetNode.currentMaster = true;\n return targetNode;\n }", "public void lockThreadForClient()\n {\n masterThread.lockThreadForClient();\n }", "private MapWritable reportForDuty(final Sleeper sleeper) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Telling master at \" +\n conf.get(MASTER_ADDRESS) + \" that we are up\");\n }\n HMasterRegionInterface master = null;\n while (!stopRequested.get() && master == null) {\n try {\n // Do initial RPC setup. The final argument indicates that the RPC\n // should retry indefinitely.\n master = (HMasterRegionInterface)HbaseRPC.waitForProxy(\n HMasterRegionInterface.class, HMasterRegionInterface.versionID,\n new HServerAddress(conf.get(MASTER_ADDRESS)).getInetSocketAddress(),\n this.conf, -1);\n } catch (IOException e) {\n LOG.warn(\"Unable to connect to master. Retrying. Error was:\", e);\n sleeper.sleep();\n }\n }\n this.hbaseMaster = master;\n MapWritable result = null;\n long lastMsg = 0;\n while(!stopRequested.get()) {\n try {\n this.requestCount.set(0);\n this.serverInfo.setLoad(new HServerLoad(0, onlineRegions.size(), 0, 0));\n lastMsg = System.currentTimeMillis();\n result = this.hbaseMaster.regionServerStartup(serverInfo);\n break;\n } catch (Leases.LeaseStillHeldException e) {\n LOG.info(\"Lease \" + e.getName() + \" already held on master. Check \" +\n \"DNS configuration so that all region servers are\" +\n \"reporting their true IPs and not 127.0.0.1. Otherwise, this\" +\n \"problem should resolve itself after the lease period of \" +\n this.conf.get(\"hbase.master.lease.period\")\n + \" seconds expires over on the master\");\n } catch (IOException e) {\n LOG.warn(\"error telling master we are up\", e);\n }\n sleeper.sleep(lastMsg);\n }\n return result;\n }", "private ClientBootstrap createPeerBootStrap() {\n\n if (workerThreads == 0) {\n execFactory = new NioClientSocketChannelFactory(\n Executors.newCachedThreadPool(groupedThreads(\"onos/pcc\", \"boss-%d\")),\n Executors.newCachedThreadPool(groupedThreads(\"onos/pcc\", \"worker-%d\")));\n return new ClientBootstrap(execFactory);\n } else {\n execFactory = new NioClientSocketChannelFactory(\n Executors.newCachedThreadPool(groupedThreads(\"onos/pcc\", \"boss-%d\")),\n Executors.newCachedThreadPool(groupedThreads(\"onos/pcc\", \"worker-%d\")),\n workerThreads);\n return new ClientBootstrap(execFactory);\n }\n }", "public static void submit(TopologyBuilder builder, String[] args) {\n // 1. If local mode.\n if (builder.isLocalMode) {\n LocalCluster local = new LocalCluster();\n local.submit(builder);\n return;\n }\n\n // 2. If master run to check.\n if (args.length == 2) {\n\n logger.info(\"Master start to running toplogy:\" + builder.getName());\n if (topologies.containsKey(builder.getName())) {\n ZookeeperClient.getInstance().deleteNode(\"/app/\" + builder.getName());\n logger.warn(\"Topology is already exist.\");\n }\n\n // 2.1 Make sure config.\n String jarPath = args[0];\n String topology = args[1];\n int specifySlaveCount = builder.getSlaveCount();\n int workerCount = builder.getTotalWorkerCount();\n int total = workerCount;\n\n // 2.2 Get best slaves.\n logger.info(\"Master start to get best slaves:\" + builder.getName());\n logger.info(\"1. Specify slave count:\" + specifySlaveCount);\n logger.info(\"2. Specify worker count:\" + workerCount);\n List<String> slaves = new ArrayList<>();\n List<Integer> runningApps = new ArrayList<>();\n for (int i = 0; i < specifySlaveCount && i < Luggage.performanceSlaves.size(); i++) {\n String slave = Luggage.performanceSlaves.get(i);\n int cnt = Luggage.slaves.get(slave);\n slaves.add(slave);\n workerCount += cnt;\n runningApps.add(cnt);\n }\n\n // 2.3 worker distribution.\n int left = total % slaves.size();\n int avg = total / slaves.size();\n logger.info(\"3. Avg workers' count on each slave:\" + avg);\n logger.info(\"4. left workers' count:\" + left);\n List<Integer> distri = new ArrayList<>();\n slaves.stream().forEach((_item) -> {\n distri.add(avg);\n });\n for (int i = 0; i < left; i++) {\n distri.set(i, distri.get(i) + 1);\n }\n\n // 2.4 Configuration parameters.\n List<String> parameters = new ArrayList<>();\n List<String> allputs = builder.getAllputs();\n int lastIndex = 0;\n int hasDistr = 0;\n for (int cnt : distri) {\n StringBuffer par = new StringBuffer();\n for (int i = lastIndex; i < hasDistr + cnt; i++) {\n par.append(allputs.get(i));\n par.append(\" \");\n }\n lastIndex += cnt;\n hasDistr += cnt;\n parameters.add(par.toString());\n }\n\n // 2.5 Send to slaves.\n byte[] content = null;\n try {\n ByteArrayOutputStream out;\n try (BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(jarPath))) {\n out = new ByteArrayOutputStream(inputStream.available());\n byte[] temp = new byte[inputStream.available()];\n int size = 0;\n while ((size = inputStream.read(temp)) != -1) {\n out.write(temp, 0, size);\n }\n }\n content = out.toByteArray();\n } catch (Exception e) {\n logger.error(e);\n }\n if (content != null) {\n for (int i = 0; i < slaves.size(); i++) {\n try {\n String[] infor = slaves.get(i).split(\",\");\n String header = topology + \":\" + parameters.get(i);\n logger.info(\"5.\" + i + \"(\" + slaves.get(i) + \"):\" + parameters.get(i));\n NodeTopology.getInstance().set(slaves.get(i), builder.getName());\n\n // 3. Build packet.\n Packet packet = new Packet();\n packet.setExecutType(Message.ExecuteType.UPLOAD.ordinal());\n packet.setMimeType(Message.MIMEType.APP.ordinal());\n byte[] appName = Message.getBytes(header);\n byte[] appNameSize = Convertor.int2byte(appName.length, 4);\n byte[] data = new byte[4 + appName.length + content.length];\n System.arraycopy(appNameSize, 0, data, 0, 4);\n System.arraycopy(appName, 0, data, 4, appName.length);\n System.arraycopy(content, 0, data, 4 + appName.length, content.length);\n packet.setData(data);\n SyncClient client = new SyncClient(infor[0], Integer.parseInt(infor[1]));\n client.send(packet);\n } catch (Exception e) {\n logger.error(e);\n }\n }\n ZookeeperClient.getInstance().setNodeValue(\"/app/\" + builder.getName() + \"/finished\", builder.getAllputs().size() + \"\");\n ZookeeperClient.getInstance().setNodeValue(\"/app/\" + builder.getName() + \"/slavecount\", builder.getSlaveCount() + \"\");\n topologies.put(builder.getName(), builder);\n\n } else {\n logger.error(\"Content cannot be null.\");\n }\n return;\n }\n\n // 3. If slave run.\n if (args.length == 1) {\n List<String> puts = Arrays.asList(args[0].split(\" \"));\n HashMap<String, Object> userConfig = builder.getUserConfig();\n List<IInput> inputConfig = SystemConfig.inputs.get(builder.getName());\n List<IOutput> outputConfig = SystemConfig.outputs.get(builder.getName());\n\n // 3. Try to run output.\n for (int i = outputConfig.size() - 1; i > -1; i--) {\n IOutput output = outputConfig.get(i);\n String name = output.getClass().getName();\n for (int j = 0; j < puts.size(); j++) {\n if (puts.get(j).equals(name)) {\n puts.set(j, \"empty\");\n OutputExecutor executor = new OutputExecutor(builder.getName(), output, userConfig);\n Thread thread = new Thread(executor);\n thread.start();\n break;\n }\n }\n }\n\n // 4. Try to run input.\n List<InputExecutor> exs = new ArrayList<>();\n for (int i = inputConfig.size() - 1; i > -1; i--) {\n IInput input = inputConfig.get(i);\n String name = input.getClass().getName();\n for (int j = 0; j < puts.size(); j++) {\n if (puts.get(j).equals(name)) {\n puts.set(j, \"empty\");\n InputExecutor executor = new InputExecutor(builder.getName(), input, userConfig);\n exs.add(executor);\n Thread thread = new Thread(executor);\n thread.start();\n break;\n }\n }\n }\n inputExecutors.put(builder.getName(), exs);\n topologies.put(builder.getName(), builder);\n }\n }", "private Job findLaunchClientJob() {\n Job[] jobs = Job.getJobManager().find(null);\n for (Job job : jobs) {\n if (job instanceof LaunchClientJob) {\n if (((LaunchClientJob) job).getServer().getId().equals(environment.getServer().getId())) {\n trace(\"Identified LaunchClientJob: \" + job);\n return job;\n }\n }\n }\n\n trace(\"Unable to find LaunchClientJob!\");\n return null;\n }", "private void installLocalOrRemote() {\n CommandPacket startCommandPacket = null;\n //直到成功为止,控制台可能重启、网络问题等原因\n //TODO\n int time = 0;\n while ((startCommandPacket = getStartCommandPacket()) == null){\n try {\n time ++;\n if(time == 20){\n String defaultRegister = \"zookeeper\";\n String register = agentConfig.getProperty(\"register.name\", defaultRegister);\n if(defaultRegister.equals(register)){\n logger.error(\"经过10s尝试启动simulator失败, 请确认控制台是否正常\");\n }\n break;\n }\n logger.error(\"启动simulator获取远程失败,休眠500ms重试,请确认控制台是否正常\");\n Thread.sleep(500 );\n } catch (InterruptedException ignore) {\n }\n }\n\n if(startCommandPacket == null){\n startCommandPacket = new CommandPacket();\n // 启动\n startCommandPacket.setId(HeartCommandConstants.startCommandId);\n Map<String, Object> extras = new HashMap<String, Object>();\n extras.put(HeartCommandConstants.PATH_TYPE_KEY, HeartCommandConstants.PATH_TYPE_LOCAL_VALUE);\n // 使用本地探针包\n startCommandPacket.setExtras(extras);\n }\n install(startCommandPacket);\n }", "private static void signonToMaster() {\r\n /* The first that we expect is a request to sign on: */\r\n SocketMessage sm = socket_to_master.getMessage();\r\n\r\n /* The master wants to make sure that we are not talking to a stale master: */\r\n if (sm.getMessageNum() == sm.SEND_SIGNON_INFO_TO_MASTER) {\r\n /* OS is also determined in InfoFromHost.getInfoForMaster(), but it was */\r\n /* found that I will need the OS earlier. Old code has not been removed */\r\n String data[] = new String[SocketMessage.SIGNON_INFO_SIZE];\r\n data[0] = master_ip;\r\n data[1] = slave_name;\r\n data[2] = System.getProperty(\"os.name\");\r\n data[3] = System.getProperty(\"os.arch\");\r\n data[4] = \"\" + common.getProcessId();\r\n data[5] = \"\" + System.currentTimeMillis();\r\n\r\n sm.setData(data);\r\n socket_to_master.putMessage(sm);\r\n } else\r\n common.failure(\"Unexpected message number during signon: \" + sm.getMessageNum());\r\n\r\n /* The next one is good or bad news: */\r\n sm = socket_to_master.getMessage();\r\n if (sm.getMessageNum() == sm.KILL_SLAVE_SIGNON_ERROR)\r\n common.failure(\"Signon to master failed\");\r\n\r\n if (sm.getMessageNum() != sm.SEND_SIGNON_SUCCESSFUL)\r\n common.failure(\"Unexpected message number during signon: \" + sm.getMessageNum());\r\n owner_id = master_pid = ((Integer) sm.getData()).intValue();\r\n\r\n /* Confirm that we received the successful message: */\r\n socket_to_master.putMessage(sm);\r\n }", "@Override\n\tpublic boolean canRespawnHere()\n\t{\n\t\treturn false;\n\t}", "public void startLocalServer() {\n \t boolean exists = (new File(addeMcservl)).exists();\n \t if (exists) {\n \t // Create and start the thread if there isn't already one running\n\t \tif (thread != null) {\n \t \t\tthread = new AddeThread();\n \t \t\tthread.start();\n \t\t System.out.println(addeMcservl + \" was started\");\n \t \t} else {\n \t \t\tSystem.out.println(addeMcservl + \" is already running\");\n \t \t}\n \t } else {\n \t \tSystem.out.println(addeMcservl + \" does not exist\");\n \t }\n \t}", "public String getCurrentDatabaseMasterOrException(String databaseId) {\n Optional<String> master = getCurrentDatabaseMaster(databaseId);\n if (!master.isPresent()) {\n throw new IllegalStateException(\"Unable to resolve any known host/port for database with id '\" +\n databaseId + \"'.\");\n }\n return master.get();\n }", "@Override\n public void preApplication(final MasterContext<MASTER_RESULT, WORKER_RESULT> context) {\n initialize(context.getProps());\n\n // Master election which is used here to use the same zookeeper instance.\n if(NumberFormatUtils.getInt(context.getProps().getProperty(GuaguaConstants.GUAGUA_MASTER_NUMBER),\n GuaguaConstants.DEFAULT_MASTER_NUMBER) > 1) {\n new MasterElectionCommand(context.getAppId()).execute();\n }\n new FailOverCommand(context).execute();\n\n if(context.getCurrentIteration() != GuaguaConstants.GUAGUA_INIT_STEP) {\n // if not init step, return, because of no need initialize twice for fail-over task\n return;\n }\n\n new BasicCoordinatorCommand() {\n @Override\n public void doExecute() throws KeeperException, InterruptedException {\n String appId = context.getAppId();\n int currentIteration = context.getCurrentIteration();\n final String appWorkersNode = getWorkerBaseNode(appId, currentIteration).toString();\n final int workers = context.getWorkers();\n\n new RetryCoordinatorCommand(isFixedTime(), getSleepTime()) {\n @Override\n public boolean retryExecution() throws KeeperException, InterruptedException {\n try {\n List<String> childrenExt = getZooKeeper().getChildrenExt(appWorkersNode, false, false,\n false);\n int initDoneWorkers = childrenExt.size();\n // to avoid log flood\n if(System.nanoTime() % 20 == 0) {\n LOG.info(\"workers already initialized: {}, still {} workers are not synced.\",\n initDoneWorkers, (context.getWorkers() - initDoneWorkers));\n LOG.info(\"DEBUG: left workers:{}\", notInList(childrenExt, context.getWorkers()));\n }\n return isTerminated(initDoneWorkers, workers, context.getMinWorkersRatio(),\n context.getMinWorkersTimeOut());\n } catch (KeeperException.NoNodeException e) {\n // to avoid log flood\n if(System.nanoTime() % 10 == 0) {\n LOG.warn(\"No such node:{}\", appWorkersNode);\n }\n return false;\n }\n }\n }.execute();\n\n LOG.info(\"All workers are initiliazed successfully.\");\n\n String znode = null;\n try {\n // create worker znode 1: '/_guagua/<jobId>/workers/1' to avoid re-create znode from workers\n znode = getWorkerBaseNode(context.getAppId(), context.getCurrentIteration() + 1).toString();\n getZooKeeper().createExt(znode, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT, false);\n // create master init znode\n znode = getMasterBaseNode(context.getAppId()).toString();\n getZooKeeper().createExt(znode, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT, false);\n znode = getCurrentMasterNode(context.getAppId(), context.getCurrentIteration()).toString();\n getZooKeeper().createExt(znode, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT, false);\n } catch (KeeperException.NodeExistsException e) {\n LOG.warn(\"Node exists: {}\", znode);\n }\n }\n }.execute();\n }", "public Master(String name) {\n\t\tthis.name=name;\n\t}", "public static DBMaster GetAnInstanceOfDBMaster() {\n\t\tif (singletonDBMaster == null) {\r\n\t\t\tsingletonDBMaster = new DBMaster();\r\n\t\t}\r\n\t\t\r\n\t\treturn singletonDBMaster;\r\n\t}", "private void joinLobby(ActionEvent actionEvent, String name) throws ExecutionException, InterruptedException {\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n if(!fireStoreController.checkExistence(token)){\n JoinLobbyViewTokenTextField.setText(\"This lobby does not exist\");\n }\n\n if(fireStoreController.getLobbySize(token) >= 8){\n LobbyAlreadyFullPopup.setVisible(true);\n }\n\n }", "public void launchMaster()\n {\n \tIntent mIntent = new Intent(MainActivity.this, MasterButtonActivity.class);\n \tstartActivityForResult(mIntent, NEW_MASTER_BUTTON_ACTIVITY);\n }", "public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.Builder getGkeMasterBuilder() {\n return getGkeMasterFieldBuilder().getBuilder();\n }", "void joinGame(String playeruuid);", "public void join();", "private void doJoin(){\n\n final String aggHost = System.getProperty(\"aggregate.host.uri\", \"\");\n if (aggHost.isEmpty()) {\n command(\"/aggregate\", \"addBot\", Record.of()\n .slot(\"node\", nodeUri().toString())\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));\n } else {\n command(aggHost, \"/aggregate\", \"addBot\", Record.of()\n .slot(\"host\", hostUriHack().toString()) // ws://192.168.0.151:9001\n .slot(\"node\", nodeUri().toString()) // /bot/6\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));// RaspiBot6|192.168.0.151:9001\n }\n }", "private synchronized boolean runLeaderElection(ZooKeeperService zkService) {\n List<String> children = List.ofAll(zkService.getChildren(ROOT, false))\n .sorted();\n\n\n // There should be at least one node at this point, as we have already registered ourselves.\n String leader = children.headOption().getOrElse(\"\");\n LOG.info(\"me={} leader={} children={}\", my_node, leader, children);\n\n\n boolean isLeader = StringUtils.equals(leader, my_node);\n\n\n if (isLeader) {\n bus.post(new LeaderEvent(LeaderEvent.Type.Leader));\n watchedLeader = \"\";\n return true;\n } else {\n\n // Register a watch on a node ahead of us, we will never be leader until at least this node is gone\n // and since we are not the leader, someone _must_ be ahead of us here.\n String leaderAheadOfMe = children.get(children.indexOf(my_node) - 1);\n\n LOG.info(\"Creating watch on leader ahead of me={}\", leaderAheadOfMe);\n String otherLeader = buildPath(ROOT, leaderAheadOfMe);\n\n if (zkService.exists(otherLeader, true)) {\n LOG.info(\"Watching leader={}\", leaderAheadOfMe);\n watchedLeader = leaderAheadOfMe;\n return true;\n } else {\n // the node was removed while we were electing or our ZK session died, run new election\n return false;\n }\n }\n }", "void handleDisconnectedNode(INode remoteNode) {\n\t\t\n\t\tint myMasterPrio = cluster.getConfig().getMasterPriority();\n\t\tsynchronized (services) {\n\t\t\tfor (String name : getInstalledClusterServiceNames()) {\n\t\n\t\t\t\tClusterServiceHandler csWrapper = services.get(name);\n\t\t\t\tIRemoteService rsMaster = csWrapper.getMasterService();\n\t\t\t\tif (rsMaster != null) {\n\t\t\t\t\tif (rsMaster.getNode().sameNode(remoteNode)) {\n\t\t\t\t\t\t// the node that went down was hosting the master service.\n\t\t\t\t\t\t// We need to check if we are the logical next master and if so, become master. If a different, active node\n\t\t\t\t\t\t// is the next master, change to the new master\n\t\t\t\t\t\t\n\t\t\t\t\t\tIRemoteService nextMaster = null;\n\t\t\t\t\t\tfor (IRemoteService rs : csWrapper.getRemoteServices()) {\n\t\t\t\t\t\t\tif (rs.getServiceStatus() != ClusterServiceStatus.NO_SUCH_SERVICE &&\n\t\t\t\t\t\t\t\trs.getNode().getStatus() == NodeStatus.CONNECTED) {\n\t\t\t\t\t\t\t\t// the node is active\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (rs.getNode().getMasterPriority() > myMasterPrio && (nextMaster == null || rs.getNode().getMasterPriority() > nextMaster.getNode().getMasterPriority())) {\n\t\t\t\t\t\t\t\t\tnextMaster = rs;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (nextMaster == null) {\n\t\t\t\t\t\t\t// either no other node exists or we have the highest master priority of all remaining active tasks\n\t\t\t\t\t\t\tcsWrapper.getClusterService().obtainMasterRole(null);\n\t\t\t\t\t\t\tcsWrapper.setMasterService(null);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// simply point to the newly identified master node. We assume that the other node\n\t\t\t\t\t\t\t// also experienced the connection loss to the old master, so the new master node will\n\t\t\t\t\t\t\t// obtain the master role by itself.\n\t\t\t\t\t\t\t((RemoteService)nextMaster).setServiceStatus(ClusterServiceStatus.ACTIVE_MASTER);\n\t\t\t\t\t\t\tcsWrapper.setMasterService(nextMaster);\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\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n public void doJob(JobExecutionContext context) throws JobExecutionException {\n RLock lock = null;\n RedissonClient redisson = null;\n try {\n if (this.manager == null) {\n this.manager = new MarathonMatchFeederManager(JestClientUtils.get(GLOBAL_CONFIGURATION.getJestClientConfiguration()), DAOFactory.getInstance().createDAO(MarathonMatchFeederDAO.class));\n }\n if (this.config == null) {\n this.config = GLOBAL_CONFIGURATION;\n }\n Config redissonConfig = new Config();\n redissonConfig.setLockWatchdogTimeout(this.config.getRedissonConfiguration().getLockWatchdogTimeout());\n if (this.config.getRedissonConfiguration().isClusterEnabled()) {\n for (String addr : this.config.getRedissonConfiguration().getNodeAddresses()) {\n redissonConfig.useClusterServers().addNodeAddress(addr);\n }\n } else {\n redissonConfig.useSingleServer().setAddress(this.config.getRedissonConfiguration().getSingleServerAddress());\n }\n\n logger.info(\"Try to get the lock for marathon matches job\");\n redisson = Redisson.create(redissonConfig);\n lock = redisson.getLock(config.getRedissonConfiguration().getMarathonMatchesJobLockerKeyName());\n if (lock.tryLock()) {\n logger.info(\"Get the lock for marathon matches job successfully\");\n try {\n RMapCache<String, String> mapCache = redisson.getMapCache(config.getRedissonConfiguration().getMarathonMatchesJobLastRunTimestampPrefix());\n String timestamp = mapCache.get(config.getRedissonConfiguration().getMarathonMatchesJobLastRunTimestampPrefix());\n\n Date lastRunTimestamp = new Date(INITIAL_TIMESTAMP);\n if (timestamp != null) {\n lastRunTimestamp = DATE_FORMAT.parse(timestamp);\n }\n\n logger.info(\"The last run timestamp for marathon matches job is:\" + lastRunTimestamp);\n\n Date currentTimestamp = this.manager.getTimestamp();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentTimestamp);\n calendar.add(Calendar.DAY_OF_MONTH, this.config.getRedissonConfiguration().getMarathonMatchesDaysToSubtract());\n Date dateParam = calendar.getTime();\n\n logger.info(\"The initial timestamp for marathon matches job is:\" + dateParam);\n\n List<TCID> totalIds = this.manager.getMatchesWithRegistrationPhaseStartedIds(new java.sql.Date(dateParam.getTime()), lastRunTimestamp.getTime());\n\n List<Long> ids = new ArrayList<>();\n for (int i = 0; i < totalIds.size(); ++i) {\n ids.add(Long.parseLong(totalIds.get(i).getId()));\n }\n\n logger.info(\"The count of the MM ids to load:\" + ids.size());\n logger.info(\"The MM ids to load:\" + ids);\n\n int batchSize = this.config.getRedissonConfiguration().getBatchUpdateSize();\n int to = 0;\n int from = 0;\n while (to < ids.size()) {\n to += (to + batchSize) > ids.size() ? (ids.size() - to) : batchSize;\n List<Long> sub = ids.subList(from, to);\n DataScienceFeederParam param = new DataScienceFeederParam();\n param.setIndex(this.config.getRedissonConfiguration().getMmIndex());\n param.setType(this.config.getRedissonConfiguration().getMmType());\n param.setRoundIds(sub);\n try {\n this.manager.pushMarathonMatchFeeder(param);\n } catch(Exception e) {\n e.printStackTrace();\n }\n from = to;\n }\n\n // mark last execution as current timestamp\n logger.info(\"update last run timestamp for challenges job is:\" + currentTimestamp);\n mapCache.put(config.getRedissonConfiguration().getMarathonMatchesJobLastRunTimestampPrefix(), DATE_FORMAT.format(currentTimestamp));\n } finally {\n logger.info(\"release the lock for marathon matches job\");\n lock.unlock();\n }\n } else {\n logger.warn(\"the previous job for marathon matches job is still running\");\n }\n } catch(Exception exp) {\n exp.printStackTrace();\n } finally {\n if (redisson != null) {\n redisson.shutdown();\n }\n }\n }", "void registerMaster(ZeroconfRosMasterInfo masterInfo);", "private void assignWorkerToIntermediateStage(DispatchablePlanMetadata dispatchablePlanMetadata,\n Set<String> tableNames, Map<String, String> options) {\n Set<ServerInstance> serverInstances = new HashSet<>();\n if (tableNames.size() == 0) {\n // This could be the case from queries that don't actually fetch values from the tables. In such cases the\n // routing need not be tenant aware.\n // Eg: SELECT 1 AS one FROM select_having_expression_test_test_having HAVING 1 > 2;\n serverInstances = _routingManager.getEnabledServerInstanceMap().values().stream().collect(Collectors.toSet());\n } else {\n serverInstances = fetchServersForIntermediateStage(tableNames);\n }\n assignServers(dispatchablePlanMetadata, serverInstances, dispatchablePlanMetadata.isRequiresSingletonInstance(),\n options);\n }", "public WorkerResource allocateQueryMaster(QueryInProgress queryInProgress);", "@Transactional\n public void bootstrapRepoVersionForHDP21() throws AmbariException, SQLException {\n final String hardcodedInitialVersion = \"2.1.0.0-0001\";\n AmbariManagementController amc = injector.getInstance(AmbariManagementController.class);\n AmbariMetaInfo ambariMetaInfo = amc.getAmbariMetaInfo();\n StackDAO stackDAO = injector.getInstance(StackDAO.class);\n RepositoryVersionHelper repositoryVersionHelper = injector.getInstance(RepositoryVersionHelper.class);\n RepositoryVersionDAO repositoryVersionDAO = injector.getInstance(RepositoryVersionDAO.class);\n ClusterVersionDAO clusterVersionDAO = injector.getInstance(ClusterVersionDAO.class);\n HostVersionDAO hostVersionDAO = injector.getInstance(HostVersionDAO.class);\n\n Clusters clusters = amc.getClusters();\n if (clusters == null) {\n LOG.error(\"Unable to get Clusters entity.\");\n return;\n }\n\n for (Cluster cluster : clusters.getClusters().values()) {\n ClusterEntity clusterEntity = clusterDAO.findByName(cluster.getClusterName());\n final StackId stackId = cluster.getCurrentStackVersion();\n LOG.info(MessageFormat.format(\"Analyzing cluster {0}, currently at stack {1} and version {2}\",\n cluster.getClusterName(), stackId.getStackName(), stackId.getStackVersion()));\n\n if (stackId.getStackName().equalsIgnoreCase(\"HDP\") && stackId.getStackVersion().equalsIgnoreCase(\"2.1\")) {\n final StackInfo stackInfo = ambariMetaInfo.getStack(stackId.getStackName(), stackId.getStackVersion());\n StackEntity stackEntity = stackDAO.find(stackId.getStackName(), stackId.getStackVersion());\n\n LOG.info(\"Bootstrapping the versions since using HDP-2.1\");\n\n // The actual value is not known, so use this.\n String displayName = stackId.getStackName() + \"-\" + hardcodedInitialVersion;\n\n // However, the Repo URLs should be correct.\n String operatingSystems = repositoryVersionHelper.serializeOperatingSystems(stackInfo.getRepositories());\n\n // Create the Repo Version if it doesn't already exist.\n RepositoryVersionEntity repoVersionEntity = repositoryVersionDAO.findByDisplayName(displayName);\n if (null != repoVersionEntity) {\n LOG.info(MessageFormat.format(\"A Repo Version already exists with Display Name: {0}\", displayName));\n } else {\n final long repoVersionIdSeq = repositoryVersionDAO.findMaxId(\"id\");\n // Safe to attempt to add the sequence if it doesn't exist already.\n addSequence(\"repo_version_id_seq\", repoVersionIdSeq, false);\n\n repoVersionEntity = repositoryVersionDAO.create(\n stackEntity, hardcodedInitialVersion, displayName, operatingSystems);\n LOG.info(MessageFormat.format(\"Created Repo Version with ID: {0,number,#}\\n, Display Name: {1}, Repo URLs: {2}\\n\",\n repoVersionEntity.getId(), displayName, operatingSystems));\n }\n\n // Create the Cluster Version if it doesn't already exist.\n ClusterVersionEntity clusterVersionEntity = clusterVersionDAO.findByClusterAndStackAndVersion(cluster.getClusterName(),\n stackId, hardcodedInitialVersion);\n\n if (null != clusterVersionEntity) {\n LOG.info(MessageFormat.format(\"A Cluster Version version for cluster: {0}, version: {1}, already exists; its state is {2}.\",\n cluster.getClusterName(), clusterVersionEntity.getRepositoryVersion().getVersion(), clusterVersionEntity.getState()));\n\n // If there are not CURRENT cluster versions, make this one the CURRENT one.\n if (clusterVersionEntity.getState() != RepositoryVersionState.CURRENT &&\n clusterVersionDAO.findByClusterAndState(cluster.getClusterName(), RepositoryVersionState.CURRENT).isEmpty()) {\n clusterVersionEntity.setState(RepositoryVersionState.CURRENT);\n clusterVersionDAO.merge(clusterVersionEntity);\n }\n } else {\n final long clusterVersionIdSeq = clusterVersionDAO.findMaxId(\"id\");\n // Safe to attempt to add the sequence if it doesn't exist already.\n addSequence(\"cluster_version_id_seq\", clusterVersionIdSeq, false);\n\n clusterVersionEntity = clusterVersionDAO.create(clusterEntity, repoVersionEntity, RepositoryVersionState.CURRENT,\n System.currentTimeMillis(), System.currentTimeMillis(), \"admin\");\n LOG.info(MessageFormat.format(\"Created Cluster Version with ID: {0,number,#}, cluster: {1}, version: {2}, state: {3}.\",\n clusterVersionEntity.getId(), cluster.getClusterName(), clusterVersionEntity.getRepositoryVersion().getVersion(),\n clusterVersionEntity.getState()));\n }\n\n // Create the Host Versions if they don't already exist.\n Collection<HostEntity> hosts = clusterEntity.getHostEntities();\n boolean addedAtLeastOneHost = false;\n if (null != hosts && !hosts.isEmpty()) {\n for (HostEntity hostEntity : hosts) {\n HostVersionEntity hostVersionEntity = hostVersionDAO.findByClusterStackVersionAndHost(cluster.getClusterName(),\n stackId, hardcodedInitialVersion, hostEntity.getHostName());\n\n if (null != hostVersionEntity) {\n LOG.info(MessageFormat.format(\"A Host Version version for cluster: {0}, version: {1}, host: {2}, already exists; its state is {3}.\",\n cluster.getClusterName(), hostVersionEntity.getRepositoryVersion().getVersion(),\n hostEntity.getHostName(), hostVersionEntity.getState()));\n\n if (hostVersionEntity.getState() != RepositoryVersionState.CURRENT &&\n hostVersionDAO.findByClusterHostAndState(cluster.getClusterName(), hostEntity.getHostName(),\n RepositoryVersionState.CURRENT).isEmpty()) {\n hostVersionEntity.setState(RepositoryVersionState.CURRENT);\n hostVersionDAO.merge(hostVersionEntity);\n }\n } else {\n // This should only be done the first time.\n if (!addedAtLeastOneHost) {\n final long hostVersionIdSeq = hostVersionDAO.findMaxId(\"id\");\n // Safe to attempt to add the sequence if it doesn't exist already.\n addSequence(\"host_version_id_seq\", hostVersionIdSeq, false);\n addedAtLeastOneHost = true;\n }\n\n hostVersionEntity = new HostVersionEntity(hostEntity, repoVersionEntity, RepositoryVersionState.CURRENT);\n hostVersionDAO.create(hostVersionEntity);\n LOG.info(MessageFormat.format(\"Created Host Version with ID: {0,number,#}, cluster: {1}, version: {2}, host: {3}, state: {4}.\",\n hostVersionEntity.getId(), cluster.getClusterName(), hostVersionEntity.getRepositoryVersion().getVersion(),\n hostEntity.getHostName(), hostVersionEntity.getState()));\n }\n }\n } else {\n LOG.info(MessageFormat.format(\"Not inserting any Host Version records since cluster {0} does not have any hosts.\",\n cluster.getClusterName()));\n }\n }\n }\n }", "private boolean startJob () throws Exception\n {\n String finalUrl =\n properties.getProperty(\"jenkins.location\")\n + \"job/start-sim-server/buildWithParameters?\"\n + \"tourneyUrl=\" + properties.getProperty(\"tourneyUrl\")\n + \"&pomId=\" + game.getRound().getPomId()\n + \"&gameId=\" + game.getGameId()\n + \"&machine=\" + game.getMachine().getMachineName()\n + \"&brokers=\" + brokers\n + \"&serverQueue=\" + game.getServerQueue();\n\n log.info(\"Final url: \" + finalUrl);\n\n try {\n JenkinsConnector.sendJob(finalUrl, true);\n\n log.info(\"Jenkins request to start sim game: \" + game.getGameId());\n game.setStateGamePending();\n game.setReadyTime(Utils.offsetDate());\n log.debug(String.format(\"Update game: %s to %s\", game.getGameId(),\n Game.getStateGamePending()));\n\n return true;\n } catch (Exception e) {\n log.error(\"Jenkins failure to start sim game: \" + game.getGameId());\n game.setStateGameFailed();\n throw e;\n }\n }", "public void run() {\n boolean quiesceRequested = false;\n // A sleeper that sleeps for msgInterval.\n Sleeper sleeper = new Sleeper(this.msgInterval, this.stopRequested);\n try {\n init(reportForDuty(sleeper));\n long lastMsg = 0;\n // Now ask master what it wants us to do and tell it what we have done\n for (int tries = 0; !stopRequested.get() && isHealthy();) {\n long now = System.currentTimeMillis();\n if (lastMsg != 0 && (now - lastMsg) >= serverLeaseTimeout) {\n // It has been way too long since we last reported to the master.\n LOG.warn(\"unable to report to master for \" + (now - lastMsg) +\n \" milliseconds - retrying\");\n }\n if ((now - lastMsg) >= msgInterval) {\n HMsg outboundArray[] = null;\n synchronized(this.outboundMsgs) {\n outboundArray =\n this.outboundMsgs.toArray(new HMsg[outboundMsgs.size()]);\n this.outboundMsgs.clear();\n }\n try {\n doMetrics();\n this.serverInfo.setLoad(new HServerLoad(requestCount.get(),\n onlineRegions.size(), this.metrics.storefiles.get(),\n this.metrics.memcacheSizeMB.get()));\n this.requestCount.set(0);\n HMsg msgs[] = hbaseMaster.regionServerReport(\n serverInfo, outboundArray, getMostLoadedRegions());\n lastMsg = System.currentTimeMillis();\n if (this.quiesced.get() && onlineRegions.size() == 0) {\n // We've just told the master we're exiting because we aren't\n // serving any regions. So set the stop bit and exit.\n LOG.info(\"Server quiesced and not serving any regions. \" +\n \"Starting shutdown\");\n stopRequested.set(true);\n this.outboundMsgs.clear();\n continue;\n }\n \n // Queue up the HMaster's instruction stream for processing\n boolean restart = false;\n for(int i = 0;\n !restart && !stopRequested.get() && i < msgs.length;\n i++) {\n LOG.info(msgs[i].toString());\n switch(msgs[i].getType()) {\n case MSG_CALL_SERVER_STARTUP:\n // We the MSG_CALL_SERVER_STARTUP on startup but we can also\n // get it when the master is panicing because for instance\n // the HDFS has been yanked out from under it. Be wary of\n // this message.\n if (checkFileSystem()) {\n closeAllRegions();\n try {\n log.closeAndDelete();\n } catch (Exception e) {\n LOG.error(\"error closing and deleting HLog\", e);\n }\n try {\n serverInfo.setStartCode(System.currentTimeMillis());\n log = setupHLog();\n this.logFlusher.setHLog(log);\n } catch (IOException e) {\n this.abortRequested = true;\n this.stopRequested.set(true);\n e = RemoteExceptionHandler.checkIOException(e); \n LOG.fatal(\"error restarting server\", e);\n break;\n }\n reportForDuty(sleeper);\n restart = true;\n } else {\n LOG.fatal(\"file system available check failed. \" +\n \"Shutting down server.\");\n }\n break;\n \n case MSG_REGIONSERVER_STOP:\n stopRequested.set(true);\n break;\n \n case MSG_REGIONSERVER_QUIESCE:\n if (!quiesceRequested) {\n try {\n toDo.put(new ToDoEntry(msgs[i]));\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Putting into msgQueue was \" +\n \"interrupted.\", e);\n }\n quiesceRequested = true;\n }\n break;\n \n default:\n if (fsOk) {\n try {\n toDo.put(new ToDoEntry(msgs[i]));\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Putting into msgQueue was \" +\n \"interrupted.\", e);\n }\n }\n }\n }\n // Reset tries count if we had a successful transaction.\n tries = 0;\n \n if (restart || this.stopRequested.get()) {\n toDo.clear();\n continue;\n }\n } catch (Exception e) {\n if (e instanceof IOException) {\n e = RemoteExceptionHandler.checkIOException((IOException) e);\n }\n if (tries < this.numRetries) {\n LOG.warn(\"Processing message (Retry: \" + tries + \")\", e);\n tries++;\n } else {\n LOG.error(\"Exceeded max retries: \" + this.numRetries, e);\n checkFileSystem();\n }\n if (this.stopRequested.get()) {\n \tLOG.info(\"Stop was requested, clearing the toDo \" +\n \t\t\t\"despite of the exception\");\n toDo.clear();\n continue;\n }\n }\n }\n // Do some housekeeping before going to sleep\n housekeeping();\n sleeper.sleep(lastMsg);\n } // for\n } catch (OutOfMemoryError error) {\n abort();\n LOG.fatal(\"Ran out of memory\", error);\n } catch (Throwable t) {\n LOG.fatal(\"Unhandled exception. Aborting...\", t);\n abort();\n }\n RegionHistorian.getInstance().offline();\n this.leases.closeAfterLeasesExpire();\n this.worker.stop();\n this.server.stop();\n if (this.infoServer != null) {\n LOG.info(\"Stopping infoServer\");\n try {\n this.infoServer.stop();\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n }\n \n // Send interrupts to wake up threads if sleeping so they notice shutdown.\n // TODO: Should we check they are alive? If OOME could have exited already\n cacheFlusher.interruptIfNecessary();\n logFlusher.interrupt();\n compactSplitThread.interruptIfNecessary();\n logRoller.interruptIfNecessary();\n \n if (abortRequested) {\n if (this.fsOk) {\n // Only try to clean up if the file system is available\n try {\n if (this.log != null) {\n this.log.close();\n LOG.info(\"On abort, closed hlog\");\n }\n } catch (IOException e) {\n LOG.error(\"Unable to close log in abort\",\n RemoteExceptionHandler.checkIOException(e));\n }\n closeAllRegions(); // Don't leave any open file handles\n }\n LOG.info(\"aborting server at: \" +\n serverInfo.getServerAddress().toString());\n } else {\n ArrayList<HRegion> closedRegions = closeAllRegions();\n try {\n log.closeAndDelete();\n } catch (IOException e) {\n LOG.error(\"Close and delete failed\",\n RemoteExceptionHandler.checkIOException(e));\n }\n try {\n HMsg[] exitMsg = new HMsg[closedRegions.size() + 1];\n exitMsg[0] = HMsg.REPORT_EXITING;\n // Tell the master what regions we are/were serving\n int i = 1;\n for (HRegion region: closedRegions) {\n exitMsg[i++] = new HMsg(HMsg.Type.MSG_REPORT_CLOSE,\n region.getRegionInfo());\n }\n \n LOG.info(\"telling master that region server is shutting down at: \" +\n serverInfo.getServerAddress().toString());\n hbaseMaster.regionServerReport(serverInfo, exitMsg, (HRegionInfo[])null);\n } catch (IOException e) {\n LOG.warn(\"Failed to send exiting message to master: \",\n RemoteExceptionHandler.checkIOException(e));\n }\n LOG.info(\"stopping server at: \" +\n serverInfo.getServerAddress().toString());\n }\n if (this.hbaseMaster != null) {\n HbaseRPC.stopProxy(this.hbaseMaster);\n this.hbaseMaster = null;\n }\n join();\n LOG.info(Thread.currentThread().getName() + \" exiting\");\n }", "public boolean pointAtMaster() {\n return pointAt(RefNames.fullName(\"master\"));\n }", "@Override\r\n\tpublic void join() {\n\r\n\t}", "public void enableKillSwitch(){\n isClimbing = false;\n isClimbingArmDown = false;\n Robot.isKillSwitchEnabled = true;\n }", "public void run() {\n while (true) {\n try {\n // Poll server for snapshots and update client\n GameSnapshot snapshot = this.server.getSnapshot();\n client.updateDisplay(snapshot);\n Thread.sleep(250);\n } catch (InterruptedException e) {\n return;\n } catch (RemoteException e) {\n // Find a new master if current master is down\n GameServer newMaster = this.client.findNewMaster();\n if (newMaster != null)\n this.server = newMaster;\n else\n return;\n } catch (NotMasterException e) {\n // Find new master; if it can't, update its master manually\n GameServer newMaster = this.client.findNewMaster();\n if (newMaster != null)\n this.server = newMaster;\n else\n return;\n }\n }\n }", "public static void waitForMasterDone() {\r\n try {\r\n master_done_semaphore.acquire();\r\n } catch (InterruptedException e) {\r\n }\r\n }", "ActorRef startHCD() {\n Component.HcdInfo testInfo = JComponent.hcdInfo(\n TromboneHCD.componentName,\n TromboneHCD.trombonePrefix,\n TromboneHCD.componentClassName,\n DoNotRegister, Collections.singleton(AkkaType), FiniteDuration.apply(1, TimeUnit.SECONDS)\n );\n\n return Supervisor.apply(testInfo);\n }", "public boolean canRespawnHere()\n {\n return false;\n }", "@Override\n public String getName() {\n return \"sspawn:spawn\";\n }", "@Override\n\tpublic MasterInterface getMaster() {\n\t\treturn masterAction;\n\t}", "public void callMaster(String addrutil, String portutil);", "public Serializable takeMasterRole(String serviceName, ClusterNode remoteNode) {\n\n\t\tSerializable data = null;\n\t\t\n\t\tsynchronized (services) {\n\n\t\t\tClusterServiceHandler csWrapper = services.get(serviceName);\n\t\t\tif (csWrapper != null) {\n\t\t\t\t\n\t\t\t\tIRemoteService masterService = null;\n\t\t\t\tIClusterService service = csWrapper.getClusterService();\n\t\t\t\tif (service.isMaster()) {\n\t\t\t\t\tdata = service.surrenderMasterRole();\n\t\t\t\t\t\n\t\t\t\t\tboolean found = false;\n\t\t\t\t\tList<IRemoteService> remoteServices = csWrapper.getRemoteServices();\n\t\t\t\t\tfor (IRemoteService rservice : remoteServices) {\n\t\t\t\t\t\tRemoteService rsd = (RemoteService)rservice;\n\t\t\t\t\t\tif (rsd.getNode().sameNode(remoteNode)) {\n\t\t\t\t\t\t\trsd.setServiceStatus(ClusterServiceStatus.ACTIVE_MASTER);\n\t\t\t\t\t\t\tmasterService = rsd;\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!found) {\n\t\t\t\t\t\t// this is a new node, add it to the list\n\t\t\t\t\t\tRemoteService rs = new RemoteService(remoteNode, serviceName, ClusterServiceStatus.ACTIVE_MASTER);\n\t\t\t\t\t\tremoteServices.add(rs);\n\t\t\t\t\t\tmasterService = rs;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcsWrapper.setMasterService(masterService);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn data;\n\t}", "void allocateDeamonWorker(Work work);", "boolean isFirstJoinKit();", "@SuppressWarnings(\"deprecation\")\n private void doTestMasterFailover(MasterFailureType failureType) throws Exception {\n final String TABLE_NAME = TestClientFailoverSupport.class.getName() + \"-\" + failureType;\n client.createTable(TABLE_NAME, basicSchema, getBasicCreateTableOptions());\n\n KuduTable table = client.openTable(TABLE_NAME);\n KuduSession session = client.newSession();\n\n final int TOTAL_ROWS_TO_INSERT = 10;\n\n for (int i = 0; i < TOTAL_ROWS_TO_INSERT; i++) {\n session.apply(createBasicSchemaInsert(table, i));\n }\n\n waitUntilRowCount(table, TOTAL_ROWS_TO_INSERT, DEFAULT_SLEEP);\n\n // Kill or restart the leader master.\n switch (failureType) {\n case KILL:\n harness.killLeaderMasterServer();\n break;\n case RESTART:\n harness.restartLeaderMaster();\n break;\n default:\n throw new IllegalArgumentException(\"Unexpected failure type: \" + failureType);\n }\n\n // Kill the tablet server leader. This will force us to go back to the\n // master to find the new location. At that point, the client will\n // notice that the old leader master is no longer current and fail over\n // to the new one.\n List<LocatedTablet> tablets = table.getTabletsLocations(DEFAULT_SLEEP);\n assertEquals(1, tablets.size());\n harness.killTabletLeader(tablets.get(0));\n\n // Insert some more rows.\n for (int i = TOTAL_ROWS_TO_INSERT; i < 2 * TOTAL_ROWS_TO_INSERT; i++) {\n session.apply(createBasicSchemaInsert(table, i));\n }\n waitUntilRowCount(table, 2 * TOTAL_ROWS_TO_INSERT, DEFAULT_SLEEP);\n client.deleteTable(TABLE_NAME);\n assertFalse(client.tableExists(TABLE_NAME));\n }", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "void joinJob(long jobId, long joinJobId);", "private void waitForBootstrappedNodeToBeReady(OzoneManager newOM,\n long leaderSnapshotIndex) throws Exception {\n // Wait for bootstrapped nodes to catch up with others\n GenericTestUtils.waitFor(() -> {\n try {\n if (newOM.getRatisSnapshotIndex() >= leaderSnapshotIndex) {\n return true;\n }\n } catch (IOException e) {\n return false;\n }\n return false;\n }, 1000, waitForClusterToBeReadyTimeout);\n }", "List<ZeroconfRosMasterInfo> getKnownMasters();", "private void launchRemote(Stage stage) throws Exception { \n\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\"); \n\t\t\n\t\t// thread of the server connecting to the game and of the game \n\t\tThread serverThread = new Thread(() -> { \n\t\t\tRemotePlayerServer server = new RemotePlayerServer(new GraphicalPlayerAdapter()); \n\t\t\tserver.run(); \n\t\t }); \n\t\tserverThread.setDaemon(true); \n\t\tserverThread.start(); \n\t }", "protected void createMasterInfoUpdateTask(\n Universe universe, @Nullable NodeDetails addedMasterNode, @Nullable NodeDetails stoppedNode) {\n Set<NodeDetails> tserverNodes = new HashSet<>(universe.getTServers());\n Set<NodeDetails> masterNodes = new HashSet<>(universe.getMasters());\n\n if (addedMasterNode != null) {\n // Include this newly added master node which may not yet have isMaster set to true.\n // New tservers are started later after AnsbibleConfigure to update\n // the master addresses and isTserver can be false.\n masterNodes.add(addedMasterNode);\n }\n\n // Remove the stopped node from the update.\n if (stoppedNode != null) {\n tserverNodes.remove(stoppedNode);\n masterNodes.remove(stoppedNode);\n }\n\n // Configure all tservers to update the masters list as well.\n createConfigureServerTasks(tserverNodes, params -> params.updateMasterAddrsOnly = true)\n .setSubTaskGroupType(SubTaskGroupType.ConfigureUniverse);\n\n // Change the master addresses in the conf file for the all masters to reflect\n // the changes.\n createConfigureServerTasks(\n masterNodes,\n params -> {\n params.updateMasterAddrsOnly = true;\n params.isMaster = true;\n })\n .setSubTaskGroupType(SubTaskGroupType.ConfigureUniverse);\n\n // Update the master addresses in memory.\n createSetFlagInMemoryTasks(\n tserverNodes,\n ServerType.TSERVER,\n true /* force flag update */,\n null /* no gflag to update */,\n true /* updateMasterAddr */)\n .setSubTaskGroupType(SubTaskGroupType.UpdatingGFlags);\n\n createSetFlagInMemoryTasks(\n masterNodes,\n ServerType.MASTER,\n true /* force flag update */,\n null /* no gflag to update */,\n true /* updateMasterAddr */)\n .setSubTaskGroupType(SubTaskGroupType.UpdatingGFlags);\n\n // Update the master addresses on the target universes whose source universe belongs to\n // this task.\n createXClusterConfigUpdateMasterAddressesTask();\n }", "public void joinGame(int lobbyId)\n {\n //call Client controller's joinLobby method with the selected lobby's\n //id\n clientController.joinGame(lobbyId);\n }", "@Override\n public boolean build(Match m, ClientHandler ch, Server server) {\n int wID=2;\n Player p = m.getPlayer(ch.getName());\n if(p.getWorker(0).getMoved()) wID = 0;\n if(p.getWorker(1).getMoved()) wID = 1;\n ArrayList<Coordinate> coordinates = whereCanBuild(m, ch, wID);\n server.write(ch, \"serviceMessage\", \"MSGE-Build: \\n\");\n if(coordinates.size()!=0){\n Coordinate c = null;\n server.write(ch, \"serviceMessage\", \"LIST-\"+printCoordinates(coordinates));\n server.write(ch, \"interactionServer\", \"TURN-Where you want to build?\\n\");\n int id;\n while(true){\n try{\n String msg = server.read(ch);\n if(msg == null){\n for(ClientHandler chl : server.getClientHandlers()){\n server.write(chl, \"serviceMessage\", \"WINM-Player disconnected\\n\");\n }\n ch.resetConnected();\n ch.closeConnection();\n return false;\n }else{\n id = Integer.parseInt(msg);\n }\n if(id<0 || id>=coordinates.size()){\n server.write(ch, \"serviceMessage\", \"MSGE-Invalid input\\n\");\n server.write(ch, \"interactionServer\", \"TURN-Try another index: \");\n continue;\n }\n break;\n } catch (NumberFormatException e){\n server.write(ch, \"serviceMessage\", \"MSGE-Invalid input\\n\");\n server.write(ch, \"interactionServer\", \"TURN-Try another index: \");\n }\n }\n c = coordinates.get(id);\n if(c.equals(p.getWorker(wID).getPosition()))\n server.write(ch, \"serviceMessage\", \"MSGE-You're using Zeus Power!\\n\");\n m.updateBuilding(c);\n m.getBoard()[c.getX()][c.getY()].setLevelledUp(true);\n p.getWorker(wID).changeBuilt(true);\n return true;\n }else{\n return false;\n }\n\n }", "public boolean canRespawnHere() {\n\t\treturn false;\n\t}", "public void join(String host, int port);", "@Override\n\tpublic void run() {\n \tTopologyKiller killer = new TopologyKiller();\n \tkiller.start();\n\t\t\n \t// create the joiner bolt\n\t\tBoltDeclarer declarer = builder.setBolt(\"join\", new JoinerBolt(), joinerParallelism);\n\t\t\n\t\t// connect all the spouts to the joiner bolt using fieldGrouping\n\t\tfor (String spout: spouts)\n\t\t\tdeclarer = declarer.fieldsGrouping(spout, new Fields(\"key\"));\n\t\t\n\t\t// create the output bolt with globalGrouping\n\t\tbuilder.setBolt(\"output\", new ZmqBolt(spouts.size(), replySocketString, killerSocketString), 1)\n\t\t\t.globalGrouping(\"join\");\n\t\t\n\t\tConfig conf = new Config();\n\t conf.setNumWorkers(numWorkers);\n\t conf.put(Config.STORM_LOCAL_MODE_ZMQ, false);\n\t conf.put(Config.TOPOLOGY_MAX_SPOUT_PENDING, 100);\n\t conf.put(Config.TOPOLOGY_MAX_TASK_PARALLELISM, 20);\n\t \n\t try {\n\t \tlogger.info(\"Starting topology\");\n\t cluster.submitTopology(topologyName, conf, builder.createTopology());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tkill();\n\t\t}\n\t}", "protected boolean upgradeCluster() throws Throwable {\n \n // need to ping hcdev from master before and after\n if (!pingFromMaster(hostname))\n return false;\n \n String minorVersion = null;\n String currentVersion = null;\n String s = null;\n Log.INFO(\"Getting Minor Version...\");\n runSystemCommand(MINOR_VERSION_COMMAND);\n while ((s = stdout.readLine()) != null) {\n minorVersion = s.trim();\n Log.INFO(s);\n }\n Log.INFO(\"Getting Major Version...\");\n runSystemCommand(\n PRE_VERSION_COMMAND + minorVersion + POST_VERSION_COMMAND);\n while ((s = stdout.readLine()) != null) {\n currentVersion = s.trim();\n Log.INFO(\"Current Version: \" + currentVersion);\n }\n String url =\n \"http://\" + UPGRADE_DOMAIN + \"/~hcbuild/repository/releases/1.1/\"\n + currentVersion + \"/AUTOBUILT/pkgdir/st5800_\"\n + currentVersion + \".iso\";\n Log.INFO(\"Validating URL...\");\n runSystemCommand(\"wget -O - -q \" + url + \" 2>&1 >> /dev/null\");\n while ((s = stdout.readLine()) != null)\n Log.INFO(s);\n\n if (currentVersion != null) {\n stdout = cli.runCommand(\n \t\t\"upgrade -c \" + masterCell + \" -F download \" + url);\n String line;\n while ((line = stdout.readLine()) != null) {\n if (line.contains(\"bytes successfully\")) {\n Log.INFO(\" ---> \" + line);\n return pingFromMaster(hostname);\n }\n }\n Log.ERROR(\"Problem with upgrade detected... failing test\");\n }\n return false;\n }", "public void agentJoined(String hostName) {\n\n\t\tAgentInformation agentInformation = ControlCenter.getAgentInformation(hostName);\n\t\ttry {\n\t\t\tif (agentInformation != null) {\n\n\t\t\t\t// Lookup for the agent in RMI registry\n\t\t\t\tagentInformation.findAgent();\n\t\t\t\tagentInformation.setAgentStatus(MachineStatus.JOINED);\n\n\t\t\t\tint count = 0;\n\t\t\t\tfor (String host : GodsProperties.getHosts()) {\n\t\t\t\t\tif (ControlCenter.getAgentInformation(host)\n\t\t\t\t\t\t\t.getAgentStatus() == MachineStatus.JOINED) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (count == GodsProperties.getNumberOfHosts()) {\n\t\t\t\t\tprepareAgents();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Host \" + hostName\n\t\t\t\t\t\t+ \" not known to GODS Control Center.\"\n\t\t\t\t\t\t+ \"Check model.machines file in gods.net.model.dir\");\n\t\t\t}\n\t\t} catch (MalformedURLException mle) {\n\t\t\tlog.error(\"Unable to find agent on host: \"\n\t\t\t\t\t+ agentInformation.getAgentName() + \" \" + mle.getMessage());\n\n\t\t} catch (RemoteException re) {\n\t\t\tlog.error(\"Unable to find agent: \"\n\t\t\t\t\t+ agentInformation.getAgentName() + \" \" + re.getMessage());\n\n\t\t} catch (NotBoundException nbe) {\n\t\t\tlog.error(\"Unable to find agent:\" + agentInformation.getAgentName()\n\t\t\t\t\t+ \" \" + nbe.getMessage());\n\t\t}\n\t}", "private DBMaster() {\r\n\t\t//The current address is localhost - needs to be changed at a later date\r\n\t\t_db = new GraphDatabaseFactory().newEmbeddedDatabase(\"\\\\etc\\\\neo4j\\\\default.graphdb\");\r\n\t\tregisterShutdownHook();\r\n\t}", "public void actionPerformed(ActionEvent e) {\n try {\n int r = JOptionPane.showConfirmDialog(dialog,\n Messages.WindowsSlaveInstaller_ConfirmInstallation(),\n Messages.WindowsInstallerLink_DisplayName(), OK_CANCEL_OPTION);\n if(r!=JOptionPane.OK_OPTION) return;\n\n if(!DotNet.isInstalled(2,0)) {\n JOptionPane.showMessageDialog(dialog,Messages.WindowsSlaveInstaller_DotNetRequired(),\n Messages.WindowsInstallerLink_DisplayName(), ERROR_MESSAGE);\n return;\n }\n\n final File dir = new File(rootDir);\n if (!dir.exists()) {\n JOptionPane.showMessageDialog(dialog,Messages.WindowsSlaveInstaller_RootFsDoesntExist(rootDir),\n Messages.WindowsInstallerLink_DisplayName(), ERROR_MESSAGE);\n return;\n }\n\n final File slaveExe = new File(dir, \"hudson-slave.exe\");\n FileUtils.copyURLToFile(getClass().getResource(\"/windows-service/hudson.exe\"), slaveExe);\n\n // write out the descriptor\n URL jnlp = new URL(engine.getHudsonUrl(),\"computer/\"+Util.rawEncode(engine.slaveName)+\"/slave-agent.jnlp\");\n String xml = generateSlaveXml(\n generateServiceId(rootDir),\n System.getProperty(\"java.home\")+\"\\\\bin\\\\java.exe\", \"-jnlpUrl \"+jnlp.toExternalForm());\n FileUtils.writeStringToFile(new File(dir, \"hudson-slave.xml\"),xml,\"UTF-8\");\n\n // copy slave.jar\n URL slaveJar = new URL(engine.getHudsonUrl(),\"jnlpJars/remoting.jar\");\n File dstSlaveJar = new File(dir,\"slave.jar\").getCanonicalFile();\n if(!dstSlaveJar.exists()) // perhaps slave.jar is already there?\n FileUtils.copyURLToFile(slaveJar,dstSlaveJar);\n\n // install as a service\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n StreamTaskListener task = new StreamTaskListener(baos);\n r = new LocalLauncher(task).launch().cmds(slaveExe, \"install\").stdout(task).pwd(dir).join();\n if(r!=0) {\n JOptionPane.showMessageDialog(\n dialog,baos.toString(),\"Error\", ERROR_MESSAGE);\n return;\n }\n\n r = JOptionPane.showConfirmDialog(dialog,\n Messages.WindowsSlaveInstaller_InstallationSuccessful(),\n Messages.WindowsInstallerLink_DisplayName(), OK_CANCEL_OPTION);\n if(r!=JOptionPane.OK_OPTION) return;\n\n // let the service start after we close our connection, to avoid conflicts\n Runtime.getRuntime().addShutdownHook(new Thread(\"service starter\") {\n public void run() {\n try {\n StreamTaskListener task = StreamTaskListener.fromStdout();\n int r = new LocalLauncher(task).launch().cmds(slaveExe, \"start\").stdout(task).pwd(dir).join();\n task.getLogger().println(r==0?\"Successfully started\":\"start service failed. Exit code=\"+r);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n });\n System.exit(0);\n } catch (Exception t) {// this runs as a JNLP app, so if we let an exeption go, we'll never find out why it failed \n StringWriter sw = new StringWriter();\n t.printStackTrace(new PrintWriter(sw));\n JOptionPane.showMessageDialog(dialog,sw.toString(),\"Error\", ERROR_MESSAGE);\n }\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo getGkeMaster() {\n if (gkeMasterBuilder_ == null) {\n if (stepInfoCase_ == 18) {\n return (com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 18) {\n return gkeMasterBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.getDefaultInstance();\n }\n }", "private void joinElection(CoreDescriptor cd, boolean afterExpiration, boolean joinAtHead)\n throws InterruptedException, KeeperException, IOException {\n String collection = cd.getCloudDescriptor().getCollectionName();\n final String coreNodeName = cd.getCloudDescriptor().getCoreNodeName();\n\n ContextKey contextKey = new ContextKey(collection, coreNodeName);\n\n ElectionContext prevContext = electionContexts.get(contextKey);\n\n if (prevContext != null) {\n prevContext.cancelElection();\n }\n\n String shardId = cd.getCloudDescriptor().getShardId();\n\n Map<String, Object> props = new HashMap<>();\n // we only put a subset of props into the leader node\n props.put(ZkStateReader.CORE_NAME_PROP, cd.getName());\n props.put(ZkStateReader.NODE_NAME_PROP, getNodeName());\n props.put(ZkStateReader.BASE_URL_PROP, zkStateReader.getBaseUrlForNodeName(getNodeName()));\n props.put(ZkStateReader.CORE_NODE_NAME_PROP, coreNodeName);\n\n ZkNodeProps ourProps = new ZkNodeProps(props);\n\n LeaderElector leaderElector = new LeaderElector(zkClient, contextKey, electionContexts);\n ElectionContext context =\n new ShardLeaderElectionContext(\n leaderElector, shardId, collection, coreNodeName, ourProps, this, cc);\n\n leaderElector.setup(context);\n electionContexts.put(contextKey, context);\n leaderElector.joinElection(context, false, joinAtHead);\n }" ]
[ "0.62951636", "0.56516486", "0.56293255", "0.5392698", "0.5374912", "0.5326658", "0.5306477", "0.5137044", "0.50727737", "0.5026405", "0.49920276", "0.49854758", "0.49854404", "0.4980916", "0.49646473", "0.49528047", "0.4948262", "0.4946761", "0.49397966", "0.49361628", "0.4908926", "0.48980638", "0.4896853", "0.48813155", "0.48726594", "0.48279905", "0.4817723", "0.4813424", "0.4809336", "0.4807167", "0.48016143", "0.47784984", "0.47604683", "0.4758315", "0.47291586", "0.4728843", "0.46920183", "0.4685463", "0.46731097", "0.46660477", "0.46645314", "0.4653016", "0.4649598", "0.4638926", "0.4614181", "0.46082458", "0.4602062", "0.4562409", "0.45590937", "0.4554015", "0.455007", "0.45453563", "0.45407262", "0.45378685", "0.4534319", "0.45259804", "0.4521976", "0.45028982", "0.44889426", "0.44888783", "0.44747043", "0.44725674", "0.446998", "0.44686824", "0.44565418", "0.44564003", "0.4455044", "0.4445879", "0.44388214", "0.4430325", "0.44235867", "0.4420477", "0.44189733", "0.44112492", "0.44107372", "0.4405815", "0.4396629", "0.43943733", "0.43927842", "0.43890193", "0.43840805", "0.43490067", "0.43482825", "0.432655", "0.43183392", "0.43151727", "0.43064716", "0.43053958", "0.42928836", "0.42926607", "0.42908546", "0.42818543", "0.42718008", "0.42695552", "0.4268745", "0.42573783", "0.4249865", "0.42456958", "0.42453846", "0.42444813" ]
0.67033684
0
Discovers Hudson running nearby. To give every nearby Hudson a fair chance, wait for some time until we hear all the responses.
protected List<DatagramPacket> discover() throws IOException, InterruptedException, RetryException { sendBroadcast(); List<DatagramPacket> responses = new ArrayList<DatagramPacket>(); // wait for 5 secs to gather up all the replies long limit = System.currentTimeMillis() + 5 * 1000; while (true) { try { socket.setSoTimeout(Math.max(1, (int) (limit - System.currentTimeMillis()))); DatagramPacket recv = new DatagramPacket(new byte[2048], 2048); socket.receive(recv); responses.add(recv); } catch (SocketTimeoutException e) { // timed out if (responses.isEmpty()) { if (master != null) throw new RetryException( "Failed to receive a reply from " + master); else throw new RetryException( "Failed to receive a reply to broadcast."); } return responses; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() throws InterruptedException {\n\tSystem.out.println(\"Discovering Hudson master\");\n\n\t// wait until we get the ACK back\n\twhile (true) {\n\t try {\n\t\tList<Candidate> candidates = new ArrayList<Candidate>();\n\t\tfor (DatagramPacket recv : discover()) {\n\n\t\t String responseXml = new String(recv.getData(), 0,\n\t\t\t recv.getLength());\n\n\t\t Document xml;\n\t\t System.out.println();\n\n\t\t try {\n\t\t\txml = DocumentBuilderFactory\n\t\t\t\t.newInstance()\n\t\t\t\t.newDocumentBuilder()\n\t\t\t\t.parse(new ByteArrayInputStream(recv.getData(),\n\t\t\t\t\t0, recv.getLength()));\n\t\t } catch (SAXException e) {\n\t\t\tSystem.out.println(\"Invalid response XML from \"\n\t\t\t\t+ recv.getAddress() + \": \" + responseXml);\n\t\t\tcontinue;\n\t\t }\n\t\t String swarm = getChildElementString(\n\t\t\t xml.getDocumentElement(), \"swarm\");\n\t\t if (swarm == null) {\n\t\t\tSystem.out.println(recv.getAddress()\n\t\t\t\t+ \" doesn't support swarm\");\n\t\t\tcontinue;\n\t\t }\n\n\t\t String url = master == null ? getChildElementString(\n\t\t\t xml.getDocumentElement(), \"url\") : master;\n\t\t if (url == null) {\n\t\t\tSystem.out\n\t\t\t\t.println(recv.getAddress()\n\t\t\t\t\t+ \" doesn't have the configuration set yet. Please go to the sytem configuration page of this Hudson and submit it: \"\n\t\t\t\t\t+ responseXml);\n\t\t\tcontinue;\n\t\t }\n\t\t candidates.add(new Candidate(url, swarm));\n\t\t}\n\n\t\tif (candidates.size() == 0)\n\t\t throw new RetryException(\n\t\t\t \"No nearby Hudson supports swarming\");\n\n\t\tSystem.out.println(\"Found \" + candidates.size()\n\t\t\t+ \" eligible Hudson.\");\n\t\t// randomly pick up the Hudson to connect to\n\t\ttarget = candidates\n\t\t\t.get(new Random().nextInt(candidates.size()));\n\t\tif (password == null && username == null) {\n\t\t verifyThatUrlIsHudson();\n\t\t}\n\n\t\t// create a new swarm slave\n\t\tcreateSwarmSlave();\n\t\tconnect();\n\t } catch (IOException e) {\n\t\te.printStackTrace();\n\t } catch (ParserConfigurationException e) {\n\t\te.printStackTrace();\n\t } catch (RetryException e) {\n\t\tSystem.out.println(e.getMessage());\n\t\tif (e.getCause() != null)\n\t\t e.getCause().printStackTrace();\n\t }\n\n\t // retry\n\t System.out.println(\"Retrying in 10 seconds\");\n\t Thread.sleep(10 * 1000);\n\t}\n\n }", "public void announceWinners() {\n\t\tsynchronized (blockedAnnouncer) {\n\t\t\tif (resultsNotInAnnouncer(blockedAnnouncer)) {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tblockedAnnouncer.wait();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}// while\n\t\t\t}// if\n\t\t}// synch\n\t\twhile (waitingForResults.size() > 0) {\n\t\t\tsynchronized (waitingForResults.elementAt(0)) {\n\t\t\t\twaitingForResults.elementAt(0).notify();\n\t\t\t\twaitingForResults.removeElementAt(0);\n\t\t\t}// sncnh\n\t\t}// while\n\t}", "private static void runHQ() throws GameActionException {\n\t\tif (Clock.getRoundNum() < 3) {\t\t\t\n\t\t\tif (rc.isActive()) {\n\t\t\t\tDirection spawnDir = dir[rand.nextAnd(7)];\n\t\t\t\tif (rc.senseObjectAtLocation(curLoc.add(spawnDir)) == null) {\n\t\t\t\t\trc.spawn(spawnDir);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif (pastrLocations[0] == null) {\n\t\t\t\tpastrLocations[0] = getBestPastrLocNearMeBasedOnCowGrowthRate();\n\t\t\t\trc.broadcast(0, pastrLocations[0].x * 100 + pastrLocations[0].y);\n\t\t\t}\n\t\t}\n\t\tdouble d = rc.senseCowsAtLocation(new MapLocation(8,11));\n\t\tSystem.out.println(d);\n\t}", "protected boolean waitBeforeExecution() throws InterruptedException {\n/* 112 */ Integer mx = ((IncomingSearchRequest)getInputMessage()).getMX();\n/* */ \n/* 114 */ if (mx == null) {\n/* 115 */ log.fine(\"Invalid search request, did not contain MX header: \" + getInputMessage());\n/* 116 */ return false;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 122 */ if (mx.intValue() > 120 || mx.intValue() <= 0) mx = MXHeader.DEFAULT_VALUE;\n/* */ \n/* */ \n/* 125 */ if (getUpnpService().getRegistry().getLocalDevices().size() > 0) {\n/* 126 */ int sleepTime = this.randomGenerator.nextInt(mx.intValue() * 1000);\n/* 127 */ log.fine(\"Sleeping \" + sleepTime + \" milliseconds to avoid flooding with search responses\");\n/* 128 */ Thread.sleep(sleepTime);\n/* */ } \n/* */ \n/* 131 */ return true;\n/* */ }", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tint wkid = map.getSpatialReference().getID();\n\n\t\t\t\t\t\t\tLocator locator = Locator\n\t\t\t\t\t\t\t\t\t.createOnlineLocator(floorInfo\n\t\t\t\t\t\t\t\t\t\t\t.getLocatorServerPath());\n\t\t\t\t\t\t\t// Create suggestion parameter\n\t\t\t\t\t\t\tLocatorFindParameters params = new LocatorFindParameters(\n\t\t\t\t\t\t\t\t\taddress);\n\n\t\t\t\t\t\t\t// ArrayList<String> outFields = new\n\t\t\t\t\t\t\t// ArrayList<String>();\n\t\t\t\t\t\t\t// outFields.add(\"*\");\n\t\t\t\t\t\t\t// params.setOutFields(outFields);\n\t\t\t\t\t\t\t// Set the location to be used for proximity based\n\t\t\t\t\t\t\t// suggestion\n\t\t\t\t\t\t\t// params.setLocation(map.getCenter(),map.getSpatialReference());\n\t\t\t\t\t\t\t// Set the radial search distance in meters\n\t\t\t\t\t\t\t// params.setDistance(50000.0);\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tlocatorResults = locator.find(params);\n\t\t\t\t\t\t\t\t// HashMap<String, String> params = new\n\t\t\t\t\t\t\t\t// HashMap<String,\n\t\t\t\t\t\t\t\t// String>();\n\t\t\t\t\t\t\t\t// params.put(\"货架编号\", address);\n\t\t\t\t\t\t\t\t// locatorResults = locator.geocode(params,\n\t\t\t\t\t\t\t\t// null,\n\t\t\t\t\t\t\t\t// map.getSpatialReference());\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\tSystem.out.println(\"查找:\" + address + \" 出错:\"\n\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\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\tif (locatorResults != null\n\t\t\t\t\t\t\t\t\t&& locatorResults.size() > 0) {\n\t\t\t\t\t\t\t\t// Add the first result to the map and zoom to\n\t\t\t\t\t\t\t\t// it\n\t\t\t\t\t\t\t\tfor (LocatorGeocodeResult result : locatorResults) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"查找:\" + address + \" 结果:\"\n\t\t\t\t\t\t\t\t\t\t\t+ result.getAddress());\n\n\t\t\t\t\t\t\t\t\tif (result.getAddress() != null\n\t\t\t\t\t\t\t\t\t\t\t&& address.equals(result\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getAddress())) {\n\n\t\t\t\t\t\t\t\t\t\tfloorInfo.getShelfList().add(result);\n\t\t\t\t\t\t\t\t\t\t// shelfList.add(result);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsearchTime++;\n\t\t\t\t\t\t\tSystem.out.println(\"已查找次数:\" + searchTime);\n\t\t\t\t\t\t\tif (searchTime >= mSearchCount) {\n\t\t\t\t\t\t\t\tmHandler.post(mMarkAndRoute);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void locateGame() {\n int[] screenPixels;\n BufferedImage screenshot;\n System.out.print(\"Detecting game...\");\n while (!gameDetected) {\n screenshot = robot.createScreenCapture(new Rectangle(screenWidth, screenHeight));\n screenPixels = screenshot.getRGB(0, 0, screenWidth, screenHeight, null, 0, screenWidth);\n detectMaze(screenPixels);\n delay(20);\n }\n System.out.print(\"game detected!\\n\");\n }", "protected abstract long waitToTravel();", "@Override\r\n protected Location doInBackground(final Void... unused) {\n\tfor (int i = 0; true; i++) {\r\n\t if (location == null)\r\n\t\ttry {\r\n\t\t Thread.sleep(500);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t // can't do anything here but continue\r\n\t\t}\r\n\t else\r\n\t\tbreak;\r\n\r\n\t // if the user has waited more then 2 seconds tell them we are still\r\n\t // waiting\r\n\t if (i > 5)\r\n\t\tpublishProgress(\"waiting for location.\");\r\n\t else if (i > 10)\r\n\t\tpublishProgress(\"still waiting for location.\");\r\n\t}\r\n\r\n\treturn location;\r\n }", "protected Void doInBackground(Context... params) {\n Long t = Calendar.getInstance().getTimeInMillis();\n while (!foundLocation) {\n searchForLocation();\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return null;\n }", "public int lookAround(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(4, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n int result = (int) m_fromServer.getReturnValue();\n com.close ();\n\n return result;\n }", "@Override\r\n protected Void doInBackground(Void... arg0) {\n findNearLocation();\r\n return null;\r\n }", "@Override\n public void onGeoQueryReady() {\n if (!isAgentFound) {\n radius++;\n getNearestAgent();\n }\n }", "private void waitForConnection() throws IOException{\n\t\tshowMessage(\"\\n Waiting for a Punk Ass Bitch to connection... \\n \");\n\t\tConnection = server.accept();\n\t\tshowMessage(\"Now connected to \" + Connection.getInetAddress().getHostName() + \". Punk.\");\n\t\t//this is your own IP address, the machine running the the code\n\t\t//\n\t\t\n\t}", "public void startLocationDiscovery() {\n\t\t/*CountDownTimer gpsDelay = new CountDownTimer(\n\t\t\t\tcalculateNextInteraction(failedInteractions) * 60 * 1000, 1000) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onTick(long arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onFinish() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t};*/\n\t\tregisterLocationListener(locationListener);\n\t}", "public boolean mo15755a(long j, TimeUnit timeUnit) {\n if (f1363a) {\n C1202a.m1318b(\"PingTask\", \"ping google return cache\");\n return true;\n }\n C1202a.m1318b(\"PingTask\", \"start ping goole\");\n this.f1364b = new CountDownLatch(1);\n new AsyncTaskC1228a().execute(new Context[0]);\n try {\n if (!this.f1364b.await(j, timeUnit)) {\n C1202a.m1318b(\"PingTask\", \"await time out\");\n return false;\n }\n C1202a.m1318b(\"PingTask\", \"await:isReachable:\" + f1363a);\n return f1363a;\n } catch (InterruptedException unused) {\n C1202a.m1320d(\"PingTask\", \"await:InterruptedException:\");\n return false;\n }\n }", "private boolean waitForAO()\n {\n int countOfRetry = 15;\n do\n {\n try\n {\n log.debug(\"Attempting to wait for AO.\");\n activeObjects.count(MessageMapping.class);\n log.debug(\"Attempting to wait for AO - DONE.\");\n stop = true;\n return true;\n }\n catch (PluginException e)\n {\n countOfRetry--;\n try\n {\n Thread.sleep(5000);\n }\n catch (InterruptedException ie)\n {\n // nothing to do\n }\n }\n }\n while (countOfRetry > 0 && !stop);\n log.debug(\"Attempting to wait for AO - UNSUCCESSFUL.\");\n return false;\n }", "private void loop() {\n try {\n while (true) {\n for (int i = 0; i < projectNames.length; i++) {\n final HudsonProjectStatus status = ciServer.extractElement(projectNames[i]);\n LOG.debug(\"About to tell device about status \" + status);\n switch (status.getStatus()) {\n case SUCCESS:\n if (status.getActivity() == HudsonActivity.BUILDING) {\n buildLight.bldBlink(i, 0, 0, buildLight.bldGetMaxColor());\n } else {\n buildLight.bldSolid(i, 0, 0, buildLight.bldGetMaxColor());\n }\n break;\n case FAILURE:\n if (status.getActivity() == HudsonActivity.BUILDING) {\n buildLight.bldBlink(i, buildLight.bldGetMaxColor(), 0, 0);\n } else {\n buildLight.bldSolid(i, buildLight.bldGetMaxColor(), 0, 0);\n }\n break;\n case EXCEPTION:\n case UNKNOWN:\n default:\n buildLight.bldBlink(i, buildLight.bldGetMaxColor(), buildLight\n .bldGetMaxColor(), 0);\n break;\n }\n }\n // 1/4 of hudson server polling rate so we're never more than 1/4 interval behind\n Thread.sleep(SERVER_POLLING_INTERVAL / 4 * 1000);\n }\n } catch (final InterruptedException e) {\n // assume we're done\n }\n }", "public static void waitForAI(){\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "protected boolean waitForClusterToStart() throws HoneycombTestException {\n\n Log.INFO(\"Waiting for cluster to come Online...\");\n boolean ready = false;\n int i = MAX_ONLINE_ITERATIONS;\n while (i > 0 && !ready) {\n try {\n i--;\n ArrayList lines = readSysstat();\n if (lines.toString().contains(nodesOnlineString)) {\n ready = true;\n } \n if (!ready)\n pause(SLEEP_WAKEUP_TIMEOUT);\n } catch (Throwable e) {\n pause(SLEEP_WAKEUP_TIMEOUT);\n }\n }\n if (i == 0) {\n Log.WARN(\"Cluster is not Online\");\n }\n if (!ready)\n okToProceed = false;\n return ready;\n }", "private void waitForServerReady() throws IOException, InterruptedException {\n\t\tfinal var httpget = new HttpGet(getPingUri());\n\t\tvar counter = 0;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tif (HttpStatus.SC_OK == httpclient.execute(httpget, HttpResponse::getCode)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcheckRetries(counter);\n\t\t\t} catch (final HttpHostConnectException ex) { // NOSONAR - Wait, and check later\n\t\t\t\tlog.info(\"Check failed, retrying...\");\n\t\t\t\tcheckRetries(counter);\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}", "public static void waitToGo() {\r\n try {\r\n sendMessageToMaster(SocketMessage.SLAVE_READY_TO_GO);\r\n wait_to_run.acquire();\r\n } catch (InterruptedException e) {\r\n }\r\n }", "private void findNearByEvents() {\n LatLng latLng = mMapFragment.getCenterOfScreen();\n double longitude = latLng.longitude;\n double latitude = latLng.latitude;\n\n int spEventsPosition = mEventsSpinner.getSelectedItemPosition();\n int spTimesPosition = mTimesSpinner.getSelectedItemPosition();\n\n Log.e(\"MainAct\", \"Lat: \" + latitude + \" Lon: \" + longitude);\n mEventInteractor = new EventInteractor(this);\n EventSearchRequest eventSearchRequest = new EventSearchRequest();\n eventSearchRequest.setLat(String.valueOf(latitude));\n eventSearchRequest.setLon(String.valueOf(longitude));\n eventSearchRequest.setEventTime(spTimesPosition);\n eventSearchRequest.setEventType(spEventsPosition);\n mEventInteractor.eventSearch(eventSearchRequest, new EventSearchListener() {\n @Override\n public void onEventSearch(EventSearchResponse response) {\n mBottomSheetListFragment.refreshEvents(response.getEvents());\n mMapFragment.getEventsAndPin(response.getEvents());\n }\n\n @Override\n public void onError(String errorMessage) {\n showErrorMessage(errorMessage);\n }\n\n @Override\n public void onBeforeRequest() {\n showWaitingDialog();\n }\n\n @Override\n public void onAfterRequest() {\n dismissWaitingDialog();\n }\n });\n }", "@Override\n public void run() {\n try {\n Thread.sleep(TimeUnit.MINUTES.toMillis(getSettings().getMinutesStartupPeriod()));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n // Set the last time players were online to now\n setLastTimePlayersOnline(System.currentTimeMillis());\n\n // Start a new thread, report that monitoring is now enabled\n new Thread(\"ThreadDump Monitoring Status\") {\n public void run() {\n new BukkitRunnable() {\n @Override\n public void run() {\n getPlugin().getLogger().info(\"Started monitoring\");\n }\n }.runTask(getPlugin());\n }\n }.start();\n\n // Run in an infinite loop as we're not calling back to the main thread\n while (true) {\n // Create the task here which will be accessed\n FutureTask<Boolean> task = new FutureTask<>(() -> !Bukkit.getOnlinePlayers().isEmpty());\n\n // Start a thread incase just running the BukkitRunnable would encounter a freeze\n new Thread(\"ThreadDump Monitoring Check\") {\n public void run() {\n new BukkitRunnable() {\n @Override\n public void run() {\n // Run the task to check if players are online\n task.run();\n }\n }.runTask(getPlugin());\n }\n }.start();\n\n try {\n // Wait 20 seconds for resolve, otherwise throw error\n boolean playersOnline = task.get(getSettings().getSecondsWaitForBukkit(), TimeUnit.SECONDS);\n\n doPlayersOnline(playersOnline);\n }\n catch (Exception e) {\n // Error was thrown, assumed due to timeout\n\n // If it can dump threads\n if (isTimeToDumpAgain()) {\n // Dump threads\n System.out.println(\"[ThreadDump] Server isn't responding, dumping threads!\");\n dumpThreadsToFile();\n }\n }\n\n try {\n // Wait 10 seconds\n Thread.sleep(TimeUnit.SECONDS.toMillis(getSettings().getSecondsPluginCheck()));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\t\tprotected Void doInBackground(String... params) {\n\t\t\tfor (int i = 0; i < 7; i++) {\n\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t} catch (InterruptedException 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\n\t\t\t\tif (longitude > 0.0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "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 int wait4arriving(Ship sh) throws InterruptedException {\n \n for(int i = 0; i < docks.length.i++){\n if(){\n string inHarbour = dock\n }\n \n \n\n }", "private void travelToAirport()\n {\n try\n { sleep ((long) (1 + 30000 * Math.random ()));\n }\n catch (InterruptedException e) {}\n }", "default Promise<List<String>> findHealthyNodes() {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n }", "private void query(){\n synchronized (slaveList) {\n for (Integer ID : slaveList.keySet()) {\n SDSlave slaveNode = slaveList.get(ID);\n slaveNode.out.write(\"Alive?\\n\");\n slaveNode.out.flush();\n }\n }\n }", "public void waitForRootRegionLocation() {\n regionManager.waitForRootRegionLocation();\n }", "private void verifyAlive(int coordID, int procID, int electedID, String token) {\r\n\tSystem.out.println(\"so im here now\" + coordID);\r\n\t\tlong time = 3000;\r\n\t\ttry {\r\n\t\t\tThread.sleep(time);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif(procID>6) {\r\n \tprocID = procID - 6;\r\n }\r\n try {\r\n socket = new Socket(\"127.0.0.1\", 8080+procID);\r\n out = new PrintWriter(socket.getOutputStream());\r\n out.println(token);\r\n out.flush();\r\n out.close();\r\n socket.close();\r\n //ring.currentAlive = electedID;\r\n } catch(Exception ex) {\r\n \tverifyAlive(coordID, procID+1, electedID, token); // pass to next next if next was unavailable\r\n }\r\n\t//}\r\n}", "public synchronized void enterHall(){\n\t\twhile(nbPlaces==0 || sessionStarted==false){ //This is a while because the customer thread must check every time after waking up\n\t\t\t \t\t\t\t\t\t\t\t\t\t //whether the session has started or not.\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"The customer \"+Thread.currentThread().getId()+\" is waiting to enter the projection hall.\");\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tnbPlaces--;\n\t\tSystem.out.println(\"The customer \"+Thread.currentThread().getId()+\" is going to enter the projection hall.\");\n\t}", "public void infect() {\n\t\tPlagueAgent current = this;\n\t\tif (!current.infected) {\n\t\t\tfor (PlagueAgent a : plagueWorld.getNeighbors(current, 5)) {\n\t\t\t\tif (a.infected) {\n\t\t\t\t\tint luck = Utilities.rng.nextInt(100);\n\t\t\t\t\tif (luck < plagueWorld.VIRULENCE) {\n\t\t\t\t\t\tthis.infected = true;\n\t\t\t\t\t\tplagueWorld.newInfection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplagueWorld.changed();\n\t}", "public boolean ping();", "public void locateParkedCar() {\n\t\tthis.generalRequest(LocalRequestType.LOCATE);\n\t}", "private void check() {\n ShedSolar.instance.haps.post( Events.WEATHER_REPORT_MISSED );\n LOGGER.info( \"Failed to receive weather report\" );\n\n // check again...\n startChecker();\n }", "static void archon() throws GameActionException {\n \tboolean isFirstArchon = true;\n \tMapLocation homeBase = robot.getLocation();\n\t\tSignal[] signals = robot.emptySignalQueue();\n\t\tfor (Signal signal : signals)\n\t\t\tif (signal.getTeam() == robot.getTeam())\n\t\t\t\tif (signal.getMessage()[0] == SUMMON_ARCHONS) {\n\t\t\t\t\tint x = signal.getMessage()[1] >> 16;\n\t\t\t\t\tint y = signal.getMessage()[1] & 0xFFFF;\n\t\t\t\t\tisFirstArchon = false;\n\t\t\t\t\thomeBase = new MapLocation(x, y);\n\t\t\t\t}\n\t\t\n\t\tif (isFirstArchon) {\n\t\t\tint value = (homeBase.x << 16) | homeBase.y;\n\t\t\trobot.broadcastMessageSignal(SUMMON_ARCHONS, value, 1000);\n\t\t\tfor (Direction dir : oddDirection) {\n\t\t\t\twhile (!robot.isCoreReady())\n\t\t\t\t\tClock.yield();\n\t\t\t\twhile (!robot.hasBuildRequirements(RobotType.TURRET))\n\t\t\t\t\tClock.yield();\n\t\t\t\tif (robot.canBuild(dir, RobotType.TURRET)) {\n\t\t\t\t\trobot.build(dir, RobotType.TURRET);\n\t\t\t\t\tClock.yield();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tint attempts = 0;\n\t\t\tMapLocation current = robot.getLocation();\n\t\t\twhile (9 < current.distanceSquaredTo(homeBase) && attempts < 50) {\n\t\t\t\twhile (!robot.isCoreReady())\n\t\t\t\t\tClock.yield();\n\t\t\t\ttryMove(current.directionTo(homeBase));\n\t\t\t\tcurrent = robot.getLocation();\n\t\t\t\tClock.yield();\n\t\t\t\tattempts++;\n\t\t\t}\n\t\t\twhile (((current.x - homeBase.x) + (current.y - homeBase.y)) % 2 != 0) {\n\t\t\t\twhile (!robot.isCoreReady())\n\t\t\t\t\tClock.yield();\n\t\t\t\ttryMove(evenDirection[random.nextInt(4)]);\n\t\t\t\tcurrent = robot.getLocation();\n\t\t\t\tClock.yield();\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (robot.isCoreReady()) {\n\t\t\t\tif (random.nextDouble() < 0.33 && robot.hasBuildRequirements(RobotType.TURRET)) {\n\t\t\t\t\tdouble rnd = random.nextDouble();\n\t\t\t\t\tDirection dir = evenDirection[random.nextInt(4)];\n\t\t\t\t\tif (rnd < 0.6) {\n\t\t\t\t\t\tif (robot.canBuild(dir, RobotType.TURRET)) {\n\t\t\t\t\t\t\trobot.build(dir, RobotType.TURRET);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (robot.canBuild(dir, RobotType.SCOUT)) {\n\t\t\t\t\t\t\trobot.build(dir, RobotType.SCOUT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tClock.yield();\n\t\t\t\t}\n\t\t\t}\n\t\t\tClock.yield();\n\t\t}\n }", "private void lastResortFindPeer() {\n\t\tDecentLogger.write(\"Resolving peers from DNS (last resort)\");\n\t\tfor(String seed: DNS_SEEDS) {\n\t\t\tArrayList<InetAddress> hosts = DNSResolver.getARecords(seed);\n\t\t\tif(hosts != null) {\n\t\t\t\tcheckList(hosts);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tplaces.start();\n\t\t\t\t// rooms.start();\n\t\t\t} catch (UnknownSubarchitectureException e1) {\n\t\t\t\tcomponent.logException(e1);\n\t\t\t}\n\t\t\tWMEventQueue agentChangeEventQueue = new WMEventQueue();\n\t\t\tcomponent.addChangeFilter(ChangeFilterFactory.createTypeFilter(\n\t\t\t\t\tPlaceContainmentAgentProperty.class,\n\t\t\t\t\tWorkingMemoryOperation.ADD), agentChangeEventQueue);\n\t\t\tcomponent.addChangeFilter(ChangeFilterFactory.createTypeFilter(\n\t\t\t\t\tPlaceContainmentAgentProperty.class,\n\t\t\t\t\tWorkingMemoryOperation.OVERWRITE), agentChangeEventQueue);\n\n\t\t\t// initialize current place\n\t\t\twhile (currentPlace == null && !interrupted())\n\t\t\t\tcurrentPlace = getPlaceInterface().getCurrentPlace();\n\t\t\tsetPlace(currentPlace);\n\n\t\t\twhile (!interrupted()) {\n\t\t\t\ttry {\n\t\t\t\t\t// wait for the next change (wait 500ms to allow this to be\n\t\t\t\t\t// properly shutdown on interrupts)\n\t\t\t\t\tWorkingMemoryChange event = agentChangeEventQueue.poll(500,\n\t\t\t\t\t\t\tTimeUnit.MILLISECONDS);\n\t\t\t\t\t// if it was just a time out continue waiting\n\t\t\t\t\tif (event == null)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tPlace place = getPlaceInterface().getCurrentPlace();\n\n\t\t\t\t\tif (place == null || place.id != currentPlace.id) {\n\t\t\t\t\t\tsetPlace(place);\n\t\t\t\t\t\tfor (PlaceChangedHandler c : placeCheckerCallables) {\n\t\t\t\t\t\t\tc.update(place);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private PairOfSameType<RegionInfo> waitOnDaughters(final RegionInfo r) throws IOException {\n long start = EnvironmentEdgeManager.currentTime();\n PairOfSameType<RegionInfo> pair = null;\n try (Connection conn = ConnectionFactory.createConnection(TEST_UTIL.getConfiguration());\n Table metaTable = conn.getTable(TableName.META_TABLE_NAME)) {\n Result result = null;\n RegionInfo region = null;\n while ((EnvironmentEdgeManager.currentTime() - start) < 60000) {\n result = metaTable.get(new Get(r.getRegionName()));\n if (result == null) {\n break;\n }\n region = CatalogFamilyFormat.getRegionInfo(result);\n if (region.isSplitParent()) {\n LOG.debug(region.toString() + \" IS a parent!\");\n pair = MetaTableAccessor.getDaughterRegions(result);\n break;\n }\n Threads.sleep(100);\n }\n\n if (pair.getFirst() == null || pair.getSecond() == null) {\n throw new IOException(\"Failed to get daughters, for parent region: \" + r);\n }\n return pair;\n }\n }", "private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}", "public void hueBridgeDiscovery() {\n if(bridgeList != null)\n if(!bridgeList.isEmpty())\n bridgeList.clear();\n if(bridgeDiscoveryAdapter != null)\n bridgeDiscoveryAdapter.notifyDataSetChanged();\n final ProgressDialog progressDialog = new ProgressDialog(getActivity());\n progressDialog.setMessage(\"Searching for bridges...\");\n progressDialog.show();\n\n BridgeDiscovery bridgeDiscovery = new BridgeDiscovery();\n bridgeDiscovery.search(BridgeDiscovery.BridgeDiscoveryOption.UPNP_AND_NUPNP, new BridgeDiscoveryCallback() {\n @Override\n public void onFinished(List<BridgeDiscoveryResult> list, ReturnCode returnCode) {\n if(returnCode.equals(ReturnCode.SUCCESS)) {\n\n // Process results of the search\n for(int i = 0; i < list.size(); i++) {\n BridgeDiscoveryResult result = list.get(i);\n ListItemBridge newItem = new ListItemBridge(\n \"Getting Name...\",\n result.getUniqueID(),\n result.getIP(),\n \"BSB002\"\n );\n bridgeList.add(newItem);\n }\n\n\n // Get the names of the bridges found\n for(int i = 0; i < bridgeList.size(); i++)\n {\n getBridgeName(i);\n }\n\n act.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n bridgeDiscoveryAdapter = new BridgeAdapter(bridgeList, getActivity());\n recyclerViewBridge.setAdapter(bridgeDiscoveryAdapter);\n }\n });\n progressDialog.dismiss();\n\n }\n else {\n // Notify no bridges were found\n act.showToast(\"Could not find any Hue bridges.\");\n progressDialog.dismiss();\n }\n }\n });\n }", "private void awaitT(){\n try {\n game.getBarrier().await(20, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (BrokenBarrierException e) {\n e.printStackTrace();\n } catch (TimeoutException e) {\n trimBarrier();\n synchronized (lock){\n if(!botSignal){\n bot = new BotClient();\n new Thread(bot).start();\n botSignal = true;\n }\n\n }\n }\n }", "@Override\n public void run() {\n UpnpService upnpService = new UpnpServiceImpl(listener);\n\n // Send a search message to all devices and services, they should respond soon\n upnpService.getControlPoint().search(new STAllHeader());\n\n // Let's wait 10 seconds for them to respond\n// System.out.println(\"Waiting 10 seconds before shutting down...\");\n try {\n Thread.sleep(10000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n // Release all resources and advertise BYEBYE to other UPnP devices\n// System.out.println(\"Stopping Cling...\");\n upnpService.shutdown();\n\n\n }", "private void runTcpScan()\n {\n String ipAddress = new NetworkInfrastructure().getLocalInetAddress().getHostAddress();\n\n //make sure we are on a private range...\n if(isPrivateIpRange(ipAddress))\n {\n // TODO: Check the sub-net mask for smaller than /24 to reduce possible hosts\n\n String range = ipAddress.substring(0, ipAddress.lastIndexOf('.') + 1);\n\n for (int i = 1; i < 255; i++) {\n try {\n\n // See if port is open - if it's not, an exception will bubble\n probeTcpPort(range + i, 80);\n\n // still here? its open lets see if IOTAS is on the host...\n probeIotasApi(range + i);\n\n }catch (JSONException e) {\n // Cant get JSON api probe failed\n } catch (UnknownHostException e) {\n // bad address - ignore\n } catch (SocketTimeoutException e) {\n // socket timeout - ignore\n } catch (IOException e) {\n // socket closed - ignore\n }\n }\n }\n\n log.info(\"Holiday TCP Scan Complete...\");\n }", "public void run() {\n boolean quiesceRequested = false;\n // A sleeper that sleeps for msgInterval.\n Sleeper sleeper = new Sleeper(this.msgInterval, this.stopRequested);\n try {\n init(reportForDuty(sleeper));\n long lastMsg = 0;\n // Now ask master what it wants us to do and tell it what we have done\n for (int tries = 0; !stopRequested.get() && isHealthy();) {\n long now = System.currentTimeMillis();\n if (lastMsg != 0 && (now - lastMsg) >= serverLeaseTimeout) {\n // It has been way too long since we last reported to the master.\n LOG.warn(\"unable to report to master for \" + (now - lastMsg) +\n \" milliseconds - retrying\");\n }\n if ((now - lastMsg) >= msgInterval) {\n HMsg outboundArray[] = null;\n synchronized(this.outboundMsgs) {\n outboundArray =\n this.outboundMsgs.toArray(new HMsg[outboundMsgs.size()]);\n this.outboundMsgs.clear();\n }\n try {\n doMetrics();\n this.serverInfo.setLoad(new HServerLoad(requestCount.get(),\n onlineRegions.size(), this.metrics.storefiles.get(),\n this.metrics.memcacheSizeMB.get()));\n this.requestCount.set(0);\n HMsg msgs[] = hbaseMaster.regionServerReport(\n serverInfo, outboundArray, getMostLoadedRegions());\n lastMsg = System.currentTimeMillis();\n if (this.quiesced.get() && onlineRegions.size() == 0) {\n // We've just told the master we're exiting because we aren't\n // serving any regions. So set the stop bit and exit.\n LOG.info(\"Server quiesced and not serving any regions. \" +\n \"Starting shutdown\");\n stopRequested.set(true);\n this.outboundMsgs.clear();\n continue;\n }\n \n // Queue up the HMaster's instruction stream for processing\n boolean restart = false;\n for(int i = 0;\n !restart && !stopRequested.get() && i < msgs.length;\n i++) {\n LOG.info(msgs[i].toString());\n switch(msgs[i].getType()) {\n case MSG_CALL_SERVER_STARTUP:\n // We the MSG_CALL_SERVER_STARTUP on startup but we can also\n // get it when the master is panicing because for instance\n // the HDFS has been yanked out from under it. Be wary of\n // this message.\n if (checkFileSystem()) {\n closeAllRegions();\n try {\n log.closeAndDelete();\n } catch (Exception e) {\n LOG.error(\"error closing and deleting HLog\", e);\n }\n try {\n serverInfo.setStartCode(System.currentTimeMillis());\n log = setupHLog();\n this.logFlusher.setHLog(log);\n } catch (IOException e) {\n this.abortRequested = true;\n this.stopRequested.set(true);\n e = RemoteExceptionHandler.checkIOException(e); \n LOG.fatal(\"error restarting server\", e);\n break;\n }\n reportForDuty(sleeper);\n restart = true;\n } else {\n LOG.fatal(\"file system available check failed. \" +\n \"Shutting down server.\");\n }\n break;\n \n case MSG_REGIONSERVER_STOP:\n stopRequested.set(true);\n break;\n \n case MSG_REGIONSERVER_QUIESCE:\n if (!quiesceRequested) {\n try {\n toDo.put(new ToDoEntry(msgs[i]));\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Putting into msgQueue was \" +\n \"interrupted.\", e);\n }\n quiesceRequested = true;\n }\n break;\n \n default:\n if (fsOk) {\n try {\n toDo.put(new ToDoEntry(msgs[i]));\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Putting into msgQueue was \" +\n \"interrupted.\", e);\n }\n }\n }\n }\n // Reset tries count if we had a successful transaction.\n tries = 0;\n \n if (restart || this.stopRequested.get()) {\n toDo.clear();\n continue;\n }\n } catch (Exception e) {\n if (e instanceof IOException) {\n e = RemoteExceptionHandler.checkIOException((IOException) e);\n }\n if (tries < this.numRetries) {\n LOG.warn(\"Processing message (Retry: \" + tries + \")\", e);\n tries++;\n } else {\n LOG.error(\"Exceeded max retries: \" + this.numRetries, e);\n checkFileSystem();\n }\n if (this.stopRequested.get()) {\n \tLOG.info(\"Stop was requested, clearing the toDo \" +\n \t\t\t\"despite of the exception\");\n toDo.clear();\n continue;\n }\n }\n }\n // Do some housekeeping before going to sleep\n housekeeping();\n sleeper.sleep(lastMsg);\n } // for\n } catch (OutOfMemoryError error) {\n abort();\n LOG.fatal(\"Ran out of memory\", error);\n } catch (Throwable t) {\n LOG.fatal(\"Unhandled exception. Aborting...\", t);\n abort();\n }\n RegionHistorian.getInstance().offline();\n this.leases.closeAfterLeasesExpire();\n this.worker.stop();\n this.server.stop();\n if (this.infoServer != null) {\n LOG.info(\"Stopping infoServer\");\n try {\n this.infoServer.stop();\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n }\n \n // Send interrupts to wake up threads if sleeping so they notice shutdown.\n // TODO: Should we check they are alive? If OOME could have exited already\n cacheFlusher.interruptIfNecessary();\n logFlusher.interrupt();\n compactSplitThread.interruptIfNecessary();\n logRoller.interruptIfNecessary();\n \n if (abortRequested) {\n if (this.fsOk) {\n // Only try to clean up if the file system is available\n try {\n if (this.log != null) {\n this.log.close();\n LOG.info(\"On abort, closed hlog\");\n }\n } catch (IOException e) {\n LOG.error(\"Unable to close log in abort\",\n RemoteExceptionHandler.checkIOException(e));\n }\n closeAllRegions(); // Don't leave any open file handles\n }\n LOG.info(\"aborting server at: \" +\n serverInfo.getServerAddress().toString());\n } else {\n ArrayList<HRegion> closedRegions = closeAllRegions();\n try {\n log.closeAndDelete();\n } catch (IOException e) {\n LOG.error(\"Close and delete failed\",\n RemoteExceptionHandler.checkIOException(e));\n }\n try {\n HMsg[] exitMsg = new HMsg[closedRegions.size() + 1];\n exitMsg[0] = HMsg.REPORT_EXITING;\n // Tell the master what regions we are/were serving\n int i = 1;\n for (HRegion region: closedRegions) {\n exitMsg[i++] = new HMsg(HMsg.Type.MSG_REPORT_CLOSE,\n region.getRegionInfo());\n }\n \n LOG.info(\"telling master that region server is shutting down at: \" +\n serverInfo.getServerAddress().toString());\n hbaseMaster.regionServerReport(serverInfo, exitMsg, (HRegionInfo[])null);\n } catch (IOException e) {\n LOG.warn(\"Failed to send exiting message to master: \",\n RemoteExceptionHandler.checkIOException(e));\n }\n LOG.info(\"stopping server at: \" +\n serverInfo.getServerAddress().toString());\n }\n if (this.hbaseMaster != null) {\n HbaseRPC.stopProxy(this.hbaseMaster);\n this.hbaseMaster = null;\n }\n join();\n LOG.info(Thread.currentThread().getName() + \" exiting\");\n }", "@Override\n\tpublic void run() {\n\n\t\tprogressivNumber++;\n\t\tStoRMStatus status = detective.haveaLook();\n\t\tstatus.setPulseNumber(progressivNumber);\n\t\tHEALTH_LOG.debug(\"*** HEARTHBEAT ***\");\n\t\tHEALTH_LOG.info(status.toString());\n\t}", "public void ping() throws RemoteException{\n return;\n }", "@Override\n\tpublic void execute() {\n\t\tif (!Variables.decreaseTask) {\n\t\t\tVariables.decreaseTask = true;\n\t\t} else {\n\t\t\tVariables.taskAmount--;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Killing npcs\");\n\t\t\n\t\tif (Variables.status != \"Completing task...\") {\n\t\tVariables.status = \"Completing task...\";\n\t\t}\n\t\t\n\t\tNpc[] slayerMonster = Npcs.getNearest(slayerMonsterFilter);\n\n\t\ttry {\n\t\tslayerMonster[0].interact(1);\n\t\t} catch (ArrayIndexOutOfBoundsException | NullPointerException e) {\n\t\t\t\n\t\t} \n\t\t\n\t\tTime.sleep(new SleepCondition() {\n\t\t\t@Override\n\t\t\tpublic boolean isValid() {\n\t\t\t\treturn Players.getMyPlayer().isInCombat();\n\t\t\t}\n\t\t}, 5000);\n\t\t\n\t\tTime.sleep(new SleepCondition() {\n\t\t\t@Override\n\t\t\tpublic boolean isValid() {\n\t\t\t\treturn !Players.getMyPlayer().isInCombat();\n\t\t\t}\n\t\t}, 5000);\n\t}", "public static void ping() {}", "public static void ping() {}", "@Override\n protected boolean doTask()\n {\n if (!this.homePos.isEmpty()) return true;\n final Brain<?> brain = this.entity.getBrain();\n if (brain.hasMemoryValue(MemoryModules.GOING_HOME.get())) return true;\n if (BurrowTasks.shouldBeInside(this.world, this.burrow))\n {\n brain.setMemory(MemoryModules.GOING_HOME.get(), true);\n return true;\n }\n return false;\n }", "@Override\n public void waitForAllInBoard() {\n this.lock.lock();\n try {\n // update pilot state\n this.repository.updatePilotState(PilotState.WAIT_FOR_BOARDING);\n\n // wait for all passengers\n while (!this.planeReadyToTakeOff) {\n this.pilotWaitForAllInBoard.await();\n }\n this.planeReadyToTakeOff = false;\n\n // update pilot state\n this.repository.updatePilotState(PilotState.FLYING_FORWARD);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n this.lock.unlock();\n }\n }", "public void run() {\n try {\n arrive();\n\n //Wait for the daily developer standup\n team.getStandupBarrier().await();\n int lunchtime = 2400;\n\n working(lunchtime, false);\n \n int dillyDallyBeforeLunch = rng.nextInt((80 - 10) + 1) + 10;\n Thread.sleep(dillyDallyBeforeLunch);\n \n System.out.println(\"Developer \" + this.getName() +\n \" Goes to lunch at \" + team.getLead().getPM().getClockTime());\n\n int lunchDuration = rng.nextInt((600 - 300) + 1) + 300;\n Thread.sleep(lunchDuration);\n \n System.out.println(\"Developer \" + this.getName() +\n \" Leaves lunch at \" + team.getLead().getPM().getClockTime());\n \n //Go to final meeting somewhere between 4:00 and 4:15\n int workInterval = rng.nextInt((4950 - 4800) + 1) + 4800;\n working(workInterval, false);\n\n System.out.println(\"Developer \" + this.getName() +\n \" Goes to afternoon meeting at \" + team.getLead().getPM().getClockTime());\n \n //Wait for that afternoon meeting to kick off\n team.getLead().getPM().getAfternoonMeetingBarrier().await();\n\n //After the meeting, get ready to go home and end the day\n int dillyDallyBeforeHome = rng.nextInt((150 - 10) + 1) + 10;\n Thread.sleep(dillyDallyBeforeHome);\n\n //Leave after afternoon meeting is complete\n System.out.println(\"Developer \" + this.getName() +\n \" is heading home at \" + team.getLead().getPM().getClockTime());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private MapWritable reportForDuty(final Sleeper sleeper) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Telling master at \" +\n conf.get(MASTER_ADDRESS) + \" that we are up\");\n }\n HMasterRegionInterface master = null;\n while (!stopRequested.get() && master == null) {\n try {\n // Do initial RPC setup. The final argument indicates that the RPC\n // should retry indefinitely.\n master = (HMasterRegionInterface)HbaseRPC.waitForProxy(\n HMasterRegionInterface.class, HMasterRegionInterface.versionID,\n new HServerAddress(conf.get(MASTER_ADDRESS)).getInetSocketAddress(),\n this.conf, -1);\n } catch (IOException e) {\n LOG.warn(\"Unable to connect to master. Retrying. Error was:\", e);\n sleeper.sleep();\n }\n }\n this.hbaseMaster = master;\n MapWritable result = null;\n long lastMsg = 0;\n while(!stopRequested.get()) {\n try {\n this.requestCount.set(0);\n this.serverInfo.setLoad(new HServerLoad(0, onlineRegions.size(), 0, 0));\n lastMsg = System.currentTimeMillis();\n result = this.hbaseMaster.regionServerStartup(serverInfo);\n break;\n } catch (Leases.LeaseStillHeldException e) {\n LOG.info(\"Lease \" + e.getName() + \" already held on master. Check \" +\n \"DNS configuration so that all region servers are\" +\n \"reporting their true IPs and not 127.0.0.1. Otherwise, this\" +\n \"problem should resolve itself after the lease period of \" +\n this.conf.get(\"hbase.master.lease.period\")\n + \" seconds expires over on the master\");\n } catch (IOException e) {\n LOG.warn(\"error telling master we are up\", e);\n }\n sleeper.sleep(lastMsg);\n }\n return result;\n }", "public Status waitUntilFinished();", "@Override\n public HealthCheckResponse call() {\n HealthCheckResponseBuilder hcrb = HealthCheckResponse.named(\"WorldClockAPIHealtCheck\");\n try(Socket socket = new Socket()) {\n socket.connect(new InetSocketAddress(\"worldclockapi.com\", 80), 1000);\n hcrb.up();\n } catch (IOException e) {\n hcrb.down();\n }\n return hcrb.build();\n }", "public void run() {\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"before job: \" + PingServersEndpoint.status.get( usertoken ) );\r\n\t\tint count = 0;\r\n\t\t\r\n\t\t// grab the ip range\r\n\t\tlong startIp = PingThreadJob.ipToLong( ip_start );\r\n\t\tlong endIp = PingThreadJob.ipToLong( ip_end );\r\n\t\tlong currentIp = startIp;\r\n\t\t\r\n\t\t\r\n\t\twhile( PingServersEndpoint.status.get( usertoken ) && (currentIp <= endIp) ) {\r\n\t\t\tcount++;\r\n\t\t\r\n\t\t\t\r\n\t\t\t// find the range we want to \r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Loop count : \" + count );\r\n\t\t\tSystem.out.println(\"Found check : \" + PingServersEndpoint.status.get( usertoken ));\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString currentIp_string = PingThreadJob.longToIp( currentIp );\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tPingJob job = new PingJob();\r\n\r\n\t\t\tLong ping = job.ping( currentIp_string, port );\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\tJSONObject resultPayload = new JSONObject();\r\n\t\t\t\t\r\n\t\t\t\tresultPayload.put(\"pingstatus\", \"good\" );\r\n\t\t\t\tresultPayload.put( \"ip\", currentIp_string );\r\n\t\t\t\tresultPayload.put( \"ip_num\", currentIp );\r\n\t\t\t\tresultPayload.put(\"port\", \"port\" );\r\n\t\t\t\t\r\n\t\t\t\tif( ping != null ) {\r\n\t\t\t\t\tresultPayload.put(\"accepting\", true );\r\n\t\t\t\t\tresultPayload.put( \"ping\", ping );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tresultPayload.put(\"accepting\", false );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tsession.getBasicRemote().sendText( resultPayload.toString() );\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n//\t\t\ttry {\r\n//\t\t\t\tThread.sleep(2000);\r\n//\t\t\t} catch (InterruptedException e) {\r\n//\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\te.printStackTrace();\r\n//\t\t\t} \r\n\t\t\t\r\n\t\t\tcurrentIp++;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Final count : \" + count );\r\n\t}", "void discoverFinished();", "private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}", "@LargeTest\n @Test\n public void testRequestActiveScanFromMultipleClients_suppressActiveScanAfter30Seconds()\n throws Exception {\n sendDiscoveryRequest(mReceiveMessenger1, new MediaRouteDiscoveryRequest(mSelector, true));\n\n // Sleep 10 seconds and request active scan from client 2.\n Thread.sleep(10000);\n sendDiscoveryRequest(mReceiveMessenger2, new MediaRouteDiscoveryRequest(mSelector, true));\n\n // Active scan should be true.\n assertTrue(sActiveScanCountDownLatch.await(TIME_OUT_MS, TimeUnit.MILLISECONDS));\n\n // Right before the last client times out, active scan flag should still be true.\n resetActiveAndPassiveScanCountDownLatches();\n assertFalse(sActiveScanCountDownLatch.await(\n MAX_ACTIVE_SCAN_DURATION_MS - 1000, TimeUnit.MILLISECONDS));\n\n // Right after the active scan duration passed, active scan flag should be false.\n resetActiveAndPassiveScanCountDownLatches();\n assertTrue(sPassiveScanCountDownLatch.await(1000 + TIME_OUT_MS, TimeUnit.MILLISECONDS));\n }", "public void ClickSearchOnline() throws InterruptedException {\n\n searchOnline.click();\n //sameOriginAndDestination();\n\n\n }", "@Test\r\n\tpublic void testNear() {\r\n\t\tlog.info(\"<<<<<<<<<<<<<<<<< testNear >>>>>>>>>>>>>>>>>>>>\");\r\n\t\t//DB db = mongo.getDB(Properties.getString(\"mongodb.db.locs\"));\r\n\t\tDBObject index = new BasicDBObject();\r\n\t\tindex.put(\"coords\", \"2dsphere\");\r\n\t\tmongoOps.getCollection(\"locations\").ensureIndex(index);\r\n\r\n\t\tList<Location> locations = locationService.findByCityAndState(\r\n\t\t\t\t\"Wheeling\", \"WV\");\r\n\r\n\t\tassertNotNull(\"locations[0] was null.\", locations.get(0));\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Wheeling\", locations.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"State was not correct.\", \"WV\", locations.get(0)\r\n\t\t\t\t.getState());\r\n\t\tassertEquals(\"ZipCode was not correct.\", \"26003\", locations.get(0)\r\n\t\t\t\t.getZipCode());\r\n\r\n\t\tList<Location> locales = this.locationService.findNear(locations.get(0)\r\n\t\t\t\t.getLongitude(), locations.get(0).getLatitude(), GeoUtils\r\n\t\t\t\t.milesToMeters(5));\r\n\r\n\t\tfor (Location locale : locales) {\r\n\t\t\tlog.info(locale.toString());\r\n\t\t}\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Yorkville\", locales.get(2)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"City was not correct.\", \"Glen Dale\", locales.get(14)\r\n\t\t\t\t.getCity());\r\n\t}", "static void hireLumberjacks(Direction dir) throws GameActionException {\n\t\tTreeInfo[] nearby = rc.senseNearbyTrees(-1, Team.NEUTRAL);\n\t\tif (nearby.length > 0) {\n\t\t\ttryBuildRobot(RobotType.LUMBERJACK, dir);\n\t\t}\n\t}", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "public void initialSearch() {\n Kinematics k = getTrustedRobotKinematics();\n //logger.info(\"Kinematics position is \" + k.getPosition());\n\n // Set the default planner.\n setPlanner(PlannerType.TRAPEZOIDAL);\n\n // For gateway no zones were defined yet.\n m_robot.setCheckZones(false);\n\n // Do a preliminary trajectory in a lawnmower pattern.\n Point startPoint = k.getPosition();\n runTrajectory(startPoint, m_lawnmowerTrajectory);\n m_initialSearchDone = true;\n }", "public void run() {\n Thread.currentThread().setPriority(Thread.NORM_PRIORITY);\n while( true ) {\n long currentTime = System.currentTimeMillis();\n for(H2ONode n: H2O.CLOUD._memary) {\n if (n == H2O.SELF) continue;\n for (RPC t : n.tasks()) {\n if (H2O.CLOUD.contains(t._target) ||\n // Also retry clients who do not appear to be shutdown\n (t._target._heartbeat._client && t._retry < HeartBeatThread.CLIENT_TIMEOUT)) {\n if (currentTime > (t._started + t._retry) && !t.isDone() && !t._nack) {\n if (++t._resendsCnt % 10 == 0)\n Log.warn(\"Got \" + t._resendsCnt + \" resends on task #\" + t._tasknum + \", class = \" + t._dt.getClass().getSimpleName());\n t.call();\n }\n } else { // Target is dead, nobody to retry to\n t.cancel(true);\n }\n }\n }\n long timeElapsed = System.currentTimeMillis() - currentTime;\n if(timeElapsed < 1000)\n try {Thread.sleep(1000-timeElapsed);} catch (InterruptedException e) {}\n }\n }", "public String[] search(boolean hybrid) {\n\t\t/*\n\t\t * Interrupt the think() thread so we can have the updated game tree\n\t\t */\n\t\t\n\t\t// MCTS and minimax response vars, respectively\n\t\tint[] response = null;\n\t\tString[] move = new String[2];\n\t\tint encodedM = 0;\n\t\tint[] m = new int[6];\n\t\t\n\t\tif(mcts) {\n\t\t\tmctsBoard = createBoard(g_board.getBoard());\n\t\t\tresponse = mcts();\n\t\t} else {\n\t\t\troot.setScore(0);\n\t\t\tleaves = 0;\n\t\t\t\n\t\t\t// Find the max or min value for the white or black player respectively\n\t\t\tfloat val = alphaBeta(root, max_depth, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, player);\n\t\t\t\n\t\t\t// Retrieve the move that has the min/max vlaue\n\t\t\tArrayList<Node> moves = root.getChildren();\n\t\t\tfor(Node n : moves) {\n\t\t\t\tif(Float.compare(n.value, val) == 0) {\n\t\t\t\t\tencodedM = n.move;\n\t\t\t\t\t\n\t\t\t\t\t// Play the move on the AI's g_board, set the root to this node and break out of the loop\n\t\t\t\t\tg_board.doMove(n.move);\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Switch to Monte Carlo after a set amount of moves\n\t\t\tturns += 2;\n\t\t\tif(turns > 40) {\n\t\t\t\tmcts = true;\n\t\t\t\tfirstMoves = new ArrayList<Node>();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Reset the root rather than set it to a branch since we can currently only achieve a depth of 2-ply\n\t\troot.getChildren().clear();\n\t\t\n\t\t// If we ran MCTS\n\t\tif(response != null) {\n\t\t\tencodedM = response[0];\n\t\t\tSystem.out.println(\"Simulations run: \" + response[3] + \"\\tConfidence: \" + response[1] + \"%\");\n\t\t}\n\t\t\n\t\t// Decode the move\n\t\tfor(int i = 0; i < 6; i++) {\n\t\t\tm[i] = encodedM & 0xf;\n\t\t\tencodedM >>= 4;\n\t\t}\n\t\t\n\t\t// Convert the array into a string array with the format [0] => \"a7-b7\", [1] => \"b5\"\n\t\tmove[0] = ((char)(m[0] + 97)) + \"\" + (m[1]) + \"-\" + ((char)(m[2] + 97)) + \"\" + (m[3]);\n\t\tmove[1] = ((char)(m[4] + 97)) + \"\" + (m[5]);\n\t\t\n\t\t/*\n\t\t * Start the think() thread\n\t\t */\n\t\t\n\t\treturn move;\n\t}", "private static void soldierCode() throws GameActionException {\n\t\tRobotInfo[] visibleEnemyArray = rc.senseHostileRobots(rc.getLocation(), 1000000);\n\t\tSignal[] incomingSignals = rc.emptySignalQueue();\n\t\tfor(Signal s:incomingSignals){\n\t\t\tint[] message = s.getMessage();\n\t\t\tif(s.getTeam()==rc.getTeam()){\n\t\t\t\tif(message!=null){\n\t\t\t\t\tif(message[0]%10==0){\n\t\t\t\t\t\tint x = message[1]/100000;\n\t\t\t\t\t\tint y = message[1]%100000;\n\t\t\t\t\t\tcenter= new MapLocation(x,y);\n\t\t\t\t\t\tint r = message[0]/10;\n\t\t\t\t\t\tradius=r;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint dist = rc.getLocation().distanceSquaredTo(center);\n\t\tif (visibleEnemyArray.length==0) {\n\t\t\tif (goal!=null&&(rc.senseRubble(goal)<100 || rc.senseRobotAtLocation(goal)!=null)) {\n\t\t\t\tgoal = null;\n\t\t\t\trc.setIndicatorString(0, \"done clearing\");\n\t\t\t}\t\n\t\t\tif(goal==null) {\n\t\t\t\tMapLocation[] locs = MapLocation.getAllMapLocationsWithinRadiusSq(rc.getLocation(), 8);\n\t\t\t\tArrayList<MapLocation> inside = new ArrayList<MapLocation>();\n\t\t\t\tfor(MapLocation loc: locs) {\n\t\t\t\t\tif (loc.distanceSquaredTo(center)<=1.5*radius) {\n\t\t\t\t\t\tinside.add(loc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(MapLocation l: inside) {\n\t\t\t\t\tif (rc.senseRubble(l)>99 && rc.senseRobotAtLocation(l)==null) {\n\t\t\t\t\t\tgoal = l;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tUtility.tryToMove(goal);\n\t\t\t}\n\t\t\t\n\t\t\tif (dist>radius && dist< 4*radius) { //Explore\n\t\t\t\tMapLocation travel = soldierFind();\n\t\t\t\tUtility.tryToMove(travel);\n\t\t\t}else{ //Move back\n\t\t\t\tMapLocation loc = center.add(center.directionTo(rc.getLocation()), (int)Math.pow(radius, 0.5)+1);\n\t\t\t\tUtility.tryToMove(loc);\n\t\t\t}\n\t\t} else { //Kite\n\t\t\tkite(visibleEnemyArray);\n\t\t}\n\t}", "public Future<Boolean> ping() throws DynamicCallException, ExecutionException {\n return call(\"ping\");\n }", "private void waitOnFabric(int additional) {\n try {\n out(\"Wait %d milliseconds for peers to sync with each other\", gossipWaitTime + additional);\n TimeUnit.MILLISECONDS.sleep(gossipWaitTime + additional);\n } catch (InterruptedException e) {\n fail(\"should not have jumped out of sleep mode. No other threads should be running\");\n }\n }", "String run(LocationManagerBlockingStub blockingStub) throws Exception;", "@Scheduled(cron = \"0 35 19 ? * 1-7\")\n @Async\n protected void updateNewYork730Results() throws IOException {\n LotteryResult lotteryResult = americanaService.updateNewYork730Results(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"updateNewYork730Results job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n }", "@SuppressWarnings(\"unused\")\n public void run() {\n Iterator<String> i;\n String key;\n Session bot;\n ChildBot childBot;\n long currentTime = 0;\n long lastStateDetection = 0;\n int SQLStatusTime = 0;\n final int DETECTION_TIME = 5000;\n\n while( m_botAction.getBotState() != Session.NOT_RUNNING ) {\n if( SQLStatusTime == 2400 ) {\n SQLStatusTime = 0;\n m_botAction.getCoreData().getSQLManager().printStatusToLog();\n }\n\n try {\n currentTime = System.currentTimeMillis() + 1000;\n\n if( m_spawnQueue.isEmpty() == false ) {\n if( !m_spawnBots ) {\n childBot = m_spawnQueue.remove(0);\n\n if(childBot.getBot() != null) {\n m_botStable.remove( childBot.getBot().getBotName() );\n addToBotCount( childBot.getClassName(), (-1) );\n }\n\n if(childBot.getCreator() != null) {\n m_botAction.sendSmartPrivateMessage( childBot.getCreator(), \"Bot failed to log in. Spawning of new bots is currently disabled.\");\n }\n\n m_botAction.sendChatMessage( 1, \"Bot of type \" + childBot.getClassName() + \" failed to log in. Spawning of new bots is currently disabled.\");\n\n } else if( m_lastSpawnTime + SPAWN_DELAY < currentTime ) {\n childBot = m_spawnQueue.remove( 0 );\n bot = childBot.getBot();\n\n bot.start();\n\n while( bot.getBotState() == Session.STARTING ) {\n Thread.sleep( 5 );\n }\n\n if( bot.getBotState() == Session.NOT_RUNNING ) {\n removeBot( bot.getBotName(), \"log in failure; possible bad login/password\" );\n m_botAction.sendSmartPrivateMessage( childBot.getCreator(), \"Bot failed to log in. Verify login and password are correct.\" );\n m_botAction.sendChatMessage( 1, \"Bot of type \" + childBot.getClassName() + \" failed to log in. Verify login and password are correct.\" );\n } else {\n if(childBot.getCreator() != null) {\n m_botAction.sendSmartPrivateMessage( childBot.getCreator(), \"Your new bot is named \" + bot.getBotName() + \".\" );\n m_botAction.sendChatMessage( 1, childBot.getCreator() + \" spawned \" + childBot.getBot().getBotName() + \" of type \" + childBot.getClassName() );\n } else\n m_botAction.sendChatMessage( 1, \"AutoLoader spawned \" + childBot.getBot().getBotName() + \" of type \" + childBot.getClassName() );\n }\n\n m_lastSpawnTime = currentTime;\n }\n }\n\n // Removes bots that are no longer running.\n if( lastStateDetection + DETECTION_TIME < currentTime ) {\n for( i = m_botStable.keySet().iterator(); i.hasNext(); ) {\n key = i.next();\n childBot = m_botStable.get( key );\n\n if( childBot.getBot().getBotState() == Session.NOT_RUNNING && key != null) {\n String removalStatus = removeBot( key );\n\n if( key == null )\n m_botAction.sendChatMessage( 1, \"NOTICE: Unknown (null) bot disconnected without being properly released from stable.\" );\n else\n m_botAction.sendChatMessage( 1, key + \"(\" + childBot.getClassName() + \") \" + removalStatus + \".\" );\n\n childBot = null;\n }\n }\n\n lastStateDetection = currentTime;\n }\n\n SQLStatusTime++;\n Thread.sleep( 1000 );\n } catch( ConcurrentModificationException e ) {\n //m_botAction.sendChatMessage( 1, \"Concurrent modification. No state detection done this time\" );\n } catch( Exception e ) {\n Tools.printStackTrace( e );\n }\n }\n }", "public void initiate() {\n // all we know is neighbours\n Set<Integer> idsToSend = neighbours.stream().map(Bunker::getId).collect(Collectors.toSet());\n sendGetCount(idsToSend);\n }", "@Override\n public void run() {\n List<Integer> list = new ArrayList<Integer>();\n int num_peer = P.peer_port.length;\n int ind = -1;\n while (P.choke_thread_running) {\n synchronized (P.lock_current_neighbors) { //lock the object\n for (int i = 0; i < num_peer; i++) {\n list.add(i);\n }\n //select randomly.\n java.util.Collections.shuffle(list);\n int[] cn = P.current_neighbors.clone();\n Arrays.sort(cn);\n for (int i = 0; i < num_peer; i++) {\n int ind2 = list.get(i);\n if (P.is_interested[ind2] && Arrays.binarySearch(cn, P.peer_id[ind2]) < 0 && P.peer_id[ind2] != P.id && P.sockets[ind2]!=null) {\n ind = ind2;\n P.current_neighbors[P.current_neighbors.length - 1] = P.peer_id[ind];\n break;\n }\n\n }\n }\n //send unchoke message.\n Message msg = new Message();\n msg.length = 0; //no payload.\n msg.type = 1; //unchoke.\n msg.payload = null; //no payload.\n \n if (ind >= 0) //there is someone interested in my data.\n {\n P.send(P.peer_id[ind], msg);\n P.print(\"OptChoke unchoked peer with id \" + P.peer_id[ind]);\n }\n ind = -1;\n //print debugging info.\n \n //sleep some interval.\n try {\n Thread.sleep(1000 * P.optimistic_unchoking_interval);\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n }\n }", "@Override\n public void run() {\n\n try {\n LocalDateTime now = LocalDateTime.now();\n voda bot = new voda();\n\n List<Integer> notifyTime = Arrays.asList(7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23);\n int currentHour = now.getHour();\n\n ArrayList<Integer> consulted = dbmodel.MysqlCon.getFollowers();\n\n for (Integer ntime : notifyTime) {\n if (ntime == currentHour) {\n for (Integer consultedUser : consulted) {\n bot.sendTextToIdMessage(consultedUser, dbmodel.MysqlCon.getEveryDayWaterUserWaterCountView(consultedUser));\n }\n }\n }\n\n\n } catch (Exception e) {\n System.out.println();\n }\n }", "ProbeResult run();", "@Test\n public void retrieveSingleScanResultsBeforeAnySingleScans() throws Exception {\n startServiceAndLoadDriver();\n Handler handler = mock(Handler.class);\n BidirectionalAsyncChannel controlChannel = connectChannel(handler);\n InOrder order = inOrder(handler, mWifiScannerImpl);\n\n controlChannel.sendMessage(\n Message.obtain(null, WifiScanner.CMD_GET_SINGLE_SCAN_RESULTS, 0));\n mLooper.dispatchAll();\n Message response = verifyHandleMessageAndGetMessage(order, handler);\n\n List<ScanResult> results = Arrays.asList(\n ((WifiScanner.ParcelableScanResults) response.obj).getResults());\n assertEquals(results.size(), 0);\n }", "private void startPinging() {\n Bukkit.getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() {\n @Override\n public void run() {\n HashSet<Connection> connectionsSet = new HashSet<>(connections); //Create new hashset of connections\n for (Connection connection : connectionsSet) { //Loop thru connections\n boolean stillInConnections = false;\n synchronized (connections) { //Check if connection still in the array\n if (connections.contains(connection)) {\n stillInConnections = true;\n }\n }\n if (stillInConnections) { //If still in array\n try { //Try to ping\n connection.isValid(5);\n } catch (SQLException e) { //If not valid anymore\n synchronized (connections) { //Remove from array\n connections.remove(connection);\n }\n closeConnection(connection); //Close the connection\n }\n }\n }\n }\n }, 17000, 17000);\n }", "public void sleepCheck() {\n if (area() == null)\n stopActing();\n if (area().closed || area().closeRequested)\n stopActing();\n if (commander.player() == null || commander.player().area() != area()) {\n if (!area().getLabel().equals(\"TITLE\"))\n stopActing();\n } else {\n wakeCheck(commander.player().areaX(), commander.player().areaY());\n }\n }", "@Test\n\tpublic void testNearbyQuery() throws Exception {\n\t\tDefaultEventInfo event = new DefaultEventInfo();\n\t\tevent.setTime(new Date());\n\t\tevent.setLatitude(new BigDecimal(\"34\"));\n\t\tevent.setLongitude(new BigDecimal(\"-118\"));\n\t\tevent.setDepth(new BigDecimal(\"1.32\"));\n\t\tevent.setMagnitude(new BigDecimal(\"4.5\"));\n\n\t\tEventQuery query;\n\t\tEventComparison criteria = testAssociator.getNearbyCriteria();\n\n\t\ttestAssociator.getNearbyEvents(event, null);\n\t\tquery = testService.lastQuery;\n\t\tlong milliseconds = testAssociator.getNearbyCriteria().getTimeDifference()\n\t\t\t\t.multiply(new BigDecimal(\"1000\")).longValue();\n\t\tAssert.assertEquals(\"expected start time\", query.getStartTime(), new Date(\n\t\t\t\tevent.getTime().getTime() - milliseconds));\n\t\tAssert.assertEquals(\"expected end time\", query.getEndTime(), new Date(event\n\t\t\t\t.getTime().getTime() + milliseconds));\n\t\tAssert.assertEquals(\"expected latitude\", event.getLatitude(),\n\t\t\t\tquery.getLatitude());\n\t\tAssert.assertEquals(\"expected longitude\", event.getLongitude(),\n\t\t\t\tquery.getLongitude());\n\t\tAssert.assertEquals(\n\t\t\t\t\"expected radius\",\n\t\t\t\tcriteria.getLocationDifference().divide(\n\t\t\t\t\t\tEventIDAssociator.KILOMETERS_PER_DEGREE, MathContext.DECIMAL32),\n\t\t\t\tquery.getMaxRadius());\n\t\tAssert.assertEquals(\"expected min depth\",\n\t\t\t\tevent.getDepth().subtract(criteria.getDepthDifference()),\n\t\t\t\tquery.getMinDepth());\n\t\tAssert.assertEquals(\"expected max depth\",\n\t\t\t\tevent.getDepth().add(criteria.getDepthDifference()),\n\t\t\t\tquery.getMaxDepth());\n\t\tAssert.assertEquals(\"expected min magnitude\", event.getMagnitude()\n\t\t\t\t.subtract(criteria.getMagnitudeDifference()), query.getMinMagnitude());\n\t\tAssert.assertEquals(\"expected max magnitude\",\n\t\t\t\tevent.getMagnitude().add(criteria.getMagnitudeDifference()),\n\t\t\t\tquery.getMaxMagnitude());\n\n\t\tAssert.assertNull(\"expected null network\", query.getCatalog());\n\n\t\ttestAssociator.getNearbyEvents(event, \"testnetwork\");\n\t\tquery = testService.lastQuery;\n\t\tAssert.assertEquals(\"expected null network\", \"testnetwork\",\n\t\t\t\tquery.getCatalog());\n\n\t\ttry {\n\t\t\ttestAssociator.getNearbyEvents(new DefaultEventInfo(), null);\n\t\t\tAssert.fail(\"empty event should throw exception\");\n\t\t} catch (IllegalArgumentException iae) {\n\t\t\t// expected\n\t\t}\n\t}", "private void processPeers() {\n\t\tif (System.currentTimeMillis() - lastPeerUpdate > 20000) {\n\t\t\tupdatePeers();\n\t\t\tlastPeerUpdate = System.currentTimeMillis();\n\t\t}\n\t\tif (System.currentTimeMillis() - lastPeerCheck > 5000) {\n\t\t\tcleanPeerList();\n\t\t\tlastPeerCheck = System.currentTimeMillis();\n\t\t}\n\t}", "private void waitWhileShipPlacement(Player player) {\n\t\twhile (true) {\n\t\t\tif (player.isReadyWithPlaceShips()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\n\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n\n try {\n startup();\n } catch (UnknownHostException e) {\n e.printStackTrace();\n currentPosition = destination;\n }\n\n while (currentPosition.longitude != destination.longitude && currentPosition.latitude != destination.latitude) {\n try {\n while ((routePositions.size() - 1) > nextRoutePositionIndex && currentPosition.getLongitude() != this.routePositions.get(nextRoutePositionIndex).getLongitude() && currentPosition.getLatitude() != this.routePositions.get(nextRoutePositionIndex).getLatitude()) {\n Thread.sleep(TIMEOUT);\n\n //diceBraking();\n properBraking();\n accelerate();\n calculateDirection(currentPosition, this.routePositions.get(nextRoutePositionIndex));\n currentPosition = drive(\n currentPosition.getLatitude(), currentPosition.getLongitude(),\n this.routePositions.get(nextRoutePositionIndex).getLatitude(), this.routePositions.get(nextRoutePositionIndex).getLongitude()\n );\n\n\n publishPosition();\n if (currentPosition.latitude == currentPosition.latitude && currentPosition.longitude == destination.longitude) {\n break;\n }\n System.out.println(\"id: \" + id + \" Pos: \" + currentPosition.latitude + \"|\" + currentPosition.longitude);\n }\n if (nextRoutePositionIndex < routePositions.size()) {\n nextRoutePositionIndex++;\n } else {\n break;\n }\n } catch (InterruptedException | MalformedURLException exc) {\n exc.printStackTrace();\n }\n\n }\n\n for (int i = 0; i < 100; i++) {\n System.out.println(\"FINISHED \" + id);\n }\n\n try {\n publishFinished();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetLocation();\r\n\t\t\t\t\tstartLooping();\r\n\t\t\t\t}", "@Override\n public void run() {\n if (nearMe.size() < HelperConstants.MAX_BYZANTINE_USERS + 1) {\n // If there are less nearby neighbors than required, there is no need to ask for proofs\n return;\n }\n\n for (GridUser gridUser: nearMe) {\n int targetPort = Utils.getListenerServicePortFromId(gridUser.getId());\n\n Thread t = new Thread(() -> sendRecordAndReceive(myRequest, gridUser, targetPort));\n t.start();\n ongoingProofRequests.add(t);\n }\n\n try {\n for (Thread t: ongoingProofRequests) {\n t.join();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n for (Thread t: ongoingProofRequests) t.interrupt();\n }\n }", "@Override\n public void run(){\n\n boolean gotReady = false;\n\n try {\n player.sendCommandToPlayer(new Command(CommandTypes.waitingForClientToGetReady , null));\n } catch (IOException e) {\n God.removeOfflinePlayerNotifyOthers(player);\n }\n\n while (! gotReady){\n try {\n Command command = player.receivePlayerRespond();\n\n if(command.getType() == CommandTypes.imReady){\n gotReady = true;\n }\n\n else {\n God.doTheCommand(command);\n }\n\n } catch (IOException e) {\n God.removeOfflinePlayerNotifyOthers(player);\n break;\n }\n }\n }", "public void alertTheWaiter(){\n Chef c = (Chef) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = c.getChefID();\n \tstate_fields[1] = c.getChefState();\n\n Message m_toServer = new Message(1, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n \t}\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n c.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }", "public void testRunning()\n\t\t{\n\t\t\tInvestigate._invData.clearStores();\n\n\t\t\tfinal WorldLocation topLeft = SupportTesting.createLocation(0, 10000);\n\t\t\ttopLeft.setDepth(-1000);\n\t\t\tfinal WorldLocation bottomRight = SupportTesting.createLocation(10000, 0);\n\t\t\tbottomRight.setDepth(1000);\n\t\t\tfinal WorldArea theArea = new WorldArea(topLeft, bottomRight);\n\t\t\tfinal RectangleWander heloWander = new RectangleWander(theArea,\n\t\t\t\t\t\"rect wander\");\n\t\t\theloWander.setSpeed(new WorldSpeed(20, WorldSpeed.Kts));\n\t\t\tfinal RectangleWander fishWander = new RectangleWander(theArea,\n\t\t\t\t\t\"rect wander 2\");\n\n\t\t\tRandomGenerator.seed(12);\n\n\t\t\tWaterfall searchPattern = new Waterfall();\n\t\t\tsearchPattern.setName(\"Searching\");\n\n\t\t\tTargetType theTarget = new TargetType(Category.Force.RED);\n\t\t\tInvestigate investigate = new Investigate(\"investigating red targets\",\n\t\t\t\t\ttheTarget, DetectionEvent.IDENTIFIED, null);\n\t\t\tsearchPattern.insertAtHead(investigate);\n\t\t\tsearchPattern.insertAtFoot(heloWander);\n\n\t\t\tfinal Status heloStat = new Status(1, 0);\n\t\t\theloStat.setLocation(SupportTesting.createLocation(2000, 4000));\n\t\t\theloStat.getLocation().setDepth(-200);\n\t\t\theloStat.setCourse(270);\n\t\t\theloStat.setSpeed(new WorldSpeed(100, WorldSpeed.Kts));\n\n\t\t\tfinal Status fisherStat = new Status(1, 0);\n\t\t\tfisherStat.setLocation(SupportTesting.createLocation(4000, 2000));\n\t\t\tfisherStat.setCourse(155);\n\t\t\tfisherStat.setSpeed(new WorldSpeed(12, WorldSpeed.Kts));\n\n\t\t\tfinal DemandedStatus dem = null;\n\n\t\t\tfinal SimpleDemandedStatus ds = (SimpleDemandedStatus) heloWander.decide(\n\t\t\t\t\theloStat, null, dem, null, null, 100);\n\n\t\t\tassertNotNull(\"dem returned\", ds);\n\n\t\t\t// ok. the radar first\n\t\t\tASSET.Models.Sensor.Lookup.RadarLookupSensor radar = new RadarLookupSensor(\n\t\t\t\t\t12, \"radar\", 0.04, 11000, 1.2, 0, new Duration(0, Duration.SECONDS),\n\t\t\t\t\t0, new Duration(0, Duration.SECONDS), 9200);\n\n\t\t\tASSET.Models.Sensor.Lookup.OpticLookupSensor optic = new OpticLookupSensor(\n\t\t\t\t\t333, \"optic\", 0.05, 10000, 1.05, 0.8, new Duration(20,\n\t\t\t\t\t\t\tDuration.SECONDS), 0.2, new Duration(30, Duration.SECONDS));\n\n\t\t\tHelo helo = new Helo(23);\n\t\t\thelo.setName(\"Merlin\");\n\t\t\thelo.setCategory(new Category(Category.Force.BLUE,\n\t\t\t\t\tCategory.Environment.AIRBORNE, Category.Type.HELO));\n\t\t\thelo.setStatus(heloStat);\n\t\t\thelo.setDecisionModel(searchPattern);\n\t\t\thelo.setMovementChars(HeloMovementCharacteristics.getSampleChars());\n\t\t\thelo.getSensorFit().add(radar);\n\t\t\thelo.getSensorFit().add(optic);\n\n\t\t\tSurface fisher2 = new Surface(25);\n\t\t\tfisher2.setName(\"Fisher2\");\n\t\t\tfisher2.setCategory(new Category(Category.Force.RED,\n\t\t\t\t\tCategory.Environment.SURFACE, Category.Type.FISHING_VESSEL));\n\t\t\tfisher2.setStatus(fisherStat);\n\t\t\tfisher2.setDecisionModel(fishWander);\n\t\t\tfisher2.setMovementChars(SurfaceMovementCharacteristics.getSampleChars());\n\n\t\t\tCoreScenario cs = new CoreScenario();\n\t\t\tcs.setScenarioStepTime(5000);\n\t\t\tcs.addParticipant(helo.getId(), helo);\n\t\t\tcs.addParticipant(fisher2.getId(), fisher2);\n\n\t\t\t// ok. just do a couple of steps, to check how things pan out.\n\t\t\tcs.step();\n\n\t\t\tSystem.out.println(\"started at:\" + cs.getTime());\n\n\t\t\tDebriefReplayObserver dro = new DebriefReplayObserver(\"./test_reports/\",\n\t\t\t\t\t\"investigate_search.rep\", false, true, true, null, \"plotter\", true);\n\t\t\tTrackPlotObserver tpo = new TrackPlotObserver(\"./test_reports/\", 300,\n\t\t\t\t\t300, \"investigate_search.png\", null, false, true, false, \"tester\",\n\t\t\t\t\ttrue);\n\t\t\tdro.setup(cs);\n\t\t\ttpo.setup(cs);\n\t\t\t//\n\t\t\tdro.outputThisArea(theArea);\n\n\t\t\tInvestigateStore theStore = Investigate._invData.firstStore();\n\n\t\t\t// now run through to completion\n\t\t\tint counter = 0;\n\t\t\twhile ((cs.getTime() < 12000000)\n\t\t\t\t\t&& (theStore.getCurrentTarget(23) == null))\n\t\t\t{\n\t\t\t\tcs.step();\n\t\t\t\tcounter++;\n\t\t\t}\n\n\t\t\t// so, we should have found our tartget\n\t\t\tassertNotNull(\"found target\", theStore.getCurrentTarget(23));\n\n\t\t\t// ok. we've found it. check that we do transition to detected\n\t\t\tcounter = 0;\n\t\t\twhile ((counter++ < 100) && (theStore.getCurrentTarget(23) != null))\n\t\t\t{\n\t\t\t\tcs.step();\n\t\t\t}\n\n\t\t\tdro.tearDown(cs);\n\t\t\ttpo.tearDown(cs);\n\n\t\t\t// so, we should have cleared our tartget\n\t\t\tassertNull(\"found target\", theStore.getCurrentTarget(23));\n\t\t\tassertEquals(\"remembered contact\", 1, theStore.countDoneTargets());\n\n\t\t}", "private void loop() {\n\t\tif ( this.useRandomAddr()) {\n\t\t\tthis.changeBTAddress();\n\t\t}\n\t\n\t\t\n\t\t// schedule the BeaconOnTask which will then start the beacon cycle.\n\t\tthis.beaconTimer = new Timer();\n\t\tBeaconOn beaconOnTask = new BeaconOn( this);\t\t\n\t\tthis.beaconTimer.schedule( beaconOnTask, 0);\n\t\t\t\t\n\t\t// a periodic task to indicate change of BT address and renewal of proximity ID.\n\t\t// the interval is 10 minutes which if scheduling were real-time should cause distinct\n\t\t// ENINs to be used in proximity ID generation.\n\t\tthis.rollingProximityGenerationTimer = new Timer();\t\n\t\tTimerTask indicatorTask = new RollingProximityGenerationIndicator( this);\t\n\t\t\n\t\t// (task, delay in milli-seconds, period in milli-seconds). note that we are not scheduling on ENIN boundaries...\t\t\n\t\tthis.rollingProximityGenerationTimer.scheduleAtFixedRate( indicatorTask, ROLLING_PROXIMITY_INTERVAL, ROLLING_PROXIMITY_INTERVAL);\n\t\n\t}", "boolean hasParking();", "private void neighborhoodRequest(int neighborhoodId) throws Exception {\r\n WMBController controller = WMBController.getInstance();\r\n controller.getNeighborhoodAlerts(neighborhoodId, new Callback<List<NeighborhoodAlert>>() {\r\n @Override\r\n public void onResponse(Response<List<NeighborhoodAlert>> response, Retrofit retrofit) {\r\n List<NeighborhoodAlert> data = response.body();\r\n if (data.isEmpty()) {\r\n message.setVisibility(View.VISIBLE);\r\n } else {\r\n message.setVisibility(View.INVISIBLE);\r\n Collections.sort(data);\r\n loadNeighborhoodData(data);\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Throwable t) {\r\n // stuff to do when it doesn't work\r\n }\r\n });\r\n }", "void doCheckHealthy();", "@Ignore\n @Test\n public void startReiver() throws IOException, InterruptedException {\n\n final int maxPeers = 10;\n PeerDHT[] peers = createPeers(PORT, maxPeers, \"receiver\");\n for (int i = 1; i < maxPeers; i++) {\n \tPeerDHT peer = peers[i];\n peer.peer().bootstrap().peerAddress(peers[0].peer().peerAddress()).start().awaitUninterruptibly();\n peer.peer().objectDataReply(new ObjectDataReply() {\n @Override\n public Object reply(final PeerAddress sender, final Object request) throws Exception {\n System.out.println(\"got it!\");\n return \"recipient got it\";\n }\n });\n }\n Thread.sleep(Long.MAX_VALUE);\n }", "public Boolean isOnlineNet() {\n\n try {\n Process p = java.lang.Runtime.getRuntime().exec(\"ping -c 1 www.google.es\");\n\n int val = p.waitFor();\n boolean reachable = (val == 0);\n return reachable;\n\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return false;\n }", "public void findHouse() {\n\t\tSystem.out.println(\"找房子\");\n\t}", "public void waitForEndOfAllAjaxes(){\r\n\t\tLOGGER.info(Utilities.getCurrentThreadId()\r\n\t\t\t\t+ \" Wait for the page to load...\");\r\n\t\tWebDriverWait wait = new WebDriverWait(driver,Integer.parseInt(Configurations.TEST_PROPERTIES.get(ELEMENTSEARCHTIMEOUT)));\r\n\t\twait.until(new ExpectedCondition<Boolean>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean apply(WebDriver driver) {\r\n\t\t\t\t//\t\t\t\treturn (Boolean)((JavascriptExecutor)driver).executeScript(\"return jQuery.active == 0\");\r\n\t\t\t\treturn ((JavascriptExecutor)driver).executeScript(\"return document.readyState\").equals(\"complete\");\r\n\t\t\t\t//\t\t\t\t return Boolean.valueOf(((JavascriptExecutor) driver).executeScript(\"return (window.angular !== undefined) && (angular.element(document).injector() !== undefined) && (angular.element(document).injector().get('$http').pendingRequests.length === 0)\").toString());\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void waitServersReady() {\n }" ]
[ "0.6119908", "0.5491898", "0.5443948", "0.5430855", "0.54052186", "0.54051197", "0.53789014", "0.53501135", "0.53438425", "0.5338974", "0.532022", "0.5274425", "0.5265319", "0.5217376", "0.52161294", "0.51935023", "0.51238084", "0.5114967", "0.5114011", "0.51108664", "0.5103967", "0.50672626", "0.5065491", "0.5047648", "0.5037931", "0.50375855", "0.50114495", "0.4977835", "0.49529576", "0.4946189", "0.49440864", "0.49261227", "0.49102128", "0.49057296", "0.488805", "0.48859346", "0.48747393", "0.4862477", "0.48591456", "0.48464945", "0.48362023", "0.48133087", "0.48098013", "0.48075268", "0.4792872", "0.47829515", "0.47805566", "0.47800606", "0.4779321", "0.4778973", "0.4778973", "0.477256", "0.4766993", "0.47620052", "0.4761231", "0.4746777", "0.473878", "0.471914", "0.47124916", "0.4710439", "0.4706827", "0.46984294", "0.4694049", "0.46908358", "0.46900973", "0.46900973", "0.4686477", "0.46815598", "0.46698883", "0.46693763", "0.46675748", "0.46618095", "0.4657966", "0.4651283", "0.4649319", "0.4643592", "0.4629552", "0.4623895", "0.46179408", "0.46124756", "0.46114475", "0.46069866", "0.460525", "0.4602102", "0.45955676", "0.4595487", "0.45914334", "0.45831314", "0.45782277", "0.45754403", "0.45721695", "0.45682257", "0.45628095", "0.45597905", "0.4558857", "0.45580152", "0.4557396", "0.4556871", "0.45557123", "0.45547754" ]
0.4891992
34
Build call for addPaymentLinkConfiguration
public Call addPaymentLinkConfigurationCall(String generalContractId, PaymentLinkOptions body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/savePaymentLinkConfiguration" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "public abstract CONFIG build();", "public LinkBuilder() {\n }", "@NonNull\n\t\tConfig build();", "UpdateOperationConfiguration build();", "public void buildBridges() {\n\t\tList<MagneticComponent> firstTier = getValidLinks(0);\r\n\t\t\r\n\t\tbuildNextBridge(firstTier, 0);\r\n\t}", "java.lang.String getPaymentUrl();", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "BRMSPackageBuilder(PackageBuilderConfiguration config) {\n super(config);\n }", "public Builder setPaymentUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setPaymentUrl(value);\n return this;\n }", "public interface Config {\n String BASE_URL = \"http://www.chahuitong.com/\";\n\n String BASE_GOODS_DETAIL_URL = BASE_URL + \"wap/index.php/Home/Index/goods?goods_id=\";\n\n String BASE_GOODS_BODY_URL = BASE_URL + \"mobile/index.php?act=goods&op=goods_body&goods_id=\";\n\n /** 默认订单列表是否获取支付方式 */\n boolean DEFAULT_GET_PAYMENT = false;\n\n /** 默认列表页每页显示数量 */\n int DEFAULT_PAGE_SIZE = 20;\n\n // 这是Bmob的ApplicationId,用于初始化操作\n String applicationId = \"c9a6c7e8fe89e14a6458ed592209e96c\";\n\n // shopNc md5\n String MD5_KEY = \"804451dc13014b1c785fb73b1617b760\";\n\n // 用于服务端判断客户端类型\n String CLIENT_TYPE = \"android\";\n\n // 微信appID、appSecret\n String WX_ID = \"wx025bfd51ec3b664a\";\n String WX_SECRET =\"cdfc0e3a367f44bf4b22e41b4073f274\";\n\n // 微博appID appSecret\n String WB_ID = \"848852268\";\n String WB_SECRET = \"c312c8076d3289a648e7663787cfea86\";\n\n // QQ appID appSecret\n String QQ_ID = \"1104563629\";\n String QQ_SECRET = \"rJbMttJCa47MBsCk\";\n}", "public void addPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "void makeConfig()\n\t{\n\t\t\t\t\n\t\tbuf.append(\"\\t\\tUplink Setup Work order for \" + myDay.toString() + \" Rel 0.2\\n\");\n\t\tbuf.append(\"\\t\\t-----------------------------------------------------------------\\n\\n\");\n\t\t\n\t\tbuf.append(\"\\n1. Channel : \" + channelNumber + \" RF Source : \" + (rfSource==0?\"ASI\":(rfSource==1?\"RF\":\"MPEGoIP\")) + \"\\n\");\n\t\tbuf.append(\"\\n2. Physical Connection : \" + param.get(16) + \"\\n\");\t\n\t\t\n\t\t\n\t\tbuf.append(\"\\n3. Input Test Case : \" + Utility.getIntVal(param.get(1)) + \"\\n\\n\");\n\t\tString[] inpTCParamName = new String[] {\"TC Name\", \"Format/Modulation\", \"Rate (Msym)\", \"Bandwidth (Mbit)\"};\n\t\tprintTCParam(4, 13, Utility.getIntVal(param.get(1)), inpTCParamName);\n\t\t\n\t\tbuf.append(\"\\n4. CA Test Case : \" + Utility.getIntVal(param.get(2)) + \"\\n\\n\");\n\t\tString[] caTCParamName = new String[] {\"Scrambling Mode\", \"#Signal Source\", \"#DCD\", \"#Algorithm\", \"MSK\", \"Channel Setup\"};\n\t\tprintTCParam(5, 10, Utility.getIntVal(param.get(2)), caTCParamName);\n\n\t\tbuf.append(\"\\n5. Video Test Case : \" + Utility.getIntVal(param.get(3)) + \"\\n\\n\");\n\t\tString[] vidTCParamName = new String[] {\"Video Format\", \"Picture (resolution)\", \"Profile/Feature\", \"GOP Settings\", \"3:2 PullDown\", \n\t\t\t\t \t\t\t\t\"Video Bit Rate\", \"Video Rate\", \"#Encoder Parameters\"};\n\t\tprintTCParam(7, 8, Utility.getIntVal(param.get(3)), vidTCParamName);\n\t\n\t\tbuf.append(\"\\n6. Audio#1 Test Case : \" + Utility.getIntVal(param.get(4)) + \"\\n\\n\");\n\t\tString[] audTCParamName = new String[] {\"TC Name\", \"#Audio Type\", \"#Bit Rates\", \"#Encoder Flags #1\", \"#Encoder Flags #2\",\n \"#Encoder 1:Stereo\", \"#Encoder 2:Dual Mono\", \"#Encoder 3:Single Mono\", \n \"#Encoder 4:3/2 Surround & 5.1\", \"#PCM/Compress\", \"#DDP Mode\", \"#1:Stereo\", \n \"#2:Dual Mono\", \"#3:Single Mono\", \"#4:3/2 Surround & 5.1\"};\n\t\tprintTCParam(6, 10, Utility.getIntVal(param.get(4)), audTCParamName);\n\t\n\t\tbuf.append(\"\\n7. Audio#2 Test Case :\" + Utility.getIntVal(param.get(5)) + \"\\n\\n\");\n\t\tprintTCParam(6, 10, Utility.getIntVal(param.get(4)), audTCParamName);\n\n\t\tbuf.append(\"\\n8. Trancode#1 Test Case : \" + Utility.getIntVal(param.get(6)) + \" subject of automatic setup\\n\");\n\t\t\n\t\tbuf.append(\"\\n9. Trancode#2 Test Case : \" + Utility.getIntVal(param.get(7)) + \" subject of automatic setup\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n10. Subtitle Test Case : \" + Utility.getIntVal(param.get(8)) + \"\\n\\n\");\n\t\tString[] sbtTCParamName = new String[] {\"TC Name\", \"Video Std\", \"Subtitle Std\", \"#Stream/Subtitle enc\"};\n\t\tprintTCParam(8, 10, Utility.getIntVal(param.get(8)), sbtTCParamName);\n\t\n\t\tbuf.append(\"\\n11. VBI Test Case : \" + Utility.getIntVal(param.get(9)) + \"\\n\\n\");\n\t\tString[] vbiTCParamName = new String[] {\"TC Name\", \"#Video Frame Rate\", \"#NABTS\", \"#WST\", \"#Invert WST\", \"#VITC PAL(1)\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"#AMOL-I(3)\", \"#AMOL-II(3)\", \"#VPS\", \"#WSS\", \"#VITS\", \"#GEMTAR(1x)(2)\", \n\t\t\t\t\t\t\t\t\t\t\t\t\"#GEMTAR(2x)(2)\", \"#Monochrome\", \"#VBItotal bit rate (KBits)\"};\n\t\tprintTCParam(9, 9, Utility.getIntVal(param.get(9)), vbiTCParamName);\n\t\t\n\t\tbuf.append(\"\\n12. LSD Test Case : \" + Utility.getIntVal(param.get(10)) + \"\\n\\n\");\n\t\tString[] lsdTCParamName = new String[] {\"TC Name\", \"#Data rate\"};\n\t\tprintTCParam(10, 9, Utility.getIntVal(param.get(10)), lsdTCParamName);\n\t\n\t\tbuf.append(\"\\n13. MPE Test Case : \" + Utility.getIntVal(param.get(11)) + \"\\n\\n\");\n\t\tString[] mpeTCParamName = new String[] {\"TC Name\", \"#PIDs\", \"Rate per PID (Mbits)\", \"Aggregate Rate (Mbits)\", \"Frame Size\", \"Flow Type\"};\n\t\tprintTCParam(11, 8, Utility.getIntVal(param.get(11)), mpeTCParamName);\n\t\t\n\t\tbuf.append(\"\\n14. FPT Test Case : \" + (Utility.getIntVal(param.get(12))==1?\"Yes\":\"No\") + \"\\n\");\n\t\t\n\t\tbuf.append(\"\\n15. CC Test Case : \" + (Utility.getIntVal(param.get(13))==1?\"Yes\":\"No\") + \"\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n16. DPM 58/59 Test Case : \" + Utility.getIntVal(param.get(14)) + \" subject of automatic setup\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n17. DPM 24/54 Test Case : \" + Utility.getIntVal(param.get(15)) + \" subject of automatic setup\\n\");\t\n\n\t\tbuf.append(\"\\n\\n*** End of Uplink Setup Work order ***\\n\");\n\t\t\n\t\tString fileName = null;\n\t\ttry {\n\t\t\t SimpleDateFormat timeStamp = new SimpleDateFormat(\"dd-MMM-yyyy_HH-mm-ss\");\n\t\t\t Calendar cal = Calendar.getInstance();\n\t\t\t \n\t\t\t cal.setTime(myDay);\n\t\t\t fileName = STS.outputDirectory + \"\\\\\" + \"Uplink_Setup_\" + timeStamp.format(cal.getTime()) + \".txt\";\n\n\t\t\tFileOutputStream out = new FileOutputStream(fileName);\n\t\t\tout.write(buf.toString().getBytes());\n\t\t\tout.close();\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Can not write into file \" + fileName);\n\t\t}\n\n\t\t\n\t}", "public SSLConfig build()\n {\n return new SSLConfig(\n isClient, verifyMode, this.caPath, this.certPath, this.keyPath);\n }", "ShipmentGatewayConfig createShipmentGatewayConfig();", "protected void buildBootstrap() {\n String command = \"-prod -mac -o2 rom -strip:d j2me imp\";\n if (includeDebugger) {\n command += \" debugger\";\n }\n command += \" -- translator\";\n builder(command);\n }", "private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public PaymentType builder()\n {\n return new PaymentType(this);\n }", "protected DefaultLink(LinkBuilder builderObject) {\n srcDeviceId = builderObject.srcDeviceId();\n srcPortNumber = builderObject.srcPortNumber();\n dstDeviceId = builderObject.dstDeviceId();\n dstPortNumber = builderObject.dstPortNumber();\n leafType = builderObject.leafType();\n state = builderObject.state();\n isDurable = builderObject.isDurable();\n isExpected = builderObject.isExpected();\n valueLeafFlags = builderObject.valueLeafFlags();\n yangLinkOpType = builderObject.yangLinkOpType();\n isSubTreeFiltered = builderObject.isSubTreeFiltered();\n selectLeafFlags = builderObject.selectLeafFlags();\n yangAugmentedInfoMap = builderObject.yangAugmentedInfoMap();\n }", "public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }", "public Builder clearPaymentUrl() {\n copyOnWrite();\n instance.clearPaymentUrl();\n return this;\n }", "public void buildTwitterBaseConfiguration() {\n ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();\n configurationBuilder\n .setOAuthConsumerKey(getBaseContext().getString(R.string.consumer_key))\n .setOAuthConsumerSecret(getBaseContext().getString(R.string.consumer_secret))\n .setOAuthAccessToken(getBaseContext().getString(R.string.access_token))\n .setOAuthAccessTokenSecret(getBaseContext().getString(R.string.access_token_secret));\n\n Configuration configuration = configurationBuilder.build();\n\n twitterStreamFactory = new TwitterStreamFactory(configuration);\n }", "public void linkConfiguration(PolicyConfiguration link) throws PolicyContextException {\n\n assertStateIsOpen();\n\n\tString linkId = link.getContextID();\n\tif (this.CONTEXT_ID == linkId) {\n String defMsg=\"Operation attempted to link PolicyConfiguration to itself.\";\n String msg=localStrings.getLocalString(\"pc.unsupported_link_operation\",defMsg);\n\t logger.log(Level.WARNING,msg);\n\t throw new IllegalArgumentException(defMsg);\n\t}\n\n\tcheckSetPolicyPermission();\n\n\tupdateLinkTable(linkId);\n\n }", "Builder addSourceOrganization(Organization.Builder value);", "public Builder setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setPaymentUrlBytes(value);\n return this;\n }", "Builder addLicense(URL value);", "private void addAboutPay(ArrayList<Object> libValues, Apk apk) {\n\t\t// add column25:CMCC SDK App 是否包含CMCC的库 【移动支付】\n libValues.add(apk.isCmccApp() ? \"YES\" : \"NO\");\n // add column26:是否包含ChinaUnicom的库libme_unipay.so 【联通支付】\n libValues.add(apk.isChinaUnicom() ? \"YES\" : \"NO\");\n // add column27:是否包含ChinaTelecom的库[电信支付]\n libValues.add(apk.isChinaTelecom() ? \"YES\" : \"NO\");\n // add column28:是否包含ChinaUnionPay的库[银联支付]\n libValues.add(apk.isChinaUnionPay() ? \"YES\" : \"NO\");\n\t}", "void addLink(BlockChainLink link);", "@Contribute(BuilderDirector.class)\n\tpublic static void addBuilders(MappedConfiguration<Class, Builder> configuration)\n\t{\n//\t\tconfiguration.add(org.tynamo.examples.recipe.model.Recipe.class, new RecipeBuilder());\n\t}", "Builder addLicense(CreativeWork.Builder value);", "public static LinkBuilder builder() {\n return new LinkBuilder();\n }", "@Override\n\tpublic ContentValues BuildParams() {\n\t\tContentValues nContentValues = new ContentValues();\n\t\tnContentValues.put(\"cpn_ident\", mCouponNumber);\n\t\tif (mIsFastBy) {\n\t\t\tnContentValues.put(\"is_fastbuy\", \"1\");\n\t\t}\n\t\treturn nContentValues;\n\t}", "public io.opencannabis.schema.commerce.CommercialOrder.OrderPayment.Builder getPaymentBuilder() {\n \n onChanged();\n return getPaymentFieldBuilder().getBuilder();\n }", "private void buildOslpRequestSetConfiguration(final SetConfigurationDeviceRequest deviceRequest) {\n if (deviceRequest.getConfiguration().getRelayConfiguration() != null) {\n Collections.sort(\n deviceRequest.getConfiguration().getRelayConfiguration().getRelayMap(),\n (o1, o2) -> o1.getIndex().compareTo(o2.getIndex()));\n }\n\n final Oslp.SetConfigurationRequest setConfigurationRequest =\n this.mapper.map(deviceRequest.getConfiguration(), Oslp.SetConfigurationRequest.class);\n\n this.buildAndSignEnvelope(\n deviceRequest,\n Oslp.Message.newBuilder().setSetConfigurationRequest(setConfigurationRequest).build(),\n deviceRequest.getConfiguration());\n }", "private String setReferralzz(){\n String uid = mAuth.getCurrentUser().getUid();\n String link = INVITE_LINK+uid;\n FIRDynamicLinkComponents referalLink = new FIRDynamicLinkComponents(new NSURL(link) ,\"https://fingertipsandcompany.page.link\");\n\n FIRDynamicLinkIOSParameters iOSParameters = new FIRDynamicLinkIOSParameters(BUNDLE_ID);\n iOSParameters.setMinimumAppVersion(\"1.0.1\");\n iOSParameters.setAppStoreID(\"1496752335\");\n referalLink.setIOSParameters(iOSParameters);\n\n FIRDynamicLinkAndroidParameters androidParameters = new FIRDynamicLinkAndroidParameters(BUNDLE_ID);\n androidParameters.setMinimumVersion(125);\n referalLink.setAndroidParameters(androidParameters);\n\n\n referalLink.shorten(new VoidBlock3<NSURL, NSArray<NSString>, NSError>() {\n @Override\n public void invoke(NSURL shortURL, NSArray<NSString> nsStrings, NSError nsError) {\n if (nsError != null){\n System.out.println(\"Referal Link Shorter Error-------------------->\"+nsError);\n return;\n }\n mInvitationURL = shortURL.getAbsoluteString();\n System.out.println(\"Generated Referral Link \");\n\n }\n });\n\n return mInvitationURL;\n\n }", "private CustomClassBuilder(Configuration configuration) {\n\t\tsuper(configuration);\n\t}", "public TwilioWrapperLibrary buildLibrary()\n {\n return new TwilioWrapperLibrary( this.twilio_account_sid, this.twilio_account_token, this.thinQ_id, this.thinQ_token);\n }", "@Bean\n public PaymentOptions paymentOptions() {\n return new PaymentOptions(\n Arrays.asList(examplePaymentMethodHandler())\n );\n }", "@Override\n public void configure(Configuration configuration)\n {\n this.configuration = configuration;\n this.issuer = configuration.getFieldValue(Constants.ISSUER_FIELD_NAME);\n this.requestJwtAudience = configuration.getFieldValue(Constants.AUDIENCE_FIELD_NAME);\n this.enableRevokedJwksValidation = configuration.getBooleanFieldValue(Constants.ENABLE_REVOKED_JWKS_VALIDATION_FIELD_NAME);\n String jwksUrl = configuration.getFieldValue(Constants.JWKS_URL_FIELD_NAME);\n populateSignatureConstraint(configuration);\n\n // This handler processes the JWKS URL for verifying the signature of software statements\n this.jwksHandler = new JwksHandler(jwksUrl, signatureConstraint, true);\n\n }", "private void invokeCallConfigPost(SkinnyMethodAdapter mv) {\n mv.aload(0); // load method to get callconfig\n mv.getfield(p(JavaMethod.class), \"callConfig\", ci(CallConfiguration.class));\n mv.aload(1);\n mv.invokevirtual(p(CallConfiguration.class), \"post\", sig(void.class, params(ThreadContext.class)));\n }", "public ArmPayPlanConfigBootStrap() {\n }", "public interface ApplicationRuntimeConfigurationBuilder\n{\n Repository createRepositoryFromModel( Configuration configuration, CRepository repoConf )\n throws ConfigurationException;\n\n void releaseRepository( Repository repository, Configuration configuration, CRepository repoConf )\n throws ConfigurationException;\n}", "@Override\r\n\tpublic void buildSettlement() {\n\t\t\r\n\t}", "private void setPaymentUrlBytes(\n com.google.protobuf.ByteString value) {\n paymentUrl_ = value.toStringUtf8();\n bitField0_ |= 0x00000010;\n }", "public interface ConfigurationHolder {\n\n /**\n * Gets OpenAPI Gateway host.\n *\n * @return the OpenAPI Gateway host.\n */\n public String getGatewayHost();\n\n /**\n * Gets the App ID.\n *\n * @return the App ID.\n */\n public String getAppId();\n\n /**\n * Gets the merchant number.\n *\n * @return the merchant number.\n */\n public String getMerchantNo();\n\n /**\n * Gets the message format.\n *\n * @return the message format.\n */\n public default String getFormat() {\n return Constants.FORMAT_JSON;\n }\n\n /**\n * Gets the message charset.\n *\n * @return the message charset.\n */\n public default String getCharset() {\n return Constants.CHARSET_UTF8;\n }\n\n /**\n * Gets the API version number.\n *\n * @return the API version number.\n */\n public default String getVersion() {\n return Constants.VERSION_1;\n }\n\n /**\n * Gets the language.\n *\n * @return the language.\n */\n public Language getLanguage();\n\n /**\n * Gets the signature type.\n *\n * @return the signature type.\n */\n public SignType getSignType();\n\n /**\n * Gets the public key (used by RSA only).\n *\n * @return the public key.\n */\n public String getPublicKey();\n\n /**\n * Gets the private key.\n *\n * @return the private key.\n */\n public String getPrivateKey();\n\n /**\n * Gets whether the client supports partial payment.\n * This feature is only available for Snaplii payment.\n *\n * @return true if the client supports partial payment, or false otherwise.\n */\n public boolean isPartialPaymentSupported();\n\n /**\n * Gets the prefix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number prefix.\n */\n public String getAlternativeOrderNumberPrefix();\n\n /**\n * Gets the suffix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number suffix.\n */\n public String getAlternativeOrderNumberSuffix();\n\n /**\n * Gets the connection timeout setting.\n *\n * @return connection timeout in seconds.\n */\n public int getConnectionTimeout();\n\n /**\n * Gets the read timeout setting.\n *\n * @return read timeout in seconds.\n */\n public int getReadTimeout();\n\n /**\n * Validates the configuration.\n *\n * @throws OpenApiConfigurationExcepiton if any configuration is missing.\n */\n public default void validate() throws OpenApiConfigurationExcepiton {\n if (StringUtils.isEmpty(getGatewayHost())) {\n throw new OpenApiConfigurationExcepiton(\"Gateway host is not configured\");\n }\n if (StringUtils.isEmpty(getAppId())) {\n throw new OpenApiConfigurationExcepiton(\"App ID is not configured\");\n }\n if (StringUtils.isEmpty(getMerchantNo())) {\n throw new OpenApiConfigurationExcepiton(\"Merchant number is not configured\");\n }\n if (StringUtils.isEmpty(getFormat())) {\n throw new OpenApiConfigurationExcepiton(\"Format is not configured\");\n }\n if (StringUtils.isEmpty(getCharset())) {\n throw new OpenApiConfigurationExcepiton(\"Charset is not configured\");\n }\n if (getLanguage() == null) {\n throw new OpenApiConfigurationExcepiton(\"Language is not configured\");\n }\n if (getSignType() == null) {\n throw new OpenApiConfigurationExcepiton(\"Signature type is not configured\");\n }\n if (StringUtils.isEmpty(getPrivateKey())) {\n throw new OpenApiConfigurationExcepiton(\"Private key is not configured\");\n }\n if (SignType.RSA == getSignType() && StringUtils.isEmpty(getPublicKey())) {\n throw new OpenApiConfigurationExcepiton(\"Public key is not configured\");\n }\n if (getConnectionTimeout() <= 0 || getConnectionTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Connection timeout needs to be between 1 and 60\");\n }\n if (getReadTimeout() <= 0 || getReadTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Read timeout needs to be between 1 and 60\");\n }\n }\n\n}", "public static void addPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "protected void additionalConfig(ConfigType config){}", "public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}", "private void downloadFile() throws Exception {\n try {\n File backup = new File(FileMgr.getLocalFile(\"config\",\n \"ArmCreditCardPlans.bkup\"));\n backup.delete();\n File armPaymentCFGFile = new File(FileMgr.getLocalFile(\"config\",\n \"ArmCreditCardPlans.cfg\"));\n armPaymentCFGFile.renameTo(backup);\n armPaymentCFGFile.delete();\n ConfigMgr armConfigFile = new ConfigMgr(\"ArmCreditCardPlans.cfg\");\n ConfigMgr config = new ConfigMgr(\"armaniDownload.cfg\");\n ArmaniDownloadServices armDownloadServices = (ArmaniDownloadServices)\n config.getObject(\n \"CLIENT_IMPL\");\n bootMgr.setBootStrapStatus(\n \"Downloading Armani Payment Plan Configurations file\");\n CMSStore store = (CMSStore) theMgr.getGlobalObject(\"STORE\");\n ArmPayPlanConfigDetail armPayPlanConfig[] = armDownloadServices.\n getPayPlanConfigByCountryAndLanguage(\n store.getPreferredISOCountry(), store.getPreferredISOLanguage());\n\n String sNewTenderCode = \"\";\n String sPlanCode = \"\";\n String sPlanDescription = \"\";\n String sOldTenderCode = \"\";\n String sCardPlansKey = \"\";\n String sCardPlansValues = \"\";\n int iPlanCtr = 1;\n for (int iCtr = 0; iCtr < armPayPlanConfig.length; iCtr++) {\n sNewTenderCode = armPayPlanConfig[iCtr].getTenderCode();\n if (sOldTenderCode.length() < 1) {\n sCardPlansKey = TENDER_TYPE + sNewTenderCode + CARD_PLANS;\n sOldTenderCode = armPayPlanConfig[iCtr].getTenderCode();\n }\n if (sNewTenderCode.equals(sOldTenderCode)) {\n String sTmp = \"_\"+armPayPlanConfig[iCtr].getCardPlanCode();\n sCardPlansValues += TENDER_TYPE + sNewTenderCode + CARD_PLAN + sTmp +\n \",\";\n sPlanCode = TENDER_TYPE + sNewTenderCode + CARD_PLAN + sTmp + CODE;\n sPlanDescription = TENDER_TYPE + sNewTenderCode + CARD_PLAN + sTmp +\n LABEL;\n armConfigFile.setString(sPlanCode, armPayPlanConfig[iCtr].getCardPlanCode());\n armConfigFile.setString(sPlanDescription,\n armPayPlanConfig[iCtr].getCardPlanDescription());\n\n iPlanCtr++;\n }\n else {\n if (sCardPlansValues.indexOf(\",\") != -1)\n sCardPlansValues = sCardPlansValues.substring(0,\n sCardPlansValues.lastIndexOf(','));\n armConfigFile.setString(sCardPlansKey, sCardPlansValues);\n sCardPlansKey = TENDER_TYPE + sNewTenderCode + CARD_PLANS;\n sCardPlansValues = \"\";\n sOldTenderCode = armPayPlanConfig[iCtr].getTenderCode();\n iCtr--;\n iPlanCtr = 0;\n }\n }\n if (sCardPlansValues.length() > 1 && iPlanCtr > 0) {\n if (sCardPlansValues.indexOf(\",\") != -1)\n sCardPlansValues = sCardPlansValues.substring(0,\n sCardPlansValues.lastIndexOf(','));\n armConfigFile.setString(sCardPlansKey, sCardPlansValues);\n }\n theMgr.addGlobalObject(\"ARMANI_PAY_PLAN_CONFIG_DOWNLOAD_DATE\",\n new java.util.Date(), true);\n }\n catch (Exception ex) {\n ex.printStackTrace();\n try {\n File armaniPayment = new File(FileMgr.getLocalFile(\"config\",\n \"ArmCreditCardPlans.cfg\"));\n armaniPayment.delete();\n File backup = new File(FileMgr.getLocalFile(\"config\",\n \"ArmCreditCardPlans.bkup\"));\n backup.renameTo(armaniPayment);\n }\n catch (Exception ex1) {}\n System.out.println(\"Exception downloadFile()->\" + ex);\n ex.printStackTrace();\n }\n finally {\n if (theMgr instanceof IApplicationManager) {\n ( (IApplicationManager) theMgr).closeStatusDlg();\n }\n }\n }", "protected String buildConfigString() {\n if (multicastAddress == null) {\n throw new IllegalStateException(\"'multcastAddress' is not set\");\n }\n\n if (multicastPort == null) {\n throw new IllegalStateException(\"'multcastPort' is not set\");\n }\n\n return \"UDP(mcast_addr=\"\n + multicastAddress\n + \";mcast_port=\"\n + multicastPort\n + \";ip_ttl=32):\"\n + \"PING(timeout=3000;num_initial_members=6):\"\n + \"FD(timeout=3000):\"\n + \"VERIFY_SUSPECT(timeout=1500):\"\n + \"pbcast.NAKACK(gc_lag=10;retransmit_timeout=600,1200,2400,4800):\"\n + \"pbcast.STABLE(desired_avg_gossip=10000):\"\n + \"FRAG:\"\n + \"pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;\"\n + \"shun=true;print_local_addr=false)\";\n }", "private OrderPayment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SubmitConfigSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public void addPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "protected void enhanceConfig(ConfigurationBuilder c) {\n }", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "public void toConfig(StringBuilder cfg, String prefix) {\n cfg.append(prefix).append(\"name \").append(RoutingSpec.toConfigString(name)).append(\"\\n\");\n cfg.append(prefix).append(\"selector \").append(RoutingSpec.toConfigString(selector)).append(\"\\n\");\n if (ignoreResult) {\n cfg.append(prefix).append(\"ignoreresult true\\n\");\n }\n int numRecipients = recipients.size();\n if (numRecipients > 0) {\n cfg.append(prefix).append(\"recipient[\").append(numRecipients).append(\"]\\n\");\n for (int i = 0; i < numRecipients; ++i) {\n cfg.append(prefix).append(\"recipient[\").append(i).append(\"] \");\n cfg.append(RoutingSpec.toConfigString(recipients.get(i))).append(\"\\n\");\n }\n }\n }", "private void addConfigParamsFromConfig(\n final OkHttpClient.Builder builder,\n final GenieNetworkConfiguration genieNetworkConfiguration\n ) {\n if (genieNetworkConfiguration.getConnectTimeout() != GenieNetworkConfiguration.DEFAULT_TIMEOUT) {\n builder.connectTimeout(genieNetworkConfiguration.getConnectTimeout(), TimeUnit.MILLISECONDS);\n }\n\n if (genieNetworkConfiguration.getReadTimeout() != GenieNetworkConfiguration.DEFAULT_TIMEOUT) {\n builder.readTimeout(genieNetworkConfiguration.getReadTimeout(), TimeUnit.MILLISECONDS);\n }\n\n if (genieNetworkConfiguration.getWriteTimeout() != GenieNetworkConfiguration.DEFAULT_TIMEOUT) {\n builder.writeTimeout(genieNetworkConfiguration.getWriteTimeout(), TimeUnit.MILLISECONDS);\n }\n\n builder.retryOnConnectionFailure(genieNetworkConfiguration.isRetryOnConnectionFailure());\n }", "public JsonObject addLinksToMerchant(UriInfo uriInfo, Merchant merchant) {\n\n JsonObjectBuilder merchantBuilder = merchantToJsonBuilder(merchant);\n\n JsonObject self = Json.createObjectBuilder().add(\"self\", getMerchantUri(uriInfo, merchant.id).toString()).build();\n JsonArrayBuilder linksBuilder = Json.createArrayBuilder().add(self);\n\n if (merchant.scoreEnabled) {\n JsonObject scores = Json.createObjectBuilder().add(\"scores\", scoreHateoasDecorator.getScoresUri(uriInfo, merchant.scoreId).toString()).build();\n linksBuilder.add(scores);\n }\n\n merchantBuilder.add(\"_links\", linksBuilder.build());\n\n return merchantBuilder.build();\n\n }", "void onPaymentRequestParamsInitiated(PaymentRequestParams params);", "public void Build() {\n OCCwrapJavaJNI.ShapeFix_EdgeConnect_Build(swigCPtr, this);\n }", "public IotdmSimpleConfig build() {\n return new IotdmSimpleConfig(this.builder.build());\n }", "public interface UrlArgumentBuilder {\n\n /**\n * Sets next element of a chain.\n *\n * @param next next element of a chain\n */\n void setNext(final UrlArgumentBuilder next);\n\n /**\n * Builds URL argument that is used by Yandex static API.\n *\n * @param yandexMap yandex map\n * @return URL part\n */\n String build(final YandexMap yandexMap);\n\n}", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return paymentUrl_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);\n }", "@Override\n protected String buildPaySign(Map<String, String> api_response_params, String api_key) throws PayException {\n Map<String,String > params = new LinkedHashMap<>();\n params.put(amount ,api_response_params.get(amount));\n params.put(order_no ,api_response_params.get(order_no));\n params.put(plat_num ,api_response_params.get(plat_num));\n params.put(app_id ,api_response_params.get(app_id));\n params.put(sign_type ,api_response_params.get(sign_type));\n params.put(pay_type ,api_response_params.get(pay_type));\n params.put(status ,api_response_params.get(status));\n params.put(back_status ,api_response_params.get(back_status));\n params.put(complete_time ,api_response_params.get(complete_time));\n String signMd5 = JSON.toJSONString(params);\n\n log.debug(\"[酷狗支付]-[响应支付]-2.生成加密URL签名完成:{}\", JSON.toJSONString(signMd5) );\n return signMd5;\n }", "FlowRule build();", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-24 16:07:21.755 -0400\", hash_original_method = \"6CE719C205449F0EA4502B7666A015C0\", hash_generated_method = \"598EFFAE1DD0E9452464135FF7EE1426\")\n \npublic static String p2pConnect(WifiP2pConfig config, boolean joinExistingGroup) {\n if (config == null) return null;\n List<String> args = new ArrayList<String>();\n WpsInfo wps = config.wps;\n args.add(config.deviceAddress);\n\n switch (wps.setup) {\n case WpsInfo.PBC:\n args.add(\"pbc\");\n break;\n case WpsInfo.DISPLAY:\n //TODO: pass the pin back for display\n args.add(\"pin\");\n args.add(\"display\");\n break;\n case WpsInfo.KEYPAD:\n args.add(wps.pin);\n args.add(\"keypad\");\n break;\n case WpsInfo.LABEL:\n args.add(wps.pin);\n args.add(\"label\");\n default:\n break;\n }\n\n //TODO: Add persist behavior once the supplicant interaction is fixed for both\n // group and client scenarios\n /* Persist unless there is an explicit request to not do so*/\n //if (config.persist != WifiP2pConfig.Persist.NO) args.add(\"persistent\");\n\n if (joinExistingGroup) args.add(\"join\");\n\n int groupOwnerIntent = config.groupOwnerIntent;\n if (groupOwnerIntent < 0 || groupOwnerIntent > 15) {\n groupOwnerIntent = 3; //default value\n }\n args.add(\"go_intent=\" + groupOwnerIntent);\n\n String command = \"P2P_CONNECT \";\n for (String s : args) command += s + \" \";\n\n return doStringCommand(command);\n }", "public StandardTransactionConfig build() {\n Preconditions.checkArgument(null != timestamp || null != timestampProvider);\n\n return new StandardTransactionConfig(metricsPrefix,\n timestampProvider, timestamp, customOptions);\n }", "protected IotdmSimpleConfigBuilder(PluginSimpleConfig config) {\n this.builder = new PluginSimpleConfigBuilder();\n List<KeyValList> copy = new LinkedList<>();\n for (KeyValList kv : config.getKeyValList()) {\n KeyValListBuilder builder = new KeyValListBuilder();\n builder.setCfgKey(kv.getCfgKey());\n builder.setCfgVal(kv.getCfgVal());\n copy.add(builder.build());\n }\n\n this.builder.setKeyValList(copy);\n }", "public static String buildDependenciesURL(String customerId, String addressId) {\n String sURL = NISUtils.getURL()\n + \"/nis/nwapi/v2/customer/\" + customerId \n + \"/address/\" + addressId + \"/dependencies\";\n\t\treturn sURL;\n\t}", "public SiloCreateMerchantGenerator()\n {\n m_pciMerchant = new SiloConfigPCIMerchant();\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "private SmoothGradConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public abstract Builder options(RequestMappingInfo.BuilderConfiguration paramBuilderConfiguration);", "public static void initialize(\n @NonNull MasterpassMerchantConfiguration masterpassMerchantConfiguration,\n final MasterpassInitCallback listener) {\n Set<CardType> allowedCardTypes =\n convertAllowedNetworkTypes(masterpassMerchantConfiguration.getAllowedNetworkTypes());\n CommerceConfig commerceConfig = new CommerceConfig(masterpassMerchantConfiguration.getLocale(),\n masterpassMerchantConfiguration.getCheckoutId(),\n masterpassMerchantConfiguration.getEnvironment(), allowedCardTypes);\n commerceWebSdk = CommerceWebSdk.getInstance();\n commerceWebSdk.initialize(masterpassMerchantConfiguration.getContext(), commerceConfig);\n contextWeakReference = new WeakReference<>(masterpassMerchantConfiguration.getContext());\n\n listener.onInitSuccess();\n }", "public com.google.protobuf.Any.Builder getConfigurationBuilder() {\n \n onChanged();\n return getConfigurationFieldBuilder().getBuilder();\n }", "public DIDURL build() {\n\t\t\treturn url.deepClone(true);\n\t\t}", "Builder addProvider(Organization.Builder value);", "@java.lang.Override\n public java.lang.String getPaymentUrl() {\n return instance.getPaymentUrl();\n }", "Builder addPublisher(Organization.Builder value);", "public ConfigurePaymentFranchisee() {\n initComponents();\n }", "public interface UnionpayConfig {\n String CHARSET = \"UTF-8\";\n String TIME_PATTERN = \"YYYYMMDDhhmmss\";\n\n String getMerId();\n\n String getFrontReturnUrl();\n\n String getBackNotifyUrl();\n\n boolean isEncrypted();\n\n String getTrId();\n}", "public void setBuyLink(String buyLink) {\n this.buyLink = buyLink;\n }", "public AntConfig(Config config) {\n\t\tthis.messageUtil = new MessageUtil(config.getColor());\n\t\tthis.service = config.getService();\n\t}", "public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }", "protected String buildLink(Node targetNode) {\r\n if (targetNode == null) {\r\n return null;\r\n }\r\n return requestContext.getHstLinkCreator()\r\n .create(targetNode, requestContext, ContainerConstants.MOUNT_ALIAS_SITE)\r\n .toUrlForm(requestContext, false);\r\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPaymentUrlBytes() {\n return instance.getPaymentUrlBytes();\n }", "protected AsyncHttpClientConfig buildAHCConfig(CONFIG config,\n AsyncHttpClientConfig.Builder ahcConfigBuilder)\n {\n return ahcConfigBuilder.build();\n }", "public void configure(DecompilerConfigurationBuilder configurationBuilder) {\n assert configurationBuilder != null : \"Configuration builder can't be null\";\n\n configurationBuilder.on(ByteCode.putfield).then(putfield());\n configurationBuilder.on(ByteCode.putstatic).then(putstatic());\n configurationBuilder.on(ByteCode.getfield).then(getfield());\n configurationBuilder.on(ByteCode.getstatic).then(getstatic());\n }", "public void m1148a(ConfigurationContract configurationContract, long j, long j2) {\n ConfigurationContract configurationContract2 = configurationContract;\n try {\n m1170c(configurationContract);\n Boolean valueOf = C3815z4.m2010d().mo55980b().contains(C3815z4.C3816a.PREVIOUS_ANALYTICS_V2.toString()) ? Boolean.valueOf(C3815z4.m2010d().mo55979a(C3815z4.C3816a.PREVIOUS_ANALYTICS_V2, false)) : null;\n Boolean valueOf2 = C3815z4.m2010d().mo55980b().contains(C3815z4.C3816a.PREVIOUS_SEND_USER_JOURNEY.toString()) ? Boolean.valueOf(C3815z4.m2010d().mo55979a(C3815z4.C3816a.PREVIOUS_SEND_USER_JOURNEY, false)) : null;\n long currentTimeMillis = System.currentTimeMillis();\n new C3547h(this, valueOf, valueOf2, currentTimeMillis, new C3621f()).mo55437a();\n C3646n3.m1337m().mo55663a(configurationContract);\n if (configurationContract.getSdkConfiguration() != null) {\n AnalyticsBridge.getInstance().initAnalytics((configurationContract.getSdkConfiguration().getMedalliaDigitalClientConfig() == null || configurationContract.getSdkConfiguration().getMedalliaDigitalClientConfig().getAnalyticsV2ConfigurationContract() == null || !configurationContract.getSdkConfiguration().getMedalliaDigitalClientConfig().getAnalyticsV2ConfigurationContract().mo55366d()) ? false : true, configurationContract.getSdkConfiguration().getEventsConfigurations());\n }\n C3815z4.m2010d().mo55984b(C3815z4.C3816a.MISSING_EVENTS, (String) null);\n C3815z4.m2010d().mo55984b(C3815z4.C3816a.MISSING_EVENTS_V2, (String) null);\n this.f1445d.mo55877b();\n this.f1446e.mo55897a();\n C3552h2.m914h().mo55443a(configurationContract, (C3552h2.C3555c) new C3622g());\n C3754u5.m1743f().mo55865b(false, (Long) null, currentTimeMillis);\n m1176d(configurationContract);\n this.f1445d.mo55878c();\n m1147a(AnalyticsBridge.C3414c.f832a, j, j2);\n C3490e3.m665e(\"SDK refresh session finished successfully\");\n } catch (Exception e) {\n C3490e3.m663c(e.getMessage());\n }\n }", "boolean hasPaymentUrl();", "public ObjectStoreSinkConnectorConfig(ConfigDef config, Map<String, String> parsedConfig) {\n super(config, parsedConfig);\n }", "public void onLinkInsert(LinkConfig.LinkType linkType)\n {\n LinkConfig linkConfig = linkConfigFactory.createLinkConfig();\n linkConfig.setType(linkType);\n getLinkWizard().start(LinkWizardStep.LINK_REFERENCE_PARSER.toString(), linkConfig);\n }", "public static WebElement getPayBillLink() {\r\n\t\treturn payBillLink;\r\n\t}", "private String getBuildTypeUrl(final boolean isRemoteJobParameterized) {\n boolean isParameterized = false;\n\n if (isRemoteJobParameterized || (this.getParameters()\n .length() > 0)) {\n isParameterized = true;\n }\n\n if (isParameterized) {\n return RemoteBuildConfiguration.paramerizedBuildUrl;\n } else {\n return RemoteBuildConfiguration.normalBuildUrl;\n }\n }", "CdapCreateAppWithConfigStep createCdapCreateAppWithConfigStep();", "public CreditChainDao(Configuration configuration) {\n super(CreditChain.CREDIT_CHAIN, com.generator.tables.pojos.CreditChain.class, configuration);\n }", "Builder useBuildDistribution();" ]
[ "0.526508", "0.5167495", "0.511985", "0.47837135", "0.47506052", "0.47376493", "0.47008944", "0.46698007", "0.4618829", "0.45837608", "0.45833078", "0.4575697", "0.45287693", "0.45206705", "0.45120922", "0.450901", "0.44926324", "0.44734597", "0.4445218", "0.44401538", "0.4437091", "0.44337657", "0.44181848", "0.43964544", "0.43934265", "0.4384067", "0.43722084", "0.43530717", "0.4352179", "0.4351538", "0.43504307", "0.43454593", "0.43412453", "0.43377566", "0.43302202", "0.4326794", "0.43227822", "0.43167126", "0.43155572", "0.43104833", "0.42952907", "0.42863804", "0.42822248", "0.42813763", "0.42734322", "0.42695203", "0.42646334", "0.42630076", "0.4259106", "0.42591047", "0.4257836", "0.4244443", "0.42406735", "0.4222061", "0.4214799", "0.421249", "0.4204886", "0.42023796", "0.4200782", "0.41869578", "0.4180435", "0.41728085", "0.41698623", "0.41673627", "0.41553497", "0.41442034", "0.41437265", "0.4141067", "0.41385826", "0.41330636", "0.41296026", "0.41289067", "0.41273397", "0.4117203", "0.41096005", "0.41082704", "0.41066542", "0.41065076", "0.41050705", "0.4102683", "0.41025692", "0.40888953", "0.40888742", "0.40877625", "0.40822175", "0.40801656", "0.40795636", "0.40703076", "0.4063392", "0.40626904", "0.40583733", "0.40573508", "0.4055868", "0.40548435", "0.4054049", "0.40447205", "0.40429014", "0.4040154", "0.40324873", "0.40318075" ]
0.4521988
13
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)"); } return addPaymentLinkConfigurationCall(generalContractId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "private Contract() {\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.65667087", "0.6498893", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.5991647", "0.58935875", "0.5867352", "0.57154477", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.54083145", "0.53983784", "0.538685", "0.5372101", "0.535575", "0.53002197", "0.5298278", "0.5284535", "0.5277213", "0.5228654", "0.5213922", "0.5213851", "0.5203466", "0.5203466", "0.5198705", "0.5132997", "0.503143", "0.5030267", "0.502797", "0.5015527", "0.5008133", "0.49868008", "0.49842298", "0.49836314", "0.49824694", "0.49804395", "0.4969242", "0.4950973", "0.49493062", "0.49471316", "0.4928483", "0.49245524", "0.49162278", "0.4885365", "0.48522398", "0.4833596", "0.48331168", "0.48331168", "0.48331168", "0.48331168", "0.4830747", "0.4827253", "0.48129195", "0.48126492", "0.4799318", "0.4791708", "0.47801298", "0.4777395", "0.47646844", "0.47614396", "0.47599468", "0.47580373", "0.47508353", "0.47382933", "0.4732828", "0.47288087", "0.47212544", "0.4717133", "0.47137868", "0.47108936", "0.46979916", "0.46949527", "0.46938235", "0.469239", "0.46847698", "0.46842527", "0.46841192", "0.46748438", "0.46745366", "0.46736524", "0.46714628", "0.46679446", "0.4660473", "0.46603698", "0.46579075", "0.4655875", "0.4655484", "0.46554628", "0.46510994", "0.46478415" ]
0.51919657
35
Build call for addThirdPartyConfiguration
public Call addThirdPartyConfigurationCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/ThirdPartyConfiguration" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract CONFIG build();", "Builder useBuildDistribution();", "BuildClient createBuildClient();", "GradleBuild create();", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "UpdateOperationConfiguration build();", "@NonNull\n\t\tConfig build();", "protected void enhanceConfig(ConfigurationBuilder c) {\n }", "Builder useInstallation(File gradleHome);", "@Override\n\tpublic void configure() throws CoreException {\n\t\t// associate this builder with the project\n\t\tPTJavaFileBuilder.addBuilderToProject(fProject);\n\t\t\n\t\t// issue order to rebuild project\n\t\tnew Job(\"PTJava File Build\") {\n\t\t\tprotected IStatus run(IProgressMonitor monitor) {\n\t\t\t\ttry {\n\t\t\t\t\t// invoke a full build\n\t\t\t\t\tfProject.build(\n\t\t\t\t\t\t\tPTJavaFileBuilder.FULL_BUILD,\n\t\t\t\t\t\t\tPTJavaFileBuilder.BUILDER_ID,\n\t\t\t\t\t\t\tnull, monitor);\n\t\t\t\t}\n\t\t\t\tcatch (CoreException exception) {\n\t\t\t\t\tPTJavaLog.logError(exception);\n\t\t\t\t}\n\t\t\t\treturn Status.OK_STATUS;\n\t\t\t}\n\t\t}.schedule();\n\t}", "@Test\n public void testBuildDefer() throws Exception {\n mockHttpClient = mock(OptimizelyHttpClient.class);\n\n projectConfigManager = builder()\n .withOptimizelyHttpClient(mockHttpClient)\n .withSdkKey(\"sdk-key\")\n .build(true);\n assertEquals(\"sdk-key\", projectConfigManager.getSDKKey());\n }", "protected void additionalConfig(ConfigType config){}", "private void registerBuildTarget(Configuration configuration, Build.Project project, Path.Root sourceRoot,\n\t\t\t\tTrie pkg, List<Path.Entry<JavaScriptFile>> jsIncludes) throws IOException {\n\t\t\tTrie target= Trie.fromString(configuration.get(Value.UTF8.class, TARGET_CONFIG_OPTION).unwrap());\n\t\t\t// Extract target JS standard\n\t\t\tString standard = configuration.get(Value.UTF8.class, STANDARD_CONFIG_OPTION).unwrap();\n\t\t\t// Extract strict mode setting\n\t\t\tboolean strict = configuration.get(Value.Bool.class, STRICTMODE_CONFIG_OPTION).unwrap();\n\t\t\t// Specify set of files included\n\t\t\tContent.Filter<WyilFile> wyilIncludes = Content.filter(\"**\", WyilFile.ContentType);\n\t\t\t// Specify whether debug mode enabled or not.\n\t\t\tboolean debug = configuration.get(Value.Bool.class, DEBUG_CONFIG_OPTION).get();;\n\t\t\t// Construct the binary root\n\t\t\tPath.Root binaryRoot = project.getRoot().createRelativeRoot(target);\n\t\t\t// Initialise the target file being built\n\t\t\tPath.Entry<JavaScriptFile> binary = initialiseBinaryTarget(binaryRoot, pkg, strict, standard);\n\t\t\t//\n\t\t\tproject.getRules().add(new AbstractBuildRule<WyilFile, JavaScriptFile>(sourceRoot, wyilIncludes, null) {\n\n\t\t\t\t@Override\n\t\t\t\tprotected void apply(List<Entry<WyilFile>> matches, Collection<Task> tasks) throws IOException {\n\t\t\t\t\t// FIXME: this looks like a bug when we have multiple matches\n\t\t\t\t\tJavaScriptCompileTask task = new JavaScriptCompileTask(project, binary, matches.get(0));\n\t\t\t\t\ttask.setDebug(debug);\n\t\t\t\t\ttask.setIncludes(jsIncludes);\n\t\t\t\t\ttasks.add(task);\n\t\t\t\t}\n\n\t\t\t});\n\t\t}", "Builder useDistribution(URI gradleDistribution);", "java.lang.Object setupBuild(java.util.Map properties) throws org.apache.ant.common.util.ExecutionException;", "@Override\n public void setupConfiguration(Configuration config)\n {\n\n }", "void subprojects(Action<? super ProjectPluginDependenciesSpec> configuration);", "private synchronized void addBuildWrapperPath(ProcessBuilder pb){\r\n \t\tif (needPath==null || needPath.booleanValue() && bwPath!=null){\r\n \t\t\tneedPath=false;\r\n \t\t\tString path=new File(bwPath).getParent();\r\n \t\t\tif (path!=null){\r\n \t\t\t\tMap<String,String> env=pb.environment();\r\n \t\t\t\tString pathValue=env.get(\"PATH\");\r\n \t\t\t\tif (Boolean.TRUE.equals(needPath) || pathValue==null || pathValue.length()==0 || !pathValue.contains(path)){\r\n \t\t\t\t\tif (pathValue==null || pathValue.length()==0){\r\n \t\t\t\t\t\tpathValue=path;\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tpathValue+=File.pathSeparator+path;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tenv.put(\"PATH\",pathValue);\r\n \t\t\t\t\tneedPath=true;\r\n \t\t\t\t} \r\n \t\t\t}\r\n \t\t}\r\n \t}", "protected void buildBootstrap() {\n String command = \"-prod -mac -o2 rom -strip:d j2me imp\";\n if (includeDebugger) {\n command += \" debugger\";\n }\n command += \" -- translator\";\n builder(command);\n }", "@Override\n public boolean hasAdditionalConfig() { return true; }", "public interface ApplicationRuntimeConfigurationBuilder\n{\n Repository createRepositoryFromModel( Configuration configuration, CRepository repoConf )\n throws ConfigurationException;\n\n void releaseRepository( Repository repository, Configuration configuration, CRepository repoConf )\n throws ConfigurationException;\n}", "@Override\n\tpublic void loadExtraConfigs(Configuration config)\n\t{\n\n\t}", "Pair<T, U> build(ConfigurationSourceProvider provider, String path) throws IOException, ConfigurationException;", "void configure();", "void build(String name, Project project);", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "public abstract void configure(String[] args);", "@Incubating\npublic interface GradleBuild {\n /**\n * Builds a new Gradle composite participant.\n */\n @Incubating\n interface Builder {\n\n /**\n * Sets the root project directory for this Gradle Build.\n *\n * @param projectDir root project directory.\n * @return this\n */\n Builder forProjectDirectory(File projectDir);\n\n /**\n * Specifies the Gradle distribution described in the build should be used.\n *\n * @return this\n */\n Builder useBuildDistribution();\n\n /**\n * Specifies the Gradle distribution to use.\n *\n * @param gradleHome The Gradle installation directory.\n * @return this\n */\n Builder useInstallation(File gradleHome);\n\n /**\n * Specifies the version of Gradle to use.\n *\n * @param gradleVersion The version to use.\n * @return this\n */\n Builder useGradleVersion(String gradleVersion);\n\n /**\n * Specifies the Gradle distribution to use.\n *\n * @param gradleDistribution The distribution to use.\n *\n * @return this\n */\n Builder useDistribution(URI gradleDistribution);\n\n /**\n * Creates an immutable GradleBuild instance based on this builder.\n *\n * @return a new instance, never null.\n */\n GradleBuild create();\n }\n\n /**\n * Build Identity to be used to correlate results.\n *\n * @return this build's identity, never null\n */\n BuildIdentity toBuildIdentity();\n\n /**\n * Project Identity to be used to correlate results.\n *\n * @param projectPath path to project in a Gradle build (e.g., :foo:bar)\n * @return identity for a project in this build with the given path\n */\n ProjectIdentity toProjectIdentity(String projectPath);\n}", "@Override\n protected TsArtifact composeApplication() {\n final TsQuarkusExt extH = new TsQuarkusExt(\"ext-h\");\n install(extH);\n final TsQuarkusExt extIConditional = new TsQuarkusExt(\"ext-i-conditional\");\n extIConditional.setDependencyCondition(extH);\n install(extIConditional);\n\n final TsQuarkusExt extGConditional = new TsQuarkusExt(\"ext-g-conditional\");\n\n final TsQuarkusExt extA = new TsQuarkusExt(\"ext-a\");\n extA.setConditionalDeps(extGConditional);\n\n final TsQuarkusExt extB = new TsQuarkusExt(\"ext-b\");\n extB.addDependency(extA);\n\n final TsQuarkusExt extC = new TsQuarkusExt(\"ext-c\");\n extC.addDependency(extB);\n\n final TsQuarkusExt extD = new TsQuarkusExt(\"ext-d\");\n extD.addDependency(extB);\n\n final TsQuarkusExt extEConditional = new TsQuarkusExt(\"ext-e-conditional\");\n extEConditional.setDependencyCondition(extB);\n install(extEConditional);\n\n final TsQuarkusExt extF = new TsQuarkusExt(\"ext-f\");\n extF.setConditionalDeps(extEConditional, extIConditional);\n\n extGConditional.setDependencyCondition(extC);\n extGConditional.addDependency(extF);\n install(extGConditional);\n\n addToExpectedLib(extA.getRuntime());\n addToExpectedLib(extB.getRuntime());\n addToExpectedLib(extC.getRuntime());\n addToExpectedLib(extD.getRuntime());\n addToExpectedLib(extEConditional.getRuntime());\n addToExpectedLib(extF.getRuntime());\n addToExpectedLib(extGConditional.getRuntime());\n\n return TsArtifact.jar(\"app\")\n .addManagedDependency(platformDescriptor())\n .addManagedDependency(platformProperties())\n .addDependency(extC)\n .addDependency(extD);\n }", "private SubmitConfigSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "void applyConfiguration(Configuration configuration);", "Pair<T, U> build() throws IOException, ConfigurationException;", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "ProjectConfiguration getProjectConfiguration();", "Lighter build();", "@Configuration\n public Option[] config() {\n String pathToTestClass = ServiceOneBundleTest.class.getClassLoader().getResource(\".\").getPath();\n String[] pathParts = pathToTestClass.split(\"OsgiBundleTest\");\n StringBuilder pathToBundle = new StringBuilder(pathParts[0]);\n pathToBundle.append(\"ServiceOneModule/target/ServiceOneModule-1.0-SNAPSHOT.jar\");\n return CoreOptions.options(\n mavenBundle(\"com.google.guava\", \"guava\", \"13.0.1\").startLevel(30),\n bundle(new File(pathToBundle.toString()).toURI().toString()),\n junitBundles()\n );\n }", "protected void addBuildFunction(S source) {\n Function build =\n FunctionBuilder.of(source, \"build\", Purpose.build())\n .setReturnValue(new DataObject(new ObjectName(\"Widget\"), new PackageName(\"com.dummy\")))\n .addArgument(\n new DataObject(\n new ObjectName(\"BuildContext\"),\n new PackageName(\"com.dummy\"),\n new VariableName(\"context\")))\n .build();\n\n source.addFunction(build);\n }", "public void buildTwitterBaseConfiguration() {\n ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();\n configurationBuilder\n .setOAuthConsumerKey(getBaseContext().getString(R.string.consumer_key))\n .setOAuthConsumerSecret(getBaseContext().getString(R.string.consumer_secret))\n .setOAuthAccessToken(getBaseContext().getString(R.string.access_token))\n .setOAuthAccessTokenSecret(getBaseContext().getString(R.string.access_token_secret));\n\n Configuration configuration = configurationBuilder.build();\n\n twitterStreamFactory = new TwitterStreamFactory(configuration);\n }", "Builder useGradleVersion(String gradleVersion);", "@Override\n\tpublic boolean hasExtraConfigs()\n\t{\n\t\treturn false;\n\t}", "default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }", "void allprojects(Action<? super ProjectPluginDependenciesSpec> configuration);", "void configure (CallbackUtilities cus) throws RootException;", "public SSLConfig build()\n {\n return new SSLConfig(\n isClient, verifyMode, this.caPath, this.certPath, this.keyPath);\n }", "ImportConfig createImportConfig();", "void configure (Settings settings);", "public IotdmSimpleConfig build() {\n return new IotdmSimpleConfig(this.builder.build());\n }", "CdapLoadArtifactWithConfigStep createCdapLoadArtifactWithConfigStep();", "BRMSPackageBuilder(PackageBuilderConfiguration config) {\n super(config);\n }", "@Nullable\n @Override\n public ModuleWizardStep getCustomOptionsStep(WizardContext context, Disposable parentDisposable) {\n\n final DlangModuleBuilder moduleBuilder = this;\n return new ProjectJdkForModuleStep(context, DlangSdkType.getInstance()) {\n public void updateDataModel() {\n super.updateDataModel();\n moduleBuilder.setModuleJdk(getJdk());\n }\n };\n }", "public void configure(FunctionRuntimeContext runtimeContext) {\n validateConfigurationMethods(runtimeContext.getMethodWrapper());\n applyUserConfigurationMethod(runtimeContext.getMethodWrapper(), runtimeContext);\n }", "public TwilioWrapperLibrary buildLibrary()\n {\n return new TwilioWrapperLibrary( this.twilio_account_sid, this.twilio_account_token, this.thinQ_id, this.thinQ_token);\n }", "void setup(Map<String, Object> cfg);", "public static void configureProjectAsPlugin(IFacetedProjectWorkingCopy fpjwc, IRuntime runtime, String sdkLocation)\n \t\tthrows CoreException {\n \n \t\tfpjwc.setTargetedRuntimes(Collections.<IRuntime> emptySet());\n \n \t\tif (runtime != null) {\n \t\t\t// final Set<IProjectFacetVersion> minFacets = new\n \t\t\t// HashSet<IProjectFacetVersion>();\n \t\t\t//\n \t\t\t// try {\n \t\t\t// for( IProjectFacet f : fpjwc.getFixedProjectFacets() ) {\n \t\t\t// minFacets.add( f.getLatestSupportedVersion( runtime ) );\n \t\t\t// }\n \t\t\t// }\n \t\t\t// catch( CoreException e ) {\n \t\t\t// throw new RuntimeException( e );\n \t\t\t// }\n \t\t\t//\n \t\t\t// fpjwc.setProjectFacets( minFacets );\n \n \t\t\tfpjwc.setTargetedRuntimes(Collections.singleton(runtime));\n \t\t}\n \n \t\tfpjwc.setPrimaryRuntime(runtime);\n \n \t\t// fpjwc.setSelectedPreset(\n \t\t// FacetedProjectFramework.DEFAULT_CONFIGURATION_PRESET_ID );\n \n \t\tIFacetedProjectTemplate template = getLiferayTemplateForProject(fpjwc);\n \t\tIPreset preset = getLiferayPresetForProject(fpjwc);\n \n \t\tif (preset == null) {\n \t\t\tthrow new CoreException(\n \t\t\t\tProjectCorePlugin.createErrorStatus( \"No facet preset found for project name \" +\n \t\t\t\t\tfpjwc.getProjectName() +\n \t\t\t\t\t\", make sure your project is a valid liferay plugins sdk project with an expected prefix, e.g. -portlet, -hook, etc.\" ) );\n \t\t}\n \n \t\tSet<IProjectFacetVersion> currentProjectFacetVersions = fpjwc.getProjectFacets();\n \n \t\tSet<IProjectFacet> requiredFacets = template.getFixedProjectFacets();\n \n \t\tfor (IProjectFacet requiredFacet : requiredFacets) {\n \t\t\tboolean hasRequiredFacet = false;\n \n \t\t\tfor (IProjectFacetVersion currentFacetVersion : currentProjectFacetVersions) {\n \t\t\t\tif (currentFacetVersion.getProjectFacet().equals(requiredFacet)) {\n \t\t\t\t\tboolean supports = runtime.supports(currentFacetVersion);\n \n \t\t\t\t\tif (supports) {\n \t\t\t\t\t\thasRequiredFacet = true;\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tfpjwc.removeProjectFacet(currentFacetVersion);\n \t\t\t\t\t}\n \n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (!hasRequiredFacet) {\n \t\t\t\tIProjectFacetVersion requiredFacetVersion = getRequiredFacetVersionFromPreset(requiredFacet, preset);\n \n \t\t\t\tif (requiredFacetVersion != null) {\n \t\t\t\t\tfpjwc.addProjectFacet(requiredFacetVersion);\n \n \t\t\t\t\tif (ProjectUtil.isJavaFacet(requiredFacetVersion)) {\n \t\t\t\t\t\tconfigureJavaFacet(fpjwc, requiredFacetVersion.getProjectFacet(), preset);\n \t\t\t\t\t}\n \t\t\t\t\telse if (ProjectUtil.isLiferayFacet(requiredFacetVersion)) {\n \t\t\t\t\t\tconfigureLiferayFacet(fpjwc, requiredFacetVersion, sdkLocation);\n \t\t\t\t\t}\n \t\t\t\t\telse if (ProjectUtil.isDynamicWebFacet(requiredFacetVersion)) {\n \t\t\t\t\t\tconfigureWebFacet(fpjwc, requiredFacetVersion.getProjectFacet(), preset);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tif (ProjectUtil.isJavaFacet(requiredFacet)) {\n \t\t\t\t\tconfigureJavaFacet(fpjwc, requiredFacet, preset);\n \t\t\t\t}\n \t\t\t\telse if ( ProjectUtil.isLiferayFacet( requiredFacet ) ) {\n \t\t\t\t\tconfigureLiferayFacet( fpjwc, requiredFacet, sdkLocation );\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "public interface PluginAdapterBuild extends PluginAdapterBase {\n\n /**\n * Defines the project frontend directory from where resources should be\n * copied from for use with webpack.\n *\n * @return {@link File}\n */\n\n File frontendResourcesDirectory();\n\n /**\n * Whether to generate a bundle from the project frontend sources or not.\n *\n * @return boolean\n */\n\n boolean generateBundle();\n\n /**\n * Whether to generate embeddable web components from WebComponentExporter\n * inheritors.\n *\n * @return boolean\n */\n\n boolean generateEmbeddableWebComponents();\n\n /**\n * Whether to use byte code scanner strategy to discover frontend\n * components.\n *\n * @return boolean\n */\n boolean optimizeBundle();\n\n /**\n * Whether to run <code>npm install</code> after updating dependencies.\n *\n * @return boolean\n */\n boolean runNpmInstall();\n\n}", "default Pair<T, U> build(File file) throws IOException, ConfigurationException {\n return build(new FileConfigurationSourceProvider(), file.toString());\n }", "private FileObject makeConfigFile(TemplatePair p, NrfConfig configObj){\n ST tmpl_sd = getConfigGroup().getInstanceOf(\"sdk_config\");\n tmpl_sd.add(\"config\", configObj);\n FileObject sdk_config_file = new FileObject();\n sdk_config_file.setSubPath(\"config/\");\n sdk_config_file.setFileName( p.getValue()+\".h\");\n sdk_config_file.setContent(tmpl_sd.render());\n return sdk_config_file;\n }", "@NonNull\n\t\tBuilder addSource(@NonNull ConfigSource source);", "public ClientConfiguration getClientConfiguration(TargetModuleID id);", "private void configureOsgiManifest(Project project) {\n project.afterEvaluate(new Action<Project>() {\n @Override\n public void execute(Project project) {\n project.getTasks().withType(Jar.class, new Action<Jar>() {\n @Override\n public void execute(Jar jar) {\n if (jar.getManifest() instanceof OsgiManifest) {\n OsgiManifest manifest = (OsgiManifest) jar.getManifest();\n if (manifest.getInstructions().containsKey(\"Implementation-Version\")) {\n manifest.instructionReplace(\"Implementation-Version\", configurationStore.getProjectVersion());\n }\n if (manifest.getInstructions().containsKey(\"Specification-Version\")) {\n manifest.instructionReplace(\"Specification-Version\", configurationStore.getProjectVersion());\n }\n }\n }\n });\n }\n });\n }", "public abstract ICMakeBuildElement createBuildProperties(Path path);", "GeneralConfiguration getGeneralConfiguration();", "public IConfigAdditionalData provideAdditionalData();", "@Config.LoadPolicy(Config.LoadType.MERGE)\[email protected]({\n \"system:properties\",\n \"classpath:application.properties\"\n})\npublic interface ProjectConfig extends Config {\n\n @Key(\"app.hostname\")\n String hostname();\n\n @Key(\"browser.name\")\n @DefaultValue(\"chrome\")\n String browser();\n\n}", "private OptimoveConfig() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "public void setCustomBuildStep(boolean customBuildStep);", "@Configuration\n public Option[] configuration() {\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.sling\", \"org.apache.sling.distribution.core\");\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.sling\", \"org.apache.sling.distribution.api\");\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.jackrabbit.vault\",\"org.apache.jackrabbit.vault\");\n return new Option[]{\n baseConfiguration(),\n slingQuickstart(),\n logback(),\n // build artifact\n slingDistribution(),\n // testing\n defaultOsgiConfigs(),\n SlingOptions.webconsole(),\n CoreOptions.mavenBundle(\"org.apache.felix\", \"org.apache.felix.webconsole.plugins.ds\", \"2.0.8\"),\n junitBundles()\n };\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "interface WithCustomToolkitSettings {\n /**\n * Specifies customToolkitSettings.\n * @param customToolkitSettings the customToolkitSettings parameter value\n * @return the next definition stage\n */\n WithCreate withCustomToolkitSettings(CustomToolkitSettings customToolkitSettings);\n }", "public LibraryBuilder() {\n\t\tthis.addToLibrary = new MyMusicLibrary();\n\t\tthis.addToArtiLibrary = new MyArtistLibrary();\n\t}", "public com.google.protobuf.Any.Builder getConfigurationBuilder() {\n \n onChanged();\n return getConfigurationFieldBuilder().getBuilder();\n }", "void addConfigFile(final String filename, final boolean required);", "private void preSyncConfiguration() {\n customPreSyncConfiguration.accept(caller, listener);\n }", "public static void setUpConfiguration(@NotNull String[] args) {\n if (args.length != 2) throw new MissingResourceException(\"Missing configuration values\", \"\", \"\");\n Configuration.BUCKET_NAME = args[0];\n Configuration.S3_BUCKET_REGION = args[1];\n\n AWSFileUploader awsFileUploader = new AWSFileUploader();\n Configuration.PREVIOUS_BUILDS = awsFileUploader.getReports();\n\n if (Configuration.AWS_ACCESS_KEY_ID.isEmpty()) {\n throw new MissingResourceException(\"The AWS access key id is missing\", \"\", \"\");\n } else if (Configuration.AWS_SECRET_KEY.isEmpty()) {\n throw new MissingResourceException(\"The AWS secret key is missing\", \"\", \"\");\n } else if (Configuration.GITHUB_TOKEN.isEmpty()) {\n throw new MissingResourceException(\"The Github token is missing\", \"\", \"\");\n } else if (Configuration.M3_HOME.isEmpty()) {\n throw new MissingResourceException(\"The M3 Home path is missing\", \"\", \"\");\n } else if (Configuration.BUCKET_NAME.isEmpty()) {\n throw new MissingResourceException(\"The AWS bucket name is missing\", \"\", \"\");\n } else if (Configuration.S3_BUCKET_REGION.isEmpty()) {\n throw new MissingResourceException(\"The AWS region is missing\", \"\", \"\");\n }\n }", "CdapInternalApplicationConfiguration createCdapInternalApplicationConfiguration();", "@Test\n public void testWebConfiguration() throws Exception {\n WebClient wc = j.createWebClient();\n {\n FreeStyleProject p = j.createFreeStyleProject();\n p.getBuildersList().add(CopyArtifactUtil.createCopyArtifact(\n \"${upstream}\",\n \"\",\n new TriggeredBuildSelector(true, TriggeredBuildSelector.UpstreamFilterStrategy.UseOldest, false),\n \"\",\n \"\",\n false,\n false, \n false\n ));\n p.save();\n \n j.submit(wc.getPage(p, \"configure\").getFormByName(\"config\"));\n \n p = j.jenkins.getItemByFullName(p.getFullName(), FreeStyleProject.class);\n assertNotNull(p);\n \n CopyArtifact copyArtifact = p.getBuildersList().get(CopyArtifact.class);\n assertNotNull(p);\n \n assertNotNull(copyArtifact.getBuildSelector());\n assertEquals(TriggeredBuildSelector.class, copyArtifact.getBuildSelector().getClass());\n \n TriggeredBuildSelector selector = (TriggeredBuildSelector)copyArtifact.getBuildSelector();\n \n assertTrue(selector.isFallbackToLastSuccessful());\n assertEquals(TriggeredBuildSelector.UpstreamFilterStrategy.UseOldest, selector.getUpstreamFilterStrategy());\n }\n \n {\n FreeStyleProject p = j.createFreeStyleProject();\n p.getBuildersList().add(CopyArtifactUtil.createCopyArtifact(\n \"${upstream}\",\n \"\",\n new TriggeredBuildSelector(false, TriggeredBuildSelector.UpstreamFilterStrategy.UseNewest, false),\n \"\",\n \"\",\n false,\n false, \n false\n ));\n p.save();\n \n j.submit(wc.getPage(p, \"configure\").getFormByName(\"config\"));\n \n p = j.jenkins.getItemByFullName(p.getFullName(), FreeStyleProject.class);\n assertNotNull(p);\n \n CopyArtifact copyArtifact = p.getBuildersList().get(CopyArtifact.class);\n assertNotNull(p);\n \n assertNotNull(copyArtifact.getBuildSelector());\n assertEquals(TriggeredBuildSelector.class, copyArtifact.getBuildSelector().getClass());\n \n TriggeredBuildSelector selector = (TriggeredBuildSelector)copyArtifact.getBuildSelector();\n \n assertFalse(selector.isFallbackToLastSuccessful());\n assertEquals(TriggeredBuildSelector.UpstreamFilterStrategy.UseNewest, selector.getUpstreamFilterStrategy());\n }\n \n {\n FreeStyleProject p = j.createFreeStyleProject();\n p.getBuildersList().add(CopyArtifactUtil.createCopyArtifact(\n \"${upstream}\",\n \"\",\n new TriggeredBuildSelector(true, TriggeredBuildSelector.UpstreamFilterStrategy.UseGlobalSetting, false),\n \"\",\n \"\",\n false,\n false, \n false\n ));\n p.save();\n \n j.submit(wc.getPage(p, \"configure\").getFormByName(\"config\"));\n \n p = j.jenkins.getItemByFullName(p.getFullName(), FreeStyleProject.class);\n assertNotNull(p);\n \n CopyArtifact copyArtifact = p.getBuildersList().get(CopyArtifact.class);\n assertNotNull(p);\n \n assertNotNull(copyArtifact.getBuildSelector());\n assertEquals(TriggeredBuildSelector.class, copyArtifact.getBuildSelector().getClass());\n \n TriggeredBuildSelector selector = (TriggeredBuildSelector)copyArtifact.getBuildSelector();\n \n assertTrue(selector.isFallbackToLastSuccessful());\n assertEquals(TriggeredBuildSelector.UpstreamFilterStrategy.UseGlobalSetting, selector.getUpstreamFilterStrategy());\n }\n }", "@NonNull\n private Builder addConfigRequest(IkeConfigAttribute configReq) {\n mConfigRequestList.add(configReq);\n return this;\n }", "public void build() {\r\n\tfDoingBatchBuild = true;\r\n\tfNotifier = new BuildNotifier(fDC, true);\r\n\tgetBuilderEnvironment().setNotifier(fNotifier);\r\n\tfNotifier.begin();\r\n\ttry {\r\n\t\tfNewState.readClassPath();\r\n\t\tfNotifier.subTask(Util.bind(\"build.scrubbingOutput\"/*nonNLS*/));\r\n\t\tfNewState.getBinaryOutput().scrubOutput();\r\n\t\tfNotifier.updateProgressDelta(0.05f);\r\n\t\tfNotifier.subTask(Util.bind(\"build.analyzingPackages\"/*nonNLS*/));\r\n\t\tfNewState.buildInitialPackageMap();\r\n\t\tfNotifier.updateProgressDelta(0.05f);\r\n\r\n\t\t/* Force build all in build context */\r\n\t\tfNotifier.subTask(Util.bind(\"build.analyzingSources\"/*nonNLS*/));\r\n\t\tIPackage[] pkgs = fNewState.getPackageMap().getAllPackagesAsArray();\r\n\t\tfor (int i = 0; i < pkgs.length; ++i) {\r\n\t\t\tfNotifier.checkCancel();\r\n\t\t\tSourceEntry[] entries = fNewState.getSourceEntries(pkgs[i]);\r\n\t\t\tif (entries != null) {\r\n\t\t\t\tfor (int j = 0; j < entries.length; ++j) {\r\n\t\t\t\t\tSourceEntry sEntry = entries[j];\r\n\t\t\t\t\tif (sEntry.isSource()) {\r\n\t\t\t\t\t\tPackageElement element = fNewState.packageElementFromSourceEntry(sEntry);\r\n\t\t\t\t\t\tfWorkQueue.add(element);\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\tfNotifier.updateProgressDelta(0.05f);\r\n\t\tVector vToCompile = fWorkQueue.getElementsToCompile();\r\n\t\tif (vToCompile.size() > 0) {\r\n\t\t\tfNotifier.setProgressPerCompilationUnit(0.75f / vToCompile.size());\r\n\t\t\tcompile(vToCompile);\r\n\t\t}\r\n\t\t/* Copy resources to binary output */\r\n\t\tnew ProjectResourceCopier(fNewState.getJavaProject(), fDC, fNotifier, 0.10f).copyAllResourcesOnClasspath();\r\n\t\t\r\n\t\tfNotifier.done();\r\n\t} finally {\r\n\t\tcleanUp();\r\n\t}\r\n}", "@Override\n public void configure(Configuration configuration)\n {\n this.configuration = configuration;\n this.issuer = configuration.getFieldValue(Constants.ISSUER_FIELD_NAME);\n this.requestJwtAudience = configuration.getFieldValue(Constants.AUDIENCE_FIELD_NAME);\n this.enableRevokedJwksValidation = configuration.getBooleanFieldValue(Constants.ENABLE_REVOKED_JWKS_VALIDATION_FIELD_NAME);\n String jwksUrl = configuration.getFieldValue(Constants.JWKS_URL_FIELD_NAME);\n populateSignatureConstraint(configuration);\n\n // This handler processes the JWKS URL for verifying the signature of software statements\n this.jwksHandler = new JwksHandler(jwksUrl, signatureConstraint, true);\n\n }", "private BuildTargets() {}", "protected void configureClient() {\n\t\tswitch (getVariant(ClientRegistration.class)) {\n\t\tcase STATIC_CLIENT:\n\t\t\tcallAndStopOnFailure(GetStaticClientConfiguration.class);\n\t\t\tconfigureStaticClient();\n\t\t\tbreak;\n\t\tcase DYNAMIC_CLIENT:\n\t\t\tcallAndStopOnFailure(StoreOriginalClientConfiguration.class);\n\t\t\tcallAndStopOnFailure(ExtractClientNameFromStoredConfig.class);\n\t\t\tconfigureDynamicClient();\n\t\t\tbreak;\n\t\t}\n\n\t\texposeEnvString(\"client_id\");\n\n\t\tcompleteClientConfiguration();\n\t}", "public io.dstore.values.BooleanValue.Builder getImportConfigurationBuilder() {\n \n onChanged();\n return getImportConfigurationFieldBuilder().getBuilder();\n }", "public MicroConfiguration() {\n this(\n System.getProperty(\"piranha.version\", MicroConfiguration.class.getPackage().getImplementationVersion()),\n System.getProperty(\"piranha.extensions\", \"micro-core,micro\"),\n System.getProperty(\"piranha.dependencies\", \"\"),\n System.getProperty(\"piranha.repositories\", \"https://repo1.maven.org/maven2\"),\n Boolean.valueOf(System.getProperty(\"piranha.offline\", \"false\")),\n Integer.valueOf(System.getProperty(\"piranha.port\", \"8080\")),\n System.getProperty(\"piranha.root\"),\n System.getProperty(\"piranha.http.server\", \"impl\"),\n\n\n null,\n null,\n null);\n }", "@Override\n public List<FileObject> createBuildSystem(Space s, List<FileObject> files) {\n TemplatePair tmpl_extra = new TemplatePair(\"linker_script\", s.getName());\n TemplatePair tmpl_extra1 = new TemplatePair(\"sdk_config\", \"sdk_config\");\n List<TemplatePair> make_addons = new ArrayList<>();\n make_addons.add(tmpl_extra);\n //make_addons.add(tmpl_extra1);\n List<FileObject> all_files = new ArrayList<>(super.createBuildSystem(s,files, NrfPlatformOptions.getInstance(), make_addons));\n\n all_files.add(makeLinkerScript(tmpl_extra));\n //all_files.add(makeConfigFile(tmpl_extra1, build_nrf_config_file(s)));\n\n return all_files;\n }", "@Override\n\tprotected boolean configure(ConsoleManager cm, Host host, PhpBuild build, ScenarioSet scenario_set, String app_dir) {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean configure(ConsoleManager cm, Host host, PhpBuild build, ScenarioSet scenario_set, String app_dir) {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean configure(ConsoleManager cm, Host host, PhpBuild build, ScenarioSet scenario_set, String app_dir) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void configure(CServiceParameter arg0)\n\t{\n\n\t}", "public static void initializeWithContextAndKey(Context context, String apiKey, String googleApiProjectNumber) {\n /*if(ZeTarget.isDebuggingOn()){\n Log.d(TAG, \"initializeWithContextAndKey() called\");\n }*/\n initialize(context, apiKey,googleApiProjectNumber);\n }", "public Configuration.Builder getClientIdAndClientSecretBuilder() {\n String clientId = \"0993a005480472a69fab10c2f9b8ad0d6bee7acf\";//getString(R.string.client_id);\n String clientSecret=\"oVsWjoQ2RHeHvZ8xK3yrtdHrG7YiN+rnHh4qqBfmscDbCwplTFzytAoVIVrXMnAQShuBYuA6fZftYL+AIvX5zRP8JXOs06dQcej1yeL/ACJSGuiKoQJbqdC6CELuP+Pl\";\n\n String codeGrantRedirectUri = \"deva://robokart\";\n Configuration.Builder configBuilder =\n new Configuration.Builder(clientId, clientSecret, SCOPE, null,\n null);\n configBuilder.setCacheDirectory(this.getCacheDir())\n .setUserAgentString(getUserAgentString(this))\n // Used for oauth flow\n .setCodeGrantRedirectUri(codeGrantRedirectUri);\n\n return configBuilder;\n }", "public SetTypeConfigurationRequest withType(ThirdPartyType type) {\n this.type = type.toString();\n return this;\n }", "private void config() {\n\t}", "@Override\n public void initializeRuleClasses(ConfiguredRuleClassProvider.Builder builder) {\n builder.addConfigurationOptions(BuildConfiguration.Options.class);\n builder.addConfigurationOptions(TestConfiguration.TestOptions.class);\n // The tools repository is needed for createGlobals\n builder.setToolsRepository(TestConstants.TOOLS_REPOSITORY);\n }", "public StandardTransactionConfig build() {\n Preconditions.checkArgument(null != timestamp || null != timestampProvider);\n\n return new StandardTransactionConfig(metricsPrefix,\n timestampProvider, timestamp, customOptions);\n }", "@Test\n public void testConfigurationBuilderProvider()\n throws ConfigurationException\n {\n factory.addProperty(\"override.configuration[@fileName]\", TEST_FILE\n .getAbsolutePath());\n CombinedConfiguration cc = factory.getConfiguration(false);\n assertEquals(\"Wrong number of configurations\", 1, cc\n .getNumberOfConfigurations());\n checkProperties(cc);\n }", "@Incubating\npublic interface ProjectPluginDependenciesSpec extends PluginDependenciesSpec{\n\n /**\n * Configures the plugins on this project and all its sub-projects.\n *\n * @param configuration the configuration to apply\n */\n void allprojects(Action<? super ProjectPluginDependenciesSpec> configuration);\n\n /**\n * Configures the plugins on all of this project's sub-projects\n * @param configuration\n */\n void subprojects(Action<? super ProjectPluginDependenciesSpec> configuration);\n\n}", "private void initConfig() {\n Path walletPath;\n Wallet wallet;\n\n // load a CCP\n Path networkConfigPath; \n \n try {\n \t\n \tif (!isLoadFile) {\n // Load a file system based wallet for managing identities.\n walletPath = Paths.get(\"wallet\");\n wallet = Wallet.createFileSystemWallet(walletPath);\n\n // load a CCP\n networkConfigPath = Paths.get(\"\", \"..\", \"basic-network\", configFile);\n \n builder = Gateway.createBuilder();\n \n \tbuilder.identity(wallet, userId).networkConfig(networkConfigPath).discovery(false);\n \t\n \tisLoadFile = true;\n \t}\n } catch (Exception e) {\n \te.printStackTrace();\n \tthrow new RuntimeException(e);\n }\n\t}", "void addDependsOnMe(DependencyItem dependency);", "private CustomClassBuilder(Configuration configuration) {\n\t\tsuper(configuration);\n\t}" ]
[ "0.59377867", "0.5484345", "0.5419153", "0.53531915", "0.52833694", "0.52802175", "0.52463686", "0.52260876", "0.5213648", "0.51923025", "0.51396257", "0.51071626", "0.50024915", "0.4982065", "0.48976067", "0.48731485", "0.48582405", "0.48507488", "0.48456672", "0.4834759", "0.48340684", "0.48211312", "0.47745886", "0.4721622", "0.47086996", "0.46495643", "0.46217138", "0.46070185", "0.4605594", "0.45851952", "0.45829317", "0.45780873", "0.4576743", "0.45650476", "0.4565027", "0.45406294", "0.4536577", "0.45152518", "0.45032704", "0.45002812", "0.44960627", "0.44933817", "0.44883028", "0.44839737", "0.44764584", "0.44502905", "0.44391853", "0.44359362", "0.4434249", "0.4425357", "0.44221324", "0.44219056", "0.44135374", "0.4405016", "0.44039255", "0.44028834", "0.43995205", "0.43765813", "0.4367993", "0.43658155", "0.4362533", "0.4358849", "0.43583322", "0.43498033", "0.43496293", "0.43469167", "0.43459153", "0.43290943", "0.43238378", "0.431912", "0.43173608", "0.43169028", "0.43118423", "0.4310445", "0.43048584", "0.43047336", "0.43046367", "0.43030477", "0.4290681", "0.42901438", "0.42793465", "0.4267861", "0.4260237", "0.42599288", "0.4255204", "0.4252216", "0.4252216", "0.4252216", "0.42499596", "0.4249497", "0.4248787", "0.42429793", "0.42377645", "0.42245594", "0.42231947", "0.42180434", "0.42179945", "0.42175752", "0.42146778", "0.42104352" ]
0.47937328
22
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)"); } return addThirdPartyConfigurationCall(generalContractId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "private Contract() {\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.6566565", "0.6497611", "0.64637333", "0.622235", "0.6210186", "0.6131018", "0.60290796", "0.59923744", "0.58934605", "0.58661616", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142", "0.53970677", "0.53708893", "0.535706", "0.53022665", "0.5297568", "0.5285573", "0.52775395", "0.5228783", "0.52161616", "0.5215486", "0.5205767", "0.5205767", "0.5199093", "0.51915133", "0.51328886", "0.5033789", "0.5029831", "0.5028553", "0.5016704", "0.50105745", "0.498703", "0.49869227", "0.49858847", "0.49840963", "0.4981568", "0.49711713", "0.49521965", "0.49504304", "0.4947746", "0.49310437", "0.49262455", "0.49186945", "0.48840562", "0.48525771", "0.4834332", "0.4834332", "0.4834332", "0.4834332", "0.48338956", "0.48318732", "0.48279566", "0.48160288", "0.4812081", "0.47995192", "0.47923365", "0.4781422", "0.47777963", "0.47646332", "0.47629628", "0.47589943", "0.4757054", "0.4750851", "0.47358122", "0.47310758", "0.4729941", "0.4721001", "0.47173005", "0.47168317", "0.47128192", "0.4699858", "0.4696607", "0.4694214", "0.4693992", "0.4684683", "0.4683533", "0.4683291", "0.46758085", "0.46754542", "0.4674884", "0.46742436", "0.46673056", "0.46622548", "0.466158", "0.46588138", "0.4658", "0.46564242", "0.46557775", "0.46517795", "0.46499386" ]
0.53854465
22
Build call for getAvailableCurrencies
public Call getAvailableCurrenciesCall(String generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/AvailableCurrencies" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<String> getAllSupportedCurrenciesByShops();", "List<CurrencyDTO> getCurrencies();", "public String getCurrencies() {\n\n\t\treturn getJson(API_VERSION, PUBLIC, \"getcurrencies\");\n\t}", "public Pokemon.Currency.Builder getCurrencyBuilder() {\n bitField0_ |= 0x00000400;\n onChanged();\n return getCurrencyFieldBuilder().getBuilder();\n }", "@PostConstruct\n public void initCurrencies() {\n if (converterFacade.getAllCurrencies().isEmpty()) {\n converterFacade.createCurrency(\"EUR\", \"Euros\", 0.1023976481d);\n converterFacade.createCurrency(\"SEK\", \"Swedish Krona\", 1d);\n converterFacade.createCurrency(\"USD\", \"US Dollar\", 0.1100736983d);\n converterFacade.createCurrency(\"BGP\", \"British Pound\", 0.0872583118);\n }\n }", "@SkipValidation\n public String getAllCurrency() {\n currencyList = currencyService.getAllCurrency();\n return SUCCESS;\n }", "@Override\n public HttpClientApiLayerEntity getCuotesByCurrencies(String currencies) {\n HttpRequest<?> req = HttpRequest.GET(uri+\"&currencies=\"+currencies);\n return (HttpClientApiLayerEntity) httpClient.retrieve(req, Argument.of(List.class, HttpClientApiLayerEntity.class)).blockingSingle().get(0);\n }", "public List<String> retrieveAllCurrencieNames() {\n List<String> currenciesAvailable = new ArrayList<>(2);\n getCurrencyBuilder()\n .getCurrencyModels()\n .forEach(currencyModel ->\n currenciesAvailable.add(currencyModel.getCurrencyName()));\n return currenciesAvailable;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "@Override\n public String get_rates(String betrag, String currency, List<String> targetcurrencies) {\n String api = null;\n try {\n api = new String(Files.readAllBytes(Paths.get(\"src/resources/OfflineData.json\")));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n JSONObject obj = new JSONObject(api);\n ArrayList<String> calculatedrates = new ArrayList<>();\n if (currency.equals(\"EUR\")) {\n for (String targetcurrency : targetcurrencies) {\n float rate = obj.getJSONObject(\"rates\").getFloat(targetcurrency);\n calculatedrates.add((Float.parseFloat(betrag) * rate) + \" \" + targetcurrency + \" (Kurs: \" + rate + \")\");\n }\n } else {\n float currencyrate = obj.getJSONObject(\"rates\").getFloat(currency);\n for (String targetcurrency : targetcurrencies) {\n float rate = obj.getJSONObject(\"rates\").getFloat(targetcurrency);\n calculatedrates.add((Float.parseFloat(betrag) / currencyrate * rate) + \" \" + targetcurrency + \" (Kurs: \" + rate / currencyrate + \")\");\n }\n }\n return Data.super.display(betrag, currency, calculatedrates, obj.get(\"date\").toString());\n }", "@Override\r\n public ArrayList<CurrencyTuple> getSymbols() throws MalformedURLException, IOException{\r\n String symbolsUrl = \"https://api.binance.com/api/v1/ticker/24hr\";\r\n String charset = \"UTF-8\";\r\n String symbol = this.pair;\r\n URLConnection connection = new URL(symbolsUrl).openConnection();\r\n connection.setRequestProperty(\"Accept-Charset\", charset);\r\n InputStream stream = connection.getInputStream();\r\n ByteArrayOutputStream responseBody = new ByteArrayOutputStream();\r\n byte buffer[] = new byte[1024];\r\n int bytesRead = 0;\r\n while ((bytesRead = stream.read(buffer)) > 0) {\r\n responseBody.write(buffer, 0, bytesRead);\r\n }\r\n String responseString = responseBody.toString();\r\n int position = 0;\r\n ArrayList<CurrencyTuple> toReturn = new ArrayList<>();\r\n for (int i = 0; i < 100; i++){\r\n position = responseString.indexOf(\"symbol\", position + 6);\r\n String symbols = responseString.substring(position + 9, position + 15);\r\n String symbolOwned = symbols.substring(0, 3);\r\n String symbolNotOwned = symbols.substring(3, 6);\r\n if (responseString.substring(position+9, position + 16).contains(\"\\\"\")\r\n || responseString.substring(position+9, position + 16).contains(\"USD\")){\r\n if (symbolOwned.contains(\"USD\")) {\r\n symbolOwned = symbolOwned.concat(\"T\");\r\n }\r\n if (symbolNotOwned.contains(\"USD\")) {\r\n symbolOwned = symbolNotOwned.concat(\"T\");\r\n }\r\n Currency CurrencyOwned = new Currency(symbolOwned, 0.0);\r\n Currency CurrencyNotOwned = new Currency(symbolNotOwned, 0.0);\r\n CurrencyTuple tuple = new CurrencyTuple(CurrencyOwned, CurrencyNotOwned);\r\n System.out.println(CurrencyOwned.getName() + \" - \" + CurrencyNotOwned.getName());\r\n toReturn.add(tuple);\r\n }\r\n }\r\n return toReturn;\r\n }", "private void listCurrencies() {\r\n\t\t// Test whether we already have currencies\r\n\t\tif (currencies == null) {\r\n\t\t\t// No, so complain and return\r\n\t\t\tSystem.out.println(\"There are currently no currencies in the system.\");\r\n\t\t\tSystem.out.println(\"Please add at least one currency.\");\r\n\t\t\tSystem.out.println();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Reset the index into the currencies list\r\n\t\tcurrencies.reset();\r\n\t\tCurrency currency;\r\n\t\t// Output all currencies\r\n\t\twhile ((currency = currencies.next()) != null) {\r\n\t\t\tSystem.out.println(currency.getCode());\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public interface CurrenciesApiInterface {\n @GET(Constants.LATEST)\n Call<ResponseBody> getCurrencies();\n}", "@GET(\"stripe_supported_country_list\")\n Call<ResponseBody> stripeSupportedCountry(@Query(\"token\") String token);", "Currency getCurrency();", "String getTradeCurrency();", "@GET\n @Path( \"codebook/billing-units\" )\n void getBillingUnits( @HeaderParam( \"Accept-Language\" ) String acceptLanguage,\n SuccessCallback<Items<BillingUnit>> callback );", "CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);", "String getSettlementCurrency();", "boolean isCurrencyAware();", "public CurrencyRates() {\n this(DSL.name(\"currency_rates\"), null);\n }", "private void getOnlineMoneyData(final Context context, final String fromCurrencyCode, final String toCurrencyCode) {\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.GET,\n BuildConfig.BASE_URL, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n closeProgressDialog();\n Log.d(\"Tag\", response.toString());\n try {\n String date = response.getString(\"date\");\n JSONObject rates = response.getJSONObject(\"rates\");\n\n double baseRate = Double.valueOf(rates.getString(\"USD\"));\n double initRate = Double.valueOf(rates.getString(fromCurrencyCode));\n double targetRate = Double.valueOf(rates.getString(toCurrencyCode));\n double first_input = Double.valueOf(et_currencyvalue.getText().toString());\n String resultFinal = String.valueOf(String.format(\"%.3f\", ((targetRate * first_input) / initRate)));\n tv_currencyresultv.setText(resultFinal);\n Timestamp ts = new Timestamp(response.getLong(\"timestamp\"));\n Date time = new Date(ts.getTime());\n tv_lastupdate.setText(\"Last updated on \" + date);\n runAnimation(android.R.anim.fade_in, tv_lastupdate);\n } catch (JSONException e) {\n e.printStackTrace();\n Toast.makeText(context,\n \"Error: \" + e.getMessage(),\n Toast.LENGTH_LONG).show();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n closeProgressDialog();\n reset();\n VolleyLog.d(\"TAG\", \"Error: \" + error.getMessage());\n Toast.makeText(context, error.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n });\n\n RequestQueue queue = Volley.newRequestQueue(context);\n // Adding request to request queue\n queue.add(jsonObjReq);\n\n }", "public List<ModelCurrency> getModelCurrencyList() {\r\n\t\treturn modelCurrencyList;\r\n\t}", "public Future<List<String>> getAvailableVoices() throws DynamicCallException, ExecutionException {\n return call(\"getAvailableVoices\");\n }", "public interface ApiService {\n @GET(\"get_currency_rates.php\")\n Call<List<Currency>> getRates();\n}", "Pokemon.CurrencyOrBuilder getCurrencyOrBuilder();", "private static Set<String> getCurrencySet() {\n Set<String> currencySet = new HashSet<>();\n for (int i= 0; i<getDataBase().length;i++){\n currencySet.add(getDataBase()[i][0]);\n }\n return Collections.synchronizedSet(currencySet);\n }", "public Currency getCurrency();", "private static Map<String, Double> createCurrencyPairRates() {\n\t\t\n\t\tMap<String, Double> currencyRates = new HashMap<>();\n\t\tcurrencyRates.put(\"AUDUSD\", 0.8371);\n\t\tcurrencyRates.put(\"CADUSD\", 0.8711);\n\t\tcurrencyRates.put(\"CNYUSD\", 6.1715);\n\t\tcurrencyRates.put(\"EURUSD\", 1.2315);\n\t\tcurrencyRates.put(\"GBPUSD\", 1.5683);\n\t\tcurrencyRates.put(\"NZDUSD\", 0.7750);\n\t\tcurrencyRates.put(\"USDJPY\", 119.95);\n\t\tcurrencyRates.put(\"EURCZK\", 27.6028);\n\t\tcurrencyRates.put(\"EURDKK\", 7.4405);\n\t\tcurrencyRates.put(\"EURNOK\", 8.6651);\n\t\t\n\t\treturn currencyRates;\n\t\t\n\t}", "double requestCurrentRate(String fromCurrency,\n String toCurrency);", "@Override\n @Nullable\n public Currency getCurrency(String key) {\n return currencies.get(key);\n }", "void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);", "public static void loadCurrencyInformation(Context context) {\n SharedPreferences sharedPrefs = context\n .getSharedPreferences(Darwin.SHARED_PREFERENCES, Context.MODE_PRIVATE);\n currencyThousandsDelim = sharedPrefs\n .getString(Darwin.KEY_SELECTED_COUNTRY_THOUSANDS_STEP, \",\");\n currencyFractionCount = sharedPrefs.getInt(Darwin.KEY_SELECTED_COUNTRY_NO_DECIMALS, 0);\n currencyFractionDelim = sharedPrefs\n .getString(Darwin.KEY_SELECTED_COUNTRY_DECIMALS_STEP, \".\");\n currencyUnitPattern = sharedPrefs\n .getString(Darwin.KEY_SELECTED_COUNTRY_CURRENCY_SYMBOL, \".\");\n }", "private void requestBucks() {\n\n\t}", "@Override\n public HttpClientApiLayerEntity getCuotesFromCurrenciesSource(String source) {\n HttpRequest<?> req = HttpRequest.GET(uri+\"&source=\"+source);\n return (HttpClientApiLayerEntity) httpClient.retrieve(req, Argument.of(List.class, HttpClientApiLayerEntity.class)).blockingSingle().get(0);\n\n }", "@GET(\"/api/data/coinlist/\")\n Call<CoinsResponse> getCoins();", "public ResponseCurrencyConversionBo converCurrency() {\n\n ResponseCurrencyConversionBo responseCurrencyConversionBo = new ResponseCurrencyConversionBo();\n\n try {\n long startTime = System.nanoTime();\n HttpClient client = HttpClientBuilder.create().build();\n String url = myPropertiesReader.getPropertyValue(\"unitconvertersUrl\");\n url = MessageFormat.format(url, requestCurrencyConversionBo.getSourceCountryCurrency(),requestCurrencyConversionBo.getTargetCountryCurrency());\n HttpGet post = new HttpGet(url);\n\n HttpResponse response = client.execute(post);\n if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\n\n BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\n String finalResult = \"\";\n StringBuffer result = new StringBuffer();\n String line = \"\";\n while ((line = rd.readLine()) != null) {\n result.append(line);\n }\n\n finalResult = result.toString();\n log.info(finalResult);\n String currencyRate = finalResult.substring(finalResult.indexOf(\"<p class=\\\"bigtext\\\">\"),finalResult.lastIndexOf(\"<p class=\\\"bigtext\\\">\"));\n log.info(currencyRate);\n currencyRate = currencyRate.replace(\"<p class=\\\"bigtext\\\">\",\"\").replace(\"</p>\",\"\");\n log.info(currencyRate);\n String[] currencyRateSplitByBR = currencyRate.split(\"<br>\");\n log.info(currencyRateSplitByBR[0]);\n String finalCurrencyRate = currencyRateSplitByBR[0].split(\"=\")[1].replaceAll(\"[a-zA-Z]\", \"\").trim();\n log.info(finalCurrencyRate);\n responseCurrencyConversionBo.setCurrencyRate(finalCurrencyRate);\n }\n } catch (Exception e) {\n e.printStackTrace();\n log.error(e.getMessage());\n }\n\n return responseCurrencyConversionBo;\n }", "boolean hasCurrency();", "@Override\n public String getDescription() {\n return \"Buy currency\";\n }", "boolean buy(String... vendorCodes);", "List<Country> getAvailableByStatus(int status);", "private JsonObject getRatesFromApi(){\n try {\n // Setting URL\n String url_str = \"https://v6.exchangerate-api.com/v6/\"+ getApiKey() +\"/latest/\"+ Convert.getBaseCurrency();\n\n // Making Request\n URL url = new URL(url_str);\n HttpURLConnection request = (HttpURLConnection) url.openConnection();\n request.connect();\n\n // Return parsed JSON object\n return parseRequest(request);\n\n } catch (IOException e) {\n e.printStackTrace();\n return new JsonObject();\n }\n }", "public Pokemon.CurrencyOrBuilder getCurrencyOrBuilder() {\n if (currencyBuilder_ != null) {\n return currencyBuilder_.getMessageOrBuilder();\n } else {\n return currency_;\n }\n }", "public List<String> getAvailableVoices() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getAvailableVoices\").get();\n }", "private void prepareRates() {\n // set the Currency as GBP (symbol) which is applicable in all rates\n Currency gbp = Currency.getInstance(\"GBP\");\n rates.add(new Rate(\"Morning\", gbp, 15d, LocalTime.of(5, 0), LocalTime.of(10, 0)));\n rates.add(new Rate(\"Evening\", gbp, 18d, LocalTime.of(16, 30), LocalTime.of(20, 0)));\n rates.add(new Rate(\"Night\", gbp, 20d, LocalTime.of(20, 0), LocalTime.of(23, 0)));\n rates.add(new Rate(\"Default\", gbp, 10d, null, null));\n }", "public void queryAllBuyableItems(){\r\n awsAppSyncClient.query(ListBuyableItemsQuery.builder().build())\r\n .responseFetcher(AppSyncResponseFetchers.CACHE_AND_NETWORK)\r\n .enqueue(getAllBuyableItemsCallback);\r\n }", "public interface ICurrencyExchangeService {\n/**\n * Requests the current exchange rate from one currency\n * to another.\n * @param fromCurrency the original Currency\n * @param toCurrency the 'destination' or final Currency\n * @return the currency exchange rate\n */\n\n double requestCurrentRate(String fromCurrency,\n String toCurrency);\n}", "public StockUnits call() throws Exception {\n\treturn broker.getStocksOfComapny(company);\r\n }", "private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }", "public OldSwedishCurrency()\r\n\t{\r\n\t\tthis(0, 0, 0);\r\n\t}", "public static Collection selectALLCurrencySplitConfig() {\n\t\t\treturn null;\r\n\t\t}", "public Currency(String country,double value, double valueUSD){\n this.country = country;\n this.value = value;\n this.valueUSD = valueUSD;\n}", "com.google.protobuf.StringValueOrBuilder getCurrencyCodeOrBuilder();", "com.google.protobuf.StringValue getCurrencyCode();", "@Scheduled(cron = \"*/30 * * * * ?\")\n private void seedCurrencies() {\n List<SeedCurrencyBindingModel> rawCurrencies;\n try {\n rawCurrencies = this.currencyScrape.getCurrencyNameEuroRate();\n areAllCurrenciesValid(rawCurrencies);\n } catch (Exception e) {\n try {\n rawCurrencies = this.secondaryCurrencyScrape.getCurrencyNameEuroRate();\n areAllCurrenciesValid(rawCurrencies);\n } catch (Exception ex) {\n rawCurrencies = null;\n }\n }\n if (rawCurrencies == null) {\n throw new NullPointerException();\n }\n\n rawCurrencies.forEach(rawCurrency -> {\n if (this.currencyRepository.existsByCode(rawCurrency.getCode())) {\n this.currencyRepository.updateCurrencyRate(rawCurrency.getCode(), rawCurrency.getEuroRate());\n } else {\n this.currencyRepository.save(this.modelMapper.map(rawCurrency, Currency.class));\n }\n });\n }", "boolean hasCurrencyConstant();", "com.google.protobuf.ByteString\n getSettlementCurrencyBytes();", "com.google.protobuf.ByteString\n getTradeCurrencyBytes();", "private void retrieveCurrencyData() {\n Log.d(TAG, \" startService\");\n service = new Intent(this, CurrencyLoaderService.class);\n startService(service); //Starting the service\n bindService(service, mConnection, Context.BIND_AUTO_CREATE);\n\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsContractsCall(underlying, expiration, _callback);\n }", "public abstract String getCurrencyType();", "@Override\r\n public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException {\n if (tickerRequestTimeStamp == 0L || System.currentTimeMillis() - tickerRequestTimeStamp >= getRefreshRate()) {\r\n\r\n logger.debug(\"requesting BitcoinCharts tickers\");\r\n tickerRequestTimeStamp = System.currentTimeMillis();\r\n\r\n // Request data\r\n cachedBitcoinChartsTickers = bitcoinCharts.getMarketData();\r\n }\r\n\r\n return BitcoinChartsAdapters.adaptTicker(cachedBitcoinChartsTickers, currencyPair);\r\n }", "public boolean hasCurrency() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }", "public String getCurrencies() {\n try {\n URLConnection connection = new URL(url).openConnection();\n connection.setConnectTimeout(30000);\n connection.setReadTimeout(60000);\n return inputStreamToString(connection.getInputStream());\n } catch (IOException ignored) {\n }\n return null;\n // return \"{\\\"success\\\":true,\\\"timestamp\\\":1522438448,\\\"base\\\":\\\"EUR\\\",\\\"date\\\":\\\"2018-03-30\\\",\\\"rates\\\":{\\\"AED\\\":4.525864,\\\"AFN\\\":85.161016,\\\"ALL\\\":129.713915,\\\"AMD\\\":591.02486,\\\"ANG\\\":2.194225,\\\"AOA\\\":263.604778,\\\"ARS\\\":24.782964,\\\"AUD\\\":1.603522,\\\"AWG\\\":2.193728,\\\"AZN\\\":2.094523,\\\"BAM\\\":1.959078,\\\"BBD\\\":2.464863,\\\"BDT\\\":102.168576,\\\"BGN\\\":1.956367,\\\"BHD\\\":0.464385,\\\"BIF\\\":2157.962929,\\\"BMD\\\":1.232432,\\\"BND\\\":1.622501,\\\"BOB\\\":8.454972,\\\"BRL\\\":4.072329,\\\"BSD\\\":1.232432,\\\"BTC\\\":0.000181,\\\"BTN\\\":80.292916,\\\"BWP\\\":11.742489,\\\"BYN\\\":2.403731,\\\"BYR\\\":24155.657915,\\\"BZD\\\":2.462157,\\\"CAD\\\":1.588901,\\\"CDF\\\":1929.376385,\\\"CHF\\\":1.174759,\\\"CLF\\\":0.027287,\\\"CLP\\\":743.649213,\\\"CNY\\\":7.730802,\\\"COP\\\":3437.005101,\\\"CRC\\\":692.811412,\\\"CUC\\\":1.232432,\\\"CUP\\\":32.659435,\\\"CVE\\\":110.314948,\\\"CZK\\\":25.337682,\\\"DJF\\\":217.930869,\\\"DKK\\\":7.455792,\\\"DOP\\\":60.88212,\\\"DZD\\\":140.270429,\\\"EGP\\\":21.66663,\\\"ERN\\\":18.474632,\\\"ETB\\\":33.546785,\\\"EUR\\\":1,\\\"FJD\\\":2.489994,\\\"FKP\\\":0.876387,\\\"GBP\\\":0.878367,\\\"GEL\\\":2.977929,\\\"GGP\\\":0.878427,\\\"GHS\\\":5.436305,\\\"GIP\\\":0.876757,\\\"GMD\\\":58.022879,\\\"GNF\\\":11085.722017,\\\"GTQ\\\":9.041167,\\\"GYD\\\":251.699486,\\\"HKD\\\":9.672744,\\\"HNL\\\":29.022579,\\\"HRK\\\":7.425898,\\\"HTG\\\":79.270474,\\\"HUF\\\":312.396738,\\\"IDR\\\":16958.257802,\\\"ILS\\\":4.30267,\\\"IMP\\\":0.878427,\\\"INR\\\":80.242385,\\\"IQD\\\":1459.198927,\\\"IRR\\\":46515.663531,\\\"ISK\\\":121.33288,\\\"JEP\\\":0.878427,\\\"JMD\\\":154.325077,\\\"JOD\\\":0.873183,\\\"JPY\\\":130.921205,\\\"KES\\\":124.16795,\\\"KGS\\\":84.307561,\\\"KHR\\\":4914.197347,\\\"KMF\\\":490.729577,\\\"KPW\\\":1109.188805,\\\"KRW\\\":1306.217196,\\\"KWD\\\":0.368748,\\\"KYD\\\":1.011066,\\\"KZT\\\":393.096349,\\\"LAK\\\":10204.533468,\\\"LBP\\\":1860.972035,\\\"LKR\\\":191.667756,\\\"LRD\\\":162.373324,\\\"LSL\\\":14.567811,\\\"LTL\\\":3.757319,\\\"LVL\\\":0.764786,\\\"LYD\\\":1.634332,\\\"MAD\\\":11.330857,\\\"MDL\\\":20.258758,\\\"MGA\\\":3919.132681,\\\"MKD\\\":61.251848,\\\"MMK\\\":1639.134357,\\\"MNT\\\":2940.582048,\\\"MOP\\\":9.954478,\\\"MRO\\\":432.583892,\\\"MUR\\\":41.29107,\\\"MVR\\\":19.189425,\\\"MWK\\\":879.265951,\\\"MXN\\\":22.379772,\\\"MYR\\\":4.759698,\\\"MZN\\\":75.486896,\\\"NAD\\\":14.553832,\\\"NGN\\\":438.746047,\\\"NIO\\\":38.143757,\\\"NOK\\\":9.665842,\\\"NPR\\\":128.377096,\\\"NZD\\\":1.702979,\\\"OMR\\\":0.474245,\\\"PAB\\\":1.232432,\\\"PEN\\\":3.975213,\\\"PGK\\\":3.925342,\\\"PHP\\\":64.28409,\\\"PKR\\\":142.185629,\\\"PLN\\\":4.210033,\\\"PYG\\\":6843.692686,\\\"QAR\\\":4.487658,\\\"RON\\\":4.655145,\\\"RSD\\\":118.061885,\\\"RUB\\\":70.335482,\\\"RWF\\\":1038.853498,\\\"SAR\\\":4.62113,\\\"SBD\\\":9.587829,\\\"SCR\\\":16.588987,\\\"SDG\\\":22.246869,\\\"SEK\\\":10.278935,\\\"SGD\\\":1.615324,\\\"SHP\\\":0.876757,\\\"SLL\\\":9588.317692,\\\"SOS\\\":693.859366,\\\"SRD\\\":9.145099,\\\"STD\\\":24512.446842,\\\"SVC\\\":10.784232,\\\"SYP\\\":634.677563,\\\"SZL\\\":14.552187,\\\"THB\\\":38.403022,\\\"TJS\\\":10.877199,\\\"TMT\\\":4.202592,\\\"TND\\\":2.98138,\\\"TOP\\\":2.726513,\\\"TRY\\\":4.874764,\\\"TTD\\\":8.17041,\\\"TWD\\\":35.851887,\\\"TZS\\\":2774.203779,\\\"UAH\\\":32.339456,\\\"UGX\\\":4541.510587,\\\"USD\\\":1.232432,\\\"UYU\\\":34.915237,\\\"UZS\\\":10007.344406,\\\"VEF\\\":60824.193529,\\\"VND\\\":28089.579347,\\\"VUV\\\":129.873631,\\\"WST\\\":3.158603,\\\"XAF\\\":655.530358,\\\"XAG\\\":0.075316,\\\"XAU\\\":0.00093,\\\"XCD\\\":3.33201,\\\"XDR\\\":0.847694,\\\"XOF\\\":655.530358,\\\"XPF\\\":119.368042,\\\"YER\\\":307.923024,\\\"ZAR\\\":14.559828,\\\"ZMK\\\":11093.367083,\\\"ZMW\\\":11.622277,\\\"ZWL\\\":397.280478}}\";\n }", "public interface CryptoInterface {\n @GET(\"pricemulti?fsyms=\"+FROM_SYSM+\"&tsyms=\"+TO_SYSM)\n Observable<Crytocoin> getCompareRates();\n}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<TCcCurrencyConnection> getCurrConnList() {\n\t\tLong selectRateSourceId = null;\n\t\tLong selectRateTargetId = null;\n\t\tString hql = \"from TCcCurrencyConnection t where 1 = 1\";\n\t\tif(!StringUtil.isBlank(selectRateSource) && !\"default\".equals(selectRateSource)) {\n\t\t\tselectRateSourceId = Long.parseLong(selectRateSource);\n\t\t\thql += \" and t.originCurrencyId = \" + selectRateSourceId;\n\t\t}\n\t\tif(!StringUtil.isBlank(selectRateTarget) && !\"default\".equals(selectRateTarget)) {\n\t\t\tselectRateTargetId = Long.parseLong(selectRateTarget);\n\t\t\thql += \" and t.targetCurrencyId = \" + selectRateTargetId;\n\t\t}\n\t\tcurrConnList = currencyService.getGenericDao().query(hql);\n\t\tif (currConnList!=null &&currConnList.size()!= 0 ) {\n\t\t\tfor (TCcCurrencyConnection currency : currConnList) {\n\t\t\t\t\tTCcObject originObject = (TCcObject) currencyService.getGenericDao().get(TCcObject.class,currency.getOriginCurrencyId());\n\t\t\t\t\tTCcObject targetObject = (TCcObject) currencyService.getGenericDao().get(TCcObject.class,currency.getTargetCurrencyId());\n\t\t\t\t\tif (originObject!= null&&targetObject!=null) {\n\t\t\t\t\t\tString originName =originObject.getObjectName();\n\t\t\t\t\t\tString targetName = targetObject.getObjectName();\n\t\t\t\t\t\tcurrency.setConnName(originName+\"-\"+targetName);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn currConnList;\n\t}", "boolean hasCurrencyCode();", "public boolean hasCurrency() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }", "public List<Map<String, Object>> getSubscriptionsDueForBilling();", "@Scheduled(fixedRate = 8 * 1000 * 60 * 60)\n private void getRatesTask() {\n try {\n RestTemplate restTemplate = new RestTemplate();\n CurrencyDTO forObject = restTemplate.getForObject(fixerIoApiKey, CurrencyDTO.class);\n forObject.getRates().forEach((key, value) -> {\n Currency currency = new Currency(key, value);\n this.currencyRepository.save(currency);\n });\n } catch (RestClientException ex) {\n System.out.println(ex.getMessage());\n }\n }", "void callGetAllBrandsApi(String from, String to) {\n progressVisible.set(TRUE);\n DisposableSingleObserver<AllBrandsUseCase.ResponseValues> disposableSingleObserver =\n new DisposableSingleObserver<AllBrandsUseCase.ResponseValues>() {\n @Override\n public void onSuccess(AllBrandsUseCase.ResponseValues responseValues) {\n progressVisible.set(FALSE);\n mListMutableLiveData.postValue(Pair.create(responseValues.getData().getPenCount(),\n responseValues.getData().getData()));\n if (responseValues.getData() != null) {\n if (Integer.parseInt(to) > TWENTY) {\n mCategoryData.addAll(responseValues.getData().getData());\n } else {\n mCategoryData.clear();\n mCategoryData.addAll(responseValues.getData().getData());\n }\n EcomUtil.printLog(\n \"exe\" + \"conut\" + responseValues.getData().getPenCount() + \"mCategoryData\"\n + mCategoryData.size());\n mListMutableLiveData.postValue(\n Pair.create(responseValues.getData().getPenCount(), mCategoryData));\n }\n }\n\n @Override\n public void onError(Throwable e) {\n progressVisible.set(FALSE);\n EcomUtil.printLog(\"AllBrands Fail\" + e.getMessage());\n }\n };\n mHandler.execute(mAllBrandsUseCase,\n new AllBrandsUseCase.RequestValues(from, to),\n disposableSingleObserver);\n }", "public interface CurrencyRatesUpdater {\n\n public static final String ERROR_CONNECTING = \"ERROR_CONNECTING\";\n public static final String ERROR_RESPONSE = \"ERROR_RESPONSE\";\n public static final String ERROR_UNKNOWN = \"ERROR_UNKNOWN\";\n\n public ResponseRateUpdate getRate(String fromCurrencyCode, String toCurrencyCode);\n\n public class ResponseRateUpdate {\n\n public ResponseRateUpdate() {\n }\n\n public ResponseRateUpdate(Double rateValue, Date rateDate) {\n this.rateValue = rateValue;\n this.rateDate = rateDate;\n }\n\n public ResponseRateUpdate(String error) {\n this.error = error;\n }\n\n private Double reverseRateValue;\n private Double rateValue;\n private Date rateDate;\n private String error;\n\n public Double getRateValue() {\n return rateValue;\n }\n\n public void setRateValue(Double rateValue) {\n this.rateValue = rateValue;\n }\n\n public Date getRateDate() {\n return rateDate;\n }\n\n public void setRateDate(Date rateDate) {\n this.rateDate = rateDate;\n }\n\n public Double getReverseRateValue() {\n return reverseRateValue;\n }\n\n public void setReverseRateValue(Double reverseRateValue) {\n this.reverseRateValue = reverseRateValue;\n }\n\n public String getError() {\n return error;\n }\n\n public void setError(String error) {\n this.error = error;\n }\n }\n}", "public Currency() {\n // Instances built via this constructor have undefined behavior.\n }", "public Pokemon.CurrencyOrBuilder getCurrencyOrBuilder() {\n return currency_;\n }", "TokenlyCurrency getCurrencyType();", "@SOAPMethod(\"ConversionRate\")\n String conversionRate(@SOAPProperty(\"FromCurrency\") String fromCurrency,\n @SOAPProperty(\"ToCurrency\") String toCurrency);", "CarPaymentMethod processHotDollars();", "boolean hasTradeCurrency();", "Pokemon.Currency getCurrency();", "private void convertAmount() {\r\n\t\tSystem.out.println(\"Select the currency to convert FROM.\");\r\n\t\tString currencyCodeFrom = signalThreeLetters();\r\n\t\tif (currencyCodeFrom == null){\r\n\t\t\treturn;\r\n }\r\n\t\tSystem.out.println(\"Select the currency to convert TO.\");\r\n\t\tString currencyCodeTo = signalThreeLetters();\r\n\t\tif (currencyCodeTo == null){\r\n\t\t\treturn;\r\n }\r\n //needed if-else to check if currencies is null. As currencies.getCurrencyByCode doesn't work if currencies is initially null\r\n\t\t//also if both currencies are not in the system it will say both currencies are not in the system instead of one of them\r\n if (currencies == null){\r\n \tSystem.out.println(\"\\\"\" + currencyCodeFrom +\"\\\" and \\\"\"+ currencyCodeTo+ \"\\\" is not on the system. Returning to menu.\");\r\n \treturn;}\r\n else {Currency currencyFrom = currencies.getCurrencyByCode(currencyCodeFrom);\r\n Currency currencyTo = currencies.getCurrencyByCode(currencyCodeTo);\r\n if (currencyFrom == null & currencyTo == null){\r\n \tSystem.out.println(\"\\\"\" + currencyCodeFrom +\"\\\" and \\\"\"+ currencyCodeTo+ \"\\\" is not on the system. Returning to menu.\");\r\n \treturn;}\r\n \r\n if (currencyFrom == null) {\r\n \tSystem.out.println(\"\\\"\" + currencyCodeFrom + \"\\\" is not on the system. Returning to menu.\");\r\n \treturn;}\r\n \r\n if (currencyTo == null) {\r\n \tSystem.out.println(\"\\\"\" + currencyCodeTo + \"\\\" is not on the system. Returning to menu.\");\r\n \treturn;\r\n }\r\n System.out.println();\r\n System.out.print(\"How many \" + currencyCodeFrom + \" would you like to convert to \" + currencyCodeTo + \"? Amount: \");\r\n String amountStr = keyboardInput.getLine();\r\n Amount amount = new Amount(currencyFrom, Double.parseDouble(amountStr));\r\n System.out.println();\r\n System.out.printf(\"%.2f %s = %.2f %s\", amount.getAmount(), amount.getCurrency().getCode(), \r\n amount.getAmountIn(currencyTo), currencyTo.getCode());\r\n System.out.println(); \r\n //Next line below(line167) is invokes my overloaded method\r\n System.out.println(amount.getAmountIn(currencyTo, currencyFrom));\r\n System.out.println(); \r\n \r\n\t}\r\n}", "public void getNetworkFilterParameters(){\n Retrofit retrofit = ApiClient.getClient();\n\n ApiInterface apiInterface = retrofit.create(ApiInterface.class);\n\n apiInterface.getAccounts().enqueue(new Callback<List<FilterUserModel>>() {\n @Override\n public void onResponse(Call<List<FilterUserModel>> call, Response<List<FilterUserModel>> response) {\n Observable.just(Objects.requireNonNull(response.body()))\n .subscribeOn(Schedulers.io())\n .concatMapIterable((Function<List<FilterUserModel>, Iterable<FilterUserModel>>) filterUserModels -> {\n /**Save to DB*/\n database = FlowManager.getDatabase(DecagonDatabase.class);\n\n FastStoreModelTransaction<FilterUserModel> transaction = FastStoreModelTransaction\n .saveBuilder(FlowManager.getModelAdapter(FilterUserModel.class))\n .addAll(filterUserModels)\n .build();\n\n database.executeTransaction(transaction);\n\n return filterUserModels;\n }).subscribeOn(Schedulers.io())\n .observeOn(Schedulers.newThread())\n .concatMap((Function<FilterUserModel, ObservableSource<List<FilterCountryModel>>>) filterUserModel -> {\n\n Log.e(TAG,\" LIST<COLORS> : \" + filterUserModel.getColors().size() + \" LIST<COUNTRIES>: \" + filterUserModel.getCountries().size());\n\n /**Should add a condition here, if the size is zero, no need to resolve jack*/\n resolveColor(filterUserModel.getColors(), filterUserModel.getId());\n\n return resolveCountries(filterUserModel.getCountries(), filterUserModel.getId());\n }).subscribe(new Observer<List<FilterCountryModel>>() {\n @Override\n public void onSubscribe(Disposable d) {\n compositeDisposable.add(d);\n }\n\n @Override\n public void onNext(List<FilterCountryModel> filterCountryModels) {\n\n Log.e(TAG, \"LIST OF FILTER COUNTRY MODEL: \" + filterCountryModels.size());\n\n /**Save to DB*/\n database = FlowManager.getDatabase(DecagonDatabase.class);\n\n FastStoreModelTransaction<FilterCountryModel> transaction = FastStoreModelTransaction\n .saveBuilder(FlowManager.getModelAdapter(FilterCountryModel.class))\n .addAll(filterCountryModels)\n .build();\n\n database.executeTransaction(transaction);\n }\n\n @Override\n public void onError(Throwable e) {\n e.printStackTrace();\n }\n\n @Override\n public void onComplete() {\n\n }\n });\n }\n\n @Override\n public void onFailure(Call<List<FilterUserModel>> call, Throwable t) {\n call.cancel();\n t.printStackTrace();\n }\n });\n\n }", "@Deprecated(since = CurrencyTests.DEPRECATED_SINCE_3_0, forRemoval = false)\n @Test\n public void getCurrency()\n {\n final Currency currency = Currency.of(CurrencyTests.EUR);\n assertEquals(CurrencyTests.EUR, currency.getCurrency(), CurrencyTests.CURRENCY_CODE_NOT_AS_EXPECTED);\n }", "@Ignore\n\t@Test\n\tpublic void test_getAllPairs() throws Exception {\n\t\tString allPairsUrl = \"https://btc-e.com/api/3/ticker/btc_usd-btc_rur-btc_eur-eur_rur-usd_rur-eur_usd\";\n\t\t// BTC, USD, EUR, RUR\n\t\tString [] pairsInMaster = {\"btc_usd\", \"btc_rur\", \"btc_eur\", \"eur_rur\", \"usd_rur\", \"eur_usd\"};\n\t\tList<String> pairs = Arrays.asList(pairsInMaster);\n\t\tSet<String> pairsSet = new HashSet<>(pairs);\n\t\t\n\t\tBtceQuotePuller puller = new BtceQuotePuller();\n\t\tpuller.setMasterUrl(allPairsUrl, pairsSet);\n\t\t\n\t\tList<IQuoteDataContainer> quotes = puller.getData();\n\t\t\n\t\tfor(IQuoteDataContainer quote : quotes) {\n\t\t\tAssert.assertNotNull(quote.getCurrencyPairCode());\n\t\t\tAssert.assertNotNull(quote.getLast());\n\t\t\tAssert.assertNotNull(quote.getStartCurrency());\n\t\t\tAssert.assertNotNull(quote.getEndCurrency());\n\t\t\tAssert.assertNotNull(quote.getTimestamp());\n\t\t}\n\t\t\n\t\t\n\t\tCurrencyGraph graph = GraphFactory.buildUndirectedCurrencyGraph(quotes);\n\t\t// Add to algorithm\n\t\tBFAlgorithm algo = new BFAlgorithm(graph);\n\t\talgo.bellmanFord(\"USD\", \"BTC\");\n\t\talgo.bellmanFord(\"USD\", \"EUR\");\n\t\talgo.bellmanFord(\"USD\", \"RUR\");\n\t\t \n\t}", "public interface ICustomCurrency\n{\n\n}", "@Override\n public void run() {\n for (Currency c : wallet.getCurrencyList().getCurrencyList()) {\n if (c.getCountry().toLowerCase().equals(givenCountry)) {\n updateExpenseAndLoans(wallet, c);\n System.out.println(CurrencyCommand.MESSAGE_SUCCESSFUL_CONVERSION + givenCountry);\n isExit = true;\n }\n }\n if (!isExit) {\n System.out.println(CurrencyCommand.MESSAGE_NO_CURRENCY + givenCountry);\n }\n stop();\n }", "java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();", "public static URL getUrlForGetCountries()\r\n {\r\n String strUrl = getBaseURL() + \"account_services/api/1.0/static_content/countries/client_type/3/language/\"+\r\n \t\tA.getContext().getString( R.string.backend_language_code )+\"?brand=\"+Config.BRAND_NAME_URL;\r\n return str2url( strUrl );\r\n }", "@Transactional(readOnly = true)\n public List<Currency> findAll() {\n log.debug(\"Request to get all Currencies\");\n return currencyRepository.findAll();\n }", "public ArrayList<CarDetail> gettingAllAvailableCars() throws Exception;", "public interface CoinService {\n void triggerUpdate(List<String> symbols, WidgetUpdator widgetUpdator);\n\n void triggerListLoading(Context context, BrowserUpdator currencyBrowserUpdator);\n}", "CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);", "@Override\n public String getDescription() {\n return \"Sell currency\";\n }", "@RequestMapping(value=\"/api/combocustomerinvoicepay\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic List<CustomerInvoiceDto> getDataCombox(){\n\t\treturn customerPayableService.getComboCPayInvoice();\n\t}", "public CurrencyConversion() {\n }", "String getExchangeRates(String currency) throws Exception\n\t{\n\t\tString[] rateSymbols = { \"CAD\", \"HKD\", \"ISK\", \"PHP\", \"DKK\", \"HUF\", \"CZK\", \"GBP\", \"RON\", \"HRK\", \"JPY\", \"THB\",\n\t\t\t\t\"CHF\", \"EUR\", \"TRY\", \"CNY\", \"NOK\", \"NZD\", \"ZAR\", \"USD\", \"MXN\", \"AUD\", };\n\n\t\tString rates = \"\";\n\n\t\tfinal String urlHalf1 = \"https://api.exchangeratesapi.io/latest?base=\";\n\n\t\tString url = urlHalf1 + currency.toUpperCase();\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement rateElement = jObject.get(\"rates\");\n\n\t\t\tif (rateElement.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject rateObject = rateElement.getAsJsonObject();\n\n\t\t\t\tfor (int i = 0; i < rateSymbols.length; i++)\n\t\t\t\t{\n\t\t\t\t\tJsonElement currentExchangeElement = rateObject.get(rateSymbols[i]);\n\n\t\t\t\t\trates += rateSymbols[i] + \"=\" + currentExchangeElement.getAsDouble()\n\t\t\t\t\t\t\t+ (i < rateSymbols.length - 1 ? \" \" : \".\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn rates;\n\t}", "Currencies(final int lowerLimit, final int upperLimit) {\n this.min = lowerLimit;\n this.max = upperLimit;\n }", "com.google.ads.googleads.v6.resources.CurrencyConstantOrBuilder getCurrencyConstantOrBuilder();", "boolean hasSettlementCurrency();", "public String getCurrencyPair() {\n return _ccyPair;\n }", "private int[] funcGetRateDigits(int iCurrency, int iCurrency2) throws OException\r\n\t{\r\n\r\n//\t\tINCGeneralItau.print_msg(\"INFO\", \"**** funcGetRateDigits ****\");\r\n\t\t\r\n\t\t@SuppressWarnings(\"unused\")\r\n int iRetVal, iRateDigits = 0, iCcy1Digits = 0, iCcy2Digits = 0;\r\n\t\tTable tblInsNum = Util.NULL_TABLE;\r\n\r\n\t\t/* Array */\r\n\t\tint[] iRounding = new int[3];\r\n\r\n\t\ttblInsNum = Table.tableNew();\r\n\t\tString sQuery = \"Select ab.ins_num, ab.cflow_type, ab.reference, par.currency, par1.currency as currency2, par.nearby as rate_digits, \" +\r\n\t\t\t\t\t\"c.round as currency1_digits, c2.round as currency2_digits \" +\r\n\t\t\t\t\t\"From ab_tran ab \" +\r\n\t\t\t\t\t\"Left Join parameter par on ab.ins_num = par.ins_num \" +\r\n\t\t\t\t\t\"Left Join parameter par1 on ab.ins_num = par1.ins_num \" +\r\n\t\t\t\t\t\"Left Join header hea on ab.ins_num = hea.ins_num, \" +\r\n\t\t\t\t\t\"currency c, currency c2 \" +\r\n\t\t\t\t\t\"Where ab.tran_type = \" + TRAN_TYPE_ENUM.TRAN_TYPE_HOLDING.jvsValue() +\r\n\t\t\t\t\t\" And ab.tran_status = \" + TRAN_STATUS_ENUM.TRAN_STATUS_VALIDATED.jvsValue() +\r\n\t\t\t\t\t\" And ab.toolset = \" + TOOLSET_ENUM.FX_TOOLSET.jvsValue() +\r\n\t\t\t\t\t\" And par.param_seq_num = 0 And par1.param_seq_num = 1\" +\r\n\t\t\t\t\t\" And c.id_number = \" + iCurrency +\r\n\t\t\t\t\t\" And c2.id_number = \" + iCurrency2 +\r\n\t\t\t\t\t\" And ((par.currency = \" + iCurrency +\r\n\t\t\t\t\t\" And par1.currency = \" + iCurrency2 + \")\" +\r\n\t\t\t\t\t\" Or (par.currency = \" + iCurrency2 +\r\n \" And par1.currency = \" + iCurrency + \"))\" +\r\n\t\t\t\t\t\" And hea.portfolio_group_id > 0\";\r\n\r\n\t\tiRetVal = DBaseTable.execISql(tblInsNum, sQuery);\r\n\r\n//\t\tINCGeneralItau.print_msg(\"DEBUG\", \"(funcGetInsNum)\\n\" + sQuery);\r\n\r\n\t\tif (tblInsNum.getNumRows() > 0)\r\n\t\t{\r\n\t\t\tiRateDigits = tblInsNum.getInt(\"rate_digits\", 1);\r\n\t\t\tiCcy1Digits = tblInsNum.getInt(\"currency1_digits\", 1);\r\n\t\t\tiCcy2Digits = tblInsNum.getInt(\"currency2_digits\", 1);\r\n\r\n\t\t\tiRounding[0] = iRateDigits;\r\n\t\t\tiRounding[1] = iCcy1Digits;\r\n\t\t\tiRounding[2] = iCcy2Digits;\r\n\t\t}\r\n\t\ttblInsNum.destroy();\r\n\r\n\t\treturn iRounding;\r\n\t}" ]
[ "0.63488084", "0.6064911", "0.5839817", "0.58074844", "0.57875156", "0.578743", "0.56128997", "0.5554097", "0.5520691", "0.55164284", "0.53422934", "0.5296954", "0.5173943", "0.51348877", "0.508525", "0.50076616", "0.49873373", "0.49574494", "0.4953622", "0.49202484", "0.49041793", "0.4892651", "0.48896435", "0.4884769", "0.48780468", "0.48730326", "0.48635015", "0.48584193", "0.48445135", "0.48309246", "0.48246443", "0.4823185", "0.4821059", "0.48134628", "0.47959486", "0.4793293", "0.4788878", "0.47880265", "0.4781625", "0.47766593", "0.47759476", "0.47632632", "0.47618183", "0.47476488", "0.47432792", "0.47198024", "0.47157332", "0.46965402", "0.46884763", "0.46839705", "0.46807423", "0.46738952", "0.46722704", "0.46696013", "0.46648985", "0.4659207", "0.465521", "0.4649862", "0.46454042", "0.46429002", "0.46118832", "0.4596179", "0.45950297", "0.45905948", "0.45856184", "0.4572362", "0.4570906", "0.45703566", "0.45442733", "0.45408732", "0.45368627", "0.45345682", "0.45297003", "0.45296374", "0.45215043", "0.4516895", "0.45162448", "0.45042518", "0.45035923", "0.4503319", "0.45011032", "0.44896802", "0.4483856", "0.44826564", "0.44711688", "0.44616044", "0.44612855", "0.44547224", "0.44519228", "0.44406474", "0.44405675", "0.44349247", "0.4424595", "0.44227058", "0.44210017", "0.4419216", "0.44177222", "0.44056392", "0.44013336", "0.43971103" ]
0.54126567
10
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)"); } return getAvailableCurrenciesCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "private Contract() {\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.65667087", "0.6498893", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.5991647", "0.58935875", "0.5867352", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.54083145", "0.53983784", "0.538685", "0.5372101", "0.535575", "0.53002197", "0.5298278", "0.5284535", "0.5277213", "0.5228654", "0.5213922", "0.5213851", "0.5203466", "0.5203466", "0.5198705", "0.51919657", "0.5132997", "0.503143", "0.5030267", "0.502797", "0.5015527", "0.5008133", "0.49868008", "0.49842298", "0.49836314", "0.49824694", "0.49804395", "0.4969242", "0.4950973", "0.49493062", "0.49471316", "0.4928483", "0.49245524", "0.49162278", "0.4885365", "0.48522398", "0.4833596", "0.48331168", "0.48331168", "0.48331168", "0.48331168", "0.4830747", "0.4827253", "0.48129195", "0.48126492", "0.4799318", "0.4791708", "0.47801298", "0.4777395", "0.47646844", "0.47614396", "0.47599468", "0.47580373", "0.47508353", "0.47382933", "0.4732828", "0.47288087", "0.47212544", "0.4717133", "0.47137868", "0.47108936", "0.46979916", "0.46949527", "0.46938235", "0.469239", "0.46847698", "0.46842527", "0.46841192", "0.46748438", "0.46745366", "0.46736524", "0.46714628", "0.46679446", "0.4660473", "0.46603698", "0.46579075", "0.4655875", "0.4655484", "0.46554628", "0.46510994", "0.46478415" ]
0.57154477
10
Build call for getAvailablePaymentMethods
public Call getAvailablePaymentMethodsCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/getAvailablePaymentMethods" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<PaymentMethode> getSupportedPaymentMethods(AbstractOrder order);", "@org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public List<CoinbasePaymentMethod> getCoinbasePaymentMethods() throws IOException {\n\n String path = \"/v2/payment-methods\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String signature = getSignature(timestamp, path);\n showCurl(apiKey, timestamp, signature, path);\n\n return coinbase.getPaymentMethods(Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp).getData();\n }", "List<ShippingMethode> getSupportedShippingMethods(Country currentCountry);", "PaymentMethod getPaymentMethod();", "public List<BrainTreePaymentInfo> getPaymentMethods(final SessionContext ctx)\n\t{\n\t\tList<BrainTreePaymentInfo> coll = (List<BrainTreePaymentInfo>)getProperty( ctx, PAYMENTMETHODS);\n\t\treturn coll != null ? coll : Collections.EMPTY_LIST;\n\t}", "List<ShippingMethode> getSupportedShippingMethods(AbstractOrder order);", "@org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();", "public interface PaymentMethods {\n @GET(\"paymentmethods\")\n Call<PaymentMethod[]> get(@Query(\"api_token\") String api_token);\n}", "public static String getPaymentMethods(String account){\n return \"select pm_method from payment_methods where pm_account = '\"+account+\"'\";\n }", "@Bean\n public PaymentOptions paymentOptions() {\n return new PaymentOptions(\n Arrays.asList(examplePaymentMethodHandler())\n );\n }", "public interface CarPaymentMethod {\n\n /**\n * Choose PayPal payment option\n */\n CarPaymentMethod processPayPal();\n\n /**\n * Choose HotDollars payment option\n */\n CarPaymentMethod processHotDollars();\n\n /**\n * Choose CreditCard payment option\n */\n CarPaymentMethod processCreditCard();\n\n /**\n * Choosing saved payment methods\n */\n\n CarPaymentMethod processSavedVisa(String securityCode);\n\n CarPaymentMethod processSavedMasterCard(String securityCode);\n\n /**\n * Getting payment buttons\n */\n\n WebElement getPayPalRadioButton();\n\n WebElement getHotDollarsButton();\n\n WebElement getCreditCardField();\n\n WebElement getSavedCreditCardButton();\n\n WebElement getSavedVisaButton();\n\n WebElement getSavedMasterCardButton();\n\n String getNameOfChosenPaymentMethod();\n\n boolean isHotDollarsModuleAvailable();\n\n String getHotDollarsMessage();\n\n WebElement getPaymentOptionCreditCard();\n\n /**\n * Input card holder's initials for credit card\n */\n CarPaymentMethod cardHolder(String firstName, String lastName);\n\n /**\n * Input credit card attributes\n */\n CarPaymentMethod creditCardNumber(String cardNumber);\n\n CarPaymentMethod expDate(String cardExpMonth, String cardExpYear);\n\n CarPaymentMethod creditCardSecurityCode(String cardSecCode);\n\n CarPaymentMethod savedVisaSecurityCode(String cardSecCode);\n\n /**\n * Fill in card holder's address information\n */\n CarPaymentMethod city(String city);\n\n CarPaymentMethod country(String country);\n\n CarPaymentMethod state(String state);\n\n CarPaymentMethod billingAddress(String address);\n\n CarPaymentMethod zipCode(String zipCode);\n\n CarPaymentMethod continuePanel();\n\n /**\n * Filling PayPal payment fields\n */\n CarPaymentMethod payPalUser(String firstName, String lastName);\n\n CarPaymentMethod payPalAddress(String address);\n\n CarPaymentMethod payPalCity(String city);\n\n CarPaymentMethod payPalState(String state);\n\n CarPaymentMethod payPalZipCode(String zip);\n\n /**\n * Verify that billing section is present on the page\n */\n boolean isBillingSectionPresent();\n\n /**\n * Verify that billing section has only one Credit Card payment method\n */\n boolean isCreditCardIsSingleAvailablePayment();\n\n void saveMyInformation();\n\n void savePaymentInformation();\n\n WebElement getPasswordField();\n\n WebElement getConfirmPasswordField();\n\n boolean isSaveMyInfoExpanded();\n\n void chooseCreditCardPaymentMethod();\n\n boolean isSavedPaymentPresent();\n\n void typeCreditCardNameField(String ccNumber);\n\n\n}", "public List<PaymentEntity> getPaymentMethods() {\n return entityManager.createNamedQuery(\"getAllPaymentMethods\", PaymentEntity.class).getResultList();\n\n }", "@WebMethod public LinkedList<CreditCard> getAllPaymentMethods(Account user);", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public ListPaymentMethodRsType listPaymentMethod(ListPaymentMethodRqType listPaymentMethodRq) throws ReferenceDataFault;", "@org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();", "public void setPaymentMethods(final SessionContext ctx, final List<BrainTreePaymentInfo> value)\n\t{\n\t\tsetProperty(ctx, PAYMENTMETHODS,value == null || !value.isEmpty() ? value : null );\n\t}", "CarPaymentMethod processPayPal();", "@Nonnull\n List<CustomerPaymentMethod> findCustomerPaymentMethods(@Nonnull final CustomerPaymentMethodLookupParameters parameters, @Nonnull final SortOrderSpecification<CustomerPaymentMethodSortColumn> sortOrderSpecification, final long startFrom, final int maxCount);", "public abstract void populatePeripheralMethods(@Nonnull final List<ComputerMethod> methods);", "@DataProvider(name = \"requestMethods\")\n\tpublic Object[][] createRequestMethods() {\n\t\tRequestMethod[] rms = RequestMethod.values();\n\t\tObject[][] ret = new Object[rms.length][];\n\t\tfor (int i = 0; i < rms.length; ++i)\n\t\t\tret[i] = new Object[] { rms[i].toString() };\n\t\treturn ret;\n\t}", "public List<BrainTreePaymentInfo> getPaymentMethods()\n\t{\n\t\treturn getPaymentMethods( getSession().getSessionContext() );\n\t}", "public interface PaymentTestMethods {\n\n void pay();\n\n void accessXmlInvoice();\n void accessPdfInvoice();\n void accessNotOwnInvoice();\n void sendEmailWithInvoices();\n void sendEmailWithNotOwnInvoices();\n void getInvoiceInfo();\n void getNotOwnInvoiceInfo();\n\n void viewUserDeposit();\n void getDepositLimits();\n void topUpDeposit();\n void getTopUpHistory();\n void findUserHistoricalDeposits();\n\n void getNotSettledReservations();\n void getNotSettledReservationsTotals();\n void findHistoricalReservations();\n void getSettledTransactionHistory();\n void getTransactionToReauthorise();\n void findHistoricalTransactions();\n void findUserInvoices();\n\n void getProductPrice();\n void getDomainPricing();\n void getVatRate();\n\n void getPrice();\n void findAllPrices();\n void addPrice();\n void modifyPrice();\n void addVatRate();\n void invalidateVat();\n void getValidVat();\n\n //reports\n void findDeposits();\n void findDepositWithHistory();\n void getReadyADPTransactionsReport();\n void findInvoices();\n\n //manage deposits\n void viewDeposit();\n void correctDeposit();\n void depositFundsOffline();\n \n void getTransactionInfoById();\n void getTransactionInfoByOrderId();\n\n}", "public void setPaymentMethods(final List<BrainTreePaymentInfo> value)\n\t{\n\t\tsetPaymentMethods( getSession().getSessionContext(), value );\n\t}", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public Future<List<String>> getMethodList() throws DynamicCallException, ExecutionException {\n return call(\"getMethodList\");\n }", "List<Method> getAllMethods();", "@SuppressWarnings(\"rawtypes\")\n\tpublic void buildMethodDetails(List elements) throws Exception {\n\t\tMethodBuilder.getInstance(\n\t\t\t\tconfiguration,\n\t\t\t\twriter.getClassDoc(),\n\t\t\t\tnew CustomMethodWriterImpl((SubWriterHolderWriter) writer, writer.getClassDoc(),\n\t\t\t\t\t\ttargetContractMap)).build(elements);\n\t}", "CarrierShipmentMethod createCarrierShipmentMethod();", "public List<ServiceMethod> getMethodList()\n {\n return Collections.unmodifiableList(methods);\n }", "ISourceMethod[] getMethods();", "public abstract Builder methods(RequestMethod... paramVarArgs);", "public List<VOPaymentType> getAvailablePaymentTypesForCreation() {\n return paymentInfoBean.getAvailablePaymentTypesForCreation(\n model.getService().getKey(), getAccountingService());\n }", "public List<AvailableShippingMethod> getAvailableShippingMethods() {\n return (List<AvailableShippingMethod>) get(\"available_shipping_methods\");\n }", "public List<PaymentMethodDto> paymentMethodGetAllPaymentMethod(String greaterThanValue, Integer numberToRead, Integer skipRecords, String orderBy, String lastModifiedDateTime, String lastModifiedDateTimeCondition) throws RestClientException {\n Object postBody = null;\n \n String path = UriComponentsBuilder.fromPath(\"/controller/api/v1/paymentmethod\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n \n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"greaterThanValue\", greaterThanValue));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"numberToRead\", numberToRead));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"skipRecords\", skipRecords));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"orderBy\", orderBy));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"lastModifiedDateTime\", lastModifiedDateTime));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"lastModifiedDateTimeCondition\", lastModifiedDateTimeCondition));\n\n final String[] accepts = { \n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"ipp-application-type\", \"ipp-company-id\", \"vna_oauth\" };\n\n ParameterizedTypeReference<List<PaymentMethodDto>> returnType = new ParameterizedTypeReference<List<PaymentMethodDto>>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "public interface CheckoutService {\n\n\t/**\n\t * Returns all available shipping methods for the given country, regardless of the destination country.\n\t * \n\t * @param currentCountry for which the shipping methods are available in\n\t * @return the found shipping methods or an empty list\n\t */\n\tList<ShippingMethode> getSupportedShippingMethods(Country currentCountry);\n\n\t/**\n\t * Returns all available shipping methods for the given order - based on the current and the destination country.\n\t * \n\t * @param order for which the shipping methods are available\n\t * @return the found shipping methods or an empty list\n\t */\n\tList<ShippingMethode> getSupportedShippingMethods(AbstractOrder order);\n\n\t/**\n\t * Returns all available payment methods for the given order.\n\t * \n\t * @param order for which the payment methods are available\n\t * @return the found payment methods or an empty list\n\t */\n\tList<PaymentMethode> getSupportedPaymentMethods(AbstractOrder order);\n}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.809 -0500\", hash_original_method = \"AC0A5CAC5D79A50D0A1A1A7D60109A25\", hash_generated_method = \"DDCD510819A32FF7BD9558A5CE176D29\")\n \nprivate ContactMethods() {}", "public List<String> getMethodList() throws CallError, InterruptedException {\n return (List<String>)service.call(\"getMethodList\").get();\n }", "PagedResult<Loan> listLoanByComplexCondition(String clientCode,List<RepaymentMethod> methodList,int minRate,int maxRate,int minDuration,int maxDuration,PageInfo pageInfo, List<LoanStatus> statusList);", "abstract public DialPlan[] getDialPlans();", "@ApiModelProperty(value = \"List of payment options that are supported\")\n public List<PaymentOptionsEnum> getPaymentOptions() {\n return paymentOptions;\n }", "public PaymentTypeObject[] getAllPaymentTypes() throws AppException;", "public ArrayList<PaymentTypeObject> getPaymentTypes(PaymentTypeObject paymenttype_obj) throws AppException;", "PaymentTermsType getPaymentTerms();", "private void addMethods(StringBuilder xml) {\n\t\t\n\t\tfor(MethodRequest method : methods) {\n\t\t\tstartElementWithAttributes(xml, \"Method\");\n\t\t\taddStringAttribute(xml, \"name\", method.getName());\n\t\t\taddStringAttribute(xml, \"contextObject\", method.getContextObject());\n\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t}\n\t\t\n\t}", "public List<String> getMethodList() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getMethodList\").get();\n }", "public void calculatePayment() {}", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsForTransactionValidateBeforeCall(String generalContractId, String smartTransactionId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethodsForTransaction(Async)\");\n }\n // verify the required parameter 'smartTransactionId' is set\n if (smartTransactionId == null) {\n throw new ApiException(\"Missing the required parameter 'smartTransactionId' when calling getAvailablePaymentMethodsForTransaction(Async)\");\n }\n\n return getAvailablePaymentMethodsForTransactionCall(generalContractId, smartTransactionId, body);\n }", "@Override\n public String getPaymentMethodCode() {\n return this.getAdvanceTravelPayment().getPaymentMethodCode();\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "public void setPayMethod(String value) {\n this.payMethod = value;\n }", "public PaymentMethod()\n {\n }", "@XRMethod(value = \"system.listMethods\", help = \"List all method names available\")\r\n\tList<String> listMethods();", "public String getPayMethod() {\n return payMethod;\n }", "String getPaymentInformation();", "public PaymentType builder()\n {\n return new PaymentType(this);\n }", "void onPaymentRequestParamsInitiated(PaymentRequestParams params);", "public abstract java.util.Set getPaymentTypes();", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsContractsCall(underlying, expiration, _callback);\n }", "@Override\n\tpublic void buildMethods(JDefinedClass cls) {\n\n\t}", "public List<Method> getMethod_list() {\n\t\treturn arrayMethods;\n\t}", "private void checkPaymentMethod() {\n toolbar.setTitle(R.string.payment_method);\n PaymentMethodFragment paymentMethodFragment = new PaymentMethodFragment();\n displaySelectedFragment(paymentMethodFragment);\n }", "@Test\r\n\tpublic void testGetDeliveryMethods() {\r\n\t\tAssert.assertTrue(oic.getDeliveryMethods().equals(Arrays.asList(DeliveryMethod.values())));\r\n\t}", "public PaymentMethod getPaymentMethod(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.paymentmethod.v1.PaymentMethod res ){\n\t\tPaymentMethod paymentMethod = new PaymentMethod();\n\t\t\n\t\tif( res.getMethod() != null ){\n\t\t\tpaymentMethod.setMethod( res.getMethod().charAt(0) );\n\t\t}\n\t\tpaymentMethod.setDescription( res.getDescription() );\n\t\t\n\t\treturn paymentMethod;\n\t}", "CarPaymentMethod processCreditCard();", "public boolean isPartialPaymentSupported();", "@Override\n public ServiceResponse listMethods(final ServiceRequest request) throws SOAPException {\n return this.soapClient.listMethods(request, this.getTargetUrl());\n }", "CarPaymentMethod processHotDollars();", "public String getLBR_PartialPayment();", "public TreeMap<String,CheckOutMethod>\n getMethods()\n {\n TreeMap<String,CheckOutMethod> methods = new TreeMap<String,CheckOutMethod>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pMethodFields.get(name);\n methods.put(name, CheckOutMethod.values()[field.getSelectedIndex()]);\n }\n return methods;\n }", "public List<IMethod> getMethods();", "public List<IMethod> getMethods();", "public PaymentSetMethodInfoMethodAction buildUnchecked() {\n return new PaymentSetMethodInfoMethodActionImpl(method);\n }", "public abstract String[] getMethodNames();", "public interface MoMoParameterNamePayment {\n String MERCHANT_CODE = \"merchantcode\";\n String MERCHANT_NAME = \"merchantname\";\n String MERCHANT_NAME_LABEL = \"merchantnamelabel\";\n String AMOUNT = \"amount\";\n String FEE = \"fee\";\n String DESCRIPTION = \"description\";\n String EXTRA = \"extra\";\n\n String REQUEST_ID = \"requestId\";\n String PARTNER_CODE = \"partnerCode\";\n String EXTRA_DATA = \"extraData\";\n String REQUEST_TYPE = \"requestType\";\n String LANGUAGE = \"language\";\n}", "public String getPaymentMethod() {\n\t\treturn paymentMethod;\n\t}", "public final java.security.AlgorithmParameters generateParameters() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: java.security.AlgorithmParameterGenerator.generateParameters():java.security.AlgorithmParameters, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.AlgorithmParameterGenerator.generateParameters():java.security.AlgorithmParameters\");\n }", "public io.opencannabis.schema.commerce.CommercialOrder.OrderPayment.Builder getPaymentBuilder() {\n \n onChanged();\n return getPaymentFieldBuilder().getBuilder();\n }", "@Test\n public void testRequestMethods() {\n PaymentMethodViewModel viewModel = new PaymentMethodViewModel(\n getAvailablePaymentMethods\n );\n\n // And I have internet connection\n viewModel.setIsNetworkAvailable(true);\n\n // When I request payment methods\n viewModel.getAvailablePaymentMethods();\n\n // Then I should request the payment method list\n Mockito.verify(getAvailablePaymentMethods, Mockito.times(1)).execute(\n Mockito.any()\n );\n\n // And I should get a loading indication\n assertThat(viewModel.getLoadingLiveData().getValue()).isTrue();\n\n // And failures should be null\n assertThat(viewModel.getFailureLiveData().getValue()).isNull();\n }", "abstract protected Set<Method> createMethods();", "private void populateMethod(UIBean uiBean) {\r\n String methodName;\r\n if (method != null) {\r\n methodName = eval.evaluateExpression(method);\r\n } else {\r\n methodName = DEFAULT_METHOD;\r\n }\r\n uiBean.addParameter(\"method\", methodName);\r\n }", "abstract String applicable(Method[] getters) throws InvalidObjectException;", "@Override\n @SuppressFBWarnings(\"BC_UNCONFIRMED_CAST\")\n protected void validateSecurityMethods() throws SuiteBroken {\n // GATTT, PATTT, GHTTT, PHTTT\n this.currentState.combinations.add(\n new Combination(\"GET\", this.currentState.url, getMatchedApiEntry(),\n CombEntry.CLIAUTH_NONE,\n CombEntry.SRVAUTH_TLSCERT, CombEntry.REQENCR_TLS, CombEntry.RESENCR_TLS\n ));\n this.currentState.combinations.add(\n new Combination(\"POST\", this.currentState.url, getMatchedApiEntry(),\n CombEntry.CLIAUTH_NONE,\n CombEntry.SRVAUTH_TLSCERT, CombEntry.REQENCR_TLS, CombEntry.RESENCR_TLS\n ));\n this.currentState.combinations.add(\n new Combination(\"GET\", this.currentState.url, getMatchedApiEntry(),\n CombEntry.CLIAUTH_HTTPSIG, CombEntry.SRVAUTH_TLSCERT, CombEntry.REQENCR_TLS,\n CombEntry.RESENCR_TLS\n ));\n this.currentState.combinations.add(\n new Combination(\"POST\", this.currentState.url, getMatchedApiEntry(),\n CombEntry.CLIAUTH_HTTPSIG, CombEntry.SRVAUTH_TLSCERT, CombEntry.REQENCR_TLS,\n CombEntry.RESENCR_TLS\n ));\n }", "java.lang.String getPaymentUrl();", "boolean buy(String... vendorCodes);", "@GET(\"stripe_supported_country_list\")\n Call<ResponseBody> stripeSupportedCountry(@Query(\"token\") String token);", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "SmsCbCmasInfo(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void\");\n }", "public byte[] getSigAlgParams() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getSigAlgParams():byte[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getSigAlgParams():byte[]\");\n }", "private void fillPaymentCb() {\n ObservableList paymentStateOp = FXCollections.observableArrayList(\"Pagado\", \"Pendiente\");\n getClientPaymentCb().setItems(paymentStateOp);\n getDriverPaymentCb().setItems(paymentStateOp);\n }", "public List<MethodInfo> getMethods() { \n return lstMethodInfo;\n }", "private void setMethods(Class<?> token) {\n List<Method> newMethods = new ArrayList<>();\n for (Method method : token.getDeclaredMethods()) {\n if (methods.add(new MethodWithHash(method)) && !method.isDefault()) {\n newMethods.add(method);\n }\n }\n for (Method method : newMethods) {\n Type returnType = method.getReturnType();\n StringBuilder body = new StringBuilder(\"return\");\n if (((Class) returnType).isPrimitive()) {\n if (returnType.equals(boolean.class)) {\n body.append(\" false\");\n } else if (!returnType.equals(void.class)) {\n body.append(\" 0\");\n }\n } else {\n body.append(\" null\");\n }\n body.append(\";\");\n setExecutable(method, ((Class) returnType).getCanonicalName(), body, false);\n }\n }", "@Override\n public ServiceResponse allowedMethods(final ServiceRequest request) throws SOAPException {\n return this.soapClient.allowedMethods(request, this.getTargetUrl());\n }", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.ListPaymentsResponse> listPayments(\n lnrpc.Rpc.ListPaymentsRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getListPaymentsMethod(), getCallOptions()), request);\n }", "public Builder setMethod(io.opencannabis.schema.commerce.Payments.PaymentMethod value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n method_ = value.getNumber();\n onChanged();\n return this;\n }", "public Payment[] getPaymentInfo(){\n \t\n \treturn paymentArr;\n }", "public void buildBridges() {\n\t\tList<MagneticComponent> firstTier = getValidLinks(0);\r\n\t\t\r\n\t\tbuildNextBridge(firstTier, 0);\r\n\t}", "public void setPaymentMethodCodeAsPaymentMethod(AppCDef.PaymentMethod cdef) {\n setPaymentMethodCode(cdef != null ? cdef.code() : null);\n }" ]
[ "0.66609144", "0.62735116", "0.6066762", "0.57958275", "0.5793649", "0.5772508", "0.5701242", "0.568999", "0.56321794", "0.5605958", "0.55648535", "0.55580986", "0.5406778", "0.54063183", "0.53977275", "0.53534037", "0.525873", "0.51883477", "0.51697993", "0.51530164", "0.51010764", "0.50970054", "0.5090042", "0.5055102", "0.5027795", "0.5023451", "0.5010168", "0.5003434", "0.49919996", "0.49767026", "0.49439353", "0.48869738", "0.4886936", "0.488664", "0.48615345", "0.48600063", "0.4840458", "0.4830791", "0.48253128", "0.48226145", "0.48163295", "0.48080218", "0.48066235", "0.4804098", "0.47865206", "0.47805446", "0.47761315", "0.47760376", "0.47626752", "0.47607964", "0.4756973", "0.4755307", "0.47468567", "0.47455987", "0.472941", "0.46930087", "0.46873128", "0.46756864", "0.46459407", "0.46361816", "0.46207425", "0.45941728", "0.4592485", "0.458597", "0.45726082", "0.45710778", "0.4561309", "0.45461464", "0.45444614", "0.4528987", "0.45278546", "0.45266148", "0.45225897", "0.45225897", "0.4522185", "0.45079783", "0.45059258", "0.45055002", "0.45023796", "0.44952682", "0.44788015", "0.4454442", "0.4452028", "0.44517106", "0.44458848", "0.44413266", "0.443995", "0.44381276", "0.44275635", "0.4426018", "0.4416621", "0.44103175", "0.44064128", "0.4403823", "0.43963534", "0.43906447", "0.43743822", "0.4370666", "0.43692544", "0.43655658" ]
0.47193158
55
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)"); } return getAvailablePaymentMethodsCall(generalContractId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "private Contract() {\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.6566565", "0.6497611", "0.64637333", "0.622235", "0.6210186", "0.6131018", "0.60290796", "0.59923744", "0.58934605", "0.58661616", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142", "0.53970677", "0.53854465", "0.53708893", "0.535706", "0.53022665", "0.5297568", "0.5285573", "0.52775395", "0.5228783", "0.52161616", "0.5215486", "0.5205767", "0.5205767", "0.5199093", "0.51915133", "0.51328886", "0.5033789", "0.5029831", "0.5016704", "0.50105745", "0.498703", "0.49869227", "0.49858847", "0.49840963", "0.4981568", "0.49711713", "0.49521965", "0.49504304", "0.4947746", "0.49310437", "0.49262455", "0.49186945", "0.48840562", "0.48525771", "0.4834332", "0.4834332", "0.4834332", "0.4834332", "0.48338956", "0.48318732", "0.48279566", "0.48160288", "0.4812081", "0.47995192", "0.47923365", "0.4781422", "0.47777963", "0.47646332", "0.47629628", "0.47589943", "0.4757054", "0.4750851", "0.47358122", "0.47310758", "0.4729941", "0.4721001", "0.47173005", "0.47168317", "0.47128192", "0.4699858", "0.4696607", "0.4694214", "0.4693992", "0.4684683", "0.4683533", "0.4683291", "0.46758085", "0.46754542", "0.4674884", "0.46742436", "0.46673056", "0.46622548", "0.466158", "0.46588138", "0.4658", "0.46564242", "0.46557775", "0.46517795", "0.46499386" ]
0.5028553
39
Build call for getAvailablePaymentMethodsForTransaction
public Call getAvailablePaymentMethodsForTransactionCall(String generalContractId, String smartTransactionId, GetAvailablePaymentMethodsDTO body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/getAvailablePaymentMethods/{smartTransactionId}" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())) .replaceAll("\\{" + "smartTransactionId" + "\\}", apiClient.escapeString(smartTransactionId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<PaymentMethode> getSupportedPaymentMethods(AbstractOrder order);", "@org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();", "public List<BrainTreePaymentInfo> getPaymentMethods(final SessionContext ctx)\n\t{\n\t\tList<BrainTreePaymentInfo> coll = (List<BrainTreePaymentInfo>)getProperty( ctx, PAYMENTMETHODS);\n\t\treturn coll != null ? coll : Collections.EMPTY_LIST;\n\t}", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public List<CoinbasePaymentMethod> getCoinbasePaymentMethods() throws IOException {\n\n String path = \"/v2/payment-methods\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String signature = getSignature(timestamp, path);\n showCurl(apiKey, timestamp, signature, path);\n\n return coinbase.getPaymentMethods(Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp).getData();\n }", "public static String getPaymentMethods(String account){\n return \"select pm_method from payment_methods where pm_account = '\"+account+\"'\";\n }", "PaymentMethod getPaymentMethod();", "public List<PaymentEntity> getPaymentMethods() {\n return entityManager.createNamedQuery(\"getAllPaymentMethods\", PaymentEntity.class).getResultList();\n\n }", "@org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();", "public List<BrainTreePaymentInfo> getPaymentMethods()\n\t{\n\t\treturn getPaymentMethods( getSession().getSessionContext() );\n\t}", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsForTransactionValidateBeforeCall(String generalContractId, String smartTransactionId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethodsForTransaction(Async)\");\n }\n // verify the required parameter 'smartTransactionId' is set\n if (smartTransactionId == null) {\n throw new ApiException(\"Missing the required parameter 'smartTransactionId' when calling getAvailablePaymentMethodsForTransaction(Async)\");\n }\n\n return getAvailablePaymentMethodsForTransactionCall(generalContractId, smartTransactionId, body);\n }", "List<ShippingMethode> getSupportedShippingMethods(AbstractOrder order);", "@Bean\n public PaymentOptions paymentOptions() {\n return new PaymentOptions(\n Arrays.asList(examplePaymentMethodHandler())\n );\n }", "@WebMethod public LinkedList<CreditCard> getAllPaymentMethods(Account user);", "public void setPaymentMethods(final SessionContext ctx, final List<BrainTreePaymentInfo> value)\n\t{\n\t\tsetProperty(ctx, PAYMENTMETHODS,value == null || !value.isEmpty() ? value : null );\n\t}", "List<ShippingMethode> getSupportedShippingMethods(Country currentCountry);", "public void setPaymentMethods(final List<BrainTreePaymentInfo> value)\n\t{\n\t\tsetPaymentMethods( getSession().getSessionContext(), value );\n\t}", "public interface PaymentMethods {\n @GET(\"paymentmethods\")\n Call<PaymentMethod[]> get(@Query(\"api_token\") String api_token);\n}", "public ListPaymentMethodRsType listPaymentMethod(ListPaymentMethodRqType listPaymentMethodRq) throws ReferenceDataFault;", "public interface PaymentTestMethods {\n\n void pay();\n\n void accessXmlInvoice();\n void accessPdfInvoice();\n void accessNotOwnInvoice();\n void sendEmailWithInvoices();\n void sendEmailWithNotOwnInvoices();\n void getInvoiceInfo();\n void getNotOwnInvoiceInfo();\n\n void viewUserDeposit();\n void getDepositLimits();\n void topUpDeposit();\n void getTopUpHistory();\n void findUserHistoricalDeposits();\n\n void getNotSettledReservations();\n void getNotSettledReservationsTotals();\n void findHistoricalReservations();\n void getSettledTransactionHistory();\n void getTransactionToReauthorise();\n void findHistoricalTransactions();\n void findUserInvoices();\n\n void getProductPrice();\n void getDomainPricing();\n void getVatRate();\n\n void getPrice();\n void findAllPrices();\n void addPrice();\n void modifyPrice();\n void addVatRate();\n void invalidateVat();\n void getValidVat();\n\n //reports\n void findDeposits();\n void findDepositWithHistory();\n void getReadyADPTransactionsReport();\n void findInvoices();\n\n //manage deposits\n void viewDeposit();\n void correctDeposit();\n void depositFundsOffline();\n \n void getTransactionInfoById();\n void getTransactionInfoByOrderId();\n\n}", "public interface CarPaymentMethod {\n\n /**\n * Choose PayPal payment option\n */\n CarPaymentMethod processPayPal();\n\n /**\n * Choose HotDollars payment option\n */\n CarPaymentMethod processHotDollars();\n\n /**\n * Choose CreditCard payment option\n */\n CarPaymentMethod processCreditCard();\n\n /**\n * Choosing saved payment methods\n */\n\n CarPaymentMethod processSavedVisa(String securityCode);\n\n CarPaymentMethod processSavedMasterCard(String securityCode);\n\n /**\n * Getting payment buttons\n */\n\n WebElement getPayPalRadioButton();\n\n WebElement getHotDollarsButton();\n\n WebElement getCreditCardField();\n\n WebElement getSavedCreditCardButton();\n\n WebElement getSavedVisaButton();\n\n WebElement getSavedMasterCardButton();\n\n String getNameOfChosenPaymentMethod();\n\n boolean isHotDollarsModuleAvailable();\n\n String getHotDollarsMessage();\n\n WebElement getPaymentOptionCreditCard();\n\n /**\n * Input card holder's initials for credit card\n */\n CarPaymentMethod cardHolder(String firstName, String lastName);\n\n /**\n * Input credit card attributes\n */\n CarPaymentMethod creditCardNumber(String cardNumber);\n\n CarPaymentMethod expDate(String cardExpMonth, String cardExpYear);\n\n CarPaymentMethod creditCardSecurityCode(String cardSecCode);\n\n CarPaymentMethod savedVisaSecurityCode(String cardSecCode);\n\n /**\n * Fill in card holder's address information\n */\n CarPaymentMethod city(String city);\n\n CarPaymentMethod country(String country);\n\n CarPaymentMethod state(String state);\n\n CarPaymentMethod billingAddress(String address);\n\n CarPaymentMethod zipCode(String zipCode);\n\n CarPaymentMethod continuePanel();\n\n /**\n * Filling PayPal payment fields\n */\n CarPaymentMethod payPalUser(String firstName, String lastName);\n\n CarPaymentMethod payPalAddress(String address);\n\n CarPaymentMethod payPalCity(String city);\n\n CarPaymentMethod payPalState(String state);\n\n CarPaymentMethod payPalZipCode(String zip);\n\n /**\n * Verify that billing section is present on the page\n */\n boolean isBillingSectionPresent();\n\n /**\n * Verify that billing section has only one Credit Card payment method\n */\n boolean isCreditCardIsSingleAvailablePayment();\n\n void saveMyInformation();\n\n void savePaymentInformation();\n\n WebElement getPasswordField();\n\n WebElement getConfirmPasswordField();\n\n boolean isSaveMyInfoExpanded();\n\n void chooseCreditCardPaymentMethod();\n\n boolean isSavedPaymentPresent();\n\n void typeCreditCardNameField(String ccNumber);\n\n\n}", "private void addMethods(StringBuilder xml) {\n\t\t\n\t\tfor(MethodRequest method : methods) {\n\t\t\tstartElementWithAttributes(xml, \"Method\");\n\t\t\taddStringAttribute(xml, \"name\", method.getName());\n\t\t\taddStringAttribute(xml, \"contextObject\", method.getContextObject());\n\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t}\n\t\t\n\t}", "CarPaymentMethod processPayPal();", "public List<VOPaymentType> getAvailablePaymentTypesForCreation() {\n return paymentInfoBean.getAvailablePaymentTypesForCreation(\n model.getService().getKey(), getAccountingService());\n }", "@org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();", "@Nonnull\n List<CustomerPaymentMethod> findCustomerPaymentMethods(@Nonnull final CustomerPaymentMethodLookupParameters parameters, @Nonnull final SortOrderSpecification<CustomerPaymentMethodSortColumn> sortOrderSpecification, final long startFrom, final int maxCount);", "CarrierShipmentMethod createCarrierShipmentMethod();", "@DataProvider(name = \"requestMethods\")\n\tpublic Object[][] createRequestMethods() {\n\t\tRequestMethod[] rms = RequestMethod.values();\n\t\tObject[][] ret = new Object[rms.length][];\n\t\tfor (int i = 0; i < rms.length; ++i)\n\t\t\tret[i] = new Object[] { rms[i].toString() };\n\t\treturn ret;\n\t}", "public PaymentTypeObject[] getAllPaymentTypes() throws AppException;", "public IBankTransfert payment();", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public PaymentType builder()\n {\n return new PaymentType(this);\n }", "public PaymentSetMethodInfoMethodAction buildUnchecked() {\n return new PaymentSetMethodInfoMethodActionImpl(method);\n }", "public ArrayList<PaymentTypeObject> getPaymentTypes(PaymentTypeObject paymenttype_obj) throws AppException;", "PaymentTermsType getPaymentTerms();", "public List<PaymentMethodDto> paymentMethodGetAllPaymentMethod(String greaterThanValue, Integer numberToRead, Integer skipRecords, String orderBy, String lastModifiedDateTime, String lastModifiedDateTimeCondition) throws RestClientException {\n Object postBody = null;\n \n String path = UriComponentsBuilder.fromPath(\"/controller/api/v1/paymentmethod\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n \n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"greaterThanValue\", greaterThanValue));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"numberToRead\", numberToRead));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"skipRecords\", skipRecords));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"orderBy\", orderBy));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"lastModifiedDateTime\", lastModifiedDateTime));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"lastModifiedDateTimeCondition\", lastModifiedDateTimeCondition));\n\n final String[] accepts = { \n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"ipp-application-type\", \"ipp-company-id\", \"vna_oauth\" };\n\n ParameterizedTypeReference<List<PaymentMethodDto>> returnType = new ParameterizedTypeReference<List<PaymentMethodDto>>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "@ApiModelProperty(value = \"List of payment options that are supported\")\n public List<PaymentOptionsEnum> getPaymentOptions() {\n return paymentOptions;\n }", "void setPaymentMethod(PaymentMethod paymentMethod);", "List<Method> getAllMethods();", "void onPaymentRequestParamsInitiated(PaymentRequestParams params);", "public abstract java.util.Set getPaymentTypes();", "public Future<List<String>> getMethodList() throws DynamicCallException, ExecutionException {\n return call(\"getMethodList\");\n }", "@Override\r\n\tpublic void buildSettlement() {\n\t\t\r\n\t}", "ISourceMethod[] getMethods();", "public List<ServiceMethod> getMethodList()\n {\n return Collections.unmodifiableList(methods);\n }", "private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsContractsCall(underlying, expiration, _callback);\n }", "@Override\n public String getPaymentMethodCode() {\n return this.getAdvanceTravelPayment().getPaymentMethodCode();\n }", "public io.opencannabis.schema.commerce.CommercialOrder.OrderPayment.Builder getPaymentBuilder() {\n \n onChanged();\n return getPaymentFieldBuilder().getBuilder();\n }", "public abstract void populatePeripheralMethods(@Nonnull final List<ComputerMethod> methods);", "public void calculatePayment() {}", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public void setPayMethod(String value) {\n this.payMethod = value;\n }", "public abstract Builder methods(RequestMethod... paramVarArgs);", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.ListPaymentsResponse> listPayments(\n lnrpc.Rpc.ListPaymentsRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getListPaymentsMethod(), getCallOptions()), request);\n }", "public String getPayMethod() {\n return payMethod;\n }", "public PaymentMethod()\n {\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic void buildMethodDetails(List elements) throws Exception {\n\t\tMethodBuilder.getInstance(\n\t\t\t\tconfiguration,\n\t\t\t\twriter.getClassDoc(),\n\t\t\t\tnew CustomMethodWriterImpl((SubWriterHolderWriter) writer, writer.getClassDoc(),\n\t\t\t\t\t\ttargetContractMap)).build(elements);\n\t}", "public Payment[] getPaymentInfo(){\n \t\n \treturn paymentArr;\n }", "CashSettlementMethodEnum getCashSettlementMethod();", "@Override\n\tpublic List<Payment> selectPayments(Payment payment) throws Exception {\n\t\treturn registerMapper.selectPayments(payment);\n\t}", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "private void fillPaymentCb() {\n ObservableList paymentStateOp = FXCollections.observableArrayList(\"Pagado\", \"Pendiente\");\n getClientPaymentCb().setItems(paymentStateOp);\n getDriverPaymentCb().setItems(paymentStateOp);\n }", "public boolean isPartialPaymentSupported();", "private void checkPaymentMethod() {\n toolbar.setTitle(R.string.payment_method);\n PaymentMethodFragment paymentMethodFragment = new PaymentMethodFragment();\n displaySelectedFragment(paymentMethodFragment);\n }", "SmsCbCmasInfo(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void\");\n }", "com.google.protobuf.ByteString\n getPaymentUrlBytes();", "abstract public DialPlan[] getDialPlans();", "boolean buy(String... vendorCodes);", "private void setMethods(Class<?> token) {\n List<Method> newMethods = new ArrayList<>();\n for (Method method : token.getDeclaredMethods()) {\n if (methods.add(new MethodWithHash(method)) && !method.isDefault()) {\n newMethods.add(method);\n }\n }\n for (Method method : newMethods) {\n Type returnType = method.getReturnType();\n StringBuilder body = new StringBuilder(\"return\");\n if (((Class) returnType).isPrimitive()) {\n if (returnType.equals(boolean.class)) {\n body.append(\" false\");\n } else if (!returnType.equals(void.class)) {\n body.append(\" 0\");\n }\n } else {\n body.append(\" null\");\n }\n body.append(\";\");\n setExecutable(method, ((Class) returnType).getCanonicalName(), body, false);\n }\n }", "PagedResult<Loan> listLoanByComplexCondition(String clientCode,List<RepaymentMethod> methodList,int minRate,int maxRate,int minDuration,int maxDuration,PageInfo pageInfo, List<LoanStatus> statusList);", "public List<String> getMethodList() throws CallError, InterruptedException {\n return (List<String>)service.call(\"getMethodList\").get();\n }", "public List<String> getMethodList() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getMethodList\").get();\n }", "@Override\n public ServiceResponse listMethods(final ServiceRequest request) throws SOAPException {\n return this.soapClient.listMethods(request, this.getTargetUrl());\n }", "String getPaymentInformation();", "public Call getAvailablePaymentMethodsCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/getAvailablePaymentMethods\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Override\n @SuppressFBWarnings(\"BC_UNCONFIRMED_CAST\")\n protected void validateSecurityMethods() throws SuiteBroken {\n // GATTT, PATTT, GHTTT, PHTTT\n this.currentState.combinations.add(\n new Combination(\"GET\", this.currentState.url, getMatchedApiEntry(),\n CombEntry.CLIAUTH_NONE,\n CombEntry.SRVAUTH_TLSCERT, CombEntry.REQENCR_TLS, CombEntry.RESENCR_TLS\n ));\n this.currentState.combinations.add(\n new Combination(\"POST\", this.currentState.url, getMatchedApiEntry(),\n CombEntry.CLIAUTH_NONE,\n CombEntry.SRVAUTH_TLSCERT, CombEntry.REQENCR_TLS, CombEntry.RESENCR_TLS\n ));\n this.currentState.combinations.add(\n new Combination(\"GET\", this.currentState.url, getMatchedApiEntry(),\n CombEntry.CLIAUTH_HTTPSIG, CombEntry.SRVAUTH_TLSCERT, CombEntry.REQENCR_TLS,\n CombEntry.RESENCR_TLS\n ));\n this.currentState.combinations.add(\n new Combination(\"POST\", this.currentState.url, getMatchedApiEntry(),\n CombEntry.CLIAUTH_HTTPSIG, CombEntry.SRVAUTH_TLSCERT, CombEntry.REQENCR_TLS,\n CombEntry.RESENCR_TLS\n ));\n }", "public List<String> getPaymentRequestInReceivingStatus();", "public String getPaymentMethod() {\n\t\treturn paymentMethod;\n\t}", "public PaymentMethodsSearchFilters setPaymentMethodsTypes(List<PaymentMethodsTypesEnum> paymentMethodsTypes) {\n if (paymentMethodsTypes != null) {\n this.paymentMethodsTypes = new ArrayList<>();\n paymentMethodsTypes.forEach(transactionType ->\n this.paymentMethodsTypes.add(transactionType.getValue())\n );\n }\n return this;\n }", "CarPaymentMethod processCreditCard();", "public String paypalSubscription(StudentProfileDetail studentProfileDetail,int planId, PlanRate planRate, int selectDuration){\r\n\t\tString token =\"\";\r\n\t\tPaymentDetailsType paymentDetails = new PaymentDetailsType();\r\n\t\t paymentDetails.setPaymentAction(PaymentActionCodeType.fromValue(\"Sale\"));\r\n\r\n\t\t BasicAmountType orderTotal = new BasicAmountType();\r\n\t\t \r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\t\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"USD\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"MXN\"));\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\torderTotal.setCurrencyID(CurrencyCodeType.fromValue(\"EUR\"));\r\n\t\t}\r\n\t\t \r\n\t\t orderTotal.setValue(\"0\");\r\n\t\t paymentDetails.setOrderTotal(orderTotal);\r\n\t\t List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();\r\n\t\t paymentDetailsList.add(paymentDetails);\r\n\r\n\t\t SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();\r\n\t\t setExpressCheckoutRequestDetails.setReturnURL(returnURLSub+\"=\"+planId+\"&selectDuration=\"+selectDuration);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setCancelURL(cancelURL);\r\n\r\n\t\t setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);\r\n\t\t setExpressCheckoutRequestDetails.setNoShipping(\"1\"); \r\n\t\t BillingAgreementDetailsType billingAgreement = new BillingAgreementDetailsType(BillingCodeType.fromValue(\"RecurringPayments\"));\r\n\t\t\r\n\t\tbillingAgreement.setBillingAgreementDescription(\"This is subscription plan\");\r\n\t\t\r\n\t\t List<BillingAgreementDetailsType> billList = new ArrayList<BillingAgreementDetailsType>();\r\n\t\t billList.add(billingAgreement);\r\n\t\t setExpressCheckoutRequestDetails.setBillingAgreementDetails(billList);\r\n\r\n\t\t SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);\r\n\t\t setExpressCheckoutRequest.setVersion(\"104.0\");\r\n\t\t //setExpressCheckoutRequest.getSetExpressCheckoutRequestDetails().setNoShipping(\"1\");\r\n\t\t SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();\r\n\t\t setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);\r\n\t\t Map<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\t sdkConfig.put(\"mode\", mode);\r\n\t\t sdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\t sdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\t sdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);\r\n\t\t \r\n\t\t //PayPalAPIInterfaceServiceService service=new PayPalAPIInterfaceServiceService();\r\n\t\t SetExpressCheckoutResponseType setExpressCheckoutResponse;\r\n\t\ttry {\r\n\t\t\tsetExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);\r\n\t\t\t\r\n\t\t\ttoken=setExpressCheckoutResponse.getToken();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn token;\r\n\t\t \r\n\t \t\r\n\t}", "@XRMethod(value = \"system.listMethods\", help = \"List all method names available\")\r\n\tList<String> listMethods();", "public SmsCbCmasInfo(int r1, int r2, int r3, int r4, int r5, int r6) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e6 in method: android.telephony.SmsCbCmasInfo.<init>(int, int, int, int, int, int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.<init>(int, int, int, int, int, int):void\");\n }", "public lnrpc.Rpc.ListPaymentsResponse listPayments(lnrpc.Rpc.ListPaymentsRequest request) {\n return blockingUnaryCall(\n getChannel(), getListPaymentsMethod(), getCallOptions(), request);\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.809 -0500\", hash_original_method = \"AC0A5CAC5D79A50D0A1A1A7D60109A25\", hash_generated_method = \"DDCD510819A32FF7BD9558A5CE176D29\")\n \nprivate ContactMethods() {}", "@com.jg.JgMethodChecked(author = 20, fComment = \"checked\", lastDate = \"20140429\", reviewer = 20, vComment = {com.jg.EType.INTENTCHECK})\n public final void b(com.tencent.mm.plugin.gwallet.a.c r6, android.content.Intent r7) {\n /*\n r5 = this;\n r0 = 1;\n r1 = 0;\n r2 = \"MicroMsg.GWalletUI\";\n r3 = new java.lang.StringBuilder;\n r4 = \"Purchase finished: \";\n r3.<init>(r4);\n r3 = r3.append(r6);\n r4 = \", purchase: \";\n r3 = r3.append(r4);\n r3 = r3.append(r7);\n r3 = r3.toString();\n com.tencent.mm.sdk.platformtools.v.d(r2, r3);\n if (r7 != 0) goto L_0x0051;\n L_0x0025:\n r7 = new android.content.Intent;\n r2 = \"com.tencent.mm.gwallet.ACTION_PAY_RESPONSE\";\n r7.<init>(r2);\n r2 = \"RESPONSE_CODE\";\n r3 = r6.gDS;\n r7.putExtra(r2, r3);\n L_0x0035:\n r2 = r5.gDv;\n r2.sendBroadcast(r7);\n r2 = r6.iY();\n if (r2 != 0) goto L_0x005a;\n L_0x0040:\n r2 = r6.gDS;\n r3 = 7;\n if (r2 != r3) goto L_0x0058;\n L_0x0045:\n r2 = r0;\n L_0x0046:\n if (r2 != 0) goto L_0x005a;\n L_0x0048:\n if (r0 == 0) goto L_0x0050;\n L_0x004a:\n r0 = r5.gDv;\n r2 = 0;\n com.tencent.mm.plugin.gwallet.GWalletUI.a(r0, r1, r2);\n L_0x0050:\n return;\n L_0x0051:\n r2 = \"com.tencent.mm.gwallet.ACTION_PAY_RESPONSE\";\n r7.setAction(r2);\n goto L_0x0035;\n L_0x0058:\n r2 = r1;\n goto L_0x0046;\n L_0x005a:\n r0 = r1;\n goto L_0x0048;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.gwallet.GWalletUI.2.b(com.tencent.mm.plugin.gwallet.a.c, android.content.Intent):void\");\n }", "public List<AvailableShippingMethod> getAvailableShippingMethods() {\n return (List<AvailableShippingMethod>) get(\"available_shipping_methods\");\n }", "abstract protected Set<Method> createMethods();", "private TransactionRequest initTransactionRequest() {\n TransactionRequest transactionRequestNew = new\n TransactionRequest(System.currentTimeMillis() + \"\", 20000);\n\n //set customer details\n transactionRequestNew.setCustomerDetails(initCustomerDetails());\n\n\n // set item details\n ItemDetails itemDetails = new ItemDetails(\"1\", 20000, 1, \"Trekking Shoes\");\n\n // Add item details into item detail list.\n ArrayList<ItemDetails> itemDetailsArrayList = new ArrayList<>();\n itemDetailsArrayList.add(itemDetails);\n transactionRequestNew.setItemDetails(itemDetailsArrayList);\n\n\n // Create creditcard options for payment\n CreditCard creditCard = new CreditCard();\n\n creditCard.setSaveCard(false); // when using one/two click set to true and if normal set to false\n\n// this methode deprecated use setAuthentication instead\n// creditCard.setSecure(true); // when using one click must be true, for normal and two click (optional)\n\n creditCard.setAuthentication(CreditCard.AUTHENTICATION_TYPE_3DS);\n\n // noted !! : channel migs is needed if bank type is BCA, BRI or MyBank\n// creditCard.setChannel(CreditCard.MIGS); //set channel migs\n creditCard.setBank(BankType.BCA); //set spesific acquiring bank\n\n transactionRequestNew.setCreditCard(creditCard);\n\n return transactionRequestNew;\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listMyOptionsTradesCall(underlying, contract, limit, offset, from, to, _callback);\n }", "public java.util.List<frame.socket.common.proto.Login.ActAmount.Builder> \n getActAmountBuilderList() {\n return getActAmountFieldBuilder().getBuilderList();\n }", "@Override\n public ServiceResponse allowedMethods(final ServiceRequest request) throws SOAPException {\n return this.soapClient.allowedMethods(request, this.getTargetUrl());\n }", "public ParametricStatement[] createForPaymentTransaction(PaymentTransaction paymentTransaction)\n throws SQLException {\n int multiplier = 1;\n Date date = paymentTransaction.getProcessDate();\n if (paymentTransaction instanceof VoidTransaction) {\n VoidTransaction trans = (VoidTransaction)paymentTransaction;\n ITransaction originalTrans = trans.getOriginalTransaction();\n if (originalTrans instanceof PaymentTransaction) {\n multiplier = -1;\n paymentTransaction = (PaymentTransaction)originalTrans;\n } else {\n // Do nothing if original was not a payment transaction.\n return new ParametricStatement[0];\n }\n }\n ArrayList parametricStatements = new ArrayList();\n String storeId = paymentTransaction.getStore().getId();\n String operatorId = paymentTransaction.getTheOperator().getId();\n // String registerId = paymentTransaction.getId();\n // int registerIdIndex = registerId.indexOf('*') + 1;\n // registerId = registerId.substring(registerIdIndex, registerId.indexOf('*', registerIdIndex));\n String registerId = paymentTransaction.getRegisterId();\n PaymentSummary[] currentPaymentSummaries = this.selectByDateStoreId(date, storeId);\n List newPaymentSummaries = new ArrayList();\n Payment[] payments = paymentTransaction.getPaymentsArray();\n for (int paymentIndex = 0; paymentIndex < payments.length; paymentIndex++) {\n ArmCurrency paymentAmount = payments[paymentIndex].getAmount().multiply(multiplier);\n String paymentType = payments[paymentIndex].getTransactionPaymentName();\n if (payments[paymentIndex] instanceof CMSForeignCash)\n paymentType = ((CMSForeignCash)payments[paymentIndex]).getEODTenderType();\n boolean found = false;\n //to find if this payment type is already in the database\n for (int summaryIndex = 0; summaryIndex < currentPaymentSummaries.length; summaryIndex++) {\n if (currentPaymentSummaries[summaryIndex].getEmployeeId().equals(operatorId)\n && currentPaymentSummaries[summaryIndex].getRegisterId().equals(registerId)\n && currentPaymentSummaries[summaryIndex].getPaymentType().equals(paymentType)) {\n found = true;\n try {\n currentPaymentSummaries[summaryIndex].doSetPaymentTotal(paymentAmount.add(\n currentPaymentSummaries[summaryIndex].getPaymentTotal()));\n int mediaCount = ((CMSPaymentSummary)currentPaymentSummaries[summaryIndex]).\n getMediaCount();\n ((CMSPaymentSummary)currentPaymentSummaries[summaryIndex]).doSetMediaCount(mediaCount\n + 1);\n } catch (Exception ex) {\n // ignore??\n }\n // work-around for cloudscape date truncation problem.\n currentPaymentSummaries[summaryIndex].doSetDate(date);\n List list = fromObjectToBean(currentPaymentSummaries[summaryIndex]).toList();\n list.add(currentPaymentSummaries[summaryIndex].getId());\n parametricStatements.add(new ParametricStatement(updateSql, list));\n break;\n }\n }\n //to find if it is already in the newPaymentSummaries List\n if (!found) {\n PaymentSummary[] newPaymentSummaryArray = (PaymentSummary[])newPaymentSummaries.toArray(new\n PaymentSummary[0]);\n for (int summaryIndex = 0; summaryIndex < newPaymentSummaryArray.length; summaryIndex++) {\n if (newPaymentSummaryArray[summaryIndex].getEmployeeId().equals(operatorId)\n && newPaymentSummaryArray[summaryIndex].getRegisterId().equals(registerId)\n && newPaymentSummaryArray[summaryIndex].getPaymentType().equals(paymentType)) {\n found = true;\n try {\n ArmCurrency newTotal = paymentAmount.add(newPaymentSummaryArray[summaryIndex].\n getPaymentTotal());\n int mediaCount = ((CMSPaymentSummary)newPaymentSummaryArray[summaryIndex]).\n getMediaCount();\n newPaymentSummaryArray[summaryIndex].doSetPaymentTotal(newTotal);\n ((CMSPaymentSummary)newPaymentSummaryArray[summaryIndex]).doSetMediaCount(mediaCount\n + 1);\n } catch (Exception ex) {\n // ignore??\n }\n }\n }\n }\n if (!found) {\n CMSPaymentSummary paymentSummary = new CMSPaymentSummary();\n paymentSummary.doSetDate(date);\n paymentSummary.doSetEmployeeId(operatorId);\n paymentSummary.doSetStoreId(storeId);\n paymentSummary.doSetRegisterId(registerId);\n paymentSummary.doSetPaymentTotal(paymentAmount);\n if (payments[paymentIndex] instanceof CMSForeignCash)\n paymentType = ((CMSForeignCash)payments[paymentIndex]).getEODTenderType();\n paymentSummary.doSetPaymentType(paymentType);\n paymentSummary.doSetId(this.getNextChelseaId());\n paymentSummary.doSetMediaCount(paymentSummary.getMediaCount() + 1);\n newPaymentSummaries.add(paymentSummary);\n }\n }\n for (int i = 0; i < newPaymentSummaries.size(); i++) {\n PaymentSummary paymentSummary = (PaymentSummary)newPaymentSummaries.get(i);\n parametricStatements.add(new ParametricStatement(insertSql\n , fromObjectToBean(paymentSummary).toList()));\n }\n return (ParametricStatement[])parametricStatements.toArray(new ParametricStatement[\n parametricStatements.size()]);\n }", "public RequestMethodsRequestCondition getMethodsCondition()\n/* */ {\n/* 125 */ return this.methodsCondition;\n/* */ }", "public byte[] getSigAlgParams() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getSigAlgParams():byte[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getSigAlgParams():byte[]\");\n }", "public void makePayment(String amount, String paymentRef) {\n JudoSDKManager.setKeyAndSecret(getApplicationContext(), API_TOKEN, API_SECRET);\n\n// Set environment to Sandbox\n JudoSDKManager.setSandboxMode(getApplicationContext());\n\n String customerRef = Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n Intent intent = JudoSDKManager.makeAPayment(getApplicationContext(), JUDO_ID, \"GBP\", amount, paymentRef, customerRef, null);\n startActivityForResult(intent, ACTION_CARD_PAYMENT);\n }", "public void setPaymentMethodCode_BankTransfer() {\n setPaymentMethodCodeAsPaymentMethod(AppCDef.PaymentMethod.BankTransfer);\n }", "public String getLBR_PartialPayment();", "public void sendMerchantOffers(int debug1, MerchantOffers debug2, int debug3, int debug4, boolean debug5, boolean debug6) {}" ]
[ "0.6445597", "0.5914451", "0.5744711", "0.5700834", "0.56591254", "0.55832285", "0.5574028", "0.5488026", "0.5434384", "0.53069854", "0.52960163", "0.52734286", "0.52732986", "0.52723575", "0.5138234", "0.5114124", "0.5100171", "0.5088592", "0.501909", "0.49828646", "0.49795485", "0.48664296", "0.48637465", "0.48570502", "0.48521587", "0.4848672", "0.4791118", "0.47773412", "0.47548118", "0.4735329", "0.4730897", "0.4650187", "0.4630862", "0.4608836", "0.4601688", "0.4600605", "0.45949063", "0.45934483", "0.45917103", "0.45810604", "0.45790192", "0.45787525", "0.45575958", "0.45548093", "0.45545283", "0.45513457", "0.4544236", "0.45440713", "0.45361", "0.45326424", "0.45239422", "0.4512713", "0.45075044", "0.45041075", "0.45038283", "0.44934094", "0.4489825", "0.44687968", "0.4464934", "0.44465572", "0.4438737", "0.44377643", "0.44346943", "0.44331", "0.44280553", "0.44202805", "0.4418317", "0.44156808", "0.44108418", "0.4410032", "0.4408168", "0.44078732", "0.43936414", "0.4363978", "0.43620265", "0.4357631", "0.4335937", "0.43330365", "0.43173406", "0.43144456", "0.43081403", "0.43078518", "0.4301179", "0.43010712", "0.43000865", "0.42975217", "0.42972466", "0.42912513", "0.4279355", "0.42744526", "0.4272257", "0.4267383", "0.42648864", "0.4257279", "0.42542854", "0.42534557", "0.42477903", "0.4246482", "0.42358825", "0.42332086" ]
0.48235816
26
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getAvailablePaymentMethodsForTransactionValidateBeforeCall(String generalContractId, String smartTransactionId, GetAvailablePaymentMethodsDTO body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethodsForTransaction(Async)"); } // verify the required parameter 'smartTransactionId' is set if (smartTransactionId == null) { throw new ApiException("Missing the required parameter 'smartTransactionId' when calling getAvailablePaymentMethodsForTransaction(Async)"); } return getAvailablePaymentMethodsForTransactionCall(generalContractId, smartTransactionId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "private Contract() {\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.65667087", "0.6498893", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.5991647", "0.58935875", "0.5867352", "0.57154477", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.54083145", "0.53983784", "0.538685", "0.5372101", "0.535575", "0.53002197", "0.5298278", "0.5284535", "0.5277213", "0.5228654", "0.5213922", "0.5213851", "0.5203466", "0.5203466", "0.5198705", "0.51919657", "0.5132997", "0.503143", "0.5030267", "0.502797", "0.5015527", "0.5008133", "0.49868008", "0.49842298", "0.49836314", "0.49824694", "0.49804395", "0.4969242", "0.4950973", "0.49493062", "0.49471316", "0.4928483", "0.49245524", "0.49162278", "0.4885365", "0.48522398", "0.4833596", "0.48331168", "0.48331168", "0.48331168", "0.48331168", "0.4830747", "0.4827253", "0.48129195", "0.48126492", "0.4799318", "0.4791708", "0.47801298", "0.4777395", "0.47646844", "0.47614396", "0.47599468", "0.47580373", "0.47508353", "0.47382933", "0.4732828", "0.47288087", "0.47212544", "0.4717133", "0.47137868", "0.47108936", "0.46979916", "0.46949527", "0.46938235", "0.469239", "0.46847698", "0.46842527", "0.46841192", "0.46748438", "0.46745366", "0.46736524", "0.46714628", "0.46679446", "0.4660473", "0.46603698", "0.46579075", "0.4655875", "0.4655484", "0.46554628", "0.46510994", "0.46478415" ]
0.0
-1
Build call for getIframeOptions
public Call getIframeOptionsCall(String generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/IframeOptions" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "protected UriComponentsBuilder getUriComponentsBuilder(String sbUrl) {\n\t\tUriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(sbUrl);\n\t\tif ( //\n\t\t\topenApiUiConfig.isDisplayQueryParams() && StringUtils.isNotEmpty(openApiUiConfigParameters.getUrl())\n\t\t){\n\t\t\topenApiUiConfigParameters.getConfigParameters().entrySet().stream()\n\t\t\t.filter(entry -> !OpenApiUiConfigParameters.CONFIG_URL_PROPERTY.equals(entry.getKey()))\n\t\t\t.filter(entry -> !entry.getKey().startsWith(OpenApiUiConfigParameters.URLS_PROPERTY))\n\t\t\t.filter(entry -> StringUtils.isNotEmpty((String) entry.getValue()))\n\t\t\t.forEach(entry -> uriBuilder.queryParam(entry.getKey(), entry.getValue()));\n\t\t} else if ( //\n\t\t\topenApiUiConfig.isDisplayQueryParamsWithoutOauth2() && StringUtils.isNotEmpty(openApiUiConfigParameters.getUrl())\n\t\t){\n\t\t\topenApiUiConfigParameters.getConfigParameters().entrySet().stream()\n\t\t\t.filter(entry -> !OpenApiUiConfigParameters.CONFIG_URL_PROPERTY.equals(entry.getKey()))\n\t\t\t.filter(entry -> !OpenApiUiConfigParameters.OAUTH2_REDIRECT_URL_PROPERTY.equals(entry.getKey()))\n\t\t\t.filter(entry -> !entry.getKey().startsWith(OpenApiUiConfigParameters.URLS_PROPERTY))\n\t\t\t.filter(entry -> StringUtils.isNotEmpty((String) entry.getValue()))\n\t\t\t.forEach(entry -> uriBuilder.queryParam(entry.getKey(), entry.getValue()));\n\t\t} else {\n\t\t\turiBuilder.queryParam(OpenApiUiConfigParameters.CONFIG_URL_PROPERTY, openApiUiConfigParameters.getConfigUrl());\n\t\t\tif (StringUtils.isNotEmpty(openApiUiConfigParameters.getLayout())) {\n\t\t\t\turiBuilder.queryParam(OpenApiUiConfigParameters.LAYOUT_PROPERTY, openApiUiConfigParameters.getLayout());\n\t\t\t}\n\t\t\tif (openApiUiConfigParameters.getFilter() != null) {\n\t\t\t\turiBuilder.queryParam(OpenApiUiConfigParameters.FILTER_PROPERTY, openApiUiConfigParameters.getFilter());\n\t\t\t}\n\t\t}\n\t\treturn uriBuilder;\n\t}", "go.micro.runtime.RuntimeOuterClass.ListOptions getOptions();", "public RequestDataBuilder options() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.OPTIONS);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listMyOptionsSettlementsCall(underlying, contract, limit, offset, from, to, _callback);\n }", "protected UriComponentsBuilder getUriComponentsBuilder(String sbUrl) {\n\t\tUriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(sbUrl);\n\t\tif (swaggerUiConfig.isDisplayQueryParams() && StringUtils.isNotEmpty(swaggerUiConfig.getUrl())) {\n\t\t\tswaggerUiConfig.getConfigParameters().entrySet().stream()\n\t\t\t\t\t.filter(entry -> !SwaggerUiConfigProperties.CONFIG_URL_PROPERTY.equals(entry.getKey()))\n\t\t\t\t\t.filter(entry -> !entry.getKey().startsWith(SwaggerUiConfigProperties.URLS_PROPERTY))\n\t\t\t\t\t.filter(entry -> StringUtils.isNotEmpty((String) entry.getValue()))\n\t\t\t\t\t.forEach(entry -> uriBuilder.queryParam(entry.getKey(), entry.getValue()));\n\t\t} else if (swaggerUiConfig.isDisplayQueryParamsWithoutOauth2() && StringUtils.isNotEmpty(swaggerUiConfig.getUrl())) {\n\t\t\tswaggerUiConfig.getConfigParameters().entrySet().stream()\n\t\t\t\t\t.filter(entry -> !SwaggerUiConfigProperties.CONFIG_URL_PROPERTY.equals(entry.getKey()))\n\t\t\t\t\t.filter(entry -> !SwaggerUiConfigProperties.OAUTH2_REDIRECT_URL_PROPERTY.equals(entry.getKey()))\n\t\t\t\t\t.filter(entry -> !entry.getKey().startsWith(SwaggerUiConfigProperties.URLS_PROPERTY))\n\t\t\t\t\t.filter(entry -> StringUtils.isNotEmpty((String) entry.getValue()))\n\t\t\t\t\t.forEach(entry -> uriBuilder.queryParam(entry.getKey(), entry.getValue()));\n\t\t}\n\t\telse {\n\t\t\turiBuilder.queryParam(SwaggerUiConfigProperties.CONFIG_URL_PROPERTY, swaggerUiConfig.getConfigUrl());\n\t\t\tif (StringUtils.isNotEmpty(swaggerUiConfig.getLayout()))\n\t\t\t\turiBuilder.queryParam(SwaggerUiConfigProperties.LAYOUT_PROPERTY, swaggerUiConfig.getLayout());\n\t\t\tif (StringUtils.isNotEmpty(swaggerUiConfig.getFilter()))\n\t\t\t\turiBuilder.queryParam(SwaggerUiConfigProperties.FILTER_PROPERTY, swaggerUiConfig.getFilter());\n\t\t}\n\t\treturn uriBuilder;\n\t}", "private String urlBuilder(){\n String timelineURL = \"curgas/timeline.json\";\n final RequestBuilder.UrlBuilder url = new RequestBuilder.UrlBuilder();\n url.setUrl(timelineURL);\n url.appendUrlQuery(\"apikey\", Constants.API_KEY);\n url.appendUrlQuery(\"sort\", SORT_TYPE);\n url.appendUrlQuery(\"jumlah\",TOTAL_POSTS);\n url.appendUrlQuery(\"page\",Integer.toString(PAGE_LOADED));\n\n String buildURL = url.build();\n\n return buildURL;\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsSettlementsCall(underlying, limit, offset, from, to, _callback);\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsContractsCall(underlying, expiration, _callback);\n }", "private Frame buildFrame() {\n return new Frame(command, headers, body);\n }", "public ServerOptions( final Frame mainFrame ) {\r\n super( mainFrame );\r\n }", "public NationalAccountBenchmarkWebOptions() {\r\n super();\r\n\r\n }", "public com.google.protobuf.StringValue.Builder getProfilePictureUrlBuilder() {\n \n onChanged();\n return getProfilePictureUrlFieldBuilder().getBuilder();\n }", "public interface Chart3dFrameOptions extends Any {\n /**\n * (Highcharts) The back side of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.back\">https://api.highcharts.com/highcharts/chart.options3d.frame.back</a>\n *\n * @implspec back?: Chart3dFrameBackOptions;\n *\n */\n @JSProperty(\"back\")\n @Nullable\n Chart3dFrameBackOptions getBack();\n\n /**\n * (Highcharts) The back side of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.back\">https://api.highcharts.com/highcharts/chart.options3d.frame.back</a>\n *\n * @implspec back?: Chart3dFrameBackOptions;\n *\n */\n @JSProperty(\"back\")\n void setBack(Chart3dFrameBackOptions value);\n\n /**\n * (Highcharts) The bottom of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.bottom\">https://api.highcharts.com/highcharts/chart.options3d.frame.bottom</a>\n *\n * @implspec bottom?: Chart3dFrameBottomOptions;\n *\n */\n @JSProperty(\"bottom\")\n @Nullable\n Chart3dFrameBottomOptions getBottom();\n\n /**\n * (Highcharts) The bottom of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.bottom\">https://api.highcharts.com/highcharts/chart.options3d.frame.bottom</a>\n *\n * @implspec bottom?: Chart3dFrameBottomOptions;\n *\n */\n @JSProperty(\"bottom\")\n void setBottom(Chart3dFrameBottomOptions value);\n\n /**\n * (Highcharts) The front of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.front\">https://api.highcharts.com/highcharts/chart.options3d.frame.front</a>\n *\n * @implspec front?: Chart3dFrameFrontOptions;\n *\n */\n @JSProperty(\"front\")\n @Nullable\n Chart3dFrameFrontOptions getFront();\n\n /**\n * (Highcharts) The front of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.front\">https://api.highcharts.com/highcharts/chart.options3d.frame.front</a>\n *\n * @implspec front?: Chart3dFrameFrontOptions;\n *\n */\n @JSProperty(\"front\")\n void setFront(Chart3dFrameFrontOptions value);\n\n /**\n * (Highcharts) The left side of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.left\">https://api.highcharts.com/highcharts/chart.options3d.frame.left</a>\n *\n * @implspec left?: Chart3dFrameLeftOptions;\n *\n */\n @JSProperty(\"left\")\n @Nullable\n Chart3dFrameLeftOptions getLeft();\n\n /**\n * (Highcharts) The left side of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.left\">https://api.highcharts.com/highcharts/chart.options3d.frame.left</a>\n *\n * @implspec left?: Chart3dFrameLeftOptions;\n *\n */\n @JSProperty(\"left\")\n void setLeft(Chart3dFrameLeftOptions value);\n\n /**\n * (Highcharts) The right of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.right\">https://api.highcharts.com/highcharts/chart.options3d.frame.right</a>\n *\n * @implspec right?: Chart3dFrameRightOptions;\n *\n */\n @JSProperty(\"right\")\n @Nullable\n Chart3dFrameRightOptions getRight();\n\n /**\n * (Highcharts) The right of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.right\">https://api.highcharts.com/highcharts/chart.options3d.frame.right</a>\n *\n * @implspec right?: Chart3dFrameRightOptions;\n *\n */\n @JSProperty(\"right\")\n void setRight(Chart3dFrameRightOptions value);\n\n /**\n * (Highcharts) Note: As of v5.0.12, <code>frame.left</code> or <code>frame.right</code> should be\n * used instead.\n *\n * The side for the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.side\">https://api.highcharts.com/highcharts/chart.options3d.frame.side</a>\n *\n * @implspec side?: Chart3dFrameSideOptions;\n *\n */\n @JSProperty(\"side\")\n @Nullable\n Chart3dFrameSideOptions getSide();\n\n /**\n * (Highcharts) Note: As of v5.0.12, <code>frame.left</code> or <code>frame.right</code> should be\n * used instead.\n *\n * The side for the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.side\">https://api.highcharts.com/highcharts/chart.options3d.frame.side</a>\n *\n * @implspec side?: Chart3dFrameSideOptions;\n *\n */\n @JSProperty(\"side\")\n void setSide(Chart3dFrameSideOptions value);\n\n /**\n * (Highcharts) General pixel thickness for the frame faces.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.size\">https://api.highcharts.com/highcharts/chart.options3d.frame.size</a>\n *\n * @implspec size?: number;\n *\n */\n @JSProperty(\"size\")\n double getSize();\n\n /**\n * (Highcharts) General pixel thickness for the frame faces.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.size\">https://api.highcharts.com/highcharts/chart.options3d.frame.size</a>\n *\n * @implspec size?: number;\n *\n */\n @JSProperty(\"size\")\n void setSize(double value);\n\n /**\n * (Highcharts) The top of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.top\">https://api.highcharts.com/highcharts/chart.options3d.frame.top</a>\n *\n * @implspec top?: Chart3dFrameTopOptions;\n *\n */\n @JSProperty(\"top\")\n @Nullable\n Chart3dFrameTopOptions getTop();\n\n /**\n * (Highcharts) The top of the frame around a 3D chart.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.top\">https://api.highcharts.com/highcharts/chart.options3d.frame.top</a>\n *\n * @implspec top?: Chart3dFrameTopOptions;\n *\n */\n @JSProperty(\"top\")\n void setTop(Chart3dFrameTopOptions value);\n\n /**\n * (Highcharts) Whether the frames are visible.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.visible\">https://api.highcharts.com/highcharts/chart.options3d.frame.visible</a>\n *\n * @implspec visible?: string;\n *\n */\n @JSProperty(\"visible\")\n @Nullable\n String getVisible();\n\n /**\n * (Highcharts) Whether the frames are visible.\n *\n * @see <a href=\"https://api.highcharts.com/highcharts/chart.options3d.frame.visible\">https://api.highcharts.com/highcharts/chart.options3d.frame.visible</a>\n *\n * @implspec visible?: string;\n *\n */\n @JSProperty(\"visible\")\n void setVisible(String value);\n}", "Map getOptions();", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listMyOptionsTradesCall(underlying, contract, limit, offset, from, to, _callback);\n }", "public abstract Builder options(RequestMappingInfo.BuilderConfiguration paramBuilderConfiguration);", "go.micro.runtime.RuntimeOuterClass.CreateOptions getOptions();", "Map<String, List<String>> getElementBaseConfigurationOptions();", "go.micro.runtime.RuntimeOuterClass.ListOptionsOrBuilder getOptionsOrBuilder();", "public void buildFrame();", "public go.micro.runtime.RuntimeOuterClass.ListOptions.Builder getOptionsBuilder() {\n \n onChanged();\n return getOptionsFieldBuilder().getBuilder();\n }", "public abstract Builder setBaseOptions(BaseOptions value);", "public static Options.OptionsBuilder getOptionsFromParameters(Options.OptionsBuilder optionsBuilder) {\n Map<String, String> params = getParameters();\n if (!params.containsKey(ACCESS_TOKEN))\n return null;\n\n Options.OptionsBuilder opts = optionsBuilder\n .withAccessToken(params.get(ACCESS_TOKEN));\n\n // As we use the okhttp collector, do override default values properly:\n opts\n .withCollectorHost(DEFAULT_COLLECTOR_HOST)\n .withCollectorProtocol(DEFAULT_COLLECTOR_PROTOCOL)\n .withCollectorPort(DEFAULT_COLLECTOR_PORT)\n .withCollectorClient(Options.CollectorClient.HTTP);\n\n if (params.containsKey(CLOCK_SKEW_CORRECTION))\n opts.withClockSkewCorrection(toBoolean(params.get(CLOCK_SKEW_CORRECTION)));\n\n if (params.containsKey(COMPONENT_NAME))\n opts.withComponentName(params.get(COMPONENT_NAME));\n\n if (params.containsKey(COLLECTOR_CLIENT)) {\n String value = params.get(COLLECTOR_CLIENT);\n for (Options.CollectorClient client : Options.CollectorClient.values()) {\n if (client.name().toLowerCase().equals(value)) {\n opts.withCollectorClient(client);\n }\n }\n }\n\n if (params.containsKey(COLLECTOR_HOST)) {\n String value = params.get(COLLECTOR_HOST);\n if (validateNonEmptyString(value))\n opts.withCollectorHost(value);\n }\n\n if (params.containsKey(COLLECTOR_PROTOCOL)) {\n String value = params.get(COLLECTOR_PROTOCOL);\n if (validateProtocol(value))\n opts.withCollectorProtocol(value);\n }\n\n if (params.containsKey(COLLECTOR_PORT)) {\n Integer value = toInteger(params.get(COLLECTOR_PORT));\n if (validatePort(value))\n opts.withCollectorPort(value);\n }\n\n if (params.containsKey(DEADLINE_MILLIS)) {\n Long value = toLong(params.get(DEADLINE_MILLIS));\n if (value != null)\n opts.withDeadlineMillis(value);\n }\n\n if (params.containsKey(DISABLE_REPORTING_LOOP))\n opts.withDisableReportingLoop(toBoolean(params.get(DISABLE_REPORTING_LOOP)));\n\n if (params.containsKey(MAX_BUFFERED_SPANS)) {\n Integer value = toInteger(params.get(MAX_BUFFERED_SPANS));\n if (value != null)\n opts.withMaxBufferedSpans(value);\n }\n\n if (params.containsKey(MAX_REPORTING_INTERVAL_MILLIS)) {\n Integer value = toInteger(params.get(MAX_REPORTING_INTERVAL_MILLIS));\n if (value != null)\n opts.withMaxReportingIntervalMillis(value);\n }\n\n if (params.containsKey(RESET_CLIENT))\n opts.withResetClient(toBoolean(params.get(RESET_CLIENT)));\n\n if (params.containsKey(VERBOSITY)) {\n Integer value = toInteger(params.get(VERBOSITY));\n if (value != null)\n opts.withVerbosity(value);\n }\n\n if (params.containsKey(TAGS)) {\n Map<String, Object> tags = toMap(params.get(TAGS));\n for (Map.Entry<String, Object> entry : tags.entrySet()) {\n opts.withTag(entry.getKey(), entry.getValue());\n }\n }\n\n if (params.containsKey(PROPAGATOR)) {\n String propagator = params.get(PROPAGATOR);\n if (\"b3\".equalsIgnoreCase(propagator)) {\n opts.withPropagator(Format.Builtin.HTTP_HEADERS, new B3Propagator());\n }\n }\n\n if (params.containsKey(SERVICE_VERSION)) {\n String serviceVersion = params.get(SERVICE_VERSION);\n if (validateNonEmptyString(serviceVersion))\n opts.withServiceVersion(serviceVersion);\n }\n\n if (params.containsKey(DISABLE_METRICS_REPORTING)) {\n Boolean disableMetrics = toBoolean(params.get(DISABLE_METRICS_REPORTING));\n opts.withDisableMetricsReporting(disableMetrics);\n }\n\n if (params.containsKey(METRICS_URL)) {\n String metricsUrl = params.get(METRICS_URL);\n if (validateNonEmptyString(metricsUrl))\n opts.withMetricsUrl(metricsUrl);\n }\n\n if (params.containsKey(HOSTNAME)) {\n String hostname = params.get(HOSTNAME);\n if (validateNonEmptyString(hostname))\n opts.withHostname(hostname);\n }\n\n return opts;\n }", "private JPanel getExtendedOptionsPanel() {\n\t\tif (extendedOptionsPanel == null) {\n\t\t\textendedOptionsPanel = new JPanel();\n\t\t\textendedOptionsPanel.setLayout(null);\n\t\t\textendedOptionsPanel.setBounds(new java.awt.Rectangle(2, 226, 465,\n\t\t\t\t\t62));\n\t\t\textendedOptionsPanel\n\t\t\t\t\t.setBorder(javax.swing.BorderFactory\n\t\t\t\t\t\t\t.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));\n\t\t\textendedOptionsPanel.add(getTypePolygonBufferPanel(), null);\n\t\t\textendedOptionsPanel.add(getNumBuffersPanel(), null);\n\t\t}\n\t\treturn extendedOptionsPanel;\n\t}", "public ControlZoomOptions build() {\n\t\t\tControlZoomOptions options = new ControlZoomOptions();\n\t\t\tif(this.position != null)\n\t\t\toptions.position = this.position;\n\t\t\tif(this.zoomInText != null)\n\t\t\toptions.zoomInText = this.zoomInText;\n\t\t\tif(this.zoomOutText != null)\n\t\t\toptions.zoomOutText = this.zoomOutText;\n\t\t\tif(this.zoomInTitle != null)\n\t\t\toptions.zoomInTitle = this.zoomInTitle;\n\t\t\tif(this.zoomOutTitle != null)\n\t\t\toptions.zoomOutTitle = this.zoomOutTitle;\n\t\t\treturn options;\n\t\t}", "public interface UrlArgumentBuilder {\n\n /**\n * Sets next element of a chain.\n *\n * @param next next element of a chain\n */\n void setNext(final UrlArgumentBuilder next);\n\n /**\n * Builds URL argument that is used by Yandex static API.\n *\n * @param yandexMap yandex map\n * @return URL part\n */\n String build(final YandexMap yandexMap);\n\n}", "public void showOptions() {\n frame.showOptions();\n }", "public BwaOptions() {\n\t}", "go.micro.runtime.RuntimeOuterClass.UpdateOptions getOptions();", "public OpenOptionPanel createOpenOptionPanel( Frame paramFrame, TCSession paramTCSession ) {\n return null;\n }", "IFRAME createIFRAME();", "protected Component getOptionsPanel() {\n return _options;\n }", "public go.micro.runtime.RuntimeOuterClass.UpdateOptions.Builder getOptionsBuilder() {\n \n onChanged();\n return getOptionsFieldBuilder().getBuilder();\n }", "private String addOptions() {\n\t\tStringBuilder tag = new StringBuilder();\n\t\tint OptionsNumber = Integer.parseInt(parameters[0]);\n\t\t// Nine Parameters: OptionsNumber, Option1, Option1Tag, Option2, Option2Tag, Option3, Option3Tag, Option4, Option4Tag\n\t\t// Minimum Three Parameters, Maximum Nine\n\t\t// If OptionsNumber = 1, Use Option1 and Option1Tag only. If OptionsNumber = 2, Use Option1 and Option2.\n\t\ttag.append(\"options:[\");\n\t\ttag.append(\"[\" + parameters[1] + \"|\" + parameters[2] + \"]\");\n\t\tif (OptionsNumber > 1) {\n\t\t\ttag.append(\", [\" + parameters[3] + \"|\" + parameters[4] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 2) {\n\t\t\ttag.append(\", [\" + parameters[5] + \"|\" + parameters[6] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 3) {\n\t\t\ttag.append(\", [\" + parameters[7] + \"|\" + parameters[8] + \"]\");\n\t\t}\n\t\ttag.append(\"]\");\n\t\treturn tag.toString();\n\n\t}", "private JFrame makeOptionsFrame(){\n MenuBarHandler menuBarHandler = new MenuBarHandler();\n JFrame optionsFrame = new JFrame(\"Options\");\n optionsFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n optionsFrame.setResizable(false);\n optionsFrame.setLocationRelativeTo(frame);\n followRedirect = new JCheckBox(\"follow redirect\");\n followRedirect.setSelected(true);\n followRedirect.addActionListener(menuBarHandler);\n hideOnSystemTray = new JCheckBox(\"Hide to tray\");\n hideOnSystemTray.addActionListener(menuBarHandler);\n ButtonGroup themes = new ButtonGroup();\n JRadioButton light = new JRadioButton(\"Light theme\");\n light.setSelected(true);\n JRadioButton dark = new JRadioButton(\"Dark theme\");\n light.addActionListener(menuBarHandler);\n dark.addActionListener(menuBarHandler);\n themes.add(light);\n themes.add(dark);\n optionsFrame.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n optionsFrame.add(hideOnSystemTray, c);\n optionsFrame.add(followRedirect, c);\n c.gridy = 1;\n optionsFrame.add(light, c);\n c.gridy = 2;\n optionsFrame.add(dark, c);\n optionsFrame.pack();\n return optionsFrame;\n }", "public String buildOptionsPanelContext( VelocityPortlet portlet,\n\t\t\t\t\t\t\t\t\t\t\tContext context,\n\t\t\t\t\t\t\t\t\t\t\tRunData data,\n\t\t\t\t\t\t\t\t\t\t\tSessionState state)\n\t{\n\t\tcontext.put(\"tlang\",rb);\n\t\tString home = (String) state.getAttribute(STATE_HOME_COLLECTION_ID);\n\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(home));\n\t\tString siteId = ref.getContext();\n\n\t\tcontext.put(\"form-submit\", BUTTON + \"doConfigure_update\");\n\t\tcontext.put(\"form-cancel\", BUTTON + \"doCancel_options\");\n\t\tcontext.put(\"description\", \"Setting options for Resources in worksite \"\n\t\t\t\t+ SiteService.getSiteDisplay(siteId));\n\n\t\t// pick the \"-customize\" template based on the standard template name\n\t\tString template = (String)getContext(data).get(\"template\");\n\t\treturn template + \"-customize\";\n\n\t}", "private String buildRedirectionDetailsBaseUrl( )\n {\n UrlItem urlRedirectionDetails = new UrlItem( MultiviewFormResponseDetailsJspBean.getMultiviewRecordDetailsBaseUrl( ) );\n\n if ( !CollectionUtils.isEmpty( _listFormFilterDisplay ) )\n {\n for ( IFormFilterDisplay formFilterDisplay : _listFormFilterDisplay )\n {\n // Add all the filters values\n String strFilterValue = formFilterDisplay.getValue( );\n if ( !StringUtils.isEmpty( strFilterValue ) )\n {\n String strFilterFullName = FormsConstants.PARAMETER_URL_FILTER_PREFIX + formFilterDisplay.getParameterName( );\n urlRedirectionDetails.addParameter( strFilterFullName, strFilterValue );\n }\n }\n }\n\n // Add the selected panel technical code\n urlRedirectionDetails.addParameter( FormsConstants.PARAMETER_SELECTED_PANEL, _strSelectedPanelTechnicalCode );\n\n // Add sort filter data to the url\n addFilterSortConfigToUrl( urlRedirectionDetails );\n\n return urlRedirectionDetails.getUrl( );\n }", "@OPTIONS\n public Response options() {\n LOGGER.info(\"OPTIONS for '{}'\", externalPath);\n\n addLinkAndOptionsHttpHeaders(resource());\n return ok().build();\n }", "private GetPayHTMLC(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "protected CLOptionDescriptor[] createCLOptions()\n {\n //TODO: localise\n final CLOptionDescriptor options[] = new CLOptionDescriptor[ 13 ];\n\n options[0] =\n new CLOptionDescriptor( \"help\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n HELP_OPT,\n \"display this help message\",\n INFO_OPT_INCOMPAT );\n \n options[1] =\n new CLOptionDescriptor( \"file\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n FILE_OPT,\n \"the build file.\" );\n\n options[2] =\n new CLOptionDescriptor( \"log-level\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n LOG_LEVEL_OPT,\n \"the verbosity level at which to log messages. \" +\n \"(DEBUG|INFO|WARN|ERROR|FATAL_ERROR)\",\n LOG_OPT_INCOMPAT );\n\n options[3] =\n new CLOptionDescriptor( \"quiet\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n QUIET_OPT,\n \"equivelent to --log-level=FATAL_ERROR\",\n LOG_OPT_INCOMPAT );\n\n options[4] =\n new CLOptionDescriptor( \"verbose\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n VERBOSE_OPT,\n \"equivelent to --log-level=INFO\",\n LOG_OPT_INCOMPAT );\n\n options[5] =\n new CLOptionDescriptor( \"listener\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n LISTENER_OPT,\n \"the listener for log events.\" );\n\n options[6] =\n new CLOptionDescriptor( \"version\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n VERSION_OPT,\n \"display version\",\n INFO_OPT_INCOMPAT );\n\n options[7] =\n new CLOptionDescriptor( \"bin-dir\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n BIN_DIR_OPT,\n \"the listener for log events.\" );\n\n options[8] =\n new CLOptionDescriptor( \"lib-dir\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n LIB_DIR_OPT,\n \"the lib directory to scan for jars/zip files.\" );\n\n options[9] =\n new CLOptionDescriptor( \"task-lib-dir\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n TASKLIB_DIR_OPT,\n \"the task lib directory to scan for .tsk files.\" );\n options[10] =\n new CLOptionDescriptor( \"incremental\",\n CLOptionDescriptor.ARGUMENT_DISALLOWED,\n INCREMENTAL_OPT,\n \"Run in incremental mode\" );\n options[11] =\n new CLOptionDescriptor( \"ant-home\",\n CLOptionDescriptor.ARGUMENT_REQUIRED,\n HOME_DIR_OPT,\n \"Specify ant home directory\" );\n options[12] =\n new CLOptionDescriptor( \"define\",\n CLOptionDescriptor.ARGUMENTS_REQUIRED_2,\n DEFINE_OPT,\n \"Define a variable (ie -Dfoo=var)\" );\n return options;\n }", "public void initDisplayImageOptions() {\n this.mDisplayImageOptionBuilder = new DisplayImageOptions.Builder().cacheThumbnail(true).loadFromMicroCache(true).cacheInMemory(true).considerExifParams(true).showStubImage(R.drawable.default_face_cover).resetViewBeforeLoading(true).imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565).displayer(new CircleBitmapDisplayer()).usingRegionDecoderFace(true);\n this.mDefaultDisplayImageOptions = this.mDisplayImageOptionBuilder.build();\n }", "public abstract Options getOptions();", "public org.xms.g.common.AccountPicker.AccountChooserOptions build() {\n throw new java.lang.RuntimeException(\"Not Supported\");\n }", "public InitOptionDialog(java.awt.Frame parent, ConfigurationOptions config_,boolean modal) {\n super(parent, modal);\n initComponents();\n this.config_ = config_;\n newConfig_ = new ConfigurationOptions();\n \n try {\n BeanUtils.copyProperties(newConfig_,this.config_);//copy the properties of config into newConfig_\n } catch (IllegalAccessException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n } catch (InvocationTargetException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n }\n\n //how to set the drop down menus\n String[] comboItems;\n comboItems= FovFilterConfig.segAlgNames_;\n DefaultComboBoxModel cdm=new DefaultComboBoxModel(comboItems);\n jComboBox_Counting_SelectAlg.setModel(cdm);\n \n comboItems = LocalAlgParam.methodValues;\n cdm=new DefaultComboBoxModel(comboItems);\n jComboBox_Counting_localMethod.setModel(cdm);\n\n //get the acquisition channel list\n comboItems = getAcqChannelList();\n cdm=new DefaultComboBoxModel(comboItems);\n jComboBox_camConf_Camera.setModel(cdm);\n jComboBox_camConf_Camera.setSelectedIndex(combo_camCurrent);\n reloadSettings();\n }", "public com.google.storage.v2.CommonObjectRequestParams.Builder\n getCommonObjectRequestParamsBuilder() {\n bitField0_ |= 0x00000080;\n onChanged();\n return getCommonObjectRequestParamsFieldBuilder().getBuilder();\n }", "@NonNull\n\t\tMap<String, String> getOptions();", "public ProductVOSGetParmsFrame (String args[]) {\n\n try {\n ProductVOSGetParmsFrameActual(args);\n } catch(Exception e) {\n ec.processError(e, this.getClass().getName(), \"constructor\", \"\");\n } // try - catch\n\n }", "public go.micro.runtime.RuntimeOuterClass.ListOptionsOrBuilder getOptionsOrBuilder() {\n return getOptions();\n }", "public go.micro.runtime.RuntimeOuterClass.CreateOptions.Builder getOptionsBuilder() {\n \n onChanged();\n return getOptionsFieldBuilder().getBuilder();\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "private String getOriginUrl() {\n Uri.Builder builder = url.buildUpon();\n for (Param p : queryParams) {\n builder.appendQueryParameter(p.key, p.value);\n }\n return builder.build().toString();\n }", "public abstract String[] getOptions();", "public com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder getConfigBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getConfigFieldBuilder().getBuilder();\n }", "public com.czht.face.recognition.Czhtdev.Request.Builder getRequestBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getRequestFieldBuilder().getBuilder();\n }", "public static StringBuffer buildDefaultOptions(UIComponent uiComponent,\n\t\t\tFacesContext facesContext) {\n boolean omitDefaultActionUrl = false;\n\n List<Object> parameters = new ArrayList<Object>();\n parameters.add(org.ajax4jsf.framework.renderer.AjaxRendererUtils.buildEventOptions(facesContext, uiComponent));\n boolean first = true;\n\t\tStringBuffer onEvent = new StringBuffer();\n \n\t\tif (null != parameters) {\n\n\t\t\tfor (Iterator<?> param = parameters.iterator(); param.hasNext();) {\n\t\t\t\tObject element = param.next();\n\n\t\t\t\tif (!first) {\n\t\t\t\t\tonEvent.append(',');\n\t\t\t\t}\n\n\t\t\t\tif (null != element) {\n\t\t\t\t\tonEvent.append(ScriptUtils.toScript(element));\n \n\t\t\t\t} else {\n\t\t\t\t\tonEvent.append(\"null\");\n\t\t\t\t}\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t}\n if (uiComponent instanceof UIWidgetBase && ((UIWidgetBase) uiComponent).isDebug())\n LOGGER.log(Level.INFO, Messages.getMessage(Messages.BUILD_ONCLICK_INFO,\n uiComponent.getId(), onEvent.toString()));\n\n\t\treturn onEvent;\n\n\t}", "@OPTIONS\n @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n @ApiOperation(value = \"Get options over aggregator conext.\", httpMethod = \"OPTIONS\", response = AggregatorOptionListContainer.class)\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"OK (Response containing a list of all available options)\")\n })\n public AggregatorOptionListContainer getOptions() {\n AggregatorOptionListContainer aggregatorOptionListContainer = new AggregatorOptionListContainer(uriInfo.getBaseUri());\n return aggregatorOptionListContainer;\n }", "public QRCodeInfo build() {\n return new QRCodeInfo(this.f104433a, this.f104434b, super.buildUnknownFields());\n }", "public QueryOptions build() {\n return new QueryOptions(this.columns, this.excludeColumns, this.excludeAttributes, this.shards);\n }", "public DIDURL build() {\n\t\t\treturn url.deepClone(true);\n\t\t}", "Bundle getOpenInOtherWindowActivityOptions();", "public lanyotech.cn.park.protoc.CommonProtoc.PageHelper.Builder getPageBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getPageFieldBuilder().getBuilder();\n }", "public OptionsBuilder optionsBuilder() {\n OptionsBuilder builder = new OptionsBuilder();\n\n builder.forks(forks);\n builder.warmupIterations(warmupIterations);\n builder.measurementIterations(measurementIterations);\n builder.timeUnit(outputTimeUnit);\n builder.threads(threads);\n\n if (benchmarkModes != null) {\n for (Mode benchmarkMode : benchmarkModes)\n builder.getBenchModes().add(benchmarkMode);\n }\n\n if (benchmarks != null) {\n for (Object benchmark : benchmarks) {\n if (benchmark instanceof Class)\n builder.include(((Class)benchmark).getSimpleName());\n else\n builder.include(benchmark.toString());\n }\n }\n\n if (jvmArgs != null)\n builder.jvmArgs(jvmArgs);\n\n if (output != null)\n builder.output(output);\n\n if (profilers != null) {\n for (Class profiler : profilers)\n builder.addProfiler(profiler);\n }\n\n return builder;\n }", "public go.micro.runtime.RuntimeOuterClass.LogsOptions.Builder getOptionsBuilder() {\n \n onChanged();\n return getOptionsFieldBuilder().getBuilder();\n }", "public com.google.protobuf.Duration.Builder getRedirectRefreshIntervalBuilder() {\n \n onChanged();\n return getRedirectRefreshIntervalFieldBuilder().getBuilder();\n }", "private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(this.extension.getMessages().getString(\"spiderajax.options.title\"));\n \t if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {\n \t \tthis.setSize(391, 320);\n \t }\n this.add(getPanelProxy(), getPanelProxy().getName()); \n \t}", "public Options initOptions() {\n\n\t\tOptions privateOptions = new Options();\n\n\t\t//Algorithm options\n\t\t//Option algorithm = new Option(\"a\", \"algorithm\", true, \"Specify the algorithm to use during the alignment\");\n\t\t//algorithm.setArgName(\"mem | aln | bwasw\");\n\n\t\t//options.addOption(algorithm);\n\n\t\tOptionGroup algorithm = new OptionGroup();\n\n\t\tOption mem = new Option(\"m\",\"mem\", false,\"The MEM algorithm will be used\");\n\t\talgorithm.addOption(mem);\n\n\t\tOption aln = new Option(\"a\",\"aln\", false,\"The ALN algorithm will be used\");\n\t\talgorithm.addOption(aln);\n\n\t\tOption bwasw = new Option(\"b\", \"bwasw\", false, \"The bwasw algorithm will be used\");\n\t\talgorithm.addOption(bwasw);\n\n\t\tprivateOptions.addOptionGroup(algorithm);\n\n\t\t//Paired or single reads\n\t\t//Option reads = new Option(\"r\", \"reads\", true, \"Type of reads to use during alignment\");\n\t\t//reads.setArgName(\"paired | single\");\n\n\t\t//options.addOption(reads);\n\t\tOptionGroup reads = new OptionGroup();\n\n\t\tOption paired = new Option(\"p\", \"paired\", false, \"Paired reads will be used as input FASTQ reads\");\n\t\treads.addOption(paired);\n\n\t\tOption single = new Option(\"s\", \"single\", false, \"Single reads will be used as input FASTQ reads\");\n\t\treads.addOption(single);\n\n\t\tprivateOptions.addOptionGroup(reads);\n\n\t\t// Options to BWA\n\t\tOptionGroup bwaOptionsGroup = new OptionGroup();\n\t\tOption bwaArgs = new Option(\"w\", \"bwa\", true, \"Arguments passed directly to BWA\");\n\t\tbwaArgs.setArgName(\"\\\"BWA arguments\\\"\");\n\n\t\tbwaOptionsGroup.addOption(bwaArgs);\n\n\t\tprivateOptions.addOptionGroup(bwaOptionsGroup);\n\n\t\t//Index\n\t\tOptionGroup indexGroup = new OptionGroup();\n\t\tOption index = new Option(\"i\", \"index\", true, \"Prefix for the index created by bwa to use - setIndexPath(string)\");\n\t\tindex.setArgName(\"Index prefix\");\n\t\tindex.setRequired(true);\n\n\t\tindexGroup.addOption(index);\n\n\t\tprivateOptions.addOptionGroup(indexGroup);\n\n\t\t//Partition number\n\t\tOptionGroup sparkGroup = new OptionGroup();\n\t\tOption partitions = new Option(\"n\", \"partitions\", true,\n\t\t\t\t\"Number of partitions to divide input - setPartitionNumber(int)\");\n\t\tpartitions.setArgName(\"Number of partitions\");\n\n\t\tsparkGroup.addOption(partitions);\n\n\t\tprivateOptions.addOptionGroup(sparkGroup);\n\n\n\t\tOptionGroup reducerGroup = new OptionGroup();\n\t\tOption reducer = new Option(\"r\", \"reducer\", false, \"The program is going to merge all the final results in a reducer phase\");\n\n\t\treducerGroup.addOption(reducer);\n\n\t\tprivateOptions.addOptionGroup(reducerGroup);\n\n\t\t/* OptionGroup sorting = new OptionGroup();\n\n\t\tOption hdfs = new Option(\"f\", \"hdfs\", false, \"The HDFS is used to perform the input FASTQ reads sort\");\n\t\tsorting.addOption(hdfs);\n\n\t\tOption spark = new Option(\"k\", \"spark\", false, \"the Spark engine is used to perform the input FASTQ reads sort\");\n\t\tsorting.addOption(spark);\n\n\t\tprivateOptions.addOptionGroup(sorting);\n\t\t*/\n\t\t// Help\n\t\tOptionGroup helpGroup = new OptionGroup();\n\t\tOption help = new Option(\"h\", \"help\", false, \"Shows this help\");\n\n\t\thelpGroup.addOption(help);\n\n\t\tprivateOptions.addOptionGroup(helpGroup);\n\n\t\treturn privateOptions;\n\t}", "public com.google.assistant.embedded.v1alpha1.ConverseConfig.Builder getConfigBuilder() {\n return getConfigFieldBuilder().getBuilder();\n }", "private void buildOtherParams() {\n\t\tmClient.putRequestParam(\"attrType\", \"1\");\r\n\t}", "public lanyotech.cn.park.protoc.CommonProtoc.PageHelper.Builder getPageHelperBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getPageHelperFieldBuilder().getBuilder();\n }", "public String getUrlCustomParameters() {\r\n return urlCustomParameters;\r\n }", "public speech.multilang.Params.ForwardingControllerParams.Builder getForwardingParamsBuilder() {\n bitField0_ |= 0x00000004;\n onChanged();\n return getForwardingParamsFieldBuilder().getBuilder();\n }", "public speech.multilang.Params.DecisionPointParams.Builder getDecisionPointParamsBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getDecisionPointParamsFieldBuilder().getBuilder();\n }", "private ListChooserParameters createListChooserParameters(String referenceID, boolean multiSelect, boolean showFilter, String title, String okText, String cancelText) {\n/*Generated! Do not modify!*/ ListChooserParameters parameters = new ListChooserParameters();\n/*Generated! Do not modify!*/ parameters.setReferenceID(referenceID);\n/*Generated! Do not modify!*/ parameters.setMultiSelect(multiSelect);\n/*Generated! Do not modify!*/ parameters.setShowFilter(showFilter);\n/*Generated! Do not modify!*/ parameters.setTitle(title);\n/*Generated! Do not modify!*/ parameters.setOkText(okText);\n/*Generated! Do not modify!*/ parameters.setCancelText(cancelText);\n/*Generated! Do not modify!*/ return parameters;\n/*Generated! Do not modify!*/ }", "public org.apache.calcite.avatica.proto.Common.Frame.Builder getFrameBuilder() {\n \n onChanged();\n return getFrameFieldBuilder().getBuilder();\n }", "private String buildPaginatorUrl( )\n {\n UrlItem url = new UrlItem( JSP_FORMS_MULTIVIEW );\n url.addParameter( FormsConstants.PARAMETER_CURRENT_SELECTED_PANEL, _strSelectedPanelTechnicalCode );\n\n return url.getUrl( );\n }", "void createFbOptInState(@Nullable Callback<ComapiResult<String>> callback);", "go.micro.runtime.RuntimeOuterClass.CreateOptionsOrBuilder getOptionsOrBuilder();", "private MediaPipeOptions(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<mediapipe.MediapipeOptions.MediaPipeOptions, ?> builder) {\n super(builder);\n }", "private Request build() {\n Request.Builder builder =\n new Request.Builder().cacheControl(new CacheControl.Builder().noCache().build());\n\n HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();\n for (Map.Entry<String, String> entry : queryParams.entrySet()) {\n urlBuilder = urlBuilder.addEncodedQueryParameter(entry.getKey(), entry.getValue());\n }\n builder = builder.url(urlBuilder.build());\n\n for (Map.Entry<String, String> entry : headers.entrySet()) {\n builder = builder.header(entry.getKey(), entry.getValue());\n }\n\n RequestBody body = (bodyBuilder == null) ? null : bodyBuilder.build();\n builder = builder.method(method.name(), body);\n\n return builder.build();\n }", "@Override\n\tpublic ContentValues BuildParams() {\n\t\tContentValues nContentValues = new ContentValues();\n\t\tnContentValues.put(\"cpn_ident\", mCouponNumber);\n\t\tif (mIsFastBy) {\n\t\t\tnContentValues.put(\"is_fastbuy\", \"1\");\n\t\t}\n\t\treturn nContentValues;\n\t}", "public static sparqles.avro.analytics.EPViewInteroperability.Builder newBuilder() {\n return new sparqles.avro.analytics.EPViewInteroperability.Builder();\n }", "public UnaryCallSettings.Builder<GetTableRequest, Table> getTableSettings() {\n return getTableSettings;\n }", "@Nullable\n/* */ public Options getOptions() {\n/* 67 */ return this.options;\n/* */ }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsPositionsCall(underlying, _callback);\n }", "public Builder() {\n mParams = new NavigateParams();\n }", "public Map<ChannelOption<?>, Object> getOptions()\r\n/* 39: */ {\r\n/* 40: 64 */ return getOptions(\r\n/* 41: 65 */ super.getOptions(), new ChannelOption[] { ChannelOption.SO_RCVBUF, ChannelOption.SO_SNDBUF, ChannelOption.TCP_NODELAY, ChannelOption.SO_KEEPALIVE, ChannelOption.SO_REUSEADDR, ChannelOption.SO_LINGER, ChannelOption.IP_TOS, ChannelOption.ALLOW_HALF_CLOSURE });\r\n/* 42: */ }", "private OfbizUrlBuilder(ControllerConfig config, WebSiteProperties webSiteProps, String servletPath, String contextPath) {\n this.config = config;\n this.webSiteProps = webSiteProps;\n // SCIPIO: 2018-08-01: this comes in with a trailing slash half the time, strip it here\n // because it complicates everything else for no reason...\n if (servletPath != null && servletPath.endsWith(\"/\")) {\n servletPath = servletPath.substring(0, servletPath.length() - 1);\n }\n this.servletPath = servletPath;\n this.contextPath = contextPath;\n }", "public com.google.analytics.data.v1beta.CohortReportSettings.Builder\n getCohortReportSettingsBuilder() {\n bitField0_ |= 0x00000004;\n onChanged();\n return getCohortReportSettingsFieldBuilder().getBuilder();\n }", "private GetPayHTMLS(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public JsonObject getPlotOptions() {\r\n JsonObject plotOptionsObject = Json.createObject(); // create a new object each time\r\n for (ShowOption showOption : ShowOption.values()) {\r\n plotOptionsObject.put(showOption.getShortName(), showOptions.get(showOption));\r\n }\r\n for (String optionKey : booleanOptions.keySet()) {\r\n Option <Boolean> option = booleanOptions.get(optionKey);\r\n plotOptionsObject.put(option.getName(), option.getValue());\r\n }\r\n for (String optionKey : stringOptions.keySet()) {\r\n Option <String> option = stringOptions.get(optionKey);\r\n plotOptionsObject.put(option.getName(), option.getValue());\r\n }\r\n return plotOptionsObject;\r\n }", "private GetReturnUrlC(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private PDFRenderOption createPDFRenderOption(String servletPath,\n\t\t\tHttpServletRequest request, int pageOverflow, boolean isDesigner,\n\t\t\tboolean isPDF)\n\t{\n\t\tString baseURL = null;\n\t\t// try to get base url from config file\n\t\tif (!isDesigner)\n\t\t\tbaseURL = ParameterAccessor.getBaseURL();\n\n\t\tif (baseURL == null)\n\t\t{\n\t\t\tif (ParameterAccessor.isOpenAsAttachment(request))\n\t\t\t{\n\t\t\t\tbaseURL = request.getScheme() + \"://\" //$NON-NLS-1$\n\t\t\t\t\t\t+ request.getServerName()\n\t\t\t\t\t\t+ \":\" //$NON-NLS-1$\n\t\t\t\t\t\t+ request.getServerPort();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbaseURL = \"\"; //$NON-NLS-1$\t\t\n\t\t\t}\n\t\t}\n\n\t\t// append application context path\n\t\tbaseURL += request.getContextPath();\n\n\t\tPDFRenderOption renderOption = new PDFRenderOption();\n\t\trenderOption.setBaseURL(baseURL);\n\t\tif (servletPath == null || servletPath.length() == 0)\n\t\t{\n\t\t\tservletPath = IBirtConstants.SERVLET_PATH_RUN;\n\t\t}\n\t\trenderOption.setOption(IBirtConstants.SERVLET_PATH, servletPath);\n\t\trenderOption.setSupportedImageFormats(isPDF ? \"PNG;GIF;JPG;BMP;SVG\" : \"PNG;GIF;JPG;BMP\"); //$NON-NLS-1$ //$NON-NLS-2$\n\n\t\t// page overflow setting\n\t\tswitch (pageOverflow)\n\t\t{\n\t\t\tcase IBirtConstants.PAGE_OVERFLOW_AUTO :\n\t\t\t\trenderOption.setOption(PDFRenderOption.PAGE_OVERFLOW,\n\t\t\t\t\t\tInteger.valueOf(PDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES));\n\t\t\t\tbreak;\n\t\t\tcase IBirtConstants.PAGE_OVERFLOW_ACTUAL :\n\t\t\t\trenderOption.setOption(PDFRenderOption.PAGE_OVERFLOW,\n\t\t\t\t\t\tInteger.valueOf(PDFRenderOption.ENLARGE_PAGE_SIZE));\n\t\t\t\tbreak;\n\t\t\tcase IBirtConstants.PAGE_OVERFLOW_FITTOPAGE :\n\t\t\t\trenderOption.setOption(PDFRenderOption.FIT_TO_PAGE,\n\t\t\t\t\t\tBoolean.TRUE);\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\trenderOption.setOption(PDFRenderOption.PAGE_OVERFLOW,\n\t\t\t\t\t\tInteger.valueOf(PDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES));\n\t\t}\n\n\t\t// pagebreak pagination only setting\n\t\t// Bug 238716\n\t\trenderOption.setOption(PDFRenderOption.PAGEBREAK_PAGINATION_ONLY,\n\t\t\t\tBoolean.FALSE);\n\n\t\treturn renderOption;\n\t}", "public ParametersInternalFrame() {\n initComponents();\n jLabel2.setText(MainFrame.sessionParams.getOrganization().getName());\n \n initData();\n }", "public lanyotech.cn.park.protoc.CommonProtoc.PageHelper.Builder getPageHelperBuilder() {\n bitField0_ |= 0x00000010;\n onChanged();\n return getPageHelperFieldBuilder().getBuilder();\n }", "public lanyotech.cn.park.protoc.CommonProtoc.PageHelper.Builder getPageHelperBuilder() {\n bitField0_ |= 0x00000008;\n onChanged();\n return getPageHelperFieldBuilder().getBuilder();\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsOrderBookCall(contract, interval, limit, withId, _callback);\n }", "public String buildFilter() {\n String qs = \"\";\n Set<Map.Entry<String, String>> set = instance.arguments.entrySet();\n\n for (Map.Entry<String, String> entry : set) {\n qs += entry.getKey() + \"=\" + entry.getValue() + \"&\";\n }\n return qs.substring(0, qs.length() - 1);\n }", "@Override\n\tpublic String[] getOptions() {\n\t\tVector<String> result = new Vector<String>();\n\n\t\tresult.add(\"-populationSize\");\n\t\tresult.add(\"\" + populationSize);\n\n\t\tresult.add(\"-initialMaxDepth\");\n\t\tresult.add(\"\" + maxDepth);\n\n\t\tCollections.addAll(result, super.getOptions());\n\n\t\treturn result.toArray(new String[result.size()]);\n\t}", "@SuppressLint(\"SetJavaScriptEnabled\")\n private void configureWebViewSettings() {\n WebSettings settings = getSettings();\n settings.setJavaScriptEnabled(true);\n settings.setAppCacheEnabled(true);\n settings.setDomStorageEnabled(true);\n settings.setBuiltInZoomControls(true);\n settings.setLoadWithOverviewMode(true);\n settings.setUseWideViewPort(true);\n settings.setSupportMultipleWindows(false); // to enable opening links which require opening a new tab\n settings.setLoadsImagesAutomatically(true);\n settings.setBuiltInZoomControls(true);\n }" ]
[ "0.5361675", "0.5323526", "0.5287617", "0.52759314", "0.52544653", "0.5202122", "0.5199247", "0.51340675", "0.50724036", "0.50382996", "0.49468756", "0.4924772", "0.49163136", "0.49051833", "0.48914874", "0.48848453", "0.48651993", "0.48396343", "0.48244593", "0.48004112", "0.4794529", "0.47568086", "0.47154918", "0.47109848", "0.46979976", "0.4689663", "0.46825728", "0.46774366", "0.46761832", "0.46720058", "0.4667452", "0.46485874", "0.4647503", "0.46332094", "0.46331903", "0.46174467", "0.46058023", "0.45994943", "0.45732313", "0.45585868", "0.45465127", "0.45435292", "0.4526072", "0.4523858", "0.4523665", "0.4522005", "0.4521893", "0.4521641", "0.45138216", "0.45117578", "0.45043924", "0.44973412", "0.44862938", "0.4479961", "0.44787368", "0.4473704", "0.44722575", "0.44720697", "0.44637603", "0.44566175", "0.4454619", "0.44509894", "0.44505328", "0.4449581", "0.4443058", "0.44383174", "0.4430257", "0.44151506", "0.43951625", "0.43909663", "0.43842497", "0.43800798", "0.4371565", "0.43711662", "0.43661085", "0.43611532", "0.43519515", "0.43487334", "0.4339867", "0.43357036", "0.43343756", "0.4322551", "0.43195134", "0.43175077", "0.43174696", "0.43145034", "0.43126342", "0.43119887", "0.43096521", "0.43027708", "0.43016067", "0.4299544", "0.42979282", "0.42956734", "0.4293629", "0.4287077", "0.42833567", "0.42815438", "0.42813566", "0.42807788" ]
0.5207378
5
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)"); } return getIframeOptionsCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "private Contract() {\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.6566565", "0.6497611", "0.64637333", "0.622235", "0.6210186", "0.6131018", "0.59923744", "0.58934605", "0.58661616", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142", "0.53970677", "0.53854465", "0.53708893", "0.535706", "0.53022665", "0.5297568", "0.5285573", "0.52775395", "0.5228783", "0.52161616", "0.5215486", "0.5205767", "0.5205767", "0.5199093", "0.51915133", "0.51328886", "0.5033789", "0.5029831", "0.5028553", "0.5016704", "0.50105745", "0.498703", "0.49869227", "0.49858847", "0.49840963", "0.4981568", "0.49711713", "0.49521965", "0.49504304", "0.4947746", "0.49310437", "0.49262455", "0.49186945", "0.48840562", "0.48525771", "0.4834332", "0.4834332", "0.4834332", "0.4834332", "0.48338956", "0.48318732", "0.48279566", "0.48160288", "0.4812081", "0.47995192", "0.47923365", "0.4781422", "0.47777963", "0.47646332", "0.47629628", "0.47589943", "0.4757054", "0.4750851", "0.47358122", "0.47310758", "0.4729941", "0.4721001", "0.47173005", "0.47168317", "0.47128192", "0.4699858", "0.4696607", "0.4694214", "0.4693992", "0.4684683", "0.4683533", "0.4683291", "0.46758085", "0.46754542", "0.4674884", "0.46742436", "0.46673056", "0.46622548", "0.466158", "0.46588138", "0.4658", "0.46564242", "0.46557775", "0.46517795", "0.46499386" ]
0.60290796
6
Build call for getOne
public Call getOneCall(String generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET(\"posts/1\")\n Call<Post> getPostOne();", "public void findOne( Map<String, ? extends Object> filter, final ObjectCallback<Qualification> callback){\n\n /**\n Call the onBefore event\n */\n callback.onBefore();\n\n\n //Definging hashMap for data conversion\n Map<String, Object> hashMapObject = new HashMap<>();\n //Now add the arguments...\n \n hashMapObject.put(\"filter\", filter);\n \n\n \n\n\n \n \n \n invokeStaticMethod(\"findOne\", hashMapObject, new Adapter.JsonObjectCallback() {\n \n @Override\n public void onError(Throwable t) {\n callback.onError(t);\n //Call the finally method..\n callback.onFinally();\n }\n\n @Override\n public void onSuccess(JSONObject response) {\n \n if(response != null){\n QualificationRepository qualificationRepo = getRestAdapter().createRepository(QualificationRepository.class);\n if(context != null){\n try {\n Method method = qualificationRepo.getClass().getMethod(\"addStorage\", Context.class);\n method.invoke(qualificationRepo, context);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n //qualificationRepo.addStorage(context);\n }\n Map<String, Object> result = Util.fromJson(response);\n Qualification qualification = qualificationRepo.createObject(result);\n\n //Add to database if persistent storage required..\n if(isSTORE_LOCALLY()){\n //http://stackoverflow.com/questions/160970/how-do-i-invoke-a-java-method-when-given-the-method-name-as-a-string\n try {\n Method method = qualification.getClass().getMethod(\"save__db\");\n method.invoke(qualification);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n }\n\n callback.onSuccess(qualification);\n }else{\n callback.onSuccess(null);\n }\n \n //Call the finally method..\n callback.onFinally();\n }\n });\n \n\n \n\n }", "RequesterVO get(int id);", "@GetMapping(value = \"/\")\n public ResultDTO getOneCall(@RequestHeader(value = \"X-Auth-Token\", required = false) String token,\n @RequestParam(defaultValue = \"36\") Double lat,\n @RequestParam(defaultValue = \"128\") Double lon) {\n Map result = weatherService.getOneCall(lat, lon);\n return new ResultDTO(1, \"\", result);\n }", "@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 }", "Corretor findOne(Long id);", "@GetMapping(\"/one/{id}\")\n\tpublic ResponseEntity<?> fetchOneData(@PathVariable(\"id\") Integer id) {\n\t\tResponseEntity<?> res = null;\n\t\ttry {\n\t\t\tEmployee emp = service.getOneEmpObject(id);\n\t\t\tres = new ResponseEntity<Employee>(emp, HttpStatus.OK);\n\t\t} catch (Exception e) {\n\t\t\tres = new ResponseEntity<String>(\"Unable Featch Data \", HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}", "public New getObject(long id);", "FetchFirst createFetchFirst();", "@GET(\"posts/1\")\n public Call<Post> getPost();", "public static Result readOne(Long id) throws JsonProcessingException, IOException {\n Thing thing = Thing.find.byId(id);\n if(thing == null){\n return notFound(\"No such Thing with id \" + id);\n }else{\n JsonNode json1 = mapper.readTree(thing.cachedJson);\n JsonNode json = mapper.valueToTree(thing);\n \n return ok(json1);\n }\n }", "@Override\n public MemberDTO findOne(@PathVariable(\"id\") Long id) {\n return MemberDTO.builder().build();\n }", "public interface ProfileService {\n\n @GET(\"/users/profile\")\n Call<Profile> getUserProfile(@Query(\"id\")String creatorId);\n\n\n}", "Object getSingleResult(View view, Settings settings);", "public Pojo.OneWord getById(String code){ \n Pojo.OneWord e=(Pojo.OneWord)template.get(Pojo.OneWord.class,code); \n return e; \n}", "java.lang.String getUserIdOne();", "@Override\r\n\tpublic Invigilate getOne(Integer no) {\n\t\treturn invigilateMapper.selectByPrimaryKey(no);\r\n\t}", "public DResult get(Get get, long startId) throws IOException;", "T get(ID id);", "@Override\n @Transactional(readOnly = true)\n public BuildingDTO findOne(Long id) {\n log.debug(\"Request to get Building : {}\", id);\n Building building = buildingRepository.findOne(id);\n return buildingMapper.toDto(building);\n }", "public abstract T findOne(int id);", "public Optional<E> one() {\n return Optional.ofNullable(queryOne());\n }", "@GET(\"user\")\n Call<User> getUser();", "public PhoneCall build() {\n return new PhoneCall(caller, callee, startTime, endTime);\n }", "public interface NearByInfoApi {\n @GET(\"home/get_single\")\n public Call<NearByInfo> getNearbyInfo(@QueryMap ArrayMap<String,String> params);\n}", "public SingleRequest<?> create() {\n return new SingleRequest<>();\n }", "@GetMapping(\"/project/{projectId}\")\n public Object doGet(@RequestParam(value = \"full\", defaultValue = \"false\") boolean full,\n @PathVariable(\"projectId\") Long projectId) throws InvalidIdentifierException {\n if(full)\n return service.fullInfo(projectId);\n else\n return service.getProjectById(projectId);\n }", "User getUser(User user) ;", "public interface ApiService {\n @GET(\"api/timelines/users/918753190470619136\")\n Call<HeadPOJO> pojoGetter();\n}", "T readOne(int id);", "ClientDTO findOne(final Long id);", "@Override\n @Transactional(readOnly = true)\n public Optional<OperationDTO> findOne(Long id) {\n log.debug(\"Request to get Operation : {}\", id);\n return operationRepository.findById(id)\n .map(operationMapper::toDto);\n }", "T getById(ID id);", "public void findById( String id, Map<String, ? extends Object> filter, final ObjectCallback<Qualification> callback){\n\n /**\n Call the onBefore event\n */\n callback.onBefore();\n\n\n //Definging hashMap for data conversion\n Map<String, Object> hashMapObject = new HashMap<>();\n //Now add the arguments...\n \n hashMapObject.put(\"id\", id);\n \n hashMapObject.put(\"filter\", filter);\n \n\n \n\n\n \n \n \n invokeStaticMethod(\"findById\", hashMapObject, new Adapter.JsonObjectCallback() {\n \n @Override\n public void onError(Throwable t) {\n callback.onError(t);\n //Call the finally method..\n callback.onFinally();\n }\n\n @Override\n public void onSuccess(JSONObject response) {\n \n if(response != null){\n QualificationRepository qualificationRepo = getRestAdapter().createRepository(QualificationRepository.class);\n if(context != null){\n try {\n Method method = qualificationRepo.getClass().getMethod(\"addStorage\", Context.class);\n method.invoke(qualificationRepo, context);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n //qualificationRepo.addStorage(context);\n }\n Map<String, Object> result = Util.fromJson(response);\n Qualification qualification = qualificationRepo.createObject(result);\n\n //Add to database if persistent storage required..\n if(isSTORE_LOCALLY()){\n //http://stackoverflow.com/questions/160970/how-do-i-invoke-a-java-method-when-given-the-method-name-as-a-string\n try {\n Method method = qualification.getClass().getMethod(\"save__db\");\n method.invoke(qualification);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n }\n\n callback.onSuccess(qualification);\n }else{\n callback.onSuccess(null);\n }\n \n //Call the finally method..\n callback.onFinally();\n }\n });\n \n\n \n\n }", "@Override\n\tpublic T queryFirstObj(QueryBuilder mQueryBuilder) {\n\t\tmQueryBuilder.limitIndex = 1;\n\t\tmQueryBuilder.offsetIndex = 0;\n\t\tList<T> list = queryObjs(mQueryBuilder);\n\t\tif (list.size() > 0) {\n\t\t\treturn list.get(0);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic <T> T findOne(Map<String, CustmerCriteria> params, Class<T> t) throws Exception {\n\t\treturn null;\n\t}", "Optional<CriterionDocumentMasterDTO> findOne(Long id);", "@Override\n\tpublic ResponseEntity<?> findOne(Long id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Setting queryone() {\n\t\treturn SettingMapper.queryone();\n\t}", "@Override\n\tpublic T queryJoinFirstObj(QueryBuilder mQueryBuilder) {\n\t\tmQueryBuilder.limitIndex = 1;\n\t\tmQueryBuilder.offsetIndex = 0;\n\t\tList<T> list = queryJoinObjs(mQueryBuilder);\n\t\tif (list.size() > 0) {\n\t\t\treturn list.get(0);\n\t\t}\n\t\treturn null;\n\t}", "Optional<RequestOtherNiazsanjiDTO> findOne(Long id);", "public ApiPersonDTO getPerson(ApiWrapperSingle<ApiPersonDTO> wrapper, OptionsId options) {\n SqlScalars sqlScalars = generateSqlForPerson(options);\n List<ApiPersonDTO> results = executeQueryWithTransform(ApiPersonDTO.class, sqlScalars, wrapper);\n \n ApiPersonDTO person = null;\n if (CollectionUtils.isNotEmpty(results)) {\n person = results.get(0);\n \n if (options.hasDataItem(DataItem.ARTWORK)) {\n LOG.info(\"Adding photo for '{}'\", person.getName());\n // Add the artwork\n Set<String> artworkRequired = Collections.singleton(ArtworkType.PHOTO.toString());\n Map<Long, List<ApiArtworkDTO>> artworkList = getArtworkForMetadata(PERSON, person.getId(), artworkRequired, options.getArtworksortdir());\n if (artworkList.containsKey(options.getId())) {\n LOG.info(\"Found {} artworks\", artworkList.get(options.getId()).size());\n person.setArtwork(artworkList.get(options.getId()));\n } else {\n LOG.info(\"No artwork found for person ID {}\", options.getId());\n }\n }\n\n if (options.hasDataItem(DataItem.EXTERNALID)) {\n LOG.trace(\"Adding external IDs for ID {}\", options.getId());\n person.setExternalIds(getExternalIdsForMetadata(PERSON, options.getId()));\n }\n\n if (options.hasDataItem(DataItem.FILMOGRAPHY_INSIDE)) {\n LOG.info(\"Adding filmograpghy inside for '{}'\", person.getName());\n person.setFilmography(getPersonFilmographyInside(person.getId(), options));\n } else if (options.hasDataItem(DataItem.FILMOGRAPHY_SCANNED)) {\n LOG.info(\"Adding filmograpghy scanned for '{}'\", person.getName());\n person.setFilmography(getPersonFilmographyScanned(person.getId(), options));\n }\n }\n return person;\n }", "public Image getOne();", "@Override\n\tpublic BoardVO getOne(BoardVO boardVO) throws Exception {\n\t\treturn qnaMapper.getOne(boardVO);\n\t}", "@Override //所有id\n\tpublic PoInfo querryById(String poinid) throws Exception {\n\t\treturn (PoInfo) dao.findForObject(\"PoInfoMapper.querryById\", poinid);\n\t}", "@Test\n void getByIdSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n System.out.println(\"Result\" + result);\n\n if (result != null) {\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, result);\n\n TestEntity entity = optionalEntity.orElse(null);\n\n if (entity != null) {\n Assertions.assertEquals(result, entity.getId());\n Assertions.assertNotNull(result);\n } else {\n Assertions.fail();\n }\n } else {\n Assertions.fail();\n }\n }", "CommunityDTO findOne(Long id);", "Request<UserInfoDetailsProxy> findUserInfoDetails(Long id);", "default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }", "ProviderCommandRequest findOne(Long id);", "Request<UserInfoDetailsProxy> findDetailsFromUser(Long id);", "@Test\n\tpublic void testFindCustomerByGuidWithOneReturn() {\n\t\tfinal List<Customer> customers = new ArrayList<Customer>();\n\t\tCustomer customer = new CustomerImpl();\n\t\tcustomers.add(customer);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(customers));\n\t\t\t}\n\t\t});\n\t\tassertSame(customer, importGuidHelper.findCustomerByGuid(SOME_GUID));\n\t}", "@Transactional(propagation = Propagation.MANDATORY)\n\tpublic default E getOne(K id) {\n\t\treturn getRepository().getOne(id);\n\t}", "public GetBuilder get() {\n return new GetBuilder(this);\n }", "@Override\n public ProjectproductDTO findOne(String id) {\n log.debug(\"Request to get Projectproduct : {}\", id);\n Projectproduct projectproduct = projectproductRepository.findOne(UUID.fromString(id));\n ProjectproductDTO projectproductDTO = projectproductMapper.projectproductToProjectproductDTO(projectproduct);\n return projectproductDTO;\n }", "@Override\n public AlunoDTO findOne(String id) {\n log.debug(\"Request to get Aluno : {}\", id);\n Aluno aluno = alunoRepository.findOne(id);\n return alunoMapper.toDto(aluno);\n }", "@Override\n\tpublic Map<String, Object> findOne(Long arg0) {\n\t\treturn null;\n\t}", "@Override\n\tpublic HelloEntity findOne() {\n\t\tLong id = 1L;\n\t\tHelloEntity entity = entityManager.find(HelloEntity.class, id);\n\t\tSystem.out.println(\"findOne: \" + entity.getName());\n\t\treturn null;\n\t}", "SdkPhone selectOne(SdkPhoneExample example);", "@Test\n public void test_get_2() throws Exception {\n User user1 = createUser(1, true);\n\n User res = instance.get(user1.getId());\n\n assertNull(\"'get' should be correct.\", res);\n }", "@RestAPI\n \t@PreAuthorize(\"hasAnyRole('A')\")\n \t@RequestMapping(value = \"/api/{id}\", method = RequestMethod.GET)\n \tpublic HttpEntity<String> getOne(@PathVariable(\"id\") Long id) {\n \t\treturn toJsonHttpEntity(agentManagerService.getOne(id));\n \t}", "PeopleDTO findOne(Long id);", "private Answer<BdmDocument> getFindOneAnswer(String id) {\n\t\treturn invocation -> {\n\t\t\tAssert.assertEquals(id, invocation.getArguments()[0]);\n\t\t\treturn new BdmDocument(this.getTestBdm());\n\t\t};\n\t}", "BaseResponse getDetail(long holidayID, int companyID);", "public String get(Object requestor, String field, int type,\n String defaultString, Object param1);", "public abstract RequestMappingInfo build();", "@GET(\"/api\")\n Call<PersonQuery> getPerson(\n @Query(\"results\") int results,\n @Nullable @Query(\"gender\") String gender,\n @Nullable @Query(\"seed\") String seed,\n @Nullable @Query(\"nat\") String nationality,\n @Nullable @Query(\"page\") String page\n );", "@GetMapping(path = \"/{operatorId}\", produces = \"application/hal+json\")\n @ApiOperation(value = \"Retrieves an existing operator entity identified by its id if it's available for the requesting entity.\", produces = \"application/hal+json\")\n @ApiResponses({@ApiResponse(code = 200, message = \"Success!\"),\n @ApiResponse(code = 401, message = \"Not authorized to access the operator!\"),\n @ApiResponse(code = 404, message = \"OPerator or requesting user not found!\")})\n public ResponseEntity<EntityModel<Operator>> one(\n @RequestHeader(\"X-MBP-Access-Request\") String accessRequestHeader,\n @PathVariable(\"operatorId\") String operatorId,\n @ApiParam(value = \"Page parameters\", required = true) Pageable pageable) throws EntityNotFoundException, MissingPermissionException {\n Operator operator = userEntityService.getForIdWithAccessControlCheck(operatorRepository, operatorId, ACAccessType.READ, ACAccessRequest.valueOf(accessRequestHeader));\n return ResponseEntity.ok(userEntityService.entityToEntityModel(operator));\n }", "@Override\n @Transactional(readOnly = true)\n public ProductDTO findOne(Long id) {\n log.debug(\"Request to get Product : {}\", id);\n Product product = productRepository.findOneWithEagerRelationships(id);\n return productMapper.toDto(product);\n }", "@Transactional(readOnly = true)\n public Optional<NextOfKinDTO> findOne(Long id) {\n log.debug(\"Request to get NextOfKin : {}\", id);\n return nextOfKinRepository.findById(id)\n .map(nextOfKinMapper::toDto);\n }", "@Test\n public void queryWithOneInnerQueryCreate() throws IOException {\n BaseFuseClient fuseClient = new BaseFuseClient(\"http://localhost:8888/fuse\");\n //query request\n CreateQueryRequest request = new CreateQueryRequest();\n request.setId(\"1\");\n request.setName(\"test\");\n request.setQuery(Q1());\n //submit query\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .body(request)\n .post(\"/fuse/query\")\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1/cursor\"));\n assertEquals(1,queryResourceInfo.getInnerUrlResourceInfos().size());\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(201)\n .contentType(\"application/json;charset=UTF-8\");\n\n //get query resource by id\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .get(\"/fuse/query/\"+request.getId()+\"->\"+Q2().getName())\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(200)\n .contentType(\"application/json;charset=UTF-8\");\n\n\n }", "public Request<E, T> buildHttpGet ()\n\t{\n\t\treturn new HttpGetRequest<E,T>(this);\n\t}", "@Override\n\tpublic MemberVO selectOne(String id) {\n\t\treturn dao.selectOne(id);\n\t}", "@Override\n @Transactional(readOnly = true)\n public Optional<Mock> findOne(Long id) {\n log.debug(\"Request to get Mock : {}\", id);\n return mockRepository.findById(id);\n }", "public Karton findOne(Integer id) {\n\t\treturn kartonRepository.findById(id).orElseGet(null);\n\t}", "public interface DeveloperRepository extends JpaRepository<DeveloperInfo, Long> {\n\n Optional<DeveloperInfo> findOneById(Long id);\n\n Optional<DeveloperInfo> findOneByName(String name);\n\n}", "@Override\n @Transactional(readOnly = true)\n public CostoDTO findOne(Long id) {\n log.debug(\"Request to get Costo : {}\", id);\n Costo costo = costoRepository.findOne(id);\n return costoMapper.toDto(costo);\n }", "@ApiMethod(name = \"getJoke\")\n public JokeTeller getJoke() throws NotFoundException{\n return new JokeTeller();\n\n\n }", "public String get(Object requestor, String field, String defaultString,\n Object param1);", "@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}", "private Request findRecord(String mDeviceId) {\n return ofy().load().type(Request.class).id(mDeviceId).now();\n//or return ofy().load().type(Request.class).filter(\"id\",id).first.now();\n }", "@Headers({\n \"Content-Type:application/json; charset=utf-8\"\n })\n @GET(\"entity/applications/{meIdentifier}\")\n Call<Application> getSingleApplication(\n @Path(\"meIdentifier\") String meIdentifier\n );", "public String get(Class requestor, String field, int type,\n String defaultString, Object param1);", "@GET(\"device\")\n Call<DevicesResponse> getDevice();", "BaacDTO findOne(Long id);", "public String get(Object requestor, String field, int type,\n String defaultString, Object param1, Object param2);", "User getOne(String username) throws NotFoundException;", "public static Object wrapMessage(Object message) {\n\n Object msg = message;\n int messageId = 0;\n\n // If we specify message id from OneMessageWrapper then use it.\n // Otherwise just use a message id of 0. Ease of use on server.\n if (message instanceof OneMessageWrapper) {\n OneMessageWrapper wrapper = (OneMessageWrapper) message;\n msg = wrapper.getData();\n messageId = wrapper.getMessageId();\n }\n\n OneMessage.Builder builder = OneMessage.newBuilder().setMessageId(messageId);\n\n if (msg instanceof FindGameRoomsRequest) {\n return builder.setType(OneMessage.Type.FIND_GAME_ROOMS_REQUEST)\n .setFindGameRoomsRequest((FindGameRoomsRequest) msg).build();\n } else if (msg instanceof FindGameRoomsResponse) {\n return builder.setType(OneMessage.Type.FIND_GAME_ROOMS_RESPONSE)\n .setFindGameRoomsResponse((FindGameRoomsResponse) msg).build();\n } else if (msg instanceof FindGamesRequest) {\n return builder.setType(OneMessage.Type.FIND_GAMES_REQUEST).setFindGamesRequest((FindGamesRequest) msg)\n .build();\n } else if (msg instanceof FindGamesResponse) {\n return builder.setType(OneMessage.Type.FIND_GAMES_RESPONSE).setFindGamesResponse((FindGamesResponse) msg)\n .build();\n } else if (msg instanceof JoinGameRequest) {\n return builder.setType(OneMessage.Type.JOIN_GAME_REQUEST).setJoinGameRequest((JoinGameRequest) msg).build();\n } else if (msg instanceof JoinGameResponse) {\n return builder.setType(OneMessage.Type.JOIN_GAME_RESPONSE).setJoinGameResponse((JoinGameResponse) msg)\n .build();\n } else if (msg instanceof StartGameRequest) {\n return builder.setType(OneMessage.Type.START_GAME_REQUEST).setStartGameRequest((StartGameRequest) msg)\n .build();\n } else if (msg instanceof LoginRequest) {\n return builder.setType(OneMessage.Type.LOGIN_REQUEST).setLoginRequest((LoginRequest) msg).build();\n } else if (msg instanceof SignupRequest) {\n return builder.setType(OneMessage.Type.SIGNUP_REQUEST).setSignupRequest((SignupRequest) msg).build();\n } else if (msg instanceof GenericResponse) {\n return builder.setType(OneMessage.Type.GENERIC_RESPONSE).setGenericResponse((GenericResponse) msg).build();\n } else if (msg instanceof ResetPasswordRequest) {\n return builder.setType(OneMessage.Type.RESET_PASSWORD_REQUEST)\n .setResetPasswordRequest((ResetPasswordRequest) msg).build();\n } else if (msg instanceof LoginResponse) {\n return builder.setType(OneMessage.Type.LOGIN_RESPONSE).setLoginResponse((LoginResponse) msg).build();\n } else if (msg instanceof PlayCardRequest) {\n return builder.setType(OneMessage.Type.PLAY_CARD_REQUEST).setPlayCardRequest((PlayCardRequest) msg).build();\n } else if (msg instanceof GameEndedResponse) {\n return builder.setType(OneMessage.Type.GAME_ENDED_RESPONSE).setGameEndedResponse((GameEndedResponse) msg)\n .build();\n } else if (msg instanceof RoundEndedResponse) {\n return builder.setType(OneMessage.Type.ROUND_ENDED_RESPONSE)\n .setRoundEndedResponse((RoundEndedResponse) msg).build();\n } else if (msg instanceof RoundStartedResponse) {\n return builder.setType(OneMessage.Type.ROUND_STARTED_RESPONSE)\n .setRoundStartedResponse((RoundStartedResponse) msg).build();\n } else if (msg instanceof TrickEndedResponse) {\n return builder.setType(OneMessage.Type.TRICK_ENDED_RESPONSE)\n .setTrickEndedResponse((TrickEndedResponse) msg).build();\n } else if (msg instanceof ScoreUpdateResponse) {\n return builder.setType(OneMessage.Type.SCORE_UPDATE_RESPONSE)\n .setScoreUpdateResponse((ScoreUpdateResponse) msg).build();\n } else if (msg instanceof PlaySingleCardResponse) {\n return builder.setType(OneMessage.Type.PLAY_SINGLE_CARD_RESPONSE)\n .setPlaySingleCardResponse((PlaySingleCardResponse) msg).build();\n } else if (msg instanceof PassCardsResponse) {\n return builder.setType(OneMessage.Type.PASS_CARDS_RESPONSE).setPassCardsResponse((PassCardsResponse) msg)\n .build();\n } else if (msg instanceof ReplacePlayerResponse) {\n return builder.setType(OneMessage.Type.REPLACE_PLAYER_RESPONSE)\n .setReplacePlayerResponse((ReplacePlayerResponse) msg).build();\n } else {\n return null;\n }\n }", "InternalResultsResponse<Person> fetchPersonByFancyRequest(PersonFancyRequest personRequest);", "public UserTO getUser (String id);", "@Override\n public Object build() {\n TopHitsAggregationBuilder topHitsBuilder = AggregationBuilders.topHits(this.getName());\n\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"size\":\n topHitsBuilder.size((int)param.getValue());\n break;\n\n case \"fetch_source\":\n topHitsBuilder.fetchSource((boolean)param.getValue());\n break;\n }\n }\n\n return topHitsBuilder;\n }", "public String get(Class requestor, String field, String defaultString,\n Object param1);", "public E queryOne() {\n limit(2);\n List<E> result = queryList();\n if (result.size() != 1) {\n return null;\n } else {\n return result.get(0);\n }\n }", "@Override\n\tpublic Pe getPeByPeID(String peID) {\n\t\tPe pe = new Pe();\n\t\tpe.setPeId(peID);\n\t\tpe.setPeLifecycle(-1);\n\t\tpe.setPeState(-1);\n\t\tpe.setPeTime(-1);\n\t\tList<Map<String,Object>> queryList = peDao.query(pe, 0, 20);\n\t\tif (queryList.size() <= 1){\n\t\t\tif (queryList.size() == 1){\n\t\t\t\tMap<String,Object> resultMap = queryList.get(0);\n\t\t\t\tPe resultPe = new Pe();\n\t\t\t\tresultPe.setPeId(resultMap.containsKey(\"pe_id\") ? (String)resultMap.get(\"pe_id\") : null);\n\t\t\t\tresultPe.setPeName(resultMap.containsKey(\"pe_name\") ? (String)resultMap.get(\"pe_name\") : null);\n\t\t\t\tresultPe.setPeOwner(resultMap.containsKey(\"pe_owner\") ? (String)resultMap.get(\"pe_owner\") : null);\n\t\t\t\tresultPe.setPeUser(resultMap.containsKey(\"pe_user\") ? (String)resultMap.get(\"pe_user\") : null);\n\t\t\t\tresultPe.setPePictureUrl(resultMap.containsKey(\"pe_picture_url\") ? (String)resultMap.get(\"pe_picture_url\") : null);\n\t\t\t\tresultPe.setPeKey(resultMap.containsKey(\"pe_key\") ? (String)resultMap.get(\"pe_key\") : null);\n\t\t\t\tresultPe.setPeState(resultMap.containsKey(\"pe_state\") ? (Integer)resultMap.get(\"pe_state\") : -1);\n\t\t\t\tresultPe.setPeGeolocationId(resultMap.containsKey(\"pe_geolocation_id\") ? (String)resultMap.get(\"pe_geolocation_id\") : null);\n\t\t\t\tresultPe.setPeLifecycle(resultMap.containsKey(\"pe_lifecycle\") ? (Integer)resultMap.get(\"pe_lifecycle\") : -1);\n\t\t\t\tresultPe.setPeLastTime(resultMap.containsKey(\"pe_lastTime\") ? (Date)resultMap.get(\"pe_lastTime\") : null);\n\t\t\t\tresultPe.setPeTime(resultMap.containsKey(\"pe_time\") ? (Integer)resultMap.get(\"pe_time\") : -1);\n\t\t\t\tresultPe.setTemplateId(resultMap.containsKey(\"template_id\") ? (String)resultMap.get(\"template_id\") : null);\n\t\t\t\treturn resultPe;\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlogger.info(\"ERROR: Pe Not Found! \");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tlogger.info(\"ERROR: Repeated PE! \");\n\t\t\treturn null;\n\t\t}\n\t}", "public abstract Optional<Object> getByID(@PathVariable(\"id\") int id);", "User getOne(long id) throws NotFoundException;", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "private GetProperty(Builder builder) {\n super(builder);\n }", "T findOne(I id);", "@Override\n public Optional<BuyerDTO> findOne(String id) {\n log.debug(\"Request to get Buyer : {}\", id);\n return buyerRepository.findById(id)\n .map(buyerMapper::toDto);\n }" ]
[ "0.5732716", "0.5385678", "0.5295763", "0.5262861", "0.5205434", "0.51412994", "0.51323473", "0.5101934", "0.50917923", "0.5088846", "0.5088407", "0.5077867", "0.50525445", "0.5044491", "0.5028488", "0.50109506", "0.4983623", "0.4980046", "0.4974865", "0.49643946", "0.49466628", "0.49242672", "0.49087483", "0.4891279", "0.4870348", "0.48608595", "0.4851025", "0.4841338", "0.48314458", "0.48226446", "0.4818071", "0.48161298", "0.4814027", "0.48085397", "0.47980818", "0.47967646", "0.4795802", "0.4794029", "0.47922787", "0.47893703", "0.47835165", "0.47725132", "0.47587812", "0.47546774", "0.4748883", "0.47395772", "0.4739332", "0.47320384", "0.47314975", "0.4729903", "0.4728587", "0.47276822", "0.47253883", "0.4725312", "0.47172186", "0.4711629", "0.47047493", "0.46934173", "0.46920392", "0.4691662", "0.46895844", "0.46884823", "0.4688223", "0.46813515", "0.46807376", "0.46671292", "0.4666454", "0.46660632", "0.46619383", "0.46617335", "0.4659667", "0.46587318", "0.46566278", "0.46556875", "0.46550035", "0.46534705", "0.46522135", "0.46517587", "0.4645364", "0.46445915", "0.46445915", "0.464287", "0.46420422", "0.46402368", "0.46369648", "0.4636469", "0.46325374", "0.46321705", "0.4630832", "0.46286014", "0.46258044", "0.4625495", "0.46230143", "0.46226913", "0.4620535", "0.4620069", "0.46169135", "0.46152785", "0.46125892", "0.46118307", "0.46113914" ]
0.0
-1
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getOneValidateBeforeCall(String generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getOne(Async)"); } return getOneCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "private Contract() {\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.65667087", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.5991647", "0.58935875", "0.5867352", "0.57154477", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.54083145", "0.53983784", "0.538685", "0.5372101", "0.535575", "0.53002197", "0.5298278", "0.5284535", "0.5277213", "0.5228654", "0.5213922", "0.5213851", "0.5203466", "0.5203466", "0.5198705", "0.51919657", "0.5132997", "0.503143", "0.5030267", "0.502797", "0.5015527", "0.5008133", "0.49868008", "0.49842298", "0.49836314", "0.49824694", "0.49804395", "0.4969242", "0.4950973", "0.49493062", "0.49471316", "0.4928483", "0.49245524", "0.49162278", "0.4885365", "0.48522398", "0.4833596", "0.48331168", "0.48331168", "0.48331168", "0.48331168", "0.4830747", "0.4827253", "0.48129195", "0.48126492", "0.4799318", "0.4791708", "0.47801298", "0.4777395", "0.47646844", "0.47614396", "0.47599468", "0.47580373", "0.47508353", "0.47382933", "0.4732828", "0.47288087", "0.47212544", "0.4717133", "0.47137868", "0.47108936", "0.46979916", "0.46949527", "0.46938235", "0.469239", "0.46847698", "0.46842527", "0.46841192", "0.46748438", "0.46745366", "0.46736524", "0.46714628", "0.46679446", "0.4660473", "0.46603698", "0.46579075", "0.4655875", "0.4655484", "0.46554628", "0.46510994", "0.46478415" ]
0.6498893
1
Build call for getThirdPartyConfiguration
public Call getThirdPartyConfigurationCall(String generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/ThirdPartyConfiguration" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract CONFIG build();", "@NonNull\n\t\tConfig build();", "BuildClient createBuildClient();", "Builder useBuildDistribution();", "@Test\n public void testBuildDefer() throws Exception {\n mockHttpClient = mock(OptimizelyHttpClient.class);\n\n projectConfigManager = builder()\n .withOptimizelyHttpClient(mockHttpClient)\n .withSdkKey(\"sdk-key\")\n .build(true);\n assertEquals(\"sdk-key\", projectConfigManager.getSDKKey());\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "UpdateOperationConfiguration build();", "GradleBuild create();", "GeneralConfiguration getGeneralConfiguration();", "public ClientConfiguration getClientConfiguration(TargetModuleID id);", "ProjectConfiguration getProjectConfiguration();", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "public RelyingPartyConfiguration getRelyingPartyConfiguration(String relyingPartyEntityID);", "protected void enhanceConfig(ConfigurationBuilder c) {\n }", "public SSLConfig build()\n {\n return new SSLConfig(\n isClient, verifyMode, this.caPath, this.certPath, this.keyPath);\n }", "public RelyingPartyConfiguration getDefaultRelyingPartyConfiguration();", "Builder useInstallation(File gradleHome);", "public Configuration.Builder getClientIdAndClientSecretBuilder() {\n String clientId = \"0993a005480472a69fab10c2f9b8ad0d6bee7acf\";//getString(R.string.client_id);\n String clientSecret=\"oVsWjoQ2RHeHvZ8xK3yrtdHrG7YiN+rnHh4qqBfmscDbCwplTFzytAoVIVrXMnAQShuBYuA6fZftYL+AIvX5zRP8JXOs06dQcej1yeL/ACJSGuiKoQJbqdC6CELuP+Pl\";\n\n String codeGrantRedirectUri = \"deva://robokart\";\n Configuration.Builder configBuilder =\n new Configuration.Builder(clientId, clientSecret, SCOPE, null,\n null);\n configBuilder.setCacheDirectory(this.getCacheDir())\n .setUserAgentString(getUserAgentString(this))\n // Used for oauth flow\n .setCodeGrantRedirectUri(codeGrantRedirectUri);\n\n return configBuilder;\n }", "Pair<T, U> build(ConfigurationSourceProvider provider, String path) throws IOException, ConfigurationException;", "public com.google.assistant.embedded.v1alpha1.ConverseConfig.Builder getConfigBuilder() {\n return getConfigFieldBuilder().getBuilder();\n }", "C getConfiguration();", "public com.google.protobuf.Any.Builder getConfigurationBuilder() {\n \n onChanged();\n return getConfigurationFieldBuilder().getBuilder();\n }", "public DerivedFeatureConfig.Builder getConfigBuilder() {\n \n onChanged();\n return getConfigFieldBuilder().getBuilder();\n }", "public interface ConfigurationHolder {\n\n /**\n * Gets OpenAPI Gateway host.\n *\n * @return the OpenAPI Gateway host.\n */\n public String getGatewayHost();\n\n /**\n * Gets the App ID.\n *\n * @return the App ID.\n */\n public String getAppId();\n\n /**\n * Gets the merchant number.\n *\n * @return the merchant number.\n */\n public String getMerchantNo();\n\n /**\n * Gets the message format.\n *\n * @return the message format.\n */\n public default String getFormat() {\n return Constants.FORMAT_JSON;\n }\n\n /**\n * Gets the message charset.\n *\n * @return the message charset.\n */\n public default String getCharset() {\n return Constants.CHARSET_UTF8;\n }\n\n /**\n * Gets the API version number.\n *\n * @return the API version number.\n */\n public default String getVersion() {\n return Constants.VERSION_1;\n }\n\n /**\n * Gets the language.\n *\n * @return the language.\n */\n public Language getLanguage();\n\n /**\n * Gets the signature type.\n *\n * @return the signature type.\n */\n public SignType getSignType();\n\n /**\n * Gets the public key (used by RSA only).\n *\n * @return the public key.\n */\n public String getPublicKey();\n\n /**\n * Gets the private key.\n *\n * @return the private key.\n */\n public String getPrivateKey();\n\n /**\n * Gets whether the client supports partial payment.\n * This feature is only available for Snaplii payment.\n *\n * @return true if the client supports partial payment, or false otherwise.\n */\n public boolean isPartialPaymentSupported();\n\n /**\n * Gets the prefix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number prefix.\n */\n public String getAlternativeOrderNumberPrefix();\n\n /**\n * Gets the suffix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number suffix.\n */\n public String getAlternativeOrderNumberSuffix();\n\n /**\n * Gets the connection timeout setting.\n *\n * @return connection timeout in seconds.\n */\n public int getConnectionTimeout();\n\n /**\n * Gets the read timeout setting.\n *\n * @return read timeout in seconds.\n */\n public int getReadTimeout();\n\n /**\n * Validates the configuration.\n *\n * @throws OpenApiConfigurationExcepiton if any configuration is missing.\n */\n public default void validate() throws OpenApiConfigurationExcepiton {\n if (StringUtils.isEmpty(getGatewayHost())) {\n throw new OpenApiConfigurationExcepiton(\"Gateway host is not configured\");\n }\n if (StringUtils.isEmpty(getAppId())) {\n throw new OpenApiConfigurationExcepiton(\"App ID is not configured\");\n }\n if (StringUtils.isEmpty(getMerchantNo())) {\n throw new OpenApiConfigurationExcepiton(\"Merchant number is not configured\");\n }\n if (StringUtils.isEmpty(getFormat())) {\n throw new OpenApiConfigurationExcepiton(\"Format is not configured\");\n }\n if (StringUtils.isEmpty(getCharset())) {\n throw new OpenApiConfigurationExcepiton(\"Charset is not configured\");\n }\n if (getLanguage() == null) {\n throw new OpenApiConfigurationExcepiton(\"Language is not configured\");\n }\n if (getSignType() == null) {\n throw new OpenApiConfigurationExcepiton(\"Signature type is not configured\");\n }\n if (StringUtils.isEmpty(getPrivateKey())) {\n throw new OpenApiConfigurationExcepiton(\"Private key is not configured\");\n }\n if (SignType.RSA == getSignType() && StringUtils.isEmpty(getPublicKey())) {\n throw new OpenApiConfigurationExcepiton(\"Public key is not configured\");\n }\n if (getConnectionTimeout() <= 0 || getConnectionTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Connection timeout needs to be between 1 and 60\");\n }\n if (getReadTimeout() <= 0 || getReadTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Read timeout needs to be between 1 and 60\");\n }\n }\n\n}", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "public com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder getConfigBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getConfigFieldBuilder().getBuilder();\n }", "public com.google.api.servicemanagement.v1.ConfigSource.Builder getConfigSourceBuilder() {\n \n onChanged();\n return getConfigSourceFieldBuilder().getBuilder();\n }", "public io.dstore.values.BooleanValue.Builder getImportConfigurationBuilder() {\n \n onChanged();\n return getImportConfigurationFieldBuilder().getBuilder();\n }", "protected T getConfigurationByCascading() {\n\t\t\n\t\tList<T> configurationObjectList = new ArrayList<T>();\n\t\t\n\t\t// Add the configuration objects in the order they should override \n\t\t// each other. Command line options override property file information\n\t\t// which in turn override any default configuration objects that may\n\t\t// have been given.\n\t\t//\n\t\tconfigurationObjectList.add (getConfigurationByCommandline());\n\t\tconfigurationObjectList.addAll (getConfigurationByProperties(this.propertyFile));\n\t\tconfigurationObjectList.addAll (configurationObjects);\n\t\t\n\t\tInvocationHandler handler = new ConfigurationByCascading<T>(configurationObjectList);\n\n\t\t@SuppressWarnings(\"unchecked\")\t\t\n\t\tT configuration = (T)\n\t\t\tjava.lang.reflect.Proxy.newProxyInstance(\n\t\t\t\tthis.configurationInterface.getClassLoader(),\n\t\t\t\tnew Class[] { this.configurationInterface },\n\t\t\t\thandler\n\t\t);\n\n\t\treturn configuration;\n\t}", "public interface ApplicationRuntimeConfigurationBuilder\n{\n Repository createRepositoryFromModel( Configuration configuration, CRepository repoConf )\n throws ConfigurationException;\n\n void releaseRepository( Repository repository, Configuration configuration, CRepository repoConf )\n throws ConfigurationException;\n}", "Builder useDistribution(URI gradleDistribution);", "public IProjectConfiguration getConfiguration()\n {\n return new ProjectConfiguration(mProject, mCheckConfigs, mFileSets, mFilters,\n mUseSimpleConfig);\n }", "default Pair<T, U> build(File file) throws IOException, ConfigurationException {\n return build(new FileConfigurationSourceProvider(), file.toString());\n }", "public void buildTwitterBaseConfiguration() {\n ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();\n configurationBuilder\n .setOAuthConsumerKey(getBaseContext().getString(R.string.consumer_key))\n .setOAuthConsumerSecret(getBaseContext().getString(R.string.consumer_secret))\n .setOAuthAccessToken(getBaseContext().getString(R.string.access_token))\n .setOAuthAccessTokenSecret(getBaseContext().getString(R.string.access_token_secret));\n\n Configuration configuration = configurationBuilder.build();\n\n twitterStreamFactory = new TwitterStreamFactory(configuration);\n }", "Pair<T, U> build() throws IOException, ConfigurationException;", "public interface RelyingPartyConfigurationManager {\n\n /**\n * Gets the configuration for the given relying party.\n * \n * @param relyingPartyEntityID the entity of the relying part to get the configuration for\n * \n * @return configuration for the given relying party\n */\n public RelyingPartyConfiguration getRelyingPartyConfiguration(String relyingPartyEntityID);\n\n /**\n * Gets the registered relying party configurations indexed by relying party ID.\n * \n * @return the registered relying party configurations\n */\n public Map<String, RelyingPartyConfiguration> getRelyingPartyConfigurations();\n\n /**\n * Gets the default relying party configuration.\n * \n * @return the default relying party configuration\n */\n public RelyingPartyConfiguration getDefaultRelyingPartyConfiguration();\n\n /**\n * Gets the relying party configuration to use for anonymous parties.\n * \n * @return the relying party configuration to use for anonymous parties\n */\n public RelyingPartyConfiguration getAnonymousRelyingConfiguration();\n}", "@Configuration\n public Option[] configuration() {\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.sling\", \"org.apache.sling.distribution.core\");\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.sling\", \"org.apache.sling.distribution.api\");\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.jackrabbit.vault\",\"org.apache.jackrabbit.vault\");\n return new Option[]{\n baseConfiguration(),\n slingQuickstart(),\n logback(),\n // build artifact\n slingDistribution(),\n // testing\n defaultOsgiConfigs(),\n SlingOptions.webconsole(),\n CoreOptions.mavenBundle(\"org.apache.felix\", \"org.apache.felix.webconsole.plugins.ds\", \"2.0.8\"),\n junitBundles()\n };\n }", "CustomerServiceProviderConfiguration getConfiguration(String serviceProviderId);", "@Override\n public Iterable<ConfigSource> getConfigSources(final ConfigSourceContext context,\n final KubernetesClientBuildConfig config) {\n boolean trustAll = getImplicitConverter(Boolean.class)\n .convert(context.getValue(\"quarkus.tls.trust-all\").getValue());\n TlsConfig tlsConfig = new TlsConfig();\n tlsConfig.trustAll = trustAll;\n KubernetesClient client = KubernetesClientUtils.createClient(config, tlsConfig);\n return new KubernetesConfigSourceFactory(client).getConfigSources(context);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "java.lang.Object setupBuild(java.util.Map properties) throws org.apache.ant.common.util.ExecutionException;", "TransportLayerAttributes getConfig();", "public IotdmSimpleConfig build() {\n return new IotdmSimpleConfig(this.builder.build());\n }", "CdapInternalApplicationConfiguration createCdapInternalApplicationConfiguration();", "@Configuration\n public Option[] config() {\n String pathToTestClass = ServiceOneBundleTest.class.getClassLoader().getResource(\".\").getPath();\n String[] pathParts = pathToTestClass.split(\"OsgiBundleTest\");\n StringBuilder pathToBundle = new StringBuilder(pathParts[0]);\n pathToBundle.append(\"ServiceOneModule/target/ServiceOneModule-1.0-SNAPSHOT.jar\");\n return CoreOptions.options(\n mavenBundle(\"com.google.guava\", \"guava\", \"13.0.1\").startLevel(30),\n bundle(new File(pathToBundle.toString()).toURI().toString()),\n junitBundles()\n );\n }", "@Override\n\tpublic void configure() throws CoreException {\n\t\t// associate this builder with the project\n\t\tPTJavaFileBuilder.addBuilderToProject(fProject);\n\t\t\n\t\t// issue order to rebuild project\n\t\tnew Job(\"PTJava File Build\") {\n\t\t\tprotected IStatus run(IProgressMonitor monitor) {\n\t\t\t\ttry {\n\t\t\t\t\t// invoke a full build\n\t\t\t\t\tfProject.build(\n\t\t\t\t\t\t\tPTJavaFileBuilder.FULL_BUILD,\n\t\t\t\t\t\t\tPTJavaFileBuilder.BUILDER_ID,\n\t\t\t\t\t\t\tnull, monitor);\n\t\t\t\t}\n\t\t\t\tcatch (CoreException exception) {\n\t\t\t\t\tPTJavaLog.logError(exception);\n\t\t\t\t}\n\t\t\t\treturn Status.OK_STATUS;\n\t\t\t}\n\t\t}.schedule();\n\t}", "Observable<CustomerServiceProviderConfiguration> getConfigurationAsync(String serviceProviderId);", "@Override\n\tpublic void loadExtraConfigs(Configuration config)\n\t{\n\n\t}", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "public StandardTransactionConfig build() {\n Preconditions.checkArgument(null != timestamp || null != timestampProvider);\n\n return new StandardTransactionConfig(metricsPrefix,\n timestampProvider, timestamp, customOptions);\n }", "@Override\n public boolean hasAdditionalConfig() { return true; }", "@Test\n public void testWebConfiguration() throws Exception {\n WebClient wc = j.createWebClient();\n {\n FreeStyleProject p = j.createFreeStyleProject();\n p.getBuildersList().add(CopyArtifactUtil.createCopyArtifact(\n \"${upstream}\",\n \"\",\n new TriggeredBuildSelector(true, TriggeredBuildSelector.UpstreamFilterStrategy.UseOldest, false),\n \"\",\n \"\",\n false,\n false, \n false\n ));\n p.save();\n \n j.submit(wc.getPage(p, \"configure\").getFormByName(\"config\"));\n \n p = j.jenkins.getItemByFullName(p.getFullName(), FreeStyleProject.class);\n assertNotNull(p);\n \n CopyArtifact copyArtifact = p.getBuildersList().get(CopyArtifact.class);\n assertNotNull(p);\n \n assertNotNull(copyArtifact.getBuildSelector());\n assertEquals(TriggeredBuildSelector.class, copyArtifact.getBuildSelector().getClass());\n \n TriggeredBuildSelector selector = (TriggeredBuildSelector)copyArtifact.getBuildSelector();\n \n assertTrue(selector.isFallbackToLastSuccessful());\n assertEquals(TriggeredBuildSelector.UpstreamFilterStrategy.UseOldest, selector.getUpstreamFilterStrategy());\n }\n \n {\n FreeStyleProject p = j.createFreeStyleProject();\n p.getBuildersList().add(CopyArtifactUtil.createCopyArtifact(\n \"${upstream}\",\n \"\",\n new TriggeredBuildSelector(false, TriggeredBuildSelector.UpstreamFilterStrategy.UseNewest, false),\n \"\",\n \"\",\n false,\n false, \n false\n ));\n p.save();\n \n j.submit(wc.getPage(p, \"configure\").getFormByName(\"config\"));\n \n p = j.jenkins.getItemByFullName(p.getFullName(), FreeStyleProject.class);\n assertNotNull(p);\n \n CopyArtifact copyArtifact = p.getBuildersList().get(CopyArtifact.class);\n assertNotNull(p);\n \n assertNotNull(copyArtifact.getBuildSelector());\n assertEquals(TriggeredBuildSelector.class, copyArtifact.getBuildSelector().getClass());\n \n TriggeredBuildSelector selector = (TriggeredBuildSelector)copyArtifact.getBuildSelector();\n \n assertFalse(selector.isFallbackToLastSuccessful());\n assertEquals(TriggeredBuildSelector.UpstreamFilterStrategy.UseNewest, selector.getUpstreamFilterStrategy());\n }\n \n {\n FreeStyleProject p = j.createFreeStyleProject();\n p.getBuildersList().add(CopyArtifactUtil.createCopyArtifact(\n \"${upstream}\",\n \"\",\n new TriggeredBuildSelector(true, TriggeredBuildSelector.UpstreamFilterStrategy.UseGlobalSetting, false),\n \"\",\n \"\",\n false,\n false, \n false\n ));\n p.save();\n \n j.submit(wc.getPage(p, \"configure\").getFormByName(\"config\"));\n \n p = j.jenkins.getItemByFullName(p.getFullName(), FreeStyleProject.class);\n assertNotNull(p);\n \n CopyArtifact copyArtifact = p.getBuildersList().get(CopyArtifact.class);\n assertNotNull(p);\n \n assertNotNull(copyArtifact.getBuildSelector());\n assertEquals(TriggeredBuildSelector.class, copyArtifact.getBuildSelector().getClass());\n \n TriggeredBuildSelector selector = (TriggeredBuildSelector)copyArtifact.getBuildSelector();\n \n assertTrue(selector.isFallbackToLastSuccessful());\n assertEquals(TriggeredBuildSelector.UpstreamFilterStrategy.UseGlobalSetting, selector.getUpstreamFilterStrategy());\n }\n }", "protected void additionalConfig(ConfigType config){}", "ImportConfig createImportConfig();", "public C build() {\n if (configs.isEmpty()) {\n throw new RuntimeException(\"There should be at least one configuration provided\");\n }\n\n // Handling config files\n ConfigSource firstConfigSource = configs.get(0);\n Config firstConfigOrig = getConfigSupplier(firstConfigSource).getConfig();\n if (!(supportedConfig.isInstance(firstConfigOrig))) {\n throw new RuntimeException(\n String.format(\n \"Config is not of parameterized type %s, got instead %s\",\n supportedConfig.getName(), firstConfigOrig.getClass().getName()));\n }\n C firstConfig = (C) firstConfigOrig;\n for (int i = 1; i < configs.size(); ++i) {\n ConfigSource nextConfigSource = configs.get(i);\n Config nextConfig = getConfigSupplier(nextConfigSource).getConfig();\n try {\n firstConfig = copyProperties(firstConfig, nextConfig);\n } catch (Exception ex) {\n throw new RuntimeException(\n String.format(\"Failed to merge config %s into main config\", nextConfigSource), ex);\n }\n }\n\n // Handling string pathValue pairs config overrides\n for (Pair<String, Object> pathValue : pathValueOverrides) {\n try {\n PropertyUtils.setNestedProperty(firstConfig, pathValue.getValue0(), pathValue.getValue1());\n } catch (Exception e) {\n throw new RuntimeException(\n String.format(\n \"Cannot override property %s with value %s\",\n pathValue.getValue0(), pathValue.getValue1()),\n e);\n }\n }\n\n return firstConfig;\n }", "public abstract String getConfig();", "public abstract Configuration configuration();", "@Override\n public void setupConfiguration(Configuration config)\n {\n\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "protected void buildBootstrap() {\n String command = \"-prod -mac -o2 rom -strip:d j2me imp\";\n if (includeDebugger) {\n command += \" debugger\";\n }\n command += \" -- translator\";\n builder(command);\n }", "Lighter build();", "public MicroConfiguration() {\n this(\n System.getProperty(\"piranha.version\", MicroConfiguration.class.getPackage().getImplementationVersion()),\n System.getProperty(\"piranha.extensions\", \"micro-core,micro\"),\n System.getProperty(\"piranha.dependencies\", \"\"),\n System.getProperty(\"piranha.repositories\", \"https://repo1.maven.org/maven2\"),\n Boolean.valueOf(System.getProperty(\"piranha.offline\", \"false\")),\n Integer.valueOf(System.getProperty(\"piranha.port\", \"8080\")),\n System.getProperty(\"piranha.root\"),\n System.getProperty(\"piranha.http.server\", \"impl\"),\n\n\n null,\n null,\n null);\n }", "@Config.LoadPolicy(Config.LoadType.MERGE)\[email protected]({\n \"system:properties\",\n \"classpath:application.properties\"\n})\npublic interface ProjectConfig extends Config {\n\n @Key(\"app.hostname\")\n String hostname();\n\n @Key(\"browser.name\")\n @DefaultValue(\"chrome\")\n String browser();\n\n}", "public Parameters getConfigParameters();", "public Config getConfig();", "PackageConfiguration getPackageConfiguration();", "void configure();", "@Incubating\npublic interface GradleBuild {\n /**\n * Builds a new Gradle composite participant.\n */\n @Incubating\n interface Builder {\n\n /**\n * Sets the root project directory for this Gradle Build.\n *\n * @param projectDir root project directory.\n * @return this\n */\n Builder forProjectDirectory(File projectDir);\n\n /**\n * Specifies the Gradle distribution described in the build should be used.\n *\n * @return this\n */\n Builder useBuildDistribution();\n\n /**\n * Specifies the Gradle distribution to use.\n *\n * @param gradleHome The Gradle installation directory.\n * @return this\n */\n Builder useInstallation(File gradleHome);\n\n /**\n * Specifies the version of Gradle to use.\n *\n * @param gradleVersion The version to use.\n * @return this\n */\n Builder useGradleVersion(String gradleVersion);\n\n /**\n * Specifies the Gradle distribution to use.\n *\n * @param gradleDistribution The distribution to use.\n *\n * @return this\n */\n Builder useDistribution(URI gradleDistribution);\n\n /**\n * Creates an immutable GradleBuild instance based on this builder.\n *\n * @return a new instance, never null.\n */\n GradleBuild create();\n }\n\n /**\n * Build Identity to be used to correlate results.\n *\n * @return this build's identity, never null\n */\n BuildIdentity toBuildIdentity();\n\n /**\n * Project Identity to be used to correlate results.\n *\n * @param projectPath path to project in a Gradle build (e.g., :foo:bar)\n * @return identity for a project in this build with the given path\n */\n ProjectIdentity toProjectIdentity(String projectPath);\n}", "public Map<String, RelyingPartyConfiguration> getRelyingPartyConfigurations();", "@Override\n\tpublic boolean hasExtraConfigs()\n\t{\n\t\treturn false;\n\t}", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@java.lang.Override\n public com.google.protobuf.AnyOrBuilder getConfigurationOrBuilder() {\n return getConfiguration();\n }", "public Function<Config, ConfigFilter> build() {\n return (c) -> new ValueResolvingFilter(failOnMissingReference);\n }", "Builder useGradleVersion(String gradleVersion);", "public Call addThirdPartyConfigurationCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/ThirdPartyConfiguration\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "GradoopFlinkConfig getConfig();", "@SuppressWarnings(\"unused\")\n @Provides\n @Singleton\n private ExpressiveObjectsConfigurationBuilder providesConfigurationBuilder() {\n return expressiveObjectsConfigurationBuilder;\n }", "void subprojects(Action<? super ProjectPluginDependenciesSpec> configuration);", "static Configuration loadConfiguration(File pluginConfig) throws Exception {\n Properties props = new Properties();\n try (FileInputStream input = new FileInputStream(pluginConfig)) {\n props.load(input);\n }\n\n boolean trustAllHttps = BooleanUtils.toBoolean(props.getProperty(\"trust.all.https\", \"false\"));\n HttpClient client = new HttpClient(trustAllHttps);\n\n List<String> stageEndpoints = new ArrayList<>();\n List<String> agentEndpoints = new ArrayList<>();\n\n Enumeration<?> names = props.propertyNames();\n while (names.hasMoreElements()) {\n String name = (String) names.nextElement();\n if (name.startsWith(\"stage.status.endpoint.\")) {\n stageEndpoints.add(props.getProperty(name));\n } else if (name.startsWith(\"agent.status.endpoint.\")) {\n agentEndpoints.add(props.getProperty(name));\n }\n }\n\n LOGGER.info(String.format(\"Loaded webhook configuration from %s\", pluginConfig.getAbsolutePath()));\n return new Configuration(client, stageEndpoints, agentEndpoints);\n }", "private Configuration getAuth() {\r\n final ConfigurationBuilder cb = new ConfigurationBuilder();\r\n cb.setOAuthConsumerKey(\"n2g9XOjAr9p44yJwFjXUbeUa2\");\r\n cb.setOAuthConsumerSecret(\"57FHkBBptp17yBGl1v853lldZO9Kh4osJnDQqQEcXd4d9C3xFA\");\r\n cb.setOAuthAccessToken(\"113906448-2fx9njfJgzQrGdnRaGchI9GlZTzLMXrayEzFk2ju\");\r\n cb.setOAuthAccessTokenSecret(\"FJOqMt7dtBp1yuW2VnQDfzksa7IS5h3IxxsJ1ixBGI1ny\");\r\n \r\n return cb.build();\r\n }", "public abstract Optional<FileConfiguration> getConfiguration(String name);", "private String generateConfigurationString() {\n\t\tStringBuilder configuration = new StringBuilder();\n\t\tconfigurationHolder.entrySet().stream().forEach(line -> {\n\t\t\tconfiguration.append(line.getKey()+\"=\"+line.getValue()+\"\\n\");\n\t\t});\n\t\treturn configuration.toString();\n\t}", "public abstract ICMakeBuildElement createBuildProperties(Path path);", "private OptimoveConfig() {\n }", "private ProjectConfigurationFactory()\n {}", "@Nullable\n @Override\n public ModuleWizardStep getCustomOptionsStep(WizardContext context, Disposable parentDisposable) {\n\n final DlangModuleBuilder moduleBuilder = this;\n return new ProjectJdkForModuleStep(context, DlangSdkType.getInstance()) {\n public void updateDataModel() {\n super.updateDataModel();\n moduleBuilder.setModuleJdk(getJdk());\n }\n };\n }", "static Properties getConfig()\n {\n return(config);\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.assistant.embedded.v1alpha1.ConverseConfig, com.google.assistant.embedded.v1alpha1.ConverseConfig.Builder, com.google.assistant.embedded.v1alpha1.ConverseConfigOrBuilder> \n getConfigFieldBuilder() {\n if (configBuilder_ == null) {\n if (!(converseRequestCase_ == 1)) {\n converseRequest_ = com.google.assistant.embedded.v1alpha1.ConverseConfig.getDefaultInstance();\n }\n configBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.google.assistant.embedded.v1alpha1.ConverseConfig, com.google.assistant.embedded.v1alpha1.ConverseConfig.Builder, com.google.assistant.embedded.v1alpha1.ConverseConfigOrBuilder>(\n (com.google.assistant.embedded.v1alpha1.ConverseConfig) converseRequest_,\n getParentForChildren(),\n isClean());\n converseRequest_ = null;\n }\n converseRequestCase_ = 1;\n onChanged();;\n return configBuilder_;\n }", "public IConfigurationElement getDependencyGeneratorElement();", "private static ChainedProperties getChainedProperties() {\n return new ChainedProperties(\"packagebuilder.conf\", BRMSPackageBuilder.class.getClassLoader(), // pass this as it searches currentThread anyway\n false);\n }", "public TwilioWrapperLibrary buildLibrary()\n {\n return new TwilioWrapperLibrary( this.twilio_account_sid, this.twilio_account_token, this.thinQ_id, this.thinQ_token);\n }", "ServiceConfig getServiceConfig();", "ServiceConfig getServiceConfig();", "public RelyingPartyConfiguration getAnonymousRelyingConfiguration();", "public ConfigData(FileConfiguration CoreConfig, FileConfiguration outConfig) {\n\t\t// core configuration is configuration that is Global.\n\t\t// we try to avoid these now. Normally the primary interest is the\n\t\t// GriefPrevention.WorldConfigFolder setting.\n\t\tString DefaultConfigFolder = DataStore.dataLayerFolderPath + File.separator + \"WorldConfigs\" + File.separator;\n\t\tString DefaultTemplateFile = DefaultConfigFolder + \"_template.cfg\";\n\t\t// Configurable template file.\n\t\tTemplateFile = CoreConfig.getString(\"GriefPrevention.WorldConfig.TemplateFile\", DefaultTemplateFile);\n\t\tif (!(new File(TemplateFile).exists())) {\n\t\t\tTemplateFile = DefaultTemplateFile;\n\n\t\t}\n this.GlobalClaims = CoreConfig.getBoolean(\"GriefPrevention.GlobalClaimsEnabled\",true);\n this.GlobalPVP = CoreConfig.getBoolean(\"GriefPrevention.GlobalPVPEnabled\",true);\n this.GlobalSiege = CoreConfig.getBoolean(\"GriefPrevention.GlobalSiegeEnabled\",true);\n this.GlobalSpam = CoreConfig.getBoolean(\"GriefPrevention.GlobalSpamEnabled\",true);\n this.AllowAutomaticMigration = CoreConfig.getBoolean(\"GriefPrevention.AllowAutomaticMigration\",true);\n outConfig.set(\"GriefPrevention.GlobalClaimsEnabled\",GlobalClaims);\n outConfig.set(\"GriefPrevention.GlobalPVPEnabled\",GlobalPVP);\n outConfig.set(\"GriefPrevention.GlobalSiegeEnabled\",GlobalSiege);\n outConfig.set(\"GriefPrevention.GlobalSpamEnabled\",GlobalSpam);\n outConfig.set(\"GriefPrevention.AllowAutomaticMigration\",AllowAutomaticMigration);\n this.DisabledGPCommands = CoreConfig.getStringList(\"GriefPrevention.DisabledCommands\");\n outConfig.set(\"GriefPrevention.DisabledCommands\",DisabledGPCommands);\n\n\n\t\tString SingleConfig = CoreConfig.getString(\"GriefPrevention.WorldConfig.SingleWorld\", NoneSpecifier);\n\t\tSingleWorldConfigLocation = SingleConfig;\n\t\tif (!SingleConfig.equals(NoneSpecifier) && new File(SingleConfig).exists()) {\n\t\t\tGriefPrevention.AddLogEntry(\"SingleWorld Configuration Mode Enabled. File \\\"\" + SingleConfig + \"\\\" will be used for all worlds.\");\n\t\t\tYamlConfiguration SingleReadConfig = YamlConfiguration.loadConfiguration(new File(SingleConfig));\n\t\t\tYamlConfiguration SingleTargetConfig = new YamlConfiguration();\n\t\t\tthis.SingleWorldConfig = new WorldConfig(\"Single World\", SingleReadConfig, SingleTargetConfig);\n\t\t\ttry {\n\t\t\t\tSingleTargetConfig.save(SingleConfig);\n\t\t\t} catch (IOException exx) {\n\t\t\t}\n\t\t}\n\t\tthis.SiegeCooldownSeconds = CoreConfig.getInt(\"GriefPrevention.Siege.CooldownTime\",1000 * 60 * 60);\n outConfig.set(\"GriefPrevention.Siege.CooldownTime\",SiegeCooldownSeconds);\n\t\toutConfig.set(\"GriefPrevention.WorldConfig.SingleWorld\", SingleConfig);\n\t\toutConfig.set(\"GriefPrevention.WorldConfig.TemplateFile\", TemplateFile);\n\t\t// check for appropriate configuration in given FileConfiguration. Note\n\t\t// we also save out this configuration information.\n\t\t// configurable World Configuration folder.\n\t\t// save the configuration.\n\n\t\tWorldConfigLocation = CoreConfig.getString(\"GriefPrevention.WorldConfigFolder\");\n\t\tif (WorldConfigLocation == null || WorldConfigLocation.length() == 0) {\n\t\t\tWorldConfigLocation = DefaultConfigFolder;\n\t\t}\n\t\tFile ConfigLocation = new File(WorldConfigLocation);\n\t\tif (!ConfigLocation.exists()) {\n\t\t\t// if not found, create the directory.\n\t\t\tGriefPrevention.instance.getLogger().log(Level.INFO, \"mkdirs() on \" + ConfigLocation.getAbsolutePath());\n\t\t\tConfigLocation.mkdirs();\n\n\t\t}\n\n\t\t/*\n\t\t * GriefPrevention.instance.getLogger().log(Level.INFO,\n\t\t * \"Reading WorldConfigurations from \" +\n\t\t * ConfigLocation.getAbsolutePath()); if(ConfigLocation.exists() &&\n\t\t * ConfigLocation.isDirectory()){ for(File lookfile:\n\t\t * ConfigLocation.listFiles()){ //System.out.println(lookfile);\n\t\t * if(lookfile.isFile()){ String Extension =\n\t\t * lookfile.getName().substring(lookfile.getName().indexOf('.')+1);\n\t\t * String baseName = Extension.length()==0? lookfile.getName():\n\t\t * lookfile.\n\t\t * getName().substring(0,lookfile.getName().length()-Extension.length\n\t\t * ()-1); if(baseName.startsWith(\"_\")) continue; //configs starting with\n\t\t * underscore are templates. Normally just _template.cfg. //if baseName\n\t\t * is an existing world... if(Bukkit.getWorld(baseName)!=null){\n\t\t * GriefPrevention.instance.getLogger().log(Level.INFO, \"World \" +\n\t\t * baseName + \" Configuration found.\"); } //read it in...\n\t\t * GriefPrevention.AddLogEntry(lookfile.getAbsolutePath());\n\t\t * FileConfiguration Source = YamlConfiguration.loadConfiguration(new\n\t\t * File(lookfile.getAbsolutePath())); FileConfiguration Target = new\n\t\t * YamlConfiguration(); //load in the WorldConfig... WorldConfig wc =\n\t\t * new WorldConfig(baseName,Source,Target); try { Target.save(lookfile);\n\t\t * \n\t\t * }catch(IOException iex){\n\t\t * GriefPrevention.instance.getLogger().log(Level.SEVERE,\n\t\t * \"Failed to save to \" + lookfile.getAbsolutePath()); }\n\t\t * \n\t\t * \n\t\t * } }\n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * } else if(ConfigLocation.exists() && ConfigLocation.isFile()){\n\t\t * GriefPrevention.instance.getLogger().log(Level.SEVERE,\n\t\t * \"World Configuration Folder found, but it's a File. Double-check your GriefPrevention configuration files, and try again.\"\n\t\t * );\n\t\t * \n\t\t * }\n\t\t */\n\n\t}", "private void initConfig() {\n Path walletPath;\n Wallet wallet;\n\n // load a CCP\n Path networkConfigPath; \n \n try {\n \t\n \tif (!isLoadFile) {\n // Load a file system based wallet for managing identities.\n walletPath = Paths.get(\"wallet\");\n wallet = Wallet.createFileSystemWallet(walletPath);\n\n // load a CCP\n networkConfigPath = Paths.get(\"\", \"..\", \"basic-network\", configFile);\n \n builder = Gateway.createBuilder();\n \n \tbuilder.identity(wallet, userId).networkConfig(networkConfigPath).discovery(false);\n \t\n \tisLoadFile = true;\n \t}\n } catch (Exception e) {\n \te.printStackTrace();\n \tthrow new RuntimeException(e);\n }\n\t}" ]
[ "0.62715715", "0.5725215", "0.5662215", "0.55921054", "0.55784315", "0.5423352", "0.5406038", "0.5330892", "0.53265715", "0.5232222", "0.5218665", "0.5212837", "0.51906675", "0.51731855", "0.51336443", "0.5072051", "0.5043713", "0.5023472", "0.50229883", "0.50165564", "0.5011801", "0.5003223", "0.49829766", "0.49745077", "0.4971601", "0.4971601", "0.4971601", "0.4971601", "0.49653044", "0.49538198", "0.49497747", "0.49349177", "0.49278015", "0.49110577", "0.48801062", "0.4876798", "0.48453575", "0.4837629", "0.48347852", "0.48340392", "0.48325297", "0.48281246", "0.481436", "0.4814197", "0.48111925", "0.47993118", "0.47820672", "0.47401056", "0.47366804", "0.47300732", "0.4722306", "0.471773", "0.4717676", "0.4706141", "0.47026885", "0.46934676", "0.4691377", "0.46698624", "0.46655166", "0.4663364", "0.4662953", "0.4651744", "0.46427584", "0.46360675", "0.46354797", "0.46326756", "0.46307245", "0.46124265", "0.46107826", "0.46101385", "0.46049684", "0.45987377", "0.45925355", "0.45764846", "0.45737448", "0.4561645", "0.45580468", "0.45538634", "0.45489973", "0.45484826", "0.45398864", "0.45368853", "0.4534991", "0.45243964", "0.45232162", "0.45226452", "0.45224652", "0.45202017", "0.45184213", "0.45015997", "0.45006904", "0.44994202", "0.44926193", "0.4484406", "0.4478152", "0.44726843", "0.44726843", "0.44668025", "0.446633", "0.44612882" ]
0.46527225
61
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)"); } return getThirdPartyConfigurationCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "private Contract() {\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.6566565", "0.6497611", "0.64637333", "0.622235", "0.6210186", "0.6131018", "0.60290796", "0.59923744", "0.58934605", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142", "0.53970677", "0.53854465", "0.53708893", "0.535706", "0.53022665", "0.5297568", "0.5285573", "0.52775395", "0.5228783", "0.52161616", "0.5215486", "0.5205767", "0.5205767", "0.5199093", "0.51915133", "0.51328886", "0.5033789", "0.5029831", "0.5028553", "0.5016704", "0.50105745", "0.498703", "0.49869227", "0.49858847", "0.49840963", "0.4981568", "0.49711713", "0.49521965", "0.49504304", "0.4947746", "0.49310437", "0.49262455", "0.49186945", "0.48840562", "0.48525771", "0.4834332", "0.4834332", "0.4834332", "0.4834332", "0.48338956", "0.48318732", "0.48279566", "0.48160288", "0.4812081", "0.47995192", "0.47923365", "0.4781422", "0.47777963", "0.47646332", "0.47629628", "0.47589943", "0.4757054", "0.4750851", "0.47358122", "0.47310758", "0.4729941", "0.4721001", "0.47173005", "0.47168317", "0.47128192", "0.4699858", "0.4696607", "0.4694214", "0.4693992", "0.4684683", "0.4683533", "0.4683291", "0.46758085", "0.46754542", "0.4674884", "0.46742436", "0.46673056", "0.46622548", "0.466158", "0.46588138", "0.4658", "0.46564242", "0.46557775", "0.46517795", "0.46499386" ]
0.58661616
9
Build call for getTransferBalance
public Call getTransferBalanceCall(ProductInstanceID generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/transferBalance" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;", "public BaseJson<BigDecimal> wallet_balance() throws Exception {\n String s = main(\"wallet_balance\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, BaseJson.class);\n }", "@Override\r\n\tpublic TransferAmountResponseDto transfer(TransferAmountRequestDto transferAmountRequestDto) {\r\n\t\tlog.info(\"inside transaction service\");\r\n\r\n\t\tTransferAmountResponseDto transferAmountResponseDto = new TransferAmountResponseDto();\r\n\r\n\t\tTransaction debitTransaction = new Transaction();\r\n\t\tTransaction creditTransaction = new Transaction();\r\n\r\n\t\tAccount fromAccount = accountRepository.findByCustomerId(transferAmountRequestDto.getCustomerId());\r\n\t\tAccount toAccount = accountRepository.findByAccountNumber(transferAmountRequestDto.getCreditTo());\r\n\r\n\t\tif (fromAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (toAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getAccountNumber().equalsIgnoreCase(toAccount.getAccountNumber())) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_ACCOUNT);\r\n\t\t}\r\n\r\n\t\tBeneficiary existBeneficiary = beneficiaryRepository.findByCustomerAccountNumberAndBeneficiaryAccountNumber(\r\n\t\t\t\tfromAccount.getAccountNumber(), toAccount.getAccountNumber());\r\n\r\n\t\tif (existBeneficiary == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.NOT_BENEFICIARY);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getBalance() < transferAmountRequestDto.getTransferAmount()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_AMOUNT);\r\n\t\t}\r\n\r\n\t\tif (transferAmountRequestDto.getTransferAmount() <= 0) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.MINIMUM_AMOUNT);\r\n\t\t}\r\n\r\n\t\tdebitTransaction.setAccountNumber(fromAccount.getAccountNumber());\r\n\t\tdebitTransaction.setTransactionType(\"debit\");\r\n\t\tdebitTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tdebitTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tdebitTransaction.setAccount(fromAccount);\r\n\r\n\t\tcreditTransaction.setAccountNumber(toAccount.getAccountNumber());\r\n\t\tcreditTransaction.setTransactionType(\"credit\");\r\n\t\tcreditTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tcreditTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tcreditTransaction.setAccount(toAccount);\r\n\r\n\t\tdouble remainingBalance = fromAccount.getBalance() - transferAmountRequestDto.getTransferAmount();\r\n\t\tdouble updatedBalance = toAccount.getBalance() + transferAmountRequestDto.getTransferAmount();\r\n\r\n\t\tfromAccount.setBalance(remainingBalance);\r\n\t\ttoAccount.setBalance(updatedBalance);\r\n\r\n\t\taccountRepository.save(fromAccount);\r\n\r\n\t\tTransaction transaction = transactionRepository.save(debitTransaction);\r\n\t\tif (transaction.getTransactionId() == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.TRANSACTION_FAILED);\r\n\t\t}\r\n\t\taccountRepository.save(toAccount);\r\n\r\n\t\ttransactionRepository.save(creditTransaction);\r\n\r\n\t\ttransferAmountResponseDto.setMessage(\"Amount Transferred successfully..\");\r\n\t\ttransferAmountResponseDto.setTransactionId(transaction.getTransactionId());\r\n\t\ttransferAmountResponseDto.setStatusCode(201);\r\n\t\treturn transferAmountResponseDto;\r\n\t}", "public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "double getBalance();", "double getBalance();", "public Money getTotalBalance();", "public RemoteCall<BigInteger> balanceOf(String account) {\n final Function function = new Function(FUNC_BALANCEOF,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(account)),\n Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));\n return executeRemoteCallSingleValueReturn(function, BigInteger.class);\n }", "public void transferMoney(float amount, String transferToNumber) {}", "BigDecimal getSumOfTransactionsRest(TransferQuery query);", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listMyOptionsTradesCall(underlying, contract, limit, offset, from, to, _callback);\n }", "public String getBalanceInfo(String request,String user);", "@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}", "public String balance() {\n\t\treturn this.apiCall(\"balance\", \"\", \"\", true);\n\t}", "private double getBalance() { return balance; }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "private void transferToBankAccount() {\n ArrayList<Coin> selectedCoins;\n String collection;\n mGoldAmount = 0.0;\n mBankTransferTotal = 0;\n\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n selectedCoins = getSelectedCoins(Data.COLLECTED);\n collection = Data.COLLECTED;\n // Impose 25 coin limit\n if (selectedCoins.size() > (25 - Data.getCollectedTransferred())) {\n displayToast(getString(R.string.msg_25_coin_limit));\n return;\n }\n } else {\n selectedCoins = getSelectedCoins(Data.RECEIVED);\n collection = Data.RECEIVED;\n }\n\n if (selectedCoins.size() == 0) {\n displayToast(getString(R.string.msg_please_select_coins));\n return;\n }\n\n // Transfer selected coins to bank account\n mBankTransferInProgress = true;\n mProgressBar.setVisibility(View.VISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer in progress...\");\n\n for (Coin c : selectedCoins) {\n double value = c.getValue();\n String currency = c.getCurrency();\n double exchange = value * mExchangeRates.get(currency);\n mGoldAmount += exchange;\n Data.removeCoinFromCollection(c, collection, new OnEventListener<String>() {\n\n @Override\n public void onSuccess(String string) {\n mBankTransferTotal++;\n Log.d(TAG, \"[transferToBankAccount] number processed: \" + mBankTransferTotal);\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Get current date\n LocalDateTime now = LocalDateTime.now();\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\n \"yyyy/MM/dd\", Locale.ENGLISH);\n String date = format.format(now);\n\n // Add transaction to firebase\n Transaction transaction = new Transaction(mGoldAmount, date);\n Data.addTransaction(transaction, mBankTransferTotal, collection);\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer complete\");\n displayToast(getString(R.string.msg_transfer_complete));\n }\n }\n\n @Override\n public void onFailure(Exception e) {\n mBankTransferTotal++;\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer failed\");\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n\n } else {\n displayToast(getString(R.string.msg_failed_to_transfer) + c.getCurrency()\n + \" worth \" + c.getValue());\n }\n Log.d(TAG, \"[sendCoins] failed to transfer coin: \" + c.getId());\n }\n });\n }\n }", "private Builder(QueryBankBalanceMessage other) {\n super(QueryBankBalanceMessage.SCHEMA$);\n if (isValidValue(fields()[0], other.transferId)) {\n this.transferId = data().deepCopy(fields()[0].schema(), other.transferId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.accountID)) {\n this.accountID = data().deepCopy(fields()[2].schema(), other.accountID);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.accountAuthId)) {\n this.accountAuthId = data().deepCopy(fields()[3].schema(), other.accountAuthId);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.accountPassword)) {\n this.accountPassword = data().deepCopy(fields()[4].schema(), other.accountPassword);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.fundPassword)) {\n this.fundPassword = data().deepCopy(fields()[5].schema(), other.fundPassword);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.tradeCode)) {\n this.tradeCode = data().deepCopy(fields()[6].schema(), other.tradeCode);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.bankID)) {\n this.bankID = data().deepCopy(fields()[7].schema(), other.bankID);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.bankBranchID)) {\n this.bankBranchID = data().deepCopy(fields()[8].schema(), other.bankBranchID);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.bankPassword)) {\n this.bankPassword = data().deepCopy(fields()[9].schema(), other.bankPassword);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.currencyID)) {\n this.currencyID = data().deepCopy(fields()[10].schema(), other.currencyID);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.secuPwdFlag)) {\n this.secuPwdFlag = data().deepCopy(fields()[11].schema(), other.secuPwdFlag);\n fieldSetFlags()[11] = true;\n }\n }", "double getBalance(UUID name);", "@Override\r\n\tpublic void buildSettlement() {\n\t\t\r\n\t}", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.WalletBalanceResponse> walletBalance(\n lnrpc.Rpc.WalletBalanceRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getWalletBalanceMethod(), getCallOptions()), request);\n }", "public double getBal() {\n\t\t return balance;\r\n\t }", "BigDecimal getOpeningDebitBalance();", "BigDecimal getOpeningDebitBalance();", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsTradesCall(contract, type, limit, offset, from, to, _callback);\n }", "public double getBalance()\n \n {\n \n return balance;\n \n }", "public IBankTransfert payment();", "Transfer updateChargeBack(Transfer transfer, Transfer chargeback);", "@Override\n public Transfer makeTransfer(String counterAccount, Money amount)\n throws BusinessException {\n if (amount.greaterThan(this.transferLimit)) {\n throw new BusinessException(\"Limit exceeded!\");\n }\n // 2. Assuming result is 9-digit bank account number, validate 11-test:\n int sum = AccountChekSum(counterAccount);\n\n if (sum % 11 == 0) {\n // 3. Look up counter account and make transfer object:\n Transfer result = doTransfer(counterAccount,amount);\n return result;\n } else {\n throw new BusinessException(\"Invalid account number!\");\n }\n }", "public Double getBalance(){\n Double sum = 0.0;\n // Mencari balance dompet dari transaksi dengan cara menghitung total transaksi\n for (Transaction transaction : transactions) {\n sum += transaction.getAmount().doubleValue();\n }\n return sum;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\tfinal String TAB = \" \";\r\n\r\n\t\tStringBuilder retValue = new StringBuilder();\r\n\r\n\t\tretValue.append(\"BankDTO ( \").append(super.toString()).append(TAB).append(\"available = \").append(this.available).append(TAB).append(\"code = \").append(this.code).append(TAB).append(\"name = \").append(this.name).append(TAB).append(\" )\");\r\n\r\n\t\treturn retValue.toString();\r\n\t}", "@Override\n public List<Transfer> getTransfers(int limit) {\n throw new NotImplementedError(\"Use MergedWallet instead.\");\n }", "private void listBalances() {\n\t\t\r\n\t}", "@Override\n\tpublic WebApiRequest getRequest() {\n\t\tString category = \"\";\n\t\tString destination = \"\";\n\t\tJSONObject para = new JSONObject();\n\t\tif (taskFlag == GET_BALANCE_DETAIL_FLAG) {\n\t\t\tcategory = CATEGORY_NAME;\n\t\t\tdestination = GET_BALANCE_Detail;\n\t\t\ttry {\n\t\t\t\tpara.put(\"ID\", getIntent().getIntExtra(\"BalanceID\", 0));\n\t\t\t\tpara.put(\"CardType\", getIntent().getIntExtra(\"CardType\", 1));\n\t\t\t\tpara.put(\"ChangeType\", getIntent().getIntExtra(\"ChangeType\", 0));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tWebApiHttpHead header = mApp.createNeededCheckingWebConnectHead(category, destination, para.toString());\n\t\tWebApiRequest request = new WebApiRequest(category, destination,para.toString(), header);\n\t\treturn request;\n\t}", "private Builder() {\n super(QueryBankBalanceMessage.SCHEMA$);\n }", "public double getBalance(){\n return balance;\r\n }", "BigDecimal getClosingDebitBalance();", "interface Transaction {\n int BALANCE = 500;\n //Storing Balance\n Object transaction(Object input);\n}", "public io.lightcone.data.types.Amount.Builder getAmountBuilder() {\n \n onChanged();\n return getAmountFieldBuilder().getBuilder();\n }", "public double getBalance(){\n return balance;\n }", "public void applyTransaction(Transaction tx, byte[] coinbase) {\n\t\tif (blockchain != null)\n\t\t\tblockchain.addWalletTransaction(tx);\n\n\t\t// TODO: what is going on with simple wallet transfer ?\n\n\t\t// 1. VALIDATE THE NONCE\n\t\tbyte[] senderAddress = tx.getSender();\n\n\t\tAccountState senderAccount = repository.getAccountState(senderAddress);\n\n\t\tif (senderAccount == null) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"No such address: {}\",\n\t\t\t\t\t\tHex.toHexString(senderAddress));\n\t\t\treturn;\n\t\t}\n\n\t\tBigInteger nonce = repository.getNonce(senderAddress);\n\t\tif (nonce.compareTo(new BigInteger(tx.getNonce())) != 0) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"Invalid nonce account.nonce={} tx.nonce={}\",\n\t\t\t\t\t\tnonce.longValue(), new BigInteger(tx.getNonce()));\n\t\t\treturn;\n\t\t}\n\n\t\t// 2.1 PERFORM THE GAS VALUE TX\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\n\t\t// first of all debit the gas from the issuer\n\t\tBigInteger gasDebit = tx.getTotalGasValueDebit();\n\n\t\t// The coinbase get the gas cost\n\t\trepository.addBalance(coinbase, gasDebit);\n\n\t\tbyte[] contractAddress;\n\n\t\t// Contract creation or existing Contract call\n\t\tif (tx.isContractCreation()) {\n\n\t\t\t// credit the receiver\n\t\t\tcontractAddress = tx.getContractAddress();\n\t\t\trepository.createAccount(contractAddress);\n\t\t\tstateLogger.info(\"New contract created address={}\",\n\t\t\t\t\tHex.toHexString(contractAddress));\n\t\t} else {\n\n\t\t\tcontractAddress = tx.getReceiveAddress();\n\t\t\tAccountState receiverState = repository.getAccountState(tx\n\t\t\t\t\t.getReceiveAddress());\n\n\t\t\tif (receiverState == null) {\n\t\t\t\trepository.createAccount(tx.getReceiveAddress());\n\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\tstateLogger.info(\"New account created address={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\t\t\t}\n\t\t}\n\n\t\t// 2.2 UPDATE THE NONCE\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\t\tBigInteger balance = repository.getBalance(senderAddress);\n\t\tif (balance.compareTo(BigInteger.ZERO) == 1) {\n\t\t\trepository.increaseNonce(senderAddress);\n\n\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\tstateLogger.info(\n\t\t\t\t\t\t\"Before contract execution the sender address debit with gas total cost, \"\n\t\t\t\t\t\t\t\t+ \"\\n sender={} \\n gas_debit= {}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()), gasDebit);\n\t\t}\n\n\t\t// actual gas value debit from the sender\n\t\t// the purchase gas will be available for the\n\t\t// contract in the execution state, and\n\t\t// can be validate using GAS op\n\t\tif (gasDebit.signum() == 1) {\n\t\t\tif (balance.compareTo(gasDebit) == -1) {\n\t\t\t\tlogger.info(\"No gas to start the execution: sender={}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trepository.addBalance(senderAddress, gasDebit.negate());\n\t\t}\n\n\t\t// 3. START TRACKING FOR REVERT CHANGES OPTION !!!\n\t\tRepository trackRepository = repository.getTrack();\n\t\ttrackRepository.startTracking();\n\n\t\ttry {\n\n\t\t\t// 4. THE SIMPLE VALUE/BALANCE CHANGE\n\t\t\tif (tx.getValue() != null) {\n\n\t\t\t\tBigInteger senderBalance = repository.getBalance(senderAddress);\n\t\t\t\tBigInteger contractBalance = repository.getBalance(contractAddress);\n\n\t\t\t\tif (senderBalance.compareTo(new BigInteger(1, tx.getValue())) >= 0) {\n\n\t\t\t\t\trepository.addBalance(contractAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()));\n\t\t\t\t\trepository.addBalance(senderAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()).negate());\n\n\t\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\t\tstateLogger.info(\"Update value balance \\n \"\n\t\t\t\t\t\t\t\t+ \"sender={}, receiver={}, value={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(senderAddress),\n\t\t\t\t\t\t\t\tHex.toHexString(contractAddress),\n\t\t\t\t\t\t\t\tnew BigInteger(tx.getValue()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 3. FIND OUT WHAT IS THE TRANSACTION TYPE\n\t\t\tif (tx.isContractCreation()) {\n\n\t\t\t\tbyte[] initCode = tx.getData();\n\n\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\tlogger.info(\"running the init for contract: addres={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getContractAddress()));\n\n\t\t\t\tVM vm = new VM();\n\t\t\t\tProgram program = new Program(initCode, programInvoke);\n\t\t\t\tvm.play(program);\n\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\tsenderAddress, tx.getContractAddress(), coinbase);\n\n\t\t\t} else {\n\n\t\t\t\tbyte[] programCode = trackRepository.getCode(tx\n\t\t\t\t\t\t.getReceiveAddress());\n\t\t\t\tif (programCode != null) {\n\n\t\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\t\tlogger.info(\"calling for existing contract: addres={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\n\t\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\t\tVM vm = new VM();\n\t\t\t\t\tProgram program = new Program(programCode, programInvoke);\n\t\t\t\t\tvm.play(program);\n\n\t\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\t\tsenderAddress, tx.getReceiveAddress(), coinbase);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\ttrackRepository.rollback();\n\t\t\treturn;\n\t\t}\n\t\ttrackRepository.commit();\n\t\tpendingTransactions.put(Hex.toHexString(tx.getHash()), tx);\n\t}", "@Override\t\n\t@Transactional\n\tpublic Boolean transferMoney(TransferDto transferData) throws Exception {\n\t\t\n\t\tUser targetUser = userDao.findByUsername(transferData.getTargetUser().getUsername());\n\t\t\n\t\tBalanceDto balanceData = transferData.getBalance();\n\t\t\n\t\t\n\t\tbalanceData.setType(AccountTransactionType.SUBTRACT);\n\t\t\n\t\taddSubtractBalance(balanceData);\n\t\n\t\tbalanceData.setType(AccountTransactionType.ADD);\n\t\t\n\t\tbalanceData.setAccount(transferData.getTargetAccount());\n\t\t\n\t\t\n\t\taddSubtractBalanceByUser(targetUser, balanceData);\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public lnrpc.Rpc.WalletBalanceResponse walletBalance(lnrpc.Rpc.WalletBalanceRequest request) {\n return blockingUnaryCall(\n getChannel(), getWalletBalanceMethod(), getCallOptions(), request);\n }", "@Override\n\tpublic double getAccountBalance(final int bankAccountId, final String vcDate, final Connection connection)\n\t{\n\t\tdouble opeAvailable = 0, totalAvailable = 0;\n\t\ttry {\n\n\t\t\tfinal StringBuilder str = new StringBuilder(\"SELECT case when sum(openingDebitBalance) = null then 0\")\n\t\t\t\t\t.append(\" ELSE sum(openingDebitBalance) end - case when sum(openingCreditBalance) = null then 0\")\n\t\t\t\t\t.append(\" else sum(openingCreditBalance) end AS \\\"openingBalance\\\" \")\n\t\t\t\t\t.append(\"FROM transactionSummary WHERE financialYearId=( SELECT id FROM financialYear WHERE startingDate <= ?\")\n\t\t\t\t\t.append(\"AND endingDate >= ?) AND glCodeId =(select glcodeid from bankaccount where id= ?)\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str);\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(str.toString());\n\t\t\tpst.setString(0, vcDate);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setInteger(2, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset)\n\t\t\t\topeAvailable = Double.parseDouble(element[0].toString());\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(\"opening balance \" + opeAvailable);\n\n\t\t\tfinal StringBuilder str1 = new StringBuilder(\"SELECT (case when sum(gl.debitAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.debitAmount) end - case when sum(gl.creditAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.creditAmount) end) + \").append(opeAvailable).append(\"\")\n\t\t\t\t\t.append(\" as \\\"totalAmount\\\" FROM generalLedger gl, voucherHeader vh WHERE vh.id = gl.voucherHeaderId\")\n\t\t\t\t\t.append(\" AND gl.glCodeid = (select glcodeid from bankaccount where id= ?) AND \")\n\t\t\t\t\t.append(\" vh.voucherDate >=( SELECT TO_CHAR(startingDate, 'dd-Mon-yyyy')\")\n\t\t\t\t\t.append(\" FROM financialYear WHERE startingDate <= ? AND endingDate >= ?) AND vh.voucherDate <= ?\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str1);\n\t\t\tpst = persistenceService.getSession().createSQLQuery(str1.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setString(2, vcDate);\n\t\t\tpst.setString(3, vcDate);\n\t\t\trset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\ttotalAvailable = Double.parseDouble(element[0].toString());\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\"total balance \" + totalAvailable);\n\t\t\t}\n\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" could not get Bankbalance \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn totalAvailable;\n\t}", "public int getBalance()\n {\n return balance;\n }", "public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request\r\n }", "public Builder setBalanceBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n balance_ = value;\n onChanged();\n return this;\n }", "public double getBalance(){\n return balance.getBalance();\n }", "public abstract int getBalancesRead();", "public io.lightcone.data.types.Percentage.Builder getWalletSplitBuilder() {\n \n onChanged();\n return getWalletSplitFieldBuilder().getBuilder();\n }", "public double getBalance(){\n return balance;\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsContractsCall(underlying, expiration, _callback);\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public double getBalance(){\r\n\t\treturn balance;\r\n\t}", "public long getBalance() {\n\t\n\treturn balance;\n}", "public static Builder newBuilder(QueryBankBalanceMessage other) {\n return new Builder(other);\n }", "public double getBalance(){\n return balance;\n }", "public frame.socket.common.proto.Login.ActAmount.Builder getActAmountBuilder(\n int index) {\n return getActAmountFieldBuilder().getBuilder(index);\n }", "public double getBalance()\n {\n return balance;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBalanceBytes() {\n java.lang.Object ref = balance_;\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 balance_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public String toString() {\n return \"--------------------------------------------\\n\" +\n \"Transfer Details\\n\" +\n \"--------------------------------------------\\n\" +\n \"Id: \" + transferId +\"\\n\"+\n \"From: \" + accountFromId +\"\\n\"+\n \"To: \" + accountToId +\"\\n\"+\n \"Amount: \" + amount +\"\\n\"+\n \"Type:\" + transferTypeId +\"\\n\"+\n \"Status:\" + transferStatusId +\"\\n\";\n }", "public void sendBankBalance(int amount) {\n sendMessage(Prefix.BANKBALANCE, amount + \"\");\n }", "public interface AccountAPI {\n\n /**\n * Address ETH balance\n * \n * @param address get balance for\n * @return balance\n * @throws EtherScanException parent exception class\n */\n @NotNull\n Balance balance(@NotNull String address) throws EtherScanException;\n\n /**\n * ERC20 token balance for address\n * \n * @param address get balance for\n * @param contract token contract\n * @return token balance for address\n * @throws EtherScanException parent exception class\n */\n @NotNull\n TokenBalance balance(@NotNull String address, @NotNull String contract) throws EtherScanException;\n\n /**\n * Maximum 20 address for single batch request If address MORE THAN 20, then there will be more than\n * 1 request performed\n * \n * @param addresses addresses to get balances for\n * @return list of balances\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<Balance> balances(@NotNull List<String> addresses) throws EtherScanException;\n\n /**\n * All txs for given address\n * \n * @param address get txs for\n * @param startBlock tx from this blockNumber\n * @param endBlock tx to this blockNumber\n * @return txs for address\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<Tx> txs(@NotNull String address, long startBlock, long endBlock) throws EtherScanException;\n\n @NotNull\n List<Tx> txs(@NotNull String address, long startBlock) throws EtherScanException;\n\n @NotNull\n List<Tx> txs(@NotNull String address) throws EtherScanException;\n\n /**\n * All internal txs for given address\n * \n * @param address get txs for\n * @param startBlock tx from this blockNumber\n * @param endBlock tx to this blockNumber\n * @return txs for address\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<TxInternal> txsInternal(@NotNull String address, long startBlock, long endBlock) throws EtherScanException;\n\n @NotNull\n List<TxInternal> txsInternal(@NotNull String address, long startBlock) throws EtherScanException;\n\n @NotNull\n List<TxInternal> txsInternal(@NotNull String address) throws EtherScanException;\n\n /**\n * All internal tx for given transaction hash\n * \n * @param txhash transaction hash\n * @return internal txs list\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<TxInternal> txsInternalByHash(@NotNull String txhash) throws EtherScanException;\n\n /**\n * All ERC-20 token txs for given address\n * \n * @param address get txs for\n * @param startBlock tx from this blockNumber\n * @param endBlock tx to this blockNumber\n * @return txs for address\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<TxErc20> txsErc20(@NotNull String address, long startBlock, long endBlock) throws EtherScanException;\n\n @NotNull\n List<TxErc20> txsErc20(@NotNull String address, long startBlock) throws EtherScanException;\n\n @NotNull\n List<TxErc20> txsErc20(@NotNull String address) throws EtherScanException;\n\n /**\n * All ERC-20 token txs for given address and contract address\n *\n * @param address get txs for\n * @param contractAddress contract address to get txs for\n * @param startBlock tx from this blockNumber\n * @param endBlock tx to this blockNumber\n * @return txs for address\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<TxErc20> txsErc20(@NotNull String address, @NotNull String contractAddress, long startBlock, long endBlock)\n throws EtherScanException;\n\n @NotNull\n List<TxErc20> txsErc20(@NotNull String address, @NotNull String contractAddress, long startBlock) throws EtherScanException;\n\n @NotNull\n List<TxErc20> txsErc20(@NotNull String address, @NotNull String contractAddress) throws EtherScanException;\n\n /**\n * All ERC-721 (NFT) token txs for given address\n *\n * @param address get txs for\n * @param startBlock tx from this blockNumber\n * @param endBlock tx to this blockNumber\n * @return txs for address\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<TxErc721> txsErc721(@NotNull String address, long startBlock, long endBlock) throws EtherScanException;\n\n @NotNull\n List<TxErc721> txsErc721(@NotNull String address, long startBlock) throws EtherScanException;\n\n @NotNull\n List<TxErc721> txsErc721(@NotNull String address) throws EtherScanException;\n\n /**\n * All ERC-721 (NFT) token txs for given address\n *\n * @param address get txs for\n * @param startBlock tx from this blockNumber\n * @param endBlock tx to this blockNumber\n * @return txs for address\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<TxErc721> txsErc721(@NotNull String address, @NotNull String contractAddress, long startBlock, long endBlock)\n throws EtherScanException;\n\n @NotNull\n List<TxErc721> txsErc721(@NotNull String address, @NotNull String contractAddress, long startBlock) throws EtherScanException;\n\n @NotNull\n List<TxErc721> txsErc721(@NotNull String address, @NotNull String contractAddress) throws EtherScanException;\n\n /**\n * All ERC-721 (NFT) token txs for given address\n *\n * @param address get txs for\n * @param startBlock tx from this blockNumber\n * @param endBlock tx to this blockNumber\n * @return txs for address\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<TxErc1155> txsErc1155(@NotNull String address, long startBlock, long endBlock) throws EtherScanException;\n\n @NotNull\n List<TxErc1155> txsErc1155(@NotNull String address, long startBlock) throws EtherScanException;\n\n @NotNull\n List<TxErc1155> txsErc1155(@NotNull String address) throws EtherScanException;\n\n /**\n * All ERC-721 (NFT) token txs for given address\n *\n * @param address get txs for\n * @param startBlock tx from this blockNumber\n * @param endBlock tx to this blockNumber\n * @return txs for address\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<TxErc1155> txsErc1155(@NotNull String address, @NotNull String contractAddress, long startBlock, long endBlock)\n throws EtherScanException;\n\n @NotNull\n List<TxErc1155> txsErc1155(@NotNull String address, @NotNull String contractAddress, long startBlock)\n throws EtherScanException;\n\n @NotNull\n List<TxErc1155> txsErc1155(@NotNull String address, @NotNull String contractAddress) throws EtherScanException;\n\n /**\n * All blocks mined by address\n * \n * @param address address to search for\n * @return blocks mined\n * @throws EtherScanException parent exception class\n */\n @NotNull\n List<Block> blocksMined(@NotNull String address) throws EtherScanException;\n}", "public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }", "BigDecimal getOpeningCreditBalance();", "BigDecimal getOpeningCreditBalance();", "public abstract void calcuteTax(Transfer aTransfer);", "public void transfer(BigDecimal value, Account account) {\n\n\t\ttheValueHasToBeGreaterThanZero(value);\n\n\t\tif (value.compareTo(balance) <= 0) {\n\t\t\tthis.withdrawalAlgorithm(value);\n\t\t\taccount.depositAlgorithm(value);\n\t\t\taccount.notifyMovements(value, MovementAction.TRANSFER_RECEIVED);\n\t\t\tthis.movements.add(new Movement(MovementAction.TRANSFERRED, this));\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new IllegalArgumentException(\"You do not have enough balance to transfer\");\n\t}", "public Account doMoneyTransfer(MoneyTransferDTO moneyTransferDTO, Long id) {\n Account origin = accountService.getAccountById(id);\n Account destination = accountService.getAccountById(moneyTransferDTO.getToAccountId());\n\n // check for fraud detection\n //fraudDetectionService.checkMoneyTransfer(origin, moneyTransferDTO);\n fraudDetectionService.checkMoneyTransferV2(origin, moneyTransferDTO);\n\n // check enough funds in origin account\n BigDecimal currentBalance = origin.getBalance().getAmount();\n BigDecimal transferAmount = moneyTransferDTO.getAmount();\n if (transferAmount.compareTo(currentBalance) > 0)\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Amount exceeds balance of the account\");\n\n // check if penalty fee has to be deducted later\n BigDecimal result = currentBalance.subtract(transferAmount);\n boolean applyPenaltyFee =\n currentBalance.compareTo(origin.getMinimumBalance().getAmount()) > 0 &&\n result.compareTo(origin.getMinimumBalance().getAmount()) < 0;\n\n // make the transaction\n Transaction transaction = new Transaction(new Money(transferAmount));\n transaction.setType(Type.MONEY_TRANSFER);\n transaction.setFromAccount(origin);\n transaction.setToAccount(destination);\n //transaction.setAmount(new Money(transferAmount));\n transaction.setAuthorName(moneyTransferDTO.getName());\n transaction.setDescription(moneyTransferDTO.getDescription());\n Transaction newTransaction = transactionService.addTransaction(transaction);\n\n // deduct penalty fee with another transaction if needed\n if (applyPenaltyFee) {\n\n Transaction deductionTransaction = new Transaction(origin.getPenaltyFee());\n transaction.setType(Type.PENALTY_FEE);\n deductionTransaction.setFromAccount(origin);\n //deductionTransaction.setToAccount(null);\n //deductionTransaction.setAmount(origin.getPenaltyFee()); // set amount before accounts\n deductionTransaction.setAuthorName(moneyTransferDTO.getName());\n deductionTransaction.setDescription(\"Penalty fee deduction\");\n transactionService.addTransaction(deductionTransaction);\n }\n\n return accountService.saveAccount(origin);\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsAccountBookCall(limit, offset, from, to, type, _callback);\n }", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}", "public double getBalance(){\n return this.balance;\r\n }", "public int transfer(String fromAccNum, String toAccNum, double amount) {\n String output; \n\n Account fromAcc = bank.retrieveAccount(fromAccNum); \n Account toAcc = bank.retrieveAccount(toAccNum);\n\n if (fromAcc.getBalance() >= amount) {\n fromAcc.deduct(amount);\n toAcc.add(amount); \n \n return 0;\n }\n return -1; \n\n\n }", "double getBalance() {\n\t\treturn balance;\n\t}", "public float getBalance() {\n return balance;\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsOrdersCall(status, contract, underlying, limit, offset, from, to, _callback);\n }", "public com.google.protobuf.ByteString\n getBalanceBytes() {\n java.lang.Object ref = balance_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n balance_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getBalance() {\n return balance;\n }", "public int getBalance() {\n return balance;\n }", "public static void main(String[] args) {\n FundsTransfer transfer = new FundsTransfer(clientId, clientSecret, Interswitch.ENV_DEV);\n\n try {\n\n BankResponse response = transfer.fetchBanks(); // makes network call\n\n Bank[] bank = response.getBanks(); // a bank array of all banks\n\n if (bank instanceof Object) {\n\n // successful\n Bank testBank = bank[0]; // bank at index 0\n\n String cbnCode = testBank.getCbnCode(); // Central bank code\n String bankName = testBank.getBankName(); // bank name: \n String bankCode = testBank.getBankCode(); // bankcode in alphabetical form: UBA, GTB, FBN\n\n } else {\n\n // error occured\n }\n\n } catch (\n\n Exception ex) {\n // request was not completed\n }\n }", "public double getBalance()\r\n\t{\r\n\t\treturn balance;\t\t\r\n\t}", "public Double getBalance() {\r\n return balance;\r\n }", "public double getBalance(){\n\t\treturn balance;\n\t}", "private void makeTransfer(String withdrawAmt, String depositAcct){\n //assume this will come as numbers only (Keyboard restricted to numbers)\n Double transferAmt = Double.valueOf(withdrawAmt);\n\n //make transfer\n customer.transferFund(currAcctName, depositAcct, transferAmt);\n\n //reset transfer value\n ((EditText)findViewById(R.id.transferAmt)).setText(\"\");\n\n //update balance\n ((TextView) findViewById(R.id.fromAmt)).setText(customer.getBalanceString(currAcctName));\n }", "public org.tempuri.HISWebServiceStub.BankAddDepositResponse bankAddDeposit(\r\n org.tempuri.HISWebServiceStub.BankAddDeposit bankAddDeposit34)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n try {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[17].getName());\r\n _operationClient.getOptions()\r\n .setAction(\"http://tempuri.org/BankAddDeposit\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n bankAddDeposit34,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"bankAddDeposit\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"BankAddDeposit\"));\r\n\r\n //adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // set the message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message contxt to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n //execute the operation client\r\n _operationClient.execute(true);\r\n\r\n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\r\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(_returnEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.BankAddDepositResponse.class);\r\n\r\n return (org.tempuri.HISWebServiceStub.BankAddDepositResponse) object;\r\n } catch (org.apache.axis2.AxisFault f) {\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"BankAddDeposit\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"BankAddDeposit\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"BankAddDeposit\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex, new java.lang.Object[] { messageObject });\r\n\r\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } finally {\r\n if (_messageContext.getTransportOut() != null) {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n }\r\n }\r\n }", "public double getBalance() {\n return balance;\n }", "public Coin getBalance(BalanceType balanceType) {\n try {\n if (balanceType == BalanceType.AVAILABLE || balanceType == BalanceType.AVAILABLE_SPENDABLE) {\n List<TransactionOutput> candidates = calculateAllSpendCandidates(true, balanceType == BalanceType.AVAILABLE_SPENDABLE);\n CoinSelection selection = coinSelector.select(NetworkParameters.MAX_MONEY, candidates);\n return selection.valueGathered;\n } else if (balanceType == BalanceType.ESTIMATED || balanceType == BalanceType.ESTIMATED_SPENDABLE) {\n List<TransactionOutput> all = calculateAllSpendCandidates(false, balanceType == BalanceType.ESTIMATED_SPENDABLE);\n Coin value = Coin.ZERO;\n for (TransactionOutput out : all) value = value.add(out.getValue());\n return value;\n } else {\n throw new AssertionError(\"Unknown balance type\"); // Unreachable.\n }\n } finally {\n }\n }", "public MoneyTransfer() {\n }", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsCandlesticksCall(contract, limit, from, to, interval, _callback);\n }", "private final void d(com.iqoption.core.microservices.billing.response.deposit.d r21) {\n /*\n r20 = this;\n r0 = r20;\n r1 = r20.asp();\n r1 = r1.cCg;\n r2 = \"binding.depositAmountEdit\";\n kotlin.jvm.internal.i.e(r1, r2);\n if (r21 == 0) goto L_0x0158;\n L_0x000f:\n r2 = r0.cFG;\n r3 = 1;\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r2 = r1.getText();\n r2 = r2.toString();\n r4 = r0.cFG;\n r2 = kotlin.jvm.internal.i.y(r2, r4);\n r2 = r2 ^ r3;\n if (r2 == 0) goto L_0x0027;\n L_0x0025:\n goto L_0x0158;\n L_0x0027:\n r2 = r20.ass();\n r4 = 0;\n if (r2 == 0) goto L_0x0068;\n L_0x002e:\n r2 = (java.lang.Iterable) r2;\n r2 = r2.iterator();\n L_0x0034:\n r5 = r2.hasNext();\n if (r5 == 0) goto L_0x0050;\n L_0x003a:\n r5 = r2.next();\n r6 = r5;\n r6 = (com.iqoption.core.features.c.a) r6;\n r6 = r6.getName();\n r7 = r21.getName();\n r6 = kotlin.jvm.internal.i.y(r6, r7);\n if (r6 == 0) goto L_0x0034;\n L_0x004f:\n goto L_0x0051;\n L_0x0050:\n r5 = r4;\n L_0x0051:\n r5 = (com.iqoption.core.features.c.a) r5;\n if (r5 == 0) goto L_0x0068;\n L_0x0055:\n r6 = r5.Xy();\n if (r6 == 0) goto L_0x0068;\n L_0x005b:\n r7 = 0;\n r8 = 0;\n r9 = 1;\n r10 = 0;\n r11 = 0;\n r12 = 19;\n r13 = 0;\n r2 = com.iqoption.core.util.e.a(r6, r7, r8, r9, r10, r11, r12, r13);\n goto L_0x0069;\n L_0x0068:\n r2 = r4;\n L_0x0069:\n r5 = r0.ayL;\n if (r5 == 0) goto L_0x0084;\n L_0x006d:\n r5 = r5.Km();\n if (r5 == 0) goto L_0x0084;\n L_0x0073:\n r5 = r5.aar();\n if (r5 == 0) goto L_0x0084;\n L_0x0079:\n r6 = r21.getName();\n r5 = r5.get(r6);\n r5 = (java.util.ArrayList) r5;\n goto L_0x0085;\n L_0x0084:\n r5 = r4;\n L_0x0085:\n if (r2 != 0) goto L_0x00a5;\n L_0x0087:\n if (r5 == 0) goto L_0x00a5;\n L_0x0089:\n r2 = r20.asr();\n r2 = r2.getItems();\n r2 = kotlin.collections.u.bV(r2);\n r2 = (com.iqoption.deposit.light.d.b) r2;\n if (r2 == 0) goto L_0x00a4;\n L_0x0099:\n r2 = r2.asL();\n if (r2 == 0) goto L_0x00a4;\n L_0x009f:\n r2 = com.iqoption.deposit.f.a(r2);\n goto L_0x00a5;\n L_0x00a4:\n r2 = r4;\n L_0x00a5:\n r6 = r0.cxs;\n r7 = r0.cFE;\n r8 = r4;\n r8 = (java.lang.Double) r8;\n if (r2 != 0) goto L_0x00f4;\n L_0x00ae:\n r9 = r6 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n if (r9 == 0) goto L_0x00f4;\n L_0x00b2:\n if (r7 == 0) goto L_0x00f4;\n L_0x00b4:\n r6 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r6;\n r6 = r6.aaI();\n if (r6 == 0) goto L_0x00cd;\n L_0x00bc:\n r7 = r7.getName();\n r6 = r6.get(r7);\n r6 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d.b) r6;\n if (r6 == 0) goto L_0x00cd;\n L_0x00c8:\n r6 = r6.OL();\n goto L_0x00ce;\n L_0x00cd:\n r6 = r4;\n L_0x00ce:\n if (r6 == 0) goto L_0x00f5;\n L_0x00d0:\n r7 = r0.f(r6);\n if (r7 != 0) goto L_0x00f5;\n L_0x00d6:\n r8 = r6.doubleValue();\n r10 = 0;\n r11 = 0;\n r12 = 1;\n r13 = 0;\n r14 = 0;\n r15 = 0;\n r16 = 0;\n r2 = java.util.Locale.US;\n r7 = \"Locale.US\";\n kotlin.jvm.internal.i.e(r2, r7);\n r18 = 115; // 0x73 float:1.61E-43 double:5.7E-322;\n r19 = 0;\n r17 = r2;\n r2 = com.iqoption.core.util.e.a(r8, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19);\n goto L_0x00f5;\n L_0x00f4:\n r6 = r8;\n L_0x00f5:\n if (r2 == 0) goto L_0x00f8;\n L_0x00f7:\n goto L_0x00fa;\n L_0x00f8:\n r2 = \"\";\n L_0x00fa:\n r0.cFG = r2;\n r2 = (java.lang.CharSequence) r2;\n r1.setText(r2);\n r1 = r2.length();\n r2 = 0;\n if (r1 != 0) goto L_0x010a;\n L_0x0108:\n r1 = 1;\n goto L_0x010b;\n L_0x010a:\n r1 = 0;\n L_0x010b:\n if (r1 == 0) goto L_0x0155;\n L_0x010d:\n r1 = r0.cxs;\n r7 = r1 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n if (r7 != 0) goto L_0x0114;\n L_0x0113:\n r1 = r4;\n L_0x0114:\n r1 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r1;\n if (r1 == 0) goto L_0x011e;\n L_0x0118:\n r1 = r1.aaE();\n if (r1 == r3) goto L_0x0155;\n L_0x011e:\n if (r6 == 0) goto L_0x0122;\n L_0x0120:\n r1 = r6;\n goto L_0x0138;\n L_0x0122:\n if (r5 == 0) goto L_0x0137;\n L_0x0124:\n r5 = (java.util.List) r5;\n r1 = kotlin.collections.u.bV(r5);\n r1 = (com.iqoption.core.microservices.billing.response.deposit.e) r1;\n if (r1 == 0) goto L_0x0137;\n L_0x012e:\n r5 = r1.ZC();\n r1 = java.lang.Double.valueOf(r5);\n goto L_0x0138;\n L_0x0137:\n r1 = r4;\n L_0x0138:\n if (r1 == 0) goto L_0x013b;\n L_0x013a:\n goto L_0x0141;\n L_0x013b:\n r5 = 0;\n r1 = java.lang.Double.valueOf(r5);\n L_0x0141:\n r1 = r0.f(r1);\n if (r1 == 0) goto L_0x014b;\n L_0x0147:\n r4 = r1.getErrorMessage();\n L_0x014b:\n if (r1 == 0) goto L_0x0151;\n L_0x014d:\n r2 = r1.aso();\n L_0x0151:\n r0.u(r4, r2);\n goto L_0x0158;\n L_0x0155:\n r0.u(r4, r2);\n L_0x0158:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.d(com.iqoption.core.microservices.billing.response.deposit.d):void\");\n }", "@NotNull\n TokenBalance balance(@NotNull String address, @NotNull String contract) throws EtherScanException;", "public com.vodafone.global.er.decoupling.binding.request.GetBalancesRequest createGetBalancesRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetBalancesRequestImpl();\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public ReturnValue marketTransfer(BankTransferValue bankTransferValue)\r\n\t\t\tthrows RemoteException {\n\t\treturn cp.marketTransfer(bankTransferValue);\r\n\t}", "@java.lang.Override\n public java.lang.String getBalance() {\n java.lang.Object ref = balance_;\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 balance_ = s;\n return s;\n }\n }" ]
[ "0.56784827", "0.54783183", "0.5470149", "0.5389158", "0.53702205", "0.53702205", "0.5368622", "0.5361355", "0.5297711", "0.5292658", "0.5227306", "0.51964223", "0.518826", "0.5186044", "0.5178242", "0.5164229", "0.5154988", "0.515344", "0.5110543", "0.5100825", "0.5098307", "0.5093237", "0.5092864", "0.5092864", "0.50873524", "0.5056584", "0.50477576", "0.5047568", "0.50409585", "0.50278616", "0.5013095", "0.50008243", "0.49716762", "0.4948222", "0.49470115", "0.49394488", "0.49381036", "0.49165404", "0.49163094", "0.4901084", "0.48988786", "0.48922494", "0.4885088", "0.48751983", "0.48704976", "0.4869082", "0.48673537", "0.48661768", "0.4865034", "0.48602316", "0.48580557", "0.4856758", "0.48535073", "0.48535073", "0.48489848", "0.48450187", "0.48405838", "0.48393553", "0.48388946", "0.48315868", "0.48265004", "0.48249683", "0.4818109", "0.48075113", "0.48061857", "0.48004487", "0.48004487", "0.48004177", "0.47952336", "0.4793904", "0.4790853", "0.4784641", "0.478442", "0.4780636", "0.4775663", "0.47742245", "0.47738937", "0.4772295", "0.4765997", "0.4761041", "0.4761041", "0.4746046", "0.4743774", "0.47414115", "0.47382963", "0.47352487", "0.47343996", "0.47331396", "0.4725184", "0.47228262", "0.47224882", "0.47206798", "0.47138175", "0.471052", "0.47090834", "0.47090834", "0.47090834", "0.47090834", "0.4703494", "0.470066" ]
0.5066933
25
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)"); } return getTransferBalanceCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "private Contract() {\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.65667087", "0.6498893", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.58935875", "0.5867352", "0.57154477", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.54083145", "0.53983784", "0.538685", "0.5372101", "0.535575", "0.53002197", "0.5298278", "0.5284535", "0.5277213", "0.5228654", "0.5213922", "0.5213851", "0.5203466", "0.5203466", "0.5198705", "0.51919657", "0.5132997", "0.503143", "0.5030267", "0.502797", "0.5015527", "0.5008133", "0.49868008", "0.49842298", "0.49836314", "0.49824694", "0.49804395", "0.4969242", "0.4950973", "0.49493062", "0.49471316", "0.4928483", "0.49245524", "0.49162278", "0.4885365", "0.48522398", "0.4833596", "0.48331168", "0.48331168", "0.48331168", "0.48331168", "0.4830747", "0.4827253", "0.48129195", "0.48126492", "0.4799318", "0.4791708", "0.47801298", "0.4777395", "0.47646844", "0.47614396", "0.47599468", "0.47580373", "0.47508353", "0.47382933", "0.4732828", "0.47288087", "0.47212544", "0.4717133", "0.47137868", "0.47108936", "0.46979916", "0.46949527", "0.46938235", "0.469239", "0.46847698", "0.46842527", "0.46841192", "0.46748438", "0.46745366", "0.46736524", "0.46714628", "0.46679446", "0.4660473", "0.46603698", "0.46579075", "0.4655875", "0.4655484", "0.46554628", "0.46510994", "0.46478415" ]
0.5991647
7
Build call for patchContract
public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UpdateOperationConfiguration build();", "public void createContract() {\n\r\n\t}", "interface Patch {\n\n }", "public static native PatchResult patch(String oldApkPath, String patchPath, String newApkPath);", "@Override\n public BankPatch createNewPatch() {\n return super.createNewPatch();\n }", "public RequestDataBuilder patch() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.PATCH);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}", "private void buildRpcRequest(BindingOperation bindingOperation, XmlCursor cursor, SampleXmlUtility xmlGenerator, List<String> parametersToBeRemoved, List<Parameter> parametersToTry, String serviceName)\r\n throws Exception {\n String ns = WsdlUtils.getSoapBodyNamespace(bindingOperation.getBindingInput().getExtensibilityElements());\r\n if (ns == null) {\r\n ns = WsdlUtils.getTargetNamespace(wsdlContext.getDefinition());\r\n log.warn(\"missing namespace on soapbind:body for RPC request, using targetNamespace instead (BP violation)\");\r\n }\r\n cursor.beginElement(new QName(ns, bindingOperation.getName()));\r\n if (xmlGenerator.isSoapEnc()) {\r\n cursor.insertAttributeWithValue(new QName(wsdlContext.getSoapVersion().getEnvelopeNamespace(),\r\n \"encodingStyle\"), wsdlContext.getSoapVersion().getEncodingNamespace());\r\n }\r\n Part[] inputParts = WsdlUtils.getInputParts(bindingOperation);\r\n for (int i = 0; i < inputParts.length; i++) {\r\n Part part = inputParts[i];\r\n if (WsdlUtils.isAttachmentInputPart(part, bindingOperation)) {\r\n if (iface.getSettings().getBoolean(WsdlSettings.ATTACHMENT_PARTS)) {\r\n XmlCursor c = cursor.newCursor();\r\n c.toLastChild();\r\n c.beginElement(part.getName());\r\n c.insertAttributeWithValue(\"href\", part.getName() + \"Attachment\");\r\n c.dispose();\r\n }\r\n } else {\r\n if (wsdlContext.hasSchemaTypes()) {\r\n QName typeName = part.getTypeName();\r\n if (typeName != null) {\r\n SchemaType type = wsdlContext.getInterfaceDefinition().findType(typeName);\r\n if (type != null) {\r\n XmlCursor c = cursor.newCursor();\r\n c.toLastChild();\r\n c.insertElement(part.getName());\r\n c.toPrevToken();\r\n xmlGenerator.createSampleForType(type, c, null, null, null, parametersToBeRemoved, parametersToTry, serviceName, null);\r\n c.dispose();\r\n } else {\r\n log.warn(\"Failed to find type [\" + typeName + \"]\");\r\n }\r\n } else {\r\n SchemaGlobalElement element = wsdlContext.getSchemaTypeLoader().findElement(part.getElementName());\r\n if (element != null) {\r\n XmlCursor c = cursor.newCursor();\r\n c.toLastChild();\r\n c.insertElement(element.getName());\r\n c.toPrevToken();\r\n xmlGenerator.createSampleForType(element.getType(), c, null, null, null, parametersToBeRemoved, parametersToTry, serviceName, null);\r\n c.dispose();\r\n } else {\r\n log.warn(\"Failed to find element [\" + part.getElementName() + \"]\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "public static String buildPatchContactRequestBody() {\n\t\tString uniqueID = UUID.randomUUID().toString();\n\t\tString username = uniqueID + \"@cubic.com\";\t\n\t\t\n\t\tStringWriter sw = new StringWriter();\n\t\tPrintWriter pw = new PrintWriter( sw );\n\t\tpw.println(\"{\");\n\t\tpw.println(\" \\\"contactType\\\": \\\"Primary\\\",\");\n\t\tpw.println(\" \\\"username\\\":\\\"\" + username + \"\\\"\");\n\t\tpw.println(\"}\");\n\t\treturn sw.toString();\n\t}", "abstract int patch();", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/builds/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Build> patchBuild(\n @Path(\"name\") String name, \n @Body Build body);", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/builds/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Build> patchBuild(\n @Path(\"name\") String name, \n @Body Build body, \n @QueryMap PatchBuild queryParameters);", "public @ResponseBody Contract updateContract(@RequestBody Contract Contract);", "@SuppressWarnings(\"rawtypes\")\n private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchContract(Async)\");\n }\n\n return patchContractCall(generalContractId, body);\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/networks/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Network> patchNetwork(\n @Path(\"name\") String name, \n @Body Network body, \n @QueryMap PatchNetwork queryParameters);", "protected Patch createNewPatch() { // overridden by subclass\n return null;\n }", "public abstract void doPatch(RawPcodeImpl patchPcode);", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Proxy> patchProxy(\n @Path(\"name\") String name, \n @Body Proxy body, \n @QueryMap PatchProxy queryParameters);", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/networks/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Network> patchNetwork(\n @Path(\"name\") String name, \n @Body Network body);", "List patch(List inputObject, List inputSnapshot, Settings settings);", "@Override\n public void calculateChecksum(Patch p) {\n }", "void createOrUpdateContracts(List<PsdContract> wrapContracts);", "@Test\n public void shouldPartiallyUpdateAPaymentViaPatch() throws Exception {\n ResponseEntity<String> response = postTestPaymentAndGetResponse();\n String location = getLocationHeader(response);\n\n //when: just the organisation_id is updated:\n HttpEntity entity = getHttpEntityForTestRequest(\"{\\\"organisation_id\\\":\\\"newOrganisationId\\\"}\");\n RestTemplate restTemplateForPatch = getRestTemplateForPatch();\n ResponseEntity<String> patchResponse = restTemplateForPatch.exchange(location, HttpMethod.PATCH, entity, String.class);\n //then: a 200 ok status code is returned:\n assertEquals(HttpStatus.OK, patchResponse.getStatusCode());\n\n //when: the payment is fetched again:\n Payment updatedPayment = restTemplate.getForEntity(location, Payment.class).getBody();\n //then: the data on the response should be correct, e.g. check the orgainsation_id field:\n assertEquals(\"newOrganisationId\", updatedPayment.getOrganisationId());\n }", "public interface PendingContactUpdateExtMethods\r\n extends PendingContactUpdateExtMethodsStubI\r\n{\r\n\r\n\r\n}", "public void setPatch(ScriptedPatchRequest patch) {\n this.patch = patch;\n }", "protected void sendPatch(Patch p) {\n sendPatchWorker(p);\n }", "@Test\n public void edit() throws RazorpayException{\n JSONObject request = new JSONObject(\"\" +\n \"{\\\"notes\\\":\" +\n \"{\\\"notes_key_1\\\":\\\"BeammeupScotty.\\\",\" +\n \"\\\"notes_key_2\\\":\\\"Engage\\\"}}\");\n\n String mockedResponseJson = \"{\\n\" +\n \" \\\"id\\\": \"+REFUND_ID+\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 300100,\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FIKOnlyii5QGNx\\\",\\n\" +\n \" \\\"notes\\\": {\\n\" +\n \" \\\"notes_key_1\\\": \\\"Beam me up Scotty.\\\",\\n\" +\n \" \\\"notes_key_2\\\": \\\"Engage\\\"\\n\" +\n \" },\\n\" +\n \" \\\"receipt\\\": null,\\n\" +\n \" \\\"acquirer_data\\\": {\\n\" +\n \" \\\"arn\\\": \\\"10000000000000\\\"\\n\" +\n \" },\\n\" +\n \" \\\"created_at\\\": 1597078124,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"normal\\\",\\n\" +\n \" \\\"speed_requested\\\": \\\"optimum\\\"\\n\" +\n \"}\";\n\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n Refund fetch = refundClient.edit(REFUND_ID, request);\n assertNotNull(fetch);\n assertEquals(REFUND_ID,fetch.get(\"id\"));\n assertEquals(\"refund\",fetch.get(\"entity\"));\n assertEquals(300100,(int)fetch.get(\"amount\"));\n assertEquals(\"INR\",fetch.get(\"currency\"));\n String editRequest = getHost(String.format(Constants.REFUND,REFUND_ID));\n verifySentRequest(true, request.toString(), editRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Proxy> patchProxy(\n @Path(\"name\") String name, \n @Body Proxy body);", "public static void testPatchLineOfCredit() throws MambuApiException{\n\t\tString methodName = new Object() {}.getClass().getEnclosingMethod().getName();\n\t\tSystem.out.println(\"\\nIn \" + methodName);\n\t\t\n\t\tLinesOfCreditService linesOfCreditService = MambuAPIFactory.getLineOfCreditService();\n\n\t\tfinal String clientId = DemoUtil.getDemoClient().getId();\n\t\t// Get Lines of Credit for a client\n\t\tList<LineOfCredit> clientLoCs = linesOfCreditService.getClientLinesOfCredit(clientId, 0, 5);\n\t\tSystem.out.println(clientLoCs.size() + \" lines of credit for Client \" + clientId);\n\t\t\n\t\tif(clientLoCs.isEmpty() || clientLoCs.get(0) == null){\n\t\t\tSystem.out.println(\"WARNING: \" + methodName + \" could not be tested because there are no LoCs to be patched\");\n\t\t}else{\n\t\t\tLineOfCredit lineOfCredit = clientLoCs.get(0);\n\t\t\t\n\t\t\t//change some values on the allowed patch fields\n\t\t\tCalendar patchDate = Calendar.getInstance();\n\t\t\t\n\t\t\tlineOfCredit.setId(\"LOC\" + System.currentTimeMillis());\n\t\t\tpatchDate.add(Calendar.DAY_OF_MONTH, 1);\n\t\t\tlineOfCredit.setStartDate(patchDate.getTime());\n\t\t\t\n\t\t\tpatchDate.add(Calendar.YEAR, 2);\n\t\t\tlineOfCredit.setExpiryDate(patchDate.getTime());\n\t\t\t\n\t\t\tlineOfCredit.setAmount(lineOfCredit.getAmount().add(new Money(\"5000\")));\n\t\t\tlineOfCredit.setNotes(\"Note updated through APIs today \" + new Date());\n\n\t\t\tboolean patchResult = linesOfCreditService.patchLinesOfCredit(lineOfCredit);\n\t\t\tSystem.out.println(\"PATCH LoC result is = \" + patchResult);\n\t\t\t\n\t\t\t// retrieve PATCHed line of credit\n\t\t\tlineOfCredit = linesOfCreditService.getLineOfCredit(lineOfCredit.getEncodedKey());\n\t\t\t\n\t\t\t// log details of the PATCHed line of credit\n\t\t\tlogLineOfCreditDetails(lineOfCredit);\n\t\t}\n\t\t\n\t}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/projects/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Project> patchProject(\n @Path(\"name\") String name, \n @Body Project body);", "public interface RequestContract {\n\n public void save_request(String note);\n\n public void save_request();\n}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/projects/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Project> patchProject(\n @Path(\"name\") String name, \n @Body Project body, \n @QueryMap PatchProject queryParameters);", "public void setPatch(String patch) {\n this.patch = patch;\n }", "private Builder(com.autodesk.ws.avro.Call other) {\n super(com.autodesk.ws.avro.Call.SCHEMA$);\n if (isValidValue(fields()[0], other.responding_product_id)) {\n this.responding_product_id = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.responding_product_id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.requesting_product_id)) {\n this.requesting_product_id = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.requesting_product_id);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.module)) {\n this.module = (java.lang.CharSequence) data().deepCopy(fields()[2].schema(), other.module);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.operation)) {\n this.operation = (java.lang.CharSequence) data().deepCopy(fields()[3].schema(), other.operation);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.suboperation)) {\n this.suboperation = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.suboperation);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.target_object_uri)) {\n this.target_object_uri = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.target_object_uri);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.object_size)) {\n this.object_size = (java.lang.Long) data().deepCopy(fields()[6].schema(), other.object_size);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.execution_time)) {\n this.execution_time = (java.lang.Integer) data().deepCopy(fields()[7].schema(), other.execution_time);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.status)) {\n this.status = (java.lang.CharSequence) data().deepCopy(fields()[8].schema(), other.status);\n fieldSetFlags()[8] = true;\n }\n }", "public String compileSolidity(String contract) {\n String code = \"\";\n List<BlockchainProperties.BcInfo> bcInfos = blockchainProperties.getBcInfos();\n BlockchainProperties.BcInfo bcInfo = bcInfos.get(0);\n logger.info(\"contract:\" + contract);\n String[] methodParams = {contract};\n\n Map<String, Object> params = new HashMap<String, Object>();\n params.put(\"jsonrpc\", \"2.0\");\n params.put(\"method\", \"eth_compileSolidity\");\n params.put(\"params\", methodParams);\n params.put(\"id\", \"1\");\n\n try {\n RestTemplate restTemplate = new RestTemplate();\n HttpHeaders headers = new HttpHeaders();\n headers.setContentType(org.springframework.http.MediaType.APPLICATION_JSON);\n HttpEntity<Map<String, Object>> request = new HttpEntity<Map<String, Object>>(params, headers);\n ResponseEntity<String> compileResult = restTemplate.exchange(bcInfo.getClientUrl(), HttpMethod.POST, request, String.class);\n logger.info(String.valueOf(compileResult));\n logger.info(String.valueOf(compileResult.getBody()));\n String compileResultBody = compileResult.getBody();\n if (compileResult.getStatusCode() == HttpStatus.OK) {\n String tempResult1 = compileResultBody.substring(compileResultBody.indexOf(\"\\\"code\\\":\\\"\") + 8);\n String tempResult2 = tempResult1.split(\"\\\",\\\"\")[0];\n code = tempResult2;\n }\n\n } catch (Throwable e) {\n e.printStackTrace();\n }\n\n return code;\n }", "public ScriptedPatchRequest getPatch() {\n return patch;\n }", "HttpPatch patchRequest(HttpServletRequest request, String address) throws IOException;", "@Test\n public void patchesAsset() throws Exception {\n try (\n final MkContainer container = new MkGrizzlyContainer().next(\n new MkAnswer.Simple(HttpURLConnection.HTTP_OK, \"\")\n ).start(this.resource.port())\n ) {\n final RtReleaseAsset asset = new RtReleaseAsset(\n new ApacheRequest(container.home()),\n release(),\n 2\n );\n final JsonObject json = Json.createObjectBuilder()\n .add(\"name\", \"hello\").build();\n asset.patch(json);\n final MkQuery query = container.take();\n MatcherAssert.assertThat(\n query.method(), Matchers.equalTo(Request.PATCH)\n );\n MatcherAssert.assertThat(\n query.body(),\n Matchers.containsString(\"{\\\"name\\\":\\\"hello\\\"}\")\n );\n MatcherAssert.assertThat(\n query.uri().toString(),\n Matchers.endsWith(\"/repos/john/blueharvest/releases/assets/2\")\n );\n container.stop();\n }\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Ingress> patchIngress(\n @Path(\"name\") String name, \n @Body Ingress body, \n @QueryMap PatchIngress queryParameters);", "public Builder setContract(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n contract_ = value;\n onChanged();\n return this;\n }", "public Builder setContract(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n contract_ = value;\n onChanged();\n return this;\n }", "public Builder setContract(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n contract_ = value;\n onChanged();\n return this;\n }", "public Builder setContract(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n contract_ = value;\n onChanged();\n return this;\n }", "public static void createNewBundleInternal(String patchBundleName,ZipFile source, List<ZipEntry> entryList, File target, boolean isDiff, MergeExcutorServices.PrepareCallBack prepareCallBack) throws IOException, MergeException {\n byte[] buffer = new byte[BUFFEREDSIZE];\n ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(target)));\n BufferedOutputStream bo = new BufferedOutputStream(out);\n InputStream in;\n //先写入source中未变的文件\n java.util.Enumeration e = source.entries();\n Boolean isSourceHasDex = false;\n Boolean isPatchHasDex = false;\n ZipEntry originalDex = null;\n ZipEntry patchDex = null;\n File outDex;\n\n while (e.hasMoreElements()) {\n ZipEntry zipEnt = (ZipEntry) e.nextElement();\n String name = zipEnt.getName();\n /**\n * 差量更新需要做dex merge, 过滤出classes.dex\n */\n if (isDiff && name.equals(\"classes.dex\")) {\n// originalDex = zipEnt;\n isSourceHasDex = true;\n continue;\n }\n\n boolean toBeDeleted = isBundleFileUpdated(zipEnt,entryList);\n\n if (!toBeDeleted) {\n\n ZipEntry newEntry = new ZipEntry(name);\n if (name.contains(\"raw/\")||name.contains(\"assets/\")){\n newEntry.setMethod(ZipEntry.STORED);\n newEntry.setCrc(zipEnt.getCrc());\n newEntry.setSize(zipEnt.getSize());\n }\n out.putNextEntry(newEntry);\n in = source.getInputStream(zipEnt);\n write(in, out, buffer);\n bo.flush();\n\n }\n }\n\n if (!isSourceHasDex && isDiff) {\n throw new MergeException(\"Original bundle has no dex\");\n }\n\n //最后写入patch中的内容\n// File[] patchFiles = patch.listFiles();\n// for (File patchFile : patchFiles) {\n// /**\n// * 差量更新需要做dex merge, 过滤出classes.dex\n// */\n// if (isDiff && patchFile.getName().equals(\"classes.dex\")) {\n// patchDex = patchFile;\n// isPatchHasDex = true;\n// MergeExcutorServices.needMergeCount.incrementAndGet();\n// continue;\n// }\n// zip(out, patchFile, patchFile.getName(), bo);\n//\n// }\n for(ZipEntry entry : entryList){\n if(isDiff && (entry.getName().endsWith(\"classes.dex\"))){\n patchDex = entry;\n isPatchHasDex =true;\n MergeExcutorServices.needMergeCount.incrementAndGet();\n continue;\n }\n ZipEntry newEntry = new ZipEntry(entry.getName().substring(entry.getName().indexOf(\"/\")+1));\n if (newEntry.getName().contains(\"raw/\")||newEntry.getName().contains(\"assets/\")){\n newEntry.setMethod(ZipEntry.STORED);\n newEntry.setCrc(entry.getCrc());\n newEntry.setSize(entry.getSize());\n }\n out.putNextEntry(newEntry);\n in = MergeExcutorServices.sZipPatch.getInputStream(entry);\n write(in, out, buffer);\n bo.flush();\n }\n /**\n * 差量更新需要做dex merge\n */\n if (isDiff) {\n // Merge patch dex with origin dex\n if (isPatchHasDex && isSourceHasDex) {\n //发出merge申请\n// File outDexDir = new File(patch, \"out\");\n ByteArrayOutputStream outDexStream=new ByteArrayOutputStream();\n dexMerge(patchBundleName,source, patchDex, outDexStream, prepareCallBack);\n// if (outDexStream.exists()) {\n// /**\n// * caculate the merged dex md5 and report\n// */\n// String md5 = Md5Utils.getFileMD5String(outDex);\n// MonitorReport.getInstance().trace(source.getName(), md5, \"\" + outDex.length());\n// }\n// zip(out, outDex, outDex.getName(), bo);\n ByteArrayInputStream swapStream = new ByteArrayInputStream(outDexStream.toByteArray());\n ZipEntry entry = new ZipEntry(\"classes.dex\");\n out.putNextEntry(entry);\n write(swapStream,out,buffer);\n bo.flush();\n } else if (isSourceHasDex) {\n // Patch has no classes.dex, just use the original dex\n// outDex = new File(patch, \"classes.dex\");\n// inputStreamToFile(source.getInputStream(originalDex), outDex);\n// zip(out, outDex, outDex.getName(), bo);\n ZipEntry entry = new ZipEntry(\"classes.dex\");\n out.putNextEntry(entry);\n in = source.getInputStream(source.getEntry(\"classes.dex\"));\n write(in,out,buffer);\n bo.flush();\n }\n }else {\n MergeExcutorServices.successCount.incrementAndGet();\n }\n\n closeQuitely(out);\n closeQuitely(bo);\n }", "@FormUrlEncoded\n @PATCH(Service.PATH_POST_CREATE_PIN_EHR)\n Call<NormalResponseObject> postCreatePin(\n @Field(\"PIN\") String pin, @Field(\"ConfirmPIN\") String confirmPin\n );", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/oauths/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<OAuth> patchOAuth(\n @Path(\"name\") String name, \n @Body OAuth body, \n @QueryMap PatchOAuth queryParameters);", "public abstract void onMergePatchset(TicketModel ticket);", "public interface RimetContract {\n\n interface View extends BaseView {\n\n /**\n * 提示用户更新\n * @param model\n */\n void onUpdate(UpdateModel model);\n\n /**\n * 更新失败\n * @param msg\n */\n void onUpdateFailed(String msg);\n\n /**\n * 更新配置成功\n */\n void onUpdateConfigSucceed();\n\n /**\n * 更新配置失败\n * @param msg\n */\n void onUpdateConfigFailed(String msg);\n\n /**\n * 清除成功\n */\n void onClearConfigSucceed();\n\n /**\n * 清除失败\n * @param msg\n */\n void onClearConfigFailed(String msg);\n }\n\n interface Presenter extends BasePresenter {\n\n /**\n * 检测更新\n */\n void checkUpdate(boolean auto);\n\n /**\n * 更新配置\n */\n void updateConfig(boolean auto);\n\n /**\n * 清除配置\n */\n void clearConfig();\n }\n}", "Patch createNewPatch(byte[] gsysex);", "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "private void buildAndSendNotification(Call originalCall, ContactCacheEntry contactInfo) {\n // This can get called to update an existing notification after contact information has come\n // back. However, it can happen much later. Before we continue, we need to make sure that\n // the call being passed in is still the one we want to show in the notification.\n final Call call = getCallToShow(CallList.getInstance());\n if (call == null || !call.getId().equals(originalCall.getId())) {\n return;\n }\n\n final int callState = call.getState();\n\n // Check if data has changed; if nothing is different, don't issue another notification.\n final int iconResId = getIconToDisplay(call);\n Bitmap largeIcon = getLargeIconToDisplay(contactInfo, call);\n final String content =\n getContentString(call, contactInfo.userType);\n final String contentTitle = getContentTitle(contactInfo, call);\n\n final int notificationType;\n if (callState == Call.State.INCOMING || callState == Call.State.CALL_WAITING) {\n notificationType = NOTIFICATION_INCOMING_CALL;\n } else {\n notificationType = NOTIFICATION_IN_CALL;\n }\n final int color = InCallPresenter.getInstance().getPrimaryColorFromCall(call);\n\n if (!checkForChangeAndSaveData(iconResId, content, largeIcon, contentTitle, callState,\n notificationType, contactInfo.contactRingtoneUri,\n /// M: need update notification for video state changed during SRVCC @{\n call.getVideoState(), color)) {\n /// @}\n return;\n }\n\n if (largeIcon != null) {\n largeIcon = getRoundedIcon(largeIcon);\n }\n\n /*\n * This builder is used for the notification shown when the device is locked and the user\n * has set their notification settings to 'hide sensitive content'\n * {@see Notification.Builder#setPublicVersion}.\n */\n Notification.Builder publicBuilder = new Notification.Builder(mContext);\n publicBuilder.setSmallIcon(iconResId)\n .setColor(mContext.getResources().getColor(R.color.dialer_theme_color))\n // Hide work call state for the lock screen notification\n .setContentTitle(getContentString(call, ContactsUtils.USER_TYPE_CURRENT));\n setNotificationWhen(call, callState, publicBuilder);\n\n /*\n * Builder for the notification shown when the device is unlocked or the user has set their\n * notification settings to 'show all notification content'.\n */\n final Notification.Builder builder = getNotificationBuilder();\n builder.setPublicVersion(publicBuilder.build());\n\n // Set up the main intent to send the user to the in-call screen\n final PendingIntent inCallPendingIntent = createLaunchPendingIntent();\n builder.setContentIntent(inCallPendingIntent);\n\n // Set the intent as a full screen intent as well if a call is incoming\n if (notificationType == NOTIFICATION_INCOMING_CALL\n && !InCallPresenter.getInstance().isShowingInCallUi()) {\n configureFullScreenIntent(builder, inCallPendingIntent, call);\n // Set the notification category for incoming calls\n builder.setCategory(Notification.CATEGORY_CALL);\n }\n\n builder.setSmallIcon(iconResId);\n builder.setLargeIcon(largeIcon);\n /// M: CTA request, set sim color from call. @{\n // Google code:\n // builder.setColor(mContext.getResources().getColor(R.color.dialer_theme_color));\n builder.setColor(InCallPresenter.getInstance().getPrimaryColorFromCall(call));\n /// @}\n /// M: Add for [1A1H2W] @{\n// builder.setContentTitle(mContext.getString(R.string.two_incoming_calls));\n// if(!InCallUtils.isTwoIncomingCalls()) {\n// /// @}\n//\n// // Set the content\n// builder.setContentText(content);\n// builder.setContentTitle(contentTitle);\n//\n// final boolean isVideoUpgradeRequest = call.getSessionModificationState()\n// == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST;\n// if (isVideoUpgradeRequest) {\n// appendCountdown(builder, content);\n// builder.setUsesChronometer(false);\n// addDismissUpgradeRequestAction(builder);\n// addAcceptUpgradeRequestAction(builder);\n// } else {\n// createIncomingCallNotification(call, callState, builder);\n// }\n//\n// addPersonReference(builder, contactInfo, call);\n// ///M: OP18Plugin <Status bar modification of vowifi quality >@{\n// ExtensionManager.getStatusBarExt().customizeNotification(\n// CallList.getInstance(), builder, largeIcon);\n// /// @}\n// }\n\n /*\n * Fire off the notification\n */\n Notification notification = builder.build();\n\n if (mDialerRingtoneManager.shouldPlayRingtone(callState, contactInfo.contactRingtoneUri)) {\n notification.flags |= Notification.FLAG_INSISTENT;\n notification.sound = contactInfo.contactRingtoneUri;\n AudioAttributes.Builder audioAttributes = new AudioAttributes.Builder();\n audioAttributes.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC);\n audioAttributes.setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE);\n notification.audioAttributes = audioAttributes.build();\n if (mDialerRingtoneManager.shouldVibrate(mContext.getContentResolver())) {\n notification.vibrate = VIBRATE_PATTERN;\n }\n }\n if (mDialerRingtoneManager.shouldPlayCallWaitingTone(callState)) {\n Log.v(this, \"Playing call waiting tone\");\n mDialerRingtoneManager.playCallWaitingTone();\n }\n if (mCurrentNotification != notificationType && mCurrentNotification != NOTIFICATION_NONE) {\n Log.i(this, \"Previous notification already showing - cancelling \"\n + mCurrentNotification);\n mNotificationManager.cancel(mCurrentNotification);\n }\n Log.i(this, \"Displaying notification for \" + notificationType);\n mNotificationManager.notify(notificationType, notification);\n mCurrentNotification = notificationType;\n }", "public @ResponseBody Contract addContract(@RequestBody Contract Contract);", "public interface IAccessPackageCatalogReferenceRequest extends IHttpRequest {\n\n void delete(final ICallback<? super AccessPackageCatalog> callback);\n\n AccessPackageCatalog delete() throws ClientException;\n\n /**\n * Sets the select clause for the request\n *\n * @param value the select clause\n * @return the updated request\n */\n IAccessPackageCatalogReferenceRequest select(final String value);\n\n /**\n * Sets the expand clause for the request\n *\n * @param value the expand clause\n * @return the updated request\n */\n IAccessPackageCatalogReferenceRequest expand(final String value);\n\n /**\n * Puts the AccessPackageCatalog\n *\n * @param srcAccessPackageCatalog the AccessPackageCatalog to PUT\n * @param callback the callback to be called after success or failure\n */\n void put(AccessPackageCatalog srcAccessPackageCatalog, final ICallback<? super AccessPackageCatalog> callback);\n\n /**\n * Puts the AccessPackageCatalog\n *\n * @param srcAccessPackageCatalog the AccessPackageCatalog to PUT\n * @return the AccessPackageCatalog\n * @throws ClientException an exception occurs if there was an error while the request was sent\n */\n AccessPackageCatalog put(AccessPackageCatalog srcAccessPackageCatalog) throws ClientException;\n}", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Transactional(value = Transactional.TxType.MANDATORY)\n public Rubric applyUpdate(JsonNode patches, Rubric rubric) throws JsonProcessingException, ResponseStatusException {\n ObjectMapper objectMapper = new ObjectMapper();\n JsonNode rubricJson = objectMapper.convertValue(rubric, JsonNode.class);\n System.out.println(rubricJson);\n\n if (patches.isArray()) {\n ArrayNode arrayNode = (ArrayNode) patches;\n\n for(int i = 0; i < arrayNode.size(); i++) {\n JsonNode update = arrayNode.get(i);\n System.out.println(update);\n\n String operation = update.get(\"op\").asText();\n\n if (operation.equals(Operation.ADD.toString())) {\n // either criterion or section\n String type = update.get(\"value\").get(\"content\").get(\"type\").asText();\n\n // mark all submissions if a new criterion is added\n // i.e. add 'issue' to those submissions\n if (type.equals(Type.CRITERION.toString())) {\n System.out.println(\"A new criterion has been added. Mark all submissions.\");\n } else {\n System.out.println(\"A new section has been created. Well, skip.\");\n }\n } else if (operation.equals(Operation.REPLACE.toString())) {\n // get path elements\n String[] path = update.get(\"path\").asText().split(\"/\");\n\n // if title was changed, skip\n if (path.length > 0 && path[path.length - 1].equals(\"title\")) {\n // mark all submissions that are affected by this change\n System.out.println(\"We don't really care about changes in name, do we? Skip.\");\n } else if (path.length > 0 && path[path.length - 1].equals(\"grade\")) {\n // mark all submissions that are affected by this change\n System.out.println(\"Grading for a criterion has been changed. Mark all submissions.\");\n } else if (path.length > 0 && path[path.length - 1].equals(\"text\")) {\n // mark all submissions that are affected by this change\n System.out.println(\"Description of a criterion has been changed. Mark all submissions.\");\n } else {\n // the whole rubric was purged\n System.out.println(\"Rubric has been cleared. Mark all submissions.\");\n }\n } else if (operation.equals(Operation.REMOVE.toString())) {\n // get path elements, last part should be an index in the children array\n String[] path = update.get(\"path\").asText().split(\"/\");\n\n JsonNode element = findInRubric(rubricJson, path);\n\n if (element.get(\"content\").get(\"type\").asText().equals(Type.SECTION.toString())) {\n // the code below is very inefficient\n\n // recursively get all criteria\n List<JsonNode> criteria = this.findAllCriteria(element);\n\n if (criteria.isEmpty()) {\n // no criterion was removed, so skip\n continue;\n }\n\n System.out.println(\"A section with criteria has been removed. Mark all submissions.\");\n\n // for each criterion\n try {\n for (JsonNode criterion: criteria) {\n System.out.println(criterion);\n // for each assessment in the project check if the criterion is in it\n System.out.println(\"removing grades of criterion: \" + criterion.get(\"content\").get(\"id\").asText());\n gradeRepository.deleteAllByCriterionId(criterion.get(\"content\").get(\"id\").asText());\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new ResponseStatusException(HttpStatus.CONFLICT, \"deletion failed\");\n }\n } else {\n // it was a criterion\n try {\n gradeRepository.deleteAllByCriterionId(element.get(\"content\").get(\"id\").asText());\n System.out.println(\"removing grades of criterion: \" + element.get(\"content\").get(\"id\").asText());\n System.out.println(\"A criterion has been removed. Mark all submissions.\");\n } catch (Exception e) {\n throw new ResponseStatusException(HttpStatus.CONFLICT, \"deletion failed\");\n }\n }\n }\n\n // apply patch\n ArrayNode updateArray = objectMapper.createArrayNode();\n updateArray.add(update);\n JsonPatch.applyInPlace(updateArray, rubricJson);\n }\n }\n\n return objectMapper.treeToValue(rubricJson, Rubric.class);\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "public abstract void onUpdatePatchset(TicketModel ticket);", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/oauths/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<OAuth> patchOAuth(\n @Path(\"name\") String name, \n @Body OAuth body);", "public interface RMASubmitCaller {\n\t/*\n\t * Command define from Order Confirmation API Guide JSON and XML format\n\t */\n\t@Headers({ \"Accept: application/json\", \"Content-Type: application/json\" })\n\t@RequestLine(\"POST /servicemgmt/rma/newrma?sellerid={sellerid}&version={version}\")\n\tSubmitRMAResponse sendRMASubmitRequestJSON(@Param(\"sellerid\") String sellerID, @Param(\"version\") String version,\n\t\t\tSubmitRMARequest body);\n\n\t@Headers({ \"Accept: application/xml\", \"Content-Type: application/xml\" })\n\t@RequestLine(\"POST /servicemgmt/rma/newrma?sellerid={sellerid}&version={version}\")\n\tSubmitRMAResponse sendRMASubmitRequestXML(@Param(\"sellerid\") String sellerID, @Param(\"version\") String version,\n\t\t\tSubmitRMARequest body);\n\n\t// Implement default method of interface class that according to\n\t// Variables.MediaType to run at JSON or XML request.\n\tdefault SubmitRMAResponse sendRMASubmitRequest(SubmitRMARequest body, String version) {\n\t\tswitch (Variables.MediaType) {\n\t\tcase JSON:\n\t\t\tif (Variables.SimulationEnabled)\n\t\t\t\treturn sendRMASubmitRequestJSON(Content.SellerID, \"307\", body);\n\t\t\telse\n\t\t\t\treturn sendRMASubmitRequestJSON(Content.SellerID, version, body);\n\n\t\tcase XML:\n\t\t\tif (Variables.SimulationEnabled)\n\t\t\t\treturn sendRMASubmitRequestXML(Content.SellerID, \"307\", body);\n\t\t\telse\n\t\t\t\treturn sendRMASubmitRequestXML(Content.SellerID, version, body);\n\n\t\tdefault:\n\t\t\tthrow new RuntimeException(\"Never Happened!\");\n\t\t}\n\n\t}\n\n\tstatic RMASubmitCaller buildJSON() {\n\t\tVariables.MediaType = MEDIA_TYPE.JSON;\n\n\t\treturn new CallerFactory<RMASubmitCaller>().jsonBuild(RMASubmitCaller.class, Variables.LogLevel,\n\t\t\t\tVariables.Retryer, RMAClient.genClient());\n\t}\n\n\tstatic RMASubmitCaller buildXML() {\n\t\tVariables.MediaType = MEDIA_TYPE.XML;\n\n\t\treturn new CallerFactory<RMASubmitCaller>().xmlBuild(RMASubmitCaller.class, Variables.LogLevel,\n\t\t\t\tVariables.Retryer, RMAClient.genClient());\n\t}\n\n}", "Patch createNewPatch(IDriver driver, String fileName, int size);", "public NetworkDevicePatchParameters() {\n }", "public boolean updateContract(double rem, String day, String time, String location, String batch, long tID,long cID) {\n\t\treturn new Contract().updateContract(rem, day, time, location, batch, tID,cID);\n\t}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/consoles/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Console> patchConsole(\n @Path(\"name\") String name, \n @Body Console body, \n @QueryMap PatchConsole queryParameters);", "JsonElement invokeRpc(String name, JsonObject rpcInput);", "public EthCall dryCallModMethod(String from, String method, Object... args) throws NoSuchContractMethod {\n\t\tFunction methodFunction = factory.getModFunction(method);\n\n\t\tif (methodFunction == null) {\n\t\t\tthrow new NoSuchContractMethod(\"Method \" + method + \" does not exist for contract factory\");\n\t\t}\n\n\t\tTransactionCall callPojo = new TransactionCall(methodFunction);\n\t\tcallPojo.setData(CryptoUtil.byteToHexWithPrefix(methodFunction.encode(args)));\n\t\tcallPojo.setFrom(from);\n\t\tcallPojo.setGas(null);\n\t\tcallPojo.setGasPrice(null);\n\t\tcallPojo.setTo(this.contractAddress);\n\t\tcallPojo.setValue(null);\n\n\t\tlogger.debug(\"Generated dry call (contractAddress: \" + this.contractAddress + \", method: \" + method\n\t\t\t\t+ \", params: \" + Arrays.toString(args) + \")\" + callPojo.toString());\n\n\t\treturn new EthCall(callPojo);\n\t}", "private ApplicationAddressReqType buildUpdateApplicationAddressChangeRequest(\n UpdateApplicationAddressForm updateApplicationAddressForm) {\n System.out.println(\"inside buildUpdateApplicationAddressChangeRequest\");\n ApplicationAddressReqType applicationAddressReqType = new ApplicationAddressReqType();\n AuditAdmin audit = new AuditAdmin();\n audit.setLastModifiedUser(\"erinkklein FQT Attor\");\n applicationAddressReqType.setAudit(audit);\n System.out.println(audit.getLastModifiedUser());\n \n LifecycleAdmin lifecycle= new LifecycleAdmin();\n lifecycle.setBeginDate(\"1595704744\");\n lifecycle.setEndDate(\"1595704744\");\n applicationAddressReqType.setLifeCycle(lifecycle);\n applicationAddressReqType.setChangeCustomerNumber(updateApplicationAddressForm.getCustomerNumber());\n applicationAddressReqType.setNoticeActionCd(\"addressChange\");\n applicationAddressReqType.setRegistrationNumber(updateApplicationAddressForm.getRegistrationNumber());\n applicationAddressReqType.setRequestIdentifier(updateApplicationAddressForm.getPairId());\n \n List<AddressChangeSupportData> addressSupportingDataArray = new ArrayList<AddressChangeSupportData>();\n \n AddressChangeSupportData addressSupportingData = new AddressChangeSupportData();\n addressSupportingData.setNameLineText(updateApplicationAddressForm.getCommonName());\n \n addressSupportingData.setSignature(updateApplicationAddressForm.getSubmitterSignature());\n addressSupportingDataArray.add(addressSupportingData);\n applicationAddressReqType.setSupportData(addressSupportingDataArray);\n System.out.println(applicationAddressReqType.getChangeCustomerNumber());\n \n return applicationAddressReqType;\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Ingress> patchIngress(\n @Path(\"name\") String name, \n @Body Ingress body);", "Patch createNewPatch(byte[] gsysex, IDriver driver);", "Patch createNewPatch(byte[] gsysex, Device device);", "public interface EditUserInfoContract {\n\n interface View extends BaseView<Presenter> {\n boolean isActive();\n\n void showInfo(ApiService.PersonInfo personInfo);\n\n void showError(String error);\n\n void showModifySuccess();\n }\n\n interface Presenter extends BasePresenter {\n void modifyInfo(String nickName,\n String signature,\n String sex,\n String telephone,\n String faculty,\n String specialty,\n String grade,\n String dormitory);\n }\n}", "public abstract void onNewPatchset(TicketModel ticket);", "public interface AdditionalOrderInforCaller {\n\t/*\n\t * Command define from Order Confirmation API Guide\n\t * JSON and XML format\n\t */\n\t@Headers({\"Accept: application/json\",\"Content-Type: application/json\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestJSON(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\t\n\t@Headers({\"Accept: application/xml\",\"Content-Type: application/xml\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestXML(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\n\t// Implement default method of interface class that according to Variables.MediaType to run at JSON or XML request.\n\tdefault GetAdditionalOrderInformationResponse sendAdditionalOrderInforRequest(GetAdditionalOrderInformationRequest body) {\n\t\tswitch(Variables.MediaType) {\n\t\tcase JSON:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestJSON(Content.SellerID, body);\n\t\t\t\n\t\tcase XML:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestXML(Content.SellerID, body);\t\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new RuntimeException(\"Never Happened!\");\n\t\t}\n\t\t\t\t\n\t}\n\t\n\tstatic AdditionalOrderInforCaller buildJSON() {\n\t\tVariables.MediaType = MEDIA_TYPE.JSON;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.jsonBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\n\tstatic AdditionalOrderInforCaller buildXML() {\n\t\tVariables.MediaType = MEDIA_TYPE.XML;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.xmlBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\t\n}", "@Test\n public void testSourceSuperTypeInputCompatibility() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // List<DataType> sourceInputTypes = new ArrayList<DataType>();\n // sourceInputTypes.add(new DataTypeImpl<Type>(Object.class,\n // Object.class));\n // DataType<List<DataType>> inputType = new\n // DataTypeImpl<List<DataType>>(String.class, sourceInputTypes);\n // Operation opSource1 = newOperationImpl(\"op1\", inputType, null, null,\n // false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // List<DataType> targetInputTypes = new ArrayList<DataType>();\n // targetInputTypes.add(new DataTypeImpl<Type>(String.class,\n // String.class));\n // DataType<List<DataType>> targetInputType =\n // new DataTypeImpl<List<DataType>>(String.class, targetInputTypes);\n //\n // Operation opTarget = newOperationImpl(\"op1\", targetInputType, null,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }", "public PatchException() {\n super();\n }", "public interface WithHoldOrderContract {\r\n\r\n ResponseData resendWithholdOrder();\r\n \r\n}", "@Test\n public void patchNoOp() throws Exception {\n\n }", "@RPCClientFields(urlfield =\"PAYMENT_SYS\",urlbean = ParamsConfig.class)\npublic interface RechargeOrderServer {\n\n /**\n * 充值订单-审核\n * @param json\n * @return\n */\n @POST(\"rechargeOrder/audit.do\")\n HTTPResponse audit(@Body String json);\n /**\n * 充值/扣款订单-保存\n */\n @POST(\"rechargeOrder/save.do\")\n HTTPResponse saveFinanceOrder(@Body String json);\n\n /**\n * 充值订单-列表\n */\n @POST(\"rechargeOrder/list.do\")\n HTTPResponse list(@Body String json);\n\n /**\n * 充值订单—审核列表\n * @param json\n * @return\n */\n @POST(\"rechargeOrder/auditList.do\")\n HTTPResponse auditList(@Body String json);\n\n /**\n * 获取用户余额\n * @param json\n * @return\n */\n @POST(\"balance/getBalance.do\")\n HTTPResponse getBalance(@Body String json);\n\n\n}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/consoles/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Console> patchConsole(\n @Path(\"name\") String name, \n @Body Console body);", "public ContractMethod() {\n }", "@Override\n public Codebase edit(Codebase input, ProjectContext context, Map<String, String> options) {\n File tempDir = filesystem.getTemporaryDirectory(\"patcher_run_\");\n String patchFilePath = options.get(\"file\");\n if (isNullOrEmpty(patchFilePath)) {\n return input;\n } else {\n File patchFile = new File(patchFilePath);\n if (!filesystem.isReadable(patchFile)) {\n throw new MoeProblem(\"cannot read file %s\", patchFilePath);\n }\n try {\n Utils.copyDirectory(input.getPath(), tempDir);\n } catch (IOException | CommandRunner.CommandException e) {\n throw new MoeProblem(e.getMessage());\n }\n try {\n cmd.runCommand(\n \"patch\",\n ImmutableList.of(\"-p0\", \"--input=\" + patchFilePath),\n tempDir.getAbsolutePath());\n } catch (CommandRunner.CommandException e) {\n throw new MoeProblem(e.getMessage());\n }\n return new Codebase(filesystem, tempDir, input.getProjectSpace(), input.getExpression());\n }\n }", "public void sendParameter(IPatch patch, SysexWidget.IParameter param) {\n }", "com.google.protobuf.ByteString\n getContractBytes();", "com.google.protobuf.ByteString\n getContractBytes();", "com.google.protobuf.ByteString\n getContractBytes();", "com.google.protobuf.ByteString\n getContractBytes();", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/apiservers/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<APIServer> patchAPIServer(\n @Path(\"name\") String name, \n @Body APIServer body);", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Contract contract0 = new Contract((-1963), \"minTick = \", \"Yv\", \"~s!AB_i<DH\", (-1931.0506269623768), \"<;R6@!a\\\"u\", \"minTick = \", \"lastTimestamp\", \"yTci@Ca5ai_xH#X\", \"yTci@Ca5ai_xH#X\", (Vector) null, \"ALIASES\", false, \"lastTimestamp\", \"kl<Z~=2>3dz/Y=t\");\n String string0 = EWrapperMsgGenerator.updatePortfolio(contract0, (-1622103582), 337.937984, 931.3257, (-725.35876), 0.0, (-1.0), \"kl<Z~=2>3dz/Y=t\");\n assertEquals(\"updatePortfolio: conid = -1963\\nsymbol = minTick = \\nsecType = Yv\\nexpiry = ~s!AB_i<DH\\nstrike = -1931.0506269623768\\nright = <;R6@!a\\\"u\\nmultiplier = minTick = \\nexchange = lastTimestamp\\nprimaryExch = ALIASES\\ncurrency = yTci@Ca5ai_xH#X\\nlocalSymbol = yTci@Ca5ai_xH#X\\n-1622103582 337.937984 931.3257 -725.35876 0.0 -1.0 kl<Z~=2>3dz/Y=t\", string0);\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {\n return listOptionsContractsCall(underlying, expiration, _callback);\n }", "void freeze(EditableWSDLBoundOperation operation);", "public BaseContract() {}", "private ChildContract() {}", "public static <T> T createObject(Class<T> clas, Object[] arguments) throws InstantiationException {\n ProxyFactory f = new ProxyFactory(); //This starts a proxy factory which will create the proxy.\n f.setSuperclass(clas); //This sets the super class.\n\n Field[] fields = clas.getDeclaredFields(); //Get all the fields from the class it's being made to replicate\n boolean hasFieldInv = ContractHelper.fieldHasInvariant(fields);\n //The is to ensure that a class which has a field invariant \n //then all of the methods will be checked.\n\n f.setFilter((Method m) -> {\n //This checks if any annotations are present for a method supplied.\n return m.getAnnotationsByType(Pre.class).length != 0\n || m.getAnnotationsByType(Post.class).length != 0\n || m.getAnnotationsByType(Invariant.class).length != 0\n || m.getAnnotationsByType(ForAll.class).length != 0\n || m.getAnnotationsByType(Exists.class).length != 0\n || m.getAnnotationsByType(PostThrow.class).length != 0\n || hasFieldInv;\n });\n\n Class c = f.createClass(); //This then creates a new class from the proxy factory.\n\n MethodHandler mi = (Object self, Method m, Method proceed, Object[] args) -> { //This is the method handler for the proxy created.\n Parameter[] params = m.getParameters(); //This gets the parameters of the method.\n //These are maps of all the parameters and fields to be checked.\n HashMap<String, Object> initialParameters = ContractHelper.mapHelper(args, params); //This uses a helper to assign the parameter names and values.\n HashMap<String, Object> afterParameters = initialParameters; //This sets the after parameters to the intial to begin with.\n HashMap<String, Object> initialFields = ContractHelper.fieldHelper(self, fields); //This uses a helper to assign the field name and values\n HashMap<String, Object> afterFields = initialFields; //This sets the after fields to the intial to begin.\n //These are arrays of all the annotations.\n Pre[] preArr = m.getAnnotationsByType(Pre.class); //This gets all the annotations that could be on the methods.\n Post[] postArr = m.getAnnotationsByType(Post.class);\n Invariant[] invArr = m.getAnnotationsByType(Invariant.class);\n ForAll[] forAllArr = m.getAnnotationsByType(ForAll.class);\n Exists[] existsArr = m.getAnnotationsByType(Exists.class);\n\n invArr = getFieldInvs(invArr, fields);\n\n for (Pre pre : preArr) { //This loops through all annotations for pre.\n preCheck(pre.value(), initialParameters, initialFields); //This then checks the pre conditions.\n }\n\n for (Invariant inv : invArr) {\n invCheck(inv.value(), initialParameters, initialFields); //This then checks the invariant condition.\n }\n\n Object result = null; //This intialised the result to null.\n\n try {\n result = proceed.invoke(self, args); // execute the original method.\n\n afterParameters = ContractHelper.mapHelper(args, params); //This gets the parameters after the method is called.\n afterFields = ContractHelper.fieldHelper(self, fields); //This gets the fields after\n\n initialParameters = ContractHelper.alterOldMap(initialParameters);\n initialFields = ContractHelper.alterOldMap(initialFields);\n\n for (Post post : postArr) {\n postCheck(post.value(), initialParameters, afterParameters, initialFields, afterFields, result); //This then runs any post checks.\n }\n \n for (ForAll forAll : forAllArr) {\n forAllCheck(forAll.value(), initialParameters, afterParameters, initialFields, afterFields, result);\n }\n\n for (Exists exist : existsArr) {\n existsCheck(exist.value(), initialParameters, afterParameters, initialFields, afterFields, result);\n }\n \n for (Invariant inv : invArr) {\n invCheck(inv.value(), afterParameters, afterFields);\n }\n } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException thrownByMethod) {\n Throwable cause = thrownByMethod.getCause();\n\n if (!(cause instanceof AssertionError || cause instanceof ContractException)) {\n if (cause != null) { //If cause is null then it is not an exception from the method.\n PostThrow[] thrown = m.getAnnotationsByType(PostThrow.class);\n\n for (PostThrow post : thrown) {\n if (cause.getClass().equals(post.exception())) { //Check if it has exception to check.\n postThrowCheck(post.condition(), initialParameters, afterParameters, initialFields, afterFields, result, cause); //This then runs any post checks.\n }\n }\n cause.setStackTrace(ContractHelper.alterTrace(cause.getStackTrace())); //This sets the trace of the throwable \n throw cause;\n }\n }\n throw thrownByMethod;\n }\n return result; // this returns the result of the method invocation.\n };\n\n Object obj = ContractHelper.getConstructor(c, arguments); //This uses a helper to get a constructor.\n\n //If it is still null then it can't instantiated by reflection.\n if (obj == null) {\n InstantiationException e = new InstantiationException(\"Class could not be instantiated: \" + clas);\n e.setStackTrace(ContractHelper.alterStackInstantiation(e.getStackTrace()));\n throw e;\n }\n\n ((Proxy) obj).setHandler(mi); //This then sets it's handler using the proxy.\n\n return clas.cast(obj); //This returns the object which should now have the proxy with it.\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Object aroundReadFrom(ReaderInterceptorContext readerInterceptorContext) throws IOException, WebApplicationException {\n Object resource = uriInfo.getMatchedResources().get(0);\n\n Method found = null;\n for (Method next : resource.getClass().getMethods()) {\n if (next.getAnnotation(GET.class) != null) {\n found = next;\n break;\n }\n }\n\n if (found == null) {\n throw new InternalServerErrorException(\"No matching GET method on resource\");\n }\n\n // Invoke the get method to get the state we are trying to patch\n Object bean;\n try {\n bean = found.invoke(resource);\n } catch (Exception e) {\n throw new WebApplicationException(e);\n }\n\n // Convert this object to a an array of bytes\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n MessageBodyWriter bodyWriter =\n workers.getMessageBodyWriter(bean.getClass(), bean.getClass(),\n new Annotation[0], MediaType.APPLICATION_JSON_TYPE);\n\n bodyWriter.writeTo(bean, bean.getClass(), bean.getClass(),\n new Annotation[0], MediaType.APPLICATION_JSON_TYPE,\n new MultivaluedHashMap<String, Object>(), baos);\n\n\n // Use the Jackson 2.x classes to convert both the incoming patch\n // and the current state of the object into a JsonNode / JsonPatch\n ObjectMapper mapper = new ObjectMapper();\n JsonNode serverState = mapper.readValue(baos.toByteArray(), JsonNode.class);\n JsonNode patchAsNode = mapper.readValue(readerInterceptorContext.getInputStream(), JsonNode.class);\n JsonPatch patch = JsonPatch.fromJson(patchAsNode);\n\n try {\n // Apply the patch\n JsonNode result = patch.apply(serverState);\n\n // Stream the result & modify the stream on the readerInterceptor\n ByteArrayOutputStream resultAsByteArray = new ByteArrayOutputStream();\n mapper.writeValue(resultAsByteArray, result);\n readerInterceptorContext.setInputStream(new ByteArrayInputStream(resultAsByteArray.toByteArray()));\n\n // Pass control back to the Jersey code\n return readerInterceptorContext.proceed();\n } catch (JsonPatchException ex) {\n throw new InternalServerErrorException(\"Error applying patch.\", ex);\n }\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/clusterversions/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<ClusterVersion> patchClusterVersion(\n @Path(\"name\") String name, \n @Body ClusterVersion body);", "List<PsdContract> wrapContracts(List<CDSContract> xmlContractsList, List<PsdProduct> productDtosList);" ]
[ "0.57335544", "0.55495965", "0.55305725", "0.54426557", "0.54053354", "0.5387123", "0.53510565", "0.5349601", "0.53389275", "0.5314232", "0.5294991", "0.5251549", "0.5240746", "0.5188949", "0.5141636", "0.5132685", "0.5114606", "0.51004606", "0.50535744", "0.50219256", "0.49972922", "0.4944166", "0.49219176", "0.49173957", "0.4906809", "0.48920438", "0.48918775", "0.48906308", "0.4875723", "0.48722345", "0.48481297", "0.48401535", "0.481538", "0.4795958", "0.47956115", "0.47912234", "0.47797987", "0.47735423", "0.47651434", "0.475829", "0.475829", "0.475829", "0.475829", "0.47573242", "0.47566178", "0.47515625", "0.47340652", "0.47303003", "0.47240663", "0.4717949", "0.47121924", "0.4709885", "0.46513185", "0.4647017", "0.4647017", "0.4647017", "0.4647017", "0.46383786", "0.46308565", "0.46272334", "0.4621692", "0.46032894", "0.45944655", "0.45920315", "0.45872113", "0.45828044", "0.45723557", "0.45694706", "0.45676485", "0.45660466", "0.45634788", "0.45613223", "0.4560752", "0.45480686", "0.45456222", "0.45450884", "0.4534467", "0.45243806", "0.45237133", "0.45230156", "0.4507195", "0.45000988", "0.4494757", "0.44923645", "0.44910982", "0.44852203", "0.44852203", "0.44852203", "0.44852203", "0.4476526", "0.44732016", "0.44725585", "0.44679043", "0.4467757", "0.446581", "0.4464967", "0.44647688", "0.44640446", "0.44633693", "0.44589657" ]
0.47980613
33
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling patchContract(Async)"); } return patchContractCall(generalContractId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract(Async)\");\n }\n\n return updateContractCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getOneValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getOne(Async)\");\n }\n\n return getOneCall(generalContractId);\n }", "public TbContract verifyContractIdExist(int chainId, int contractId, int groupId) {\n ContractParam param = new ContractParam(chainId, contractId, groupId);\n TbContract contract = queryContract(param);\n if (Objects.isNull(contract)) {\n log.info(\"contractId is invalid. contractId:{}\", contractId);\n throw new BaseException(ConstantCode.INVALID_CONTRACT_ID);\n }\n return contract;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call revokeAccrualValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling revokeAccrual(Async)\");\n }\n\n return revokeAccrualCall(generalContractId);\n }", "public void setContractId(int value) {\n this.contractId = value;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }\n\n return getIframeOptionsCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)\");\n }\n\n return getTransferBalanceCall(generalContractId);\n }", "public void setContractId(Integer contractId) {\n this.contractId = contractId;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)\");\n }\n\n return getThirdPartyConfigurationCall(generalContractId);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)\");\n }\n\n return getAvailableCurrenciesCall(generalContractId);\n }", "public Call getOneCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public int getContractId() {\n return contractId;\n }", "public String getContractId() {\n return contractId;\n }", "public void setContractId(String contractId) {\n this.contractId = contractId == null ? null : contractId.trim();\n }", "public Integer getContractId() {\n return contractId;\n }", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "public boolean isSetSledContractId() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEDCONTRACTID_ISSET_ID);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateThirdPartyConfiguration(Async)\");\n }\n\n return updateThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call updateBankAccountValidateBeforeCall(String generalContractId, BankAccountDescriptor body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateBankAccount(Async)\");\n }\n\n return updateBankAccountCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call patchThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling patchThirdPartyConfiguration(Async)\");\n }\n\n return patchThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)\");\n }\n\n return addThirdPartyConfigurationCall(generalContractId, body);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call terminateValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling terminate(Async)\");\n }\n\n return terminateCall(generalContractId);\n }", "public void setSContractNo(String sContractNo) {\n this.sContractNo = sContractNo;\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n Contract contract0 = new Contract();\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"FkqJC9O=9\", (String) null, (-4322.0), (String) null, (String) null, 1274, (String) null, (String) null, (String) null, (String) null, \" underComp.conId =\", \"kJtj\", (String) null, (String) null);\n String string0 = EWrapperMsgGenerator.bondContractDetails(1274, contractDetails0);\n assertEquals(\"reqId = 1274 ===================================\\n ---- Bond Contract Details begin ----\\nsymbol = null\\nsecType = null\\ncusip = null\\ncoupon = 0.0\\nmaturity = null\\nissueDate = null\\nratings = null\\nbondType = null\\ncouponType = null\\nconvertible = false\\ncallable = false\\nputable = false\\ndescAppend = null\\nexchange = null\\ncurrency = null\\nmarketName = FkqJC9O=9\\ntradingClass = null\\nconid = 0\\nminTick = -4322.0\\norderTypes = null\\nvalidExchanges = null\\nnextOptionDate = null\\nnextOptionType = null\\nnextOptionPartial = false\\nnotes = null\\nlongName = null\\n ---- Bond Contract Details End ----\\n\", string0);\n }", "public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PATCH\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public void setPartnerContractId(Integer partnerContractId) {\r\n this.partnerContractId = partnerContractId;\r\n }", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public TbContract verifyContractDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() != contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_NOT_DEPLOY);\n }\n return contract;\n }", "public String getContractNumber() {\n return contractNumber;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void setContractorID(int contractorID) {\n this.contractorID = contractorID;\n }", "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)\");\n }\n\n return addPaymentLinkConfigurationCall(generalContractId, body);\n }", "boolean hasBusinessCircleId();", "public TbContract verifyContractNotDeploy(int chainId, int contractId, int groupId) {\n TbContract contract = verifyContractIdExist(chainId, contractId, groupId);\n if (ContractStatus.DEPLOYED.getValue() == contract.getContractStatus()) {\n log.info(\"contract had bean deployed contractId:{}\", contractId);\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n }\n return contract;\n }", "public Call updateContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"PUT\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@SuppressWarnings(\"rawtypes\")\n private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)\");\n }\n\n return getAvailablePaymentMethodsCall(generalContractId, body);\n }", "public void setContractAmount(Integer contractAmount) {\n this.contractAmount = contractAmount;\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }", "public void setBaseContract(String baseContract) {\n this.baseContract = baseContract;\n }", "public void createContract() {\n\r\n\t}", "public void initContract(ContractInfo contractInfo)\n {\n this.contractInfo = contractInfo;\n }", "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n Vector<String> vector0 = new Vector<String>();\n Contract contract0 = new Contract(0, \"X_\", \"X_\", \"X_\", 1833, \"X_\", \"liquidHours = \", \"X_\", \"Error - \", (String) null, vector0, \"com.ib.client.Execution\", true, \"liquidHours = \", \"com.ib.client.Execution\");\n ContractDetails contractDetails0 = new ContractDetails(contract0, \"\", (String) null, (-2818.2935355), \"\", \"H9~[N\\\"Hv`#|kr]\", 13, \"H9~[N\\\"Hv`#|kr]\", \" underComp.delta =\", \"\", \" underComp.delta =\", \"X_\", (String) null, \"M]G9k=@}tbK\", \"Bwn1n;uU*\");\n String string0 = EWrapperMsgGenerator.contractDetails(1833, contractDetails0);\n assertEquals(\"reqId = 1833 ===================================\\n ---- Contract Details begin ----\\nconid = 0\\nsymbol = X_\\nsecType = X_\\nexpiry = X_\\nstrike = 1833.0\\nright = X_\\nmultiplier = liquidHours = \\nexchange = X_\\nprimaryExch = com.ib.client.Execution\\ncurrency = Error - \\nlocalSymbol = null\\nmarketName = \\ntradingClass = null\\nminTick = -2818.2935355\\nprice magnifier = 0\\norderTypes = \\nvalidExchanges = H9~[N\\\"Hv`#|kr]\\nunderConId = 13\\nlongName = H9~[N\\\"Hv`#|kr]\\ncontractMonth = underComp.delta =\\nindustry = \\ncategory = underComp.delta =\\nsubcategory = X_\\ntimeZoneId = null\\ntradingHours = M]G9k=@}tbK\\nliquidHours = Bwn1n;uU*\\n ---- Contract Details End ----\\n\", string0);\n }", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "boolean isSetCompanyBaseData();", "@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }", "public void setContractNumber(String contractNumber) {\n this.contractNumber = contractNumber == null ? null : contractNumber.trim();\n }", "public ContractMethod() {\n }", "@SuppressWarnings(\"rawtypes\")\n private Call removeThirdPartyConfigurationValidateBeforeCall(String generalContractId, String thirdPartyName) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling removeThirdPartyConfiguration(Async)\");\n }\n // verify the required parameter 'thirdPartyName' is set\n if (thirdPartyName == null) {\n throw new ApiException(\"Missing the required parameter 'thirdPartyName' when calling removeThirdPartyConfiguration(Async)\");\n }\n\n return removeThirdPartyConfigurationCall(generalContractId, thirdPartyName);\n }", "@Test\n public void testGetBusinessId() {\n \n \n assertNull(o1.getBusinessId());\n o1.setBusinessId(Integer.MIN_VALUE);\n assertNotNull(o1.getBusinessId());\n assertEquals(new Integer(Integer.MIN_VALUE), o1.getBusinessId());\n }", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "java.lang.String getContract();", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public Call terminateCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/terminate\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "public abstract void deleteContract(String contractNumber);", "public void checkCreditCard() throws BusinessException;", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "@Test\n public void merchantidTest() {\n assertEquals(Integer.valueOf(12345), authResponse.getMerchantid());\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "private static void validateBaseRequest(final InvBaseRequest request) {\r\n\t\tif (request == null) {\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Request is Null.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Request is Null\");\r\n\t\t}\r\n\r\n\t\tif(request.getTransactionId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid Transaction ID.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid Transaction ID.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getUserId() == null){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Invalid User Id.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid User Id.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(null == request.getDistributionCenter() || request.getDistributionCenter().isEmpty() || null == request.getShipToCustomer() || request.getShipToCustomer().isEmpty() ){\r\n\t\t\tLOGGER.severe(MessageLoggerHelper.buildErrorMessage(\r\n\t\t\t\t\trequest.getShipToCustomer(), request.getUserId(), request.getTransactionId(),\r\n\t\t\t\t\tErrorHandlingHelper.getErrorCodeByErrorKey(\r\n\t\t\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION),\r\n\t\t\t\t\tInventoryConstants.ErrorKeys.ILLEGAL_ARG_EXCEPTION_DESC +\r\n\t\t\t\t\t\". Account should not be empty.\"));\r\n\t\t\tthrow new IllegalArgumentException(\"Account should not be empty\");\r\n\t\t}\r\n\t}", "public void setXpeContractId(String value) {\n setAttributeInternal(XPECONTRACTID, value);\n }", "@Test\n public void testFailureParInvalidPkceSetting() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n updateClientByAdmin(clientId, (ClientRepresentation cRep)->{\n OIDCAdvancedConfigWrapper.fromClientRepresentation(cRep).setPkceCodeChallengeMethod(\"S256\");\n });\n\n // Pushed Authorization Request\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(400, pResp.getStatusCode());\n assertEquals(OAuthErrorException.INVALID_REQUEST, pResp.getError());\n assertEquals(\"Missing parameter: code_challenge_method\", pResp.getErrorDescription());\n }", "public static int withContract() {\n\t\t{\n\t\t\tString choice;\n\t\t\tint startover;\n\t\t\tImageIcon picture;\n\t\t\tint selectedCode;\n\t\t\tint number1 = (int) (900 * Math.random() + 100);\n\t\t\tint number2 = (int) (9000 * Math.random() + 1000);\n\t\t\tString[] choices = modelsForContract();\n\t\t\t\n\t\t\t// asks which phone the user wants by showing the options based upon their contract preferences\n\t\t\t\n\t\t\tchoice = (String) JOptionPane.showInputDialog(null, \"Which phone whould you like?\", \"Phone Selection\", \n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, icon, choices, null);\n\t\t\t\n\t\t\t// Depending on the selection, the phones image is displayed.\n\t\t\tif (choice == choices[0])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"galaxyS9.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[1])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"iphoneX.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[2])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"googlePixel.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[3])\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"Motorola.png\");\n\t\t\t}\n\t\t\telse if (choice == choices[4])\n\t\t\t{\n\t\t\t\tSystem.out.print(\"HI\");\n\t\t\t\tpicture = new ImageIcon(\"Huawei.png\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction Canceled.\", \"Cancel\", JOptionPane.WARNING_MESSAGE, null);\n\t\t\t\tselectedCode = 0;\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// Then the area code selection is presented.\n\t\t\tselectedCode = JOptionPane.showOptionDialog(null, \"Please select an area code from below\",\n\t\t\t\t\t\"Area Code Selection\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, picture, areaCodes, areaCodes[0]);\n\t\t\t\n\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Congratulations, \" + firstName + \"!\\nYour new phone is the \" + choice + \".\"\n\t\t\t\t\t+ \"\\nAnd your new phone number is \" + areaCodes[selectedCode] + \"-\" + number1 + \"-\" + number2 + \"!\",\n\t\t\t\t\t\"Congratulations!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\n\t\t\tstartover = JOptionPane.showOptionDialog(null, \"Would you like to buy another phone \" + firstName + \"?\",\n\t\t\t\t\t\"Awesome Smartphone\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon, null, 0);\n\t\t\t\n\t\t\tif (startover == 1)\n\t\t\t{\n\t\t\t\tpicture = new ImageIcon(\"phoneStoreLogo.png\");\n\t\t\t\tUIManager.put(\"OptionPane.informationIcon\", picture);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Thank you for your business!\",\n\t\t\t\t\t\t\"Thank You!\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t}\n\t\t\treturn startover;\n\t\t}\n\t}", "void setIdVerificationResponseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData idVerificationResponseData);", "boolean isSetIdVerificationResponseData();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ggeneral)) {\n return false;\n }\n Ggeneral other = (Ggeneral) object;\n if ((this.idgeneral == null && other.idgeneral != null) || (this.idgeneral != null && !this.idgeneral.equals(other.idgeneral))) {\n return false;\n }\n return true;\n }", "public void setCodeCombinationsIdFromGeneral(XxGamMaGeneralReqVORowImpl generalRow) {\n if (generalRow != null) {\n Number codeCombinationId = null;\n codeCombinationId = generalRow.getCostCenter();\n if (codeCombinationId != null) {\n\n RowSetIterator rowSetIter = getRowSetIterator();\n if (rowSetIter != null) {\n rowSetIter.reset();\n while (rowSetIter.hasNext()) {\n Row row = rowSetIter.next();\n XxGamMaPaymentReqVORowImpl detailRow = \n (XxGamMaPaymentReqVORowImpl)row;\n if (detailRow != null) {\n if (detailRow.getGeneralReqId().equals(generalRow.getId())) {\n detailRow.setCodeCombinationId(codeCombinationId);\n }\n }\n }\n rowSetIter.reset();\n }\n }\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Test\n\tpublic void testValidateSurveyResponseId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSurveyResponseId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSurveyResponseId(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response ID was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\t// This may be any long value as it is simply a database ID.\n\t\t\tUUID uuid = UUID.randomUUID();\n\t\t\tAssert.assertEquals(uuid, SurveyResponseValidators.validateSurveyResponseId(uuid.toString()));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public int getContractorID() {\n return contractorID;\n }", "@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }", "@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }", "public boolean modifyContract(Contract contract) {\n\t\treturn contractdao.modifyContract(contract);\n\t}", "boolean isSetCapitalPayed();", "public Integer getPartnerContractId() {\r\n return partnerContractId;\r\n }", "protected boolean validateSubContract(SubContract subContract,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = subContract.getParentContract().getValidityPeriod();\n \n BasicDiagnostic parameterBlocksDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_BLOCK_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterBlocksValid = validateParameterBlocks(subContract, parameterBlocksDiagnostics, context);\n if(!parameterBlocksValid)\n diagnostics.add(parameterBlocksDiagnostics);\n\n BasicDiagnostic parameterMapsDiagnostics = new BasicDiagnostic(Diagnostic.OK,\n SOURCE_SUB_CONTRACT,\n PARAMETER_MAP_CAT,\n \"\",\n new Object[]{subContract});\n boolean parameterMapsValid = validateParameterMaps(subContract, parameterMapsDiagnostics, context);\n if(!parameterMapsValid)\n diagnostics.add(parameterMapsDiagnostics);\n \n boolean parentValid = true;\n if(!subContract.getPrimaryContract().getValidityPeriod().contains(newPeriod)){\n parentValid &= false;\n diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_SUB_CONTRACT, SUB_CONTRACT__RANGE, String.format(\n \"[%s] '%s' conflicts with parent '%s'\", \"Range\",\n getDisplayString(newPeriod), getDisplayString(subContract\n .getPrimaryContract().getValidityPeriod())), new Object[]{subContract.getPrimaryContract()}));\n }\n \n return parameterBlocksValid && parameterMapsValid && parentValid;\n }", "@Test\n public void testInsuredPayerPayersId() {\n new InsuredPayerFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissInsuredPayer.Builder::setPayersIdEnum,\n RdaFissPayer::getPayersId,\n FissPayersCode.PAYERS_CODE_AUTO_NO_FAULT,\n \"D\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissInsuredPayer.Builder::setPayersIdUnrecognized,\n RdaFissPayer::getPayersId,\n RdaFissPayer.Fields.payersId,\n 1);\n }", "@Override\n\tpublic void setFTGLId(FinancialTransactionGeneralLedger_Id arg0) {\n\n\t}", "public Call revokeAccrualCall(String generalContractId) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/General/Contracts/{generalContractId}/revokeAccrual\"\n .replaceAll(\"\\\\{\" + \"generalContractId\" + \"\\\\}\", apiClient.escapeString(generalContractId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"oauth_token\" };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames);\n }", "@Test\r\n\tvoid testContactServiceUpdateContactWithInValidID() {\r\n\t\tAssertions.assertThrows(IllegalArgumentException.class, () -> {\r\n\t\t\tcontactService.updateContactFirstName(\"none\", \"enon\");\r\n\t\t});\r\n\t}", "@Test\n\tpublic void testValidateReturnId() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateReturnId(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateReturnId(\"Invalid value.\");\n\t\t\t\tfail(\"The return ID value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validateReturnId(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validateReturnId(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void binCommercialTest() {\n assertFalse(authResponse.isBinCommercial());\n }", "public boolean isSetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(GENERAL$20) != 0;\r\n }\r\n }", "private Contract() {\n }", "@Test\n public void testInsuredPayerTreatAuthCd() {\n new InsuredPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissInsuredPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }", "VerifyBasicCallback(TPCCSimulation.Transaction transaction, String procName) {\n m_transactionType = transaction;\n m_procedureName = procName;\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "boolean isSetNcbistdaa();", "public void onClick(DialogInterface dialog, int id)\n {\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }", "public void m9130p() throws cf {\r\n if (this.f6007a == null) {\r\n throw new cz(\"Required field 'domain' was not present! Struct: \" + toString());\r\n } else if (this.f6009c == null) {\r\n throw new cz(\"Required field 'new_id' was not present! Struct: \" + toString());\r\n }\r\n }", "@Test\n public void testBeneZPayerTreatAuthCd() {\n new BeneZPayerFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissBeneZPayer.Builder::setTreatAuthCd,\n RdaFissPayer::getTreatAuthCd,\n RdaFissPayer.Fields.treatAuthCd,\n 18);\n }" ]
[ "0.6566565", "0.6497611", "0.622235", "0.6210186", "0.6131018", "0.60290796", "0.59923744", "0.58934605", "0.58661616", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142", "0.53970677", "0.53854465", "0.53708893", "0.535706", "0.53022665", "0.5297568", "0.5285573", "0.52775395", "0.5228783", "0.52161616", "0.5215486", "0.5205767", "0.5205767", "0.5199093", "0.51915133", "0.51328886", "0.5033789", "0.5029831", "0.5028553", "0.5016704", "0.50105745", "0.498703", "0.49869227", "0.49858847", "0.49840963", "0.4981568", "0.49711713", "0.49521965", "0.49504304", "0.4947746", "0.49310437", "0.49262455", "0.49186945", "0.48840562", "0.48525771", "0.4834332", "0.4834332", "0.4834332", "0.4834332", "0.48338956", "0.48318732", "0.48279566", "0.48160288", "0.4812081", "0.47995192", "0.47923365", "0.4781422", "0.47777963", "0.47646332", "0.47629628", "0.47589943", "0.4757054", "0.4750851", "0.47358122", "0.47310758", "0.4729941", "0.4721001", "0.47173005", "0.47168317", "0.47128192", "0.4699858", "0.4696607", "0.4694214", "0.4693992", "0.4684683", "0.4683533", "0.4683291", "0.46758085", "0.46754542", "0.4674884", "0.46742436", "0.46673056", "0.46622548", "0.466158", "0.46588138", "0.4658", "0.46564242", "0.46557775", "0.46517795", "0.46499386" ]
0.64637333
2