query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Create a new CurrencyDateCalculatorBuilder specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig. NOTE that USD currency holiday must also be registered.
CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface KitCalculatorsFactory<E> {\r\n\r\n /**\r\n * Create a new CurrencyDateCalculatorBuilder specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculatorBuilder\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n CurrencyDateCalculator<E> buildCurrencyDateCalculator(CurrencyDateCalculatorBuilder<E> builder);\r\n\r\n /**\r\n * Create a new IMMUTABLE CurrencyDateCalculator specialised for 2 currencies, including WorkingWeek, calendars\r\n * registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n /**\r\n * Use this method register a specific currency config, if not provided then the DefaultCurrencyCalculatorConfig will be given.\r\n * @param config that specifies the set of currencies subject to USD T+1.\r\n */\r\n void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);\r\n\r\n CurrencyCalculatorConfig getCurrencyCalculatorConfig();\r\n\r\n /**\r\n * Create a new DateCalculator for a given name and type of handling.\r\n *\r\n * @param name\r\n * calendar name (holidays set interested in). If there is set of\r\n * holidays with that name, it will return a DateCalculator with\r\n * an empty holiday set (will work on Weekend only).\r\n * @param holidayHandlerType\r\n * typically one of the value of HolidayHandlerType or null.\r\n * @return a new DateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n */\r\n DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);\r\n\r\n /**\r\n * Use this method to register a holidays calendar.\r\n *\r\n * @param calendarName\r\n * the calendar name to register these holidays under.\r\n * @param holidaysCalendar\r\n * the holiday calendar (non-working days with boundaries).\r\n */\r\n KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);\r\n\r\n /**\r\n * @return true if the holiday calendar name is registered.\r\n */\r\n boolean isHolidayCalendarRegistered(String calendarName);\r\n\r\n /**\r\n * @return an immutable Holiday Calendar name that is registered.\r\n */\r\n HolidayCalendar<E> getHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * @return an immutable set of registered calendar names\r\n */\r\n Set<String> getRegisteredHolidayCalendarNames();\r\n\r\n /**\r\n * Unregister a given holiday calendar\r\n * @param calendarName\r\n * the calendar name to unregister.\r\n */\r\n KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * unregister all holiday calendars;\r\n */\r\n KitCalculatorsFactory<E> unregisterAllHolidayCalendars();\r\n\r\n // -----------------------------------------------------------------------\r\n //\r\n // ObjectLab, world leaders in the design and development of bespoke\r\n // applications for the securities financing markets.\r\n // www.ObjectLab.co.uk\r\n //\r\n // -----------------------------------------------------------------------\r\n\r\n /**\r\n * Create a new PeriodCountCalculator.\r\n *\r\n * @return a PeriodCountCalculator\r\n */\r\n PeriodCountCalculator<E> getPeriodCountCalculator();\r\n\r\n /**\r\n * Create a new IMMDateCalculator.\r\n *\r\n * @return an IMMDateCalculator\r\n */\r\n IMMDateCalculator<E> getIMMDateCalculator();\r\n\r\n /**\r\n * Create a new holiday handler of given type\r\n * @param holidayHandlerType\r\n * @return a new handler\r\n * @throws IllegalArgumentException if the holidayHandlerType is unsupported\r\n * @since 1.4.0\r\n */\r\n HolidayHandler<E> getHolidayHandler(String holidayHandlerType);\r\n\r\n}", "CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);", "DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);", "public Pokemon.Currency.Builder getCurrencyBuilder() {\n bitField0_ |= 0x00000400;\n onChanged();\n return getCurrencyFieldBuilder().getBuilder();\n }", "void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);", "public static CartDiscountSetValidFromAndUntilActionBuilder builder() {\n return CartDiscountSetValidFromAndUntilActionBuilder.of();\n }", "KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);", "@Override\n\t\tpublic FTECost build() {\n\t\t\tMoney totalCost = Money.zero(Monetary.getCurrency(CurrencyCode.INR.name())).add(cost.annualSalary).add(cost.commission).add(cost.bonus).add(cost.otherCost);\n\t\t\tMoney hourlyRate = totalCost.divide(Costing.NUMBER_OF_WEEKS_IN_A_YEAR).divide(Costing.STANDARD_WORKING_HOURS_PER_WEEK);\n\t\t\tthis.cost.payment(Payment.of(PayRateUnit.HOURLY, hourlyRate));\n\t\t\treturn this.cost;\n\t\t}", "protected ValueConverter createExpressionBuilderConverter() {\n\t\tConverterManager manager = new ConverterManager();\n\t\tmanager.addGlobalConverter(new DummyConverter());\n\t\t\n\t\tIterator i = this.valueConverters.keySet().iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tString valueName = (String) i.next();\n\t\t\tConverter converter = (Converter) this.valueConverters\n\t\t\t.get(valueName);\n\t\t\tif (converter != null) {\n\t\t\t\tmanager.addConverter(valueName, converter);\n\t\t\t}\n\t\t}\n\t\treturn manager;\n\t}", "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testDifferentCurrencies() {\n new CouponIborDefinition(Currency.AUD, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, INDEX, CALENDAR);\n }", "KitCalculatorsFactory<E> unregisterAllHolidayCalendars();", "public static final BondStream Create (\n\t\tfinal int iMaturityDate,\n\t\tfinal int iEffectiveDate,\n\t\tfinal int iFinalMaturityDate,\n\t\tfinal int iFirstCouponDate,\n\t\tfinal int iInterestAccrualStartDate,\n\t\tfinal int iFreq,\n\t\tfinal double dblCoupon,\n\t\tfinal java.lang.String strCouponDC,\n\t\tfinal java.lang.String strAccrualDC,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapPay,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapReset,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapMaturity,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapEffective,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapPeriodEnd,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapAccrualEnd,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapPeriodStart,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapAccrualStart,\n\t\tfinal java.lang.String strMaturityType,\n\t\tfinal boolean bPeriodsFromForward,\n\t\tfinal java.lang.String strCalendar,\n\t\tfinal java.lang.String strCurrency,\n\t\tfinal org.drip.state.identifier.FloaterLabel floaterLabel,\n\t\tfinal org.drip.state.identifier.EntityCDSLabel creditLabel)\n\t{\n\t\tboolean bCouponEOMAdj = null == strCouponDC ? false : strCouponDC.toUpperCase().contains (\"EOM\");\n\n\t\tint iCouponDCIndex = null == strCouponDC ? -1 : strCouponDC.indexOf (\" NON\");\n\n\t\tjava.lang.String strCouponDCAdj = -1 != iCouponDCIndex ? strCouponDC.substring (0, iCouponDCIndex) :\n\t\t\tstrCouponDC;\n\n\t\tboolean bAccrualEOMAdj = null == strAccrualDC ? false : strAccrualDC.toUpperCase().contains (\"EOM\");\n\n\t\tint iAccrualDCIndex = null == strAccrualDC ? -1 : strAccrualDC.indexOf (\" NON\");\n\n\t\tjava.lang.String strAccrualDCAdj = -1 != iAccrualDCIndex ? strAccrualDC.substring (0,\n\t\t\tiAccrualDCIndex) : strAccrualDC;\n\n\t\torg.drip.analytics.date.JulianDate dtEffective = new org.drip.analytics.date.JulianDate\n\t\t\t(iEffectiveDate);\n\n\t\torg.drip.analytics.date.JulianDate dtMaturity = new org.drip.analytics.date.JulianDate\n\t\t\t(iMaturityDate);\n\n\t\tjava.lang.String strTenor = (12 / iFreq) + \"M\";\n\t\tjava.util.List<org.drip.analytics.cashflow.CompositePeriod> lsCouponPeriod = null;\n\n\t\ttry {\n\t\t\torg.drip.param.period.UnitCouponAccrualSetting ucas = new\n\t\t\t\torg.drip.param.period.UnitCouponAccrualSetting (iFreq, strCouponDCAdj, bCouponEOMAdj,\n\t\t\t\t\tstrAccrualDCAdj, bAccrualEOMAdj, strCurrency, false,\n\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC);\n\n\t\t\torg.drip.param.period.CompositePeriodSetting cps = new\n\t\t\t\torg.drip.param.period.CompositePeriodSetting (iFreq, strTenor, strCurrency, dapPay, 1., null,\n\t\t\t\t\tnull, null, creditLabel);\n\n\t\t\tjava.util.List<java.lang.Integer> lsStreamEdgeDate = bPeriodsFromForward ?\n\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.ForwardEdgeDates (dtEffective, dtMaturity,\n\t\t\t\t\tstrTenor, dapAccrualEnd, org.drip.analytics.support.CompositePeriodBuilder.LONG_STUB) :\n\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.BackwardEdgeDates (dtEffective,\n\t\t\t\t\t\t\tdtMaturity, strTenor, dapAccrualEnd,\n\t\t\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.LONG_STUB);\n\n\t\t\tif (null == floaterLabel) {\n\t\t\t\torg.drip.param.period.ComposableFixedUnitSetting cfus = new\n\t\t\t\t\torg.drip.param.period.ComposableFixedUnitSetting (strTenor,\n\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.EDGE_DATE_SEQUENCE_SINGLE, null,\n\t\t\t\t\t\t\tdblCoupon, 0., strCurrency);\n\n\t\t\t\tlsCouponPeriod = org.drip.analytics.support.CompositePeriodBuilder.FixedCompositeUnit\n\t\t\t\t\t(lsStreamEdgeDate, cps, ucas, cfus);\n\t\t\t} else {\n\t\t\t\torg.drip.param.period.ComposableFloatingUnitSetting cfus = new\n\t\t\t\t\torg.drip.param.period.ComposableFloatingUnitSetting (strTenor,\n\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.EDGE_DATE_SEQUENCE_SINGLE, null,\n\t\t\t\t\t\t\tfloaterLabel,\n\t\t\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.REFERENCE_PERIOD_IN_ADVANCE,\n\t\t\t\t\tdblCoupon);\n\n\t\t\t\tlsCouponPeriod = org.drip.analytics.support.CompositePeriodBuilder.FloatingCompositeUnit\n\t\t\t\t\t(lsStreamEdgeDate, cps, cfus);\n\t\t\t}\n\n\t\t\treturn new BondStream (lsCouponPeriod, iFinalMaturityDate, strMaturityType);\n\t\t} catch (java.lang.Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}", "public static StandalonePriceSetValidFromActionBuilder builder() {\n return StandalonePriceSetValidFromActionBuilder.of();\n }", "private static IWorkingDays getWorkingDaysStrategy(Currency currency) {\n if ((currency.getCurrencyCode().equals(\"AED\")) ||\n (currency.getCurrencyCode().equals(\"SAR\")))\n {\n return ArabiaWorkingDays.getInstance();\n }\n return DefaultWorkingDays.getInstance();\n }", "public static VolatilityWeightedReturnConverter.Builder builder() {\n return new VolatilityWeightedReturnConverter.Builder();\n }", "public static CurrencyEvent createCurrencyEvent() throws ParseException {\n \n JSONArray jSONArray = CurrencyRateParser.httpGetCall(API_URL, \"prices\");\n ArrayList arrayList = CurrencyRateParser.convertToArrayList(jSONArray);\n \n String INSTRUMENT = arrayList.get(0).toString();\n Date CURRENTTIME = parseRFC3339Date(arrayList.get(1).toString());\n double BID = Double.valueOf(arrayList.get(2).toString());\n double ASK = Double.valueOf(arrayList.get(3).toString());\n CurrencyEvent currencyEvent = new CurrencyEvent(INSTRUMENT, CURRENTTIME, BID, ASK);\n return currencyEvent;\n }", "public static CartDiscountSetValidFromAndUntilActionBuilder builder(\n final CartDiscountSetValidFromAndUntilAction template) {\n return CartDiscountSetValidFromAndUntilActionBuilder.of(template);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n birthdayEvaluator1 = new com.toedter.calendar.demo.BirthdayEvaluator();\n birthdayEvaluator2 = new com.toedter.calendar.demo.BirthdayEvaluator();\n jLocaleChooserBeanInfo1 = new com.toedter.components.JLocaleChooserBeanInfo();\n txtRqID = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n txtAddress = new javax.swing.JTextField();\n txtJob = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n txtName = new javax.swing.JTextField();\n txtColl = new javax.swing.JTextField();\n txtGrade = new javax.swing.JTextField();\n jLabel16 = new javax.swing.JLabel();\n txtAcc = new javax.swing.JTextField();\n jLabel15 = new javax.swing.JLabel();\n txtindentify = new javax.swing.JTextField();\n txtLoanStatus = new javax.swing.JTextField();\n jLabel14 = new javax.swing.JLabel();\n txtLoanType = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n txtSalary = new javax.swing.JFormattedTextField();\n txtLoanAmount = new javax.swing.JFormattedTextField();\n btnAppcept = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n txtDob = new com.toedter.calendar.JDateChooser();\n jLabel3 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n spPeriod = new javax.swing.JSpinner();\n txtPhone = new javax.swing.JFormattedTextField();\n txtIntRate = new javax.swing.JTextField();\n btnCancel = new javax.swing.JButton();\n\n txtRqID.setText(\"jTextField1\");\n\n setBackground(new java.awt.Color(204, 255, 204));\n setBorder(javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(0, 0, 255), new java.awt.Color(153, 153, 255)));\n setLayout(new java.awt.BorderLayout());\n\n jPanel1.setBackground(new java.awt.Color(204, 255, 204));\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"NEW CONTRACT\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font(\"Agency FB\", 1, 18), new java.awt.Color(51, 51, 255))); // NOI18N\n jPanel1.setLayout(new java.awt.GridBagLayout());\n\n jLabel9.setText(\"Loan Amount :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 8;\n gridBagConstraints.gridy = 11;\n gridBagConstraints.gridwidth = 5;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(18, 24, 0, 0);\n jPanel1.add(jLabel9, gridBagConstraints);\n\n jLabel6.setText(\"Period :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 13;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(21, 106, 0, 0);\n jPanel1.add(jLabel6, gridBagConstraints);\n\n jLabel8.setText(\"Phone :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 11;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.gridwidth = 6;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(14, 20, 0, 0);\n jPanel1.add(jLabel8, gridBagConstraints);\n\n jLabel10.setText(\"Collateral :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 11;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(18, 91, 0, 0);\n jPanel1.add(jLabel10, gridBagConstraints);\n\n txtAddress.setForeground(new java.awt.Color(51, 51, 255));\n txtAddress.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtAddress.setEnabled(false);\n txtAddress.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 360;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(8, 16, 0, 0);\n jPanel1.add(txtAddress, gridBagConstraints);\n\n txtJob.setForeground(new java.awt.Color(51, 51, 255));\n txtJob.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtJob.setEnabled(false);\n txtJob.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 8;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 360;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(15, 16, 0, 0);\n jPanel1.add(txtJob, gridBagConstraints);\n\n jLabel11.setText(\"Interest Rate :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 31;\n gridBagConstraints.gridy = 15;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(12, 18, 0, 0);\n jPanel1.add(jLabel11, gridBagConstraints);\n\n txtName.setForeground(new java.awt.Color(51, 51, 255));\n txtName.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtName.setEnabled(false);\n txtName.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 360;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(18, 16, 0, 0);\n jPanel1.add(txtName, gridBagConstraints);\n\n txtColl.setForeground(new java.awt.Color(51, 51, 255));\n txtColl.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtColl.setEnabled(false);\n txtColl.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 11;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 360;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(18, 16, 0, 0);\n jPanel1.add(txtColl, gridBagConstraints);\n\n txtGrade.setForeground(new java.awt.Color(51, 51, 255));\n txtGrade.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtGrade.setEnabled(false);\n txtGrade.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 20;\n gridBagConstraints.gridy = 15;\n gridBagConstraints.gridwidth = 11;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 53;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(9, 18, 0, 0);\n jPanel1.add(txtGrade, gridBagConstraints);\n\n jLabel16.setText(\"Grade : \");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 11;\n gridBagConstraints.gridy = 15;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(12, 5, 0, 0);\n jPanel1.add(jLabel16, gridBagConstraints);\n\n txtAcc.setForeground(new java.awt.Color(51, 51, 255));\n txtAcc.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtAcc.setEnabled(false);\n txtAcc.setPreferredSize(new java.awt.Dimension(50, 30));\n txtAcc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtAccActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 20;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 13;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 275;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(24, 18, 0, 16);\n jPanel1.add(txtAcc, gridBagConstraints);\n\n jLabel15.setText(\"Account No. :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 8;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 9;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(27, 30, 0, 0);\n jPanel1.add(jLabel15, gridBagConstraints);\n\n txtindentify.setForeground(new java.awt.Color(51, 51, 255));\n txtindentify.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtindentify.setEnabled(false);\n txtindentify.setPreferredSize(new java.awt.Dimension(50, 30));\n txtindentify.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtindentifyActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 360;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(24, 16, 0, 0);\n jPanel1.add(txtindentify, gridBagConstraints);\n\n txtLoanStatus.setForeground(new java.awt.Color(51, 51, 255));\n txtLoanStatus.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtLoanStatus.setEnabled(false);\n txtLoanStatus.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 15;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 360;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(9, 16, 0, 0);\n jPanel1.add(txtLoanStatus, gridBagConstraints);\n\n jLabel14.setText(\"Indentify Card :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(27, 67, 0, 0);\n jPanel1.add(jLabel14, gridBagConstraints);\n\n txtLoanType.setForeground(new java.awt.Color(51, 51, 255));\n txtLoanType.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtLoanType.setEnabled(false);\n txtLoanType.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 20;\n gridBagConstraints.gridy = 13;\n gridBagConstraints.gridwidth = 13;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 275;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(18, 18, 0, 16);\n jPanel1.add(txtLoanType, gridBagConstraints);\n\n jLabel13.setText(\"Loan Status : \");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 15;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(12, 69, 0, 0);\n jPanel1.add(jLabel13, gridBagConstraints);\n\n jLabel7.setText(\"Salary :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 11;\n gridBagConstraints.gridy = 8;\n gridBagConstraints.gridwidth = 6;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(21, 20, 0, 0);\n jPanel1.add(jLabel7, gridBagConstraints);\n\n jLabel5.setText(\"Company :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 8;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(18, 91, 0, 0);\n jPanel1.add(jLabel5, gridBagConstraints);\n\n txtSalary.setForeground(new java.awt.Color(51, 51, 255));\n txtSalary.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtSalary.setEnabled(false);\n txtSalary.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 20;\n gridBagConstraints.gridy = 8;\n gridBagConstraints.gridwidth = 13;\n gridBagConstraints.gridheight = 3;\n gridBagConstraints.ipadx = 275;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(18, 18, 0, 16);\n jPanel1.add(txtSalary, gridBagConstraints);\n\n txtLoanAmount.setForeground(new java.awt.Color(51, 51, 255));\n txtLoanAmount.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtLoanAmount.setEnabled(false);\n txtLoanAmount.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 20;\n gridBagConstraints.gridy = 11;\n gridBagConstraints.gridwidth = 13;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 275;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(18, 18, 0, 16);\n jPanel1.add(txtLoanAmount, gridBagConstraints);\n\n btnAppcept.setText(\"Appcept\");\n btnAppcept.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAppceptActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 17;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(9, 142, 10, 0);\n jPanel1.add(btnAppcept, gridBagConstraints);\n\n jLabel2.setText(\"Full Name :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(21, 91, 0, 0);\n jPanel1.add(jLabel2, gridBagConstraints);\n\n txtDob.setBackground(new java.awt.Color(255, 255, 255));\n txtDob.setForeground(new java.awt.Color(0, 0, 255));\n txtDob.setEnabled(false);\n txtDob.setMinSelectableDate(new java.util.Date(-62135791127000L));\n txtDob.setMinimumSize(new java.awt.Dimension(30, 25));\n txtDob.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 20;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 13;\n gridBagConstraints.gridheight = 3;\n gridBagConstraints.ipadx = 254;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(21, 18, 0, 16);\n jPanel1.add(txtDob, gridBagConstraints);\n\n jLabel3.setText(\"DoB :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 11;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = 6;\n gridBagConstraints.gridheight = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(27, 31, 0, 0);\n jPanel1.add(jLabel3, gridBagConstraints);\n\n jLabel12.setText(\"Loan Type : \");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 8;\n gridBagConstraints.gridy = 13;\n gridBagConstraints.gridwidth = 9;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(21, 36, 0, 0);\n jPanel1.add(jLabel12, gridBagConstraints);\n\n jLabel4.setText(\"Address :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(11, 97, 0, 0);\n jPanel1.add(jLabel4, gridBagConstraints);\n\n spPeriod.setEnabled(false);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 13;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 43;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(18, 17, 0, 0);\n jPanel1.add(spPeriod, gridBagConstraints);\n\n txtPhone.setForeground(new java.awt.Color(51, 51, 255));\n txtPhone.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtPhone.setEnabled(false);\n txtPhone.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 20;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.gridwidth = 13;\n gridBagConstraints.gridheight = 3;\n gridBagConstraints.ipadx = 275;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(11, 18, 0, 16);\n jPanel1.add(txtPhone, gridBagConstraints);\n\n txtIntRate.setForeground(new java.awt.Color(51, 51, 255));\n txtIntRate.setDisabledTextColor(new java.awt.Color(0, 0, 255));\n txtIntRate.setEnabled(false);\n txtIntRate.setPreferredSize(new java.awt.Dimension(50, 30));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 32;\n gridBagConstraints.gridy = 15;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 116;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(9, 10, 0, 16);\n jPanel1.add(txtIntRate, gridBagConstraints);\n\n btnCancel.setText(\"Cancel\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 11;\n gridBagConstraints.gridy = 17;\n gridBagConstraints.gridwidth = 10;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(9, 32, 10, 0);\n jPanel1.add(btnCancel, gridBagConstraints);\n\n add(jPanel1, java.awt.BorderLayout.CENTER);\n }", "private Builder(referential.store.v2.WeekPattern.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.patternId)) {\n this.patternId = data().deepCopy(fields()[0].schema(), other.patternId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.begDate)) {\n this.begDate = data().deepCopy(fields()[1].schema(), other.begDate);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.endDate)) {\n this.endDate = data().deepCopy(fields()[2].schema(), other.endDate);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.mondayTimeRanges)) {\n this.mondayTimeRanges = data().deepCopy(fields()[3].schema(), other.mondayTimeRanges);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.tuesdayTimeRanges)) {\n this.tuesdayTimeRanges = data().deepCopy(fields()[4].schema(), other.tuesdayTimeRanges);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.wednesdayTimeRanges)) {\n this.wednesdayTimeRanges = data().deepCopy(fields()[5].schema(), other.wednesdayTimeRanges);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.thursdayTimeRanges)) {\n this.thursdayTimeRanges = data().deepCopy(fields()[6].schema(), other.thursdayTimeRanges);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.fridayTimeRanges)) {\n this.fridayTimeRanges = data().deepCopy(fields()[7].schema(), other.fridayTimeRanges);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.saturdayTimeRanges)) {\n this.saturdayTimeRanges = data().deepCopy(fields()[8].schema(), other.saturdayTimeRanges);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.sundayTimeRanges)) {\n this.sundayTimeRanges = data().deepCopy(fields()[9].schema(), other.sundayTimeRanges);\n fieldSetFlags()[9] = true;\n }\n }", "public interface AmountFactory {\r\n Amount amountFrom(BigDecimal amountValue);\r\n\r\n Amount amountFrom(BigDecimal amountValue, BigDecimal multiplier);\r\n}", "public interface Calculator extends CalculatorEventContainer, HistoryControl<CalculatorHistoryState> {\n\n void init();\n\n /*\n **********************************************************************\n *\n * CALCULATIONS\n *\n **********************************************************************\n */\n\n void evaluate();\n\n void evaluate(@NotNull Long sequenceId);\n\n void simplify();\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression);\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression,\n @NotNull Long sequenceId);\n\n /*\n **********************************************************************\n *\n * CONVERSION\n *\n **********************************************************************\n */\n\n boolean isConversionPossible(@NotNull Generic generic, @NotNull NumeralBase from, @NotNull NumeralBase to);\n\n @NotNull\n CalculatorEventData convert(@NotNull Generic generic, @NotNull NumeralBase to);\n\n /*\n **********************************************************************\n *\n * EVENTS\n *\n **********************************************************************\n */\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Object source);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Long sequenceId);\n\n\t@NotNull\n\tPreparedExpression prepareExpression(@NotNull String expression) throws CalculatorParseException;\n}", "Calcul createCalcul();", "public interface WorkdayEndpointBuilder\n extends\n WorkdayEndpointConsumerBuilder,\n WorkdayEndpointProducerBuilder {\n default AdvancedWorkdayEndpointBuilder advanced() {\n return (AdvancedWorkdayEndpointBuilder) this;\n }\n /**\n * Workday Report as a service output format.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: format\n */\n default WorkdayEndpointBuilder format(String format) {\n doSetProperty(\"format\", format);\n return this;\n }\n /**\n * Workday Host name.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: host\n */\n default WorkdayEndpointBuilder host(String host) {\n doSetProperty(\"host\", host);\n return this;\n }\n /**\n * Workday Client Id generated by API Client for Integrations.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: security\n */\n default WorkdayEndpointBuilder clientId(String clientId) {\n doSetProperty(\"clientId\", clientId);\n return this;\n }\n /**\n * Workday Client Secrect generated by API Client for Integrations.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: security\n */\n default WorkdayEndpointBuilder clientSecret(String clientSecret) {\n doSetProperty(\"clientSecret\", clientSecret);\n return this;\n }\n /**\n * Workday Token Refresh generated for Integration system user.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: security\n */\n default WorkdayEndpointBuilder tokenRefresh(String tokenRefresh) {\n doSetProperty(\"tokenRefresh\", tokenRefresh);\n return this;\n }\n /**\n * Workday Tenant name.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: tenant\n */\n default WorkdayEndpointBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }\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 }", "private Currency(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public PaymentType builder()\n {\n return new PaymentType(this);\n }", "public CurrencyRates() {\n this(DSL.name(\"currency_rates\"), null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n buttonGroup2 = new javax.swing.ButtonGroup();\n panelProjeSatis = new keeptoo.KGradientPanel();\n txtSellTime = new javax.swing.JTextField();\n labelSellDate = new javax.swing.JLabel();\n txtPrice = new javax.swing.JTextField();\n labelSellPeriod = new javax.swing.JLabel();\n btnSellProject = new javax.swing.JButton();\n labelCustomers = new javax.swing.JLabel();\n labelSellTime = new javax.swing.JLabel();\n radioDay = new javax.swing.JRadioButton();\n radirMonth = new javax.swing.JRadioButton();\n radioYear = new javax.swing.JRadioButton();\n labelProjects = new javax.swing.JLabel();\n labelPrice = new javax.swing.JLabel();\n cbCustomers = new javax.swing.JComboBox();\n cbProjects = new javax.swing.JComboBox();\n dpSellDate = new com.github.lgooddatepicker.components.DatePicker();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Proje Satış İşlemleri\");\n setSize(new java.awt.Dimension(280, 300));\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n panelProjeSatis.setkEndColor(new java.awt.Color(168, 168, 255));\n panelProjeSatis.setkGradientFocus(0);\n panelProjeSatis.setkStartColor(new java.awt.Color(226, 226, 255));\n\n txtSellTime.setPreferredSize(null);\n\n labelSellDate.setText(\"Satış Tarihi:\");\n labelSellDate.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n txtPrice.setPreferredSize(null);\n\n labelSellPeriod.setText(\"Satış Periyodu:\");\n labelSellPeriod.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n btnSellProject.setText(\"Proje Satış\");\n btnSellProject.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n btnSellProject.setPreferredSize(null);\n btnSellProject.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSellProjectActionPerformed(evt);\n }\n });\n\n labelCustomers.setText(\"Şirketler:\");\n labelCustomers.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n labelSellTime.setText(\"Satış Süresi:\");\n labelSellTime.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n buttonGroup1.add(radioDay);\n radioDay.setText(\"Gün\");\n radioDay.setPreferredSize(null);\n\n buttonGroup1.add(radirMonth);\n radirMonth.setText(\"Ay\");\n radirMonth.setPreferredSize(null);\n\n buttonGroup1.add(radioYear);\n radioYear.setText(\"Yıl\");\n radioYear.setPreferredSize(null);\n radioYear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioYearActionPerformed(evt);\n }\n });\n\n labelProjects.setText(\"Projeler:\");\n labelProjects.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n labelPrice.setText(\"Fiyat:\");\n labelPrice.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n cbCustomers.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Şirketler...\" }));\n\n cbProjects.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Projeler...\" }));\n\n dpSellDate.setPreferredSize(null);\n\n javax.swing.GroupLayout panelProjeSatisLayout = new javax.swing.GroupLayout(panelProjeSatis);\n panelProjeSatis.setLayout(panelProjeSatisLayout);\n panelProjeSatisLayout.setHorizontalGroup(\n panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelProjeSatisLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(labelSellPeriod)\n .addComponent(labelSellTime, javax.swing.GroupLayout.Alignment.TRAILING))\n .addComponent(labelPrice)\n .addComponent(labelSellDate)\n .addComponent(labelProjects)\n .addComponent(labelCustomers))\n .addGap(18, 18, 18)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnSellProject, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(panelProjeSatisLayout.createSequentialGroup()\n .addComponent(radioDay, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(radirMonth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(radioYear, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(txtSellTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtPrice, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbCustomers, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbProjects, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(dpSellDate, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE))\n .addContainerGap(80, Short.MAX_VALUE))\n );\n panelProjeSatisLayout.setVerticalGroup(\n panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelProjeSatisLayout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelCustomers)\n .addComponent(cbCustomers, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbProjects, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)\n .addComponent(labelProjects))\n .addGap(16, 16, 16)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelSellDate)\n .addComponent(dpSellDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(radioDay, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(radirMonth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(radioYear, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(labelSellPeriod))\n .addGap(18, 18, 18)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSellTime, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)\n .addComponent(labelSellTime))\n .addGap(18, 18, 18)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtPrice, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)\n .addComponent(labelPrice))\n .addGap(18, 18, 18)\n .addComponent(btnSellProject, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)\n .addGap(26, 26, 26))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelProjeSatis, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelProjeSatis, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public Builder exCouponPeriod(DaysAdjustment exCouponPeriod) {\n JodaBeanUtils.notNull(exCouponPeriod, \"exCouponPeriod\");\n this.exCouponPeriod = exCouponPeriod;\n return this;\n }", "public DiscountedLineItemPrice build() {\n Objects.requireNonNull(value, DiscountedLineItemPrice.class + \": value is missing\");\n Objects.requireNonNull(includedDiscounts, DiscountedLineItemPrice.class + \": includedDiscounts is missing\");\n return new DiscountedLineItemPriceImpl(value, includedDiscounts);\n }", "public org.adscale.format.opertb.AmountMessage.Amount.Builder getExchangepriceBuilder() {\n bitField0_ |= 0x00000008;\n onChanged();\n return getExchangepriceFieldBuilder().getBuilder();\n }", "private com.google.protobuf.SingleFieldBuilder<\n Pokemon.Currency, Pokemon.Currency.Builder, Pokemon.CurrencyOrBuilder> \n getCurrencyFieldBuilder() {\n if (currencyBuilder_ == null) {\n currencyBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n Pokemon.Currency, Pokemon.Currency.Builder, Pokemon.CurrencyOrBuilder>(\n getCurrency(),\n getParentForChildren(),\n isClean());\n currency_ = null;\n }\n return currencyBuilder_;\n }", "private Builder(org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.BUS_UNIT)) {\n this.BUS_UNIT = data().deepCopy(fields()[0].schema(), other.BUS_UNIT);\n fieldSetFlags()[0] = other.fieldSetFlags()[0];\n }\n if (isValidValue(fields()[1], other.DESCRIPTION)) {\n this.DESCRIPTION = data().deepCopy(fields()[1].schema(), other.DESCRIPTION);\n fieldSetFlags()[1] = other.fieldSetFlags()[1];\n }\n if (isValidValue(fields()[2], other.BASE_CURRENCY_ID)) {\n this.BASE_CURRENCY_ID = data().deepCopy(fields()[2].schema(), other.BASE_CURRENCY_ID);\n fieldSetFlags()[2] = other.fieldSetFlags()[2];\n }\n if (isValidValue(fields()[3], other.IMPLEMENT_FX)) {\n this.IMPLEMENT_FX = data().deepCopy(fields()[3].schema(), other.IMPLEMENT_FX);\n fieldSetFlags()[3] = other.fieldSetFlags()[3];\n }\n if (isValidValue(fields()[4], other.BUS_UNIT_ID)) {\n this.BUS_UNIT_ID = data().deepCopy(fields()[4].schema(), other.BUS_UNIT_ID);\n fieldSetFlags()[4] = other.fieldSetFlags()[4];\n }\n if (isValidValue(fields()[5], other.CL_APPROVAL)) {\n this.CL_APPROVAL = data().deepCopy(fields()[5].schema(), other.CL_APPROVAL);\n fieldSetFlags()[5] = other.fieldSetFlags()[5];\n }\n if (isValidValue(fields()[6], other.CL_MAIL_GROUP)) {\n this.CL_MAIL_GROUP = data().deepCopy(fields()[6].schema(), other.CL_MAIL_GROUP);\n fieldSetFlags()[6] = other.fieldSetFlags()[6];\n }\n if (isValidValue(fields()[7], other.AUTO_RECEIPT_APPL)) {\n this.AUTO_RECEIPT_APPL = data().deepCopy(fields()[7].schema(), other.AUTO_RECEIPT_APPL);\n fieldSetFlags()[7] = other.fieldSetFlags()[7];\n }\n if (isValidValue(fields()[8], other.ADDRESS_IND)) {\n this.ADDRESS_IND = data().deepCopy(fields()[8].schema(), other.ADDRESS_IND);\n fieldSetFlags()[8] = other.fieldSetFlags()[8];\n }\n if (isValidValue(fields()[9], other.ALLOW_MISC_INV_CREATION)) {\n this.ALLOW_MISC_INV_CREATION = data().deepCopy(fields()[9].schema(), other.ALLOW_MISC_INV_CREATION);\n fieldSetFlags()[9] = other.fieldSetFlags()[9];\n }\n if (isValidValue(fields()[10], other.ALLOW_ABC_REV_SPLIT_TO_RUN)) {\n this.ALLOW_ABC_REV_SPLIT_TO_RUN = data().deepCopy(fields()[10].schema(), other.ALLOW_ABC_REV_SPLIT_TO_RUN);\n fieldSetFlags()[10] = other.fieldSetFlags()[10];\n }\n if (isValidValue(fields()[11], other.ALLOW_MTM_TO_RUN)) {\n this.ALLOW_MTM_TO_RUN = data().deepCopy(fields()[11].schema(), other.ALLOW_MTM_TO_RUN);\n fieldSetFlags()[11] = other.fieldSetFlags()[11];\n }\n if (isValidValue(fields()[12], other.GLPOST_DETAILS)) {\n this.GLPOST_DETAILS = data().deepCopy(fields()[12].schema(), other.GLPOST_DETAILS);\n fieldSetFlags()[12] = other.fieldSetFlags()[12];\n }\n if (isValidValue(fields()[13], other.GL_INTERFACE)) {\n this.GL_INTERFACE = data().deepCopy(fields()[13].schema(), other.GL_INTERFACE);\n fieldSetFlags()[13] = other.fieldSetFlags()[13];\n }\n if (isValidValue(fields()[14], other.ALLOW_AIS_UNBILLED_TO_RUN)) {\n this.ALLOW_AIS_UNBILLED_TO_RUN = data().deepCopy(fields()[14].schema(), other.ALLOW_AIS_UNBILLED_TO_RUN);\n fieldSetFlags()[14] = other.fieldSetFlags()[14];\n }\n if (isValidValue(fields()[15], other.SRC_KEY_VAL)) {\n this.SRC_KEY_VAL = data().deepCopy(fields()[15].schema(), other.SRC_KEY_VAL);\n fieldSetFlags()[15] = other.fieldSetFlags()[15];\n }\n if (isValidValue(fields()[16], other.SRC_CDC_OPER_NM)) {\n this.SRC_CDC_OPER_NM = data().deepCopy(fields()[16].schema(), other.SRC_CDC_OPER_NM);\n fieldSetFlags()[16] = other.fieldSetFlags()[16];\n }\n if (isValidValue(fields()[17], other.SRC_COMMIT_DT_UTC)) {\n this.SRC_COMMIT_DT_UTC = data().deepCopy(fields()[17].schema(), other.SRC_COMMIT_DT_UTC);\n fieldSetFlags()[17] = other.fieldSetFlags()[17];\n }\n if (isValidValue(fields()[18], other.TRG_CRT_DT_PART_UTC)) {\n this.TRG_CRT_DT_PART_UTC = data().deepCopy(fields()[18].schema(), other.TRG_CRT_DT_PART_UTC);\n fieldSetFlags()[18] = other.fieldSetFlags()[18];\n }\n if (isValidValue(fields()[19], other.SRC_SCHEMA_NM)) {\n this.SRC_SCHEMA_NM = data().deepCopy(fields()[19].schema(), other.SRC_SCHEMA_NM);\n fieldSetFlags()[19] = other.fieldSetFlags()[19];\n }\n }", "public static void constructCurvesUsingMeetingDates(final PrintStream out) {\n final ZonedDateTime valuationDate = ZonedDateTime.of(VALUATION_DATE, VALUATION_TIME, VALUATION_ZONE);\n // first construct the builder\n // build the discounting / overnight curve first, using ECB meeting dates as nodes\n // then build the 6m EURIBOR curve\n final DiscountingMethodCurveSetUp curveBuilder = DiscountingMethodCurveBuilder.setUp()\n .buildingFirst(DISCOUNTING_NAME)\n .using(DISCOUNTING_NAME).forDiscounting(Currency.EUR).forIndex(EONIA).withInterpolator(INTERPOLATOR_1).usingNodeDates(ECB_MEETING_DATES)\n .thenBuilding(FWD6_NAME)\n .using(FWD6_NAME).forIndex(EURIBOR_6M_INDEX).withInterpolator(INTERPOLATOR_2);\n final Tenor startTenor = Tenor.of(Period.ZERO);\n // add the discounting curve nodes\n IntStream.range(0, OIS_TENORS.length).forEach(\n i -> curveBuilder.addNode(DISCOUNTING_NAME, OIS.toCurveInstrument(valuationDate, startTenor, OIS_TENORS[i], 1, OIS_QUOTES[i])));\n // add the EURIBOR curve nodes\n curveBuilder.addNode(FWD6_NAME, EURIBOR_6M.toCurveInstrument(valuationDate, startTenor, Tenor.SIX_MONTHS, 1, EURIBOR_6M_QUOTE));\n IntStream.range(0, EURIBOR_6M_SWAP_QUOTES.length).forEach(\n i -> curveBuilder.addNode(FWD6_NAME,\n FIXED_EURIBOR_6M.toCurveInstrument(valuationDate, startTenor, EURIBOR_6M_SWAP_TENORS[i], 1, EURIBOR_6M_SWAP_QUOTES[i])));\n // build the curves\n final Pair<MulticurveProviderDiscount, CurveBuildingBlockBundle> result = curveBuilder.getBuilder().buildCurves(valuationDate);\n final MulticurveProviderDiscount curves = result.getFirst();\n final CurveBuildingBlockBundle inverseJacobians = result.getSecond();\n\n out.println(\"\\n\" + curves.getAllNames());\n curves.getAllCurves().entrySet().stream().forEach(e -> CurvePrintUtils.printAtNodes(out, e.getKey(), e.getValue()));\n CurvePrintUtils.printJacobians(out, inverseJacobians, curveBuilder.getBuilder());\n }", "private void initComponents() {\n\t\tjava.awt.GridBagConstraints gridBagConstraints;\n\n\t\tSqlDateModel fromSqlModel = new SqlDateModel();\n\t\tProperties pFrom = new Properties();\n\t\tpFrom.put(\"text.today\", \"Today\");\n\t\tpFrom.put(\"text.month\", \"Month\");\n\t\tpFrom.put(\"text.year\", \"Year\");\n\t\tJDatePanelImpl fromDatePanel = new JDatePanelImpl(fromSqlModel, pFrom);\n\n\t\t// Don't know about the formatter, but there it is...\n\t\tfromDatePicker = new JDatePickerImpl(fromDatePanel, new DateLabelFormatter());\n\n\t\tSqlDateModel toSqlModel = new SqlDateModel();\n\t\tProperties pTo = new Properties();\n\t\tpTo.put(\"text.today\", \"Today\");\n\t\tpTo.put(\"text.month\", \"Month\");\n\t\tpTo.put(\"text.year\", \"Year\");\n\t\tJDatePanelImpl toDatePanel = new JDatePanelImpl(toSqlModel, pTo);\n\t\ttoDatePicker = new JDatePickerImpl(toDatePanel, new DateLabelFormatter());\n\n\t\t// JCBClient = new JComboBox<>();\n\n\t\tJCBClient = PublicMethods.fillComboClient(\n\t\t\t\t\"Select clientId, firstName, middleName, lastName from clients order by firstName asc, middlename asc, lastname asc\",\n\t\t\t\tthis.cnFoodDataEntry);\n\n\t\tJCBFoodUnit = new JComboBox<>();\n\t\tJCBFoodUnit.setModel(\n\t\t\t\tnew javax.swing.DefaultComboBoxModel<>(energySourceDetail.get(FoodIntake).keySet().toArray()));\n\n\t\tJCBLandfillingFoodWasteUnit = new JComboBox<>();\n\t\tJCBLandfillingFoodWasteUnit.setModel(new javax.swing.DefaultComboBoxModel<>(\n\t\t\t\tenergySourceDetail.get(LandfillingFoodWaste).keySet().toArray()));\n\n\t\tJCBCompostingFoodWasteUnit = new JComboBox<>();\n\t\tJCBCompostingFoodWasteUnit.setModel(\n\t\t\t\tnew javax.swing.DefaultComboBoxModel<>(energySourceDetail.get(CompostingFoodWaste).keySet().toArray()));\n\n\t\tsetLayout(new java.awt.GridBagLayout());\n\n\t\tImageIcon image = new ImageIcon(\"images/foodcalculator.jpg\");\n\t\tJLImage = new JLabel(\"\", image, JLabel.CENTER);\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 0;\n\t\tgridBagConstraints.gridy = 0;\n\t\tgridBagConstraints.gridwidth = 4;\n\t\tgridBagConstraints.gridheight = 17;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tadd(JLImage, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 0;\n\t\tgridBagConstraints.gridwidth = 4;\n\t\tJLHeader.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 35));\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tadd(JLHeader, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 1;\n\t\tJLSelectClient.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tadd(JLSelectClient, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 2;\n\t\tgridBagConstraints.gridwidth = 4;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 1, 1, 1);\n\t\tadd(JCBClient, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 1;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tJLDateRange.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tadd(JLDateRange, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 2;\n\t\tJLFromDate.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLFromDate, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 2;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(fromDatePicker, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 3;\n\t\tJLToDate.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLToDate, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 3;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(toDatePicker, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 6;\n\t\tJLFood.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLFood, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 7;\n\t\tJLLandfillingFoodWaste.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLLandfillingFoodWaste, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 8;\n\t\tgridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);\n\t\tJLCompostingFoodWaste.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tadd(JLCompostingFoodWaste, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 6;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(JTFFood, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 7;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(JTFLandfillingFoodWaste, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 5;\n\t\tgridBagConstraints.gridy = 8;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 10);\n\t\tadd(JTFCompostingFoodWaste, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 5;\n\t\tJLUnit.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tadd(JLUnit, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 6;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 4, 10);\n\t\tadd(JCBFoodUnit, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 7;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 4, 10);\n\t\tadd(JCBLandfillingFoodWasteUnit, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 7;\n\t\tgridBagConstraints.gridy = 8;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(1, 4, 4, 10);\n\t\tadd(JCBCompostingFoodWasteUnit, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 14;\n\t\tgridBagConstraints.gridwidth = 2;\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tcalculateButton.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));\n\t\tcalculateButton.setBackground(new Color(92, 184, 92));\n\t\tcalculateButton.setForeground(Color.WHITE);\n\t\tcalculateButton.addActionListener(actionListener);\n\t\tcalculateButton.setActionCommand(\"CALCULATE\");\n\t\tadd(calculateButton, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 16;\n\t\tgridBagConstraints.gridwidth = 4;\n\t\tgridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tJTFResult.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tJTFResult.setEditable(false);\n\t\tadd(JTFResult, gridBagConstraints);\n\n\t\tJPanel jpanel = new JPanel();\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 0;\n\t\tgridBagConstraints.gridy = 0;\n\t\tgridBagConstraints.gridwidth = 1;\n\t\t// gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\t// gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tsaveButton.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 20));\n\t\tsaveButton.addActionListener(actionListener);\n\t\tsaveButton.setActionCommand(\"SAVE\");\n\t\tjpanel.add(saveButton, gridBagConstraints);\n\n\t\tgridBagConstraints = new java.awt.GridBagConstraints();\n\t\tgridBagConstraints.gridx = 4;\n\t\tgridBagConstraints.gridy = 18;\n\t\tgridBagConstraints.gridwidth = 1;\n\t\t// gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n\t\tgridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n\t\tadd(jpanel, gridBagConstraints);\n\n\t\tsetBackground(Color.WHITE);\n\n\t}", "public static <X> FuturePriceCurveDefinition.Builder<X> builder() {\n return new FuturePriceCurveDefinition.Builder<X>();\n }", "public ConvCalculator(){\r\n super(\"Conversions Calculator\");\r\n this.setSize(280,350);\r\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n expression = new DecExpression();\r\n menuFileItems[3].setSelected(true);\r\n //Layout per le cifre esadecimali - pannello sud\r\n south.setLayout(new GridLayout(1,6));\r\n //Creazione dei pulsanti di opzione e aggiunta delle gestioni evento\r\n conversions = new JRadioButton[] {\r\n new JRadioButton(\"hex\"), new JRadioButton(\"bin\"), new JRadioButton(\"dec\")\r\n };\r\n for(JRadioButton conv : conversions){\r\n conv.addActionListener(new ConversionManagement(this));\r\n }\r\n conversions[2].setSelected(true);\r\n //Aggiunta dei pulsanti di opzioni a un gruppo di pulsanti opzione\r\n ButtonGroup conv = new ButtonGroup();\r\n conv.add(conversions[0]); //hex\r\n conv.add(conversions[1]); //bin\r\n conv.add(conversions[2]); //dec\r\n //Creazione dei pulsanti numerici e aggiunta delle gestioni evento\r\n letters = new JButton[]{\r\n new JButton(\"A\"), new JButton(\"B\"),new JButton(\"C\"), \r\n new JButton(\"D\"), new JButton(\"E\"), new JButton(\"F\")\r\n };\r\n //Aggiunta delle lettere esadecimali al pannello sud + disabilitazione\r\n for(JButton letter : letters){\r\n letter.addActionListener(new NumericManagement(this));\r\n letter.setEnabled(false);\r\n south.add(letter);\r\n }\r\n //Modifica del pannello centrale\r\n Component[] compC = this.center.getComponents();\r\n compC[0] = conversions[0];\r\n compC[1] = conversions[1];\r\n compC[2] = conversions[2];\r\n center.removeAll();\r\n for(Component c : compC){\r\n center.add(c);\r\n }\r\n //Aggiunta del bordo al pannello sud\r\n south.setBorder(new TitledBorder(new EtchedBorder(5),\"Hex Letters\"));\r\n //Aggiunta dei componenti al form principale\r\n Container contentPane = this.getContentPane();\r\n contentPane.add(display,\"North\");\r\n contentPane.add(center,\"Center\");\r\n contentPane.add(south,\"South\");\r\n //apri la finestra calcolatrice\r\n this.setVisible(true);\r\n }", "public StandardCalculator init() {\n this.load(\"+\", this.add());\n this.load(\"-\", this.subtract());\n this.load(\"*\", this.multiple());\n this.load(\"/\", this.div());\n return this;\n }", "public OldSwedishCurrency()\r\n\t{\r\n\t\tthis(0, 0, 0);\r\n\t}", "@Override\n public IRateLimiter<TKey> build() {\n Preconditions.checkArgument(this.rateLimit > 0, \"rateLimit must be positive\");\n Preconditions.checkArgument(this.intervalTime > 0, \"intervalTime must be positive\");\n Preconditions.checkArgument(this.calendarTimeUnitCode > 0, \"TimeUnit is not valid\");\n\n return new InMemoryRateLimiter<>(this);\n }", "public DanceChart build();", "private void jbInit() throws Exception {\r\n setLayout(new BorderLayout());\r\n\r\n // set how the cloning should be done\r\n if (this.FORCE_SERIALIZE_COPY) {\r\n getMonthSelectorStyle().forceSerializeCopy(true);\r\n getDaySelectorStyle().forceSerializeCopy(true);\r\n getTodaySelectorStyle().forceSerializeCopy(true);\r\n }\r\n\r\n // update or set the locale\r\n getMonthSelectorStyle().setLocale(locale);\r\n getDaySelectorStyle().setLocale(locale);\r\n\r\n // set up the calendar panel\r\n daySelector = new DaySelector(getDaySelectorStyle());\r\n daySelector.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getID() == DateChooserAction.calendarButtonSelected) {\r\n currentDate.set(java.util.Calendar.DAY_OF_MONTH,\r\n ( (DaySelector) e.getSource()).selectedDay);\r\n selectedDate = (Calendar) currentDate.clone();\r\n getParent().setVisible(false);\r\n }\r\n }\r\n });\r\n add(daySelector, daySelectorPosition);\r\n\r\n // set up the month selector panel\r\n if (showMonthSelector) {\r\n monthSelector = new MonthSelector(getMonthSelectorStyle());\r\n monthSelector.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getID() == DateChooserAction.previousMonthSelected) {\r\n currentDate.add(java.util.Calendar.MONTH, -1);\r\n update();\r\n }\r\n if (e.getID() == DateChooserAction.nextMonthSelected) {\r\n currentDate.add(java.util.Calendar.MONTH, 1);\r\n update();\r\n }\r\n }\r\n });\r\n add(monthSelector, monthSelectorPosition);\r\n }\r\n\r\n // add the today selector panel\r\n if (showTodaySelector) {\r\n todaySelector = new TodaySelector(getTodaySelectorStyle());\r\n todaySelector.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getID() == DateChooserAction.todaySelected) {\r\n currentDate.setTime(Calendar.getInstance().getTime());\r\n selectedDate = (Calendar) currentDate.clone();\r\n getParent().setVisible(false);\r\n }\r\n }\r\n });\r\n add(todaySelector, todaySelectorPosition);\r\n }\r\n update();\r\n }", "CalculatorController(){\n\t\tintegrationStrategy.put(IntegrationType.RECTANGLES, new CalculatorByRectangles());\n\t\tintegrationStrategy.put(IntegrationType.TRAPEZES, new CalculatorByTrapezes());\n\t\tintegrationStrategy.put(IntegrationType.INTEGRAL, new CalculatorByIntegration());\n\t}", "public CurrencyConversion() {\n }", "public com.vodafone.global.er.decoupling.binding.request.GetBasePricesRequest createGetBasePricesRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetBasePricesRequestImpl();\n }", "public static StandalonePriceSetValidFromActionBuilder builder(final StandalonePriceSetValidFromAction template) {\n return StandalonePriceSetValidFromActionBuilder.of(template);\n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n beanPanelPallete1 = new component.BeanPanelPallete();\r\n jPanel1 = new javax.swing.JPanel();\r\n jLabel1 = new javax.swing.JLabel();\r\n calPayDate = new JCalendarPallete();\r\n btnCalculate = new javax.swing.JButton();\r\n btnSaveSimulation = new javax.swing.JButton();\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n\r\n beanPanelPallete1.setBeanName(\"PaymentCashierSurchargeCalculatorExt\");\r\n beanPanelPallete1.setName(\"beanPanelPallete1\"); // NOI18N\r\n beanPanelPallete1.setShowForm(false);\r\n beanPanelPallete1.setShowImage(false);\r\n beanPanelPallete1.setShowResult(true);\r\n\r\n javax.swing.GroupLayout beanPanelPallete1Layout = new javax.swing.GroupLayout(beanPanelPallete1);\r\n beanPanelPallete1.setLayout(beanPanelPallete1Layout);\r\n beanPanelPallete1Layout.setHorizontalGroup(\r\n beanPanelPallete1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 400, Short.MAX_VALUE)\r\n );\r\n beanPanelPallete1Layout.setVerticalGroup(\r\n beanPanelPallete1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 267, Short.MAX_VALUE)\r\n );\r\n\r\n add(beanPanelPallete1, java.awt.BorderLayout.CENTER);\r\n\r\n jPanel1.setName(\"jPanel1\"); // NOI18N\r\n\r\n jLabel1.setText(\"Tentative Pay Date:\");\r\n jLabel1.setName(\"jLabel1\"); // NOI18N\r\n jPanel1.add(jLabel1);\r\n\r\n calPayDate.setName(\"calPayDate\"); // NOI18N\r\n jPanel1.add(calPayDate);\r\n\r\n btnCalculate.setText(\"Calculate\");\r\n btnCalculate.setName(\"btnCalculate\"); // NOI18N\r\n btnCalculate.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnCalculateActionPerformed(evt);\r\n }\r\n });\r\n jPanel1.add(btnCalculate);\r\n\r\n btnSaveSimulation.setText(\"Save Simulation\");\r\n btnSaveSimulation.setName(\"btnSaveSimulation\"); // NOI18N\r\n btnSaveSimulation.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnSaveSimulationActionPerformed(evt);\r\n }\r\n });\r\n jPanel1.add(btnSaveSimulation);\r\n\r\n add(jPanel1, java.awt.BorderLayout.SOUTH);\r\n }", "public Currency() {\n // Instances built via this constructor have undefined behavior.\n }", "public com.czht.face.recognition.Czhtdev.Week.Builder getWeekdayBuilder() {\n bitField0_ |= 0x00000010;\n onChanged();\n return getWeekdayFieldBuilder().getBuilder();\n }", "@Bean\n\t@ConditionalOnWebApplication\n\t@ConditionalOnMissingBean\n\tOperationBuilder operationBuilder(GenericParameterBuilder parameterBuilder, RequestBodyBuilder requestBodyBuilder,\n\t\t\tSecurityParser securityParser, PropertyResolverUtils propertyResolverUtils) {\n\t\treturn new OperationBuilder(parameterBuilder, requestBodyBuilder,\n\t\t\t\tsecurityParser, propertyResolverUtils);\n\t}", "public Reservation build() throws BuilderException \n{\n\tif (date == null) {\n\t\tthrow new BuilderException(\"Valid date not found\");\n\t}\n\tif (city == null) {\n\t\tthrow new BuilderException(\"Valid city not found\");\n\t}\n\tif (headcount < MINHEAD) {\n\t\tthrow new BuilderException(\n\t\t\t\"Minimum headcount is \" + MINHEAD); \n\t}\n\tif (dollarsPerHead * headcount < MINTOTAL) {\n\t\tthrow new BuilderException(\n\t\t\t\"Minimum total cost is \" + MINTOTAL); \n\t}\n\treturn new Reservation(\n\t\tdate, \n\t\theadcount, \n\t\tcity, \n\t\tdollarsPerHead, \n\t\thasSite); \n}", "public BTCRatesPanel()\n {\n //Create Currency Heading\n lblBTCRates = new JLabel(\"Bitcoin Conversion Rates\");\n \n //Create ARS Conversion Rates\n lblBTCtoUSD = new JLabel(\"1 Bitcoin = \" + MoneyConversions.GetConversionRate(\"BTC\", \"USD\") + \" U.S. Dollars\");\n lblBTCtoEUR = new JLabel(\"1 Bitcoin = \" + MoneyConversions.GetConversionRate(\"BTC\", \"EUR\") + \" Euro\");\n lblBTCtoPLN = new JLabel(\"1 Bitcoin = \" + MoneyConversions.GetConversionRate(\"BTC\", \"PLN\") + \" Polish Z\" + (char)322 + \"oty\");\n lblBTCtoARS = new JLabel(\"1 Bitcoin = \" + MoneyConversions.GetConversionRate(\"BTC\", \"ARS\") + \" Argentine Peso\");\n \n //Add ARS Conversion Rates To Panel\n add(lblBTCRates);\n add(lblBTCtoUSD);\n add(lblBTCtoEUR);\n add(lblBTCtoPLN);\n add(lblBTCtoARS);\n \n //Setup look of panel\n setPreferredSize(new Dimension(258, 160));\n setBackground(Color.cyan);\n }", "public static referential.store.v2.WeekPattern.Builder newBuilder(referential.store.v2.WeekPattern.Builder other) {\n return new referential.store.v2.WeekPattern.Builder(other);\n }", "private StringBuilder getA1RateBuilder() throws UnsupportedEncodingException, ParseException {\n\n\t\tint colNum = 15;\n\t\tStringBuilder commonTr = new StringBuilder();\n\t\tStringBuilder commonTd = new StringBuilder();\n\t\t\n\t\tList<String> thList = new ArrayList<>(colNum);\n\t\t//TODO thList add 1 2~15 期\n\t\tthList.add(new String((\"1_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"2_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"3_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"4_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"5_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"6_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"7_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"8_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"9_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"10_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"11_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"12_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"13_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"14_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\tthList.add(new String((\"15_期\").getBytes(\"GBK\"), \"ISO-8859-1\"));\n\t\t\n\t\tnew String((\"上月差额补足金额\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\t\n\t\t//List<Map<String, Object>> tdList = new ArrayList<>();\n\t\t\n\t\t\n\t\t\n\t\t//tdList = trustContributionServer.getA1List(partnerCode);\n\t\t\t\n\t\tcommonTr = this.getCommonTr(thList,colNum);\n\t\t\n\t\tcommonTd = this.getCommonTd();\n\t\t\t\n\t\t//TODO add\n\t\tcommonTr.append(commonTd).append(\"</table>\").append(\"</div>\");\n\t\t//commonTr.append(\"</table>\").append(\"</div>\");\n\t\t\n\t\treturn commonTr;\n\t}", "private Builder(referential.store.v2.WeekPattern other) {\n super(referential.store.v2.WeekPattern.SCHEMA$);\n if (isValidValue(fields()[0], other.patternId)) {\n this.patternId = data().deepCopy(fields()[0].schema(), other.patternId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.begDate)) {\n this.begDate = data().deepCopy(fields()[1].schema(), other.begDate);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.endDate)) {\n this.endDate = data().deepCopy(fields()[2].schema(), other.endDate);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.mondayTimeRanges)) {\n this.mondayTimeRanges = data().deepCopy(fields()[3].schema(), other.mondayTimeRanges);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.tuesdayTimeRanges)) {\n this.tuesdayTimeRanges = data().deepCopy(fields()[4].schema(), other.tuesdayTimeRanges);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.wednesdayTimeRanges)) {\n this.wednesdayTimeRanges = data().deepCopy(fields()[5].schema(), other.wednesdayTimeRanges);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.thursdayTimeRanges)) {\n this.thursdayTimeRanges = data().deepCopy(fields()[6].schema(), other.thursdayTimeRanges);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.fridayTimeRanges)) {\n this.fridayTimeRanges = data().deepCopy(fields()[7].schema(), other.fridayTimeRanges);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.saturdayTimeRanges)) {\n this.saturdayTimeRanges = data().deepCopy(fields()[8].schema(), other.saturdayTimeRanges);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.sundayTimeRanges)) {\n this.sundayTimeRanges = data().deepCopy(fields()[9].schema(), other.sundayTimeRanges);\n fieldSetFlags()[9] = true;\n }\n }", "public Builder(Class<?> beanClass, ConstrainedExecutable constrainedExecutable, ConstraintHelper constraintHelper, ExecutableHelper executableHelper, MethodValidationConfiguration methodValidationConfiguration)\n/* */ {\n/* 303 */ super(constraintHelper);\n/* */ \n/* 305 */ this.executableHelper = executableHelper;\n/* 306 */ this.kind = constrainedExecutable.getKind();\n/* 307 */ this.executable = constrainedExecutable.getExecutable();\n/* 308 */ this.rules = new HashSet(methodValidationConfiguration.getConfiguredRuleSet());\n/* */ \n/* 310 */ add(constrainedExecutable);\n/* */ }", "KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);", "private Builder() {\n super(referential.store.v2.WeekPattern.SCHEMA$);\n }", "public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder getCryptoKeyConfigBuilder() {\n bitField0_ |= 0x04000000;\n onChanged();\n return getCryptoKeyConfigFieldBuilder().getBuilder();\n }", "public AbstractGemBuilder createBuilder(String parserType) {\n\t\tParserType type = ParserType.valueOf(parserType.toUpperCase());\n\t\tswitch (type) {\n\t\tcase DOM:\n\t\t\treturn new DomBuilder();\n\t\tcase SAX:\n\t\t\treturn new SaxBuilder();\n\t\tcase STAX:\n\t\t\treturn new StaxBuilder();\n\t\tdefault:\n\t\t\tthrow new EnumConstantNotPresentException(type.getDeclaringClass(), type.name());\n\t\t}\n\t}", "private void initComponents() {\n\t\tlblFechaInicio = new JLabel();\r\n\t\tcmbFechaInicio = new DateComboBox();\r\n\t\tlblFechaFin = new JLabel();\r\n\t\tcmbFechaFin = new DateComboBox();\r\n\t\trbValorBruto = new JRadioButton();\r\n\t\tlblCliente = new JLabel();\r\n\t\ttxtCliente = new JTextField();\r\n\t\tbtnCliente = new JButton();\r\n\t\tcbTodosClientes = new JCheckBox();\r\n\t\tlblClienteOficina = new JLabel();\r\n\t\ttxtClienteOficina = new JTextField();\r\n\t\tbtnClienteOficina = new JButton();\r\n\t\tcbTodosClientesOficina = new JCheckBox();\r\n\t\trbValorNeto = new JRadioButton();\r\n\t\tlblCampana = new JLabel();\r\n\t\ttxtCampana = new JTextField();\r\n\t\tbtnCampana = new JButton();\r\n\t\tcbTodosCampana = new JCheckBox();\r\n\t\tbtnConsultar = new JButton();\r\n\t\tlblMarca = new JLabel();\r\n\t\tcmbMarca = new JComboBox();\r\n\t\tlblProducto = new JLabel();\r\n\t\ttxtProducto = new JTextField();\r\n\t\tbtnProducto = new JButton();\r\n\t\tcbTodosProducto = new JCheckBox();\r\n\t\tlblEstadoPresupuesto = new JLabel();\r\n\t\tcmbEstadoPresupuesto = new JComboBox();\r\n\t\tcbOrdenesPresupuestoPrepago = new JCheckBox();\r\n\t\tlblEstadoOrden = new JLabel();\r\n\t\tcmbEstadoOrden = new JComboBox();\r\n\t\tlblTipoProveedor = new JLabel();\r\n\t\tcmbTipoProveedor = new JComboBox();\r\n\t\tlblSubtipoProveedor = new JLabel();\r\n\t\tcmbSubtipoProveedor = new JComboBox();\r\n\t\tlblProveedor = new JLabel();\r\n\t\ttxtProveedor = new JTextField();\r\n\t\tbtnProveedor = new JButton();\r\n\t\tcbTodosProveedores = new JCheckBox();\r\n\t\tlblProveedorOficina = new JLabel();\r\n\t\ttxtProveedorOficina = new JTextField();\r\n\t\tbtnProveedorOficina = new JButton();\r\n\t\tcbTodosProveedorOficina = new JCheckBox();\r\n\t\tlblCreadorPor = new JLabel();\r\n\t\ttxtCreadoPor = new JTextField();\r\n\t\tbtnCreadoPor = new JButton();\r\n\t\tcbTodosCreadoPor = new JCheckBox();\r\n\t\tcbFiltrarCodigoPresupuesto = new JCheckBox();\r\n\t\ttxtPresupuesto = new JTextField();\r\n\t\tspTblOrdenes = new JScrollPane();\r\n\t\ttblOrdenes = new JTable();\r\n\t\tCellConstraints cc = new CellConstraints();\r\n\r\n\t\t//======== this ========\r\n\t\tsetLayout(new FormLayout(\r\n\t\t\tnew ColumnSpec[] {\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(10)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(95)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(12)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(95)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.DLUX3),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(20)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(25)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(30)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(25)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(10))\r\n\t\t\t},\r\n\t\t\tnew RowSpec[] {\r\n\t\t\t\tnew RowSpec(Sizes.dluY(10)),\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tnew RowSpec(Sizes.DLUY3),\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tnew RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tnew RowSpec(Sizes.dluY(10))\r\n\t\t\t}));\r\n\r\n\t\t//---- lblFechaInicio ----\r\n\t\tlblFechaInicio.setText(\"Fecha Inicio:\");\r\n\t\tadd(lblFechaInicio, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\tadd(cmbFechaInicio, cc.xy(5, 3));\r\n\r\n\t\t//---- lblFechaFin ----\r\n\t\tlblFechaFin.setText(\"Fecha Fin:\");\r\n\t\tadd(lblFechaFin, cc.xywh(9, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\tadd(cmbFechaFin, cc.xy(11, 3));\r\n\r\n\t\t//---- lblCliente ----\r\n\t\tlblCliente.setText(\"Cliente:\");\r\n\t\tadd(lblCliente, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- txtCliente ----\r\n\t\ttxtCliente.setEditable(false);\r\n\t\tadd(txtCliente, cc.xywh(5, 5, 7, 1));\r\n\t\tadd(btnCliente, cc.xywh(13, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\r\n\r\n\t\t//---- cbTodosClientes ----\r\n\t\tcbTodosClientes.setText(\"Todos\");\r\n\t\tadd(cbTodosClientes, cc.xy(17, 5));\r\n\r\n\t\t//---- rbValorBruto ----\r\n\t\trbValorBruto.setText(\"Valor Bruto\");\r\n\t\tadd(rbValorBruto, cc.xywh(21, 5, 3, 1));\r\n\r\n\t\t//---- lblClienteOficina ----\r\n\t\tlblClienteOficina.setText(\"Cliente Oficina:\");\r\n\t\tadd(lblClienteOficina, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- txtClienteOficina ----\r\n\t\ttxtClienteOficina.setEditable(false);\r\n\t\tadd(txtClienteOficina, cc.xywh(5, 7, 7, 1));\r\n\t\tadd(btnClienteOficina, cc.xywh(13, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL));\r\n\r\n\t\t//---- cbTodosClientesOficina ----\r\n\t\tcbTodosClientesOficina.setText(\"Todos\");\r\n\t\tadd(cbTodosClientesOficina, cc.xy(17, 7));\r\n\r\n\t\t//---- rbValorNeto ----\r\n\t\trbValorNeto.setText(\"Valor Neto\");\r\n\t\tadd(rbValorNeto, cc.xywh(21, 7, 3, 1));\r\n\r\n\t\t//---- lblCampana ----\r\n\t\tlblCampana.setText(\"Campa\\u00f1a:\");\r\n\t\tadd(lblCampana, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- txtCampana ----\r\n\t\ttxtCampana.setEditable(false);\r\n\t\tadd(txtCampana, cc.xywh(5, 9, 7, 1));\r\n\t\tadd(btnCampana, cc.xywh(13, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\r\n\r\n\t\t//---- cbTodosCampana ----\r\n\t\tcbTodosCampana.setText(\"Todos\");\r\n\t\tadd(cbTodosCampana, cc.xy(17, 9));\r\n\r\n\t\t//---- btnConsultar ----\r\n\t\tbtnConsultar.setText(\"Consultar\");\r\n\t\tadd(btnConsultar, cc.xywh(21, 9, 5, 1));\r\n\r\n\t\t//---- lblMarca ----\r\n\t\tlblMarca.setText(\"Marca:\");\r\n\t\tadd(lblMarca, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\tadd(cmbMarca, cc.xywh(5, 11, 7, 1));\r\n\r\n\t\t//---- lblProducto ----\r\n\t\tlblProducto.setText(\"Producto:\");\r\n\t\tadd(lblProducto, cc.xywh(3, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- txtProducto ----\r\n\t\ttxtProducto.setEditable(false);\r\n\t\tadd(txtProducto, cc.xywh(5, 13, 7, 1));\r\n\t\tadd(btnProducto, cc.xywh(13, 13, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\r\n\r\n\t\t//---- cbTodosProducto ----\r\n\t\tcbTodosProducto.setText(\"Todos\");\r\n\t\tadd(cbTodosProducto, cc.xy(17, 13));\r\n\r\n\t\t//---- lblEstadoPresupuesto ----\r\n\t\tlblEstadoPresupuesto.setText(\"Estado del Presupuesto:\");\r\n\t\tadd(lblEstadoPresupuesto, cc.xy(3, 15));\r\n\r\n\t\t//---- cmbEstadoPresupuesto ----\r\n\t\tcmbEstadoPresupuesto.setModel(new DefaultComboBoxModel(new String[] {\r\n\t\t\t\"COTIZADO\",\r\n\t\t\t\"APROBADO\",\r\n\t\t\t\"FACTURADO\",\r\n\t\t\t\"PREPAGADO\",\r\n\t\t\t\"TODOS\"\r\n\t\t}));\r\n\t\tadd(cmbEstadoPresupuesto, cc.xy(5, 15));\r\n\r\n\t\t//---- cbOrdenesPresupuestoPrepago ----\r\n\t\tcbOrdenesPresupuestoPrepago.setText(\"Buscar Ordenes de Presupuestos \\\"Prepago\\\"\");\r\n\t\tcbOrdenesPresupuestoPrepago.setSelected(true);\r\n\t\tadd(cbOrdenesPresupuestoPrepago, cc.xywh(9, 15, 9, 1));\r\n\r\n\t\t//---- lblEstadoOrden ----\r\n\t\tlblEstadoOrden.setText(\"Estado de la Orden:\");\r\n\t\tadd(lblEstadoOrden, cc.xywh(3, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- cmbEstadoOrden ----\r\n\t\tcmbEstadoOrden.setModel(new DefaultComboBoxModel(new String[] {\r\n\t\t\t\"EMITIDA\",\r\n\t\t\t\"ORDENADA\",\r\n\t\t\t\"ENVIADA\",\r\n\t\t\t\"INGRESADA\",\r\n\t\t\t\"PREPAGADA\",\r\n\t\t\t\"TODOS\"\r\n\t\t}));\r\n\t\tadd(cmbEstadoOrden, cc.xy(5, 17));\r\n\r\n\t\t//---- lblTipoProveedor ----\r\n\t\tlblTipoProveedor.setText(\"Tipo de Proveedor:\");\r\n\t\tadd(lblTipoProveedor, cc.xywh(3, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- cmbTipoProveedor ----\r\n\t\tcmbTipoProveedor.setModel(new DefaultComboBoxModel(new String[] {\r\n\t\t\t\"MEDIOS\",\r\n\t\t\t\"PRODUCCION\",\r\n\t\t\t\"TODOS\"\r\n\t\t}));\r\n\t\tadd(cmbTipoProveedor, cc.xy(5, 19));\r\n\r\n\t\t//---- lblSubtipoProveedor ----\r\n\t\tlblSubtipoProveedor.setText(\"Subtipo de Proveedor:\");\r\n\t\tadd(lblSubtipoProveedor, cc.xywh(3, 21, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\tadd(cmbSubtipoProveedor, cc.xy(5, 21));\r\n\r\n\t\t//---- lblProveedor ----\r\n\t\tlblProveedor.setText(\"Proveedor:\");\r\n\t\tadd(lblProveedor, cc.xywh(3, 23, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- txtProveedor ----\r\n\t\ttxtProveedor.setEditable(false);\r\n\t\tadd(txtProveedor, cc.xywh(5, 23, 7, 1));\r\n\t\tadd(btnProveedor, cc.xywh(13, 23, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\r\n\r\n\t\t//---- cbTodosProveedores ----\r\n\t\tcbTodosProveedores.setText(\"Todos\");\r\n\t\tadd(cbTodosProveedores, cc.xy(17, 23));\r\n\r\n\t\t//---- lblProveedorOficina ----\r\n\t\tlblProveedorOficina.setText(\"Proveedor Oficina:\");\r\n\t\tadd(lblProveedorOficina, cc.xywh(3, 25, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- txtProveedorOficina ----\r\n\t\ttxtProveedorOficina.setEditable(false);\r\n\t\tadd(txtProveedorOficina, cc.xywh(5, 25, 7, 1));\r\n\t\tadd(btnProveedorOficina, cc.xywh(13, 25, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\r\n\r\n\t\t//---- cbTodosProveedorOficina ----\r\n\t\tcbTodosProveedorOficina.setText(\"Todos\");\r\n\t\tadd(cbTodosProveedorOficina, cc.xy(17, 25));\r\n\r\n\t\t//---- lblCreadorPor ----\r\n\t\tlblCreadorPor.setText(\"Creado por:\");\r\n\t\tadd(lblCreadorPor, cc.xywh(3, 27, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- txtCreadoPor ----\r\n\t\ttxtCreadoPor.setEditable(false);\r\n\t\tadd(txtCreadoPor, cc.xywh(5, 27, 7, 1));\r\n\t\tadd(btnCreadoPor, cc.xywh(13, 27, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\r\n\r\n\t\t//---- cbTodosCreadoPor ----\r\n\t\tcbTodosCreadoPor.setText(\"Todos\");\r\n\t\tadd(cbTodosCreadoPor, cc.xy(17, 27));\r\n\r\n\t\t//---- cbFiltrarCodigoPresupuesto ----\r\n\t\tcbFiltrarCodigoPresupuesto.setText(\"Filtrar por c\\u00f3digo presupuesto:\");\r\n\t\tadd(cbFiltrarCodigoPresupuesto, cc.xywh(3, 29, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- txtPresupuesto ----\r\n\t\ttxtPresupuesto.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tadd(txtPresupuesto, cc.xywh(7, 29, 4, 1));\r\n\r\n\t\t//======== spTblOrdenes ========\r\n\t\t{\r\n\r\n\t\t\t//---- tblOrdenes ----\r\n\t\t\ttblOrdenes.setModel(new DefaultTableModel(\r\n\t\t\t\tnew Object[][] {\r\n\t\t\t\t\t{null, null, \"\", null, null, null, null, null, null, null, null, null, null},\r\n\t\t\t\t},\r\n\t\t\t\tnew String[] {\r\n\t\t\t\t\t\"Fecha\", \"Cliente\", \"Presupuesto\", \"Estado\", \"Campa\\u00f1a\", \"Marca\", \"Producto\", \"Orden\", \"Estado\", \"Tipo de Proveedor\", \"Proveedor\", \"Creado Por\", \"Valor\"\r\n\t\t\t\t}\r\n\t\t\t) {\r\n\t\t\t\tboolean[] columnEditable = new boolean[] {\r\n\t\t\t\t\tfalse, false, false, false, false, false, false, false, false, false, false, false, false\r\n\t\t\t\t};\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\r\n\t\t\t\t\treturn columnEditable[columnIndex];\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tspTblOrdenes.setViewportView(tblOrdenes);\r\n\t\t}\r\n\t\tadd(spTblOrdenes, cc.xywh(3, 33, 27, 5));\r\n\r\n\t\t//---- buttonGroup2 ----\r\n\t\tButtonGroup buttonGroup2 = new ButtonGroup();\r\n\t\tbuttonGroup2.add(rbValorBruto);\r\n\t\tbuttonGroup2.add(rbValorNeto);\r\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n oldDateLbl = new javax.swing.JLabel();\n oldDateDP = new org.jdesktop.swingx.JXDatePicker();\n newDateLbl = new javax.swing.JLabel();\n newDateDP = new org.jdesktop.swingx.JXDatePicker();\n Extendsbtn = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Extend rental\");\n setAlwaysOnTop(true);\n setMinimumSize(new java.awt.Dimension(322, 131));\n setModal(true);\n setModalExclusionType(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE);\n setName(\"Extend rental\"); // NOI18N\n\n oldDateLbl.setText(\"Old return date\");\n oldDateLbl.setName(\"oldDateLbl\"); // NOI18N\n\n oldDateDP.setEditable(false);\n oldDateDP.setName(\"oldDateDP\"); // NOI18N\n\n newDateLbl.setText(\"New return date\");\n newDateLbl.setName(\"newDateLbl\"); // NOI18N\n\n newDateDP.setName(\"newDateDP\"); // NOI18N\n\n Extendsbtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/add.png\"))); // NOI18N\n Extendsbtn.setText(\"Extend\");\n Extendsbtn.setName(\"Extendsbtn\"); // NOI18N\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/return.png\"))); // NOI18N\n jButton1.setText(\"Cancel\");\n jButton1.setName(\"jButton1\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(Extendsbtn, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(oldDateLbl)\n .addComponent(newDateLbl))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(oldDateDP, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\n .addComponent(newDateDP, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(oldDateLbl)\n .addComponent(oldDateDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(newDateLbl)\n .addComponent(newDateDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Extendsbtn)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n pack();\n }", "public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }", "public interface ConferenceScheduleBuilderService {\n /**\n * Is finish boolean.\n *\n * @return the boolean\n */\n boolean isFinish();\n\n /**\n * Init conference schedule builder service.\n *\n * @param presentationList the presentation list\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService init(List<Presentation> presentationList);\n\n /**\n * Start event conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService startEvent();\n\n /**\n * End event conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService endEvent();\n\n /**\n * Start networking conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService startNetworking();\n\n /**\n * Start lunch conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService startLunch();\n\n /**\n * End lunch conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService endLunch();\n\n /**\n * Create events from start to lunch conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService createEventsFromStartToLunch();\n\n /**\n * Create events from lunch to network conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService createEventsFromLunchToNetwork();\n\n /**\n * Create events from network to end conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService createEventsFromNetworkToEnd();\n\n /**\n * Build conference schedule.\n *\n * @return the conference schedule\n */\n ConferenceSchedule build();\n}", "@Override\n\tprotected void createAdditionalControls(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NONE);\n\t\tcontainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\tGridLayout containerLayout = new GridLayout(2, false);\n\t\tcontainerLayout.marginWidth = 0;\n\t\tcontainer.setLayout(containerLayout);\n\t\t\n\t\tLabel comboLabel = new Label(container, SWT.NONE);\n\t\tcomboLabel.setText(Messages.common_calculation);\n\t\t\n\t\tcalculationTypeCombo = new Combo(container, SWT.READ_ONLY);\n\t\tcalculationTypeCombo.setItems(NamedEnumPropertyDescriptor.getEnumItems(calculationTypes, NullEnum.NOTNULL));\n\t\tcalculationTypeCombo.select(0);\n\t\tcalculationTypeCombo.addSelectionListener(new SelectionAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint selectedIndex = calculationTypeCombo.getSelectionIndex();\n\t\t\t\tselectedEnum = (CalculationEnum)calculationTypes[selectedIndex];\n\t\t\t}\n\t\t});\n\t}", "public Calculator() {\r\n\t\tsuper();\r\n\t}", "public static CartSetShippingRateInputActionBuilder builder() {\n return CartSetShippingRateInputActionBuilder.of();\n }", "public static void main(String[] args) {\n double strike = 1060.00;\n double price = 978.70;\n double timeToExp = (17.00/365.00);\n //double timeToExp = .383562;\n double stDev = 0.3172;\n double interest = 0.073521;\n char call = 'c';\n Boolean callOption = true;\n\n BlackScholes_abbreviated bsShort = new BlackScholes_abbreviated();\n Double price1 = bsShort.blackScholesCall(price, strike, stDev, timeToExp, interest);\n\n System.out.println(\" price3 = [\" + price1.toString() + \"]\");\n\n OptionDetails od = new OptionDetails(true,price,strike,interest,timeToExp,stDev);\n OptionGreeks og = BlackScholesGreeks.calculate(od);\n\n System.out.println(od.toString());\n System.out.println(og.toString());\n// System.out.println(\"Delta: \" + og.delta + \"Gamma: \" + og.gamma);\n//\n//\n// Black_76 bs76 = new Black_76();\n// Double price2 = bs76.Black76(call, price, strike, timeToExp, interest, stDev);\n// System.out.println(\" price2 = [\" + price2.toString() + \"]\");\n//\n// BlackScholesFormula bsFormula = new BlackScholesFormula();\n// Double price3 = bsFormula.calculate(callOption, price, strike, interest, timeToExp, stDev);\n// System.out.println(\" price3 = [\" + price3.toString() + \"]\");\n//\n// System.out.println();\n//\n// // TEST DATA -- trade 104335\n// strike = 18.25;\n// price = 13.10;\n// //timeToExp = 2.13035;\n// timeToExp = 2.134247;\n// stDev = 0.21;\n// interest = 0.002541;\n// call = 'c';\n// callOption = true;\n//\n// price1 = bsShort.blackScholesCall(price, strike, stDev, timeToExp, interest);\n// System.out.println(\" price1 = [\" + price1.toString() + \"]\");\n//\n// price2 = bs76.Black76(call, price, strike, timeToExp, interest, stDev);\n// System.out.println(\" price2 = [\" + price2.toString() + \"]\");\n//\n// price3 = bsFormula.calculate(callOption, price, strike, interest, timeToExp, stDev);\n// System.out.println(\" price3 = [\" + price3.toString() + \"]\");\n }", "public static FxForwardTrade.Builder builder() {\n return new FxForwardTrade.Builder();\n }", "public static DiscountedLineItemPriceBuilder of() {\n return new DiscountedLineItemPriceBuilder();\n }", "public Calculator()\n {\n \n frame = new JFrame();\n createCalculator(range);\n createCP(range);\n frame.setVisible(true);\n frame.setSize(1200,1000);\n \n\n }", "public Builder setCurrency(\n Pokemon.Currency.Builder builderForValue) {\n if (currencyBuilder_ == null) {\n currency_ = builderForValue.build();\n onChanged();\n } else {\n currencyBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000400;\n return this;\n }", "public StandardTransactionConfig build() {\n Preconditions.checkArgument(null != timestamp || null != timestampProvider);\n\n return new StandardTransactionConfig(metricsPrefix,\n timestampProvider, timestamp, customOptions);\n }", "private Builder(tr.com.siparis.sistemi.kafka.model.Kullanici.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.kullaniciTur_id)) {\n this.kullaniciTur_id = data().deepCopy(fields()[0].schema(), other.kullaniciTur_id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.kullanici_adi)) {\n this.kullanici_adi = data().deepCopy(fields()[1].schema(), other.kullanici_adi);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.kullanici_id)) {\n this.kullanici_id = data().deepCopy(fields()[2].schema(), other.kullanici_id);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.kullanici_soyadi)) {\n this.kullanici_soyadi = data().deepCopy(fields()[3].schema(), other.kullanici_soyadi);\n fieldSetFlags()[3] = true;\n }\n }", "private BusinessDateUtility() {\n\t}", "public Computer withParsedDates() {\n Computer computer = new Computer();\n computer.name = this.name;\n if(!this.dateIntroduced.isEmpty()){\n computer.dateIntroduced = DateStringUtilities.getParsedDate(this.dateIntroduced);\n }\n if(!this.dateDiscontinued.isEmpty()){\n computer.dateDiscontinued = DateStringUtilities.getParsedDate(this.dateDiscontinued);\n }\n computer.company = this.company;\n return computer;\n }", "public CFCalculator() {\n initComponents();\n }", "private Calculator() {\n }", "public CurrencyPanel() {\n\t\tActionListener listener = new ConvertListener();\n\n\t\tcurrencyCombo = new JComboBox<String>(currencyName);// declares the string type for combo box\n\t\tcurrencyCombo.setToolTipText(\"Select to convert\");// sets tool tips for combo box\n\n\t\tJLabel inputLabel = new JLabel(\"Enter value: in GBP\");\n\n\t\tconvertButton = new JButton(\"Convert\");\n\t\tconvertButton.addActionListener(listener); // convert values when the button is pressed\n\t\tconvertButton.setToolTipText(\"Click to Convert\");// sets tool tips for convert button\n\t\tconvertButton.setBorder(BorderFactory.createLineBorder(new Color(158,215,246)));\n\t\t\n\n\t\tcurrencyResultLabel = new JLabel(\"---\");// stores the result after conversion\n\t\t\n\t\tcurrencyInput = new JTextField(5);// takes the number from the user for conversion\n\t\tcurrencyInput.setToolTipText(\"Enter a number to convert.\");// sets tool tips for test field\n\t\tcurrencyInput.addActionListener(listener);// when return is pressed the action listener is called so the values\n\t\t\t\t\t\t\t\t\t\t\t\t\t// are\n\t\t\t\t\t\t\t\t\t\t\t\t\t// converted\n\t\tcurrencyInput.setBorder(BorderFactory.createLineBorder(new Color(158,215,246)));\n\n\t\t// adds the objects to the panel\n\t\tadd(currencyCombo);\n\t\tadd(inputLabel);\n\t\tadd(currencyInput);\n\t\tadd(convertButton);\n\t\tadd(currencyResultLabel);\n\n\t\t// setting boundaries\n\t\tcurrencyResultLabel.setForeground(Color.red);// changes the color of result label\n\t\tsetPreferredSize(new Dimension(600, 400));\n\t\tsetBackground(Color.LIGHT_GRAY);// adds background color\n\t\tcurrencyCombo.setBounds(50, 50, 150, 30);\n\t\tinputLabel.setBounds(230, 50, 150, 20);\n\t\tcurrencyInput.setBounds(233, 70, 100, 20);\n\t\tconvertButton.setBounds(375, 50, 100, 40);\n\t\tcurrencyResultLabel.setBounds(250, 100, 150, 20);\n\n\t\tsetLayout(null);\n\n\t}", "protected MoneyFactory() {\n\t}", "public Builder mergeCurrency(Pokemon.Currency value) {\n if (currencyBuilder_ == null) {\n if (((bitField0_ & 0x00000400) == 0x00000400) &&\n currency_ != Pokemon.Currency.getDefaultInstance()) {\n currency_ =\n Pokemon.Currency.newBuilder(currency_).mergeFrom(value).buildPartial();\n } else {\n currency_ = value;\n }\n onChanged();\n } else {\n currencyBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000400;\n return this;\n }", "public Calculator() {\n initComponents();\n \n }", "private GetCouponExchangeHistory(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "private Callback<DatePicker, DateCell> getDayCellFactory() {\n try {\n final Callback<DatePicker, DateCell> dayCellFactory = new Callback<>() {\n\n @Override\n public DateCell call(final DatePicker datePicker) {\n return new DateCell() {\n @Override\n public void updateItem(LocalDate item, boolean empty) {\n super.updateItem(item, empty);\n\n // Disable all days before today + weekend days\n if (item.isBefore(LocalDate.now()) || item.getDayOfWeek() == DayOfWeek.SATURDAY\n || item.getDayOfWeek() == DayOfWeek.SUNDAY) {\n // disable the 'button'\n setDisable(true);\n // make them red\n setStyle(\"-fx-background-color: #ffc0cb;\");\n }\n }\n };\n }\n };\n return dayCellFactory;\n } catch (Exception e) {\n logger.log(Level.SEVERE, e.toString());\n }\n return null;\n }", "@Test // Specification Test 3\n void calculateChainsawIndependeceDayTest() throws Exception {\n ToolType toolType = ToolType.CHAINSAW; // weekendFree: true holidayFree: false\n String toolCode = \"CHNS\";\n String brand = \"Stihl\";\n double dailyPrice = CHAINSAW_PRICE;\n int discount = 25;\n int daysRented = 5;\n int daysCharged = 3; // This value changes depending on tool and date of rental period\n LocalDate checkoutDate = createDate(\"2015-07-02\"); // TODO: verify labor day calc is correct\n double prediscountTotal = MoneyUtil.round(daysCharged * dailyPrice);\n double finalCharge = MoneyUtil.applyDiscount(prediscountTotal, discount);\n double discountAmt = MoneyUtil.round(prediscountTotal - finalCharge);\n\n Tool tool = createTool(toolType, toolCode, brand);\n\n List<Tool> tools = Arrays.asList(tool);\n Order order = new Order(tools, checkoutDate, daysRented);\n\n List<LocalDate> holidays = createHolidays(checkoutDate.getYear());\n RentalAgreement rentAgmt = createRentalAgreement(order, discount, holidays);\n rentAgmt.calculate();\n rentAgmt.createDocument();\n\n // Assert that all members vars all instantiated\n assertRentalAgreementNotNull(rentAgmt);\n\n // Assert that values in rental agreement match expected values\n assertValuesEqual(rentAgmt, toolCode, toolType, brand, daysRented, daysCharged, checkoutDate,\n checkoutDate.plusDays(daysRented), dailyPrice, prediscountTotal, discount, discountAmt, finalCharge);\n\n // Print document to console\n System.out.println(rentAgmt.getDocument());\n }", "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 static void main(String[] args) throws SolverException, CloneNotSupportedException {\n\t\tLocalDate referenceDate = LocalDate.of(2018,9,24);\n\n\t\t/*\n\t\t * Define the calibration spec generators for our calibration products\n\t\t */\n\t\tFunction<String,String> frequencyForTenor = (tenor) -> {\n\t\t\tswitch(tenor) {\n\t\t\tcase \"3M\":\n\t\t\t\treturn \"quarterly\";\n\t\t\tcase \"6M\":\n\t\t\t\treturn \"semiannual\";\n\t\t\t}\n\t\t\tthrow new IllegalArgumentException(\"Unkown tenor \" + tenor);\n\t\t};\n\n\t\tBiFunction<String, Double, CalibrationSpec> deposit = (maturity, rate) -> {\n\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, \"tenor\", \"act/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\tScheduleInterface scheduleInterfacePay = null;\n\t\t\tdouble calibrationTime = scheduleInterfaceRec.getPayment(scheduleInterfaceRec.getNumberOfPeriods()-1);\n\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-OIS-\" + maturity, \"Deposit\", scheduleInterfaceRec, \"\", rate, \"discount-EUR-OIS\", scheduleInterfacePay, null, 0.0, null, \"discount-EUR-OIS\", calibrationTime);\n\t\t\treturn calibrationSpec;\n\t\t};\n\n\t\tBiFunction<String, Double, CalibrationSpec> swapSingleCurve = (maturity, rate) -> {\n\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, \"annual\", \"act/360\", \"first\", \"modified_following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 1);\n\t\t\tScheduleInterface scheduleInterfacePay = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, \"annual\", \"act/360\", \"first\", \"modified_following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 1);\n\t\t\tdouble calibrationTime = scheduleInterfaceRec.getPayment(scheduleInterfaceRec.getNumberOfPeriods() - 1);\n\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-OIS-\" + maturity, \"Swap\", scheduleInterfaceRec, \"forward-EUR-OIS\", 0.0, \"discount-EUR-OIS\", scheduleInterfacePay, \"\", rate, \"discount-EUR-OIS\", \"discount-EUR-OIS\", calibrationTime);\n\t\t\treturn calibrationSpec;\n\t\t};\n\n\t\tFunction<String,BiFunction<String, Double, CalibrationSpec>> fra = (tenor) -> {\n\t\t\treturn (fixing, rate) -> {\n\t\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, fixing, tenor, \"tenor\", \"act/360\", \"first\", \"modified_following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tdouble calibrationTime = scheduleInterfaceRec.getFixing(scheduleInterfaceRec.getNumberOfPeriods() - 1);\n\t\t\t\tString curveName = \"forward-EUR-\" + tenor;\n\t\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-\" + tenor + \"-\" + fixing, \"FRA\", scheduleInterfaceRec, curveName, rate, \"discount-EUR-OIS\", null, null, 0.0, null, curveName, calibrationTime);\n\t\t\t\treturn calibrationSpec;\n\t\t\t};\n\t\t};\n\n\t\tFunction<String,BiFunction<String, Double, CalibrationSpec>> swap = (tenor) -> {\n\t\t\treturn (maturity, rate) -> {\n\t\t\t\tString frequencyRec = frequencyForTenor.apply(tenor);\n\n\t\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, frequencyRec, \"act/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tScheduleInterface scheduleInterfacePay = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, \"annual\", \"E30/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tdouble calibrationTime = scheduleInterfaceRec.getFixing(scheduleInterfaceRec.getNumberOfPeriods() - 1);\n\t\t\t\tString curveName = \"forward-EUR-\" + tenor;\n\t\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-\" + tenor + maturity, \"Swap\", scheduleInterfaceRec, curveName, 0.0, \"discount-EUR-OIS\", scheduleInterfacePay, \"\", rate, \"discount-EUR-OIS\", curveName, calibrationTime);\n\t\t\t\treturn calibrationSpec;\n\t\t\t};\n\t\t};\n\n\t\tBiFunction<String,String,BiFunction<String, Double, CalibrationSpec>> swapBasis = (tenorRec,tenorPay) -> {\n\t\t\treturn (maturity, rate) -> {\n\t\t\t\tString curveNameRec = \"forward-EUR-\" + tenorRec;\n\t\t\t\tString curveNamePay = \"forward-EUR-\" + tenorPay;\n\n\t\t\t\tString frequencyRec = frequencyForTenor.apply(tenorRec);\n\t\t\t\tString frequencyPay = frequencyForTenor.apply(tenorPay);\n\n\t\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, frequencyRec, \"act/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tScheduleInterface scheduleInterfacePay = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, frequencyPay, \"act/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tdouble calibrationTime = scheduleInterfaceRec.getFixing(scheduleInterfaceRec.getNumberOfPeriods() - 1);\n\n\t\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-\" + tenorRec + \"-\" + tenorPay + maturity, \"Swap\", scheduleInterfaceRec, curveNameRec, 0.0, \"discount-EUR-OIS\", scheduleInterfacePay, curveNamePay, rate, \"discount-EUR-OIS\", curveNameRec, calibrationTime);\n\t\t\t\treturn calibrationSpec;\n\t\t\t};\n\t\t};\n\n\t\t/*\n\t\t * Generate empty curve template (for cloning during calibration)\n\t\t */\n\t\tdouble[] times = { 0.0 };\n\t\tdouble[] discountFactors = { 1.0 };\n\t\tboolean[] isParameter = { false };\n\n\t\tDiscountCurve discountCurveOIS = DiscountCurve.createDiscountCurveFromDiscountFactors(\"discount-EUR-OIS\", referenceDate, times, discountFactors, isParameter, InterpolationMethod.LINEAR, ExtrapolationMethod.CONSTANT, InterpolationEntity.LOG_OF_VALUE);\n\t\tForwardCurveInterface forwardCurveOIS = new ForwardCurveFromDiscountCurve(\"forward-EUR-OIS\", \"discount-EUR-OIS\", referenceDate, \"3M\");\n\t\tForwardCurveInterface forwardCurve3M = new ForwardCurve(\"forward-EUR-3M\", referenceDate, \"3M\", new BusinessdayCalendarExcludingTARGETHolidays(), BusinessdayCalendarInterface.DateRollConvention.FOLLOWING, Curve.InterpolationMethod.LINEAR, Curve.ExtrapolationMethod.CONSTANT, Curve.InterpolationEntity.VALUE,ForwardCurve.InterpolationEntityForward.FORWARD, \"discount-EUR-OIS\");\n\t\tForwardCurveInterface forwardCurve6M = new ForwardCurve(\"forward-EUR-6M\", referenceDate, \"6M\", new BusinessdayCalendarExcludingTARGETHolidays(), BusinessdayCalendarInterface.DateRollConvention.FOLLOWING, Curve.InterpolationMethod.LINEAR, Curve.ExtrapolationMethod.CONSTANT, Curve.InterpolationEntity.VALUE,ForwardCurve.InterpolationEntityForward.FORWARD, \"discount-EUR-OIS\");\n\n\t\tAnalyticModel forwardCurveModel = new AnalyticModel(new CurveInterface[] { discountCurveOIS, forwardCurveOIS, forwardCurve3M, forwardCurve6M });\n\n\t\tList<CalibrationSpec> calibrationSpecs = new LinkedList<>();\n\n\t\t/*\n\t\t * Calibration products for OIS curve: Deposits\n\t\t */\n\t\tcalibrationSpecs.add(deposit.apply(\"1D\", 0.202 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"1W\", 0.195 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"2W\", 0.193 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"3W\", 0.193 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"1M\", 0.191 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"2M\", 0.185 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"3M\", 0.180 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"4M\", 0.170 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"5M\", 0.162 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"6M\", 0.156 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"7M\", 0.150 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"8M\", 0.145 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"9M\", 0.141 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"10M\", 0.136 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"11M\", 0.133 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"12M\", 0.129 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for OIS curve: Swaps\n\t\t */\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"15M\", 0.118 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"18M\", 0.108 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"21M\", 0.101 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"2Y\", 0.101 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"3Y\", 0.194 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"4Y\", 0.346 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"5Y\", 0.534 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"6Y\", 0.723 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"7Y\", 0.895 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"8Y\", 1.054 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"9Y\", 1.189 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"10Y\", 1.310 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"11Y\", 1.423 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"12Y\", 1.520 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"15Y\", 1.723 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"20Y\", 1.826 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"25Y\", 1.877 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"30Y\", 1.910 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"40Y\", 2.025 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"50Y\", 2.101 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for 3M curve: FRAs\n\t\t */\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"0D\", 0.322 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"1M\", 0.329 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"2M\", 0.328 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"3M\", 0.326 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"6M\", 0.323 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"9M\", 0.316 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"12M\", 0.360 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"15M\", 0.390 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for 3M curve: swaps\n\t\t */\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"2Y\", 0.380 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"3Y\", 0.485 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"4Y\", 0.628 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"5Y\", 0.812 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"6Y\", 0.998 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"7Y\", 1.168 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"8Y\", 1.316 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"9Y\", 1.442 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"10Y\", 1.557 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"12Y\", 1.752 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"15Y\", 1.942 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"20Y\", 2.029 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"25Y\", 2.045 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"30Y\", 2.097 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"40Y\", 2.208 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"50Y\", 2.286 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for 6M curve: FRAs\n\t\t */\n\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"0D\", 0.590 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"1M\", 0.597 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"2M\", 0.596 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"3M\", 0.594 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"6M\", 0.591 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"9M\", 0.584 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"12M\", 0.584 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for 6M curve: tenor basis swaps\n\t\t * Note: the fixed bases is added to the second argument tenor (here 3M).\n\t\t */\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"2Y\", 0.255 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"3Y\", 0.245 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"4Y\", 0.227 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"5Y\", 0.210 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"6Y\", 0.199 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"7Y\", 0.189 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"8Y\", 0.177 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"9Y\", 0.170 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"10Y\", 0.164 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"12Y\", 0.156 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"15Y\", 0.135 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"20Y\", 0.125 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"25Y\", 0.117 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"30Y\", 0.107 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"40Y\", 0.095 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"50Y\", 0.088 / 100.0));\n\n\t\t/*\n\t\t * Calibrate\n\t\t */\n\t\tCalibratedCurves calibratedCurves = new CalibratedCurves(calibrationSpecs.toArray(new CalibrationSpec[calibrationSpecs.size()]), forwardCurveModel, 1E-15);\n\n\t\t/*\n\t\t * Get the calibrated model\n\t\t */\n\t\tAnalyticModelInterface calibratedModel = calibratedCurves.getModel();\n\t\t\n\t\tdouble[] strikes = {-0.005,\n\t\t\t\t-0.0025,\n\t\t\t\t-0.0013,\n\t\t\t\t0.0,\n\t\t\t\t0.0025,\n\t\t\t\t0.005,\n\t\t\t\t0.01,\n\t\t\t\t0.015,\n\t\t\t\t0.02,\n\t\t\t\t0.03,\n\t\t\t\t0.05};\n\t\t\n\t\n\t\tdouble[][] volatilities = \n\t\t\t{{0.0025,0.0024,0.0027,0.0031,0.0037,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0025,0.0024,0.0027,0.0031,0.0037,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0025,0.0024,0.0028,0.0031,0.0038,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0025,0.0024,0.0027,0.0031,0.0037,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0025,0.0024,0.0027,0.0031,0.0038,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0040,0.0043,0.0045,0.0047,0.0049,0.0052,0.0058,0.0065,0.0072,0.0087,0.0114},\n\t\t\t\t\t{0.0047,0.0049,0.0051,0.0053,0.0055,0.0057,0.0062,0.0068,0.0075,0.0089,0.0115},\n\t\t\t\t\t{0.0050,0.0052,0.0053,0.0054,0.0056,0.0058,0.0063,0.0069,0.0075,0.0088,0.0113},\n\t\t\t\t\t{0.0055,0.0056,0.0057,0.0058,0.0060,0.0061,0.0065,0.0070,0.0076,0.0088,0.0113},\n\t\t\t\t\t{0.0055,0.0056,0.0057,0.0058,0.0060,0.0061,0.0064,0.0069,0.0074,0.0084,0.0107},\n\t\t\t\t\t{0.0058,0.0059,0.0061,0.0061,0.0062,0.0064,0.0066,0.0070,0.0074,0.0083,0.0103},\n\t\t\t\t\t{0.0058,0.0059,0.0059,0.0060,0.0062,0.0063,0.0066,0.0069,0.0073,0.0081,0.0099},\n\t\t\t\t\t{0.0060,0.0061,0.0062,0.0063,0.0064,0.0065,0.0067,0.0069,0.0072,0.0079,0.0095},\n\t\t\t\t\t{0.0059,0.0060,0.0061,0.0061,0.0063,0.0063,0.0066,0.0068,0.0071,0.0079,0.0095},\n\t\t\t\t\t{0.0061,0.0062,0.0062,0.0062,0.0064,0.0065,0.0066,0.0068,0.0071,0.0077,0.0092},\n\t\t\t\t\t{0.0059,0.0060,0.0061,0.0061,0.0062,0.0063,0.0065,0.0067,0.0070,0.0077,0.0091},\n\t\t\t\t\t{0.0060,0.0061,0.0062,0.0062,0.0063,0.0063,0.0066,0.0067,0.0070,0.0075,0.0089},\n\t\t\t\t\t{0.0060,0.0060,0.0060,0.0061,0.0062,0.0063,0.0064,0.0067,0.0069,0.0075,0.0088},\n\t\t\t\t\t{0.0060,0.0061,0.0061,0.0062,0.0062,0.0063,0.0064,0.0067,0.0068,0.0073,0.0086},\n\t\t\t\t\t{0.0058,0.0058,0.0059,0.0059,0.0060,0.0061,0.0063,0.0065,0.0067,0.0073,0.0085},\n\t\t\t\t\t{0.0058,0.0059,0.0060,0.0060,0.0060,0.0061,0.0063,0.0065,0.0067,0.0071,0.0083},\n\t\t\t\t\t{0.0059,0.0059,0.0060,0.0060,0.0061,0.0061,0.0063,0.0064,0.0066,0.0070,0.0081},\n\t\t\t\t\t{0.0059,0.0060,0.0061,0.0061,0.0061,0.0062,0.0063,0.0064,0.0065,0.0069,0.0079},\n\t\t\t\t\t{0.0056,0.0057,0.0057,0.0057,0.0058,0.0059,0.0060,0.0062,0.0065,0.0069,0.0081},\n\t\t\t\t\t{0.0056,0.0057,0.0057,0.0057,0.0058,0.0059,0.0060,0.0062,0.0064,0.0068,0.0079},\n\t\t\t\t\t{0.0057,0.0057,0.0057,0.0058,0.0058,0.0059,0.0060,0.0061,0.0063,0.0067,0.0077},\n\t\t\t\t\t{0.0057,0.0057,0.0057,0.0058,0.0058,0.0059,0.0060,0.0061,0.0063,0.0066,0.0076},\n\t\t\t\t\t{0.0057,0.0057,0.0058,0.0058,0.0058,0.0059,0.0059,0.0060,0.0062,0.0065,0.0074},\n\t\t\t\t\t{0.0057,0.0058,0.0058,0.0058,0.0059,0.0059,0.0059,0.0060,0.0061,0.0064,0.0073},\n\t\t\t\t\t{0.0054,0.0054,0.0054,0.0055,0.0055,0.0056,0.0058,0.0059,0.0061,0.0065,0.0076},\n\t\t\t\t\t{0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0059,0.0060,0.0065,0.0075},\n\t\t\t\t\t{0.0054,0.0053,0.0054,0.0054,0.0055,0.0055,0.0057,0.0058,0.0060,0.0064,0.0074},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0055,0.0055,0.0056,0.0058,0.0059,0.0063,0.0073},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0059,0.0062,0.0071},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0058,0.0061,0.0070},\n\t\t\t\t\t{0.0053,0.0053,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0061,0.0069},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0060,0.0068},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0059,0.0067},\n\t\t\t\t\t{0.0053,0.0053,0.0054,0.0054,0.0054,0.0054,0.0054,0.0055,0.0055,0.0058,0.0066},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0052,0.0053,0.0054,0.0055,0.0057,0.0060,0.0070},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0052,0.0052,0.0053,0.0055,0.0056,0.0060,0.0069},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0052,0.0052,0.0053,0.0054,0.0056,0.0059,0.0068},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0051,0.0052,0.0052,0.0054,0.0055,0.0058,0.0067},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0051,0.0051,0.0052,0.0053,0.0055,0.0058,0.0066},\n\t\t\t\t\t{0.0050,0.0051,0.0051,0.0050,0.0051,0.0051,0.0052,0.0053,0.0054,0.0057,0.0066},\n\t\t\t\t\t{0.0050,0.0050,0.0051,0.0050,0.0051,0.0051,0.0051,0.0052,0.0054,0.0056,0.0065},\n\t\t\t\t\t{0.0050,0.0050,0.0050,0.0050,0.0051,0.0051,0.0051,0.0052,0.0053,0.0056,0.0064},\n\t\t\t\t\t{0.0050,0.0050,0.0050,0.0050,0.0050,0.0050,0.0050,0.0051,0.0053,0.0055,0.0063},\n\t\t\t\t\t{0.0050,0.0050,0.0050,0.0050,0.0050,0.0050,0.0050,0.0051,0.0052,0.0054,0.0063},\n\t\t\t\t\t{0.0050,0.0049,0.0049,0.0050,0.0050,0.0051,0.0051,0.0052,0.0053,0.0057,0.0065},\n\t\t\t\t\t{0.0049,0.0049,0.0049,0.0050,0.0050,0.0050,0.0051,0.0052,0.0053,0.0057,0.0065},\n\t\t\t\t\t{0.0049,0.0049,0.0049,0.0049,0.0050,0.0050,0.0051,0.0052,0.0053,0.0056,0.0064},\n\t\t\t\t\t{0.0049,0.0049,0.0049,0.0049,0.0049,0.0050,0.0050,0.0051,0.0052,0.0056,0.0064},\n\t\t\t\t\t{0.0049,0.0048,0.0049,0.0049,0.0049,0.0050,0.0050,0.0051,0.0052,0.0056,0.0063},\n\t\t\t\t\t{0.0048,0.0048,0.0048,0.0049,0.0049,0.0049,0.0050,0.0050,0.0051,0.0055,0.0063},\n\t\t\t\t\t{0.0048,0.0048,0.0048,0.0048,0.0049,0.0049,0.0049,0.0050,0.0051,0.0055,0.0062},\n\t\t\t\t\t{0.0048,0.0048,0.0048,0.0048,0.0048,0.0049,0.0049,0.0050,0.0051,0.0054,0.0062},\n\t\t\t\t\t{0.0048,0.0047,0.0048,0.0048,0.0048,0.0048,0.0048,0.0049,0.0050,0.0054,0.0061},\n\t\t\t\t\t{0.0047,0.0047,0.0047,0.0048,0.0048,0.0048,0.0048,0.0049,0.0050,0.0053,0.0061}};\n\t\t\n\t\tdouble[] maturities = {0.5000,1.0000,1.5000,2.0000,2.5000,3.0000,3.5000,4.0000,4.5000,5.0000,\n\t\t\t\t5.5000,6.0000,6.5000,7.0000,7.5000,8.0000,8.5000,9.0000,9.5000,10.0000,\n\t\t\t\t10.5000,11.0000,11.5000,12.0000,12.5000,13.0000,13.5000,14.0000,14.5000,\n\t\t\t\t15.0000,15.5000,16.0000,16.5000,17.0000,17.5000,18.0000,18.5000,19.0000,\n\t\t\t\t19.5000,20.0000,20.5000,21.0000,21.5000,22.0000,22.5000,23.0000,23.5000,\n\t\t\t\t24.0000,24.5000,25.0000,25.5000,26.0000,26.5000,27.0000,27.5000,28.0000,\n\t\t\t\t28.5000,29.0000,29.5000};\n\t\t\n\t\tint[] indeces = {7,9,10,11,12,13,14,15,16,17,18,19}; //chose the index of the maturities we want to calibrate\n\t\t\n\t\t//Target caplet data\n\t\tQuotingConvention convention = QuotingConvention.VOLATILITYNORMAL;\n\t\t\n\t\tArrayList<CapletSmileData> smiles = new ArrayList<CapletSmileData>();\n\t\t\n\t\tfor(int i = 0; i<indeces.length; i++) {\n\t\t\tint index = indeces[i];\n\t\t\tdouble[] values = volatilities[index];\n\t\t\tdouble time = maturities[index];\n\t\t\tCapletSmileData ithSmile = new CapletSmileData(\"forward-EUR-6M\",\"discount-EUR-OIS\",referenceDate,strikes,time, values, convention);\n\t\t\tsmiles.add(ithSmile);\n\t\t}\n\t\t\n\t\tCapletSmileData[] smileArray = new CapletSmileData[smiles.size()];\n\t\tsmileArray = smiles.toArray(new CapletSmileData[smiles.size()]);\n\t\t\n\t\tCapletSurfaceData surface = new CapletSurfaceData(smileArray, calibratedModel);\n\t\t\n\t\tOptimizerFactoryInterface optimizerFactory = new OptimizerFactoryLevenbergMarquardt(300 /* maxIterations */, 8 /* maxThreads */);\n\n\t\t\n\t\tdouble[] initialParameters = new double[] {0.1, 0.2,0.1, 0.3,0.1,0.7,0.4,0.6,0.1,0.2,0.1} /* initialParameters */;\n\t\tdouble[] parameterStep = new double[] {0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01, 0.01} /* parameterStep */;\n\t\t\n\t\tint numberOfPoints = 4096*16;\n\t\tdouble gridSpacing = 0.005;\n\t\tnet.finmath.interpolation.RationalFunctionInterpolation.InterpolationMethod intMethod = net.finmath.interpolation.RationalFunctionInterpolation.InterpolationMethod.LINEAR;\n\t\tnet.finmath.interpolation.RationalFunctionInterpolation.ExtrapolationMethod extMethod = net.finmath.interpolation.RationalFunctionInterpolation.ExtrapolationMethod.CONSTANT;\n\t\t\n\t\tCapletByCarrMadan pricer = new CapletByCarrMadan(\"forward-EUR-6M\", 5.0,strikes,numberOfPoints,gridSpacing,intMethod,extMethod);\n\t\t\t\n\t\t\n\t\tdouble b = 0.3;\n\t\tdouble sigma = 0.08512087176733757;\n\t\tdouble eta = 0.8006437480710635;\n\t\tdouble zeta = 1.9;\n\t\tdouble alpha = 1.0596981657639444;\n\t\tdouble[] initialValues = {0.01, 0.02};\n\t\tdouble[] immigrationRates = {0.1, 0.3};\n\t\tdouble[] lambda = {1, 1};\n\t\n\t\t\n\t\tMultiCurveTenor threeMonth = new MultiCurveTenor(0.25, \"3M\");\n\t\tMultiCurveTenor sixMonth = new MultiCurveTenor(0.5, \"6M\");\n\t\tMultiCurveTenor[] tenors = {threeMonth,sixMonth};\n\t\t\n\t\tdouble[] tenorLengths = {0.25,0.6};\n\t\tString[] tenorNames = {\"3M\", \"6M\"};\n\t\t\n\t\tdouble timeHorizon = 12.0;\t\t\n\t\tint numberOfTimeSteps = 40;\n\t\t\n\t\tScalarParameterInformationInterface[] lambdaInfo = \n\t\t\t{new ScalarParameterInformation(false, new PositivityConstraint()),\n\t\t\t\t\tnew ScalarParameterInformation(false, new PositivityConstraint())};\n\t\tScalarParameterInformationInterface[] immigrationRatesInfo =\n\t\t\t{new ScalarParameterInformation(true, new BoundConstraint(1E-5,10.0)),\n\t\t\t\t\tnew ScalarParameterInformation(true, new BoundConstraint(1E-5,10.0))};\n\t\t\n\t\tScalarParameterInformationInterface bInfo = new ScalarParameterInformation(true, new PositivityConstraint());\n\t\tScalarParameterInformationInterface sigmaInfo = new ScalarParameterInformation(true, new PositivityConstraint());\n\t\tScalarParameterInformationInterface etaInfo = new ScalarParameterInformation(true, new PositivityConstraint());\n\t\tScalarParameterInformationInterface zetaInfo = new ScalarParameterInformation(true, new PositivityConstraint());\n\t\tScalarParameterInformationInterface alphaInfo = new ScalarParameterInformation(true, new BoundConstraint(1, 2));\n\t\t\n\t\tScalarParameterInformationInterface[] initialValuesInfo = \n\t\t\t{new ScalarParameterInformation(true, new PositivityConstraint()),\n\t\t\t\t\tnew ScalarParameterInformation(true, new PositivityConstraint())};\n\t\t\n\t\tboolean functionVConstraint = true;\n\t\tboolean expMomentConstraint = true;\n\t\t\n\t\tCBIProcessInterface cbiProcess = new FlowOfTemperedAlphaStableCBIprocess(timeHorizon, numberOfTimeSteps, initialValues, immigrationRates, b, sigma, \n\t\t\t\t eta, zeta, alpha,lambda, \n\t\t\t\tlambdaInfo, immigrationRatesInfo, \n\t\t\t\tbInfo, sigmaInfo, etaInfo, \n\t\t\t\tzetaInfo, alphaInfo, initialValuesInfo,\n\t\t\t\tfunctionVConstraint, expMomentConstraint);\n\t\t\n\t\tCBIDrivenMultiCurveModel model = new CBIDrivenMultiCurveModel(calibratedModel, cbiProcess, tenorLengths, tenorNames);\n\t\t\n\t\t//CBIDrivenMultiCurveModel model = new CBIDrivenMultiCurveModel(timeHorizon, numberOfTimeSteps, calibratedModel, tenors, initialValues, immigrationRates, b, sigma, eta, zeta, alpha, lambda);\n\t\t\n\t\tCapletCalibrationProblem problem = new CapletCalibrationProblem(surface, model, optimizerFactory, pricer,initialParameters,parameterStep);\n\t\t\n\t\tSystem.out.println(\"Calibration started\");\n\t\t\n\t\tlong startMillis\t= System.currentTimeMillis();\n\t\tnet.finmath.fouriermethod.calibration.CapletCalibrationProblem.OptimizationResult result = problem.runCalibration();\n\t\tlong endMillis\t\t= System.currentTimeMillis();\n\t\t\n\t\tdouble calculationTime = ((endMillis-startMillis)/1000.0);\n\t\t\n\t\tSystem.out.println(\"Calibration completed in: \" +calculationTime + \" seconds\");\n\t\t\n\t\tSystem.out.println(\"The solver required \" + result.getIterations() + \" iterations.\");\n\t\tSystem.out.println(\"RMSQE \" +result.getRootMeanSquaredError());\n\t\t\n\t\tdouble[] parameters = result.getModel().getParameters();\n\t\tfor(int i =0; i<parameters.length; i++) {\n\t\t\tSystem.out.println(parameters[i]);\n\t\t}\n\t\t\n\t\tArrayList<String> errorsOverview = result.getCalibrationOutput();\n\t\t\n\t\tfor(String myString : errorsOverview)\n\t\t\tSystem.out.println(myString);\n\t\t\n\t\tSystem.out.println(result.getModel().getClass());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Finished.\");\n\t\n\t\t\n\t}", "public Calculator() {\n initComponents();\n setResizable(false);\n \n NumListener numListener = new Calculator.NumListener();\n numButton0.addActionListener(numListener);\n numButton1.addActionListener(numListener);\n numButton2.addActionListener(numListener);\n numButton3.addActionListener(numListener);\n numButton4.addActionListener(numListener);\n numButton5.addActionListener(numListener);\n numButton6.addActionListener(numListener);\n numButton7.addActionListener(numListener);\n numButton8.addActionListener(numListener);\n numButton9.addActionListener(numListener);\n pointButton.addActionListener(numListener);\n \n OpListener opListener = new Calculator.OpListener();\n plusButton.addActionListener(opListener);\n minButton.addActionListener(opListener);\n multButton.addActionListener(opListener);\n divButton.addActionListener(opListener);\n sqrtButton.addActionListener(opListener);\n eqButton.addActionListener(opListener);\n signButton.addActionListener(opListener);\n \n ClearListener clearListener = new ClearListener();\n cButton.addActionListener(clearListener);\n ceButton.addActionListener(clearListener);\n }", "ConferenceScheduleBuilderService init(List<Presentation> presentationList);", "public DefaultCurveMetadata build() {\n return new DefaultCurveMetadata(curveName, xValueType, yValueType, info, parameterMetadata);\n }", "public interface WorkdayEndpointConsumerBuilder\n extends\n EndpointConsumerBuilder {\n default AdvancedWorkdayEndpointConsumerBuilder advanced() {\n return (AdvancedWorkdayEndpointConsumerBuilder) this;\n }\n /**\n * Allows for bridging the consumer to the Camel routing Error Handler,\n * which mean any exceptions occurred while the consumer is trying to\n * pickup incoming messages, or the likes, will now be processed as a\n * message and handled by the routing Error Handler. By default the\n * consumer will use the org.apache.camel.spi.ExceptionHandler to deal\n * with exceptions, that will be logged at WARN or ERROR level and\n * ignored.\n * \n * The option is a: <code>boolean</code> type.\n * \n * Default: false\n * Group: consumer\n */\n default WorkdayEndpointConsumerBuilder bridgeErrorHandler(\n boolean bridgeErrorHandler) {\n doSetProperty(\"bridgeErrorHandler\", bridgeErrorHandler);\n return this;\n }\n /**\n * Allows for bridging the consumer to the Camel routing Error Handler,\n * which mean any exceptions occurred while the consumer is trying to\n * pickup incoming messages, or the likes, will now be processed as a\n * message and handled by the routing Error Handler. By default the\n * consumer will use the org.apache.camel.spi.ExceptionHandler to deal\n * with exceptions, that will be logged at WARN or ERROR level and\n * ignored.\n * \n * The option will be converted to a <code>boolean</code> type.\n * \n * Default: false\n * Group: consumer\n */\n default WorkdayEndpointConsumerBuilder bridgeErrorHandler(\n String bridgeErrorHandler) {\n doSetProperty(\"bridgeErrorHandler\", bridgeErrorHandler);\n return this;\n }\n /**\n * Workday Report as a service output format.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Group: format\n */\n default WorkdayEndpointConsumerBuilder format(String format) {\n doSetProperty(\"format\", format);\n return this;\n }\n /**\n * Workday Host name.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: host\n */\n default WorkdayEndpointConsumerBuilder host(String host) {\n doSetProperty(\"host\", host);\n return this;\n }\n /**\n * Workday Client Id generated by API Client for Integrations.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: security\n */\n default WorkdayEndpointConsumerBuilder clientId(String clientId) {\n doSetProperty(\"clientId\", clientId);\n return this;\n }\n /**\n * Workday Client Secrect generated by API Client for Integrations.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: security\n */\n default WorkdayEndpointConsumerBuilder clientSecret(String clientSecret) {\n doSetProperty(\"clientSecret\", clientSecret);\n return this;\n }\n /**\n * Workday Token Refresh generated for Integration system user.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: security\n */\n default WorkdayEndpointConsumerBuilder tokenRefresh(String tokenRefresh) {\n doSetProperty(\"tokenRefresh\", tokenRefresh);\n return this;\n }\n /**\n * Workday Tenant name.\n * \n * The option is a: <code>java.lang.String</code> type.\n * \n * Required: true\n * Group: tenant\n */\n default WorkdayEndpointConsumerBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }\n }", "private JPanel moneyButtons() {\n JPanel moneyIn = new JPanel();\n centButton.addActionListener(new moneyListener());\n nickelButton.addActionListener(new moneyListener());\n dimeButton.addActionListener(new moneyListener());\n quarterButton.addActionListener(new moneyListener());\n moneyIn.setLayout(new GridLayout(2,2,2,2));\n moneyIn.add(centButton);\n moneyIn.add(nickelButton);\n moneyIn.add(dimeButton);\n moneyIn.add(quarterButton);\n return moneyIn;\n }", "public static CouponIborCompoundedDiscountingMethod getInstance() {\n return INSTANCE;\n }", "public CalendarDemo() {\r\n super();\r\n JPanel tmpPanel = new JPanel();\r\n tmpPanel.setLayout( new GridBagLayout() );\r\n GridBagConstraints c = new GridBagConstraints();\r\n\r\n c.fill = GridBagConstraints.BOTH;\r\n c.gridx = 0;\r\n c.gridy = 0;\r\n c.weightx = 1;\r\n c.weighty = 1;\r\n c.gridheight = 2;\r\n tmpPanel.add(chart[0], c);\r\n\r\n c.gridx = 1;\r\n c.gridy = 0;\r\n c.weightx = 0.4;\r\n c.weighty = 0.4;\r\n c.gridheight = 1;\r\n tmpPanel.add(chart[1], c);\r\n\r\n c.gridx = 1;\r\n c.gridy = 1;\r\n c.weightx = 0.3;\r\n c.weighty = 0.6;\r\n c.gridheight = 1;\r\n tmpPanel.add(chart[2], c);\r\n\r\n setSamplePane(tmpPanel);\r\n\r\n weekDaysButton.addItemListener(this);\r\n monthNameButton.addItemListener(this);\r\n editButton.addActionListener(this);\r\n }", "private com.google.protobuf.SingleFieldBuilder<\n org.adscale.format.opertb.AmountMessage.Amount, org.adscale.format.opertb.AmountMessage.Amount.Builder, org.adscale.format.opertb.AmountMessage.AmountOrBuilder> \n getExchangepriceFieldBuilder() {\n if (exchangepriceBuilder_ == null) {\n exchangepriceBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n org.adscale.format.opertb.AmountMessage.Amount, org.adscale.format.opertb.AmountMessage.Amount.Builder, org.adscale.format.opertb.AmountMessage.AmountOrBuilder>(\n getExchangeprice(),\n getParentForChildren(),\n isClean());\n exchangeprice_ = null;\n }\n return exchangepriceBuilder_;\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 interface CustomerSpec {\n\n static Specification<Customer> campaignIdEq(final String campaigId) {\n\n return (Root<Customer> root, CriteriaQuery<?> cq, CriteriaBuilder cb) -> {\n //select c from Customer c join c.transactions t where t.point.campaignId = ?1\n Join<Customer, Transaction> join = root.join(Customer_.transactions, JoinType.INNER);\n return cb.equal(join.get(Transaction_.point).get(Point_.campaignId), campaigId);\n };\n }\n\n static Specification<Customer> txDateBetween(final Date startDate, Date endDate) {\n\n if (startDate == null) {\n return null;\n }\n\n if (endDate == null) {\n endDate = new Date();\n }\n\n final Date _endDate = endDate;\n return (Root<Customer> root, CriteriaQuery<?> cq, CriteriaBuilder cb) -> {\n\n //select c from Customer c join c.transactions t where t.transactionDate between ?1 and ?2\n Join<Customer, Transaction> join = root.join(Customer_.transactions, JoinType.INNER);\n\n return cb.between(\n join.get(Transaction_.transactionDate),\n startDate,\n _endDate\n );\n };\n\n }\n\n static Specification<Customer> accumulateBetween(final BigDecimal start, final BigDecimal end) {\n\n if (start == null) {\n return null;\n }\n\n if (end == null) {\n //select c from Customer c where c.accumulatePurchase >= ?1\n return (Root<Customer> root, CriteriaQuery<?> cq, CriteriaBuilder cb) -> cb.greaterThanOrEqualTo(root.get(Customer_.accumulatePurchase), start);\n }\n\n //select c from Customer c where c.accumulatePurchase >= ?1 and c.accumulatePurchase <= ?2\n return (Root<Customer> root, CriteriaQuery<?> cq, CriteriaBuilder cb) -> cb.and(\n cb.greaterThanOrEqualTo(root.get(Customer_.accumulatePurchase), start),\n cb.lessThanOrEqualTo(root.get(Customer_.accumulatePurchase), end)\n );\n }\n\n static Specification<Customer> netTaxTotalBetween(final BigDecimal start, BigDecimal end) {\n\n if (start == null) {\n return null;\n }\n\n if (end == null) {\n return (Root<Customer> root, CriteriaQuery<?> cq, CriteriaBuilder cb) -> {\n //select c from Customer c join c.transactions t where t.netTaxTotal >= ?1\n Join<Customer, Transaction> join = root.join(Customer_.transactions, JoinType.INNER);\n\n return cb.greaterThanOrEqualTo(\n join.get(Transaction_.netTaxTotal),\n start\n );\n };\n }\n\n return (Root<Customer> root, CriteriaQuery<?> cq, CriteriaBuilder cb) -> {\n //select c from Customer c join c.transactions t where t.netTaxTotal >= ?1 and t.netTaxTotal<= ?2\n Join<Customer, Transaction> join = root.join(Customer_.transactions, JoinType.INNER);\n\n return cb.and(\n cb.greaterThanOrEqualTo(join.get(Transaction_.netTaxTotal), start),\n cb.lessThanOrEqualTo(join.get(Transaction_.netTaxTotal), end)\n );\n };\n\n }\n\n static Specification<Customer> registerChannelIn(final List<RegisterChannel.Name> registerChannels) {\n\n if (isEmpty(registerChannels)) {\n return null;\n }\n\n return (Root<Customer> root, CriteriaQuery<?> cq, CriteriaBuilder cb) -> {\n //select c from Customer c where c.registerChannel in ?1\n return root.get(Customer_.registerChannel).in(registerChannels);\n };\n }\n\n}", "public KafkaOffsetManager build() {\n\n String err = \"All required parameters were not set: \";\n if (instance.kc == null) {\n throw new IllegalStateException(err + \"failed to setup kafkacluster instance, invalid brokerlist?\");\n }\n if (StringUtils.isBlank(instance.groupid)) {\n throw new IllegalStateException(err + \"Groupid cannot be null or blank.\");\n }\n if (instance.topicList.isEmpty()) {\n throw new IllegalStateException(err + \"Topic needs to be set.\");\n }\n if (instance.dao == null) {\n throw new IllegalStateException(err + \"OffsetManagerDAO not set.\");\n }\n if (!instance.startFrom.equals(\"earliest\") && !instance.startFrom.equals(\"latest\")) {\n throw new IllegalStateException(err + \"StarFrom needs to be either 'earliest' or 'latest'.\");\n }\n\n return instance;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n tenDotThu = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n loaiPhi = new javax.swing.JComboBox<>();\n soTien = new javax.swing.JTextField();\n ngayBatDauThu = new com.toedter.calendar.JDateChooser();\n ngayKetThucThu = new com.toedter.calendar.JDateChooser();\n cancelBtn = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n maDotThu = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n ngayTao = new com.toedter.calendar.JDateChooser();\n taoDanhSach = new javax.swing.JButton();\n createBtn = new javax.swing.JButton();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n check = new javax.swing.JButton();\n availableDotThu = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Tên đợt thu : \");\n\n tenDotThu.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tenDotThuActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"Loại phí thu :\");\n\n jLabel3.setText(\"Ngày bắt đầu thu :\");\n\n jLabel4.setText(\"Ngày kết thúc thu :\");\n\n jLabel5.setText(\"Số tiền trên một nhân khẩu :\");\n\n loaiPhi.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Bắt buộc\", \"Không bắt buộc\" }));\n loaiPhi.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n loaiPhiActionPerformed(evt);\n }\n });\n\n soTien.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n soTienActionPerformed(evt);\n }\n });\n\n cancelBtn.setText(\"Hủy\");\n cancelBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelBtnActionPerformed(evt);\n }\n });\n\n jLabel6.setForeground(java.awt.Color.red);\n jLabel6.setText(\"(*)\");\n\n jLabel7.setForeground(java.awt.Color.red);\n jLabel7.setText(\"(*)\");\n\n jLabel8.setForeground(java.awt.Color.red);\n jLabel8.setText(\"(*)\");\n\n jLabel9.setForeground(java.awt.Color.red);\n jLabel9.setText(\"(*)\");\n\n maDotThu.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n maDotThuActionPerformed(evt);\n }\n });\n\n jLabel10.setText(\"Mã đợt thu:\");\n\n taoDanhSach.setText(\"Tạo danh sách\");\n taoDanhSach.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n taoDanhSachActionPerformed(evt);\n }\n });\n\n createBtn.setText(\"Thêm mới\");\n createBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n createBtnActionPerformed(evt);\n }\n });\n\n jLabel12.setForeground(java.awt.Color.red);\n jLabel12.setText(\"(*)\");\n\n jLabel13.setForeground(java.awt.Color.red);\n jLabel13.setText(\"(*)\");\n\n jLabel14.setForeground(java.awt.Color.red);\n jLabel14.setText(\"(*)\");\n\n jLabel15.setText(\"Ngày tạo:\");\n\n check.setText(\"Check\");\n check.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n checkActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cancelBtn)\n .addGap(18, 18, 18)\n .addComponent(createBtn)\n .addGap(18, 18, 18)\n .addComponent(taoDanhSach)\n .addGap(2, 2, 2))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel15))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(ngayTao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(tenDotThu)\n .addGap(2, 2, 2))\n .addComponent(ngayBatDauThu, javax.swing.GroupLayout.DEFAULT_SIZE, 368, Short.MAX_VALUE)\n .addComponent(ngayKetThucThu, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(loaiPhi, javax.swing.GroupLayout.Alignment.LEADING, 0, 368, Short.MAX_VALUE)\n .addComponent(soTien, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(maDotThu, javax.swing.GroupLayout.Alignment.LEADING))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addGap(12, 12, 12))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap()))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(check)\n .addGap(4, 4, 4)))\n .addComponent(jLabel13)\n .addComponent(jLabel14)))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(maDotThu, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(check))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(tenDotThu, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(loaiPhi)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ngayBatDauThu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ngayKetThucThu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(21, 21, 21)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(soTien, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel15)\n .addComponent(ngayTao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(25, 25, 25)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cancelBtn)\n .addComponent(createBtn)\n .addComponent(taoDanhSach))\n .addGap(24, 24, 24))\n );\n\n availableDotThu.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icons/checked.png\"))); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(availableDotThu)\n .addGap(0, 22, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(availableDotThu)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public static void constructCurves(final PrintStream out) {\n final ZonedDateTime valuationDate = ZonedDateTime.of(VALUATION_DATE, VALUATION_TIME, VALUATION_ZONE);\n // first construct the builder\n // build the discounting / overnight curve first,\n // then build the 6m EURIBOR curve\n final DiscountingMethodCurveSetUp curveBuilder = DiscountingMethodCurveBuilder.setUp()\n .buildingFirst(DISCOUNTING_NAME)\n .using(DISCOUNTING_NAME).forDiscounting(Currency.EUR).forIndex(EONIA).withInterpolator(INTERPOLATOR_1)\n .thenBuilding(FWD6_NAME)\n .using(FWD6_NAME).forIndex(EURIBOR_6M_INDEX).withInterpolator(INTERPOLATOR_2);\n final Tenor startTenor = Tenor.of(Period.ZERO);\n // add the discounting curve nodes\n IntStream.range(0, OIS_TENORS.length).forEach(\n i -> curveBuilder.addNode(DISCOUNTING_NAME, OIS.toCurveInstrument(valuationDate, startTenor, OIS_TENORS[i], 1, OIS_QUOTES[i])));\n // add the EURIBOR curve nodes\n curveBuilder.addNode(FWD6_NAME, EURIBOR_6M.toCurveInstrument(valuationDate, startTenor, Tenor.SIX_MONTHS, 1, EURIBOR_6M_QUOTE));\n IntStream.range(0, EURIBOR_6M_SWAP_QUOTES.length).forEach(\n i -> curveBuilder.addNode(FWD6_NAME,\n FIXED_EURIBOR_6M.toCurveInstrument(valuationDate, startTenor, EURIBOR_6M_SWAP_TENORS[i], 1, EURIBOR_6M_SWAP_QUOTES[i])));\n // build the curves\n final Pair<MulticurveProviderDiscount, CurveBuildingBlockBundle> result = curveBuilder.getBuilder().buildCurves(valuationDate);\n final MulticurveProviderDiscount curves = result.getFirst();\n final CurveBuildingBlockBundle inverseJacobians = result.getSecond();\n\n out.println(\"\\n\" + curves.getAllNames());\n curves.getAllCurves().entrySet().stream().forEach(e -> CurvePrintUtils.printAtNodes(out, e.getKey(), e.getValue()));\n CurvePrintUtils.printJacobians(out, inverseJacobians, curveBuilder.getBuilder());\n }" ]
[ "0.66215503", "0.6306437", "0.54263496", "0.52341497", "0.52158487", "0.5148378", "0.4983908", "0.4852283", "0.48080373", "0.47699088", "0.4709995", "0.46646762", "0.46468952", "0.46322662", "0.4601549", "0.45872957", "0.4551069", "0.45181265", "0.451291", "0.450628", "0.44581887", "0.4433391", "0.44192934", "0.4418989", "0.44156784", "0.44121632", "0.43928874", "0.4390876", "0.43894", "0.4389383", "0.4382921", "0.43687877", "0.43670616", "0.43655193", "0.43590257", "0.43493155", "0.43438658", "0.43329427", "0.43242586", "0.43210277", "0.42951077", "0.4293135", "0.4286209", "0.4278055", "0.42460185", "0.42102462", "0.41983268", "0.4175237", "0.41741496", "0.4173986", "0.41736183", "0.41561443", "0.4142972", "0.4139774", "0.41231993", "0.4111464", "0.4105652", "0.41038918", "0.41032183", "0.40968725", "0.40959665", "0.40926853", "0.40824553", "0.40796688", "0.40740177", "0.40720224", "0.4071158", "0.40706193", "0.40686196", "0.40499362", "0.40463153", "0.404344", "0.40388778", "0.4038262", "0.40353245", "0.40316263", "0.40253016", "0.4022622", "0.40203682", "0.40202063", "0.40182957", "0.4017398", "0.40147543", "0.40101075", "0.40014145", "0.39981326", "0.39927462", "0.39856526", "0.3979395", "0.39789096", "0.3971752", "0.396524", "0.39651287", "0.39633587", "0.39553243", "0.39491817", "0.39409786", "0.39407125", "0.39382944", "0.39359507" ]
0.71275604
0
Create a new IMMUTABLE CurrencyDateCalculator specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig. NOTE that USD currency holiday must also be registered.
CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface KitCalculatorsFactory<E> {\r\n\r\n /**\r\n * Create a new CurrencyDateCalculatorBuilder specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculatorBuilder\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n CurrencyDateCalculator<E> buildCurrencyDateCalculator(CurrencyDateCalculatorBuilder<E> builder);\r\n\r\n /**\r\n * Create a new IMMUTABLE CurrencyDateCalculator specialised for 2 currencies, including WorkingWeek, calendars\r\n * registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n /**\r\n * Use this method register a specific currency config, if not provided then the DefaultCurrencyCalculatorConfig will be given.\r\n * @param config that specifies the set of currencies subject to USD T+1.\r\n */\r\n void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);\r\n\r\n CurrencyCalculatorConfig getCurrencyCalculatorConfig();\r\n\r\n /**\r\n * Create a new DateCalculator for a given name and type of handling.\r\n *\r\n * @param name\r\n * calendar name (holidays set interested in). If there is set of\r\n * holidays with that name, it will return a DateCalculator with\r\n * an empty holiday set (will work on Weekend only).\r\n * @param holidayHandlerType\r\n * typically one of the value of HolidayHandlerType or null.\r\n * @return a new DateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n */\r\n DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);\r\n\r\n /**\r\n * Use this method to register a holidays calendar.\r\n *\r\n * @param calendarName\r\n * the calendar name to register these holidays under.\r\n * @param holidaysCalendar\r\n * the holiday calendar (non-working days with boundaries).\r\n */\r\n KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);\r\n\r\n /**\r\n * @return true if the holiday calendar name is registered.\r\n */\r\n boolean isHolidayCalendarRegistered(String calendarName);\r\n\r\n /**\r\n * @return an immutable Holiday Calendar name that is registered.\r\n */\r\n HolidayCalendar<E> getHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * @return an immutable set of registered calendar names\r\n */\r\n Set<String> getRegisteredHolidayCalendarNames();\r\n\r\n /**\r\n * Unregister a given holiday calendar\r\n * @param calendarName\r\n * the calendar name to unregister.\r\n */\r\n KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * unregister all holiday calendars;\r\n */\r\n KitCalculatorsFactory<E> unregisterAllHolidayCalendars();\r\n\r\n // -----------------------------------------------------------------------\r\n //\r\n // ObjectLab, world leaders in the design and development of bespoke\r\n // applications for the securities financing markets.\r\n // www.ObjectLab.co.uk\r\n //\r\n // -----------------------------------------------------------------------\r\n\r\n /**\r\n * Create a new PeriodCountCalculator.\r\n *\r\n * @return a PeriodCountCalculator\r\n */\r\n PeriodCountCalculator<E> getPeriodCountCalculator();\r\n\r\n /**\r\n * Create a new IMMDateCalculator.\r\n *\r\n * @return an IMMDateCalculator\r\n */\r\n IMMDateCalculator<E> getIMMDateCalculator();\r\n\r\n /**\r\n * Create a new holiday handler of given type\r\n * @param holidayHandlerType\r\n * @return a new handler\r\n * @throws IllegalArgumentException if the holidayHandlerType is unsupported\r\n * @since 1.4.0\r\n */\r\n HolidayHandler<E> getHolidayHandler(String holidayHandlerType);\r\n\r\n}", "CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);", "DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);", "public interface Calculator extends CalculatorEventContainer, HistoryControl<CalculatorHistoryState> {\n\n void init();\n\n /*\n **********************************************************************\n *\n * CALCULATIONS\n *\n **********************************************************************\n */\n\n void evaluate();\n\n void evaluate(@NotNull Long sequenceId);\n\n void simplify();\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression);\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression,\n @NotNull Long sequenceId);\n\n /*\n **********************************************************************\n *\n * CONVERSION\n *\n **********************************************************************\n */\n\n boolean isConversionPossible(@NotNull Generic generic, @NotNull NumeralBase from, @NotNull NumeralBase to);\n\n @NotNull\n CalculatorEventData convert(@NotNull Generic generic, @NotNull NumeralBase to);\n\n /*\n **********************************************************************\n *\n * EVENTS\n *\n **********************************************************************\n */\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Object source);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Long sequenceId);\n\n\t@NotNull\n\tPreparedExpression prepareExpression(@NotNull String expression) throws CalculatorParseException;\n}", "void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);", "public Currency() {\n // Instances built via this constructor have undefined behavior.\n }", "public CurrencyConversion() {\n }", "public static final BondStream Create (\n\t\tfinal int iMaturityDate,\n\t\tfinal int iEffectiveDate,\n\t\tfinal int iFinalMaturityDate,\n\t\tfinal int iFirstCouponDate,\n\t\tfinal int iInterestAccrualStartDate,\n\t\tfinal int iFreq,\n\t\tfinal double dblCoupon,\n\t\tfinal java.lang.String strCouponDC,\n\t\tfinal java.lang.String strAccrualDC,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapPay,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapReset,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapMaturity,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapEffective,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapPeriodEnd,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapAccrualEnd,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapPeriodStart,\n\t\tfinal org.drip.analytics.daycount.DateAdjustParams dapAccrualStart,\n\t\tfinal java.lang.String strMaturityType,\n\t\tfinal boolean bPeriodsFromForward,\n\t\tfinal java.lang.String strCalendar,\n\t\tfinal java.lang.String strCurrency,\n\t\tfinal org.drip.state.identifier.FloaterLabel floaterLabel,\n\t\tfinal org.drip.state.identifier.EntityCDSLabel creditLabel)\n\t{\n\t\tboolean bCouponEOMAdj = null == strCouponDC ? false : strCouponDC.toUpperCase().contains (\"EOM\");\n\n\t\tint iCouponDCIndex = null == strCouponDC ? -1 : strCouponDC.indexOf (\" NON\");\n\n\t\tjava.lang.String strCouponDCAdj = -1 != iCouponDCIndex ? strCouponDC.substring (0, iCouponDCIndex) :\n\t\t\tstrCouponDC;\n\n\t\tboolean bAccrualEOMAdj = null == strAccrualDC ? false : strAccrualDC.toUpperCase().contains (\"EOM\");\n\n\t\tint iAccrualDCIndex = null == strAccrualDC ? -1 : strAccrualDC.indexOf (\" NON\");\n\n\t\tjava.lang.String strAccrualDCAdj = -1 != iAccrualDCIndex ? strAccrualDC.substring (0,\n\t\t\tiAccrualDCIndex) : strAccrualDC;\n\n\t\torg.drip.analytics.date.JulianDate dtEffective = new org.drip.analytics.date.JulianDate\n\t\t\t(iEffectiveDate);\n\n\t\torg.drip.analytics.date.JulianDate dtMaturity = new org.drip.analytics.date.JulianDate\n\t\t\t(iMaturityDate);\n\n\t\tjava.lang.String strTenor = (12 / iFreq) + \"M\";\n\t\tjava.util.List<org.drip.analytics.cashflow.CompositePeriod> lsCouponPeriod = null;\n\n\t\ttry {\n\t\t\torg.drip.param.period.UnitCouponAccrualSetting ucas = new\n\t\t\t\torg.drip.param.period.UnitCouponAccrualSetting (iFreq, strCouponDCAdj, bCouponEOMAdj,\n\t\t\t\t\tstrAccrualDCAdj, bAccrualEOMAdj, strCurrency, false,\n\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC);\n\n\t\t\torg.drip.param.period.CompositePeriodSetting cps = new\n\t\t\t\torg.drip.param.period.CompositePeriodSetting (iFreq, strTenor, strCurrency, dapPay, 1., null,\n\t\t\t\t\tnull, null, creditLabel);\n\n\t\t\tjava.util.List<java.lang.Integer> lsStreamEdgeDate = bPeriodsFromForward ?\n\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.ForwardEdgeDates (dtEffective, dtMaturity,\n\t\t\t\t\tstrTenor, dapAccrualEnd, org.drip.analytics.support.CompositePeriodBuilder.LONG_STUB) :\n\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.BackwardEdgeDates (dtEffective,\n\t\t\t\t\t\t\tdtMaturity, strTenor, dapAccrualEnd,\n\t\t\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.LONG_STUB);\n\n\t\t\tif (null == floaterLabel) {\n\t\t\t\torg.drip.param.period.ComposableFixedUnitSetting cfus = new\n\t\t\t\t\torg.drip.param.period.ComposableFixedUnitSetting (strTenor,\n\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.EDGE_DATE_SEQUENCE_SINGLE, null,\n\t\t\t\t\t\t\tdblCoupon, 0., strCurrency);\n\n\t\t\t\tlsCouponPeriod = org.drip.analytics.support.CompositePeriodBuilder.FixedCompositeUnit\n\t\t\t\t\t(lsStreamEdgeDate, cps, ucas, cfus);\n\t\t\t} else {\n\t\t\t\torg.drip.param.period.ComposableFloatingUnitSetting cfus = new\n\t\t\t\t\torg.drip.param.period.ComposableFloatingUnitSetting (strTenor,\n\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.EDGE_DATE_SEQUENCE_SINGLE, null,\n\t\t\t\t\t\t\tfloaterLabel,\n\t\t\t\t\t\t\t\torg.drip.analytics.support.CompositePeriodBuilder.REFERENCE_PERIOD_IN_ADVANCE,\n\t\t\t\t\tdblCoupon);\n\n\t\t\t\tlsCouponPeriod = org.drip.analytics.support.CompositePeriodBuilder.FloatingCompositeUnit\n\t\t\t\t\t(lsStreamEdgeDate, cps, cfus);\n\t\t\t}\n\n\t\t\treturn new BondStream (lsCouponPeriod, iFinalMaturityDate, strMaturityType);\n\t\t} catch (java.lang.Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}", "Calcul createCalcul();", "public CurrencyRates() {\n this(DSL.name(\"currency_rates\"), null);\n }", "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testDifferentCurrencies() {\n new CouponIborDefinition(Currency.AUD, PAYMENT_DATE, ACCRUAL_START_DATE, ACCRUAL_END_DATE, ACCRUAL_FACTOR, NOTIONAL, FIXING_DATE, INDEX, CALENDAR);\n }", "IMMDateCalculator<E> getIMMDateCalculator();", "private static IWorkingDays getWorkingDaysStrategy(Currency currency) {\n if ((currency.getCurrencyCode().equals(\"AED\")) ||\n (currency.getCurrencyCode().equals(\"SAR\")))\n {\n return ArabiaWorkingDays.getInstance();\n }\n return DefaultWorkingDays.getInstance();\n }", "public interface CurrencyConvertible<R> {\n\n /**\n * Returns a copy of the object with any currency amounts converted into the reporting currency.\n *\n * @param reportingCurrency the currency into which all currency amounts should be converted\n * @param marketData market data for multiple scenarios containing any FX rates needed to perform the conversion\n * @return a copy of the object with any currency amounts converted into the reporting currency\n */\n public abstract R convertedTo(Currency reportingCurrency, CalculationMarketData marketData);\n\n}", "KitCalculatorsFactory<E> unregisterAllHolidayCalendars();", "CalculatorController(){\n\t\tintegrationStrategy.put(IntegrationType.RECTANGLES, new CalculatorByRectangles());\n\t\tintegrationStrategy.put(IntegrationType.TRAPEZES, new CalculatorByTrapezes());\n\t\tintegrationStrategy.put(IntegrationType.INTEGRAL, new CalculatorByIntegration());\n\t}", "KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);", "public StandardCalculator init() {\n this.load(\"+\", this.add());\n this.load(\"-\", this.subtract());\n this.load(\"*\", this.multiple());\n this.load(\"/\", this.div());\n return this;\n }", "public static CashFlowEquivalentCalculator getInstance() {\n return INSTANCE;\n }", "public Pokemon.Currency.Builder getCurrencyBuilder() {\n bitField0_ |= 0x00000400;\n onChanged();\n return getCurrencyFieldBuilder().getBuilder();\n }", "public interface AmountFactory {\r\n Amount amountFrom(BigDecimal amountValue);\r\n\r\n Amount amountFrom(BigDecimal amountValue, BigDecimal multiplier);\r\n}", "public static CouponIborCompoundedDiscountingMethod getInstance() {\n return INSTANCE;\n }", "public OldSwedishCurrency()\r\n\t{\r\n\t\tthis(0, 0, 0);\r\n\t}", "public Computer withParsedDates() {\n Computer computer = new Computer();\n computer.name = this.name;\n if(!this.dateIntroduced.isEmpty()){\n computer.dateIntroduced = DateStringUtilities.getParsedDate(this.dateIntroduced);\n }\n if(!this.dateDiscontinued.isEmpty()){\n computer.dateDiscontinued = DateStringUtilities.getParsedDate(this.dateDiscontinued);\n }\n computer.company = this.company;\n return computer;\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 interface StockPECalculator extends StockCalculator{\n BigDecimal calculatePE(Stock stock, LocalDate calculationDate);\n\n}", "public static CurrencyEvent createCurrencyEvent() throws ParseException {\n \n JSONArray jSONArray = CurrencyRateParser.httpGetCall(API_URL, \"prices\");\n ArrayList arrayList = CurrencyRateParser.convertToArrayList(jSONArray);\n \n String INSTRUMENT = arrayList.get(0).toString();\n Date CURRENTTIME = parseRFC3339Date(arrayList.get(1).toString());\n double BID = Double.valueOf(arrayList.get(2).toString());\n double ASK = Double.valueOf(arrayList.get(3).toString());\n CurrencyEvent currencyEvent = new CurrencyEvent(INSTRUMENT, CURRENTTIME, BID, ASK);\n return currencyEvent;\n }", "public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }", "public Calculator() {\r\n\t\tsuper();\r\n\t}", "@Override\n protected Currency clone() {\n final Currency currency = new Currency();\n if (data != null) {\n currency.data = data.clone();\n }\n return currency;\n\n }", "@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 }", "public interface ExchangeRateService {\n BigDecimal exchange(Currency curr1, Currency curr2, BigDecimal amount);\n}", "protected ValueConverter createExpressionBuilderConverter() {\n\t\tConverterManager manager = new ConverterManager();\n\t\tmanager.addGlobalConverter(new DummyConverter());\n\t\t\n\t\tIterator i = this.valueConverters.keySet().iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tString valueName = (String) i.next();\n\t\t\tConverter converter = (Converter) this.valueConverters\n\t\t\t.get(valueName);\n\t\t\tif (converter != null) {\n\t\t\t\tmanager.addConverter(valueName, converter);\n\t\t\t}\n\t\t}\n\t\treturn manager;\n\t}", "public Calculator() {\r\n\t\tthis.operator = new Addition();\r\n\t}", "public interface CurrencyExchangeInterface {\n float changeCurrency(float price, Currency $toConvert);\n}", "private Calculator() {\n }", "public interface CalcModel {\n\t/**\n\t * Adds a listener to the model.\n\t * \n\t * @param l\n\t * listener to ad\n\t */\n\tvoid addCalcValueListener(CalcValueListener l);\n\n\t/**\n\t * Removes a listener from the model.\n\t * \n\t * @param l\n\t * listener to remove\n\t */\n\tvoid removeCalcValueListener(CalcValueListener l);\n\n\t/**\n\t * Returns a string representation of the current value in the calculator.\n\t * \n\t * @return string representation of the current value\n\t */\n\tString toString();\n\n\t/**\n\t * Returns a current value in calculator.\n\t * \n\t * @return current value in calculator\n\t */\n\tdouble getValue();\n\n\t/**\n\t * Sets the current value of the calculator to the given one.\n\t * \n\t * @param value\n\t * value to set\n\t */\n\tvoid setValue(double value);\n\n\t/**\n\t * Clears the current value in the calculator (sets it to 0).\n\t */\n\tvoid clear();\n\n\t/**\n\t * Clears the current value (sets it to 0), clears the active operand and clears\n\t * the pending binary operator.\n\t */\n\tvoid clearAll();\n\n\t/**\n\t * Swaps the sign of the current value in the calculator.\n\t */\n\tvoid swapSign();\n\n\t/**\n\t * Inserts a decimal point into the current number if one already doesn't exist.\n\t */\n\tvoid insertDecimalPoint();\n\n\t/**\n\t * Inserts a digit into the current number at the right most position.\n\t * \n\t * @param digit\n\t * new digit to be inserted\n\t */\n\tvoid insertDigit(int digit);\n\n\t/**\n\t * Checks if the active operand is set.\n\t * \n\t * @return true if active operand is set, false otherwise\n\t */\n\tboolean isActiveOperandSet();\n\n\t/**\n\t * Returns the active operand if it is set.\n\t * \n\t * @return active operand\n\t * @throws IllegalStateException\n\t * if active operand isn't set\n\t */\n\tdouble getActiveOperand();\n\n\t/**\n\t * Sets the active operand.\n\t * \n\t * @param activeOperand\n\t * a value to set as an active operand\n\t */\n\tvoid setActiveOperand(double activeOperand);\n\n\t/**\n\t * Clears the active operand.\n\t */\n\tvoid clearActiveOperand();\n\n\t/**\n\t * Returns pending binary operation.\n\t * \n\t * @return pending binary operation or null if it is not set\n\t */\n\tDoubleBinaryOperator getPendingBinaryOperation();\n\n\t/**\n\t * Sets pending binary operation.\n\t * \n\t * @param op\n\t * binary operator to set\n\t */\n\tvoid setPendingBinaryOperation(DoubleBinaryOperator op);\n}", "public interface CurrencyPresenter {\n void initData();\n\n void calculate(Valute source, Valute converted, String count);\n\n void destroy();\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}", "@Override\n\t\tpublic FTECost build() {\n\t\t\tMoney totalCost = Money.zero(Monetary.getCurrency(CurrencyCode.INR.name())).add(cost.annualSalary).add(cost.commission).add(cost.bonus).add(cost.otherCost);\n\t\t\tMoney hourlyRate = totalCost.divide(Costing.NUMBER_OF_WEEKS_IN_A_YEAR).divide(Costing.STANDARD_WORKING_HOURS_PER_WEEK);\n\t\t\tthis.cost.payment(Payment.of(PayRateUnit.HOURLY, hourlyRate));\n\t\t\treturn this.cost;\n\t\t}", "private CurrencyAccessBean determineBaseCurrency() {\n\t// Determine base currency\n\tCurrencyAccessBean crab = null;\n\ttry {\n\t\tNamedValueAccessBean cab = new NamedValueAccessBean();\n\t\tcab.setInitKey_id(\"BASE_CURRENCY\");\n\t\tcab.refreshCopyHelper();\n\n\t\tcrab = new CurrencyAccessBean();\n\t\tcrab.setInitKey_currency(cab.getIntvalue());\n\t\tcrab.refreshCopyHelper();\n\t} catch (Exception ex) {\n\t\tcrab = null;\n\t\tSystem.out.println(\"PLATINUM-SYNC: BASE_CURRENCY constant not found or illegal\");\n\t}\n\treturn crab;\n}", "Currency getCurrency();", "public Calculator() {\n initComponents();\n \n }", "public ConvCalculator(){\r\n super(\"Conversions Calculator\");\r\n this.setSize(280,350);\r\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n expression = new DecExpression();\r\n menuFileItems[3].setSelected(true);\r\n //Layout per le cifre esadecimali - pannello sud\r\n south.setLayout(new GridLayout(1,6));\r\n //Creazione dei pulsanti di opzione e aggiunta delle gestioni evento\r\n conversions = new JRadioButton[] {\r\n new JRadioButton(\"hex\"), new JRadioButton(\"bin\"), new JRadioButton(\"dec\")\r\n };\r\n for(JRadioButton conv : conversions){\r\n conv.addActionListener(new ConversionManagement(this));\r\n }\r\n conversions[2].setSelected(true);\r\n //Aggiunta dei pulsanti di opzioni a un gruppo di pulsanti opzione\r\n ButtonGroup conv = new ButtonGroup();\r\n conv.add(conversions[0]); //hex\r\n conv.add(conversions[1]); //bin\r\n conv.add(conversions[2]); //dec\r\n //Creazione dei pulsanti numerici e aggiunta delle gestioni evento\r\n letters = new JButton[]{\r\n new JButton(\"A\"), new JButton(\"B\"),new JButton(\"C\"), \r\n new JButton(\"D\"), new JButton(\"E\"), new JButton(\"F\")\r\n };\r\n //Aggiunta delle lettere esadecimali al pannello sud + disabilitazione\r\n for(JButton letter : letters){\r\n letter.addActionListener(new NumericManagement(this));\r\n letter.setEnabled(false);\r\n south.add(letter);\r\n }\r\n //Modifica del pannello centrale\r\n Component[] compC = this.center.getComponents();\r\n compC[0] = conversions[0];\r\n compC[1] = conversions[1];\r\n compC[2] = conversions[2];\r\n center.removeAll();\r\n for(Component c : compC){\r\n center.add(c);\r\n }\r\n //Aggiunta del bordo al pannello sud\r\n south.setBorder(new TitledBorder(new EtchedBorder(5),\"Hex Letters\"));\r\n //Aggiunta dei componenti al form principale\r\n Container contentPane = this.getContentPane();\r\n contentPane.add(display,\"North\");\r\n contentPane.add(center,\"Center\");\r\n contentPane.add(south,\"South\");\r\n //apri la finestra calcolatrice\r\n this.setVisible(true);\r\n }", "private JPanel moneyButtons() {\n JPanel moneyIn = new JPanel();\n centButton.addActionListener(new moneyListener());\n nickelButton.addActionListener(new moneyListener());\n dimeButton.addActionListener(new moneyListener());\n quarterButton.addActionListener(new moneyListener());\n moneyIn.setLayout(new GridLayout(2,2,2,2));\n moneyIn.add(centButton);\n moneyIn.add(nickelButton);\n moneyIn.add(dimeButton);\n moneyIn.add(quarterButton);\n return moneyIn;\n }", "public InterestRateMonteCarloProductFactory(final LocalDate referenceDate) {\n\t\tsuper();\n\t\tthis.referenceDate = referenceDate;\n\t}", "public Calculator()\n {\n \n }", "public abstract R convertedTo(Currency reportingCurrency, CalculationMarketData marketData);", "boolean isCurrencyAware();", "private void jbInit() throws Exception {\r\n setLayout(new BorderLayout());\r\n\r\n // set how the cloning should be done\r\n if (this.FORCE_SERIALIZE_COPY) {\r\n getMonthSelectorStyle().forceSerializeCopy(true);\r\n getDaySelectorStyle().forceSerializeCopy(true);\r\n getTodaySelectorStyle().forceSerializeCopy(true);\r\n }\r\n\r\n // update or set the locale\r\n getMonthSelectorStyle().setLocale(locale);\r\n getDaySelectorStyle().setLocale(locale);\r\n\r\n // set up the calendar panel\r\n daySelector = new DaySelector(getDaySelectorStyle());\r\n daySelector.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getID() == DateChooserAction.calendarButtonSelected) {\r\n currentDate.set(java.util.Calendar.DAY_OF_MONTH,\r\n ( (DaySelector) e.getSource()).selectedDay);\r\n selectedDate = (Calendar) currentDate.clone();\r\n getParent().setVisible(false);\r\n }\r\n }\r\n });\r\n add(daySelector, daySelectorPosition);\r\n\r\n // set up the month selector panel\r\n if (showMonthSelector) {\r\n monthSelector = new MonthSelector(getMonthSelectorStyle());\r\n monthSelector.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getID() == DateChooserAction.previousMonthSelected) {\r\n currentDate.add(java.util.Calendar.MONTH, -1);\r\n update();\r\n }\r\n if (e.getID() == DateChooserAction.nextMonthSelected) {\r\n currentDate.add(java.util.Calendar.MONTH, 1);\r\n update();\r\n }\r\n }\r\n });\r\n add(monthSelector, monthSelectorPosition);\r\n }\r\n\r\n // add the today selector panel\r\n if (showTodaySelector) {\r\n todaySelector = new TodaySelector(getTodaySelectorStyle());\r\n todaySelector.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getID() == DateChooserAction.todaySelected) {\r\n currentDate.setTime(Calendar.getInstance().getTime());\r\n selectedDate = (Calendar) currentDate.clone();\r\n getParent().setVisible(false);\r\n }\r\n }\r\n });\r\n add(todaySelector, todaySelectorPosition);\r\n }\r\n update();\r\n }", "public interface FxConversionService {\n\n /**\n * This will convert the Base Currency into it's Term Currency and multiply the amount.\n *\n * @param baseCurrencyCode {@link String} the Base Currency Code\n * @param termCurrencyCode {@link String} the Term Currency Code\n * @param amount {@link Double} the amount to be converted\n *\n * @return {@link BigDecimal} the converted amount.\n * */\n BigDecimal convert(String baseCurrencyCode, String termCurrencyCode, BigDecimal amount);\n}", "public interface ICustomCurrency\n{\n\n}", "@Test\n public void javaWrappedDigitalCurrencyIsIdenticalToKotlinCompanionObject() throws Exception {\n\n List<String> digitalCurrencies = Arrays.asList(\"XRP\", \"BTC\", \"ETH\", \"DOGE\");\n\n digitalCurrencies.forEach((currencyCode) -> {\n TokenType kotlinDigital = DigitalCurrency.Companion.getInstance(currencyCode);\n TokenType javaStatic = DigitalCurrency.getInstance(currencyCode);\n\n assert (kotlinDigital.getTokenIdentifier().equals(javaStatic.getTokenIdentifier()));\n assert (kotlinDigital.getFractionDigits() == javaStatic.getFractionDigits());\n });\n }", "@Override\n\tpublic CurrencyConversionBean calculateConversionAmount(CurrencyConversionRequest currencyConversionRequestRequest) {\n\t\treturn new CurrencyConversionBean(currencyConversionRequestRequest.getAmount(), currencyConversionRequestRequest.getFromcurrency(),currencyConversionRequestRequest.getToCurrency());\n\t}", "DateConstant createDateConstant();", "List<CurrencyDTO> getCurrencies();", "KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);", "public Currency(String country,double value, double valueUSD){\n this.country = country;\n this.value = value;\n this.valueUSD = valueUSD;\n}", "PeriodCountCalculator<E> getPeriodCountCalculator();", "public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }", "private DateTimeAdjusters() {\n\n }", "public CurrencyPanel() {\n\t\tActionListener listener = new ConvertListener();\n\n\t\tcurrencyCombo = new JComboBox<String>(currencyName);// declares the string type for combo box\n\t\tcurrencyCombo.setToolTipText(\"Select to convert\");// sets tool tips for combo box\n\n\t\tJLabel inputLabel = new JLabel(\"Enter value: in GBP\");\n\n\t\tconvertButton = new JButton(\"Convert\");\n\t\tconvertButton.addActionListener(listener); // convert values when the button is pressed\n\t\tconvertButton.setToolTipText(\"Click to Convert\");// sets tool tips for convert button\n\t\tconvertButton.setBorder(BorderFactory.createLineBorder(new Color(158,215,246)));\n\t\t\n\n\t\tcurrencyResultLabel = new JLabel(\"---\");// stores the result after conversion\n\t\t\n\t\tcurrencyInput = new JTextField(5);// takes the number from the user for conversion\n\t\tcurrencyInput.setToolTipText(\"Enter a number to convert.\");// sets tool tips for test field\n\t\tcurrencyInput.addActionListener(listener);// when return is pressed the action listener is called so the values\n\t\t\t\t\t\t\t\t\t\t\t\t\t// are\n\t\t\t\t\t\t\t\t\t\t\t\t\t// converted\n\t\tcurrencyInput.setBorder(BorderFactory.createLineBorder(new Color(158,215,246)));\n\n\t\t// adds the objects to the panel\n\t\tadd(currencyCombo);\n\t\tadd(inputLabel);\n\t\tadd(currencyInput);\n\t\tadd(convertButton);\n\t\tadd(currencyResultLabel);\n\n\t\t// setting boundaries\n\t\tcurrencyResultLabel.setForeground(Color.red);// changes the color of result label\n\t\tsetPreferredSize(new Dimension(600, 400));\n\t\tsetBackground(Color.LIGHT_GRAY);// adds background color\n\t\tcurrencyCombo.setBounds(50, 50, 150, 30);\n\t\tinputLabel.setBounds(230, 50, 150, 20);\n\t\tcurrencyInput.setBounds(233, 70, 100, 20);\n\t\tconvertButton.setBounds(375, 50, 100, 40);\n\t\tcurrencyResultLabel.setBounds(250, 100, 150, 20);\n\n\t\tsetLayout(null);\n\n\t}", "@Override\n public IRateLimiter<TKey> build() {\n Preconditions.checkArgument(this.rateLimit > 0, \"rateLimit must be positive\");\n Preconditions.checkArgument(this.intervalTime > 0, \"intervalTime must be positive\");\n Preconditions.checkArgument(this.calendarTimeUnitCode > 0, \"TimeUnit is not valid\");\n\n return new InMemoryRateLimiter<>(this);\n }", "public interface DateInterface \n{\n /*\n Dada uma data, determina a sua estação do ano (Primavera, Verão, Outono ou Inverno) de acordo com o hemisfério Norte.\n */\n public String estacaoDoAno(LocalDate d);\n \n /*\n Determina o dia da semana do primeiro dia de um ano.\n */\n public DayOfWeek primeiroDiaSemanaAno(int ano);\n \n /*\n Determina o dia da semana de uma data.\n */\n public DayOfWeek diaDaSemana(LocalDate d);\n \n /*\n Determina o dia do ano de uma data (por exemplo, 10/01/2018 corresponde ao 10º dia do ano de 2018).\n */\n public int diaDoAno(LocalDate d);\n \n /*\n Determina em que trimestre do ano uma data se situa.\n */\n public int trimestre(LocalDate d);\n \n /*\n Determina o número de semanas completas entre duas datas, sendo uma delas a atual.\n */\n public long numSemanasAteData(LocalDate d);\n \n /*\n Determina se um ano é bissexto ou não.\n */\n public boolean anoBissexto(Year ano);\n \n /*\n Determina o século, o milénio e a era de uma data.\n */\n public TuploSeculoMilenioEra seculoMilenioEraData(LocalDate d);\n \n /*\n Determina quanto tempo falta até à próxima passagem do cometa Halley. Mostra o resultado em dias totais, meses totais\n e anos totais.\n */\n public ParDataDiaMesAno cometaHalley();\n \n /*\n Determina o número de dias úteis entre duas dadas datas.\n */\n public int diasUteisEntreDatas(LocalDate d1, LocalDate d2);\n \n /*\n Determina quantos fins-de-semanas completos um ano tem. Caso o ano inserido possua um sábado ou um domingo extra, \n estes também são sinalizados.\n */\n public ParFimDeSemana numFinsDeSemanaAno(int ano);\n \n /*\n Determina quantos dias faltam até ao próximo Natal.\n */\n public long diasAteNatal();\n \n /*\n Determina o salário de um indivíduo sabendo quanto ganha por hora e o ano que pretende calcular. Apresenta o resultado\n em dias, semanas, meses e ano.\n */\n public SalarioAno salarioDiaMesSemanaAno(float salarioHora, int ano); \n \n /*\n Determina o número de dias úteis (isto é, que não são fins-de-semana) de um ano.\n */\n public int numDiasUteisAno(int ano);\n \n /*\n Determina em que dias são os fins-de-semana de um dado mês. Por exemplo, em Janeiro de 2018 o primeiro fim-de-semana\n ocorre nos dias 6 (Sábado) e 7 (Domingo).\n */\n public Map<Integer, DayOfWeek> finsDeSemanaDoMes(int ano, int mes);\n \n /*\n A uma dada data são somados anos, meses, semanas e dias.\n */\n public LocalDate somaData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n A uma dada data são subtraidos anos, meses, semanas e dias.\n */\n public LocalDate subtraiData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n Dado um número de dias, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana e quantos\n dias úteis faltam até lá.\n */\n public TuploDataDia_SemanaDias_Uteis eventoDaquiXDias(int dias);\n \n /*\n Dado um número de dias úteis, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana.\n */\n public ParDataDiaDaSemana eventoDaquiXDiasUteis(int dias);\n \n /*\n Determina qual a data da próxima Black Friday e quantos dias faltam até essa data.\n */\n public ParDataDia proxBlackFriday();\n \n /*\n Calcula a data da Páscoa de um determinado ano.\n */\n public LocalDate proxPascoa(int ano);\n \n /*\n Para um dado ano apresenta a data dos feriados nacionais e em que dia da semana ocorrem.\n */\n public Map<String, MonthDay> dataFeriadosNacionais(int ano);\n \n /*\n Calcula a diferença entre duas datas. Apresenta o resultado em anos, meses e dias. Por exemplo, de 01/01/2018 até \n 10/02/2018 existe uma diferença de 0 anos, 1 mês e 9 dias.\n */\n public static TuploAnosMesesDias difEntreDatas(LocalDate d1, LocalDate d2)\n { \n boolean stop = false;\n boolean stop2 = false;\n long dias;\n int meses;\n int anos;\n \n anos = 0;\n meses = 0;\n dias = 0;\n\n while((d1.getYear() != d2.getYear() || d1.getMonthValue() != d2.getMonthValue())&&!stop && !stop2)\n {\n \n \n while(d1.getMonthValue() != d2.getMonthValue() && !stop2)\n {\n if(d1.getYear() == (d2.getYear() - 1) && d1.getMonthValue() == 12 && d2.getMonthValue() == 1 && d2.getDayOfMonth() < d1.getDayOfMonth())\n {\n stop2 = true;\n dias = 31 - d1.getDayOfMonth() + d2.getDayOfMonth();\n }\n if(stop2 == false)\n {\n YearMonth anoMes = YearMonth.of(d1.getYear(), d1.getMonth());\n int daysInMonth = anoMes.lengthOfMonth(); \n\n if(((d2.getYear() - d1.getYear()) == 0) \n &&((d2.getMonthValue() - d1.getMonthValue()) == 1)\n &&(d1.getDayOfMonth() > d2.getDayOfMonth()))\n {\n\n dias = d2.getDayOfMonth() + daysInMonth - d1.getDayOfMonth(); \n stop = true;\n break;\n }\n\n meses++;\n\n d1 = d1.plusMonths(1);\n }\n }\n if(stop2 == false)\n {\n if(d1.getMonthValue() == d2.getMonthValue() && d1.getYear() !=d2.getYear())\n {\n meses++;\n d1 = d1.plusMonths(1);\n }\n }\n }\n \n if(d1.getMonthValue() == d2.getMonthValue())\n {\n dias = d2.getDayOfMonth() - d1.getDayOfMonth();\n }\n\n while(meses > 12)\n {\n anos++;\n meses-=12;\n }\n \n return new TuploAnosMesesDias(anos, meses, dias);\n \n }\n}", "public DiscountBE(DiscountType discountType, BigDecimal amount, UserType userType, Integer months, Set<CategoryType> exclude) {\n super();\n\n if(amount == null) {\n throw new IllegalArgumentException(\"net is required\");\n }\n\n if(discountType == null) {\n throw new IllegalArgumentException(\"discountType is required\");\n }\n\n this.discountType = discountType;\n this.amount = amount;\n this.userType = userType;\n this.months = months;\n this.exclude = exclude;\n }", "public Calculator() {\n initComponents();\n setResizable(false);\n \n NumListener numListener = new Calculator.NumListener();\n numButton0.addActionListener(numListener);\n numButton1.addActionListener(numListener);\n numButton2.addActionListener(numListener);\n numButton3.addActionListener(numListener);\n numButton4.addActionListener(numListener);\n numButton5.addActionListener(numListener);\n numButton6.addActionListener(numListener);\n numButton7.addActionListener(numListener);\n numButton8.addActionListener(numListener);\n numButton9.addActionListener(numListener);\n pointButton.addActionListener(numListener);\n \n OpListener opListener = new Calculator.OpListener();\n plusButton.addActionListener(opListener);\n minButton.addActionListener(opListener);\n multButton.addActionListener(opListener);\n divButton.addActionListener(opListener);\n sqrtButton.addActionListener(opListener);\n eqButton.addActionListener(opListener);\n signButton.addActionListener(opListener);\n \n ClearListener clearListener = new ClearListener();\n cButton.addActionListener(clearListener);\n ceButton.addActionListener(clearListener);\n }", "public CalcWindow (){\n\t\tsuper();\n\t\tsetProperties(\"Calculator\");\n\t}", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n beanPanelPallete1 = new component.BeanPanelPallete();\r\n jPanel1 = new javax.swing.JPanel();\r\n jLabel1 = new javax.swing.JLabel();\r\n calPayDate = new JCalendarPallete();\r\n btnCalculate = new javax.swing.JButton();\r\n btnSaveSimulation = new javax.swing.JButton();\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n\r\n beanPanelPallete1.setBeanName(\"PaymentCashierSurchargeCalculatorExt\");\r\n beanPanelPallete1.setName(\"beanPanelPallete1\"); // NOI18N\r\n beanPanelPallete1.setShowForm(false);\r\n beanPanelPallete1.setShowImage(false);\r\n beanPanelPallete1.setShowResult(true);\r\n\r\n javax.swing.GroupLayout beanPanelPallete1Layout = new javax.swing.GroupLayout(beanPanelPallete1);\r\n beanPanelPallete1.setLayout(beanPanelPallete1Layout);\r\n beanPanelPallete1Layout.setHorizontalGroup(\r\n beanPanelPallete1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 400, Short.MAX_VALUE)\r\n );\r\n beanPanelPallete1Layout.setVerticalGroup(\r\n beanPanelPallete1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 267, Short.MAX_VALUE)\r\n );\r\n\r\n add(beanPanelPallete1, java.awt.BorderLayout.CENTER);\r\n\r\n jPanel1.setName(\"jPanel1\"); // NOI18N\r\n\r\n jLabel1.setText(\"Tentative Pay Date:\");\r\n jLabel1.setName(\"jLabel1\"); // NOI18N\r\n jPanel1.add(jLabel1);\r\n\r\n calPayDate.setName(\"calPayDate\"); // NOI18N\r\n jPanel1.add(calPayDate);\r\n\r\n btnCalculate.setText(\"Calculate\");\r\n btnCalculate.setName(\"btnCalculate\"); // NOI18N\r\n btnCalculate.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnCalculateActionPerformed(evt);\r\n }\r\n });\r\n jPanel1.add(btnCalculate);\r\n\r\n btnSaveSimulation.setText(\"Save Simulation\");\r\n btnSaveSimulation.setName(\"btnSaveSimulation\"); // NOI18N\r\n btnSaveSimulation.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnSaveSimulationActionPerformed(evt);\r\n }\r\n });\r\n jPanel1.add(btnSaveSimulation);\r\n\r\n add(jPanel1, java.awt.BorderLayout.SOUTH);\r\n }", "public static Criteria newAndCreateCriteria() {\n TCpyBankCreditExample example = new TCpyBankCreditExample();\n return example.createCriteria();\n }", "public interface CalculatorService {\n\n\tpublic double add(double arg1, double arg2); \n\tpublic double sub(double arg1, double arg2); \n\tpublic double div(double arg1, double arg2);\n\tpublic double mult(double arg1, double arg2);\n}", "private static FXForwardSecurity createFxForwardSecurity() {\n\n Currency payCurrency = Currency.GBP;\n Currency recCurrency = Currency.USD;\n\n double payAmount = 1_000_000;\n double recAmount = 1_600_000;\n\n ZonedDateTime forwardDate = DateUtils.getUTCDate(2019, 2, 4);\n\n ExternalId region = ExternalSchemes.currencyRegionId(Currency.GBP);\n\n FXForwardSecurity fxForwardSecurity = new FXForwardSecurity(payCurrency, payAmount, recCurrency, recAmount, forwardDate, region);\n\n return fxForwardSecurity;\n }", "CalcDTO calculate(CalcDTO calcDTO);", "public Savings(Calendar date, User owner1, String currencyCode, int num) {\n super(date, owner1, currencyCode, num);\n }", "public interface Currency extends Model {\n String getCode();\n void setCode(String strCode);\n String getCurrencyName();\n void setCurrenyName(String strCurrencyName);\n String getCurrencySymbol();\n void setCurrencySymbol(String strCurrencySymbol);\n String getIsDefault();\n void setIsDefault(String strIsDefault);\n double getCurrencyRate();\n void setCurrencyRate(double dCurrencyRate);\n}", "public DiscountedLineItemPrice build() {\n Objects.requireNonNull(value, DiscountedLineItemPrice.class + \": value is missing\");\n Objects.requireNonNull(includedDiscounts, DiscountedLineItemPrice.class + \": includedDiscounts is missing\");\n return new DiscountedLineItemPriceImpl(value, includedDiscounts);\n }", "public CalendarView(CalendarModel model) \n\t{\n\t\t//make no date be selected by giving it an impossible number\n\t\tbordered = -1;\n\t\t\n\t\tframe.setSize(700, 270);\n\t\tcModel = model;\n\t\tmonthMaxDays = cModel.getMonthMaxDays();\n\t\t\n\t\t//initialize all buttons\n\t\tnextMonth = new JButton(\"Month>\");\n\t\tprevMonth = new JButton(\"<Month\");\n\t\tnextDay = new JButton(\">\");\n\t\tprevDay = new JButton(\"<\");\n\t\tcreateButton = new JButton(\"Create\");\n\t\tcreateButton.setBackground(Color.GREEN);\n\t\tcreateButton.setFont(new Font(\"newFont\", Font.BOLD, 18));\n\t\t\n\t\tquitButton = new JButton(\"Quit\");\n\t\tquitButton.setBackground(Color.RED);\n\t\tquitButton.setForeground(Color.WHITE);\n\t\tquitButton.setFont(new Font(\"newFont\", Font.BOLD, 18));\n\t\t\n\t\t//part where all the dates are on\n\t\tnumberPanel.setLayout(new GridLayout(0,7));\n\t\t\n\t\t//box that contains the events\n\t\tDimension dim = new Dimension(300, 140);\n\t\teventsPane.setPreferredSize(dim);\n\t\teventsPane.setEditable(false);\n\t\t\n\t\t//make the new number buttons\n\t\t\n\t\tmakeDayButtons();\n\t\t\n\t\t//put in the empty buttons\n\t\tfor (int i = 1; i < cModel.findDayOfWeek(1); i++) \n\t\t{\n\t\t\tJButton emptyButton = new JButton();\n\t\t\t\n\t\t\t//these buttons will not work\n\t\t\temptyButton.setEnabled(false);\n\t\t\tnumberPanel.add(emptyButton); //add to panel\n\t\t}\n\t\t\n\t\t//add each button from ArrayList to the panel\n\t\tfor (JButton day : buttonArray) \n\t\t{\n\t\t\tnumberPanel.add(day);\n\t\t}\n\t\t\n\t\t//highlightEvents();\n\t\twriteEvents(cModel.getSelectedDate());\n\t\tborderSelected(cModel.getSelectedDate() - 1);\n\t\t\n\t\t//start adding actionListeners to the buttons\n\t\t\n\t\tnextDay.addActionListener(new \n\t\t\t\tActionListener() \n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t\t{\n\t\t\t\t\t\tmodel.nextDay();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\tprevDay.addActionListener(new \n\t\t\t\tActionListener() \n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t\t{\n\t\t\t\t\t\tmodel.previousDay();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\tnextMonth.addActionListener(new \n\t\t\t\tActionListener() \n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t\t{\n\t\t\t\t\t\tcModel.nextMonth();\n\t\t\t\t\t\tcreateButton.setEnabled(false);\n\t\t\t\t\t\teventsPane.setText(\"\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//can't switch to next date unless you select one\n\t\t\t\t\t\tnextDay.setEnabled(false);\n\t\t\t\t\t\tprevDay.setEnabled(false);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\tprevMonth.addActionListener(new \n\t\t\t\tActionListener() \n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t\t{\n\t\t\t\t\t\tcModel.previousMonth();\n\t\t\t\t\t\tcreateButton.setEnabled(false);\n\t\t\t\t\t\teventsPane.setText(\"\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//can't switch to next date unless you select one\n\t\t\t\t\t\tnextDay.setEnabled(false);\n\t\t\t\t\t\tprevDay.setEnabled(false);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\tcreateButton.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tshowEventWindow();\n\t\t\t}\n\t\t});\n\t\t\n\t\tquitButton.addActionListener(new \n\t\t\t\tActionListener() \n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t\t{\n\t\t\t\t\t\t//save everything and exit screen\n\t\t\t\t\t\tcModel.saveData();\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t\n\t\tleftContainer.setLayout(new BorderLayout());\n\t\tmonthYearLabel.setText(monthArray[cModel.getCalMonth()] + \" \" + model.getCalYear());;\n\t\tSMTWTFS.setText(\" S M T W T F S\");\n\t\t\n\t\tJPanel monthYearSMTWTFS = new JPanel();\n\t\tmonthYearSMTWTFS.setLayout(new BorderLayout());\n\t\tmonthYearSMTWTFS.add(monthYearLabel,BorderLayout.NORTH);\n\t\tmonthYearSMTWTFS.add(SMTWTFS,BorderLayout.SOUTH);\n\t\t\n\t\tJPanel createAndNextDays = new JPanel();\n\t\tcreateAndNextDays.add(createButton);\n\t\tcreateAndNextDays.add(prevDay);\n\t\tcreateAndNextDays.add(nextDay);\n\t\t\n\t\tleftContainer.add(createAndNextDays, BorderLayout.NORTH);\n\t\tleftContainer.add(monthYearSMTWTFS, BorderLayout.CENTER);\n\t\tleftContainer.add(numberPanel, BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\trightContainer.setLayout(new BorderLayout());\n\t\tJScrollPane eventScroller = new JScrollPane(eventsPane);\n\t\teventScroller.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);\n\t\t\n\t\tJPanel nextMonthsAndQuit = new JPanel();\n\t\tnextMonthsAndQuit.add(prevMonth);\n\t\tnextMonthsAndQuit.add(nextMonth);\n\t\tnextMonthsAndQuit.add(quitButton);\n\t\t\n\t\tdayDateLabel.setText(dayArray[cModel.findDayOfWeek(cModel.getSelectedDate()) - 1] + \" \" + cModel.getCalMonth() + \"/\" + cModel.getCalDate());\n\t\t\n\t\trightContainer.add(nextMonthsAndQuit, BorderLayout.NORTH);\n\t\trightContainer.add(dayDateLabel, BorderLayout.CENTER);\n\t\trightContainer.add(eventScroller, BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\t//add everything to the frame\n\t\tframe.setLayout(new FlowLayout());\n\t\tframe.add(leftContainer);\n\t\tframe.add(rightContainer);\n\t\t\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t//frame.pack();\n\t\tframe.setVisible(true);\n\t}", "private com.google.protobuf.SingleFieldBuilder<\n Pokemon.Currency, Pokemon.Currency.Builder, Pokemon.CurrencyOrBuilder> \n getCurrencyFieldBuilder() {\n if (currencyBuilder_ == null) {\n currencyBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n Pokemon.Currency, Pokemon.Currency.Builder, Pokemon.CurrencyOrBuilder>(\n getCurrency(),\n getParentForChildren(),\n isClean());\n currency_ = null;\n }\n return currencyBuilder_;\n }", "public BTCRatesPanel()\n {\n //Create Currency Heading\n lblBTCRates = new JLabel(\"Bitcoin Conversion Rates\");\n \n //Create ARS Conversion Rates\n lblBTCtoUSD = new JLabel(\"1 Bitcoin = \" + MoneyConversions.GetConversionRate(\"BTC\", \"USD\") + \" U.S. Dollars\");\n lblBTCtoEUR = new JLabel(\"1 Bitcoin = \" + MoneyConversions.GetConversionRate(\"BTC\", \"EUR\") + \" Euro\");\n lblBTCtoPLN = new JLabel(\"1 Bitcoin = \" + MoneyConversions.GetConversionRate(\"BTC\", \"PLN\") + \" Polish Z\" + (char)322 + \"oty\");\n lblBTCtoARS = new JLabel(\"1 Bitcoin = \" + MoneyConversions.GetConversionRate(\"BTC\", \"ARS\") + \" Argentine Peso\");\n \n //Add ARS Conversion Rates To Panel\n add(lblBTCRates);\n add(lblBTCtoUSD);\n add(lblBTCtoEUR);\n add(lblBTCtoPLN);\n add(lblBTCtoARS);\n \n //Setup look of panel\n setPreferredSize(new Dimension(258, 160));\n setBackground(Color.cyan);\n }", "public static Volume do_calc() {\n\t\treturn new Volume();\n\t}", "public Object clone() throws CloneNotSupportedException\n {\n PriceAdjustmentModel dest = null;\n if (getPriceAdjustmentStruct() != null)\n {\n PriceAdjustmentStruct clonedStruct = ProductStructBuilder.clonePriceAdjustmentStruct(getPriceAdjustmentStruct());\n dest = PriceAdjustmentFactory.createPriceAdjustmentModel(clonedStruct);\n }\n return dest;\n }", "public pay_date() {\n initComponents();\n }", "public Currency getCurrency();", "protected MoneyFactory() {\n\t}", "public Calculator()\n {\n \n frame = new JFrame();\n createCalculator(range);\n createCP(range);\n frame.setVisible(true);\n frame.setSize(1200,1000);\n \n\n }", "public static ObjectInstance getMultiplyToAddOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getMultiplyEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getMultiplyOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getAddEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getAddOperationMBean().getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public BigDecimal getCurrency1() {\n\treturn currency1;\n}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n oldDateLbl = new javax.swing.JLabel();\n oldDateDP = new org.jdesktop.swingx.JXDatePicker();\n newDateLbl = new javax.swing.JLabel();\n newDateDP = new org.jdesktop.swingx.JXDatePicker();\n Extendsbtn = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Extend rental\");\n setAlwaysOnTop(true);\n setMinimumSize(new java.awt.Dimension(322, 131));\n setModal(true);\n setModalExclusionType(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE);\n setName(\"Extend rental\"); // NOI18N\n\n oldDateLbl.setText(\"Old return date\");\n oldDateLbl.setName(\"oldDateLbl\"); // NOI18N\n\n oldDateDP.setEditable(false);\n oldDateDP.setName(\"oldDateDP\"); // NOI18N\n\n newDateLbl.setText(\"New return date\");\n newDateLbl.setName(\"newDateLbl\"); // NOI18N\n\n newDateDP.setName(\"newDateDP\"); // NOI18N\n\n Extendsbtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/add.png\"))); // NOI18N\n Extendsbtn.setText(\"Extend\");\n Extendsbtn.setName(\"Extendsbtn\"); // NOI18N\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/oscar/view/resources/return.png\"))); // NOI18N\n jButton1.setText(\"Cancel\");\n jButton1.setName(\"jButton1\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(Extendsbtn, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(oldDateLbl)\n .addComponent(newDateLbl))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(oldDateDP, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\n .addComponent(newDateDP, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(oldDateLbl)\n .addComponent(oldDateDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(newDateLbl)\n .addComponent(newDateDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Extendsbtn)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n pack();\n }", "com.google.ads.googleads.v6.resources.CurrencyConstant getCurrencyConstant();", "public CFCalculator() {\n initComponents();\n }", "public static PresentValueBlackSensitivityBlackSTIRFutureOptionCalculator getInstance() {\n return INSTANCE;\n }", "public static void main(String[] args) throws SolverException, CloneNotSupportedException {\n\t\tLocalDate referenceDate = LocalDate.of(2018,9,24);\n\n\t\t/*\n\t\t * Define the calibration spec generators for our calibration products\n\t\t */\n\t\tFunction<String,String> frequencyForTenor = (tenor) -> {\n\t\t\tswitch(tenor) {\n\t\t\tcase \"3M\":\n\t\t\t\treturn \"quarterly\";\n\t\t\tcase \"6M\":\n\t\t\t\treturn \"semiannual\";\n\t\t\t}\n\t\t\tthrow new IllegalArgumentException(\"Unkown tenor \" + tenor);\n\t\t};\n\n\t\tBiFunction<String, Double, CalibrationSpec> deposit = (maturity, rate) -> {\n\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, \"tenor\", \"act/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\tScheduleInterface scheduleInterfacePay = null;\n\t\t\tdouble calibrationTime = scheduleInterfaceRec.getPayment(scheduleInterfaceRec.getNumberOfPeriods()-1);\n\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-OIS-\" + maturity, \"Deposit\", scheduleInterfaceRec, \"\", rate, \"discount-EUR-OIS\", scheduleInterfacePay, null, 0.0, null, \"discount-EUR-OIS\", calibrationTime);\n\t\t\treturn calibrationSpec;\n\t\t};\n\n\t\tBiFunction<String, Double, CalibrationSpec> swapSingleCurve = (maturity, rate) -> {\n\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, \"annual\", \"act/360\", \"first\", \"modified_following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 1);\n\t\t\tScheduleInterface scheduleInterfacePay = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, \"annual\", \"act/360\", \"first\", \"modified_following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 1);\n\t\t\tdouble calibrationTime = scheduleInterfaceRec.getPayment(scheduleInterfaceRec.getNumberOfPeriods() - 1);\n\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-OIS-\" + maturity, \"Swap\", scheduleInterfaceRec, \"forward-EUR-OIS\", 0.0, \"discount-EUR-OIS\", scheduleInterfacePay, \"\", rate, \"discount-EUR-OIS\", \"discount-EUR-OIS\", calibrationTime);\n\t\t\treturn calibrationSpec;\n\t\t};\n\n\t\tFunction<String,BiFunction<String, Double, CalibrationSpec>> fra = (tenor) -> {\n\t\t\treturn (fixing, rate) -> {\n\t\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, fixing, tenor, \"tenor\", \"act/360\", \"first\", \"modified_following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tdouble calibrationTime = scheduleInterfaceRec.getFixing(scheduleInterfaceRec.getNumberOfPeriods() - 1);\n\t\t\t\tString curveName = \"forward-EUR-\" + tenor;\n\t\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-\" + tenor + \"-\" + fixing, \"FRA\", scheduleInterfaceRec, curveName, rate, \"discount-EUR-OIS\", null, null, 0.0, null, curveName, calibrationTime);\n\t\t\t\treturn calibrationSpec;\n\t\t\t};\n\t\t};\n\n\t\tFunction<String,BiFunction<String, Double, CalibrationSpec>> swap = (tenor) -> {\n\t\t\treturn (maturity, rate) -> {\n\t\t\t\tString frequencyRec = frequencyForTenor.apply(tenor);\n\n\t\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, frequencyRec, \"act/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tScheduleInterface scheduleInterfacePay = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, \"annual\", \"E30/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tdouble calibrationTime = scheduleInterfaceRec.getFixing(scheduleInterfaceRec.getNumberOfPeriods() - 1);\n\t\t\t\tString curveName = \"forward-EUR-\" + tenor;\n\t\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-\" + tenor + maturity, \"Swap\", scheduleInterfaceRec, curveName, 0.0, \"discount-EUR-OIS\", scheduleInterfacePay, \"\", rate, \"discount-EUR-OIS\", curveName, calibrationTime);\n\t\t\t\treturn calibrationSpec;\n\t\t\t};\n\t\t};\n\n\t\tBiFunction<String,String,BiFunction<String, Double, CalibrationSpec>> swapBasis = (tenorRec,tenorPay) -> {\n\t\t\treturn (maturity, rate) -> {\n\t\t\t\tString curveNameRec = \"forward-EUR-\" + tenorRec;\n\t\t\t\tString curveNamePay = \"forward-EUR-\" + tenorPay;\n\n\t\t\t\tString frequencyRec = frequencyForTenor.apply(tenorRec);\n\t\t\t\tString frequencyPay = frequencyForTenor.apply(tenorPay);\n\n\t\t\t\tScheduleInterface scheduleInterfaceRec = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, frequencyRec, \"act/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tScheduleInterface scheduleInterfacePay = ScheduleGenerator.createScheduleFromConventions(referenceDate, 2, \"0D\", maturity, frequencyPay, \"act/360\", \"first\", \"following\", new BusinessdayCalendarExcludingTARGETHolidays(), 0, 0);\n\t\t\t\tdouble calibrationTime = scheduleInterfaceRec.getFixing(scheduleInterfaceRec.getNumberOfPeriods() - 1);\n\n\t\t\t\tCalibrationSpec calibrationSpec = new CalibratedCurves.CalibrationSpec(\"EUR-\" + tenorRec + \"-\" + tenorPay + maturity, \"Swap\", scheduleInterfaceRec, curveNameRec, 0.0, \"discount-EUR-OIS\", scheduleInterfacePay, curveNamePay, rate, \"discount-EUR-OIS\", curveNameRec, calibrationTime);\n\t\t\t\treturn calibrationSpec;\n\t\t\t};\n\t\t};\n\n\t\t/*\n\t\t * Generate empty curve template (for cloning during calibration)\n\t\t */\n\t\tdouble[] times = { 0.0 };\n\t\tdouble[] discountFactors = { 1.0 };\n\t\tboolean[] isParameter = { false };\n\n\t\tDiscountCurve discountCurveOIS = DiscountCurve.createDiscountCurveFromDiscountFactors(\"discount-EUR-OIS\", referenceDate, times, discountFactors, isParameter, InterpolationMethod.LINEAR, ExtrapolationMethod.CONSTANT, InterpolationEntity.LOG_OF_VALUE);\n\t\tForwardCurveInterface forwardCurveOIS = new ForwardCurveFromDiscountCurve(\"forward-EUR-OIS\", \"discount-EUR-OIS\", referenceDate, \"3M\");\n\t\tForwardCurveInterface forwardCurve3M = new ForwardCurve(\"forward-EUR-3M\", referenceDate, \"3M\", new BusinessdayCalendarExcludingTARGETHolidays(), BusinessdayCalendarInterface.DateRollConvention.FOLLOWING, Curve.InterpolationMethod.LINEAR, Curve.ExtrapolationMethod.CONSTANT, Curve.InterpolationEntity.VALUE,ForwardCurve.InterpolationEntityForward.FORWARD, \"discount-EUR-OIS\");\n\t\tForwardCurveInterface forwardCurve6M = new ForwardCurve(\"forward-EUR-6M\", referenceDate, \"6M\", new BusinessdayCalendarExcludingTARGETHolidays(), BusinessdayCalendarInterface.DateRollConvention.FOLLOWING, Curve.InterpolationMethod.LINEAR, Curve.ExtrapolationMethod.CONSTANT, Curve.InterpolationEntity.VALUE,ForwardCurve.InterpolationEntityForward.FORWARD, \"discount-EUR-OIS\");\n\n\t\tAnalyticModel forwardCurveModel = new AnalyticModel(new CurveInterface[] { discountCurveOIS, forwardCurveOIS, forwardCurve3M, forwardCurve6M });\n\n\t\tList<CalibrationSpec> calibrationSpecs = new LinkedList<>();\n\n\t\t/*\n\t\t * Calibration products for OIS curve: Deposits\n\t\t */\n\t\tcalibrationSpecs.add(deposit.apply(\"1D\", 0.202 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"1W\", 0.195 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"2W\", 0.193 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"3W\", 0.193 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"1M\", 0.191 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"2M\", 0.185 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"3M\", 0.180 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"4M\", 0.170 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"5M\", 0.162 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"6M\", 0.156 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"7M\", 0.150 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"8M\", 0.145 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"9M\", 0.141 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"10M\", 0.136 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"11M\", 0.133 / 100.0));\n\t\tcalibrationSpecs.add(deposit.apply(\"12M\", 0.129 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for OIS curve: Swaps\n\t\t */\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"15M\", 0.118 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"18M\", 0.108 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"21M\", 0.101 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"2Y\", 0.101 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"3Y\", 0.194 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"4Y\", 0.346 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"5Y\", 0.534 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"6Y\", 0.723 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"7Y\", 0.895 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"8Y\", 1.054 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"9Y\", 1.189 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"10Y\", 1.310 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"11Y\", 1.423 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"12Y\", 1.520 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"15Y\", 1.723 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"20Y\", 1.826 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"25Y\", 1.877 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"30Y\", 1.910 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"40Y\", 2.025 / 100.0));\n\t\tcalibrationSpecs.add(swapSingleCurve.apply(\"50Y\", 2.101 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for 3M curve: FRAs\n\t\t */\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"0D\", 0.322 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"1M\", 0.329 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"2M\", 0.328 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"3M\", 0.326 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"6M\", 0.323 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"9M\", 0.316 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"12M\", 0.360 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"3M\").apply(\"15M\", 0.390 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for 3M curve: swaps\n\t\t */\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"2Y\", 0.380 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"3Y\", 0.485 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"4Y\", 0.628 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"5Y\", 0.812 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"6Y\", 0.998 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"7Y\", 1.168 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"8Y\", 1.316 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"9Y\", 1.442 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"10Y\", 1.557 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"12Y\", 1.752 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"15Y\", 1.942 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"20Y\", 2.029 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"25Y\", 2.045 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"30Y\", 2.097 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"40Y\", 2.208 / 100.0));\n\t\tcalibrationSpecs.add(swap.apply(\"3M\").apply(\"50Y\", 2.286 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for 6M curve: FRAs\n\t\t */\n\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"0D\", 0.590 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"1M\", 0.597 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"2M\", 0.596 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"3M\", 0.594 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"6M\", 0.591 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"9M\", 0.584 / 100.0));\n\t\tcalibrationSpecs.add(fra.apply(\"6M\").apply(\"12M\", 0.584 / 100.0));\n\n\t\t/*\n\t\t * Calibration products for 6M curve: tenor basis swaps\n\t\t * Note: the fixed bases is added to the second argument tenor (here 3M).\n\t\t */\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"2Y\", 0.255 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"3Y\", 0.245 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"4Y\", 0.227 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"5Y\", 0.210 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"6Y\", 0.199 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"7Y\", 0.189 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"8Y\", 0.177 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"9Y\", 0.170 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"10Y\", 0.164 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"12Y\", 0.156 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"15Y\", 0.135 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"20Y\", 0.125 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"25Y\", 0.117 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"30Y\", 0.107 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"40Y\", 0.095 / 100.0));\n\t\tcalibrationSpecs.add(swapBasis.apply(\"6M\",\"3M\").apply(\"50Y\", 0.088 / 100.0));\n\n\t\t/*\n\t\t * Calibrate\n\t\t */\n\t\tCalibratedCurves calibratedCurves = new CalibratedCurves(calibrationSpecs.toArray(new CalibrationSpec[calibrationSpecs.size()]), forwardCurveModel, 1E-15);\n\n\t\t/*\n\t\t * Get the calibrated model\n\t\t */\n\t\tAnalyticModelInterface calibratedModel = calibratedCurves.getModel();\n\t\t\n\t\tdouble[] strikes = {-0.005,\n\t\t\t\t-0.0025,\n\t\t\t\t-0.0013,\n\t\t\t\t0.0,\n\t\t\t\t0.0025,\n\t\t\t\t0.005,\n\t\t\t\t0.01,\n\t\t\t\t0.015,\n\t\t\t\t0.02,\n\t\t\t\t0.03,\n\t\t\t\t0.05};\n\t\t\n\t\n\t\tdouble[][] volatilities = \n\t\t\t{{0.0025,0.0024,0.0027,0.0031,0.0037,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0025,0.0024,0.0027,0.0031,0.0037,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0025,0.0024,0.0028,0.0031,0.0038,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0025,0.0024,0.0027,0.0031,0.0037,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0025,0.0024,0.0027,0.0031,0.0038,0.0043,0.0052,0.0061,0.0069,0.0085,0.0114},\n\t\t\t\t\t{0.0040,0.0043,0.0045,0.0047,0.0049,0.0052,0.0058,0.0065,0.0072,0.0087,0.0114},\n\t\t\t\t\t{0.0047,0.0049,0.0051,0.0053,0.0055,0.0057,0.0062,0.0068,0.0075,0.0089,0.0115},\n\t\t\t\t\t{0.0050,0.0052,0.0053,0.0054,0.0056,0.0058,0.0063,0.0069,0.0075,0.0088,0.0113},\n\t\t\t\t\t{0.0055,0.0056,0.0057,0.0058,0.0060,0.0061,0.0065,0.0070,0.0076,0.0088,0.0113},\n\t\t\t\t\t{0.0055,0.0056,0.0057,0.0058,0.0060,0.0061,0.0064,0.0069,0.0074,0.0084,0.0107},\n\t\t\t\t\t{0.0058,0.0059,0.0061,0.0061,0.0062,0.0064,0.0066,0.0070,0.0074,0.0083,0.0103},\n\t\t\t\t\t{0.0058,0.0059,0.0059,0.0060,0.0062,0.0063,0.0066,0.0069,0.0073,0.0081,0.0099},\n\t\t\t\t\t{0.0060,0.0061,0.0062,0.0063,0.0064,0.0065,0.0067,0.0069,0.0072,0.0079,0.0095},\n\t\t\t\t\t{0.0059,0.0060,0.0061,0.0061,0.0063,0.0063,0.0066,0.0068,0.0071,0.0079,0.0095},\n\t\t\t\t\t{0.0061,0.0062,0.0062,0.0062,0.0064,0.0065,0.0066,0.0068,0.0071,0.0077,0.0092},\n\t\t\t\t\t{0.0059,0.0060,0.0061,0.0061,0.0062,0.0063,0.0065,0.0067,0.0070,0.0077,0.0091},\n\t\t\t\t\t{0.0060,0.0061,0.0062,0.0062,0.0063,0.0063,0.0066,0.0067,0.0070,0.0075,0.0089},\n\t\t\t\t\t{0.0060,0.0060,0.0060,0.0061,0.0062,0.0063,0.0064,0.0067,0.0069,0.0075,0.0088},\n\t\t\t\t\t{0.0060,0.0061,0.0061,0.0062,0.0062,0.0063,0.0064,0.0067,0.0068,0.0073,0.0086},\n\t\t\t\t\t{0.0058,0.0058,0.0059,0.0059,0.0060,0.0061,0.0063,0.0065,0.0067,0.0073,0.0085},\n\t\t\t\t\t{0.0058,0.0059,0.0060,0.0060,0.0060,0.0061,0.0063,0.0065,0.0067,0.0071,0.0083},\n\t\t\t\t\t{0.0059,0.0059,0.0060,0.0060,0.0061,0.0061,0.0063,0.0064,0.0066,0.0070,0.0081},\n\t\t\t\t\t{0.0059,0.0060,0.0061,0.0061,0.0061,0.0062,0.0063,0.0064,0.0065,0.0069,0.0079},\n\t\t\t\t\t{0.0056,0.0057,0.0057,0.0057,0.0058,0.0059,0.0060,0.0062,0.0065,0.0069,0.0081},\n\t\t\t\t\t{0.0056,0.0057,0.0057,0.0057,0.0058,0.0059,0.0060,0.0062,0.0064,0.0068,0.0079},\n\t\t\t\t\t{0.0057,0.0057,0.0057,0.0058,0.0058,0.0059,0.0060,0.0061,0.0063,0.0067,0.0077},\n\t\t\t\t\t{0.0057,0.0057,0.0057,0.0058,0.0058,0.0059,0.0060,0.0061,0.0063,0.0066,0.0076},\n\t\t\t\t\t{0.0057,0.0057,0.0058,0.0058,0.0058,0.0059,0.0059,0.0060,0.0062,0.0065,0.0074},\n\t\t\t\t\t{0.0057,0.0058,0.0058,0.0058,0.0059,0.0059,0.0059,0.0060,0.0061,0.0064,0.0073},\n\t\t\t\t\t{0.0054,0.0054,0.0054,0.0055,0.0055,0.0056,0.0058,0.0059,0.0061,0.0065,0.0076},\n\t\t\t\t\t{0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0059,0.0060,0.0065,0.0075},\n\t\t\t\t\t{0.0054,0.0053,0.0054,0.0054,0.0055,0.0055,0.0057,0.0058,0.0060,0.0064,0.0074},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0055,0.0055,0.0056,0.0058,0.0059,0.0063,0.0073},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0059,0.0062,0.0071},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0058,0.0061,0.0070},\n\t\t\t\t\t{0.0053,0.0053,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0061,0.0069},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0057,0.0060,0.0068},\n\t\t\t\t\t{0.0053,0.0054,0.0054,0.0054,0.0054,0.0054,0.0054,0.0055,0.0056,0.0059,0.0067},\n\t\t\t\t\t{0.0053,0.0053,0.0054,0.0054,0.0054,0.0054,0.0054,0.0055,0.0055,0.0058,0.0066},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0052,0.0053,0.0054,0.0055,0.0057,0.0060,0.0070},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0052,0.0052,0.0053,0.0055,0.0056,0.0060,0.0069},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0052,0.0052,0.0053,0.0054,0.0056,0.0059,0.0068},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0051,0.0052,0.0052,0.0054,0.0055,0.0058,0.0067},\n\t\t\t\t\t{0.0051,0.0051,0.0051,0.0051,0.0051,0.0051,0.0052,0.0053,0.0055,0.0058,0.0066},\n\t\t\t\t\t{0.0050,0.0051,0.0051,0.0050,0.0051,0.0051,0.0052,0.0053,0.0054,0.0057,0.0066},\n\t\t\t\t\t{0.0050,0.0050,0.0051,0.0050,0.0051,0.0051,0.0051,0.0052,0.0054,0.0056,0.0065},\n\t\t\t\t\t{0.0050,0.0050,0.0050,0.0050,0.0051,0.0051,0.0051,0.0052,0.0053,0.0056,0.0064},\n\t\t\t\t\t{0.0050,0.0050,0.0050,0.0050,0.0050,0.0050,0.0050,0.0051,0.0053,0.0055,0.0063},\n\t\t\t\t\t{0.0050,0.0050,0.0050,0.0050,0.0050,0.0050,0.0050,0.0051,0.0052,0.0054,0.0063},\n\t\t\t\t\t{0.0050,0.0049,0.0049,0.0050,0.0050,0.0051,0.0051,0.0052,0.0053,0.0057,0.0065},\n\t\t\t\t\t{0.0049,0.0049,0.0049,0.0050,0.0050,0.0050,0.0051,0.0052,0.0053,0.0057,0.0065},\n\t\t\t\t\t{0.0049,0.0049,0.0049,0.0049,0.0050,0.0050,0.0051,0.0052,0.0053,0.0056,0.0064},\n\t\t\t\t\t{0.0049,0.0049,0.0049,0.0049,0.0049,0.0050,0.0050,0.0051,0.0052,0.0056,0.0064},\n\t\t\t\t\t{0.0049,0.0048,0.0049,0.0049,0.0049,0.0050,0.0050,0.0051,0.0052,0.0056,0.0063},\n\t\t\t\t\t{0.0048,0.0048,0.0048,0.0049,0.0049,0.0049,0.0050,0.0050,0.0051,0.0055,0.0063},\n\t\t\t\t\t{0.0048,0.0048,0.0048,0.0048,0.0049,0.0049,0.0049,0.0050,0.0051,0.0055,0.0062},\n\t\t\t\t\t{0.0048,0.0048,0.0048,0.0048,0.0048,0.0049,0.0049,0.0050,0.0051,0.0054,0.0062},\n\t\t\t\t\t{0.0048,0.0047,0.0048,0.0048,0.0048,0.0048,0.0048,0.0049,0.0050,0.0054,0.0061},\n\t\t\t\t\t{0.0047,0.0047,0.0047,0.0048,0.0048,0.0048,0.0048,0.0049,0.0050,0.0053,0.0061}};\n\t\t\n\t\tdouble[] maturities = {0.5000,1.0000,1.5000,2.0000,2.5000,3.0000,3.5000,4.0000,4.5000,5.0000,\n\t\t\t\t5.5000,6.0000,6.5000,7.0000,7.5000,8.0000,8.5000,9.0000,9.5000,10.0000,\n\t\t\t\t10.5000,11.0000,11.5000,12.0000,12.5000,13.0000,13.5000,14.0000,14.5000,\n\t\t\t\t15.0000,15.5000,16.0000,16.5000,17.0000,17.5000,18.0000,18.5000,19.0000,\n\t\t\t\t19.5000,20.0000,20.5000,21.0000,21.5000,22.0000,22.5000,23.0000,23.5000,\n\t\t\t\t24.0000,24.5000,25.0000,25.5000,26.0000,26.5000,27.0000,27.5000,28.0000,\n\t\t\t\t28.5000,29.0000,29.5000};\n\t\t\n\t\tint[] indeces = {7,9,10,11,12,13,14,15,16,17,18,19}; //chose the index of the maturities we want to calibrate\n\t\t\n\t\t//Target caplet data\n\t\tQuotingConvention convention = QuotingConvention.VOLATILITYNORMAL;\n\t\t\n\t\tArrayList<CapletSmileData> smiles = new ArrayList<CapletSmileData>();\n\t\t\n\t\tfor(int i = 0; i<indeces.length; i++) {\n\t\t\tint index = indeces[i];\n\t\t\tdouble[] values = volatilities[index];\n\t\t\tdouble time = maturities[index];\n\t\t\tCapletSmileData ithSmile = new CapletSmileData(\"forward-EUR-6M\",\"discount-EUR-OIS\",referenceDate,strikes,time, values, convention);\n\t\t\tsmiles.add(ithSmile);\n\t\t}\n\t\t\n\t\tCapletSmileData[] smileArray = new CapletSmileData[smiles.size()];\n\t\tsmileArray = smiles.toArray(new CapletSmileData[smiles.size()]);\n\t\t\n\t\tCapletSurfaceData surface = new CapletSurfaceData(smileArray, calibratedModel);\n\t\t\n\t\tOptimizerFactoryInterface optimizerFactory = new OptimizerFactoryLevenbergMarquardt(300 /* maxIterations */, 8 /* maxThreads */);\n\n\t\t\n\t\tdouble[] initialParameters = new double[] {0.1, 0.2,0.1, 0.3,0.1,0.7,0.4,0.6,0.1,0.2,0.1} /* initialParameters */;\n\t\tdouble[] parameterStep = new double[] {0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01, 0.01} /* parameterStep */;\n\t\t\n\t\tint numberOfPoints = 4096*16;\n\t\tdouble gridSpacing = 0.005;\n\t\tnet.finmath.interpolation.RationalFunctionInterpolation.InterpolationMethod intMethod = net.finmath.interpolation.RationalFunctionInterpolation.InterpolationMethod.LINEAR;\n\t\tnet.finmath.interpolation.RationalFunctionInterpolation.ExtrapolationMethod extMethod = net.finmath.interpolation.RationalFunctionInterpolation.ExtrapolationMethod.CONSTANT;\n\t\t\n\t\tCapletByCarrMadan pricer = new CapletByCarrMadan(\"forward-EUR-6M\", 5.0,strikes,numberOfPoints,gridSpacing,intMethod,extMethod);\n\t\t\t\n\t\t\n\t\tdouble b = 0.3;\n\t\tdouble sigma = 0.08512087176733757;\n\t\tdouble eta = 0.8006437480710635;\n\t\tdouble zeta = 1.9;\n\t\tdouble alpha = 1.0596981657639444;\n\t\tdouble[] initialValues = {0.01, 0.02};\n\t\tdouble[] immigrationRates = {0.1, 0.3};\n\t\tdouble[] lambda = {1, 1};\n\t\n\t\t\n\t\tMultiCurveTenor threeMonth = new MultiCurveTenor(0.25, \"3M\");\n\t\tMultiCurveTenor sixMonth = new MultiCurveTenor(0.5, \"6M\");\n\t\tMultiCurveTenor[] tenors = {threeMonth,sixMonth};\n\t\t\n\t\tdouble[] tenorLengths = {0.25,0.6};\n\t\tString[] tenorNames = {\"3M\", \"6M\"};\n\t\t\n\t\tdouble timeHorizon = 12.0;\t\t\n\t\tint numberOfTimeSteps = 40;\n\t\t\n\t\tScalarParameterInformationInterface[] lambdaInfo = \n\t\t\t{new ScalarParameterInformation(false, new PositivityConstraint()),\n\t\t\t\t\tnew ScalarParameterInformation(false, new PositivityConstraint())};\n\t\tScalarParameterInformationInterface[] immigrationRatesInfo =\n\t\t\t{new ScalarParameterInformation(true, new BoundConstraint(1E-5,10.0)),\n\t\t\t\t\tnew ScalarParameterInformation(true, new BoundConstraint(1E-5,10.0))};\n\t\t\n\t\tScalarParameterInformationInterface bInfo = new ScalarParameterInformation(true, new PositivityConstraint());\n\t\tScalarParameterInformationInterface sigmaInfo = new ScalarParameterInformation(true, new PositivityConstraint());\n\t\tScalarParameterInformationInterface etaInfo = new ScalarParameterInformation(true, new PositivityConstraint());\n\t\tScalarParameterInformationInterface zetaInfo = new ScalarParameterInformation(true, new PositivityConstraint());\n\t\tScalarParameterInformationInterface alphaInfo = new ScalarParameterInformation(true, new BoundConstraint(1, 2));\n\t\t\n\t\tScalarParameterInformationInterface[] initialValuesInfo = \n\t\t\t{new ScalarParameterInformation(true, new PositivityConstraint()),\n\t\t\t\t\tnew ScalarParameterInformation(true, new PositivityConstraint())};\n\t\t\n\t\tboolean functionVConstraint = true;\n\t\tboolean expMomentConstraint = true;\n\t\t\n\t\tCBIProcessInterface cbiProcess = new FlowOfTemperedAlphaStableCBIprocess(timeHorizon, numberOfTimeSteps, initialValues, immigrationRates, b, sigma, \n\t\t\t\t eta, zeta, alpha,lambda, \n\t\t\t\tlambdaInfo, immigrationRatesInfo, \n\t\t\t\tbInfo, sigmaInfo, etaInfo, \n\t\t\t\tzetaInfo, alphaInfo, initialValuesInfo,\n\t\t\t\tfunctionVConstraint, expMomentConstraint);\n\t\t\n\t\tCBIDrivenMultiCurveModel model = new CBIDrivenMultiCurveModel(calibratedModel, cbiProcess, tenorLengths, tenorNames);\n\t\t\n\t\t//CBIDrivenMultiCurveModel model = new CBIDrivenMultiCurveModel(timeHorizon, numberOfTimeSteps, calibratedModel, tenors, initialValues, immigrationRates, b, sigma, eta, zeta, alpha, lambda);\n\t\t\n\t\tCapletCalibrationProblem problem = new CapletCalibrationProblem(surface, model, optimizerFactory, pricer,initialParameters,parameterStep);\n\t\t\n\t\tSystem.out.println(\"Calibration started\");\n\t\t\n\t\tlong startMillis\t= System.currentTimeMillis();\n\t\tnet.finmath.fouriermethod.calibration.CapletCalibrationProblem.OptimizationResult result = problem.runCalibration();\n\t\tlong endMillis\t\t= System.currentTimeMillis();\n\t\t\n\t\tdouble calculationTime = ((endMillis-startMillis)/1000.0);\n\t\t\n\t\tSystem.out.println(\"Calibration completed in: \" +calculationTime + \" seconds\");\n\t\t\n\t\tSystem.out.println(\"The solver required \" + result.getIterations() + \" iterations.\");\n\t\tSystem.out.println(\"RMSQE \" +result.getRootMeanSquaredError());\n\t\t\n\t\tdouble[] parameters = result.getModel().getParameters();\n\t\tfor(int i =0; i<parameters.length; i++) {\n\t\t\tSystem.out.println(parameters[i]);\n\t\t}\n\t\t\n\t\tArrayList<String> errorsOverview = result.getCalibrationOutput();\n\t\t\n\t\tfor(String myString : errorsOverview)\n\t\t\tSystem.out.println(myString);\n\t\t\n\t\tSystem.out.println(result.getModel().getClass());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Finished.\");\n\t\n\t\t\n\t}", "public interface Calculator {\n\n\tpublic BigDecimal calculate(BigDecimal amount);\n\t\n}", "public OscillatorCalculator() {\n this(1);\n }", "@Override\n\tpublic CurrencyConversionBean getCoversionAmount(Double amount, String fromcurrency, String tocurrency) {\n\t\treturn new CurrencyConversionBean(amount, fromcurrency,tocurrency);\n\t}", "com.google.ads.googleads.v6.resources.CurrencyConstantOrBuilder getCurrencyConstantOrBuilder();", "private BusinessDateUtility() {\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n buttonGroup2 = new javax.swing.ButtonGroup();\n panelProjeSatis = new keeptoo.KGradientPanel();\n txtSellTime = new javax.swing.JTextField();\n labelSellDate = new javax.swing.JLabel();\n txtPrice = new javax.swing.JTextField();\n labelSellPeriod = new javax.swing.JLabel();\n btnSellProject = new javax.swing.JButton();\n labelCustomers = new javax.swing.JLabel();\n labelSellTime = new javax.swing.JLabel();\n radioDay = new javax.swing.JRadioButton();\n radirMonth = new javax.swing.JRadioButton();\n radioYear = new javax.swing.JRadioButton();\n labelProjects = new javax.swing.JLabel();\n labelPrice = new javax.swing.JLabel();\n cbCustomers = new javax.swing.JComboBox();\n cbProjects = new javax.swing.JComboBox();\n dpSellDate = new com.github.lgooddatepicker.components.DatePicker();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Proje Satış İşlemleri\");\n setSize(new java.awt.Dimension(280, 300));\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n panelProjeSatis.setkEndColor(new java.awt.Color(168, 168, 255));\n panelProjeSatis.setkGradientFocus(0);\n panelProjeSatis.setkStartColor(new java.awt.Color(226, 226, 255));\n\n txtSellTime.setPreferredSize(null);\n\n labelSellDate.setText(\"Satış Tarihi:\");\n labelSellDate.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n txtPrice.setPreferredSize(null);\n\n labelSellPeriod.setText(\"Satış Periyodu:\");\n labelSellPeriod.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n btnSellProject.setText(\"Proje Satış\");\n btnSellProject.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n btnSellProject.setPreferredSize(null);\n btnSellProject.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSellProjectActionPerformed(evt);\n }\n });\n\n labelCustomers.setText(\"Şirketler:\");\n labelCustomers.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n labelSellTime.setText(\"Satış Süresi:\");\n labelSellTime.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n buttonGroup1.add(radioDay);\n radioDay.setText(\"Gün\");\n radioDay.setPreferredSize(null);\n\n buttonGroup1.add(radirMonth);\n radirMonth.setText(\"Ay\");\n radirMonth.setPreferredSize(null);\n\n buttonGroup1.add(radioYear);\n radioYear.setText(\"Yıl\");\n radioYear.setPreferredSize(null);\n radioYear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioYearActionPerformed(evt);\n }\n });\n\n labelProjects.setText(\"Projeler:\");\n labelProjects.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n labelPrice.setText(\"Fiyat:\");\n labelPrice.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n cbCustomers.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Şirketler...\" }));\n\n cbProjects.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Projeler...\" }));\n\n dpSellDate.setPreferredSize(null);\n\n javax.swing.GroupLayout panelProjeSatisLayout = new javax.swing.GroupLayout(panelProjeSatis);\n panelProjeSatis.setLayout(panelProjeSatisLayout);\n panelProjeSatisLayout.setHorizontalGroup(\n panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelProjeSatisLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(labelSellPeriod)\n .addComponent(labelSellTime, javax.swing.GroupLayout.Alignment.TRAILING))\n .addComponent(labelPrice)\n .addComponent(labelSellDate)\n .addComponent(labelProjects)\n .addComponent(labelCustomers))\n .addGap(18, 18, 18)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnSellProject, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(panelProjeSatisLayout.createSequentialGroup()\n .addComponent(radioDay, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(radirMonth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(radioYear, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(txtSellTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtPrice, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbCustomers, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbProjects, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(dpSellDate, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE))\n .addContainerGap(80, Short.MAX_VALUE))\n );\n panelProjeSatisLayout.setVerticalGroup(\n panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelProjeSatisLayout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelCustomers)\n .addComponent(cbCustomers, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbProjects, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)\n .addComponent(labelProjects))\n .addGap(16, 16, 16)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelSellDate)\n .addComponent(dpSellDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(radioDay, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(radirMonth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(radioYear, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(labelSellPeriod))\n .addGap(18, 18, 18)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSellTime, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)\n .addComponent(labelSellTime))\n .addGap(18, 18, 18)\n .addGroup(panelProjeSatisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtPrice, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)\n .addComponent(labelPrice))\n .addGap(18, 18, 18)\n .addComponent(btnSellProject, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)\n .addGap(26, 26, 26))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelProjeSatis, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelProjeSatis, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private BasicCoffeeMachine createCoffeeMachine() {\n\t\tMap<CoffeeSelection, CoffeeBean> beans = new HashMap<CoffeeSelection, CoffeeBean>();\n\t\tbeans.put(CoffeeSelection.ESPRESSO, new CoffeeBean(\"My favorite espresso bean\", 1000));\n\t\tbeans.put(CoffeeSelection.FILTER_COFFEE, new CoffeeBean(\"My favorite filter coffee bean\", 1000));\n\t\t\n\t\t// instantiate a new CoffeeMachine object\n\t\treturn new PremiumCoffeeMachine(beans);\n\t}", "public Calculator()\r\n {\r\n //Creating Choice group list\r\n options = new ChoiceGroup(\"Main Form\",Choice.EXCLUSIVE);\r\n options.append(\"ADDITION\",null);\r\n options.append(\"SUBTRACTION\",null);\r\n options.append(\"MULTIPLICATION\",null);\r\n options.append(\"DIVISION\",null);\r\n \r\n display = Display.getDisplay(this);\r\n \r\n //Creating Forms\r\n main = new Form(\"MAIN FORM\");\r\n ChoiceGroupAppend=main.append(options);\r\n operation = new Form(\"OPERATION\");\r\n \r\n //Initializing different command buttons \r\n exit = new Command(\"EXIT\",Command.EXIT,0);\r\n select = new Command(\"SELECT\",Command.OK,0);\r\n back = new Command(\"BACK\",Command.BACK,0);\r\n result = new Command(\"RESULT\",Command.OK,0);\r\n clear = new Command(\"CLEAR\",Command.OK,0);\r\n //Adding command buttons to different forms\r\n main.addCommand(exit);\r\n main.addCommand(select);\r\n operation.addCommand(result);\r\n operation.addCommand(back);\r\n operation.addCommand(clear);\r\n main.setCommandListener(this);\r\n operation.setCommandListener(this);\r\n \r\n display.setCurrent(main);\r\n }", "@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 }" ]
[ "0.672102", "0.6317408", "0.568268", "0.5318876", "0.5317674", "0.517508", "0.5010468", "0.50073975", "0.49913332", "0.4968623", "0.4938767", "0.4901768", "0.48932785", "0.48759657", "0.48747492", "0.48391518", "0.48261648", "0.48126253", "0.47945496", "0.47770095", "0.47696996", "0.47385663", "0.4730631", "0.47273615", "0.47254467", "0.4695538", "0.46875635", "0.46784037", "0.46742913", "0.46501392", "0.46356383", "0.45993572", "0.45942175", "0.45761225", "0.45488492", "0.45484015", "0.4544507", "0.45426258", "0.45357326", "0.45107895", "0.45052463", "0.45041463", "0.4483938", "0.4481765", "0.44693497", "0.44333988", "0.4430653", "0.44282043", "0.44242692", "0.4400838", "0.43913367", "0.43867287", "0.43763483", "0.4375656", "0.43700215", "0.43553522", "0.4344984", "0.43411148", "0.43405443", "0.43240952", "0.43160865", "0.43098146", "0.430883", "0.42961302", "0.4287738", "0.42738825", "0.4259829", "0.4257119", "0.4257006", "0.42565235", "0.42533937", "0.4246295", "0.42175847", "0.4198149", "0.41962865", "0.41938263", "0.41912404", "0.41897932", "0.41881418", "0.41836902", "0.4180117", "0.41772747", "0.41749686", "0.41732785", "0.41664082", "0.41623467", "0.4159893", "0.41590896", "0.41558763", "0.41548243", "0.41545823", "0.41517246", "0.41423014", "0.41380858", "0.4125822", "0.41231745", "0.4121519", "0.4116871", "0.41109237", "0.4109044" ]
0.66026014
1
Use this method register a specific currency config, if not provided then the DefaultCurrencyCalculatorConfig will be given.
void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setAddTransactionCurrency(String currency);", "void setCurrency(Currency currency);", "public void registerCurrency(String identifier, BigDecimal exchangeRate) {\n if (exchangeRates.containsKey(identifier))\n throw new IllegalArgumentException(\"Currency identifier already used.\");\n\n exchangeRates.put(identifier, exchangeRate);\n }", "public abstract void setCurrencyType(String currencyType);", "public void setCurrency(CurrencyUnit currency) {\r\n this.currency = currency;\r\n }", "public void setCurrency(String currency) {\n this.currency = currency;\n }", "public void setCurrency(String currency) {\n this.currency = currency;\n }", "boolean isCurrencyAware();", "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 void setCURRENCY(BigDecimal CURRENCY) {\r\n this.CURRENCY = CURRENCY;\r\n }", "public void setCurrency(java.lang.String currency) {\r\n this.currency = currency;\r\n }", "public void setCurrency(java.lang.String currency) {\n this.currency = currency;\n }", "Currency getCurrency();", "public interface ICustomCurrency\n{\n\n}", "protected void setCurrency(String currency) {\n this.currency = currency;\n }", "public void setCurrency( String phone )\r\n {\r\n currency = phone;\r\n }", "TokenlyCurrency getCurrencyType();", "void setEditTransactionCurrency(String currency);", "public void setCurrency(String value) {\n setAttributeInternal(CURRENCY, value);\n }", "private void addCurrency() {\r\n\t\tString currencyCode = signalThreeLetters();\r\n\t\tif (currencyCode == null){\r\n\t\t\treturn;\r\n\t\t}\r\n System.out.print(\"Enter the exchange rate (value of 1 \" +currencyCode+ \" in NZD): \");\r\n String exchangeRateStr = keyboardInput.getLine();\r\n \r\n double exchangeRate = Double.parseDouble(exchangeRateStr);\r\n if (exchangeRate <= 0) {\r\n \tSystem.out.println(\"Negative exchange rates not permitted. Returning to menu.\");\r\n \tSystem.out.println();\r\n \treturn;\r\n }\r\n System.out.println();\r\n if (currencies == null) {\r\n \tcurrencies = new Currencies();\r\n }\r\n currencies.addCurrency(currencyCode, exchangeRate);\r\n System.out.println(\"Currency \" +currencyCode+ \" with exchange rate \" + exchangeRate + \" added\");\r\n System.out.println();\r\n\t}", "@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 }", "public interface ExchangeRateService {\n BigDecimal exchange(Currency curr1, Currency curr2, BigDecimal amount);\n}", "protected synchronized void configureUnitCalculator(int nType, UnitCalculator calculator)\n {\n switch (nType)\n {\n case UNIT_CALCULATOR_FIXED:\n case UNIT_CALCULATOR_BINARY:\n if (nType == m_nCalculatorType)\n {\n // nothing to do\n return;\n }\n break;\n\n case UNIT_CALCULATOR_EXTERNAL:\n if (calculator == null)\n {\n throw new IllegalStateException(\"an attempt was made to\"\n + \" set the unit calculator type to\"\n + \" UNIT_CALCULATOR_EXTERNAL\"\n + \" without providing an external UnitCalculator\");\n }\n else if (UNIT_CALCULATOR_EXTERNAL == m_nCalculatorType &&\n Base.equals(calculator, m_calculator))\n {\n // nothing to do\n return;\n }\n break;\n\n default:\n throw new IllegalArgumentException(\"unknown unit calculator type: \"\n + nType);\n }\n\n m_nCalculatorType = nType;\n m_calculator = calculator;\n\n // recalculate unit costs\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n Entry entry = (Entry) iter.next();\n int cUnits = entry.calculateUnits(entry.getValue());\n\n // update both the entry unit count and total unit count\n entry.setUnits(cUnits);\n }\n }", "public void setCURRENCY_CODE(BigDecimal CURRENCY_CODE) {\r\n this.CURRENCY_CODE = CURRENCY_CODE;\r\n }", "public void setCURRENCY_CODE(BigDecimal CURRENCY_CODE) {\r\n this.CURRENCY_CODE = CURRENCY_CODE;\r\n }", "public void setCURRENCY_CODE(BigDecimal CURRENCY_CODE) {\r\n this.CURRENCY_CODE = CURRENCY_CODE;\r\n }", "com.google.ads.googleads.v6.resources.CurrencyConstant getCurrencyConstant();", "CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);", "public BigDecimal getCURRENCY() {\r\n return CURRENCY;\r\n }", "public void setCurrency(Currency usd) {\n\t\t\n\t}", "public void setCurrency(java.lang.String currency)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CURRENCY$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CURRENCY$10);\n }\n target.setStringValue(currency);\n }\n }", "@Test\n public void desiredCurNumberConversionUSD(){\n //standard set up\n CurrencyRates one = new CurrencyRates();\n //checks if 2 corresponds to USD\n assertEquals(\"USD\", one.desiredCurNumberConversion(2));\n }", "@Override\n\tpublic String getCurrency(){\n\t\treturn MARLAY_CURR;\n\t}", "@SkipValidation\n public String setUpCurrency() {\n if ((currency != null) && (currency.getHcmoCurrencyId() != null)) {\n currency = currencyService.getCurrency(currency.getHcmoCurrencyId());\n }\n return SUCCESS;\n }", "public interface CurrencyExchangeInterface {\n float changeCurrency(float price, Currency $toConvert);\n}", "public void setCurrencyRate(String currencyCode, BigDecimal value)\n {\n currencyRates.put(currencyCode, value);\n }", "@Override\n public String getCurrency() {\n return currency != null ? currency : App.getContext().getString(R.string.example_currency);\n }", "public void setCurrencyID(String value) {\n this.currencyID = value;\n }", "public void setUserCurrency(String userCurrency) {\n sessionData.setUserCurrency(userCurrency);\n }", "double requestCurrentRate(String fromCurrency,\n String toCurrency);", "public void setPaymentCurrency(String paymentCurrency) {\n _paymentCurrency = paymentCurrency;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCurrencyConfig.this.dispose();\n\t\t\t\tnew SetConfig();\n\t\t\t}", "public String getCurrency() {\n return this.currency;\n }", "public Currency(String code) {\n _code = code;\n UnitFormatImpl.getInstance().getSymbolMap().label(this, code);\n }", "String getSettlementCurrency();", "public void setConfig(C config)\n {\n this.config = config;\n fireConfigChanged();\n }", "public static Currency Add(Currency op1, Currency op2) throws CurrencyException {\r\n\t\tif(!op1.getType().equals(op2.getType()))\r\n\t\t\tthrow new CurrencyException(\"Addition: different currency types!\");\r\n\t\t\r\n\t\tCurrency result = new Currency(op1.getType());\r\n\r\n\t\treturn result.setValue(op1.getValue()+op2.getValue());\r\n\t}", "public void xsetCurrency(org.apache.xmlbeans.XmlString currency)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CURRENCY$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CURRENCY$10);\n }\n target.set(currency);\n }\n }", "public BigDecimal convert(\n String targetCurrency,\n String sourceCurrency,\n BigDecimal amount)\n {\n if (!exchangeRates.containsKey(targetCurrency))\n throw new IllegalArgumentException(\"Target currency is not registered.\");\n\n if (!exchangeRates.containsKey(sourceCurrency))\n throw new IllegalArgumentException(\"Source currency is not registered.\");\n\n BigDecimal targetRate = exchangeRates.get(targetCurrency);\n BigDecimal sourceRate = exchangeRates.get(sourceCurrency);\n\n BigDecimal baseAmount = amount.multiply(sourceRate);\n BigDecimal targetAmount = baseAmount.divide(targetRate, scale, roundingMode);\n\n return targetAmount;\n }", "public String getCurrency() {\r\n return currency;\r\n }", "CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);", "public void setCurrencyCode(String currencyCode) {\n this.currencyCode = currencyCode;\n }", "public void addCurrency(String csymbol, String cname, BigDecimal crate, BigDecimal cunit) {\n CurrencyExchangeRateBean bean = new CurrencyExchangeRateBean();\n bean.setCurrencyId(csymbol);\n bean.setExchangeRate(crate);\n bean.setUnit(cunit);\n currencies.add(bean);\n }", "public void addCurrency(String csymbol, String cname, BigDecimal crate, BigDecimal cunit) {\n CurrencyExchangeRateBean bean = new CurrencyExchangeRateBean();\n bean.setCurrencyId(csymbol);\n bean.setExchangeRate(crate);\n bean.setUnit(cunit);\n currencies.add(bean);\n }", "public abstract String getCurrencyType();", "public Currency(String country,double value, double valueUSD){\n this.country = country;\n this.value = value;\n this.valueUSD = valueUSD;\n}", "public BigDecimal getCURRENCY_CODE() {\r\n return CURRENCY_CODE;\r\n }", "public BigDecimal getCURRENCY_CODE() {\r\n return CURRENCY_CODE;\r\n }", "public BigDecimal getCURRENCY_CODE() {\r\n return CURRENCY_CODE;\r\n }", "public String getCurrency()\r\n {\r\n return currency;\r\n }", "public String getCurrency() {\n return currency;\n }", "public String getCurrency() {\n return currency;\n }", "public String getCurrency() {\n return currency;\n }", "public String getCurrency() {\n return currency;\n }", "@Test\n public void desiredCurNumberConversionEUR(){\n CurrencyRates one = new CurrencyRates();\n assertEquals(\"EUR\", one.desiredCurNumberConversion(4));\n }", "public void setCurrency (de.htwg_konstanz.ebus.framework.wholesaler.vo.Currency currency) {\r\n\t\tthis.currency = currency;\r\n\t}", "public class_config(){\n\t\t\n\t\tformat_date=\"dd/MM/yyyy\";\n\t\tcurrency='€';\n\t\tdecimals=2;\n\t\tlanguage=\"eng\";\n\t\ttheme=\"Metal\";\n\t\tfile_format=\"json\";\n\t\t\n\t}", "boolean hasCurrencyConstant();", "@Override\r\n\tpublic Currency fromString(String code) {\n\t\tCurrency currency = null;\r\n\t\t\r\n\t\tswitch(code.toUpperCase()) {\r\n\t\t\tcase \"EUR\": currency = new Currency(code, \"Euro\"); break;\r\n\t\t\tcase \"USD\": currency = new Currency(code, \"US Dollar\"); break;\r\n\t\t\tcase \"INR\": currency = new Currency(code, \"Rupees\"); break;\r\n\t\t}\r\n\t\t\r\n\t\treturn currency;\r\n\t}", "public Kernel(Config config, Wallet wallet, Key coinbase) {\n this.config = config;\n this.wallet = wallet;\n this.coinbase = coinbase;\n }", "public Saving currencyCode(String currencyCode) {\n this.currencyCode = currencyCode;\n return this;\n }", "public static void setReferenceCurrency(Currency currency) {\n REFERENCE.set(currency);\n TO_REFERENCE.clear();\n TO_REFERENCE.put(currency.getCode(), 1.0);\n }", "void setCurrencyId(Long currencyId);", "public Currency getCurrency();", "public void setCurrency1(BigDecimal newCurrency1) {\n\tcurrency1 = newCurrency1;\n}", "public Currency findCurrencyByCode(String currency);", "public CurrencyRates() {\n this(DSL.name(\"currency_rates\"), null);\n }", "protected void additionalConfig(ConfigType config){}", "public Price currencyCode(String currencyCode) {\n this.currencyCode = currencyCode;\n return this;\n }", "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 }", "public void setCurrencyCode(String currencyCode)\r\n {\r\n m_currencyCode = currencyCode;\r\n }", "public Builder setCurrency(Pokemon.Currency value) {\n if (currencyBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n currency_ = value;\n onChanged();\n } else {\n currencyBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000400;\n return this;\n }", "public void setIsCurrency(final String isCurrency) {\n this.isCurrency = isCurrency;\n }", "public CurrencyRates(Name alias) {\n this(alias, CURRENCY_RATES);\n }", "public void setUnitCalculator(UnitCalculator calculator)\n {\n int nType = (calculator == null ? UNIT_CALCULATOR_FIXED\n : UNIT_CALCULATOR_EXTERNAL);\n configureUnitCalculator(nType, calculator);\n }", "public interface KitCalculatorsFactory<E> {\r\n\r\n /**\r\n * Create a new CurrencyDateCalculatorBuilder specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculatorBuilder\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n CurrencyDateCalculator<E> buildCurrencyDateCalculator(CurrencyDateCalculatorBuilder<E> builder);\r\n\r\n /**\r\n * Create a new IMMUTABLE CurrencyDateCalculator specialised for 2 currencies, including WorkingWeek, calendars\r\n * registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n /**\r\n * Use this method register a specific currency config, if not provided then the DefaultCurrencyCalculatorConfig will be given.\r\n * @param config that specifies the set of currencies subject to USD T+1.\r\n */\r\n void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);\r\n\r\n CurrencyCalculatorConfig getCurrencyCalculatorConfig();\r\n\r\n /**\r\n * Create a new DateCalculator for a given name and type of handling.\r\n *\r\n * @param name\r\n * calendar name (holidays set interested in). If there is set of\r\n * holidays with that name, it will return a DateCalculator with\r\n * an empty holiday set (will work on Weekend only).\r\n * @param holidayHandlerType\r\n * typically one of the value of HolidayHandlerType or null.\r\n * @return a new DateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n */\r\n DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);\r\n\r\n /**\r\n * Use this method to register a holidays calendar.\r\n *\r\n * @param calendarName\r\n * the calendar name to register these holidays under.\r\n * @param holidaysCalendar\r\n * the holiday calendar (non-working days with boundaries).\r\n */\r\n KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);\r\n\r\n /**\r\n * @return true if the holiday calendar name is registered.\r\n */\r\n boolean isHolidayCalendarRegistered(String calendarName);\r\n\r\n /**\r\n * @return an immutable Holiday Calendar name that is registered.\r\n */\r\n HolidayCalendar<E> getHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * @return an immutable set of registered calendar names\r\n */\r\n Set<String> getRegisteredHolidayCalendarNames();\r\n\r\n /**\r\n * Unregister a given holiday calendar\r\n * @param calendarName\r\n * the calendar name to unregister.\r\n */\r\n KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * unregister all holiday calendars;\r\n */\r\n KitCalculatorsFactory<E> unregisterAllHolidayCalendars();\r\n\r\n // -----------------------------------------------------------------------\r\n //\r\n // ObjectLab, world leaders in the design and development of bespoke\r\n // applications for the securities financing markets.\r\n // www.ObjectLab.co.uk\r\n //\r\n // -----------------------------------------------------------------------\r\n\r\n /**\r\n * Create a new PeriodCountCalculator.\r\n *\r\n * @return a PeriodCountCalculator\r\n */\r\n PeriodCountCalculator<E> getPeriodCountCalculator();\r\n\r\n /**\r\n * Create a new IMMDateCalculator.\r\n *\r\n * @return an IMMDateCalculator\r\n */\r\n IMMDateCalculator<E> getIMMDateCalculator();\r\n\r\n /**\r\n * Create a new holiday handler of given type\r\n * @param holidayHandlerType\r\n * @return a new handler\r\n * @throws IllegalArgumentException if the holidayHandlerType is unsupported\r\n * @since 1.4.0\r\n */\r\n HolidayHandler<E> getHolidayHandler(String holidayHandlerType);\r\n\r\n}", "com.google.protobuf.StringValue getCurrencyCode();", "public void setReceiverChargesCurrency(String receiverChargesCurrency) {\r\n\t\tthis.receiverChargesCurrency = receiverChargesCurrency;\r\n\t}", "@Override\n\tpublic void config(StarConfig config) {\n\t\t\n\t}", "public void insertCurrency(String currency, String text) {\r\n\t\tFrames.selectMainFrame(webDriver);\r\n\t\tcurrencyElement(currency).sendKeys(text);\r\n\t}", "protected String getCurrency() {\n return currency;\n }", "public CurrencyRates(String alias) {\n this(DSL.name(alias), CURRENCY_RATES);\n }", "public void _registerConfig(Config config) {\n\t\tallConfigs.add(config);\n\t}", "public void testGetExchangeRateForCurrency() {\n final String destinationCurrency = \"EUR\";\n final String sourceCurrency = \"GBP\";\n \n final ExchangeRateUtil exchangeRateUtilities =\n new ExchangeRateUtil(true, destinationCurrency);\n exchangeRateUtilities.loadExchangeRatesFromCurrency(sourceCurrency);\n \n final double factor =\n exchangeRateUtilities.getExchangeRateForCurrency(sourceCurrency,\n ExchangeRateType.BUDGET);\n \n assertEquals(\"1.18\", String.valueOf(factor));\n }", "@Test\n public void testBigDecimalConstructorDefaultCurrency() {\n new Money(new BigDecimal(\"1.231\"));\n }", "public String getCurrency()\n\t{\n\t\treturn this.currency;\n\t}", "public void setCurrency(String currency) {\n this.currency = currency == null ? null : currency.trim();\n }", "public String getCurrency1() {\r\n\t\treturn currency1;\r\n\t}", "public void setAccountCurrencyCode(String accountCurrencyCode) {\r\n this.accountCurrencyCode = accountCurrencyCode;\r\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Type the country: \");\n String country = scanner.nextLine();\n\n switch (country) {\n case \"bulgaria\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro = scanner.nextDouble();\n double exchangeRateGBP = 1.96;\n double bulgarianMoney = euro * exchangeRateGBP;\n Locale locale = new Locale(\"en\", \"BG\");\n NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance(locale);\n String output = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro, exchangeRateGBP, currencyFormatter.format(bulgarianMoney));\n System.out.println(output);\n break;\n case \"turkey\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro1 = scanner.nextDouble();\n double exchangeRateTurkishLira = 6.97;\n double turkishMoney = euro1 * exchangeRateTurkishLira;\n Locale locale1 = new Locale(\"en\", \"TR\");\n NumberFormat currencyFormatter1 = NumberFormat.getCurrencyInstance(locale1);\n String output1 = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro1, exchangeRateTurkishLira, currencyFormatter1.format(turkishMoney));\n System.out.println(output1);\n break;\n case \"romania\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro2 = scanner.nextDouble();\n double exchangeRateRomanianRon = 4.84;\n double romanianMoney = euro2 * exchangeRateRomanianRon;\n Locale locale2 = new Locale(\"en\", \"RO\");\n NumberFormat currencyFormatter2 = NumberFormat.getCurrencyInstance(locale2);\n String output2 = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro2, exchangeRateRomanianRon, currencyFormatter2.format(romanianMoney));\n System.out.println(output2);\n break;\n case \"moldavia\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro3 = scanner.nextDouble();\n double exchangeRateMoldavianLeu = 19.48;\n double moldavianMoney = euro3 * exchangeRateMoldavianLeu;\n Locale locale3 = new Locale(\"en\", \"MD\");\n NumberFormat currencyFormatter3 = NumberFormat.getCurrencyInstance(locale3);\n String output3 = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro3, exchangeRateMoldavianLeu, currencyFormatter3.format(moldavianMoney));\n System.out.println(output3);\n break;\n case \"canada\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro4 = scanner.nextDouble();\n double exchangeRateCanadianDollar = 1.55;\n double canadianMoney = euro4 * exchangeRateCanadianDollar;\n Locale locale4 = new Locale(\"en\", \"CA\");\n NumberFormat currencyFormatter4 = NumberFormat.getCurrencyInstance(locale4);\n String output4 = String.format(\" %.2f euro at an exchange rate of %.2f is %s.\", euro4, exchangeRateCanadianDollar, currencyFormatter4.format(canadianMoney));\n System.out.println(output4);\n break;\n case \"usa\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro5 = scanner.nextDouble();\n double exchangeRateUSDollar = 1.09;\n double americanMoney = euro5 * exchangeRateUSDollar;\n Locale locale5 = new Locale(\"en\", \"US\");\n NumberFormat currencyFormatter5 = NumberFormat.getCurrencyInstance(locale5);\n String output5 = String.format(\" %.2f euros at an exchange rate of %.2f is %s.\", euro5, exchangeRateUSDollar, currencyFormatter5.format(americanMoney));\n System.out.println(output5);\n break;\n case \"hungary\":\n System.out.println(\"How many euros are you exchanging?\");\n double euro6 = scanner.nextDouble();\n double exchangeRateHungarianForint = 354.97;\n double hungarianMoney = euro6 * exchangeRateHungarianForint;\n Locale locale6 = new Locale(\"en\", \"HU\");\n NumberFormat currencyFormatter6 = NumberFormat.getCurrencyInstance(locale6);\n String output6 = String.format(\" %.2f euros at an exchange rate of %.2f is %s.\", euro6, exchangeRateHungarianForint, currencyFormatter6.format(hungarianMoney));\n System.out.println(output6);\n break;\n default:\n System.out.println(\"The entered country is not in our list but you can still calculate if you know the exchange rate.\\nWhat is the exchange rate?\");\n double exchangeRate = scanner.nextDouble();\n System.out.println(\"How many euros are you exchanging?\");\n double euro7 = scanner.nextDouble();\n double exchangedMoney = euro7 * exchangeRate;\n String output7 = String.format(\" %.2f euros at an exchange rate of %.2f is %.2f.\", euro7, exchangeRate, exchangedMoney);\n System.out.println(output7);\n }\n }" ]
[ "0.5656689", "0.5570478", "0.53955823", "0.5390136", "0.53853434", "0.5294941", "0.5294941", "0.521481", "0.5190386", "0.51894975", "0.51640725", "0.5160849", "0.5148636", "0.5142169", "0.50974834", "0.50480586", "0.5004287", "0.50002784", "0.49516776", "0.49513453", "0.49175137", "0.48756522", "0.48484766", "0.47494927", "0.47494927", "0.47494927", "0.47298113", "0.47272202", "0.47180036", "0.47135377", "0.4705366", "0.4694555", "0.46538574", "0.46391526", "0.4621556", "0.46014234", "0.45938054", "0.45830595", "0.45798942", "0.4579455", "0.45789233", "0.45772767", "0.45616928", "0.45583227", "0.45544583", "0.4552015", "0.45514584", "0.45420873", "0.4531361", "0.45306736", "0.4510895", "0.45085314", "0.45059678", "0.45059678", "0.45008388", "0.44907448", "0.44887847", "0.44887847", "0.44887847", "0.44836214", "0.44763312", "0.44763312", "0.44763312", "0.44763312", "0.44728163", "0.4472421", "0.44608447", "0.44413546", "0.44287047", "0.44242385", "0.44235316", "0.4422607", "0.44173816", "0.44142824", "0.44130817", "0.4411391", "0.44029614", "0.44002277", "0.43970257", "0.43900663", "0.4388816", "0.43814692", "0.43771577", "0.4368353", "0.4366484", "0.43469697", "0.43423873", "0.43278462", "0.43268323", "0.43241373", "0.43159044", "0.43157834", "0.43035927", "0.4289323", "0.4282857", "0.42823493", "0.42802846", "0.42753094", "0.42740077", "0.4272806" ]
0.80986917
0
Create a new DateCalculator for a given name and type of handling.
DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface KitCalculatorsFactory<E> {\r\n\r\n /**\r\n * Create a new CurrencyDateCalculatorBuilder specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculatorBuilder\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n CurrencyDateCalculator<E> buildCurrencyDateCalculator(CurrencyDateCalculatorBuilder<E> builder);\r\n\r\n /**\r\n * Create a new IMMUTABLE CurrencyDateCalculator specialised for 2 currencies, including WorkingWeek, calendars\r\n * registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n /**\r\n * Use this method register a specific currency config, if not provided then the DefaultCurrencyCalculatorConfig will be given.\r\n * @param config that specifies the set of currencies subject to USD T+1.\r\n */\r\n void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);\r\n\r\n CurrencyCalculatorConfig getCurrencyCalculatorConfig();\r\n\r\n /**\r\n * Create a new DateCalculator for a given name and type of handling.\r\n *\r\n * @param name\r\n * calendar name (holidays set interested in). If there is set of\r\n * holidays with that name, it will return a DateCalculator with\r\n * an empty holiday set (will work on Weekend only).\r\n * @param holidayHandlerType\r\n * typically one of the value of HolidayHandlerType or null.\r\n * @return a new DateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n */\r\n DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);\r\n\r\n /**\r\n * Use this method to register a holidays calendar.\r\n *\r\n * @param calendarName\r\n * the calendar name to register these holidays under.\r\n * @param holidaysCalendar\r\n * the holiday calendar (non-working days with boundaries).\r\n */\r\n KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);\r\n\r\n /**\r\n * @return true if the holiday calendar name is registered.\r\n */\r\n boolean isHolidayCalendarRegistered(String calendarName);\r\n\r\n /**\r\n * @return an immutable Holiday Calendar name that is registered.\r\n */\r\n HolidayCalendar<E> getHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * @return an immutable set of registered calendar names\r\n */\r\n Set<String> getRegisteredHolidayCalendarNames();\r\n\r\n /**\r\n * Unregister a given holiday calendar\r\n * @param calendarName\r\n * the calendar name to unregister.\r\n */\r\n KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * unregister all holiday calendars;\r\n */\r\n KitCalculatorsFactory<E> unregisterAllHolidayCalendars();\r\n\r\n // -----------------------------------------------------------------------\r\n //\r\n // ObjectLab, world leaders in the design and development of bespoke\r\n // applications for the securities financing markets.\r\n // www.ObjectLab.co.uk\r\n //\r\n // -----------------------------------------------------------------------\r\n\r\n /**\r\n * Create a new PeriodCountCalculator.\r\n *\r\n * @return a PeriodCountCalculator\r\n */\r\n PeriodCountCalculator<E> getPeriodCountCalculator();\r\n\r\n /**\r\n * Create a new IMMDateCalculator.\r\n *\r\n * @return an IMMDateCalculator\r\n */\r\n IMMDateCalculator<E> getIMMDateCalculator();\r\n\r\n /**\r\n * Create a new holiday handler of given type\r\n * @param holidayHandlerType\r\n * @return a new handler\r\n * @throws IllegalArgumentException if the holidayHandlerType is unsupported\r\n * @since 1.4.0\r\n */\r\n HolidayHandler<E> getHolidayHandler(String holidayHandlerType);\r\n\r\n}", "Calcul createCalcul();", "CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);", "static public ColumnDataCalculator createDataCalc(String cmd)\n {\n Class cls = (Class) calcsClasses.get(cmd);\n if(cls == null)\n {\n try\n {\n cls = Class.forName(cmd);\n addColumnDataCalc(cmd, cls);\n }\n catch(ClassNotFoundException e)\n {\n return null;\n }\n }\n\n try\n {\n return (ColumnDataCalculator) cls.newInstance();\n }\n catch(Exception e)\n {\n throw new RuntimeException(e.toString());\n }\n }", "IMMDateCalculator<E> getIMMDateCalculator();", "public MuseologicalObject createObject(String name, Calendar date) {\r\n\t\tthis.name = name;\r\n\t\tthis.date = date;\r\n\t\treturn this;\r\n\t}", "protected CalendricalRule(Class<T> type, String name) {\n // avoid possible circular references by using inline NPE checks\n if (type == null) {\n throw new NullPointerException(\"Reified class must not be null\");\n }\n if (name == null) {\n throw new NullPointerException(\"Name must not be null\");\n }\n this.type = type;\n this.name = name;\n }", "private DateFormatterManager()\r\n\t{\r\n\r\n\t}", "public static void main(String[] args) {\n FoodFactory factory = new AmericanFoodFactory();\n Food food = factory.makeFood(\"A\");\n System.out.println(food.getName());\n\n //jdk这里使用了简单工厂模式\n Calendar instance = Calendar.getInstance(TimeZone.getDefault());\n\n }", "public Date date(String name) {\n return getDate(name);\n }", "CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);", "public Factory(String name) {\n\t\tlines = new ArrayList<AssemblyLine>();\n\t\tthis.name = name;\n\t\t\n\t\tTimer timer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\twork();\n\t\t\t}\n\t\t}, 0l, 3000l);\n\t}", "public interface Calculator extends CalculatorEventContainer, HistoryControl<CalculatorHistoryState> {\n\n void init();\n\n /*\n **********************************************************************\n *\n * CALCULATIONS\n *\n **********************************************************************\n */\n\n void evaluate();\n\n void evaluate(@NotNull Long sequenceId);\n\n void simplify();\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression);\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression,\n @NotNull Long sequenceId);\n\n /*\n **********************************************************************\n *\n * CONVERSION\n *\n **********************************************************************\n */\n\n boolean isConversionPossible(@NotNull Generic generic, @NotNull NumeralBase from, @NotNull NumeralBase to);\n\n @NotNull\n CalculatorEventData convert(@NotNull Generic generic, @NotNull NumeralBase to);\n\n /*\n **********************************************************************\n *\n * EVENTS\n *\n **********************************************************************\n */\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Object source);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Long sequenceId);\n\n\t@NotNull\n\tPreparedExpression prepareExpression(@NotNull String expression) throws CalculatorParseException;\n}", "public static Factory factory() {\n return ext_accdt::new;\n }", "private Formatter makeFormatter(String formatterName) {\r\n Class c = null;\r\n Formatter f = null;\r\n\r\n try {\r\n c = Class.forName(formatterName);\r\n f = (Formatter) c.newInstance();\r\n } catch (Exception e) {\r\n f = new SimpleFormatter();\r\n }\r\n return f;\r\n }", "public abstract ServiceLocator create(String name);", "public static Class resolveMarketDay(String name){\n if(name.startsWith(\"A\")){\n \treturn a_md.class;\n }\n else if(name.startsWith(\"B\")){\n \treturn b_md.class;\n }\n else if(name.startsWith(\"C\")){\n \treturn c_md.class;\n }\n else if(name.startsWith(\"D\")){\n \treturn d_md.class;\n }\n else if(name.startsWith(\"E\")){\n \treturn e_md.class;\n }\n else if(name.startsWith(\"F\")){\n \treturn f_md.class;\n }\n else if(name.startsWith(\"G\")){\n \treturn g_md.class;\n }\n else if(name.startsWith(\"H\")){\n \treturn h_md.class;\n }\n else if(name.startsWith(\"I\")){\n \treturn i_md.class;\n }\n else if(name.startsWith(\"K\")){\n \treturn k_md.class;\n }\n else if(name.startsWith(\"L\")){\n \treturn l_md.class;\n }\n else if(name.startsWith(\"M\")){\n \treturn m_md.class;\n }\n else if(name.startsWith(\"N\")){\n \treturn n_md.class;\n }\n else if(name.startsWith(\"O\")){\n \treturn o_md.class;\n }\n else if(name.startsWith(\"P\")){\n \treturn p_md.class;\n }\n else if(name.startsWith(\"Q\")){\n \treturn q_md.class;\n }\n else if(name.startsWith(\"R\")){\n \treturn r_md.class;\n }\n else if(name.startsWith(\"S\")){\n \treturn s_md.class;\n }\n else if(name.startsWith(\"T\")){\n \treturn t_md.class;\n }\n else if(name.startsWith(\"U\")){\n \treturn u_md.class;\n }\n else if(name.startsWith(\"V\")){\n \treturn v_md.class;\n }\n else if(name.startsWith(\"W\")){\n \treturn w_md.class;\n }\n else if(name.startsWith(\"X\")){\n \treturn x_md.class;\n }\n else if(name.startsWith(\"Y\")){\n \treturn y_md.class;\n }\n else if(name.startsWith(\"Z\")){\n \treturn z_md.class;\n }\n \n return null;\n\t\t//return c;\n\t}", "public Date date(String name, Collection<String> formats) {\n return getDate(name, formats);\n }", "KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);", "public void testCreateInstance() throws ParseException {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n Date date = df.parse(\"2008-08-08 12:34:56.789\");\n \n AbstractTemporalLiteral d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, date);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, date);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, date);\n assertTrue(d instanceof TimestampLiteral);\n \n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n \n d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, cal);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, cal);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, cal);\n assertTrue(d instanceof TimestampLiteral);\n }", "public static void main( String[] args )\n {\n Calculator calculator = new Calculator(2.2f);\n// Calculator calculator2 = new Calculator(3f);\n// calculator.name = \"calc\";\n// //System.out.println(Calculator.name);\n// calculator.add(5f);\n// System.out.println(calculator2.name);\n// System.out.println(calculator.getTotal());\n// calculator2.subtract(2f);\n// System.out.println(calculator2.getTotal());\n//\n// calculator.add(5f).subtract(1f).add(2.5f);\n// System.out.println(calculator.getTotal());\n\n for (int i = 0; i < 10; i++) {\n calculator.add(i);\n System.out.println(calculator.getTotal());\n }\n }", "private DateTimeAdjusters() {\n\n }", "public abstract DataType<T> newInstance(String format);", "private ARXDate() {\r\n this(\"Default\");\r\n }", "public ParameterDateTypeTest(String name) {\n\t\tsuper(name);\n\t}", "public Calculator() {\r\n\t\tsuper();\r\n\t}", "private LLCalc createCalc(Grammar g) {\n\t\treturn new MyLLCalc(g);\n\t}", "private Calculator() {\n }", "public static Employee createEmployee(int id, String name, double salary, String type) {\n if (type.equals(\"permanent\")) {\n return new PermanentEmployee(id, name, salary);\n } else if (type.equals(\"temporary\")) {\n return new TemporaryEmployee(id, name, salary);\n } else {\n throw new IllegalArgumentException(\"Invalid type for employee\");\n }\n }", "public abstract DataType<T> newInstance(String format, Locale locale);", "public Candle createCandle(String type) {\n\t\tCandle candle = null;\n\t\t\n\t\tif (type.equals(\"jarCandle\")) {\n\t\t\tcandle = new JarCandle();\n\t\t} else if (type.equals(\"freeStandingCandle\")){\n\t\t\tcandle = new FreeStandingCandle();\n\t\t}\n\t\t\n\t\treturn candle;\n\t}", "private ProxyDate getFactoryProxyDate(Class type) {\n // we don't lock here; ok if two proxies get generated for same type\n ProxyDate proxy = (ProxyDate) _proxies.get(type);\n if (proxy == null) {\n ClassLoader l = GeneratedClasses.getMostDerivedLoader(type,\n ProxyDate.class);\n Class pcls = loadBuildTimeProxy(type, l);\n if (pcls == null)\n pcls = generateAndLoadProxyDate(type, true, l);\n proxy = (ProxyDate) instantiateProxy(pcls, null, null);\n _proxies.put(type, proxy);\n }\n return proxy;\n }", "public abstract Product productFactory(String type);", "private ProxyCalendar getFactoryProxyCalendar(Class type) {\n // we don't lock here; ok if two proxies get generated for same type\n ProxyCalendar proxy = (ProxyCalendar) _proxies.get(type);\n if (proxy == null) {\n ClassLoader l = GeneratedClasses.getMostDerivedLoader(type,\n ProxyCalendar.class);\n Class pcls = loadBuildTimeProxy(type, l);\n if (pcls == null)\n pcls = generateAndLoadProxyCalendar(type, true, l);\n proxy = (ProxyCalendar) instantiateProxy(pcls, null, null);\n _proxies.put(type, proxy);\n }\n return proxy;\n }", "public Month(String name, int year) {\n\t\tthis.name = name;\n\t\tthis.year = year;\n\t\tint offset = getOffset();\n\t\tdays = new Day[42];\n\t\tif (name.equals(\"February\")) {\n\t\t\tif (leap(year)) {\n\t\t\t\tfor (int i = offset; i < 29 + offset; i++) {\n\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\tnumDays = 29;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = offset; i < 28 + offset; i++) {\n\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\tnumDays = 28;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tswitch(name) {\n\t\t\t\tcase \"January\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"March\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"April\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"May\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"June\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"July\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"August\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"September\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"October\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"November\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"December\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public interface AmountFactory {\r\n Amount amountFrom(BigDecimal amountValue);\r\n\r\n Amount amountFrom(BigDecimal amountValue, BigDecimal multiplier);\r\n}", "public Date date(String name, String format) {\n return getDate(name, format);\n }", "public Calculator() {\r\n\t\t/*\r\n\t\t * Constructor - Method name which has the same class name is called a Consatructor\r\n\t\t */\r\n\t\tSystem.out.println(\"Calling constructor\");\r\n\t}", "public interface CalculatorService {\n\n\tpublic double add(double arg1, double arg2); \n\tpublic double sub(double arg1, double arg2); \n\tpublic double div(double arg1, double arg2);\n\tpublic double mult(double arg1, double arg2);\n}", "public static void main(String[] args) {\n CalculatorV1 calc = new CalculatorV1();\n\n }", "public Calculator()\n {\n \n }", "public static AbsTime factory(String t) throws NumberFormatException, Time.Ex_TimeNotAvailable\n {\n // The value to return.\n AbsTime result;\n\n // Check for ASAP and NEVER.\n if (t.equals(\"ASAP\")) {\n // No need to make a new object.\n result = ASAP;\n } else if (t.equals(\"NEVER\")) {\n // No need to make a new object.\n result = NEVER;\n } else if (t.equals(\"NOW\")) {\n // Make a new object using null constructor.\n result = new AbsTime();\n } else {\n // Not a special case. Need to make a new object.\n result = new AbsTime(t);\n }\n\n return result;\n }", "public InterestRateMonteCarloProductFactory(final LocalDate referenceDate) {\n\t\tsuper();\n\t\tthis.referenceDate = referenceDate;\n\t}", "@Override\n\tpublic Treatment createRadiology( List<Date> dates) {\n\t\tRadiology radiology = new Radiology();\n\t\tradiology.setDates(dates);\n\t\tradiology.setTreatmentType(TreatmentType.RADIOLOGY.getTag());\n\t\treturn radiology;\n\t}", "public abstract ServiceLocator create(String name,\n ServiceLocator parent,\n ServiceLocatorGenerator generator);", "@Override\n\tprotected Employee factoryMethod() {\n\t\treturn new Developer();\n\t}", "public Formatter() {\n\t\t// locale the locale for weekday names.\n\t\tfinal Locale locale = Locale.ENGLISH;\n\t\tdateFormatter = DateTimeFormatter.ofPattern(\"dd.MM.yyyy 'at' HH:mm\", locale);\n\t\tweekdayFormatter = DateTimeFormatter.ofPattern(\"EEEE\", locale);\n\t}", "public interface DateInfo {\n\n String getDateFormat();\n\n Calendar getTodayCalendar();\n\n}", "public static void main(String[] args) {\n new Calculator();\n }", "static void test(String type, String name, int startYear, int endYear) {\n DateResult dates02 = new DateResult();\n\n String text = name + \" 1年 2月 3日\";\n System.out.println(text);\n\n// try {\n// dates01 = DateV1Shim.interpDate(text);\n// } catch (Exception e) {\n// System.out.println(\" V1.ext: \" + e.getMessage());\n// }\n\n try {\n dates02 = DateUtil.interpDate(text, \"zh\", null, null, null);\n } catch (Exception e) {\n System.out.println(\" V2.ext: \" + e.getMessage());\n }\n\n results.add(\"\");\n// for (GenDateInterpResult date : dates01) {\n// results.add(text + \"|Date 1.0|\" + date.getDate().toGEDCOMX() + \"|\" + date.getAttrAsString(DateMetadata.ATTR_MATCH_TYPE));\n// results.add(text + \"|Date 1.0|\" + type + \"|\" + date.getDate().toGEDCOMX() + \"|\" + startYear + \"|\" + endYear);\n// }\n\n for (GenDateInterpResult date : dates02.getDates()) {\n// results.add(text + \"|Date 2.0|\" + date.getDate().toGEDCOMX() + \"|\" + date.getAttrAsString(DateMetadata.ATTR_MATCH_TYPE));\n if (date.getDate() instanceof GenSimpleDate) {\n GenSimpleDate sDate = (GenSimpleDate)date.getDate();\n if (sDate.getYear() >= startYear-1 && sDate.getYear() <= endYear+1) {\n// results.add(text + \"|Date 2.0|\" + type + \"|\" + date.getDate().toGEDCOMX() + \"|\" + startYear + \"|\" + endYear);\n results.add(text + \"|\" + type + \"|\" + date.getDate().toGEDCOMX() + \"|\" + startYear + \"|\" + endYear);\n }\n }\n }\n }", "@JsonCreator\n public static ComputeType fromString(String name) {\n return fromString(name, ComputeType.class);\n }", "@JsonCreator\n public static CreateMode fromString(String name) {\n return fromString(name, CreateMode.class);\n }", "protected abstract Object createProcessBean(Name name);", "public Object createObject() {\n final DecimalFormat format = (DecimalFormat) super.createObject();\n if (getParameter(\"pattern\") != null) {\n format.applyPattern((String) getParameter(\"pattern\"));\n }\n if (getParameter(\"localizedPattern\") != null) {\n format.applyLocalizedPattern((String) getParameter(\"localizedPattern\"));\n }\n return format;\n }", "public abstract ServiceLocator create(String name,\n ServiceLocator parent);", "CalculatorController(){\n\t\tintegrationStrategy.put(IntegrationType.RECTANGLES, new CalculatorByRectangles());\n\t\tintegrationStrategy.put(IntegrationType.TRAPEZES, new CalculatorByTrapezes());\n\t\tintegrationStrategy.put(IntegrationType.INTEGRAL, new CalculatorByIntegration());\n\t}", "TimerType createTimerType();", "public interface UnitFactory {\n Gui_Unit createUnit(String name, int team);\n Gui_Unit copy(Gui_Unit guiUnit);\n\n static UnitFactory getUnitFactory(UnitClassNames name){\n UnitFactory factory = null;\n\n switch (name){\n case ARTILLERY:{\n factory = new ArtilleryFactory();\n break;\n }\n case VEHICLE:{\n factory = new VehicleFactory();\n break;\n }\n case LIGHT_INFANTRY:{\n factory = new LightInfantryFactory();\n break;\n }\n case MELEE_INFANTRY:{\n factory = new MeleeInfantryFactory();\n break;\n }\n case HEAVY_INFANTRY:{\n factory = new HeavyInfantryFactory();\n break;\n }\n }\n return factory ;\n }\n}", "default Date fromSource(String date) {\n try {\n return getSourceDateFormat().parse(date);\n } catch (ParseException e) {\n throw new RuntimeException(String.format(\"couldn't parse date:{0} using:{1}\", date, getSourceDateFormat()));\n }\n }", "private GuessDate(){\n }", "public interface RentalFactory {\n\n Rental createRental(String pickUpdate, String returnDate, List<PaymentMethod> paymentMethod);\n\n}", "public static void main(String[] args) {\r\n BaseCalc calc = new BaseCalc();\r\n }", "Date getForDate();", "PeriodCountCalculator<E> getPeriodCountCalculator();", "public static MethodBuilder constructor(String name) {\n\t\treturn new MethodBuilder().returnType(\"\").name(name);\n\t}", "Factory<? extends T> buildPersonFactory(String type);", "public interface DateInterface \n{\n /*\n Dada uma data, determina a sua estação do ano (Primavera, Verão, Outono ou Inverno) de acordo com o hemisfério Norte.\n */\n public String estacaoDoAno(LocalDate d);\n \n /*\n Determina o dia da semana do primeiro dia de um ano.\n */\n public DayOfWeek primeiroDiaSemanaAno(int ano);\n \n /*\n Determina o dia da semana de uma data.\n */\n public DayOfWeek diaDaSemana(LocalDate d);\n \n /*\n Determina o dia do ano de uma data (por exemplo, 10/01/2018 corresponde ao 10º dia do ano de 2018).\n */\n public int diaDoAno(LocalDate d);\n \n /*\n Determina em que trimestre do ano uma data se situa.\n */\n public int trimestre(LocalDate d);\n \n /*\n Determina o número de semanas completas entre duas datas, sendo uma delas a atual.\n */\n public long numSemanasAteData(LocalDate d);\n \n /*\n Determina se um ano é bissexto ou não.\n */\n public boolean anoBissexto(Year ano);\n \n /*\n Determina o século, o milénio e a era de uma data.\n */\n public TuploSeculoMilenioEra seculoMilenioEraData(LocalDate d);\n \n /*\n Determina quanto tempo falta até à próxima passagem do cometa Halley. Mostra o resultado em dias totais, meses totais\n e anos totais.\n */\n public ParDataDiaMesAno cometaHalley();\n \n /*\n Determina o número de dias úteis entre duas dadas datas.\n */\n public int diasUteisEntreDatas(LocalDate d1, LocalDate d2);\n \n /*\n Determina quantos fins-de-semanas completos um ano tem. Caso o ano inserido possua um sábado ou um domingo extra, \n estes também são sinalizados.\n */\n public ParFimDeSemana numFinsDeSemanaAno(int ano);\n \n /*\n Determina quantos dias faltam até ao próximo Natal.\n */\n public long diasAteNatal();\n \n /*\n Determina o salário de um indivíduo sabendo quanto ganha por hora e o ano que pretende calcular. Apresenta o resultado\n em dias, semanas, meses e ano.\n */\n public SalarioAno salarioDiaMesSemanaAno(float salarioHora, int ano); \n \n /*\n Determina o número de dias úteis (isto é, que não são fins-de-semana) de um ano.\n */\n public int numDiasUteisAno(int ano);\n \n /*\n Determina em que dias são os fins-de-semana de um dado mês. Por exemplo, em Janeiro de 2018 o primeiro fim-de-semana\n ocorre nos dias 6 (Sábado) e 7 (Domingo).\n */\n public Map<Integer, DayOfWeek> finsDeSemanaDoMes(int ano, int mes);\n \n /*\n A uma dada data são somados anos, meses, semanas e dias.\n */\n public LocalDate somaData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n A uma dada data são subtraidos anos, meses, semanas e dias.\n */\n public LocalDate subtraiData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n Dado um número de dias, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana e quantos\n dias úteis faltam até lá.\n */\n public TuploDataDia_SemanaDias_Uteis eventoDaquiXDias(int dias);\n \n /*\n Dado um número de dias úteis, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana.\n */\n public ParDataDiaDaSemana eventoDaquiXDiasUteis(int dias);\n \n /*\n Determina qual a data da próxima Black Friday e quantos dias faltam até essa data.\n */\n public ParDataDia proxBlackFriday();\n \n /*\n Calcula a data da Páscoa de um determinado ano.\n */\n public LocalDate proxPascoa(int ano);\n \n /*\n Para um dado ano apresenta a data dos feriados nacionais e em que dia da semana ocorrem.\n */\n public Map<String, MonthDay> dataFeriadosNacionais(int ano);\n \n /*\n Calcula a diferença entre duas datas. Apresenta o resultado em anos, meses e dias. Por exemplo, de 01/01/2018 até \n 10/02/2018 existe uma diferença de 0 anos, 1 mês e 9 dias.\n */\n public static TuploAnosMesesDias difEntreDatas(LocalDate d1, LocalDate d2)\n { \n boolean stop = false;\n boolean stop2 = false;\n long dias;\n int meses;\n int anos;\n \n anos = 0;\n meses = 0;\n dias = 0;\n\n while((d1.getYear() != d2.getYear() || d1.getMonthValue() != d2.getMonthValue())&&!stop && !stop2)\n {\n \n \n while(d1.getMonthValue() != d2.getMonthValue() && !stop2)\n {\n if(d1.getYear() == (d2.getYear() - 1) && d1.getMonthValue() == 12 && d2.getMonthValue() == 1 && d2.getDayOfMonth() < d1.getDayOfMonth())\n {\n stop2 = true;\n dias = 31 - d1.getDayOfMonth() + d2.getDayOfMonth();\n }\n if(stop2 == false)\n {\n YearMonth anoMes = YearMonth.of(d1.getYear(), d1.getMonth());\n int daysInMonth = anoMes.lengthOfMonth(); \n\n if(((d2.getYear() - d1.getYear()) == 0) \n &&((d2.getMonthValue() - d1.getMonthValue()) == 1)\n &&(d1.getDayOfMonth() > d2.getDayOfMonth()))\n {\n\n dias = d2.getDayOfMonth() + daysInMonth - d1.getDayOfMonth(); \n stop = true;\n break;\n }\n\n meses++;\n\n d1 = d1.plusMonths(1);\n }\n }\n if(stop2 == false)\n {\n if(d1.getMonthValue() == d2.getMonthValue() && d1.getYear() !=d2.getYear())\n {\n meses++;\n d1 = d1.plusMonths(1);\n }\n }\n }\n \n if(d1.getMonthValue() == d2.getMonthValue())\n {\n dias = d2.getDayOfMonth() - d1.getDayOfMonth();\n }\n\n while(meses > 12)\n {\n anos++;\n meses-=12;\n }\n \n return new TuploAnosMesesDias(anos, meses, dias);\n \n }\n}", "public static NameLocator name(String name) {\n return new NameLocator(name);\n }", "public static Order createOrder() {\n OrderFactory orderFactory;\n Cuisine cuisine = ORDERING_FACADE.askForCuisine(); // choosing cuisine\n Meal mealType = ORDERING_FACADE.askForMealType(); // choosing meal type\n if (mealType.equals(Meal.LUNCH)) { // setting factory for meal choosen\n orderFactory = LUNCH_FACTORY;\n \n } else {\n orderFactory = DRINK_FACTORY;\n \n }\n return orderFactory.createOrder(cuisine); // creating and returning concrete meal order\n }", "private Date getFrom(RuleTypes.HistoricRequirements ph) {\n Calendar date = new GregorianCalendar();\n date.set(Calendar.HOUR_OF_DAY, 0);\n date.set(Calendar.MINUTE, 0);\n date.set(Calendar.SECOND, 0);\n date.set(Calendar.MILLISECOND, 0);\n int today;\n\n switch(ph) {\n case TODAY:\n return date.getTime();\n case YESTERDAY:\n date.add(Calendar.DAY_OF_MONTH, -1);\n return date.getTime();\n case THIS_WEEK:\n today = date.get(Calendar.DAY_OF_WEEK);\n date.add(Calendar.DAY_OF_WEEK,-today+Calendar.MONDAY);\n return date.getTime();\n case LAST_WEEK:\n today = date.get(Calendar.DAY_OF_WEEK);\n date.add(Calendar.DAY_OF_WEEK,-today+Calendar.MONDAY);\n date.add(Calendar.DAY_OF_MONTH, -7);\n return date.getTime();\n case THIS_MONTH:\n date.set(Calendar.DAY_OF_MONTH, date.getActualMinimum(Calendar.DAY_OF_MONTH));\n return date.getTime();\n case LAST_MONTH:\n date.set(Calendar.DAY_OF_MONTH, date.getActualMinimum(Calendar.DAY_OF_MONTH));\n date.add(Calendar.MONTH, -1);\n return date.getTime();\n case T12_HRS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -12);\n return date.getTime();\n case T24_HRS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -24);\n return date.getTime();\n case T2_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -48);\n return date.getTime();\n case T3_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -72);\n return date.getTime();\n case T4_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -96);\n return date.getTime();\n case T5_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -120);\n return date.getTime();\n case T6_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -144);\n return date.getTime();\n case T7_DAYS:\n date = new GregorianCalendar();\n date.add(Calendar.HOUR, -168);\n return date.getTime();\n }\n return null;\n }", "public ValidatorFactory setDateFormat(int dateStyle, int timeStyle) {\n if (timeStyle < 0) {\n DateFormat.getDateInstance(dateStyle);\n } else if (dateStyle < 0) {\n DateFormat.getTimeInstance(timeStyle);\n } else {\n DateFormat.getDateTimeInstance(dateStyle, timeStyle);\n }\n this.dateStyle = dateStyle;\n this.timeStyle = timeStyle;\n this.datePattern = null;\n return this;\n }", "public static RequirementType create(String name) {\n throw new IllegalStateException(\"Enum not extended\");\n }", "DateConstant createDateConstant();", "public static CarFactory makeFactory(String color, String marca, String placa, String cil, String trans, String puesto, int type) {\n \n switch (type) {\n case 0:\n return new FamiliarFactory(color, marca, placa, cil, trans, puesto);\n case 1:\n return new SportFactory(color, marca, placa, cil, trans, puesto);\n case 2:\n return new StandarFactory(color, marca, placa, cil, trans, puesto);\n default:\n throw new IllegalArgumentException(\"No existe esta categoria de carro\");\n }\n }", "public SweDate(int year, int month, int day, double hour, boolean calType) {\n\t\tsetFields(year, month, day, hour, calType);\n\t}", "public static ToUseTimeLineFactory init() {\n\t\ttry {\n\t\t\tToUseTimeLineFactory theToUseTimeLineFactory = (ToUseTimeLineFactory)EPackage.Registry.INSTANCE.getEFactory(ToUseTimeLinePackage.eNS_URI);\n\t\t\tif (theToUseTimeLineFactory != null) {\n\t\t\t\treturn theToUseTimeLineFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ToUseTimeLineFactoryImpl();\n\t}", "PriceModel createInstanceOfPriceModel();", "@Test\n void scCreation() {\n StandardCalc sc = new StandardCalc();\n }", "public abstract void add(T input, List<Method> methods, List<String> dateTypes);", "private OperatorPair chooseOperators(String name) {\n\t\t\n\t\tswitch(name) {\n\t\t\n\t\tcase \"sin\":\n\t\t\treturn new OperatorPair(SIN, ASIN);\n\t\t\t\n\t\tcase \"cos\":\n\t\t\treturn new OperatorPair(COS, ACOS);\n\t\t\t\n\t\tcase \"tan\":\n\t\t\treturn new OperatorPair(TAN, ATAN);\n\t\t\t\n\t\tcase \"ctg\":\n\t\t\treturn new OperatorPair(CTG, ACTG);\n\t\t\t\n\t\tcase \"log\":\n\t\t\treturn new OperatorPair(LOG, LOG_INV);\n\t\t\t\n\t\tcase \"ln\":\n\t\t\treturn new OperatorPair(LN, LN_INV);\n\t\t\n\t\tcase \"1/x\":\n\t\t\treturn new OperatorPair(X_INV, X_INV);\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new IllegalStateException(\"Invalid unary operator\");\n\t\t}\n\t}", "@JsonCreator\n public static DataType fromString(String name) {\n return fromString(name, DataType.class);\n }", "Demo1Factory getDemo1Factory();", "public Car createCar(String name, String modelName, String type) {\r\n return new Car(name, modelName, type);\r\n }", "public Date getDate(String name, String format) {\n Object value = get(name);\n if (value instanceof Date) {\n return (Date)value;\n }\n \n if (value != null) {\n try {\n return new SimpleDateFormat(format).parse(value.toString());\n } catch (ParseException e) {\n // ignore\n }\n }\n return null;\n }", "public static Checking createChecking(String name) {\r\n return new Checking(name);\r\n }", "private static FuncionalidadeCustos create(String id, String name) {\n FuncionalidadeCustos result = new FuncionalidadeCustos(id, name);\n addToMap(id, result);\n return result;\n }", "public Calculator() {\r\n\t\tthis.operator = new Addition();\r\n\t}", "public Customer(String customerName, double billAmount, char discountType) {\n this.customerName = customerName;\n this.billAmount = billAmount;\n switch(discountType) {\n case 'd':\n case 'D':\n this.discountStrategy = new NormalDiscountStrategy();\n break;\n case 'L':\n case 'l':\n this.discountStrategy = new LiquidationStrategy();\n break;\n case 'S':\n case 's':\n this.discountStrategy = new SaleStrategy();\n }\n }", "private static void incrementDate() {\n\t\ttry {\r\n\t\t\tint days = Integer.valueOf(input(\"Enter number of days: \")).intValue();\r\n\t\t\tcalculator.incrementDate(days); // variable name changes CAL to calculator\r\n\t\t\tlibrary.checkCurrentLoans(); // variable name changes LIB to library\r\n\t\t\toutput(sdf.format(cal.date())); // variable name changes SDF to sdf , CAL to cal , method changes Date() to date()\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t output(\"\\nInvalid number of days\\n\");\r\n\t\t}\r\n\t}", "KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);", "private PropertyEvaluator createEvaluator() {\n return helper.getStandardPropertyEvaluator();\n }", "public synchronized Option Create(String name, double cost) {\n\t\treturn new Option(name.toUpperCase(Locale.getDefault()), cost);\n\t}", "DateLiteral createDateLiteral();", "public FillDate() {\n }", "Object create(InputSource is) throws IOException, SAXException, ParserConfigurationException;", "public static MealPlan createMealPlan(String name, LocalDate day) {\n Connection conn = new ConnectDb().setupConnection();\n OraclePreparedStatement pst = null;\n OracleResultSet rs = null;\n \n try {\n String sqlStatement = \"select nvl(max(id), 0)+1 as id from mealplan\";\n pst = (OraclePreparedStatement) conn.prepareStatement(sqlStatement);\n \n rs = (OracleResultSet) pst.executeQuery();\n \n int id;\n if (rs.next()) {\n id = rs.getInt(\"id\");\n } else {\n return null;\n }\n \n \n sqlStatement = \"insert into mealplan (id, name, day) values (?, ?, ?)\";\n \n pst = (OraclePreparedStatement) conn.prepareStatement(sqlStatement);\n pst.setInt(1, id);\n pst.setString(2, name);\n pst.setObject(3, day);\n \n pst.executeUpdate();\n \n return new MealPlan(id, name, day);\n \n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, e);\n } finally {\n ConnectDb.close(conn);\n ConnectDb.close(rs);\n ConnectDb.close(pst);\n }\n \n return null;\n }", "AutoevaluacionFactory getAutoevaluacionFactory();", "public static SimpleDateFormat getSimpleDateFormatByMode(int mode) {\n SimpleDateFormat simpleDateFormat = null;\n if (CalendarMode.DAY == mode) {\n simpleDateFormat = new SimpleDateFormat(\"EEE dd\");\n } else if (CalendarMode.WEEK == mode) {\n simpleDateFormat = new SimpleDateFormat(\"dd/MM\");\n } else {\n simpleDateFormat = new SimpleDateFormat(\"MMM yyyy\");\n }\n return simpleDateFormat;\n }", "public static void main(String[] args) throws Exception {\n\t\tPaint staticpaint = new RedPaint();\r\n\t\tSystem.out.println(\"object created through static way:\"+staticpaint);\r\n\t\t//2. dynamic binding.... To dynamically create objects...\r\n\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Please enter the qualified class name:\");\r\n\t\tString Paintclass=scan.next();\r\n\t\tPaint dynamicPaint=(Paint)Class.forName(Paintclass).newInstance();\r\n\t\tSystem.out.println(\"Object created through dynamic way...:\"+dynamicPaint);\r\n\t\t//3. new way of creating objects dynamically....after jdk9\r\n\t\tSystem.out.println(\"please enter the one more class:\");\r\n\t\tPaintclass=scan.next();\r\n\t\tPaint s=(Paint)Class.forName(Paintclass).getConstructor().newInstance();\r\n\t\tSystem.out.println(\"New dynamic way:\"+s);\r\n\t}", "public interface IDate {\n /**\n * @return current date.\n */\n public int getCurrentDate();\n\n /**\n * Converts a specified date from a string to the integer.\n * @param date\n * @return\n */\n public int convertStringDateToInteger(String date);\n public void findDayOfWeek(int number);\n}" ]
[ "0.5976531", "0.5564023", "0.55446106", "0.54173374", "0.54005826", "0.53603005", "0.53126913", "0.5302859", "0.5251208", "0.5127945", "0.5112598", "0.5099403", "0.50425434", "0.5038562", "0.5019697", "0.49465993", "0.4897155", "0.48800635", "0.48514685", "0.4840474", "0.47555918", "0.47470015", "0.47393426", "0.47012767", "0.4701086", "0.46967444", "0.468162", "0.4650081", "0.4643002", "0.46362805", "0.46259192", "0.46201274", "0.4595339", "0.4576332", "0.45590106", "0.4557489", "0.45454964", "0.4537722", "0.4525335", "0.4518286", "0.451243", "0.4508583", "0.44910097", "0.4469076", "0.44665366", "0.4465409", "0.44620726", "0.4420153", "0.4418247", "0.44033635", "0.4400889", "0.4400878", "0.43941218", "0.43888167", "0.4387394", "0.43796542", "0.437906", "0.4374104", "0.4357912", "0.43517333", "0.43415862", "0.43363938", "0.4335179", "0.43285412", "0.4323382", "0.43200302", "0.43169233", "0.42951694", "0.42938206", "0.42937425", "0.42911124", "0.4291064", "0.42883164", "0.426476", "0.4260828", "0.42468768", "0.42354047", "0.42337713", "0.42283887", "0.42241558", "0.42234105", "0.422147", "0.42205727", "0.42200625", "0.42169824", "0.42164683", "0.42066032", "0.42026284", "0.42014763", "0.4200831", "0.41995096", "0.41966584", "0.4190035", "0.41893673", "0.41811058", "0.41753122", "0.41725072", "0.4169175", "0.4165812", "0.41649246" ]
0.74655604
0
Use this method to register a holidays calendar.
KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void populateHolidays() {\n holidays.put(beginDate(), new Holiday(\"Christmas\", beginDate(), calendar, \"Matthew 1:18-25, Luke 2:1-20\"));\n Calendar holyInnocents = new GregorianCalendar(calendar.getYear() - 1, Calendar.DECEMBER, 28);\n holidays.put(holyInnocents, new Holiday(\"Holy Innocents\", holyInnocents, calendar, \"Matthew 2:13-23\"));\n Calendar epiphany = new GregorianCalendar(calendar.getYear(), Calendar.JANUARY, 6);\n holidays.put(epiphany, new Holiday(\"Epiphany\", epiphany, calendar, \"Matthew 2:1-12\"));\n Calendar presentation = new GregorianCalendar(calendar.getYear(), Calendar.FEBRUARY, 2);\n holidays.put(presentation, new Holiday(\"Presentation\", presentation, calendar, \"Luke 2:21-25\"));\n Calendar annunciation = new GregorianCalendar(calendar.getYear(), Calendar.MARCH, 25);\n if (endDate().compareTo(annunciation) < 0) holidays.put(annunciation, new Holiday(\"Annunciation\", annunciation, calendar, \"Luke 1:26-38\"));\n\n Calendar ashWednesday = (Calendar)holyWeek.beginDate().clone();\n ashWednesday.add(Calendar.DATE, -39);\n holidays.put(ashWednesday, new Holiday(\"Ash Wednesday\", ashWednesday, calendar,\n \"Matthew 3:13-4:11\", \"Mark 1:9-13\", \"Luke 3:21,22, 4:1-13\"));\n\n }", "KitCalculatorsFactory<E> unregisterAllHolidayCalendars();", "public Holidays (){\n name= \"Exotic Beach Holiday of a Lifetime\";\n cost = 5000;\n location = \"Fesdu Island, Maldives\";\n type = \"beach\";\n }", "void addHoliday(int y, int m, int d) {\n\t\tif (y < 1900)\n\t\t\ty += 1900;\n\t\tCalendar aHoliday = (new GregorianCalendar(y, m, d, 0, 0, 0));\n\n\t\tHoliday.add(aHoliday);\n\t}", "KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);", "public void setHolidayEnumerator(HolidayEnumerator he) {\n _holidayEnumerator = he;\n }", "public void setHoliday(final Holiday<GregorianCalendar> holiday) {\n if (holiday == null)\n throw new NullPointerException(\"Holiday not properly specified.\");\n this._holiday = holiday;\n }", "public interface HolidayService {\n\t\n\tvoid load();\n\t\n\tDate getNextWorkingDay(Message message);\n\t\n}", "public Holiday<GregorianCalendar> getHoliday() {\n return _holiday;\n }", "public void addHoliday(String name, int day, int month) throws IOException {\r\n\t\tArrayList<Holiday> al = Holiday.readHoliday(MoblimaApp.holidayFile);\r\n\t\tHoliday h1 = new Holiday(name, day, month);\r\n\t\t// al is an array list containing holiday objs\r\n\t\tal.add(h1);\r\n\t\tif (day == 1) {\r\n\t\t\tif(month == 1) {\r\n\t\t\t\tString name2 = name + \" Eve\";\r\n\t\t\t\tHoliday h2 = new Holiday(name2, 31, 12);\r\n\t\t\t\tal.add(h2);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\tString name2 = name + \" Eve\";\r\n\t\t\tHoliday h2 = new Holiday(name2, 31, month - 1);\r\n\t\t\tal.add(h2);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tString name2 = name + \" Eve\";\r\n\t\t\tHoliday h2 = new Holiday(name2, day - 1, month);\r\n\t\t\tal.add(h2);\r\n\t\t}\r\n\t\t// write holiday record/s to file.\r\n\t\tHoliday.saveHoliday(MoblimaApp.holidayFile, al);\r\n\t}", "void updateHolidayDays(HolidayDays holidayDays, AsyncCallback<Void> callback);", "void saveHolidayDays(HolidayDays holidayDays, AsyncCallback<Void> callback);", "void getHolidayDaysById(long id, AsyncCallback<HolidayDays> callback);", "@Override\n\tpublic Holiday update(Holiday holiday) {\n\t\treturn null;\n\t}", "public Holiday(int day, int month) {\n\t\tdate = LocalDate.of(2019,month,day);\n\t}", "@Override\n\tpublic List<Holiday> viewAllHolidays() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void deleteHoliday(Holiday holiday) {\n\n\t}", "Calendar registeredAt();", "@Override\n\tprotected void addItineraryToCalendar() {\n\t\tstartActivity(generateHotelCalendarIntent(false));\n\t\tstartActivity(generateHotelCalendarIntent(true));\n\n\t\tOmnitureTracking.trackHotelConfirmationAddToCalendar();\n\t}", "DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);", "public static HolidaysCalendar getHolidaysCalendar(String country) {\r\n HolidaysCalendar holidaysCalendar;\r\n if (country != null) {\r\n holidaysCalendar = (HolidaysCalendar) calendarCache.get(country);\r\n if (holidaysCalendar == null) {\r\n holidaysCalendar = initHolidaysCalendar(country);\r\n calendarCache.put(country, holidaysCalendar);\r\n }\r\n } else {\r\n holidaysCalendar = DEFAULT_HOLLYDAY_CALENDAR;\r\n }\r\n return holidaysCalendar;\r\n }", "ConferenceScheduleBuilderService startEvent();", "private List<LocalDate> createHolidays(int year) throws Exception {\n LocalDate indepDay = LocalDate.parse(year + \"-07-04\");\n YearMonth laborDayYearMonth = YearMonth.parse(year + \"-09\");\n LocalDate laborDay = DaysOfWeekUtil.findFirstOfMonth(laborDayYearMonth, DayOfWeek.MONDAY);\n\n return Arrays.asList(indepDay, laborDay);\n }", "ConferenceScheduleBuilderService createEventsFromStartToLunch();", "public void createCalendar(List<String> exceptionList) {\n\t\tcreateCalShift();\n\t\tYFCElement createCalInputEle = docCreateCalenderInXml.getDocumentElement();\n\t\tYFCElement exceptioncalEle = createCalInputEle.createChild(XMLLiterals.CALENDAR_DAY_EXCEPTIONS);\n\t\tfor(String exceptionDate:exceptionList) {\n\t\t\tYFCElement excepDayEle = exceptioncalEle.createChild(XMLLiterals.CALENDAR_DAY_EXCEPTION);\n\t\t\texcepDayEle.setAttribute(XMLLiterals.DATE, exceptionDate);\n\t\t\texcepDayEle.setAttribute(XMLLiterals.EXCEPTION_TYPE, OFF_DAY);\n\t\t}\n\t\tString calenderId = docCreateCalenderInXml.getDocumentElement().getAttribute(XMLLiterals.CALENDER_ID);\n\t\tString orgCode = docCreateCalenderInXml.getDocumentElement().getAttribute(XMLLiterals.ORGANIZATION_CODE);\n\t\tif(!XmlUtils.isVoid(calenderId) && getCalendarDetails(orgCode,calenderId).getDocumentElement().hasChildNodes()) {\n\t\t\texceptionList.clear();\n\t\t\tinvokeYantraApi(XMLLiterals.CHANGE_CALENDAR, docCreateCalenderInXml);\n\t\t\tmanageSerSlot(orgCode);\n\t\t} else {\n\t\t\tinvokeYantraApi(XMLLiterals.CREATE_CALENDAR, docCreateCalenderInXml);\n\t\t\tmanageSerSlot(orgCode);\n\t\t\texceptionList.clear();\n\t\t}\n\t}", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "public Set<Calendar> getHolidays(String str){\r\n\t\tswitch(str) {\r\n\t\t\tcase \"EUR\": return holidaysEuro;\r\n\t\t\tcase \"USD\": return holidaysUsd;\r\n\t\t\tdefault: return new HashSet<>();\r\n\t\t}\r\n\t}", "public static boolean isHoliday(Date date) {\n\t\tthrow new IllegalStateException(\"no database connection\");\r\n\t}", "@Test\r\n public void testifHoliday() {\r\n LocalDate date1 = LocalDate.parse(\"2018-01-12\");\r\n assertTrue(DateUtil.ifHoliday(date1));\r\n\r\n date1 = LocalDate.parse(\"2018-01-14\");\r\n assertFalse(DateUtil.ifHoliday(date1));\r\n }", "void deleteHolidayDays(HolidayDays holidayDays, AsyncCallback<Void> callback);", "void onListFragmentInteraction(Holiday holiday);", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "public final void loadEvents() {\n\n if (selectedUser == null || selectedUser.equals(\"All\")) {\n for (Absence a : AbsenceService.getAllUnacknowledged()) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n } else {\n for (Absence a : AbsenceService.getAbsenceByUserAndUnacknowledged(BenutzerverwaltungService.getUser(selectedUser))) {\n\n AbsenceEvent e = new AbsenceEvent(a.getUser().getUsername() + \" \" + a.getAbsenceType() + \" \" + a.getReason(), TimeConverterService.convertLocalDateTimeToDate(a.getStartTime()), TimeConverterService.convertLocalDateTimeToDate(a.getEndTime()), a);\n\n switch (e.getAbsence().getAbsenceType()) {\n\n case MEDICAL_LEAVE:\n e.setStyleClass(\"medical_leave\");\n break;\n case HOLIDAY:\n e.setStyleClass(\"holiday\");\n e.setAllDay(true);\n break;\n case TIME_COMPENSATION:\n e.setStyleClass(\"time_compensation\");\n break;\n case BUSINESSRELATED_ABSENCE:\n e.setStyleClass(\"business-related_absence\");\n break;\n default:\n }\n\n this.addEvent(e);\n }\n }\n\n DefaultScheduleEvent holidayevent;\n\n for (Holiday h : HolidayService.getList()) {\n holidayevent = new DefaultScheduleEvent(h.getHolidayComment(), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()), TimeConverterService.convertLocalDateToDate(h.getHolidayDate()));\n holidayevent.setAllDay(true);\n holidayevent.setStyleClass(\"feiertag\");\n\n this.addEvent(holidayevent);\n }\n }", "@Override\n\tpublic boolean isHoliday(LocalDate currentDay) {\n\t\treturn (currentDay.getDayOfWeek().name().equals(DayOfWeek.FRIDAY.name()) \n\t\t\t\t|| currentDay.getDayOfWeek().name().equals(DayOfWeek.SATURDAY.name()));\n\t}", "HolidayHandler<E> getHolidayHandler(String holidayHandlerType);", "private void addToCalendar() {\r\n if (!requireCalendarPermissions())\r\n return;\r\n\r\n if (CalendarUtil.createEntry(this, event))\r\n onAddToCalendarSuccess();\r\n else\r\n onRequireCalendarPermissionsDenied();\r\n }", "public void add(DiaryCalendarEvent event){\n this.dates.add(new CalendarDay(event.getYear(),event.getMonth(),event.getDay()));\n }", "@WebMethod public void createEvent(String description, LocalDate eventDate) throws EventAlreadyExist;", "@Override\n\tpublic List<Holiday> viewMonthHoliday(LocalDate date) {\n\t\treturn null;\n\t}", "public void AddAvailableDates()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query; \n\t\t\t\n\t\t\tfor(int i = 0; i < openDates.size(); i++)\n\t\t\t{\n\t\t\t\tboolean inTable = CheckAvailableDate(openDates.get(i)); \n\t\t\t\tif(inTable == false)\n\t\t\t\t{\n\t\t\t\t\tquery = \"INSERT INTO Available(available_hid, price_per_night, startDate, endDate)\"\n\t\t\t\t\t\t\t+\" VALUE(\"+hid+\", \"+price+\", '\"+openDates.get(i).stringStart+\"', '\"+openDates.get(i).stringEnd+\"')\";\n\t\t\t\t\tint result = con.stmt.executeUpdate(query); \n\t\t\t\t}\n\t\t\t}\n\t\t\tcon.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public DayOfWeek diaDaSemana(LocalDate d);", "public static void create() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString title = \"\";\n\t\tString date = \"\";\n\t\tString startTime = \"\";\n\t\tString endTime = \"\";\n\t\tSystem.out.println(\"Enter the title of the event you would like to create: \");\n\t\tif (sc.hasNextLine()) {\n\t\t\ttitle = sc.nextLine().toLowerCase();\n\t\t}\n\t\tSystem.out.println(\"Enter the date on MM/DD/YYYY format: \");\n\t\tif (sc.hasNextLine()) {\n\t\t\tdate = sc.nextLine().toLowerCase();\n\t\t}\n\t\tSystem.out.println(\"Enter the starting time in 24 hour format (ex 15:30): \");\n\t\tif (sc.hasNextLine()) {\n\t\t\tstartTime = sc.nextLine().toLowerCase();\n\t\t}\n\t\tSystem.out.println(\"Enter the ending time: in 24 hour format (ex 15:30): \"); // if there's no end time set the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// end time to the start time.\n\t\tif (sc.hasNextLine()) {\n\t\t\tendTime = sc.nextLine().toLowerCase();\n\t\t\tif (endTime.equals(\"\")) {\n\t\t\t\tendTime = startTime;\n\t\t\t}\n\t\t}\n\t\tEvent toAdd = new Event(title, date, startTime, endTime);\n\n\t\tGregorianCalendar calendar = new GregorianCalendar(toAdd.getYear(), toAdd.getMonth(), toAdd.getDay());\n\t\tif (calendarToEvent.get(calendar) == null) { // there are no events under this date\n\t\t\tTreeSet<Event>treeSetForMap = new TreeSet<Event>();\n\t\t\ttreeSetForMap.add(toAdd);\n\t\t\tcalendarToEvent.put(calendar, treeSetForMap);\n\t\t} else { // there are already events, add event to the treeset\n\t\t\tboolean canAdd = true;\n\t\t\tfor (Event e : calendarToEvent.get(calendar)) {\n\t\t\t\tif (e.conflictCheck(toAdd)) { //check this (e.getIntEndTime()) < (toAdd.getIntStartTime()) ////return true if there is a conflict, false if there isn't\n\t\t\t\t\tSystem.out.println(\"Sorry can't add that event, there is a conflict\");\n\t\t\t\t\tcanAdd = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (canAdd) {\n\t\t\t\tcalendarToEvent.get(calendar).add(toAdd); // THAT'S WHAT IT USED TO BE calendarToEvent.get(toAdd.getDate()).add(toAdd);\n\t\t\t}\n\t\t}\n\t}", "private void attachDatabaseReference_requested_holidays() {\n if (mChildEventListenerDaysRequested == null) {\n mChildEventListenerDaysRequested = new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n Log.v(\"***********\", \"There has beem an addition in daysRequested\");\n //List<Long> longList = (List) dataSnapshot.getValue();\n if (dataSnapshot.getKey().equals(mUserID)) {//check if it's the current user branch\n RequestedHolidays reques = new RequestedHolidays();\n //reques = dataSnapshot.getValue(RequestedHolidays.class);\n GenericTypeIndicator<List<Long>> t =\n new GenericTypeIndicator<List<Long>>() {\n };\n\n Object objecto = dataSnapshot.getValue();\n //List<Long> messages = dataSnapshot.getValue(t);\n //makeMapHash(objecto);\n //HashMap<String, Long> map = new HashMap<String, Long>();\n //map.put (1, \"Mark\");\n //map.put (2, \"Tarryn\");\n //map = (HashMap) dataSnapshot.getValue();\n //List<Long> list = new ArrayList<Long>(map.values());\n\n //List<Long> longList = (List) dataSnapshot.getValue();\n List<Long> longList = (List<Long>) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n Log.i(\"***********\", \"DrawMonth called in attach...requested\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n }\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n Log.i(\"***********\", \"There has beem a change in daysRequested\");\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n Log.i(\"***********\", \"There has beem a removed in daysRequested\");\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n Log.i(\"***********\", \"There has beem a moved in daysRequested\");\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(getApplicationContext(), \"ONCANCELLED in /requested_holidays\", Toast.LENGTH_LONG).show();\n Log.i(\"***********\", \"ONCANCELLED IN /requested_holidays\");\n }\n };\n //when days are added to the requestedHolidays in the DB this will trigger\n //mDatabaseReferenceHolidays.addChildEventListener(mChildEventListenerDaysRequested);\n mDatabaseReferenceRequestedHolidays.addChildEventListener(mChildEventListenerDaysRequested);\n //mDatabaseReference.addChildEventListener(mChildEventListenerDaysRequested);\n }\n }", "private RepeatWeekdays() {}", "void addPreferedCalendar(String calendarId);", "public void createCalendar() throws Exception, IOException, ServiceException {\n // If true, the calendar already exists\n if (getDestinationCalendarUrl() != null) {\n return;\n }\n\n CalendarEntry calendar = new CalendarEntry();\n calendar.setTitle(new PlainTextConstruct(destinationCalendarName));\n// calendar.setSummary(new PlainTextConstruct(\"Lotus Notes Calendar\"));\n // Get this machine's current time zone when creating the new Google calendar\n TimeZone localTimeZone = TimeZone.getDefault();\n calendar.setTimeZone(new TimeZoneProperty(localTimeZone.getID()));\n \n calendar.setHidden(HiddenProperty.FALSE);\n calendar.setSelected(SelectedProperty.TRUE);\n calendar.setColor(new ColorProperty(COLOR));\n\n CalendarEntry returnedCalendar = service.insert(mainCalendarFeedUrl, calendar);\n returnedCalendar.update();\n\n // Get the feed url reference so that we can add events to the new calendar.\n destinationCalendarFeedUrl = new URL(returnedCalendar.getLink(\"alternate\", \"application/atom+xml\").getHref());\n\n return;\n }", "public Holidays (String name, int cost) {\n this.name = name;\n this.cost = cost;\n }", "@SuppressWarnings(\"deprecation\")\r\n\tprivate void createCalendarEntry(){\r\n\t\t\r\n\t\tUri calendars = Uri.parse(CALENDAR_URI);\r\n\t\t \r\n\t\tCursor managedCursor = managedQuery(calendars, projection, null, null, null);\r\n\t\tString calName = \"\"; \r\n\t\tString calId = \"\"; \r\n\t\tif (managedCursor.moveToFirst()) {\r\n\t\t\t \r\n\t\t\t int idColumn = managedCursor.getColumnIndex(projection[0]);\r\n\t\t\t int nameColumn = managedCursor.getColumnIndex(projection[1]); \r\n\t\t\t \r\n\t\t\t do {\r\n\t\t\t calName = managedCursor.getString(nameColumn);\r\n\t\t\t calId = managedCursor.getString(idColumn);\r\n\t\t\t if (calName.contains(\"gmail\"))\r\n\t\t\t \tbreak;\r\n\t\t\t } while (managedCursor.moveToNext());\r\n\t }\r\n\t\t\r\n\t\tlong start = System.currentTimeMillis() + 120000;\r\n\t\tlong duration = DURATION + start;\r\n\t\t\r\n\t\tContentValues values = new ContentValues();\r\n\t\tvalues.put(DATE_START, start);\r\n\t\tvalues.put(DATE_END, duration);\r\n\t\tvalues.put(EVENT_TITLE, ocrData.getMedicine().getMedicine());\r\n\t\tvalues.put(EVENT_DESCRIPTION, \"Take \" + ocrData.getPatient2Medicine().getFrequencyOfIntake() \r\n\t\t\t\t+ \" by \" + ocrData.getPatient2Medicine().getMode());\r\n\t\tvalues.put(CALENDAR_ID, calId);\r\n\t\tvalues.put(EVENT_RULE, \"FREQ=\" + ocrData.getPatient2Medicine().getFrequencyOfIntake() + \";\");\r\n\t\tvalues.put(HAS_ALARM, 1);\r\n\t\t\r\n\t\tContentResolver cr = getContentResolver();\r\n\t\tUri event = cr.insert(Uri.parse(EVENT_URI), values);\r\n\t\t\r\n\t\tvalues = new ContentValues();\r\n\t\tvalues.put(\"event_id\", Long.parseLong(event.getLastPathSegment()));\r\n\t\tvalues.put(\"method\", 1);\r\n\t\tvalues.put(\"minutes\", 10 );\r\n\t\tcr.insert(Uri.parse(REMINDER_URI), values);\r\n\t}", "public void readHoliday() throws IOException {\r\n\t\tArrayList<Holiday> al = Holiday.readHoliday(MoblimaApp.holidayFile);\r\n\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\tHoliday holiday = (Holiday) al.get(i);\r\n\t\t\tSystem.out.println(\"Holiday Name: \" + holiday.getHolidayName());\r\n\t\t\tSystem.out.println(\"Day/Month: \" + holiday.getDay() + '/' + holiday.getMonth());\r\n\t\t\t// System.out.println(\"===================================\");\r\n\t\t}\r\n\t}", "HolidaysAdapter(Context mContext) {\n this.mContext = mContext;\n }", "public final void setCommitment_Holidays_Group(businesshours.proxies.Holidays_Group commitment_holidays_group)\r\n\t{\r\n\t\tsetCommitment_Holidays_Group(getContext(), commitment_holidays_group);\r\n\t}", "public interface IFDBCalendar {\n public int insertCalendar(Calendar calendar) throws Exception;\n}", "ConferenceScheduleBuilderService createEventsFromNetworkToEnd();", "public boolean canSaveCalendarDayOff(CalendarDayOff calendarDayOff,Calendar calendar) {\nreturn true;\n}", "public interface Holiday {\n default MdiIcon balloon_holiday() {\n return MdiIcon.create(\"mdi-balloon\");\n }\n\n default MdiIcon bat_holiday() {\n return MdiIcon.create(\"mdi-bat\");\n }\n\n default MdiIcon bed_holiday() {\n return MdiIcon.create(\"mdi-bed\");\n }\n\n default MdiIcon bed_double_holiday() {\n return MdiIcon.create(\"mdi-bed-double\");\n }\n\n default MdiIcon bed_double_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-double-outline\");\n }\n\n default MdiIcon bed_empty_holiday() {\n return MdiIcon.create(\"mdi-bed-empty\");\n }\n\n default MdiIcon bed_king_holiday() {\n return MdiIcon.create(\"mdi-bed-king\");\n }\n\n default MdiIcon bed_king_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-king-outline\");\n }\n\n default MdiIcon bed_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-outline\");\n }\n\n default MdiIcon bed_queen_holiday() {\n return MdiIcon.create(\"mdi-bed-queen\");\n }\n\n default MdiIcon bed_queen_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-queen-outline\");\n }\n\n default MdiIcon bed_single_holiday() {\n return MdiIcon.create(\"mdi-bed-single\");\n }\n\n default MdiIcon bed_single_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-single-outline\");\n }\n\n default MdiIcon bone_holiday() {\n return MdiIcon.create(\"mdi-bone\");\n }\n\n default MdiIcon bone_off_holiday() {\n return MdiIcon.create(\"mdi-bone-off\");\n }\n\n default MdiIcon bottle_tonic_skull_holiday() {\n return MdiIcon.create(\"mdi-bottle-tonic-skull\");\n }\n\n default MdiIcon bottle_tonic_skull_outline_holiday() {\n return MdiIcon.create(\"mdi-bottle-tonic-skull-outline\");\n }\n\n default MdiIcon cake_holiday() {\n return MdiIcon.create(\"mdi-cake\");\n }\n\n default MdiIcon cake_layered_holiday() {\n return MdiIcon.create(\"mdi-cake-layered\");\n }\n\n default MdiIcon cake_variant_holiday() {\n return MdiIcon.create(\"mdi-cake-variant\");\n }\n\n default MdiIcon cake_variant_outline_holiday() {\n return MdiIcon.create(\"mdi-cake-variant-outline\");\n }\n\n default MdiIcon candelabra_holiday() {\n return MdiIcon.create(\"mdi-candelabra\");\n }\n\n default MdiIcon candelabra_fire_holiday() {\n return MdiIcon.create(\"mdi-candelabra-fire\");\n }\n\n default MdiIcon candle_holiday() {\n return MdiIcon.create(\"mdi-candle\");\n }\n\n default MdiIcon candycane_holiday() {\n return MdiIcon.create(\"mdi-candycane\");\n }\n\n default MdiIcon cat_holiday() {\n return MdiIcon.create(\"mdi-cat\");\n }\n\n default MdiIcon coffin_holiday() {\n return MdiIcon.create(\"mdi-coffin\");\n }\n\n default MdiIcon cross_holiday() {\n return MdiIcon.create(\"mdi-cross\");\n }\n\n default MdiIcon cross_celtic_holiday() {\n return MdiIcon.create(\"mdi-cross-celtic\");\n }\n\n default MdiIcon egg_easter_holiday() {\n return MdiIcon.create(\"mdi-egg-easter\");\n }\n\n default MdiIcon firework_holiday() {\n return MdiIcon.create(\"mdi-firework\");\n }\n\n default MdiIcon food_turkey_holiday() {\n return MdiIcon.create(\"mdi-food-turkey\");\n }\n\n default MdiIcon gift_holiday() {\n return MdiIcon.create(\"mdi-gift\");\n }\n\n default MdiIcon gift_off_holiday() {\n return MdiIcon.create(\"mdi-gift-off\");\n }\n\n default MdiIcon gift_off_outline_holiday() {\n return MdiIcon.create(\"mdi-gift-off-outline\");\n }\n\n default MdiIcon gift_open_holiday() {\n return MdiIcon.create(\"mdi-gift-open\");\n }\n\n default MdiIcon gift_open_outline_holiday() {\n return MdiIcon.create(\"mdi-gift-open-outline\");\n }\n\n default MdiIcon gift_outline_holiday() {\n return MdiIcon.create(\"mdi-gift-outline\");\n }\n\n default MdiIcon grave_stone_holiday() {\n return MdiIcon.create(\"mdi-grave-stone\");\n }\n\n default MdiIcon halloween_holiday() {\n return MdiIcon.create(\"mdi-halloween\");\n }\n\n default MdiIcon hexagram_holiday() {\n return MdiIcon.create(\"mdi-hexagram\");\n }\n\n default MdiIcon hexagram_outline_holiday() {\n return MdiIcon.create(\"mdi-hexagram-outline\");\n }\n\n default MdiIcon menorah_holiday() {\n return MdiIcon.create(\"mdi-menorah\");\n }\n\n default MdiIcon menorah_fire_holiday() {\n return MdiIcon.create(\"mdi-menorah-fire\");\n }\n\n default MdiIcon ornament_holiday() {\n return MdiIcon.create(\"mdi-ornament\");\n }\n\n default MdiIcon ornament_variant_holiday() {\n return MdiIcon.create(\"mdi-ornament-variant\");\n }\n\n default MdiIcon owl_holiday() {\n return MdiIcon.create(\"mdi-owl\");\n }\n\n default MdiIcon party_popper_holiday() {\n return MdiIcon.create(\"mdi-party-popper\");\n }\n\n default MdiIcon pine_tree_holiday() {\n return MdiIcon.create(\"mdi-pine-tree\");\n }\n\n default MdiIcon pine_tree_box_holiday() {\n return MdiIcon.create(\"mdi-pine-tree-box\");\n }\n\n default MdiIcon pot_holiday() {\n return MdiIcon.create(\"mdi-pot\");\n }\n\n default MdiIcon pot_mix_holiday() {\n return MdiIcon.create(\"mdi-pot-mix\");\n }\n\n default MdiIcon pot_mix_outline_holiday() {\n return MdiIcon.create(\"mdi-pot-mix-outline\");\n }\n\n default MdiIcon pot_outline_holiday() {\n return MdiIcon.create(\"mdi-pot-outline\");\n }\n\n default MdiIcon pot_steam_holiday() {\n return MdiIcon.create(\"mdi-pot-steam\");\n }\n\n default MdiIcon pot_steam_outline_holiday() {\n return MdiIcon.create(\"mdi-pot-steam-outline\");\n }\n\n default MdiIcon pumpkin_holiday() {\n return MdiIcon.create(\"mdi-pumpkin\");\n }\n\n default MdiIcon rabbit_variant_holiday() {\n return MdiIcon.create(\"mdi-rabbit-variant\");\n }\n\n default MdiIcon rabbit_variant_outline_holiday() {\n return MdiIcon.create(\"mdi-rabbit-variant-outline\");\n }\n\n default MdiIcon skull_holiday() {\n return MdiIcon.create(\"mdi-skull\");\n }\n\n default MdiIcon skull_crossbones_holiday() {\n return MdiIcon.create(\"mdi-skull-crossbones\");\n }\n\n default MdiIcon skull_crossbones_outline_holiday() {\n return MdiIcon.create(\"mdi-skull-crossbones-outline\");\n }\n\n default MdiIcon skull_outline_holiday() {\n return MdiIcon.create(\"mdi-skull-outline\");\n }\n\n default MdiIcon snowflake_holiday() {\n return MdiIcon.create(\"mdi-snowflake\");\n }\n\n default MdiIcon snowflake_variant_holiday() {\n return MdiIcon.create(\"mdi-snowflake-variant\");\n }\n\n default MdiIcon snowman_holiday() {\n return MdiIcon.create(\"mdi-snowman\");\n }\n\n default MdiIcon spider_holiday() {\n return MdiIcon.create(\"mdi-spider\");\n }\n\n default MdiIcon spider_outline_holiday() {\n return MdiIcon.create(\"mdi-spider-outline\");\n }\n\n default MdiIcon spider_thread_holiday() {\n return MdiIcon.create(\"mdi-spider-thread\");\n }\n\n default MdiIcon spider_web_holiday() {\n return MdiIcon.create(\"mdi-spider-web\");\n }\n\n default MdiIcon stocking_holiday() {\n return MdiIcon.create(\"mdi-stocking\");\n }\n\n default MdiIcon teddy_bear_holiday() {\n return MdiIcon.create(\"mdi-teddy-bear\");\n }\n\n default MdiIcon turkey_holiday() {\n return MdiIcon.create(\"mdi-turkey\");\n }\n\n default MdiIcon weather_night_holiday() {\n return MdiIcon.create(\"mdi-weather-night\");\n }\n}", "@POST\n Response createCalendar(Calendar calendar);", "public Holiday(long id, String title, String description, String image, String typeOfHoliday, boolean riseOfFlag) {\n\t\tsuper(); //???\n\t\tthis.id = id;\n\t\tthis.title = title;\n\t\tthis.description = description;\n\t\tthis.image = image;\n\t\tthis.typeOfHoliday = typeOfHoliday;\n\t\tthis.riseOfFlag = riseOfFlag;\n\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tview=inflater.inflate(R.layout.activity_list_holiday, container, false);\r\n\t\tsetHasOptionsMenu(true);\r\n\t\tmListener.onFragmentAttached(false,\" Scheduler\");\r\n\t\tisAddingHoliday=false;\r\n\t\tholidayList=new SchedularHolidayList();\r\n\t\tserviceMethod=new ServiceMethod();\r\n\t\tshowMessage=new ShowMessages(getActivity());\r\n\t\tcheckNetwork=new CheckNetwork();\r\n\r\n\r\n\r\n\t\tlistView=(ListView) view.findViewById(R.id.holidayNmaeList);\r\n\r\n\r\n\r\n\r\n\t\taddHolidayImage= (ImageView) view.findViewById(R.id.addHolidayImage);\r\n\t\taddHoliday_text=(TextView) view.findViewById(R.id.addHoliday_text);\r\n\t\ttypeFace.setTypefaceLight(addHoliday_text);\r\n\r\n\t\taddHolidayImage.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t\tisAddingHoliday=true;\r\n\t\t\t\tholidayDesc=\"\";\r\n\t\t\t\tif(!StaticVariables.isFromSettingsScreen)\r\n\t\t\t\t{\r\n\t\t\t\t\tStaticVariables.fragmentIndexCurrentTabSchedular=81;\r\n\r\n\t\t\t\t\tswitchingFragments(new HolidayDetailsFragment());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tStaticVariables.fragmentIndexCurrentTabSettings=202;\r\n\t\t\t\t\tswitchingFragmentsSettings(new HolidayDetailsFragment());\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\taddHoliday_text.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t\tholidayDesc=\"\";\r\n\t\t\t\tisAddingHoliday=true;\r\n\t\t\t\tif(!StaticVariables.isFromSettingsScreen)\r\n\t\t\t\t{\r\n\t\t\t\t\tStaticVariables.fragmentIndexCurrentTabSchedular=81;\r\n\r\n\t\t\t\t\tswitchingFragments(new HolidayDetailsFragment());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tStaticVariables.fragmentIndexCurrentTabSettings=202;\r\n\t\t\t\t\tswitchingFragmentsSettings(new HolidayDetailsFragment());\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\r\n\t\tnew GetHolidayList().execute();\r\n\r\n\t\treturn view;\r\n\t}", "@Override\n //this one is called when days are added and also the first time the database is called\n //therefore should bring all the workingdays from the database\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n Object object = dataSnapshot.getValue();\n if (dataSnapshot.getKey().equals(\"workInts\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n workingDays = ConvertHashToList(longList);\n }\n if (dataSnapshot.getKey().equals(\"holidays\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n holidays = ConvertHashToList(longList);\n }\n if (dataSnapshot.getKey().equals(\"requested_holidays\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n //because the worker only can modify his requested_holidays only here makes sense...\n requestedHolidaysaux = (HashSet) requestedHolidays.clone();\n int hola = 4;\n }\n // I will need the requestedHolidays in order to tell the admin and add them to holidays\n if (dataSnapshot.getKey().equals(\"requestedHolidays\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n }\n //drawMonth(workingDays, holidays, requestedHolidays);//here i should have the days from the database\n Worker worker = dataSnapshot.getValue(Worker.class);\n String laestring = dataSnapshot.getKey();//i think this is the id\n if (worker != null) {\n if (laestring.equals(mUserID)) {\n //if (worker.getNumber_id().equals(mUserID)) {\n List<Long> longList = worker.getWorkInts();\n List<Long> longListHolidays = worker.getHolidays();\n List<Long> longRequested = worker.getRequestedHolidays();\n if (longRequested.size() != 0 && isAdmin) {\n AlertDialog.Builder builder = new AlertDialog.Builder(CalendarActivity.this);\n builder.setMessage(R.string.dialog_message).setTitle(R.string.dialog_title);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //List<Long> auxlis = new ArrayList<Long>();\n //auxlis = makeListOfDatesLong((requestedHolidays));\n //mDatabaseReferenceWorkers.child(mUserID).child(\"holidays\").setValue(auxlis);\n //mDatabaseReferenceWorkers.child(mUserID).child(\"requestedHolidays\").removeValue();\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n okButton.setText(ADMIN_BUTTON_ACCEPT_HOLIDAYS);\n }\n });\n AlertDialog dialog = builder.create();\n\n dialog.show();\n }\n workingDays = ConvertHashToList(longList);\n holidays = ConvertHashToList(longListHolidays);\n requestedHolidays = ConvertHashToList(longRequested);\n Log.i(\"***********\", \"DrawMonth called in attach...workers\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//here i should have the daya from the database\n }\n }\n\n\n\n\n\n\n\n if (3==4) {//condition to show the alert dialog for when holidays have been requested\n\n // 1. Instantiate an AlertDialog.Builder with its constructor\n AlertDialog.Builder builder = new AlertDialog.Builder(CalendarActivity.this);\n // 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(R.string.dialog_message).setTitle(R.string.dialog_title);\n\n // 3. Get the AlertDialog from create()\n //AlertDialog dialog = builder.create();\n // Add the buttons\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n List<Long> auxlis = new ArrayList<Long>();\n auxlis = makeListOfDatesLong((requestedHolidays));\n mDatabaseReferenceWorkers.child(mUserID).child(\"holidays\").setValue(auxlis);\n mDatabaseReferenceWorkers.child(mUserID).child(\"requestedHolidays\").removeValue();\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n// Set other dialog properties\n//...\n\n// Create the AlertDialog\n AlertDialog dialog = builder.create();\n\n dialog.show();\n }\n //drawMonth(workingDays,holidays, requestedHolidays);//here i should have the daya from the database\n }", "public void OnClickCalendar() {\n binding.timelinetext.setBackground(getResources().getDrawable(R.drawable.dashboardlinebg));\n binding.timelinetext.setTextColor(Color.parseColor(\"#000000\"));\n binding.calendartext.setBackground(getResources().getDrawable(R.drawable.timelinetab_bg));\n binding.calendartext.setTextColor(Color.parseColor(\"#ffffff\"));\n binding.weektext.setBackground(getResources().getDrawable(R.drawable.dashboardlinebg));\n binding.weektext.setTextColor(Color.parseColor(\"#000000\"));\n binding.daytext.setBackground(getResources().getDrawable(R.drawable.dashboardlinebg));\n binding.daytext.setTextColor(Color.parseColor(\"#000000\"));\n\n binding.firstlastDate.setVisibility(View.INVISIBLE);\n binding.firstlastDatecal.setVisibility(View.VISIBLE);\n binding.firstlastDateDay.setVisibility(View.INVISIBLE);\n\n CalendarFragment fgm = new CalendarFragment();\n// if (IsSearchable) {\n// Bundle bundle = new Bundle();\n// bundle.putString(\"regionfilter\", regionList.get(binding.regionspinner.getSelectedItemPosition()).id);\n// bundle.putString(\"jobfilter\", binding.etJobticketno.getText().toString().split(\"-\")[0]);\n// fgm.setArguments(bundle);\n// }\n Bundle bundle = new Bundle();\n bundle.putString(\"calDate\", binding.firstlastDatecal.getText().toString());\n fgm.setArguments(bundle);\n replaceFragmentWithoutBack(fgm);\n }", "public void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\t// Set up the application's user interface (content view)\n\t\tsetContentView(R.layout.main);\n\n\t\t// Make a new calendar\n\t\ttry {\n\t\t\tmakeLocalCalendar();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// determine the existing calendar in use\n\t\t// long calID = getExistingCalendarId();\n\t\t\n\t\t// create a local calendar\n\t\tlong calID = getLocalCalendarId();\n\n\t\tCalendar beginTime = Calendar.getInstance();\n\t\tbeginTime.set(2014, 10, 18, 0, 0); // start on 18th Oct 2014\n\t\tlong startMillis = beginTime.getTimeInMillis();\n\t\tCalendar endTime = Calendar.getInstance();\n\t\tendTime.set(2015, 10, 18, 0, 0); // end in a year\n\t\tlong endMillis = endTime.getTimeInMillis();\n\n\t\tlong eventID = insertRecurringEvent(calID, startMillis, endMillis);\n\n\t\tArrayList<String> recurringEvents = getRecurringEvents(eventID,\n\t\t\t\tstartMillis, endMillis);\n\n\t\tint length = recurringEvents.size();\n\n\t\t// now you can get recurring instances of this event from the event\n\t\t// table\n\t\t// ...\n\t\t\n\t\tsetTemporaryList();\n\n\t}", "public void createEvent(View view){\n showDatePickerDialog();\n }", "ConferenceScheduleBuilderService startLunch();", "public void onClick(DialogInterface dialog, int id) {\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n }", "public static HolidayCalendar[] calendarArray() {\n return new HolidayCalendar[] {TARGET };\n }", "public HolidayOffer(LocalDate startingLocalDate, Double price, Double deposit, String description, House offeredHouse, LocalDate finishLocalDate) {\n\t\tsuper(startingLocalDate, price, deposit, description, offeredHouse);\n\t\tthis.finishDate = finishLocalDate;\n\t}", "public void createCalender(LocalDate localDate) {\n this.datePicker = new DatePicker(localDate);\n datePicker.setShowWeekNumbers(false);\n datePicker.setDayCellFactory(new Callback<>() {\n @Override\n public DateCell call(DatePicker param) {\n return new DateCell() {\n @Override\n public void updateItem(LocalDate item, boolean empty) {\n super.updateItem(item, empty);\n if (empty || item == null) {\n setText(null);\n setGraphic(null);\n\n } else {\n\n StackPane dayCellPane = new StackPane();\n Circle circle = new Circle(15);\n\n Label label = new Label();\n label.setText(getText());\n label.setTextFill(Color.WHITE);\n label.setLabelFor(circle);\n label.setStyle(\"-fx-font-weight: bold; -fx-border-color: transparent\");\n label.setFont(Font.font(\"Helvetica\", 15));\n\n if (markedDates.containsKey(item)) {\n switch (markedDates.get(item)) {\n case 3:\n label.setStyle(\"-fx-font-weight: bold; -fx-text-fill: black\");\n circle.setFill(Color.web(\"#FF0000\"));\n break;\n\n case 2:\n label.setStyle(\"-fx-font-weight: bold; -fx-text-fill: black\");\n circle.setFill(Color.web(\"#FF9A00\"));\n break;\n\n case 1:\n label.setStyle(\"-fx-font-weight: bold; -fx-text-fill: black\");\n circle.setFill(Color.web(\"#FFE600\"));\n break;\n\n default:\n circle.setFill(Color.GREEN);\n }\n } else {\n circle.setFill(Color.TRANSPARENT);\n }\n if (item.getDayOfWeek().getValue() == 7 || item.getDayOfWeek().getValue() == 6) {\n label.setTextFill(Color.web(\"#29F6E8\"));\n }\n dayCellPane.getChildren().addAll(circle, label);\n dayCellPane.setPrefSize(50, 50);\n setGraphic(dayCellPane);\n setText(\"\");\n }\n }\n };\n }\n });\n DatePickerSkin datepopup = new DatePickerSkin(datePicker);\n Node out = datepopup.getPopupContent();\n for (Node node : out.lookupAll(\".day-name-cell\")) {\n if (node.toString().contains(\"Sun\") || node.toString().contains(\"Sat\")) {\n node.setStyle(\"-fx-text-fill: #29F6E8\");\n }\n }\n for (Node node : out.lookupAll(\".button\")) {\n node.setFocusTraversable(false);\n }\n for (Node node : out.lookupAll(\".day-cell\")) {\n node.setOnMouseClicked(event -> {\n try {\n DateCell dateCell = (DateCell) node;\n dateClicked = true;\n executeCommand(\"taskcal \" + dateCell.getItem().format(format));\n dateClicked = false;\n } catch (CommandException | ParseException e) {\n logger.info(\"Invalid date\");\n }\n });\n }\n this.calendarPanel.getChildren().addAll(out);\n }", "public void writeCalendar(int idHospital) throws IOException {\r\n\t\tArrayList<String> calendarData = new ArrayList<String>();\r\n\t\tcalendarData.add(Integer.toString(calendar.getCalendarYear()));\r\n\t\tcalendarData.add(Integer.toString(calendar.getNumberOfVacations()));\t\r\n\t\tif(!calendar.isEmpty()) {\r\n\t\t\tArrayList<GregorianCalendar> vacations = calendar.getALLVacations();\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"ddMM\");\r\n\t\t\tfor (GregorianCalendar date : vacations) {\r\n\t\t\t\tcalendarData.add(sdf.format(date.getTime()));\r\n\t\t\t\tcalendarData.addAll(getVacationDay(date));\r\n\t\t\t}\r\n\t\t}\r\n\t\t// llamada a datos\r\n\t\tctrlDatosFichero.saveDataCale(calendarData, idHospital);\r\n\t}", "@PUT\n @Path(\"{id}\")\n @RolesAllowed({\"administrator\", \"user\", \"visitor\"})\n Response createOrUpdateCalendar(@PathParam(\"id\") Long id, Calendar calendar);", "@Override\n\tpublic CalendarEdit addCalendar(String ref) throws IdUsedException,\n\t\t\tIdInvalidException, PermissionException {\n\t\treturn null;\n\t}", "public DefaultScheduleEvent getEventosCalendario(DateTime data, Servico servico) throws NullPointerException {\n\t\tList<ServicoJanelaAtendimento> servicoJanelaAtendimentos = new ArrayList<>();\n\t\tList<SolicitacaoServico> solicitacaoServicos = new ArrayList<>();\n\t\t\n\t\t\n\t\t\n\t\tgetServicoJanelaAtendimentoDAO().beginTransaction();\n\t\tservicoJanelaAtendimentos = getServicoJanelaAtendimentoDAO().getServicoJanelaPorDataJanela(data.toDate(), servico);\n\t\tgetServicoJanelaAtendimentoDAO().closeTransaction();\n\t\t\n\t\tDefaultScheduleEvent defaultScheduleEvent= new DefaultScheduleEvent();\n\t\tdefaultScheduleEvent.setAllDay(true);\n\t\tdefaultScheduleEvent.setData(data.toDate());\n\t\tdefaultScheduleEvent.setStartDate(data.toDate());\n\t\tdefaultScheduleEvent.setEndDate(data.plusHours(20).toDate());\n\t\t\n\t\t\n\t\tif(!servicoJanelaAtendimentos.isEmpty()) {\n\t\t\t\n\t\t\t\n\t\t\tgetSolicitacaoServicoDAO().beginTransaction();\n\t\t\tsolicitacaoServicos = getSolicitacaoServicoDAO().getSolicitacoesPorDataeServico(data.toDate(), servico);\n\t\t\tgetSolicitacaoServicoDAO().closeTransaction();\n\t\t\t\n\t\t\tint janelaServico = 0;\n\t\t\tint janelaSolicitacao = 0;\n\t\t\t\tfor(ServicoJanelaAtendimento servicoJanelaAtendimento: servicoJanelaAtendimentos) {\n\t\t\t\t\tjanelaServico = janelaServico + servicoJanelaAtendimento.getCapacidadePeriodo();\n\t\t\t\t}\n\t\t\t\tjanelaSolicitacao = solicitacaoServicos.size();\n\t\t\tint disponivel = janelaServico-janelaSolicitacao;\n\t\t\tif(disponivel > 0) {\n\t\t\t\tdefaultScheduleEvent.setTitle(\"Disponível\");\n\t\t\t\tdefaultScheduleEvent.setStyleClass(\"green\");\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\tdefaultScheduleEvent.setTitle(\"Encaixe\");\n\t\t\t\tdefaultScheduleEvent.setStyleClass(\"red\");\n\t\t\t\t\n\t\t\t}\n\t\t}else {\n\t\tdefaultScheduleEvent.setTitle(\"Não Disponível\");\n\t\tdefaultScheduleEvent.setStyleClass(\"no-color\");\n\t\t}\n\t\t\n\t\treturn defaultScheduleEvent;\n\t}", "@WebMethod public Event createEvent(Date date, Team a, Team b) throws EventAlreadyExist;", "void getAllHolidayDays(AsyncCallback<List<HolidayDays>> callback);", "@Override\n\tpublic YFCDocument invoke(YFCDocument inXml) {\n\t\tYFCElement calInEle = inXml.getDocumentElement();\n\t\tList<String> exceptionList = new ArrayList<>();\n\t\tYFCIterable<YFCElement> eleCalendar = calInEle.getChildren(XMLLiterals.CALENDAR);\n\t\tString organizationCode = \"\";\n\t\tfor(YFCElement eleCal : eleCalendar) {\n\t\t\tif(XmlUtils.isVoid(organizationCode)) {\n\t\t\t\torganizationCode=eleCal.getAttribute(XMLLiterals.ORGANIZATION_CODE);\n\t\t\t\tString sEffectiveFromDate = dateFormatter(eleCal.getAttribute(XMLLiterals.EFFECTIVE_FROM_DATE));\n\t\t\t\tcreateCalendarInputDoc(organizationCode,sEffectiveFromDate);\n\t\t\t}\n\t\t\telse if(!organizationCode.equals(eleCal.getAttribute(XMLLiterals.ORGANIZATION_CODE))) {\n\t\t\t\tcreateCalendar(exceptionList);\n\t\t\t\tcreateResourcePool(organizationCode);\n\t\t\t\torganizationCode=eleCal.getAttribute(XMLLiterals.ORGANIZATION_CODE);\n\t\t\t\tString sEffectiveFromDate = dateFormatter(eleCal.getAttribute(XMLLiterals.EFFECTIVE_FROM_DATE));\n\t\t\t\tcreateCalendarInputDoc(organizationCode,sEffectiveFromDate);\n\t\t\t}\n\t\t\tString sSerSlotShiftStartTime = eleCal.getAttribute(XMLLiterals.SHIFT_START_TIME);\n\t\t\tString sSerSlotShiftEndTime = eleCal.getAttribute(XMLLiterals.SHIFT_END_TIME);\n\t \t\t\ttry {\n\t \t\t\t\tif(EXCEPTION_TIME.equals(sSerSlotShiftStartTime) && EXCEPTION_TIME.equals(sSerSlotShiftEndTime)) \n\t \t\t\t\t\texceptionList.add(dateFormatter(eleCal.getAttribute(XMLLiterals.EFFECTIVE_FROM_DATE)));\n\t \t\t\t\telse\n\t \t\t\t\t\tsetShiftValues(eleCal);\n\t \t\t\t}\n\t \t\t\tcatch (ParseException e) {\n\t \t\t\t\tthrow ExceptionUtil.getYFSException(ExceptionLiterals.ERRORCODE_INVALID_DATE, e);\n\t \t\t\t}\n\t\t}\n\t\tcreateCalendar(exceptionList);\n\t\tcreateResourcePool(organizationCode);\n\t\treturn docCreateCalenderInXml;\n\t}", "protected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_schedule);\n\n\t\tboolean x = getIntent().getExtras().getBoolean(\"BOOLEAN\");\n\t\tcalendarView = (CalendarView) findViewById(R.id.calendarView1);\n\t\tcalendarView.setDate(calendarView.getDate()+86400000);\n\t\tcalendarView.setMinDate(calendarView.getDate());\n\t\tcalendarView.setMaxDate(calendarView.getDate()+2592000000L);\n\t\t\n\t\tcurrentSelectedDate = new Date(calendarView.getDate());\n\t\tschedule = (LinearLayout) findViewById(R.id.scheduleLinearLayout);\n\t\tdoctor_username = getIntent().getExtras().getString(\"DOCTOR_USERNAME\");\n\t\tif (x) {\n\t\t\tdoctor_fullname = getIntent().getExtras().getString(\n\t\t\t\t\t\"DOCTOR_FULLNAME\");\n\t\t\tpatient_tc_no = getIntent().getExtras().getString(\"PATIENT_TCNO\");\n\t\t\tsector_name = getIntent().getExtras().getString(\"SECTOR_NAME\");\n\t\t\tappointment.setDoctor_username(doctor_username);\n\t\t\tappointment.setPatient_tc_no(patient_tc_no);\n\t\t\tappointment.setDate(new SimpleDateFormat(\"dd-MM-yyyy\")\n\t\t\t\t\t.format(currentSelectedDate));\n\t\t\tsetTitle(sector_name + \" - \" + doctor_fullname);\n\t\t\t\n\t\t\tcalendarView.setOnDateChangeListener(new OnDateChangeListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSelectedDayChange(CalendarView view, int year,\n\t\t\t\t\t\tint month, int dayOfMonth) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tif (dayOfMonth != currentSelectedDate.getDate()\n\t\t\t\t\t\t\t|| (dayOfMonth == currentSelectedDate.getDate() && month != currentSelectedDate\n\t\t\t\t\t\t\t\t\t.getMonth())) {\n\n\t\t\t\t\t\tcurrentSelectedDate = new Date(calendarView.getDate());\n\t\t\t\t\t\tappointment.setDate(new SimpleDateFormat(\"dd-MM-yyyy\")\n\t\t\t\t\t\t\t\t.format(currentSelectedDate));\n\t\t\t\t\t\tupdateSchedulePatient();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t\tupdateSchedulePatient();\n\t\t}else {\n\t\t\tsetTitle(\"Block Hours\");\n\t\t\tappointment.setDoctor_username(doctor_username);\n\t\t\tappointment.setPatient_tc_no(\"1\");\n\t\t\tappointment.setDate(new SimpleDateFormat(\"dd-MM-yyyy\")\n\t\t\t.format(currentSelectedDate));\n\t\t\tcalendarView.setOnDateChangeListener(new OnDateChangeListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSelectedDayChange(CalendarView view, int year,\n\t\t\t\t\t\tint month, int dayOfMonth) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tif (dayOfMonth != currentSelectedDate.getDate()\n\t\t\t\t\t\t\t|| (dayOfMonth == currentSelectedDate.getDate() && month != currentSelectedDate\n\t\t\t\t\t\t\t\t\t.getMonth())) {\n\n\t\t\t\t\t\tcurrentSelectedDate = new Date(calendarView.getDate());\n\t\t\t\t\t\tappointment.setDate(new SimpleDateFormat(\"dd-MM-yyyy\")\n\t\t\t\t\t\t\t\t.format(currentSelectedDate));\n\t\t\t\t\t\tupdateScheduleDoctor();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t\tupdateScheduleDoctor();\n\t\t}\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof NationalHoliday)) {\n return false;\n }\n NationalHoliday other = (NationalHoliday) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public Weekday() {\n }", "ConferenceScheduleBuilderService endLunch();", "@Override\n public void onClick(View v) {\n currentCalendar.add(Calendar.MONTH, 1);\n //drawMonth(workingDays);\n //drawMonth(workingDays, holidays);\n Log.i(\"***********\", \"DrawMonth called on nextmonth\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n }", "public void checkEndOfWeek() {\n }", "public boolean isEndDateParamIsHolidayDate(LocalDateTime endDateParam, Integer includeHoliday,\n\t\t\tList<ITSMTicketHolidayDate> ticketHolidays) {\n\t\t\tboolean isHoliday=false;\n\t\t\tfor(ITSMTicketHolidayDate ticketHoliday:ticketHolidays){\n\t\t\t\tDate holiday=Utils.removeTime(ticketHoliday.getHolidayDate());\n\t\t\t\tDate toDay=Utils.removeTime(endDateParam.toDate());\n\t\t\t\tif(holiday.compareTo(toDay)==0){\n\t\t\t\t\tif(includeHoliday==0){\n\t\t\t\t\t\tisHoliday=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isHoliday)break;\n\t\t\t}\n\t\t\treturn isHoliday;\n\t}", "@Override\n protected Void doInBackground(Void... params) {\n try {\n createEventInCalendar();\n } catch (Exception e) {\n mLastError = e;\n cancel(true);\n return null;\n }\n return null;\n }", "ConferenceScheduleBuilderService endEvent();", "@Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n String key = dataSnapshot.getKey();\n Object data = dataSnapshot.getValue();\n\n\n Worker worker = dataSnapshot.getValue(Worker.class);\n String laestring = dataSnapshot.getKey();//i think this is the id\n if (worker != null) {\n if (laestring.equals(mUserID)) {\n //if (worker.getNumber_id().equals(mUserID)) {\n List<Long> longList = worker.getWorkInts();\n List<Long> longListHolidays = worker.getHolidays();\n List<Long> longRequested = worker.getRequestedHolidays();\n if (longRequested.size() != 0 && isAdmin) {\n AlertDialog.Builder builder = new AlertDialog.Builder(CalendarActivity.this);\n builder.setMessage(R.string.dialog_message).setTitle(R.string.dialog_title);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //List<Long> auxlis = new ArrayList<Long>();\n //auxlis = makeListOfDatesLong((requestedHolidays));\n //mDatabaseReferenceWorkers.child(mUserID).child(\"holidays\").setValue(auxlis);\n //mDatabaseReferenceWorkers.child(mUserID).child(\"requestedHolidays\").removeValue();\n Toast.makeText(getApplicationContext(), \"Holidays accepted\", Toast.LENGTH_SHORT).show();\n }\n });\n AlertDialog dialog = builder.create();\n\n dialog.show();\n }\n workingDays = ConvertHashToList(longList);\n holidays = ConvertHashToList(longListHolidays);\n requestedHolidays = ConvertHashToList(longRequested);\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//here i should have the daya from the database\n }\n }\n\n\n if (dataSnapshot.getKey().equals(\"workInts\")) {\n List<Long> longList = (List) dataSnapshot.getValue();\n //workingDays = ConvertHashToList(longList);//i should ADD not convert\n workingDays.addAll(ConvertHashToList(longList));\n }\n //drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n Toast.makeText(getApplicationContext(), \"onChildChanged in Calendar Activity\", Toast.LENGTH_LONG).show();\n Log.i(\"**********\", \"childChanged \" + dataSnapshot.toString());\n }", "@RequestMapping(value = \"/uploadHoliday\", method = RequestMethod.POST)\r\n\tpublic @ResponseBody\r\n\tvoid uploadHoliday(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\tfinal String fileUrl = \"/home/esh/Holiday.xls\";\r\n\r\n\t\tnew UploadHolidayService().insertDB(fileUrl);\r\n\t}", "public WeekPanel(CalendarEx calendar) {\n initComponents();\n cal = calendar;\n startEndDay(CalendarEx.getCurrentDay(), CalendarEx.getCurrentMonth(), CalendarEx.getCurrentYear());\n //startDay = new CalendarDate(CalendarEx.getCurrentDay(), CalendarEx.getCurrentMonth(), CalendarEx.getCurrentYear());\n //endDay = new CalendarDate(CalendarEx.getCurrentDay() + 6, CalendarEx.getCurrentMonth(), CalendarEx.getCurrentYear());\n \n ListAppointMents();\n WeekLabel.setText(startDay.toString() + \" - \" + endDay.toString());\n }", "public interface OnDatePickListener {\n public void OnDatePick(Calendar pickedDate);\n}", "@Test\n public void testAddEventConvinienceMethod() {\n // Start and end dates to query for\n java.util.Calendar cal = getInstance();\n Date start = cal.getTime();\n cal.add(MONTH, 1);\n Date end = cal.getTime();\n // Ensure no events\n Assert.assertEquals(0, calendar.getEvents(start, end).size());\n // Add an event\n BasicEvent event = new BasicEvent(\"Test\", \"Test\", start);\n calendar.addEvent(event);\n // Ensure event exists\n List<CalendarEvent> events = calendar.getEvents(start, end);\n Assert.assertEquals(1, events.size());\n Assert.assertEquals(events.get(0).getCaption(), event.getCaption());\n Assert.assertEquals(events.get(0).getDescription(), event.getDescription());\n Assert.assertEquals(getStart(), event.getStart());\n }", "public void enterConference();", "@Scheduled(fixedDelay = 86400000)\n\tpublic void contabilizarDiarias() {\n\t\t\n\t\t// Obtem apenas os hospedes que estao no hotel (Data de saida como null)\n\t\tList<Hospede> hospedes = hospedeRepository.obterHospedes();\n\t\t\n\t\tfor(Hospede hospede : hospedes) {\n\t\t\t\n\t\t\t// Verifica se houve alguma cobrança do hospede na data atual\n\t\t\tList<Diaria> diarias = diariaRepository.obterDiariasContabilizadas(LocalDate.now(), hospede.getId());\n\t\t\t\n\t\t\t// Se nao houve nenhuma cobrança ainda, sera contabilizado a cobrança da diaria do hospede\n\t\t\tif(diarias.isEmpty()) {\n\t\t\t\t\n\t\t\t\tCheckIn checkIn = checkInRepository.obterCheckIn(hospede.getId());\n\t\t\t\t\n\t\t\t\tLocalDateTime dataAtual = LocalDateTime.now();\n\t\t\t\t\n\t\t\t\tif(dataAtual.getDayOfWeek() == DayOfWeek.SATURDAY || dataAtual.getDayOfWeek() == DayOfWeek.SUNDAY) { // SABADO OU DOMINGO\n\t\t\t\t\t\n\t\t\t\t\tif(checkIn.getAdicionalVeiculo()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_FINAL_SEMANA + Constantes.ADICIONAL_VEICULO_FINAL_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_FINAL_SEMANA + Constantes.ADICIONAL_VEICULO_FINAL_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_FINAL_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_FINAL_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse { // ALGUM DIA DA SEMANA\n\t\t\t\t\t\n\t\t\t\t\tif(checkIn.getAdicionalVeiculo()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_SEMANA + Constantes.ADICIONAL_VEICULO_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_SEMANA + Constantes.ADICIONAL_VEICULO_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\thospedeRepository.save(hospede);\n\t\t\t\t\n\t\t\t\tcheckInRepository.save(checkIn);\n\t\t\t\t\n\t\t\t\t// REGISTRA QUE O HOSPEDE JA FOI COBRADO NO DIA, EVITA DUPLICIDADE NAS COBRANÇAS\n\t\t\t\tdiariaRepository.save(new Diaria(LocalDate.now(), hospede.getId(), true));\n\t\t\t\t\n\t\t\t\tlog.info(\"DIARIA DO HOSPEDE ID = \" + hospede.getId() + \"FOI CONTABILIZADA!\");\n\t\t\t}\n\t\t}\n\t}", "private void loadDefaultCalendar() {\n ICalendarAgenda iCalendarAgenda = new ICalendarAgenda();\n borderPane.setCenter(iCalendarAgenda);\n\n // block events on calendar\n EventHandler<MouseEvent> handler = MouseEvent::consume;\n borderPane.getCenter().addEventFilter(MouseEvent.ANY, handler);\n setUpBorderPane(iCalendarAgenda);\n }", "private void createEvent() \n\t{\n\t\t// When the user clicks on the add button\n\t\tbtnAdd.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//Adding Info To Reservation.txt//\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//////////////////////////////////\n\t\t\t\t/**\n\t\t\t\t * First i surround the whole with with try.. catch block\n\t\t\t\t * First in the try block \n\t\t\t\t * i get the values of the check-in and check-out info\n\t\t\t\t * i save them in strings \n\t\t\t\t * then cast them in integers \n\t\t\t\t * and finally add it to Reservation.txt\n\t\t\t\t * then i close the file.\n\t\t\t\t */\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// When the user selects a specific hotel \n\t\tcbHotelsOptions.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * first i save selected hotel in a hotel object\n\t\t\t\t * then i get reservations for the selected hotel\n\t\t\t\t * then i make all the labels and text fields visible \n\t\t\t\t */\n\t\t\t\tHotel selectedHotel = (Hotel)cbHotelsOptions.getSelectedItem();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You selected the \" + selectedHotel.getHotelName());\n\t\t\t\tselectedHotel.getReservations();\n\t\t\t\tlblCheckIn.setVisible(true);\n\t\t\t\tlblInMonth.setVisible(true);\n\t\t\t\ttxtInMonth.setVisible(true);\n\t\t\t\tlblInDay.setVisible(true);\n\t\t\t\ttxtInDay.setVisible(true);\n\t\t\t\tlblCheckout.setVisible(true);\n\t\t\t\tlblOutMonth.setVisible(true);\n\t\t\t\ttxtOutMonth.setVisible(true);\n\t\t\t\tlblOutDay.setVisible(true);\n\t\t\t\ttxtOutDay.setVisible(true);\n\t\t\t\tbtnAdd.setVisible(true);\n\t\t\t\treservationsModel.removeAllElements();\n\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t//Reading Info From Reservation.txt//\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/**\n\t\t\t\t * First i surround everything is a try.. catch blocks \n\t\t\t\t * then in the try block i declare the file input stream\n\t\t\t\t * then a scanner \n\t\t\t\t * then in a while loop i check if the file has next line \n\t\t\t\t * and a user a delimiter \"-\"\n\t\t\t\t * and it adds it to a new reservation\n\t\t\t\t * then it adds it to the ArrayList reservation\n\t\t\t\t * and it also adds it to the hotel object\n\t\t\t\t * then it checks if it can book that hotel\n\t\t\t\t * and if yes it adds it to the ReservationsModel\n\t\t\t\t */\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tFileInputStream fis = new FileInputStream(\"Reservation.txt\");\n\t\t\t\t\tScanner fscan = new Scanner (fis);\n\t\t\t\t\tint INMonth = 0;\n\t\t\t\t\tint INday = 0;\n\t\t\t\t\tint OUTmonth = 0;\n\t\t\t\t\tint OUTday = 0;\n\t\t\t\t\tlong iD = 0;\n\t\t\t\t\twhile (fscan.hasNextLine())\n\t\t\t\t\t{\n\t\t\t\t\t\tScanner ls = new Scanner (fscan.nextLine());\n\t\t\t\t\t\tls.useDelimiter(\"-\");\n\t\t\t\t\t\tiD = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tINMonth = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tINday = Integer.parseInt(ls.next().trim()); \n\t\t\t\t\t\tOUTmonth = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tOUTday = Integer.parseInt(ls.next().trim()); \n\t\t\t\t\t\tr = new Reservation (iD,INMonth, INday, OUTmonth, OUTday);\n\t\t\t\t\t\th.addReservation(new Reservation(iD,INMonth, INday, OUTmonth, OUTday));\n\t\t\t\t\t\tHotel hotel = (Hotel) cbHotelsOptions.getSelectedItem();\n\t\t\t\t\t\tlong hotID = hotel.getUniqueId();\n\t\t\t\t\t\tif(iD == hotID)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservationsModel.addElement((new Reservation(iD, INMonth, INday, OUTday)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * The catch block checks to make sure that the file is found\n\t\t\t\t */\n\t\t\t\tcatch( FileNotFoundException fnfe)\n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found!\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * This is the setRenderer to make the hotel appear in the hotelsOptions \n\t\t * just the hotel name.\n\t\t */\n\t\tcbHotelsOptions.setRenderer(new DefaultListCellRenderer() {\n\t\t\t@Override\n\t\t\tpublic Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)\n\t\t\t{\n\t\t\t\tComponent renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\t\t\t\tif (renderer instanceof JLabel && value instanceof Hotel)\n\t\t\t\t{\n\t\t\t\t\t// Here value will be of the Type 'Hotel'\n\t\t\t\t\t((JLabel) renderer).setText(((Hotel) value).getHotelName());\n\t\t\t\t}\n\t\t\t\treturn renderer;\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * The setCallRenderer is for the reservation's list\n\t\t * it only prints the check-in and check-out info\n\t\t */\n\t\tlstReservation.setCellRenderer(new DefaultListCellRenderer() {\n\t\t\t@Override\n\t\t\tpublic Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)\n\t\t\t{\n\t\t\t\tComponent renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\t\t\t\tif (renderer instanceof JLabel && value instanceof Reservation)\n\t\t\t\t{\n\t\t\t\t\t// Here value will be of the Type 'Reservation'\n\t\t\t\t\tHotel selectedHotel = (Hotel) cbHotelsOptions.getSelectedItem();\n\t\t\t\t\t((JLabel) renderer).setText(((Reservation) value).getFormattedDisplayString());\n\t\t\t\t}\n\t\t\t\treturn renderer;\n\t\t\t}\n\t\t});\t\n\t}", "public HolidayHolder(@NonNull View itemView) {\n super(itemView);\n ButterKnife.bind(this,itemView);\n }", "public Calendar() {\n }", "boolean hasDay();", "boolean hasDay();", "public boolean canUpdateCalendarDayOff(CalendarDayOff calendarDayOff) {\nreturn true;\n}", "private boolean makeCalendarByDays() {\n if (calendar != null) {\n for (Date date:calendar.keySet()) {\n Date startDay;\n if (date.getTime() > date.getTime() - 3600000 * 2 - date.getTime() % 86400000)\n startDay = new Date(date.getTime() + 3600000 * 22 - date.getTime() % 86400000);\n else startDay = new Date(date.getTime() - 3600000 * 2 - date.getTime() % 86400000);\n calendarByDays.put(startDay, calendar.get(date));\n }\n return true;\n }\n return false;\n }", "public void registaFogo(Calendar data, List<Par<Integer,Integer>> sitios) {\n\t\tthis.dataUltimoFogo = data;\n\t\tpreenchePosicoes(sitios, EstadoAmbiente.ARDIDO);\n\t}", "public void calculateVacationDays(){\n }" ]
[ "0.6993872", "0.66113144", "0.63291", "0.6307134", "0.6249726", "0.61691153", "0.6160387", "0.6150895", "0.5968279", "0.58965844", "0.5839623", "0.57706434", "0.56357026", "0.560518", "0.5585776", "0.5550627", "0.55256647", "0.54530823", "0.53104573", "0.52937293", "0.52793634", "0.52688223", "0.5267081", "0.52380884", "0.52081174", "0.5163788", "0.5150385", "0.51148444", "0.5087222", "0.506868", "0.5065749", "0.5059151", "0.50468695", "0.5040696", "0.5012002", "0.50012267", "0.4955965", "0.49511147", "0.49054664", "0.49050805", "0.48986453", "0.48983112", "0.48953813", "0.48934105", "0.4888253", "0.4877032", "0.4871447", "0.48488545", "0.48429322", "0.4835143", "0.48325568", "0.4810455", "0.4809598", "0.48090115", "0.47963068", "0.47915268", "0.4781044", "0.47789901", "0.4768857", "0.47662354", "0.4737523", "0.4731441", "0.47307035", "0.47188345", "0.47119176", "0.46925062", "0.46770364", "0.46605772", "0.46576223", "0.46561372", "0.46552274", "0.46467513", "0.46446624", "0.46371436", "0.46298128", "0.46223798", "0.46189043", "0.46107137", "0.46024042", "0.45955893", "0.45945397", "0.4581169", "0.4570026", "0.45597637", "0.45550597", "0.4549336", "0.4545723", "0.4532231", "0.452942", "0.45289803", "0.4525469", "0.4524128", "0.4511799", "0.45084262", "0.45066145", "0.45066145", "0.45009717", "0.44993874", "0.44941115", "0.44905227" ]
0.7840693
0
Unregister a given holiday calendar
KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "KitCalculatorsFactory<E> unregisterAllHolidayCalendars();", "@Override\n\tpublic void deleteHoliday(Holiday holiday) {\n\n\t}", "void delPreferedCalendar(String calendarId);", "KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);", "public void remove(DiaryCalendarEvent event){\n this.dates.remove(new CalendarDay(event.getYear(),event.getMonth(),event.getDay()));\n }", "private void removeFromCalendar() {\r\n CalendarUtil.deleteEntry(this, event);\r\n database.eventDao().update(event);\r\n updateSpeedDialActionItems();\r\n showToast(getString(R.string.event_calendar_remove_event_success), Toast.LENGTH_LONG);\r\n }", "void unsetRecurrenceTimeZoneCode();", "void unsetBusinesshours();", "void deleteHolidayDays(HolidayDays holidayDays, AsyncCallback<Void> callback);", "@DELETE\n @Path(\"{id}\")\n Response removeCalendarById(@PathParam(\"id\") Long id);", "void unsetFoundingDate();", "@Override\n public void onDismiss(final DialogInterface dialog){updateCalendar();}", "@Override\n\tpublic void cancelCalendar(CalendarEdit edit) {\n\t\t\n\t}", "@Override\n\tpublic void removeCalendar(CalendarEdit edit) throws PermissionException {\n\t\t\n\t}", "@Override\n\tpublic Holiday update(Holiday holiday) {\n\t\treturn null;\n\t}", "void unsetRegisteredOfficeCity();", "void unsetSchedule();", "public static void removeDate(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.util.Calendar value) {\r\n\t\tBase.remove(model, instanceResource, DATE, value);\r\n\t}", "public void unsetDay()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(DAY$0, 0);\n }\n }", "int unregisterAlarmDef(VCenterInfo vCenterInfo, List<String> morList);", "void unsetDate();", "public void removeDate(java.util.Calendar value) {\r\n\t\tBase.remove(this.model, this.getResource(), DATE, value);\r\n\t}", "public void setHoliday(final Holiday<GregorianCalendar> holiday) {\n if (holiday == null)\n throw new NullPointerException(\"Holiday not properly specified.\");\n this._holiday = holiday;\n }", "public abstract CalendarEvent removeEvent(User user, String id);", "public Holiday<GregorianCalendar> getHoliday() {\n return _holiday;\n }", "public void setHolidayEnumerator(HolidayEnumerator he) {\n _holidayEnumerator = he;\n }", "public void removeFromReminders(Date reminders);", "public void deleteCalendar() throws Exception {\n\n try {\n CalendarFeed calendars = service.getFeed(mainCalendarFeedUrl, CalendarFeed.class);\n\n // Loop through each calendar\n for (int i = 0; i < calendars.getEntries().size(); i++) {\n CalendarEntry calendar = calendars.getEntries().get(i);\n\n // If this is the Lotus Notes calendar, delete it\n if (calendar.getTitle().getPlainText().equals(destinationCalendarName)) {\n calendar.delete();\n }\n }\n } catch (Exception ex) {\n throw ex;\n }\n }", "public boolean canDeleteCalendarDayOff(CalendarDayOff calendarDayOff) {\nreturn true;\n}", "void unsetUserTimeZoneCode();", "public void onClick(DialogInterface dialog, int id) {\n deleteHoliday(hObj);\n\n }", "void updateHolidayDays(HolidayDays holidayDays, AsyncCallback<Void> callback);", "ConferenceScheduleBuilderService endEvent();", "@Override\n protected void populateHolidays() {\n holidays.put(beginDate(), new Holiday(\"Christmas\", beginDate(), calendar, \"Matthew 1:18-25, Luke 2:1-20\"));\n Calendar holyInnocents = new GregorianCalendar(calendar.getYear() - 1, Calendar.DECEMBER, 28);\n holidays.put(holyInnocents, new Holiday(\"Holy Innocents\", holyInnocents, calendar, \"Matthew 2:13-23\"));\n Calendar epiphany = new GregorianCalendar(calendar.getYear(), Calendar.JANUARY, 6);\n holidays.put(epiphany, new Holiday(\"Epiphany\", epiphany, calendar, \"Matthew 2:1-12\"));\n Calendar presentation = new GregorianCalendar(calendar.getYear(), Calendar.FEBRUARY, 2);\n holidays.put(presentation, new Holiday(\"Presentation\", presentation, calendar, \"Luke 2:21-25\"));\n Calendar annunciation = new GregorianCalendar(calendar.getYear(), Calendar.MARCH, 25);\n if (endDate().compareTo(annunciation) < 0) holidays.put(annunciation, new Holiday(\"Annunciation\", annunciation, calendar, \"Luke 1:26-38\"));\n\n Calendar ashWednesday = (Calendar)holyWeek.beginDate().clone();\n ashWednesday.add(Calendar.DATE, -39);\n holidays.put(ashWednesday, new Holiday(\"Ash Wednesday\", ashWednesday, calendar,\n \"Matthew 3:13-4:11\", \"Mark 1:9-13\", \"Luke 3:21,22, 4:1-13\"));\n\n }", "public void removeClockFromStock(Clock removedClock);", "public void removefromAbsentDays(Student student) throws SQLException{\n studentDAO.removefromAbsentDays(student);\n }", "public interface HolidayService {\n\t\n\tvoid load();\n\t\n\tDate getNextWorkingDay(Message message);\n\t\n}", "void addHoliday(int y, int m, int d) {\n\t\tif (y < 1900)\n\t\t\ty += 1900;\n\t\tCalendar aHoliday = (new GregorianCalendar(y, m, d, 0, 0, 0));\n\n\t\tHoliday.add(aHoliday);\n\t}", "public void checkCanDeleteCalendarDayOff(CalendarDayOff calendarDayOff) {\nif (!canDeleteCalendarDayOff(calendarDayOff)) {\nthrow new InvalidStateException(\"CalendarDayOff.delete.invalidState\");\n}\n}", "@Override\n\tpublic List<Holiday> viewMonthHoliday(LocalDate date) {\n\t\treturn null;\n\t}", "public abstract void unregister();", "public void disconnectFromCohort(boolean unregister)\n {\n if (cohortRegistry != null)\n {\n cohortRegistry.disconnectFromCohort(unregister);\n }\n }", "int removeHabitEvent(HabitEvent habitEvent);", "ConferenceScheduleBuilderService endLunch();", "public void removeFromReminders(List<Date> reminders);", "public void unregisterNotify( Notify notify );", "void unsetAppliesPeriod();", "@CallSuper\n public void unregisterOrganizer() {\n try {\n getController().unregisterOrganizer(mInterface);\n } catch (RemoteException e) {\n throw e.rethrowFromSystemServer();\n }\n }", "public void deregister(SvcInfo svcInfo);", "public final /* synthetic */ void unregisterListener(Api.AnyClient anyClient, TaskCompletionSource taskCompletionSource) throws RemoteException {\n ((zzeo) ((zzaw) anyClient).getService()).zza(new zzgs(this.zzfq.getDriveId(), 1), (zzes) this.zzfr.zzgh, (String) null, (zzeq) new zzhq(taskCompletionSource));\n }", "public void leaveConference();", "public void unsetDateClose()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(DATECLOSE$4, 0);\n }\n }", "public void addAppointmentComponentClosed(ScheduledAppointment appointment);", "public void removeAppointment(Appointment a)\n {\n this.agenda.remove(a);\n }", "private void deregisterBroadcastReceiver(){\n activity.unregisterReceiver(hceNotificationsReceiver);\n }", "public boolean deleteHoliday(String name) throws IOException {\r\n\t\tArrayList<Holiday> al = Holiday.readHoliday(MoblimaApp.holidayFile);\r\n\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\tHoliday holiday = (Holiday) al.get(i);\r\n\t\t\tif (name.compareTo(holiday.getHolidayName()) == 0) {\r\n\t\t\t\tString line = holiday.getHolidayName() + \"|\" + holiday.getDay() + \"|\" + holiday.getMonth();\r\n\t\t\t\tHoliday holiday2 = (Holiday) al.get(i + 1);\r\n\t\t\t\tString line2 = holiday2.getHolidayName() + \"|\" + holiday2.getDay() + \"|\" + holiday2.getMonth();\r\n\t\t\t\tholiday.removeLine(MoblimaApp.holidayFile, line);\r\n\t\t\t\tholiday2.removeLine(MoblimaApp.holidayFile, line2);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test\n public void testRemoveEventConvinienceMethod() {\n // Start and end dates to query for\n java.util.Calendar cal = getInstance();\n Date start = cal.getTime();\n cal.add(MONTH, 1);\n Date end = cal.getTime();\n // Ensure no events\n Assert.assertEquals(0, calendar.getEvents(start, end).size());\n // Add an event\n CalendarEvent event = new BasicEvent(\"Test\", \"Test\", start);\n calendar.addEvent(event);\n // Ensure event exists\n Assert.assertEquals(1, calendar.getEvents(start, end).size());\n // Remove event\n calendar.removeEvent(event);\n // Ensure no events\n Assert.assertEquals(0, calendar.getEvents(start, end).size());\n }", "void getHolidayDaysById(long id, AsyncCallback<HolidayDays> callback);", "@Override\n\tpublic List<Holiday> viewAllHolidays() {\n\t\treturn null;\n\t}", "public boolean canSaveCalendarDayOff(CalendarDayOff calendarDayOff,Calendar calendar) {\nreturn true;\n}", "public static int rmScheduledEvent()\n\t{\n\t\tString sql = \"DELETE FROM BSM_SCHEDULER_EVENT_REPORT\";\n\t\tDBUtil.executeSQL(sql);\n\t\t\n\t\t//Remove report event from table BSM_SCHEDULER_EVENT\n\t\tsql = String.format(\"DELETE FROM BSM_SCHEDULER_EVENT\");\n\t\tint ret = DBUtil.executeSQL(sql);\n\t\t\n\t\treturn ret;\n\t}", "@POST\n\t@Path(TimeKeepingDefines.DELETE_TIMEKEEPING_HOLIDAY_CONFIG + \"/{token}\")\n\t@Consumes(TimeKeepingDefines.APPLICATION_JSON)\n\tpublic ResultObject deleteHolidayConfigById(\n\t\t\t@CookieParam(\"sessionid\") String session,\n\t\t\t@PathParam(\"token\") String token, JSONArray hConfigJson) {\n\t\tResultObject result = new ResultObject(Status.FAILED);\n\t\tboolean flag;\n\n\t\tflag = TokenManager.getInstance().checkTokenSession(session, token);\n\t\tif (flag) {\n\t\t\tList<Long> listHolidayId = new ArrayList<>();\n\n\t\t\ttry {\n\t\t\t\tlistHolidayId = Utilites.getInstance()\n\t\t\t\t\t\t.convertJsonArrayToListLong(hConfigJson);\n\n\t\t\t\tint iResult = TimeKeepingHolidayConfigController.Instance\n\t\t\t\t\t\t.deleteHolidayConfigById(listHolidayId);\n\t\t\t\tif (iResult != ErrorCodeSworld.NOT_FOUND_OBJ)\n\t\t\t\t\tresult.setStatus(Status.SUCCESS);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public void DFRemoveAllMyServices() {\n try {\n DFService.deregister(this);\n } catch (FIPAException ex) {\n\n }\n }", "private void unregister() {\n Intent regIntent = new Intent(REQUEST_UNREGISTRATION_INTENT);\n regIntent.setPackage(GSF_PACKAGE);\n regIntent.putExtra(\n EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context, 0, new Intent(), 0));\n setUnregisteringInProcess(true);\n context.startService(regIntent);\n }", "public void removeDay(int day){ // verilen gundeki tum experimentlar silinir.\r\n Node last = head;\r\n if( last.data.day == day ){ // ilk gun serisinden istenirse direk next day e atla.\r\n head = last.nextDay;\r\n }\r\n else{\r\n while( last.next != null ){ // gunun basini bul\r\n if( last.next.data.day == day ){ // removeExp ile sil.\r\n removeExp(day, 0);\r\n }\r\n else\r\n last = last.next; // ilerle.\r\n }\r\n }\r\n }", "void unsetAppliesDateTime();", "void unRegister(NotificationListener<ObservableIntentServiceNotificationType> notificationStrategy);", "public void exitHospital()\n\t{\n\t\tworld.getHospital().dischargeIndividual();\n\t\tworld.dischargedIndividual();\n\t}", "@Test\r\n public void testifHoliday() {\r\n LocalDate date1 = LocalDate.parse(\"2018-01-12\");\r\n assertTrue(DateUtil.ifHoliday(date1));\r\n\r\n date1 = LocalDate.parse(\"2018-01-14\");\r\n assertFalse(DateUtil.ifHoliday(date1));\r\n }", "public void removeCurrentMonthLabel()\n {\n calendarPanel.remove(labelMonth);\n calendarPanel.validate();\n calendarPanel.repaint();\n }", "public boolean canUpdateCalendarDayOff(CalendarDayOff calendarDayOff) {\nreturn true;\n}", "public String removeEntry(String n, int d, int m, int y)\r\n\t{\r\n\t\tfor (Entry ent : tr)\r\n\t\t{\r\n\t\t\tif (n.equals(ent.getName()) && d == ent.getDay() && m == ent.getMonth() && y == ent.getYear())\r\n\t\t\t{\r\n\t\t\t\ttr.remove(ent);\r\n\t\t\t\treturn \"Entry removed.\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn \"Entry not found\";\r\n\t}", "void unsetBranchOfficeList();", "public void unregister(T o);", "private void eraseDateLabel()\n\t{\n\t\tdayDateLabel.setText(\"\");\n\t}", "@Override\n\tpublic void eventUnSelectEmployees(Long id) {\n\t\t\n\t}", "public void unregisterService(Registrant r) {\n namingService.unregisterService(r);\n }", "public void unregister() {\n unregistered = true;\n }", "public void unregister()\n\t{\n\t\tcancelPrevRegisterTask();\n\n\t\tpushRegistrar.unregisterPW(mContext);\n\t}", "public Holiday(int day, int month) {\n\t\tdate = LocalDate.of(2019,month,day);\n\t}", "void unbind(EventService service);", "boolean unregister(Counter counter);", "private void eliminateDay() {\r\n\tdayElimTimer.cancel();\r\n\tdayElimTimer.purge();\r\n\r\n\t// playerIDs.remove(playerOnTrialID);\r\n\tplayers.remove(playerOnTrialID);\r\n\r\n\tif (mafia.contains(playerOnTrialID)) {\r\n\t int index = mafia.indexOf(playerOnTrialID);\r\n\t mafia.remove(index);\r\n\r\n\t} else {\r\n\t int index = innocentIDs.indexOf(playerOnTrialID);\r\n\t innocentIDs.remove(index);\r\n\t}\r\n\r\n\tserver.setPlayerMuted(playerOnTrialID, true);\r\n\r\n\tserver.publicMessage(server.getUsername(playerOnTrialID) + \" has been eliminated\");\r\n\r\n\tplayerOnTrialID = null;\r\n\telimDay.clear();\r\n\tsave.clear();\r\n\telimDayVoteInProgress = false;\r\n\r\n\tcheckWin();\r\n }", "public void onPressRemoveFromCalendar() {\r\n new ActionConfirmationFragment(this, this)\r\n .setTitle(getString(R.string.event_confirmation_delete_event_calendar_entry))\r\n .setMessage(getString(R.string.action_confirmation_cannot_be_undone))\r\n .setRequestID(REQUEST_CONFIRMATION_DELETE_EVENT_CALENDAR_ENTRY)\r\n .show(getSupportFragmentManager(), null);\r\n }", "public void unregister(boolean userRequest)\n throws OperationFailedException\n {\n this.unregister();\n }", "boolean unregister(String name);", "void clearUnactivatedAccounts(int unactivatedDays);", "public void secondaryRemoveI13nDateSaving(com.hps.july.persistence.I13nDateSaving anI13nDateSaving) throws java.rmi.RemoteException;", "protected void deletePlannedCalendar(PlannedCalendar calendar) {\n deleteEpochs(calendar.getEpochs());\n }", "void unsetValuePeriod();", "public abstract void updateAfterMisfire(Calendar cal);", "public synchronized void unregisterCallback(CarHvacEventCallback callback) {\n mCallbacks.remove(callback);\n try {\n List<CarPropertyConfig> configs = getPropertyList();\n for (CarPropertyConfig c : configs) {\n // Register each individual propertyId\n mCarPropertyMgr.unregisterListener(mListenerToBase, c.getPropertyId());\n }\n } catch (Exception e) {\n Log.e(TAG, \"getPropertyList exception \", e);\n }\n if (mCallbacks.isEmpty()) {\n mCarPropertyMgr.unregisterListener(mListenerToBase);\n mListenerToBase = null;\n }\n }", "void unsetSearchRecurrenceRule();", "void unsetEvent();", "@Override\r\n\tpublic void cancelReservation(Reservation r) {\n\t\tentityManager.remove(entityManager.merge(r));\r\n\t\t\r\n\r\n\t}", "public void unregisterCallback(IInstrumentServiceCallback callback) {\n\t\t\tif (callback != null)\n\t\t\t\tm_callbacks.unregister(callback);\n\t\t}", "public void removeFromConference(Call call);", "@DELETE\n @Path(\"/{nom}/{date}\")\n public Response remove(@PathParam(\"nom\") String nom, @PathParam(\"date\") String date) {\n DataAccess dataAccess = DataAccess.begin();\n try {\n dataAccess.deleteEvent(nom, date);\n dataAccess.closeConnection(true);\n return Response.status(Response.Status.NO_CONTENT).build();\n } catch (Exception e) {\n dataAccess.closeConnection(false);\n return Response.status(Response.Status.NOT_FOUND).entity(\"Event not found\\n\").build();\n }\n }", "public void checkCanUpdateCalendarDayOff(CalendarDayOff calendarDayOff) {\nif (!canUpdateCalendarDayOff(calendarDayOff)) {\nthrow new InvalidStateException(\"CalendarDayOff.update.invalidState\");\n}\n}", "public void eliminaSugerencias(int mes, int anio, String idDepartamento) {\r\n\t\tif (!alive) return;\r\n\t\tint i = 0;\r\n\t\twhile (i<sugerencias.size()) {\r\n\t\t\tif (sugerencias.get(i).getDept().equals(idDepartamento) && sugerencias.get(i).getFecha().getMonth()==mes && sugerencias.get(i).getFecha().getYear()==anio) {\r\n\t\t\t\tsugerencias.remove(i);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\ti++;\r\n\t\t}\r\n\t}" ]
[ "0.77253705", "0.68713987", "0.6287621", "0.59661406", "0.59639895", "0.5955493", "0.59365743", "0.58740497", "0.58695924", "0.57958597", "0.57233006", "0.57106113", "0.57070386", "0.5667966", "0.5612377", "0.5584838", "0.55652773", "0.550108", "0.5451068", "0.54390156", "0.5413775", "0.5385599", "0.5373884", "0.528007", "0.5276218", "0.5271636", "0.52697223", "0.5191783", "0.51430035", "0.5128619", "0.5099127", "0.5087685", "0.5059936", "0.5050427", "0.5048629", "0.5035", "0.502571", "0.50181925", "0.49768782", "0.49571142", "0.49473938", "0.49340782", "0.49313617", "0.49281836", "0.49233785", "0.4919023", "0.49072912", "0.4895176", "0.48818088", "0.48697552", "0.48692697", "0.48677972", "0.4858269", "0.485647", "0.48538774", "0.4851316", "0.4839272", "0.48311606", "0.4818717", "0.48138997", "0.48039067", "0.47885534", "0.47882882", "0.47866213", "0.4768244", "0.4766823", "0.4766226", "0.47482282", "0.4746951", "0.47453305", "0.47446755", "0.4740822", "0.47403774", "0.47394267", "0.47366193", "0.47365817", "0.47333574", "0.47167256", "0.47158378", "0.47110564", "0.47048047", "0.47035822", "0.4702453", "0.469915", "0.46879497", "0.4682429", "0.4679052", "0.4670018", "0.46695852", "0.46686503", "0.4666028", "0.46622086", "0.46578908", "0.4656161", "0.46372962", "0.46332955", "0.46329466", "0.4626823", "0.46243486", "0.4619356" ]
0.82058525
0
unregister all holiday calendars;
KitCalculatorsFactory<E> unregisterAllHolidayCalendars();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);", "@Override\n\tpublic List<Holiday> viewAllHolidays() {\n\t\treturn null;\n\t}", "void unsetFoundingDate();", "void unregisterAll();", "void unsetBusinesshours();", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (InterviewSchedule interviewSchedule : findAll()) {\n\t\t\tremove(interviewSchedule);\n\t\t}\n\t}", "void unsetRecurrenceTimeZoneCode();", "void unsetSchedule();", "public void DFRemoveAllMyServices() {\n try {\n DFService.deregister(this);\n } catch (FIPAException ex) {\n\n }\n }", "void delPreferedCalendar(String calendarId);", "@Override\n\tpublic void deleteHoliday(Holiday holiday) {\n\n\t}", "@Override\n protected void populateHolidays() {\n holidays.put(beginDate(), new Holiday(\"Christmas\", beginDate(), calendar, \"Matthew 1:18-25, Luke 2:1-20\"));\n Calendar holyInnocents = new GregorianCalendar(calendar.getYear() - 1, Calendar.DECEMBER, 28);\n holidays.put(holyInnocents, new Holiday(\"Holy Innocents\", holyInnocents, calendar, \"Matthew 2:13-23\"));\n Calendar epiphany = new GregorianCalendar(calendar.getYear(), Calendar.JANUARY, 6);\n holidays.put(epiphany, new Holiday(\"Epiphany\", epiphany, calendar, \"Matthew 2:1-12\"));\n Calendar presentation = new GregorianCalendar(calendar.getYear(), Calendar.FEBRUARY, 2);\n holidays.put(presentation, new Holiday(\"Presentation\", presentation, calendar, \"Luke 2:21-25\"));\n Calendar annunciation = new GregorianCalendar(calendar.getYear(), Calendar.MARCH, 25);\n if (endDate().compareTo(annunciation) < 0) holidays.put(annunciation, new Holiday(\"Annunciation\", annunciation, calendar, \"Luke 1:26-38\"));\n\n Calendar ashWednesday = (Calendar)holyWeek.beginDate().clone();\n ashWednesday.add(Calendar.DATE, -39);\n holidays.put(ashWednesday, new Holiday(\"Ash Wednesday\", ashWednesday, calendar,\n \"Matthew 3:13-4:11\", \"Mark 1:9-13\", \"Luke 3:21,22, 4:1-13\"));\n\n }", "public void removeAll() throws SystemException {\n\t\tfor (VCal vCal : findAll()) {\n\t\t\tremove(vCal);\n\t\t}\n\t}", "public void clear() {\r\n\t\tfor(int i = MIN_WEEKDAY; i <= MAX_WEEKDAY; i++)\r\n\t\t\tfor(int j = MIN_SEGMENT; j <= MAX_SEGMENT; j++) {\r\n\t\t\t\tschedule[i][j] = false;\r\n\t\t\t\tnotifyListeners(i, j);\r\n\t\t\t}\r\n\t}", "void unsetRegisteredOfficeCity();", "protected void unregisterContractEvents()\n {\n for(final Subscription subscription : subscriptions)\n {\n Async.run(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n subscription.unsubscribe();\n return null;\n }\n });\n }\n\n subscriptions.clear();\n }", "@Override\n\tpublic List getCalendars() {\n\t return null;\n\t}", "public void unsetDay()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(DAY$0, 0);\n }\n }", "@Override\n public void onDismiss(final DialogInterface dialog){updateCalendar();}", "@Override\n\tpublic void cancelCalendar(CalendarEdit edit) {\n\t\t\n\t}", "void cleanUpEventsAndPlaces();", "void unsetDate();", "void dispose() {\n for (int i = 0; i < days.size(); i++) {\n days.get(i).dispose();\n }\n days.clear();\n days = null;\n }", "@Override\n\tpublic List<Holiday> viewMonthHoliday(LocalDate date) {\n\t\treturn null;\n\t}", "void unsetAppliesPeriod();", "void unsetAppointmentsToIgnore();", "KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);", "private void removeFromCalendar() {\r\n CalendarUtil.deleteEntry(this, event);\r\n database.eventDao().update(event);\r\n updateSpeedDialActionItems();\r\n showToast(getString(R.string.event_calendar_remove_event_success), Toast.LENGTH_LONG);\r\n }", "public synchronized void unRegisterAll()\r\n {\r\n clearNameObjectMaps();\r\n }", "public void remove(DiaryCalendarEvent event){\n this.dates.remove(new CalendarDay(event.getYear(),event.getMonth(),event.getDay()));\n }", "public void removeAllDate() {\r\n\t\tBase.removeAll(this.model, this.getResource(), DATE);\r\n\t}", "private void cleanSweep(){\n // Corrects the reminder dates for those reminders which will be repeating.\n refreshAllRepeatReminderDates();\n\n // Starts removing expired reminders.\n Calendar timeRightNow = Calendar.getInstance();\n boolean cleanList;\n for (int outerCounter=0; outerCounter<reminderItems.size();outerCounter++) {\n cleanList=true;\n for (int counter = 0; counter < reminderItems.size(); counter++) {\n int year = reminderItems.get(counter).getReminderYear();\n int month = reminderItems.get(counter).getReminderMonth();\n int day = reminderItems.get(counter).getReminderDay();\n int hour = reminderItems.get(counter).getReminderHour();\n int minute = reminderItems.get(counter).getReminderMinute();\n int second = 0;\n\n Calendar timeOfDeletion = Calendar.getInstance();\n timeOfDeletion.set(year, month, day, hour, minute, second);\n\n if (timeOfDeletion.before(timeRightNow)) {\n deleteReminderItem(counter);\n cleanList=false;\n break;\n }\n }\n if(cleanList){\n break;\n }\n }\n\n // Refreshes the reminder date descriptions (correcting \"Today\" and \"Tomorrow\" depending on the date).\n refreshAllDateDescriptions();\n }", "public void clear() {\n this.dates = new HashSet<>();\n }", "void deleteHolidayDays(HolidayDays holidayDays, AsyncCallback<Void> callback);", "public referential.store.v2.WeekPattern.Builder clearSundayTimeRanges() {\n sundayTimeRanges = null;\n fieldSetFlags()[9] = false;\n return this;\n }", "int unregisterAlarmDef(VCenterInfo vCenterInfo, List<String> morList);", "public void unsetDateClose()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(DATECLOSE$4, 0);\n }\n }", "public void setHolidayEnumerator(HolidayEnumerator he) {\n _holidayEnumerator = he;\n }", "void unsetAppliesDateTime();", "@Override\n public void close() {\n for (Servlet registeredServlet : registeredServlets) {\n paxWeb.unregisterServlet(registeredServlet);\n }\n for (Filter filter : registeredFilters) {\n paxWeb.unregisterFilter(filter);\n }\n for (EventListener eventListener : registeredEventListeners) {\n paxWeb.unregisterEventListener(eventListener);\n }\n for (String alias : registeredResources) {\n paxWeb.unregister(alias);\n }\n }", "void unsetBranchOfficeList();", "public synchronized void resetSchedules() {\n schedules = null;\n }", "public void unregisterAll()\n {\n final Set<javax.servlet.Servlet> servlets = new HashSet<>(this.localServlets);\n for (final javax.servlet.Servlet servlet : servlets)\n {\n unregisterServlet(servlet);\n }\n }", "public void deleteOldEvents(Calendar calendar) throws LogicLayerException\r\n\t{\r\n\t\tArrayList<Integer> toRemove = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor (Event event : this.getAllEvents())\r\n\t\t{\r\n\t\t\tif (0 > event.getCalendar().compareTo(calendar))\r\n\t\t\t\ttoRemove.add(this.getAllEvents().indexOf(event));\r\n\t\t}\r\n\t\t\r\n\t\tCollections.reverse(toRemove);\r\n\t\t\r\n\t\tfor (int index : toRemove)\r\n\t\t\tthis.deleteEvent(this.getAllEvents().get(index));\r\n\t}", "public Holiday<GregorianCalendar> getHoliday() {\n return _holiday;\n }", "public void clearAppointments(){\n appointments.clear();\n }", "public void clearEndUserExceptions();", "public Set<Calendar> getHolidays(String str){\r\n\t\tswitch(str) {\r\n\t\t\tcase \"EUR\": return holidaysEuro;\r\n\t\t\tcase \"USD\": return holidaysUsd;\r\n\t\t\tdefault: return new HashSet<>();\r\n\t\t}\r\n\t}", "private void eraseDateLabel()\n\t{\n\t\tdayDateLabel.setText(\"\");\n\t}", "public void clearDateALR() {\r\n\t\t//System.out.println(\"Clear= \" + counter);\r\n\t\twhile (historyDate.size() != counter) {\r\n\t\t\thistoryDate.removeLast();\r\n\t\t\thistoryAL.removeLast();\r\n\t\t}\r\n\t}", "public void removeFromReminders(Date reminders);", "void unsubscribeAll();", "void unsetSearchRecurrenceRule();", "public void UnPostAllEvents();", "void unsetUserTimeZoneCode();", "public void deleteOldAlarms(){\r\n\t\tfor(int i = 0; i < alarmList.size(); i++){\r\n\t\t\tAlarmTime current = alarmList.get(i);\r\n\t\t\tif(current.getYear() == cal.get(Calendar.YEAR) && current.getMonth() == cal.get(Calendar.MONTH)\r\n\t\t\t\t\t&& current.getDay() == cal.get(Calendar.DAY_OF_MONTH) && current.getHour() < cal.get(Calendar.HOUR_OF_DAY)){\r\n\t\t\t\t//delete alarm from XML\r\n\t\t\t\txmanager.delete(current.toString());\r\n\t\t\t}\r\n\t\t\telse if(current.getYear() == cal.get(Calendar.YEAR) && current.getMonth() == cal.get(Calendar.MONTH)\r\n\t\t\t\t\t&& current.getDay() < cal.get(Calendar.DAY_OF_MONTH)){\r\n\t\t\t\t//delete alarm from XML\r\n\t\t\t\txmanager.delete(current.toString());\r\n\t\t\t}\r\n\t\t\telse if(current.getYear() == cal.get(Calendar.YEAR) && current.getMonth() < cal.get(Calendar.MONTH)){\r\n\t\t\t\t//delete alarm from XML\r\n\t\t\t\txmanager.delete(current.toString());\r\n\t\t\t}\r\n\t\t\telse if(current.getYear() < cal.get(Calendar.YEAR)){\r\n\t\t\t\t//delete alarm from XML\r\n\t\t\t\txmanager.delete(current.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void unregisterListeners();", "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}", "public void deleteCalendar() throws Exception {\n\n try {\n CalendarFeed calendars = service.getFeed(mainCalendarFeedUrl, CalendarFeed.class);\n\n // Loop through each calendar\n for (int i = 0; i < calendars.getEntries().size(); i++) {\n CalendarEntry calendar = calendars.getEntries().get(i);\n\n // If this is the Lotus Notes calendar, delete it\n if (calendar.getTitle().getPlainText().equals(destinationCalendarName)) {\n calendar.delete();\n }\n }\n } catch (Exception ex) {\n throw ex;\n }\n }", "static public int resetAllCalsToDefault() {\r\n for (Calibration cal : registeredCals) {\r\n cal.reset();\r\n }\r\n return 0;\r\n }", "void clearEventsDetectors();", "@Override\n\tpublic Holiday update(Holiday holiday) {\n\t\treturn null;\n\t}", "static void destroyAll()\n {\n synchronized(allSchedulers)\n {\n // destroy all registered schedulers\n Iterator iter = allSchedulers.iterator();\n while (iter.hasNext())\n {\n Scheduler scheduler = (Scheduler) iter.next();\n \n // do not call cancel() since this method modifies allSchedulers\n scheduler.destroy();\n }\n \n if (logger.isInfoEnabled())\n {\n logger.info(allSchedulers.size() + \" scheduler instances destroyed\");\n }\n \n // be sure and clear set\n allSchedulers.clear();\n \n // and set flag that scheduler service ist stopped\n schedulerServiceRunning = false;\n }\n }", "public void unregisterAdapters(IAdapterFactory factory);", "void clearUnactivatedAccounts(int unactivatedDays);", "private void eliminateDay() {\r\n\tdayElimTimer.cancel();\r\n\tdayElimTimer.purge();\r\n\r\n\t// playerIDs.remove(playerOnTrialID);\r\n\tplayers.remove(playerOnTrialID);\r\n\r\n\tif (mafia.contains(playerOnTrialID)) {\r\n\t int index = mafia.indexOf(playerOnTrialID);\r\n\t mafia.remove(index);\r\n\r\n\t} else {\r\n\t int index = innocentIDs.indexOf(playerOnTrialID);\r\n\t innocentIDs.remove(index);\r\n\t}\r\n\r\n\tserver.setPlayerMuted(playerOnTrialID, true);\r\n\r\n\tserver.publicMessage(server.getUsername(playerOnTrialID) + \" has been eliminated\");\r\n\r\n\tplayerOnTrialID = null;\r\n\telimDay.clear();\r\n\tsave.clear();\r\n\telimDayVoteInProgress = false;\r\n\r\n\tcheckWin();\r\n }", "public abstract void unregisterListeners();", "public void removeFromReminders(List<Date> reminders);", "@Override\n\tprotected void deInitUIandEvent()\n\t{\n\t}", "public void removeAll() throws SystemException {\n\t\tfor (Estado estado : findAll()) {\n\t\t\tremove(estado);\n\t\t}\n\t}", "protected void clearOutEvents() {\n\t}", "protected void clearOutEvents() {\n\t}", "public abstract void unregister();", "public static void killAll() {\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\texistingAni.pause();\n\t\t\tpapplet().unregisterMethod(\"pre\", existingAni);\n\t\t\texistingAni = null;\n\t\t\ti.remove();\n\t\t}\t\n\t}", "void invalidateAll();", "public void teardown() {\n for (App app : applications) {\n app.icon.setCallback(null);\n }\n\t}", "public void unregister() {\n unregistered = true;\n }", "@Test\n public void testRemoveEventConvinienceMethod() {\n // Start and end dates to query for\n java.util.Calendar cal = getInstance();\n Date start = cal.getTime();\n cal.add(MONTH, 1);\n Date end = cal.getTime();\n // Ensure no events\n Assert.assertEquals(0, calendar.getEvents(start, end).size());\n // Add an event\n CalendarEvent event = new BasicEvent(\"Test\", \"Test\", start);\n calendar.addEvent(event);\n // Ensure event exists\n Assert.assertEquals(1, calendar.getEvents(start, end).size());\n // Remove event\n calendar.removeEvent(event);\n // Ensure no events\n Assert.assertEquals(0, calendar.getEvents(start, end).size());\n }", "public void suppressionRdV_all() {\n //on vide l'agenda de ses elements\n for (RdV elem_agenda : this.agd) {\n this.getAgenda().remove(elem_agenda);\n }\n //on reinitialise a null l'objet agenda\n //this.agd = null;\n }", "public static HolidayCalendar[] calendarArray() {\n return new HolidayCalendar[] {TARGET };\n }", "void addHoliday(int y, int m, int d) {\n\t\tif (y < 1900)\n\t\t\ty += 1900;\n\t\tCalendar aHoliday = (new GregorianCalendar(y, m, d, 0, 0, 0));\n\n\t\tHoliday.add(aHoliday);\n\t}", "@Override\n\tpublic void removeCalendar(CalendarEdit edit) throws PermissionException {\n\t\t\n\t}", "@DELETE\n @Path(\"{id}\")\n Response removeCalendarById(@PathParam(\"id\") Long id);", "protected void clearEvents() {\n\t\tsCInterface.clearEvents();\n\n\t}", "void unregister() {\n for (Component comp : jTabbedPane1.getComponents()) {\n if (comp instanceof MiniTimelinePanel) {\n DiscoveryEventUtils.getDiscoveryEventBus().unregister(comp);\n }\n }\n }", "private void deregisterBroadcastReceiver(){\n activity.unregisterReceiver(hceNotificationsReceiver);\n }", "public void unregisterListeners(){\n listeners.clear();\n }", "public void removeAll() throws SystemException {\n\t\tfor (CompanyAg companyAg : findAll()) {\n\t\t\tremove(companyAg);\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (EmployeeComplaint employeeComplaint : findAll()) {\n\t\t\tremove(employeeComplaint);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onPause() {\n\t\t\t\t try{\n\t\t\t\t getActivity().unregisterReceiver(dateSetReceiver);\n\t\t\t\t }catch (Exception a)\n\t\t\t\t {\n\t\t\t\t\t a.printStackTrace();\n\t\t\t\t }\n\t\t\t\tsuper.onPause();\n\t\t\t}", "public referential.store.v2.WeekPattern.Builder clearSaturdayTimeRanges() {\n saturdayTimeRanges = null;\n fieldSetFlags()[8] = false;\n return this;\n }", "@Override\n protected void onDestroy() {\n stopRepTask();\n LocalBroadcastManager.getInstance(this).unregisterReceiver(DayStartedMessageRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(DayEndedMessageRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(TermEndedMessageRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(SoundAlteredRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(SharesTransactionedRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(SpecificElementUpdate);\n super.onDestroy();\n }", "@Override\n public void removeCheckInDates() {\n\n List<String> theDatesToRemove = new ArrayList<>(checkInTimeList.getSelectedValuesList());\n DefaultListModel theModel = (DefaultListModel)checkInTimeList.getModel();\n \n //Remote the dates\n for( String aStr : theDatesToRemove )\n theModel.removeElement(aStr); \n \n }", "public void removeEvents(){\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n List<EventTrigger> eventTriggers = new ArrayList<EventTrigger>(eventGroup.getValue());\n for(EventTrigger trigger : eventTriggers){\n if(trigger.getServer()==this) { // do not send own events...\n ESRemoveEvent esre = new ESRemoveEvent(annotation, trigger.getTrigger());\n for(EventShare es : EventShare.getEventShareServers()){\n if(es!=this) {\n if (es.isShareOut()) {\n try {\n es.getEventBusServer().write(esre);\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }\n }\n HandlerRegistry.getHandlers().get(eventGroup.getKey()).remove(trigger);\n System.out.println(HandlerRegistry.getHandlers());\n }\n }\n }\n }", "void unsetSearchRecurrenceStart();", "public referential.store.v2.WeekPattern.Builder clearWednesdayTimeRanges() {\n wednesdayTimeRanges = null;\n fieldSetFlags()[5] = false;\n return this;\n }", "public void deleteAllEventsInCalendar() {\n \n //Variable that holds the name of the current calendar\n String calName = Model.getInstance().calendar_name;\n \n //Query that will delete all events that belong to the selected calendar\n String deleteAllEventsQuery = \"DELETE FROM EVENTS \"\n + \"WHERE EVENTS.CalendarName='\" + calName + \"'\";\n \n //Execute query that deletes all events associated to the selected calendar\n boolean eventsWereDeleted = databaseHandler.executeAction(deleteAllEventsQuery);\n \n //Check if events were successfully deleted and indicate the user if so\n if (eventsWereDeleted)\n {\n //Update the calendar. Show that events were actually deleted\n repaintView();\n \n //Show message indicating that the selected calendar was deleted\n Alert alertMessage = new Alert(Alert.AlertType.INFORMATION);\n alertMessage.setHeaderText(null);\n alertMessage.setContentText(\"All events were successfully deleted\");\n alertMessage.showAndWait();\n }\n else\n {\n //Show message indicating that the calendar could not be deleted\n Alert alertMessage = new Alert(Alert.AlertType.ERROR);\n alertMessage.setHeaderText(null);\n alertMessage.setContentText(\"Deleting Events Failed!\");\n alertMessage.showAndWait();\n }\n }", "public static void shutdown() {\n if(registry != null)\n StandardServiceRegistryBuilder.destroy(registry);\n }", "void cancelAllNotifications();", "void updateHolidayDays(HolidayDays holidayDays, AsyncCallback<Void> callback);" ]
[ "0.76278615", "0.6343745", "0.63304156", "0.61939824", "0.61922765", "0.6192196", "0.61302567", "0.59730643", "0.5933539", "0.5928789", "0.59286124", "0.5907396", "0.5845922", "0.5842207", "0.5829424", "0.58189785", "0.57560116", "0.57446307", "0.57310176", "0.565293", "0.56424195", "0.5637626", "0.5635559", "0.5601031", "0.5591512", "0.55840737", "0.555937", "0.55516493", "0.5544606", "0.55181265", "0.55068976", "0.5455142", "0.544971", "0.54326415", "0.54225683", "0.5378684", "0.535753", "0.5348445", "0.53243905", "0.5317252", "0.5315713", "0.5309573", "0.5289565", "0.52756214", "0.5260065", "0.52575076", "0.52557606", "0.5252497", "0.52509886", "0.52497745", "0.5244208", "0.52385473", "0.5228323", "0.5222934", "0.5218244", "0.52126366", "0.51984745", "0.5189834", "0.51866037", "0.5182015", "0.5174129", "0.51729125", "0.5157599", "0.51567054", "0.51499605", "0.51190716", "0.51117754", "0.51039624", "0.50979805", "0.50829613", "0.50819033", "0.50819033", "0.5080268", "0.5079415", "0.5076872", "0.50693846", "0.50685006", "0.504898", "0.50484717", "0.5047375", "0.50403243", "0.5039515", "0.50338465", "0.5030477", "0.50282604", "0.50248975", "0.50233483", "0.5018803", "0.5017231", "0.500017", "0.4997832", "0.4991953", "0.49892563", "0.4987833", "0.49877515", "0.49810314", "0.49766332", "0.49764732", "0.4975508", "0.49714804" ]
0.82597035
0
ObjectLab, world leaders in the design and development of bespoke applications for the securities financing markets. Create a new PeriodCountCalculator.
PeriodCountCalculator<E> getPeriodCountCalculator();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getHowManyInPeriod();", "int getPeriod();", "protected int getNumberOfPeriods()\n {\n return 2;\n }", "double getPeriod();", "public void setPeriod(int periodInYears) {\nnumberOfPayments = periodInYears * MONTHS;\n}", "@Override\n\tprotected int getActiveCount(long units) {\n\t\treturn units % period == 0 ? 1 : 0;\n\t}", "public PeriodFactoryImpl() {\n\t\tsuper();\n\t}", "public void period() {\n\t\tPeriod annually = Period.ofYears(1);\n\t\tPeriod quarterly = Period.ofMonths(3);\n\t\tPeriod everyThreeWeeks = Period.ofWeeks(3);\n\t\tPeriod everyOtherDay = Period.ofDays(2);\n\t\tPeriod everyYearAndAWeek = Period.of(1, 0, 7);\n\t\tLocalDate date = LocalDate.of(2014, Month.JANUARY, 20);\n\t\tdate = date.plus(annually);\n\t\tSystem.out.println(date);\n\t\tSystem.out.println(Period.of(0, 20, 47)); // P20M47D\n\t\tSystem.out.println(Period.of(2, 20, 47)); // P2Y20M47D\n\t}", "BigInteger getPeriod();", "public Aggregation getPeriodicCountAggregation(Date startDate, Date endDate) {\n\t\tAggregationOperation match = Aggregation.match(Criteria.where(\"in_time\").lt(endDate).gt(startDate));\n\t\tAggregation parkingAgg = Aggregation.newAggregation(match,\n\t\t\t\tAggregation.project().andExpression(\"vehicle_type\").as(\"type\"),\n\t\t\t\tAggregation.group(Aggregation.fields().and(\"type\")).count().as(\"count\"));\n\n\t\treturn parkingAgg;\n\t}", "int countByExample(FundsPackageRatioExample example);", "org.hl7.fhir.Period addNewAppliesPeriod();", "@Override\n\tpublic int periodAllcount() throws Exception {\n\t\treturn dao.periodAllcount();\n\t}", "public int periodCount() {\n\t\treturn message.getPeriodCount();\n\t}", "public int getPeriod()\r\n\t{\r\n\t\treturn period;\r\n\t}", "public int getPeriod() {\n return period;\n }", "public BasicCalculator() {\n // Initialization here.\n // this.count = 0;\n\n }", "int countByExample(AoD5e466WorkingDayExample example);", "public void initPeriodsSearch() {\n\n\t\t//init fundamentalFreq\n\t\tcalculatefundamentalFreq();\n\n\t\t//set the first search area\n\t\tfinal double confidenceLevel = 5 / 100.;\n\t\tnextPeriodSearchingAreaEnd = (int) Math.floor( hzToPeriod( fundamentalFreq ) * ( 1 + confidenceLevel ) );\n\t}", "public static void main(String[] args) {\n System.out.println(\"************\");\n System.out.println(\"Example01\");\n System.out.println(\"************\");\n System.out.println();\n System.out.print(\"100 days ago: \");\n System.out.println(LocalDate.now().plusDays(-100));\n System.out.print(\"Today: \");\n System.out.println(LocalDate.now());\n System.out.print(\"100 days later: \");\n System.out.println(LocalDate.now().plusDays(100));\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"************\");\n System.out.println(\"Example02\");\n System.out.println(\"************\");\n System.out.println();\n \n Period period = Period.between(LocalDate.now(), LocalDate.of(LocalDate.now().getYear(), 12, 25));\n System.out.print(period.getMonths());\n System.out.print(\" Months \");\n System.out.print(period.getDays());\n System.out.print(\" Days to Cristmas!\");\n }", "public PayrollPeriodInformation() {\n initComponents();\n }", "long countByExample(FinMonthlySnapModelExample example);", "Period mo20733e();", "org.hl7.fhir.Period getAppliesPeriod();", "int getTotalDepositCount();", "public void setPeriod(int period) {\n this.period = period;\n }", "public interface ScoresCounterService {\n\n /**\n * Counts points by following formula: A*(B — P)^C for track events (faster\n * time produces a better score). A, B and C are parameters that vary by\n * discipline, while P is the performance by the athlete, measured in\n * seconds (running), meters (throwing), or centimeters (jumping).\n * <p>\n * <b>Note:</b> for Running Events.\n *\n * @param performance performance by the athlete\n * @param constantA parameter that vary by discipline, stored in {@link Scores}\n * @param constantB parameter that vary by discipline, stored in {@link Scores}\n * @param constantC parameter that vary by discipline, stored in {@link Scores}\n * @return points, achieved for event\n */\n public int evaluateTrackEvent(double performance, double constantA, double constantB, double constantC);\n\n /**\n * Counts points by following formula: A*(P — B)^C for field events (greater\n * distance or height produces a better score). A, B and C are parameters\n * that vary by discipline, while P is the performance by the athlete,\n * measured in seconds (running), meters (throwing), or centimeters\n * (jumping).\n * <p>\n * <b>Note:</b> for Field Events.\n *\n * @param performance performance by the athlete\n * @param constantA parameter that vary by discipline, stored in {@link Scores}\n * @param constantB parameter that vary by discipline, stored in {@link Scores}\n * @param constantC parameter that vary by discipline, stored in {@link Scores}\n * @return points, achieved for event\n */\n public int evaluateFieldEvent(double performance, double constantA, double constantB, double constantC);\n}", "int countByExample(PaymentTradeExample example);", "long getSamplePeriod();", "int countByExample(InternalTradeEpa022016Example example);", "long countByExample(PineAlarmExample example);", "public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}", "@Test\n public void computeFactor_SummerTimeMonth() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-01-13 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-04-25 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-01-01 00:00:00\", \"2012-05-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.MONTH,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(4, factor, 0);\n }", "public void menuprecoperiodo(String username) {\n Scanner s=new Scanner(System.in);\n LogTransportadora t=b_dados.getTrasnportadoras().get(username);\n double count=0;\n try {\n ArrayList<Historico> hist = b_dados.buscaHistoricoTransportadora(t.getCodEmpresa());\n System.out.println(\"Indique o ano:\");\n int ano=s.nextInt();\n System.out.println(\"Indique o mês\");\n int mes=s.nextInt();\n System.out.println(\"Indique o dia\");\n int dia=s.nextInt();\n for(Historico h: hist){\n LocalDateTime date=h.getDate();\n if(date.getYear()==ano && date.getMonthValue()==mes && date.getDayOfMonth()==dia){\n count+=h.getKmspercorridos()*t.getPrecokm();\n }\n }\n System.out.println(\"O total fatorado nesse dia foi de \" + count +\"€\");\n }\n catch (TransportadoraNaoExisteException e){\n System.out.println(e.getMessage());\n }\n }", "@Test\n public void computeFactor_SummerTimeWeek() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-13 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-25 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-03-01 00:00:00\", \"2012-04-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.WEEK,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(2, factor, 0);\n }", "double getCalibrationPeriod();", "long countByExample(TCpyYearCheckExample example);", "public static int getPeriod(int i) {\n int count = 1;\n int mod = 10 % i;\n //If i is not divisible by 2 or 5, compute.\n //If i is divisible by 2 or 5, it's period is had in a smaller number\n if(i%2!=0 && i%5 !=0) {\n //While mod is not 1, multiply by 10 and mod with i, increment period.\n while(mod != 1) {\n mod = mod * 10;\n mod = mod % i;\n count++;\n }\n }\n return count;\n \n }", "org.hl7.fhir.Period addNewValuePeriod();", "public static void testPeriod() {\n LocalDate date1 = LocalDate.now();\n System.out.println(\"Current date: \" + date1);\n\n //add 1 month to the current date\n LocalDate date2 = date1.plus(1, ChronoUnit.MONTHS);\n System.out.println(\"Next month: \" + date2);\n\n Period period = Period.between(date2, date1);\n System.out.println(\"Period: \" + period);\n }", "int getFundsCount();", "int getFundsCount();", "public DayPeriod() {\n\t}", "@Override\n\tpublic int countByLibraryPeriod(long libraryId, String period)\n\t\tthrows SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_LIBRARYPERIOD;\n\n\t\tObject[] finderArgs = new Object[] { libraryId, period };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(3);\n\n\t\t\tquery.append(_SQL_COUNT_FACTNONPRINTEDMATERIAL_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_LIBRARYPERIOD_LIBRARYID_2);\n\n\t\t\tboolean bindPeriod = false;\n\n\t\t\tif (period == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_LIBRARYPERIOD_PERIOD_1);\n\t\t\t}\n\t\t\telse if (period.equals(StringPool.BLANK)) {\n\t\t\t\tquery.append(_FINDER_COLUMN_LIBRARYPERIOD_PERIOD_3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbindPeriod = true;\n\n\t\t\t\tquery.append(_FINDER_COLUMN_LIBRARYPERIOD_PERIOD_2);\n\t\t\t}\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(libraryId);\n\n\t\t\t\tif (bindPeriod) {\n\t\t\t\t\tqPos.add(period);\n\t\t\t\t}\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "void getCurrentPeriodo();", "long countByExample(WfCfgModuleCatalogExample example);", "public double getPeriod() {\n return period;\n }", "@Test\n public void computeFactor_WinterTimeMonth() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-09-03 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-11-08 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-09-01 00:00:00\", \"2012-12-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.MONTH,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(3, factor, 0);\n }", "@Override\n\tpublic long getTimePeriod() {\n\t\treturn 0;\n\t}", "int countByExample(ScheduleCriteria example);", "int countByExample(NeeqCompanyAccountingFirmOnlineExample example);", "public void setPeriod(Long Period) {\n this.Period = Period;\n }", "public static void main(String[] args) {\n LocalDate endofCentury = LocalDate.of(2014, 01, 01);\n LocalDate now = LocalDate.now();\n\n Period diff = Period.between(endofCentury, now);\n\n System.out.printf(\"Difference is %d years, %d months and %d days old\",\n diff.getYears(), diff.getMonths(), diff.getDays());\n\n\n //-----------------------------------------------------------------\n // java.time.temporal.ChronoUnit example to know the difference in days/months/years\n LocalDate dateOfBirth = LocalDate.of(1980, Month.JULY, 4);\n LocalDate currentDate = LocalDate.now();\n long diffInDays = ChronoUnit.DAYS.between(dateOfBirth, currentDate);\n long diffInMonths = ChronoUnit.MONTHS.between(dateOfBirth, currentDate);\n long diffInYears = ChronoUnit.YEARS.between(dateOfBirth, currentDate);\n\n\n LocalDateTime dateTime1 = LocalDateTime.of(1988, 7, 4, 0, 0);\n LocalDateTime dateTime2 = LocalDateTime.now();\n long diffInNano1 = ChronoUnit.NANOS.between(dateTime1, dateTime2);\n long diffInSeconds1 = ChronoUnit.SECONDS.between(dateTime1, dateTime2);\n long diffInMilli1 = ChronoUnit.MILLIS.between(dateTime1, dateTime2);\n long diffInMinutes1 = ChronoUnit.MINUTES.between(dateTime1, dateTime2);\n long diffInHours1 = ChronoUnit.HOURS.between(dateTime1, dateTime2);\n\n //-----------------------------------------------------------------\n // java.time.Duration example to know the difference in millis/seconds/minutes etc\n LocalDateTime dateTime3 = LocalDateTime.of(1988, 7, 4, 0, 0);\n LocalDateTime dateTime4 = LocalDateTime.now();\n int diffInNano2 = java.time.Duration.between(dateTime3, dateTime4).getNano();\n long diffInSeconds2 = java.time.Duration.between(dateTime3, dateTime4).getSeconds();\n long diffInMilli2 = java.time.Duration.between(dateTime3, dateTime4).toMillis();\n long diffInMinutes2 = java.time.Duration.between(dateTime3, dateTime4).toMinutes();\n long diffInHours2 = java.time.Duration.between(dateTime3, dateTime4).toHours();\n }", "int countByExample(PaymentTradeExampleExtended example);", "@Test\n public void computeFactor_TwoMonthsOfLeapYear() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-01 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-01 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-02-01 00:00:00\", \"2012-03-02 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.MONTH,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then factor is 1 months\n assertEquals(1, factor, 0);\n }", "public double getPer_day(){\n\t\tdouble amount=this.num_of_commits/365;\n\t\treturn amount;\n\t}", "private Count() {}", "private Count() {}", "public periodictable() {\n initComponents();\n }", "private Periodo getPeriodoCorte() {\n String valor = parametrosDao.obtenerTodosParametros().get(\"integrador.periodo.arranque\");\r\n\r\n return Periodo.parse(valor, \"yyyyMM\");\r\n }", "@Test\n public void computeFactor_SummerTimeDay() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-22 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-31 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-03-01 00:00:00\", \"2012-04-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.DAY,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(10, factor, 0);\n }", "public int freq()\n\t{\n\t\treturn _lsPeriod.get (0).freq();\n\t}", "int getActAmountCount();", "long countByExample(UvStatDayExample example);", "public void setPeriod(String period) {\n this.period = period;\n }", "public void setPeriod(String period) {\n this.period = period;\n }", "long countByExample(BpmInstanciaHistoricaExample example);", "@Generated\n @Selector(\"rollingPeriod\")\n public native int rollingPeriod();", "int getPriceCount();", "@Override\n public void addPeriodicInterest()\n {\n elapsedPeriods++; \n super.addPeriodicInterest();\n System.out.println(elapsedPeriods);\n }", "public int getMonthsPast(){\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tint c_month = calendar.get(Calendar.MONTH);\n\t\tint c_day = calendar.get(Calendar.DAY_OF_MONTH);\n\t\tString[] date = start_date.split(\"-\");\n\t\tint month = Integer.parseInt(date[1]);\n\t\tint day = Integer.parseInt(date[2]);\n\t\t\n\t\tint current_count = c_day;\n\t\tint client_count = day;\n\t\t\n\t\tswitch (c_month - 1){\n\t\tcase 11:\n\t\t\tcurrent_count += 31;\n\t\tcase 10: \n\t\t\tcurrent_count += 30;\n\t\tcase 9:\n\t\t\tcurrent_count += 31;\n\t\tcase 8:\n\t\t\tcurrent_count += 30;\n\t\tcase 7:\n\t\t\tcurrent_count += 31;\n\t\tcase 6:\n\t\t\tcurrent_count += 31;\n\t\tcase 5: \n\t\t\tcurrent_count += 30;\n\t\tcase 4: \n\t\t\tcurrent_count += 31;\n\t\tcase 3:\n\t\t\tcurrent_count += 30;\n\t\tcase 2: \n\t\t\tcurrent_count += 31;\n\t\tcase 1: \n\t\t\tcurrent_count += 28;\n\t\tcase 0: \n\t\t\tcurrent_count += 31;\n\t\t\tbreak;\n\t\t\t\n\t}\n\t\n\t\tswitch (month - 2){\n\t\tcase 11:\n\t\t\tclient_count += 31;\n\t\tcase 10: \n\t\t\tclient_count += 30;\n\t\tcase 9:\n\t\t\tclient_count += 31;\n\t\tcase 8:\n\t\t\tclient_count += 30;\n\t\tcase 7:\n\t\t\tclient_count += 31;\n\t\tcase 6:\n\t\t\tclient_count += 31;\n\t\tcase 5: \n\t\t\tclient_count += 30;\n\t\tcase 4: \n\t\t\tclient_count += 31;\n\t\tcase 3:\n\t\t\tclient_count += 30;\n\t\tcase 2: \n\t\t\tclient_count += 31;\n\t\tcase 1: \n\t\t\tclient_count += 28;\n\t\tcase 0: \n\t\t\tclient_count += 31;\n\t\t\tbreak;\n\t}\n\t\t\n\treturn current_count-client_count;\n\t}", "long countByExample(CliStaffProjectExample example);", "public mbvBoletinPeriodo() {\r\n }", "public Exact_Period_Count create_query(String word, Date min, Date max)\r\n\t{\r\n\t\tExact_Period_Count query = new Exact_Period_Count(word, min, max);\r\n\t\tif(!m_table.containsKey(word))\r\n\t\t\tm_table.put(word, new LinkedList<Exact_Period_Count>());\r\n\t\t\r\n\t\tm_table.get(word).add(query);\r\n\t\tm_queryList.add(query);\r\n\t\treturn query;\r\n\t}", "public CalculatedPerformanceIndicators()\n {\n super();\n // TODO Auto-generated constructor stub\n }", "int countByExample(PayLogInfoPoExample example);", "int countByExample(BasicInfoAnodeBurningLossRateExample example);", "@Test\n public void computeFactor_FebruaryOfLeapYear() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-01 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-29 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-02-01 00:00:00\", \"2012-03-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.DAY,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then factor is 29 (days)\n assertEquals(29, factor, 0);\n }", "public Period getPeriod() {\n return period;\n }", "public abstract int daysInMonth(DMYcount DMYcount);", "public mbvConsolidadoPeriodoAnteriores() {\r\n }", "long countWorkflows();", "int getInstanceCount();", "long countByExample(ActivityHongbaoPrizeExample example);", "double getSignalPeriod();", "Constant getCyclePeriodConstant();", "public int getLBR_ProtestDays();", "public PeriodicityBean() {\n\t\twhen = from = to = null;\n\t\tperiodicity = \"\";\n\t}", "public Long getPeriod() {\n return this.Period;\n }", "private void calcFinanceTotals() {\n System.out.println(\"calcFinanceTotals\");\n financeWindow.clear();\n for (int i = 0; i < clubEventList.totalSize(); i++) {\n financeWindow.calcPlus(clubEventList.getUnfiltered(i));\n }\n financeWindow.display();\n }", "public int getConfiguredPeriod() {\n return configuredPeriod;\n }", "public TimePeriod getPeriod();", "@Override\n\tpublic void handlePeriod() {\n\t}", "int countByExample(SrmFundItemExample example);", "@Test\n public void computeFactor_WinterTimeWeek() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-17 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-27 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-10-01 00:00:00\", \"2012-11-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.WEEK,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(2, factor, 0);\n }", "long countByExample(DeptExample example);", "long countByExample(RepaymentPlanInfoUnExample example);", "void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }", "public interface Period {\n\n\tDate getStart();\n\n\tDate getEnd();\n}", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }" ]
[ "0.660928", "0.6233925", "0.6129132", "0.6061412", "0.6052044", "0.59995574", "0.56998634", "0.563521", "0.5626274", "0.5599916", "0.55917454", "0.5530422", "0.55300754", "0.55205745", "0.55104285", "0.54954046", "0.5437178", "0.5432747", "0.5415121", "0.5415", "0.5388075", "0.53594565", "0.53458124", "0.5310955", "0.53055096", "0.52631426", "0.52627444", "0.52610755", "0.5247696", "0.524696", "0.52459633", "0.5245263", "0.5232904", "0.52262455", "0.51947117", "0.5177577", "0.5167263", "0.5166952", "0.5160665", "0.5141058", "0.51323426", "0.51323426", "0.51281434", "0.51221234", "0.5111558", "0.5092623", "0.5079495", "0.5075549", "0.50736535", "0.50718755", "0.5051219", "0.50435406", "0.50426805", "0.5037608", "0.50272894", "0.50240326", "0.5023458", "0.5023458", "0.50087905", "0.5005218", "0.50046426", "0.5004107", "0.49985018", "0.49872255", "0.49850056", "0.49850056", "0.497898", "0.49674532", "0.49580866", "0.49579668", "0.49567732", "0.49496007", "0.4944628", "0.49426088", "0.4934774", "0.49193063", "0.49045122", "0.48908314", "0.48883972", "0.48739883", "0.48613313", "0.48573932", "0.4857022", "0.485542", "0.48538777", "0.4843507", "0.48431352", "0.4838384", "0.48373148", "0.4828894", "0.4826585", "0.48243794", "0.48216832", "0.48184454", "0.48167557", "0.48137975", "0.48090076", "0.4805809", "0.48042125", "0.48015088" ]
0.7746971
0
Create a new IMMDateCalculator.
IMMDateCalculator<E> getIMMDateCalculator();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Calcul createCalcul();", "public Calculator() {\r\n\t\tsuper();\r\n\t}", "public Calculator()\n {\n \n }", "public Calculator() {\r\n\t\tthis.operator = new Addition();\r\n\t}", "private Calculator() {\n }", "public Calculator() {\n initComponents();\n \n }", "public Calculator () {\n\t\ttotal = 0; // not needed - included for clarity\n\t\thistory = \"0\";\n\t}", "public Calculator()\r\n {\r\n //Creating Choice group list\r\n options = new ChoiceGroup(\"Main Form\",Choice.EXCLUSIVE);\r\n options.append(\"ADDITION\",null);\r\n options.append(\"SUBTRACTION\",null);\r\n options.append(\"MULTIPLICATION\",null);\r\n options.append(\"DIVISION\",null);\r\n \r\n display = Display.getDisplay(this);\r\n \r\n //Creating Forms\r\n main = new Form(\"MAIN FORM\");\r\n ChoiceGroupAppend=main.append(options);\r\n operation = new Form(\"OPERATION\");\r\n \r\n //Initializing different command buttons \r\n exit = new Command(\"EXIT\",Command.EXIT,0);\r\n select = new Command(\"SELECT\",Command.OK,0);\r\n back = new Command(\"BACK\",Command.BACK,0);\r\n result = new Command(\"RESULT\",Command.OK,0);\r\n clear = new Command(\"CLEAR\",Command.OK,0);\r\n //Adding command buttons to different forms\r\n main.addCommand(exit);\r\n main.addCommand(select);\r\n operation.addCommand(result);\r\n operation.addCommand(back);\r\n operation.addCommand(clear);\r\n main.setCommandListener(this);\r\n operation.setCommandListener(this);\r\n \r\n display.setCurrent(main);\r\n }", "public interface Calculator extends CalculatorEventContainer, HistoryControl<CalculatorHistoryState> {\n\n void init();\n\n /*\n **********************************************************************\n *\n * CALCULATIONS\n *\n **********************************************************************\n */\n\n void evaluate();\n\n void evaluate(@NotNull Long sequenceId);\n\n void simplify();\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression);\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression,\n @NotNull Long sequenceId);\n\n /*\n **********************************************************************\n *\n * CONVERSION\n *\n **********************************************************************\n */\n\n boolean isConversionPossible(@NotNull Generic generic, @NotNull NumeralBase from, @NotNull NumeralBase to);\n\n @NotNull\n CalculatorEventData convert(@NotNull Generic generic, @NotNull NumeralBase to);\n\n /*\n **********************************************************************\n *\n * EVENTS\n *\n **********************************************************************\n */\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Object source);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Long sequenceId);\n\n\t@NotNull\n\tPreparedExpression prepareExpression(@NotNull String expression) throws CalculatorParseException;\n}", "public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t\thistory = \"\" + 0;\r\n\t}", "DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);", "public StandardCalculator init() {\n this.load(\"+\", this.add());\n this.load(\"-\", this.subtract());\n this.load(\"*\", this.multiple());\n this.load(\"/\", this.div());\n return this;\n }", "public InterestRateMonteCarloProductFactory(final LocalDate referenceDate) {\n\t\tsuper();\n\t\tthis.referenceDate = referenceDate;\n\t}", "public DateUtil ()\n {\n\n }", "public Appliction()\r\n {\r\n date=LocalDate.of(2020,1,1);//just a start point for the calendar\r\n Appliction p=new Appliction(date.getYear(),date.getMonthValue());\r\n }", "public Rates() {\n }", "public CinemaDate() {\n }", "public Date (final Integer d, final Integer m, final Integer y) throws CGException {\n\n try {\n setSentinel();\n }\n catch (Exception e){\n\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n if (!this.pre_Date(d, m, y).booleanValue()) \n UTIL.RunTime(\"Run-Time Error:Precondition failure in Date\");\n {\n\n day = UTIL.NumberToInt(UTIL.clone(d));\n month = UTIL.NumberToInt(UTIL.clone(m));\n year = UTIL.NumberToInt(UTIL.clone(y));\n }\n }", "public LoanCalculator() {\n initComponents();\n this.setLocationRelativeTo(null); //centers form\n this.getRootPane().setDefaultButton(CalculateJButton);\n \n // set icon for form\n this.setIconImage(Toolkit.getDefaultToolkit().getImage(\"\\\\\\\\zeus\\\\profile$\\\\955331307\\\\my documents\\\\CS 141\\\\Lab 2\\\\Lab 2 -- Loan Calculator\\\\eclipse.png\"));\n PrincipalJTextField.requestFocus();\n setDate();\n }", "public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }", "public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t}", "public interface KitCalculatorsFactory<E> {\r\n\r\n /**\r\n * Create a new CurrencyDateCalculatorBuilder specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculatorBuilder\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n CurrencyDateCalculator<E> buildCurrencyDateCalculator(CurrencyDateCalculatorBuilder<E> builder);\r\n\r\n /**\r\n * Create a new IMMUTABLE CurrencyDateCalculator specialised for 2 currencies, including WorkingWeek, calendars\r\n * registered and CurrencyCalculatorConfig.\r\n *\r\n * NOTE that USD currency holiday must also be registered.\r\n *\r\n * @param ccy1\r\n * first currency, will pickup the holiday set for this ccy.\r\n * @param ccy2\r\n * second currency, will pick up the holiday set for this ccy.\r\n * @param spotLag\r\n * the number of days between tradeDate and spotDate.\r\n * @return a new CurrencyDateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n * @since 1.4.0\r\n */\r\n CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);\r\n\r\n /**\r\n * Use this method register a specific currency config, if not provided then the DefaultCurrencyCalculatorConfig will be given.\r\n * @param config that specifies the set of currencies subject to USD T+1.\r\n */\r\n void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config);\r\n\r\n CurrencyCalculatorConfig getCurrencyCalculatorConfig();\r\n\r\n /**\r\n * Create a new DateCalculator for a given name and type of handling.\r\n *\r\n * @param name\r\n * calendar name (holidays set interested in). If there is set of\r\n * holidays with that name, it will return a DateCalculator with\r\n * an empty holiday set (will work on Weekend only).\r\n * @param holidayHandlerType\r\n * typically one of the value of HolidayHandlerType or null.\r\n * @return a new DateCalculator\r\n * @exception IllegalArgumentException\r\n * if the type is not null or a valid value.\r\n */\r\n DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);\r\n\r\n /**\r\n * Use this method to register a holidays calendar.\r\n *\r\n * @param calendarName\r\n * the calendar name to register these holidays under.\r\n * @param holidaysCalendar\r\n * the holiday calendar (non-working days with boundaries).\r\n */\r\n KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);\r\n\r\n /**\r\n * @return true if the holiday calendar name is registered.\r\n */\r\n boolean isHolidayCalendarRegistered(String calendarName);\r\n\r\n /**\r\n * @return an immutable Holiday Calendar name that is registered.\r\n */\r\n HolidayCalendar<E> getHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * @return an immutable set of registered calendar names\r\n */\r\n Set<String> getRegisteredHolidayCalendarNames();\r\n\r\n /**\r\n * Unregister a given holiday calendar\r\n * @param calendarName\r\n * the calendar name to unregister.\r\n */\r\n KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);\r\n\r\n /**\r\n * unregister all holiday calendars;\r\n */\r\n KitCalculatorsFactory<E> unregisterAllHolidayCalendars();\r\n\r\n // -----------------------------------------------------------------------\r\n //\r\n // ObjectLab, world leaders in the design and development of bespoke\r\n // applications for the securities financing markets.\r\n // www.ObjectLab.co.uk\r\n //\r\n // -----------------------------------------------------------------------\r\n\r\n /**\r\n * Create a new PeriodCountCalculator.\r\n *\r\n * @return a PeriodCountCalculator\r\n */\r\n PeriodCountCalculator<E> getPeriodCountCalculator();\r\n\r\n /**\r\n * Create a new IMMDateCalculator.\r\n *\r\n * @return an IMMDateCalculator\r\n */\r\n IMMDateCalculator<E> getIMMDateCalculator();\r\n\r\n /**\r\n * Create a new holiday handler of given type\r\n * @param holidayHandlerType\r\n * @return a new handler\r\n * @throws IllegalArgumentException if the holidayHandlerType is unsupported\r\n * @since 1.4.0\r\n */\r\n HolidayHandler<E> getHolidayHandler(String holidayHandlerType);\r\n\r\n}", "public OscillatorCalculator() {\n this(1);\n }", "private ARXDate() {\r\n this(\"Default\");\r\n }", "public pay_date() {\n initComponents();\n }", "private void createCalendar() {\n myCALENDAR = Calendar.getInstance();\r\n DAY = myCALENDAR.get(Calendar.DAY_OF_MONTH);\r\n MONTH = myCALENDAR.get(Calendar.MONTH) + 1;\r\n YEAR = myCALENDAR.get(Calendar.YEAR);\r\n HOUR = myCALENDAR.get(Calendar.HOUR_OF_DAY);\r\n MINUTE = myCALENDAR.get(Calendar.MINUTE);\r\n SECOND = myCALENDAR.get(Calendar.SECOND);\r\n }", "private DateTimeAdjusters() {\n\n }", "public Calendar() {\n }", "public Calculator() {\r\n\t\t/*\r\n\t\t * Constructor - Method name which has the same class name is called a Consatructor\r\n\t\t */\r\n\t\tSystem.out.println(\"Calling constructor\");\r\n\t}", "public CalMonitor() {\r\n }", "private DateFormatterManager()\r\n\t{\r\n\r\n\t}", "public Date(int d, int m, int a) {\n\t\tthis.dia = d;\n\t\tthis.mes = m;\n\t\tthis.ano = a;\n\t}", "DateConstant createDateConstant();", "public CalcWindow (){\n\t\tsuper();\n\t\tsetProperties(\"Calculator\");\n\t}", "public ADateDemo() {\n\n\n initComponents();\n\n\n }", "public MathEquation() {\n }", "private LLCalc createCalc(Grammar g) {\n\t\treturn new MyLLCalc(g);\n\t}", "private DateUtil() {\n\t}", "private DateUtil() {\n\t}", "public MyDate(){\n this.day = 0;\n this.month = 0;\n this.year = 0;\n }", "CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag);", "public Calc() {\n obj = new CalcOperation();\n initComponents();\n }", "public Math2()\r\n {\r\n \r\n }", "private Moment() {}", "private QaCalendar() {\n }", "public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }", "public Math() {\n initComponents();\n }", "public Date() {\r\n }", "public Calendar() {\n initComponents();\n }", "private DateUtil(){\n\n }", "MathinterpreterFactory getMathinterpreterFactory();", "public Calculator() {\n initComponents();\n setResizable(false);\n \n NumListener numListener = new Calculator.NumListener();\n numButton0.addActionListener(numListener);\n numButton1.addActionListener(numListener);\n numButton2.addActionListener(numListener);\n numButton3.addActionListener(numListener);\n numButton4.addActionListener(numListener);\n numButton5.addActionListener(numListener);\n numButton6.addActionListener(numListener);\n numButton7.addActionListener(numListener);\n numButton8.addActionListener(numListener);\n numButton9.addActionListener(numListener);\n pointButton.addActionListener(numListener);\n \n OpListener opListener = new Calculator.OpListener();\n plusButton.addActionListener(opListener);\n minButton.addActionListener(opListener);\n multButton.addActionListener(opListener);\n divButton.addActionListener(opListener);\n sqrtButton.addActionListener(opListener);\n eqButton.addActionListener(opListener);\n signButton.addActionListener(opListener);\n \n ClearListener clearListener = new ClearListener();\n cButton.addActionListener(clearListener);\n ceButton.addActionListener(clearListener);\n }", "public CalculatorParser(CalculatorParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n }", "private MyMath() {\n }", "@Override\r\n\tpublic CalculatorRS getCalculator(CalculatorRQ calculatorRQ) {\n\t\t\r\n\t\tint num_1=calculatorRQ.getValue_1();\r\n\t\tint num_2=calculatorRQ.getValue_2();\r\n\t\t\r\n\t\t\t\t\r\n\t\tCalculatorRS calculatorRS=new CalculatorRS(num_1+num_2,num_1-num_2,num_1*num_2);\r\n\t\treturn calculatorRS;\r\n\t}", "public MyDate(long inElapsedTime)\n {\n //put in logic here\n elapsedTime = inElapsedTime;\n this.setDate(elapsedTime);\n }", "public CalculatorDevice() {\n initComponents();\n }", "public Calculator()\n {\n \n frame = new JFrame();\n createCalculator(range);\n createCP(range);\n frame.setVisible(true);\n frame.setSize(1200,1000);\n \n\n }", "private XMath()\n {\n \n }", "public Date(int m, int y) {\r\n\r\n\t\tif (!isValid(m, DAYS[m], y))\r\n\t\t\tthrow new RuntimeException(\"Invalid date; correct input\");\r\n\t\tmonth = m;\r\n\t\tday = DAYS[m];\r\n\t\tyear = y;\r\n\t}", "public MyDate(int inYear, int inDay, int inMonth)\n {\n year = inYear;\n day = inDay;\n month = inMonth;\n }", "public Calendar() {\n\t\tthis(() -> LocalDateTime.now());\n\t}", "public Calculator( String toParse )\r\n\t{\r\n\t\tequationString = \ttoParse;\r\n\t\tinitialized = \t\ttrue;\r\n\t}", "public Calendar getCurrentMonthCalendarObj() throws Throwable{\r\n\r\n\t\tString dateInput = \"01/\"+month+\"/\"+year;\t\t\t\r\n\t\tDateFormat df = new SimpleDateFormat(\"dd/MMMM/yyyy\");\r\n\t\tDate startDate = df.parse(dateInput);\r\n\t\tCalendar c = Calendar.getInstance(); // this takes current date\r\n\t c.setTime(startDate); // set date to specified in arguement\r\n\t\treturn c;\r\n\t}", "CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag);", "private CreateDateUtils()\r\n\t{\r\n\t}", "public ObjectFactoryModuleCalendar() {\n }", "public CFCalculator() {\n initComponents();\n }", "public MMTMeasurement(){\n }", "public static MonthlyManagement createEntity(EntityManager em) {\n MonthlyManagement monthlyManagement = new MonthlyManagement()\n .driverId(DEFAULT_DRIVER_ID)\n .orderId(DEFAULT_ORDER_ID)\n .companyId(DEFAULT_COMPANY_ID)\n .driverName(DEFAULT_DRIVER_NAME)\n .bankAccount(DEFAULT_BANK_ACCOUNT)\n .repaymentTime(DEFAULT_REPAYMENT_TIME)\n .money(DEFAULT_MONEY)\n .overdue(DEFAULT_OVERDUE)\n .periods(DEFAULT_PERIODS)\n .nextMoney(DEFAULT_NEXT_MONEY)\n .nextDate(DEFAULT_NEXT_DATE)\n .periodsStatus(DEFAULT_PERIODS_STATUS)\n .remark(DEFAULT_REMARK);\n return monthlyManagement;\n }", "static public ColumnDataCalculator createDataCalc(String cmd)\n {\n Class cls = (Class) calcsClasses.get(cmd);\n if(cls == null)\n {\n try\n {\n cls = Class.forName(cmd);\n addColumnDataCalc(cmd, cls);\n }\n catch(ClassNotFoundException e)\n {\n return null;\n }\n }\n\n try\n {\n return (ColumnDataCalculator) cls.newInstance();\n }\n catch(Exception e)\n {\n throw new RuntimeException(e.toString());\n }\n }", "public FillDate() {\n }", "public Date() {\r\n\t\tGregorianCalendar c = new GregorianCalendar();\r\n\t\tmonth = c.get(Calendar.MONTH) + 1; // our month starts from 1\r\n\t\tday = c.get(Calendar.DAY_OF_MONTH);\r\n\t\tyear = c.get(Calendar.YEAR);\r\n\t}", "public Calculadora() {\n initComponents();\n }", "public CalculatorOperandException() {\n\t}", "private DatePickerUtil() {\n\n }", "private Calendar constructPrincipleSymptomsDate() {\n\t\tCalendar psd = null ;\n\n\t\t//\n\t\t// This is a painfully inefficient way of doing it.\n\t\t// Optimization can wait until later!\n\t\tString sEpiSymponset, sEpiSymponsetHour, sEpiSymponsetMin ;\n\t\tString sEpiSymponsetYear, sEpiSymponsetMonth ;\n\n\t\tsEpiSymponset = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset\" ) ;\n\t\tif( sEpiSymponset != null ) {\n\t\t\tsEpiSymponset = od2p.getCorrectedDateTimeValueFromString( sEpiSymponset ) ;\n\t\t\tsEpiSymponsetHour = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset_hour\" ) ;\n\t\t\tsEpiSymponsetMin = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset_min\" ) ;\n\n\t\t\tXmlDateTime dt = XmlDateTime.Factory.newInstance() ;\n\t\t\tdt.setStringValue( sEpiSymponset ) ;\n\t\t\tpsd = dt.getCalendarValue() ;\n\t\t\tif( sEpiSymponsetHour != null && sEpiSymponsetMin != null) {\n\t\t\t\tpsd.set( Calendar.HOUR_OF_DAY, Integer.valueOf( sEpiSymponsetHour ) ) ;\n\t\t\t\tpsd.set( Calendar.MINUTE, Integer.valueOf( sEpiSymponsetMin ) ) ;\n\t\t\t}\n\t\t\tlog.debug( \"Principle symptoms date. Route1. \" + psd.toString() ) ;\n\t\t\treturn psd ;\n\t\t}\n\t\tsEpiSymponsetYear = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset_year\" ) ;\n\t\tif( sEpiSymponsetYear != null ) {\n\t\t\tsEpiSymponsetMonth = od2p.getValue( \"DataSubmissionQuestionnaire\", \"epi_symponset_month\" ) ;\n\t\t\tpsd = Calendar.getInstance() ;\n\t\t\tpsd.setTimeInMillis( 0 ) ;\n\t\t\tpsd.set( Integer.valueOf( sEpiSymponsetYear ), Integer.valueOf( sEpiSymponsetMonth ), 1, 0, 0) ;\n\t\t\tlog.debug( \"Principle symptoms date. Route2. \" + psd.toString() ) ;\n\t\t\treturn psd ;\n\t\t}\n\t\tlog.debug( \"Principle symptoms date. Route3. \" + psd ) ;\n\t\treturn psd ;\t\n\t}", "public static synchronized CpFldValidDate getInst() { \n\t\tif( me == null ) me = new CpFldValidDate();\n\t\treturn me;\n\t}", "public AgendaMB() {\n GregorianCalendar dtMax = new GregorianCalendar(); \n Date dt = new Date();\n dtMax.setTime(dt); \n GregorianCalendar dtMin = new GregorianCalendar(); \n dtMin.setTime(dt);\n dtMin.add(Calendar.DAY_OF_MONTH, 1);\n dtMax.add(Calendar.DAY_OF_MONTH, 40);\n dataMax = dtMax.getTime();\n dataMin = dtMin.getTime(); \n }", "public static Date createDate(int yyyy, int month, int day, int hour, int min) {\n/* 93 */ CALENDAR.clear();\n/* 94 */ CALENDAR.set(yyyy, month - 1, day, hour, min);\n/* 95 */ return CALENDAR.getTime();\n/* */ }", "public void buildMonth()\r\n {\r\n int i=0,k=0;\r\n date=LocalDate.of(year,month,1);\r\n String st;\r\n for(int j=0;date.getMonthValue()==month;j++)\r\n {\r\n\r\n if(date.getDayOfWeek().name()==\"SUNDAY\"){k=0;i++;}\r\n else if(date.getDayOfWeek().name()==\"MONDAY\"){k=1;}\r\n else if(date.getDayOfWeek().name()==\"TUESDAY\"){k=2;}\r\n else if(date.getDayOfWeek().name()==\"WEDNESDAY\"){k=3;}\r\n else if(date.getDayOfWeek().name()==\"THURSDAY\"){k=4;}\r\n else if(date.getDayOfWeek().name()==\"FRIDAY\"){k=5;}\r\n else if(date.getDayOfWeek().name()==\"SATURDAY\"){k=6;}\r\n st=String.valueOf(date.getDayOfMonth());\r\n cmdDate=new JButton(st);\r\n cmdDate.setBounds(xpos+k*110,ypos+i*50,100,50);\r\n this.cmdDate.addActionListener(new DayListner());\r\n panel.add(cmdDate);\r\n date = date.plusDays(1);\r\n }\r\n\r\n }", "public SIPDate() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e6 in method: gov.nist.javax.sip.header.SIPDate.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.<init>():void\");\n }", "public void opInitFrom(LogicalOp logicalOperator) {\n \twindowAttribute = ((Bucket) logicalOperator).getWindowAttr();\n \twindowType = ((Bucket) logicalOperator).getWindowType();\t\t\n \trange = ((Bucket) logicalOperator).getWindowRange();\n \tslide = ((Bucket) logicalOperator).getWindowSlide();\n \twidName = ((Bucket) logicalOperator).getWid();\n \tstart = ((Bucket) logicalOperator).getStarttime();\n \tae = new AtomicEvaluator (windowAttribute.getName());\n \t\n }", "public Calculadora(){\n this.operador1 = 0.0;\n this.operador2 = 0.0;\n this.resultado = 0.0;\n }", "@Test\n void scCreation() {\n StandardCalc sc = new StandardCalc();\n }", "public Momentum() {\r\n m1 = m2 = v1 = v2 = p1 = p2 = comx = cv = 0.0;\r\n xp1 = 0.0;\r\n xp2 = 900.0;\r\n m1 = 2.0;\r\n m2 = 1.0;\r\n v1 = 1.0;\r\n v2 = -1.0;\r\n\r\n //m1 = m2 = 1.0;\r\n //v1 = 2.0;\r\n //v2 = -4.0;\r\n d = dc = 8.0;\r\n }", "public Expression() {\r\n }", "Expression createExpression();", "public NewtonRaphsonCalibrator()\r\n\t{\r\n\t}", "public interface CalculatorService {\n\n\tpublic double add(double arg1, double arg2); \n\tpublic double sub(double arg1, double arg2); \n\tpublic double div(double arg1, double arg2);\n\tpublic double mult(double arg1, double arg2);\n}", "public Month () {\n monthNumber = 1;\n }", "private void initializeDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tmYear = c.get(Calendar.YEAR);\n\t\tmMonth = c.get(Calendar.MONTH);\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\texpense.setDate(c.getTime());\n\n\t\t// display the current date\n\t\tupdateDateDisplay();\n\t}", "public CalculatedPerformanceIndicators()\n {\n super();\n // TODO Auto-generated constructor stub\n }", "public PeriodFactoryImpl() {\n\t\tsuper();\n\t}", "public Reminder(){}", "protected abstract void calcNextDate();", "public mathMethods() {\n initComponents();\n }", "public static MonthCalendarFragment newInstance(int mese, Date date, ArrayList<Associazione> mAssociazioni, UserInfo user) {\n MonthCalendarFragment fragment = new MonthCalendarFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_MONTH_NUMBER, mese);\n args.putSerializable(ARG_ACTUAL_DATE, date);\n args.putParcelableArrayList(ARG_MONTH_LIST, mAssociazioni);\n args.putParcelable(ARG_ACTUAL_USER, user);\n fragment.setArguments(args);\n return fragment;\n }", "public void testCreateInstance() throws ParseException {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n Date date = df.parse(\"2008-08-08 12:34:56.789\");\n \n AbstractTemporalLiteral d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, date);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, date);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, date);\n assertTrue(d instanceof TimestampLiteral);\n \n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n \n d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, cal);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, cal);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, cal);\n assertTrue(d instanceof TimestampLiteral);\n }", "public static AbsTime factory(Date date)\n {\n return new AbsTime(date);\n }" ]
[ "0.61825323", "0.60702163", "0.58831924", "0.57221186", "0.5684307", "0.56288064", "0.54221356", "0.5393431", "0.53483623", "0.52562374", "0.51795244", "0.51365733", "0.5134162", "0.5124684", "0.5118163", "0.50849736", "0.50766796", "0.5074362", "0.5071921", "0.505987", "0.50525296", "0.5036449", "0.5032986", "0.50250906", "0.5014929", "0.50126284", "0.501242", "0.50112957", "0.5010643", "0.50095385", "0.50071675", "0.4976012", "0.49697506", "0.496866", "0.4950102", "0.49467635", "0.4945109", "0.4943049", "0.4943049", "0.4942254", "0.49345377", "0.49122906", "0.48944283", "0.48926172", "0.48918223", "0.48911622", "0.48807552", "0.48663712", "0.48534432", "0.48496777", "0.48410153", "0.48349714", "0.4826103", "0.48073027", "0.48032108", "0.4790837", "0.47884038", "0.47872582", "0.478146", "0.47664472", "0.47658348", "0.47570327", "0.47553203", "0.47496638", "0.4748164", "0.47074002", "0.47062358", "0.47015417", "0.46798688", "0.4676552", "0.4667776", "0.46639395", "0.4661704", "0.46606863", "0.4660639", "0.4644987", "0.46303678", "0.4625584", "0.46144465", "0.4607004", "0.45954746", "0.45953515", "0.45909548", "0.456086", "0.45559427", "0.4550755", "0.4548021", "0.4543469", "0.4543083", "0.45424935", "0.45371532", "0.4533488", "0.45304674", "0.4528841", "0.45276883", "0.4523012", "0.45150572", "0.45125514", "0.45020324", "0.45005372" ]
0.7360903
0
Create a new holiday handler of given type
HolidayHandler<E> getHolidayHandler(String holidayHandlerType);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DateCalculator<E> getDateCalculator(String name, String holidayHandlerType);", "public Holidays (){\n name= \"Exotic Beach Holiday of a Lifetime\";\n cost = 5000;\n location = \"Fesdu Island, Maldives\";\n type = \"beach\";\n }", "public static IProtocolHandler createHandler(String type) {\n if (type==null) {\n return new RestHandler(); //use REST by default\n } else if (type.equalsIgnoreCase(\"rest\")) {\n return new RestHandler();\n } else if (type.equalsIgnoreCase(\"soap\")) {\n //for future use\n return null;\n } else {\n throw new IllegalArgumentException(\"Unknown protocol type: \" + type);\n }\n }", "public Candle createCandle(String type) {\n\t\tCandle candle = null;\n\t\t\n\t\tif (type.equals(\"jarCandle\")) {\n\t\t\tcandle = new JarCandle();\n\t\t} else if (type.equals(\"freeStandingCandle\")){\n\t\t\tcandle = new FreeStandingCandle();\n\t\t}\n\t\t\n\t\treturn candle;\n\t}", "KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);", "private void parseEventType() { //TODO: add a list of all the school holidays to checkfor the 'holiday' event type.\n String tempTitle = title.toLowerCase();\n if(tempTitle.contains(\"no school\") || tempTitle.contains(\"teacher's institute\") || tempTitle.contains(\"teacher's work day\") || tempTitle.contains(\"snow day\")) { //example: no school\n this.type = EventType.noSchool;\n } else if(tempTitle.contains(\"late start\")) {//example: late start wednesday\n this.type = EventType.lateStart;\n } else if(tempTitle.contains(\"last day\")) {//example last day before spring break;\n this.type = EventType.lastDayBeforeBreak;\n } else if(tempTitle.contains(\"end of\")) { //example: end of first semester\n this.type = EventType.endOf;\n } else if(tempTitle.contains(\"meeting\")) {\n this.type = EventType.meeting;\n } else {\n this.type = EventType.regular;\n }\n }", "IExceptionHandler createHandlerFor(java.lang.Class typeOfExceptionToHandle);", "public interface HolidayService {\n\t\n\tvoid load();\n\t\n\tDate getNextWorkingDay(Message message);\n\t\n}", "@Override\r\n\tpublic AbstractWrapGift createWrapGift() {\n\t\treturn new HolidaySurprise();\r\n\t}", "EthHandler create(EthVersion version);", "public Holiday(long id, String title, String description, String image, String typeOfHoliday, boolean riseOfFlag) {\n\t\tsuper(); //???\n\t\tthis.id = id;\n\t\tthis.title = title;\n\t\tthis.description = description;\n\t\tthis.image = image;\n\t\tthis.typeOfHoliday = typeOfHoliday;\n\t\tthis.riseOfFlag = riseOfFlag;\n\t}", "public IGenScheduleHandler create() throws CreateException, RemoteException;", "public interface IExceptionHandlerFactory {\n\n /**\n * Function creates a handle for the exception.\n *\n * @param typeOfExceptionToHandle the class type of exception to handle.\n * @return an IException Handler.\n */\n IExceptionHandler createHandlerFor(java.lang.Class typeOfExceptionToHandle);\n}", "CreateHandler()\n {\n }", "InboundServicesType createInboundServicesType();", "void createHandler(final String handlerClassName);", "public Holiday<GregorianCalendar> getHoliday() {\n return _holiday;\n }", "public void addHoliday(String name, int day, int month) throws IOException {\r\n\t\tArrayList<Holiday> al = Holiday.readHoliday(MoblimaApp.holidayFile);\r\n\t\tHoliday h1 = new Holiday(name, day, month);\r\n\t\t// al is an array list containing holiday objs\r\n\t\tal.add(h1);\r\n\t\tif (day == 1) {\r\n\t\t\tif(month == 1) {\r\n\t\t\t\tString name2 = name + \" Eve\";\r\n\t\t\t\tHoliday h2 = new Holiday(name2, 31, 12);\r\n\t\t\t\tal.add(h2);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\tString name2 = name + \" Eve\";\r\n\t\t\tHoliday h2 = new Holiday(name2, 31, month - 1);\r\n\t\t\tal.add(h2);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tString name2 = name + \" Eve\";\r\n\t\t\tHoliday h2 = new Holiday(name2, day - 1, month);\r\n\t\t\tal.add(h2);\r\n\t\t}\r\n\t\t// write holiday record/s to file.\r\n\t\tHoliday.saveHoliday(MoblimaApp.holidayFile, al);\r\n\t}", "@Override\n protected void populateHolidays() {\n holidays.put(beginDate(), new Holiday(\"Christmas\", beginDate(), calendar, \"Matthew 1:18-25, Luke 2:1-20\"));\n Calendar holyInnocents = new GregorianCalendar(calendar.getYear() - 1, Calendar.DECEMBER, 28);\n holidays.put(holyInnocents, new Holiday(\"Holy Innocents\", holyInnocents, calendar, \"Matthew 2:13-23\"));\n Calendar epiphany = new GregorianCalendar(calendar.getYear(), Calendar.JANUARY, 6);\n holidays.put(epiphany, new Holiday(\"Epiphany\", epiphany, calendar, \"Matthew 2:1-12\"));\n Calendar presentation = new GregorianCalendar(calendar.getYear(), Calendar.FEBRUARY, 2);\n holidays.put(presentation, new Holiday(\"Presentation\", presentation, calendar, \"Luke 2:21-25\"));\n Calendar annunciation = new GregorianCalendar(calendar.getYear(), Calendar.MARCH, 25);\n if (endDate().compareTo(annunciation) < 0) holidays.put(annunciation, new Holiday(\"Annunciation\", annunciation, calendar, \"Luke 1:26-38\"));\n\n Calendar ashWednesday = (Calendar)holyWeek.beginDate().clone();\n ashWednesday.add(Calendar.DATE, -39);\n holidays.put(ashWednesday, new Holiday(\"Ash Wednesday\", ashWednesday, calendar,\n \"Matthew 3:13-4:11\", \"Mark 1:9-13\", \"Luke 3:21,22, 4:1-13\"));\n\n }", "ConferenceScheduleBuilderService createEventsFromStartToLunch();", "Hazard createHazard();", "public GmlSaxFeatureResponseHandler(WFSDataType type, FeatureConsumer consumer)\r\n {\r\n Utilities.checkNull(type, WFSDataType.class.getSimpleName());\r\n Utilities.checkNull(type.getMetaDataInfo(), MetaDataInfo.class.getSimpleName());\r\n Utilities.checkNull(consumer, \"consumer\");\r\n myType = type;\r\n myMetaDataHandler = new MetaDataHandler(type.getMetaDataInfo());\r\n // TODO bug in the handler: must reset in order to instantiate the internal provider field:\r\n myMetaDataHandler.reset();\r\n myErrorHandler = new GmlErrorHandler();\r\n myTimeHandler = new TimeHandler();\r\n myConsumer = consumer;\r\n }", "PaymentHandler createPaymentHandler();", "@Override\n\tprotected ManageEventHandler createEventHandler() {\n\t\tif (m_handler == null)\n\t\t\tm_handler = new BankKeepEventHandler(this, createController());\n\t\treturn m_handler;\n\t}", "H create(Method method);", "HarvestType createHarvestType();", "CategoryType createCategoryType();", "KitCalculatorsFactory<E> unregisterAllHolidayCalendars();", "public void registerNewEventHandler(Plugin cauldron, Class<? extends Event> type, Value handler)\n throws ClassNotFoundException {\n Listener lis = new Listener() {\n public int hashCode() {\n return super.hashCode();\n }\n };\n EventExecutor exec = (listener, event) -> {\n if (event.isAsynchronous()) {\n // send to Isolate's thread and process on said thread.\n } else {\n handler.execute(event);\n }\n };\n\n Bukkit.getPluginManager().registerEvent(type, lis, EventPriority.NORMAL, exec, cauldron);\n }", "public static Employee createEmployee(int id, String name, double salary, String type) {\n if (type.equals(\"permanent\")) {\n return new PermanentEmployee(id, name, salary);\n } else if (type.equals(\"temporary\")) {\n return new TemporaryEmployee(id, name, salary);\n } else {\n throw new IllegalArgumentException(\"Invalid type for employee\");\n }\n }", "public static Action make(int type)\n {\n switch(type)\n {\n case FIREBALL:\n return new Action();\n case DEFEND:\n return new ActShield();\n case SPIRIT_BURST:\n return new SpiritBurst();\n case INVINCIBILITY:\n return new Invincibility();\n }\n return null;\n }", "ShipmentType createShipmentType();", "ShipmentMethodType createShipmentMethodType();", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "FooterType createFooterType();", "@Override\n\tpublic Holiday update(Holiday holiday) {\n\t\treturn null;\n\t}", "public interface Holiday {\n default MdiIcon balloon_holiday() {\n return MdiIcon.create(\"mdi-balloon\");\n }\n\n default MdiIcon bat_holiday() {\n return MdiIcon.create(\"mdi-bat\");\n }\n\n default MdiIcon bed_holiday() {\n return MdiIcon.create(\"mdi-bed\");\n }\n\n default MdiIcon bed_double_holiday() {\n return MdiIcon.create(\"mdi-bed-double\");\n }\n\n default MdiIcon bed_double_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-double-outline\");\n }\n\n default MdiIcon bed_empty_holiday() {\n return MdiIcon.create(\"mdi-bed-empty\");\n }\n\n default MdiIcon bed_king_holiday() {\n return MdiIcon.create(\"mdi-bed-king\");\n }\n\n default MdiIcon bed_king_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-king-outline\");\n }\n\n default MdiIcon bed_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-outline\");\n }\n\n default MdiIcon bed_queen_holiday() {\n return MdiIcon.create(\"mdi-bed-queen\");\n }\n\n default MdiIcon bed_queen_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-queen-outline\");\n }\n\n default MdiIcon bed_single_holiday() {\n return MdiIcon.create(\"mdi-bed-single\");\n }\n\n default MdiIcon bed_single_outline_holiday() {\n return MdiIcon.create(\"mdi-bed-single-outline\");\n }\n\n default MdiIcon bone_holiday() {\n return MdiIcon.create(\"mdi-bone\");\n }\n\n default MdiIcon bone_off_holiday() {\n return MdiIcon.create(\"mdi-bone-off\");\n }\n\n default MdiIcon bottle_tonic_skull_holiday() {\n return MdiIcon.create(\"mdi-bottle-tonic-skull\");\n }\n\n default MdiIcon bottle_tonic_skull_outline_holiday() {\n return MdiIcon.create(\"mdi-bottle-tonic-skull-outline\");\n }\n\n default MdiIcon cake_holiday() {\n return MdiIcon.create(\"mdi-cake\");\n }\n\n default MdiIcon cake_layered_holiday() {\n return MdiIcon.create(\"mdi-cake-layered\");\n }\n\n default MdiIcon cake_variant_holiday() {\n return MdiIcon.create(\"mdi-cake-variant\");\n }\n\n default MdiIcon cake_variant_outline_holiday() {\n return MdiIcon.create(\"mdi-cake-variant-outline\");\n }\n\n default MdiIcon candelabra_holiday() {\n return MdiIcon.create(\"mdi-candelabra\");\n }\n\n default MdiIcon candelabra_fire_holiday() {\n return MdiIcon.create(\"mdi-candelabra-fire\");\n }\n\n default MdiIcon candle_holiday() {\n return MdiIcon.create(\"mdi-candle\");\n }\n\n default MdiIcon candycane_holiday() {\n return MdiIcon.create(\"mdi-candycane\");\n }\n\n default MdiIcon cat_holiday() {\n return MdiIcon.create(\"mdi-cat\");\n }\n\n default MdiIcon coffin_holiday() {\n return MdiIcon.create(\"mdi-coffin\");\n }\n\n default MdiIcon cross_holiday() {\n return MdiIcon.create(\"mdi-cross\");\n }\n\n default MdiIcon cross_celtic_holiday() {\n return MdiIcon.create(\"mdi-cross-celtic\");\n }\n\n default MdiIcon egg_easter_holiday() {\n return MdiIcon.create(\"mdi-egg-easter\");\n }\n\n default MdiIcon firework_holiday() {\n return MdiIcon.create(\"mdi-firework\");\n }\n\n default MdiIcon food_turkey_holiday() {\n return MdiIcon.create(\"mdi-food-turkey\");\n }\n\n default MdiIcon gift_holiday() {\n return MdiIcon.create(\"mdi-gift\");\n }\n\n default MdiIcon gift_off_holiday() {\n return MdiIcon.create(\"mdi-gift-off\");\n }\n\n default MdiIcon gift_off_outline_holiday() {\n return MdiIcon.create(\"mdi-gift-off-outline\");\n }\n\n default MdiIcon gift_open_holiday() {\n return MdiIcon.create(\"mdi-gift-open\");\n }\n\n default MdiIcon gift_open_outline_holiday() {\n return MdiIcon.create(\"mdi-gift-open-outline\");\n }\n\n default MdiIcon gift_outline_holiday() {\n return MdiIcon.create(\"mdi-gift-outline\");\n }\n\n default MdiIcon grave_stone_holiday() {\n return MdiIcon.create(\"mdi-grave-stone\");\n }\n\n default MdiIcon halloween_holiday() {\n return MdiIcon.create(\"mdi-halloween\");\n }\n\n default MdiIcon hexagram_holiday() {\n return MdiIcon.create(\"mdi-hexagram\");\n }\n\n default MdiIcon hexagram_outline_holiday() {\n return MdiIcon.create(\"mdi-hexagram-outline\");\n }\n\n default MdiIcon menorah_holiday() {\n return MdiIcon.create(\"mdi-menorah\");\n }\n\n default MdiIcon menorah_fire_holiday() {\n return MdiIcon.create(\"mdi-menorah-fire\");\n }\n\n default MdiIcon ornament_holiday() {\n return MdiIcon.create(\"mdi-ornament\");\n }\n\n default MdiIcon ornament_variant_holiday() {\n return MdiIcon.create(\"mdi-ornament-variant\");\n }\n\n default MdiIcon owl_holiday() {\n return MdiIcon.create(\"mdi-owl\");\n }\n\n default MdiIcon party_popper_holiday() {\n return MdiIcon.create(\"mdi-party-popper\");\n }\n\n default MdiIcon pine_tree_holiday() {\n return MdiIcon.create(\"mdi-pine-tree\");\n }\n\n default MdiIcon pine_tree_box_holiday() {\n return MdiIcon.create(\"mdi-pine-tree-box\");\n }\n\n default MdiIcon pot_holiday() {\n return MdiIcon.create(\"mdi-pot\");\n }\n\n default MdiIcon pot_mix_holiday() {\n return MdiIcon.create(\"mdi-pot-mix\");\n }\n\n default MdiIcon pot_mix_outline_holiday() {\n return MdiIcon.create(\"mdi-pot-mix-outline\");\n }\n\n default MdiIcon pot_outline_holiday() {\n return MdiIcon.create(\"mdi-pot-outline\");\n }\n\n default MdiIcon pot_steam_holiday() {\n return MdiIcon.create(\"mdi-pot-steam\");\n }\n\n default MdiIcon pot_steam_outline_holiday() {\n return MdiIcon.create(\"mdi-pot-steam-outline\");\n }\n\n default MdiIcon pumpkin_holiday() {\n return MdiIcon.create(\"mdi-pumpkin\");\n }\n\n default MdiIcon rabbit_variant_holiday() {\n return MdiIcon.create(\"mdi-rabbit-variant\");\n }\n\n default MdiIcon rabbit_variant_outline_holiday() {\n return MdiIcon.create(\"mdi-rabbit-variant-outline\");\n }\n\n default MdiIcon skull_holiday() {\n return MdiIcon.create(\"mdi-skull\");\n }\n\n default MdiIcon skull_crossbones_holiday() {\n return MdiIcon.create(\"mdi-skull-crossbones\");\n }\n\n default MdiIcon skull_crossbones_outline_holiday() {\n return MdiIcon.create(\"mdi-skull-crossbones-outline\");\n }\n\n default MdiIcon skull_outline_holiday() {\n return MdiIcon.create(\"mdi-skull-outline\");\n }\n\n default MdiIcon snowflake_holiday() {\n return MdiIcon.create(\"mdi-snowflake\");\n }\n\n default MdiIcon snowflake_variant_holiday() {\n return MdiIcon.create(\"mdi-snowflake-variant\");\n }\n\n default MdiIcon snowman_holiday() {\n return MdiIcon.create(\"mdi-snowman\");\n }\n\n default MdiIcon spider_holiday() {\n return MdiIcon.create(\"mdi-spider\");\n }\n\n default MdiIcon spider_outline_holiday() {\n return MdiIcon.create(\"mdi-spider-outline\");\n }\n\n default MdiIcon spider_thread_holiday() {\n return MdiIcon.create(\"mdi-spider-thread\");\n }\n\n default MdiIcon spider_web_holiday() {\n return MdiIcon.create(\"mdi-spider-web\");\n }\n\n default MdiIcon stocking_holiday() {\n return MdiIcon.create(\"mdi-stocking\");\n }\n\n default MdiIcon teddy_bear_holiday() {\n return MdiIcon.create(\"mdi-teddy-bear\");\n }\n\n default MdiIcon turkey_holiday() {\n return MdiIcon.create(\"mdi-turkey\");\n }\n\n default MdiIcon weather_night_holiday() {\n return MdiIcon.create(\"mdi-weather-night\");\n }\n}", "@Override\n\tprotected Pizza createPizza(String type) {\n\t\tPizza pizza = null;\n\t\tPizzaIngredientFactory pizzaIngredientFactory = new NYPizzaIngredientFactory();\n\t\tif(type.equals(\"cheese\")){\n\t\t\tpizza = new CheesePizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Cheese Pizza\");\n\t\t} else if(type.equals(\"veggie\")){\n\t\t\tpizza = new VeggiePizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Veggie Pizza\");\n\t\t} else if(type.equals(\"clam\")) {\n\t\t\tpizza = new ClamPizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Clam Pizza\");\n\t\t} return pizza;\n\t}", "EntryPoint createEntryPoint();", "@Override\n\tprotected BaseViewHolder<JSONObject> getHolderView(View layout) {\n\t\treturn new HolidayMealsViewHolder(layout);\n\t}", "public MarketStateEntry entryOrNew(final MarketEntry.Type type, final MarketEntry.Descriptor descriptor) {\n\n\t\tMarketStateEntry entry = entries.one(type, descriptor);\n\n\t\tif (entry == null) {\n\t\t\tentry = new MarketStateEntry().type(type).addDescriptor(descriptor);\n\t\t\tentry(entry);\n\t\t}\n\n\t\treturn entry;\n\n\t}", "public EnergyEntity createEnergyEntity(final EnergyEntityType type,\r\n final EnergyEntityInput input) {\r\n return switch (type) {\r\n case CONSUMER -> new Consumer((ConsumerInput) input);\r\n case DISTRIBUTOR -> new Distributor((DistributorInput) input);\r\n case PRODUCER -> new Producer((ProducerInput) input);\r\n };\r\n }", "ResponsesType createResponsesType();", "abstract public Hamburger creatHamburger(String type);", "void onCreateContract(ContractType type);", "@Override\n\t\tpublic NewHighwayEvent build(IniSection ini) {\n\t\t\tNewHighwayEvent event = null;\n\t\t\tint lanes;\n\n\t\t\tif (TAG.equals(ini.getTag()) && isCorrectType(ini, TYPE)) {\n\t\t\t\ttry {\n\t\t\t\t\tLogger log = Logger.getLogger(NewHighwayEvent.class\n\t\t\t\t\t\t\t.getName());\n\t\t\t\t\tlog.info(\"Attempting to parse NewHighwayEvent...\");\n\n\t\t\t\t\tNewRoadEvent ev = super.build(ini);\n\t\t\t\t\tlanes = parsePositiveInt(ini, \"lanes\");\n\t\t\t\t\tevent = new NewHighwayEvent(ev, lanes);\n\n\t\t\t\t\tlog.info(\"Event parsed\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\tEVENT_PARSE_ERROR_MSG + e.getMessage(), e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}", "public interface IFactory {\n ICustomer getCustomer(CustomerType type);\n IAccount getAccount(Enum type);\n// IEntry getEntry(EntryType type);\n DAO getDAO(Enum type);\n\n}", "static Sport newInstance(int type) {\n switch (type) {\n case 0:\n return new Football();\n case 1:\n return new Basketball();\n default:\n return () -> System.out.println(\"Undefined sport.\");\n }\n }", "@Override\r\n\tprotected Pizza createPizza(String type) {\n\t\tif(type.equals(\"cheese\")) {\r\n\t\t\treturn new NYStyleCheesePizza();\r\n\t\t}\r\n\t\telse return null;\r\n\t}", "private static PublishLogDataStrategy createNewStrategie(String className) {\n\n\t\tPublishLogDataStrategy request = null;\n\n\t\ttry {\n\t\t\tClass<?> cl = Class.forName(className);\n\t\t\tLOGGER.info(cl.toString() + \" instantiated\");\n\t\t\tif (cl.getSuperclass() == PublishLogDataStrategy.class) {\n\t\t\t\trequest = (PublishLogDataStrategy) cl.newInstance();\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tLOGGER.severe(\"ClassNotFound\");\n\t\t} catch (InstantiationException e) {\n\t\t\tLOGGER.severe(\"InstantiationException\");\n\t\t} catch (IllegalAccessException e) {\n\t\t\tLOGGER.severe(\"IllegalAccessException\");\n\t\t}\n\n\t\treturn request;\n\t}", "Definition createDefinition();", "private void loadEvent(String type) {\n String description = parser.parseDeadlineEventDescription(type);\n String timeString = parser.parseDateTimeEvent(type);\n LocalDate time = LocalDate.parse(timeString,\n DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"));\n Task toAdd = new Event(description, time);\n if (type.contains(\"\\u2713\")) {\n toAdd.markAsDone();\n }\n tasks.add(toAdd);\n }", "ShipmentGatewayDhl createShipmentGatewayDhl();", "Schueler createSchueler();", "void addHoliday(int y, int m, int d) {\n\t\tif (y < 1900)\n\t\t\ty += 1900;\n\t\tCalendar aHoliday = (new GregorianCalendar(y, m, d, 0, 0, 0));\n\n\t\tHoliday.add(aHoliday);\n\t}", "KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName);", "private DataHandler createDataHandler(URL url) throws MalformedURLException {\n return new DataHandler(url);\n }", "public Holiday(int day, int month) {\n\t\tdate = LocalDate.of(2019,month,day);\n\t}", "DomainType createDomainType();", "public void create(Rule event);", "@Override\n\tpublic void deleteHoliday(Holiday holiday) {\n\n\t}", "public Pizza createPizza(String type) {\n\t\tPizza pizza = null;\n\t\tif(type.equals(\"cheese\")) {\n\t\t\tpizza = new CheesePizza();\n\t\t}\n\t\telse if(type.equals(\"pepperoni\")) {\n\t\t\tpizza = new PepperoniPizza();\n\t\t}\n\t\treturn pizza;\n\t}", "public static IntersectionHandler getHandler(String handlerType) {\n return switch (handlerType) {\n case \"simple_semaphore\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 1\n\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has reached the semaphore, \" +\n\t\t\t\t\t\t\t \"now waiting...\");\n\t try {\n\t\t sleep(car.getWaitingTime());\n\t } catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t }\n\t System.out.println(\"Car \" + car.getId() + \" has waited enough, now driving...\");\n\n }\n };\n case \"simple_n_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 2\n\t\t\t\t\tSimpleNRoundabout inter = (SimpleNRoundabout) Main.intersection;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has reached the \" +\n\t\t\t\t\t\t\t\t\t \"roundabout, now waiting...\");\n\t\t\t\t\t\t\t// semafor pt cele n masini\n\t\t\t\t\t\t\tinter.s.acquire();\n\n\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has entered the roundabout\");\n\t\t\t\t\t\t\t// sleep t secunde\n\t\t\t\t\t\t\tsleep(inter.t);\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() +\" has exited the roundabout after \"\n\t\t\t\t\t\t\t\t\t + inter.t + \" seconds\");\n\t\t\t\t\t\t\tinter.s.release();\n\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n }\n };\n case \"simple_strict_1_car_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n\t\t\t\t\t// ex 3\n \tSimpleStrict1Car inter = (SimpleStrict1Car) Main.intersection;\n\t System.out.println(\"Car \"+ car.getId() + \" has reached the roundabout\");\n\n\t try {\n\t \t //semafor de 1 pentru fiecare directie\n\t\t\t inter.s.get(car.getStartDirection()).acquire();\n\n\t\t\t System.out.println(\"Car \"+ car.getId() + \" has entered the roundabout from \" +\n\t\t\t\t\t \"lane \" + car.getStartDirection());\n\t\t\t // sleep t secunde\n\t\t\t sleep(inter.t);\n\t\t\t System.out.println(\"Car \"+ car.getId() +\" has exited the roundabout after \" +\n\t\t\t\t\t inter.t + \" seconds\");\n\t\t\t inter.s.get(car.getStartDirection()).release();\n\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\n }\n };\n case \"simple_strict_x_car_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n\t\t\t\t\t// ex 4\n\t SimpleStrictXCar inter = (SimpleStrictXCar) Main.intersection;\n\t System.out.println(\"Car \"+ car.getId() + \" has reached the roundabout, now waiting...\");\n\n\t try {\n\t \t// bariera pt a se scrie prima oara mesajele de reached\n\t\t inter.barrierAfterReach.await();\n\t } catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t } catch (BrokenBarrierException e) {\n\t\t e.printStackTrace();\n\t }\n\t try {\n\t\t\t try {\n\t\t\t \t// semafor de x pentru fiecare directie\n\t\t\t\t inter.s.get(car.getStartDirection()).acquire();\n\t\t\t\t System.out.println(\"Car \"+ car.getId() + \" was selected to enter the \" +\n\t\t\t\t\t\t \"roundabout from lane \" + car.getStartDirection());\n\t\t\t\t // bariera pt a se scrie mesajele cu selected\n\t\t\t\t inter.barrier.await();\n\t\t\t } catch (BrokenBarrierException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t }\n\n\n\t\t\t System.out.println(\"Car \"+ car.getId() + \" has entered the roundabout from lane\" +\n\t\t\t\t\t \" \" + car.getStartDirection());\n\n\t\t\t\t\t\t\t// sleep t secunde cand masina e in giratoriu\n\t\t\t sleep(inter.t);\n\n\t\t\t try {\n\t\t\t \t// bariera pt a se scrie mesajele cu entered\n\t\t\t\t inter.barrier.await();\n\t\t\t\t System.out.println(\"Car \"+ car.getId() +\" has exited the roundabout after \"\n\t\t\t\t\t\t + inter.t + \" seconds\");\n\t\t\t } catch (BrokenBarrierException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t }\n\n\t\t\t inter.s.get(car.getStartDirection()).release();\n\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\n\n }\n };\n case \"simple_max_x_car_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 5\n // Get your Intersection instance\n\t SimpleMaxXCar inter = (SimpleMaxXCar) Main.intersection;\n try {\n sleep(car.getWaitingTime());\n } catch (InterruptedException e) {\n e.printStackTrace();\n } // NU MODIFICATI\n\n\t try {\n\t\t System.out.println(\"Car \"+ car.getId() + \" has reached the roundabout from lane \"\n\t\t\t\t + car.getStartDirection());\n\t\t // semafor de x pt fiecare directie\n\t\t inter.s.get(car.getStartDirection()).acquire();\n\t\t System.out.println(\"Car \"+ car.getId() + \" has entered the roundabout from lane \"\n\t\t\t\t + car.getStartDirection());\n\n\t\t // sleep t secunde cand masina e in giratoriu\n\t\t sleep(inter.t);\n\n\t\t System.out.println(\"Car \"+ car.getId() +\" has exited the roundabout after \"\n\t\t\t\t + inter.t + \" seconds\");\n\n\t\t inter.s.get(car.getStartDirection()).release();\n\n\t } catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t }\n }\n };\n case \"priority_intersection\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 6\n // Get your Intersection instance\n\t\t\t\t\tPriorityIntersection inter = (PriorityIntersection) Main.intersection;\n try {\n sleep(car.getWaitingTime());\n } catch (InterruptedException e) {\n e.printStackTrace();\n } // NU MODIFICATI\n\n\t // masinile din lane 1 sunt adaugate in queue fara prioritate\n\t if(car.getPriority()==1) {\n\t\t inter.queueLow.add(car);\n\t\t System.out.println(\"Car \"+ car.getId()+\" with low priority is \" +\n\t\t\t\t \"trying to enter the intersection...\");\n\n\t\t // se asteapta pana cand in intersectie nu mai sunt masini\n\t\t // cu prioritate\n\t\t while(!inter.queueHigh.isEmpty()) {}\n\n\t\t // daca nu sunt in intersectie masini cu prioritate\n\t\t if(inter.queueHigh.isEmpty()) {\n\t\t\t try {\n\t\t\t \t// semafor pt ca operatia de poll sa nu se faca in paralel\n\t\t\t\t inter.s.acquire();\n\t\t\t } catch (InterruptedException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t\t // se scoate varful cozii\n\t\t\t Car auxLow = (Car) inter.queueLow.poll();\n\t\t\t System.out.println(\"Car \"+ auxLow.getId()+\" with low priority \" +\n\t\t\t\t\t \"has entered the intersection\");\n\t\t\t inter.s.release();\n\n\n\t\t }\n\n\t }\n\t\t\t\t\t//daca masina are prioritate\n\t else {\n\t\t\t\t\t\t//se adauga in coada cu prioritate\n\t\t inter.queueHigh.add(car);\n\n\n\t \tSystem.out.println(\"Car \"+ car.getId()+\" with high priority has \" +\n\t\t\t\t \"entered the intersection\");\n\t\t try {\n\t\t \t// sleep 2000ms pt fiecare masina cu prioritate\n\t\t\t sleep(2000);\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t System.out.println(\"Car \"+ car.getId()+\" with high priority has \" +\n\t\t\t\t \"exited the intersection\");\n\n\t\t //se scoate din coada\n\t\t inter.queueHigh.poll();\n\n\t }\n\n }\n };\n case \"crosswalk\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 7\n\t\t\t\t\tCrosswalk inter = (Crosswalk) Main.intersection;\n\t\t\t\t\t// 2 variabile ce tin evidenta la ultimul mesaj\n\t\t\t\t\tboolean wasGreen=false, wasRed=false;\n\t\t\t\t\tPedestrians pedestrians = (Pedestrians) Main.pedestrians;\n\n\t\t\t\t\twhile(!pedestrians.isFinished()) {\n\t\t\t\t\t\t// daca nu sunt pietoni\n\t\t\t\t\t\tif(!pedestrians.isPass() && !wasGreen) {\n\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has now green light\");\n\t\t\t\t\t\t\twasGreen = true;\n\t\t\t\t\t\t\twasRed = false;\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// daca sunt pietoni\n\t\t\t\t\t\tif(pedestrians.isPass() && !wasRed) {\n\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has now red light\");\n\t\t\t\t\t\t\twasGreen = false;\n\t\t\t\t\t\t\twasRed = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\t// am observat ca uneori nu toate masinile apuca sa trimita ultimul mesaj\n\t // in cazul acesta il fortez\n\t\t\t\t\tif(!wasGreen)\n\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has now green light\");\n\n\n }\n };\n case \"simple_maintenance\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 8\n \tSimpleMaintenance inter = (SimpleMaintenance) Main.intersection;\n\n\t System.out.println(\"Car \"+ car.getId()+\" from side number \" +\n\t\t\t car.getStartDirection() + \" has reached the bottleneck\");\n\n\t // daca masina vine din directia 0\n\t if(car.getStartDirection()==0) {\n\n\t\t try {\n\t\t \t// semaforul s0 care initial are valoarea = nr de masini permise in\n\t\t\t // acelasi timp de pe un sens\n\t\t\t inter.s0.acquire();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\n\t\t System.out.println(\"Car \"+ car.getId()+\" from side number 0 has passed \" +\n\t\t\t\t \"the bottleneck\");\n\t\t try {\n\t\t \t// bariera cu valoarea = nr de masini permise in acelasi timp pe un sens\n\t\t\t inter.barrier.await();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t } catch (BrokenBarrierException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t // se creste semaforul de pe sensul opus, initializat la 0\n\t\t // se va creste cu nr, avand bariera mai sus\n\t\t inter.s1.release();\n\n\t }\n\t\t\t\t\t//analog ca mai sus , schimband s0 cu s1 si invers\n\t if(car.getStartDirection()==1) {\n\n\t\t try {\n\t\t\t inter.s1.acquire();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\n\t\t System.out.println(\"Car \"+ car.getId()+\" from side number 1 has passed \" +\n\t\t\t\t \"the bottleneck\");\n\t\t try {\n\t\t\t inter.barrier.await();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t } catch (BrokenBarrierException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t inter.s0.release();\n\n\t }\n\n }\n };\n case \"complex_maintenance\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n\n \n }\n };\n case \"railroad\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n\t\t\t\t\t// ex 10\n\t\t\t\t\tRailroad inter = (Railroad) Main.intersection;\n\t\t\t\t\tSystem.out.println(\"Car \" + car.getId() +\" from side number \"+ car.getStartDirection()\n\t\t\t\t\t\t\t +\" has stopped by the railroad\");\n\t\t\t\t\t// adaugare intr-o coada pentru fiecare sens\n\t\t\t\t\tif(car.getStartDirection() ==0 ) inter.queue0.add(car);\n\t\t\t\t\telse inter.queue1.add(car);\n\t try {\n\t \t// bariera pt toate masinile\n\t\t inter.barrier.await();\n\t\t if(car.getId()==0) {\n\t\t\t System.out.println(\"The train has passed, cars can now proceed\");\n\t\t }\n\t\t // bariera pt toate masinile\n\t\t inter.barrier.await();\n\t } catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t } catch (BrokenBarrierException e) {\n\t\t e.printStackTrace();\n\t }\n\n\t // pt masinile din directia 0\n\t if(car.getStartDirection() ==0 ) {\n\t\t try {\n\t\t \t// semafor de valoare 1 pt operatia de poll\n\t\t\t inter.s.acquire();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t // se scoate capul cozii\n\t\t Car aux = (Car) inter.queue0.poll();\n\t\t System.out.println(\"Car \" + aux.getId() +\n\t\t\t\t \" from side number 0 has started driving\");\n\t\t inter.s.release();\n\t }\n\t\t\t\t\t// analog ca mai sus, dar pt sensul celalalt\n\t else {\n\t\t try {\n\t\t\t inter.s.acquire();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t Car aux = (Car) inter.queue1.poll();\n\t\t System.out.println(\"Car \" + aux.getId() +\n\t\t\t\t \" from side number 1 has started driving\");\n\t\t inter.s.release();\n\t }\n\n }\n };\n default -> null;\n };\n }", "Factory<? extends T> buildPersonFactory(String type);", "Alarm createAlarm();", "public DataExchangeFactory(TypeHandlerFactory typeHandlerFactory) {\r\n\t\tthis.typeHandlerFactory = typeHandlerFactory;\r\n\t\tdomDataExchange = new DomDataExchange(this);\r\n\t\tlistDataExchange = new ListDataExchange(this);\r\n\t\tmapDataExchange = new ComplexDataExchange(this);\r\n\t\tprimitiveDataExchange = new PrimitiveDataExchange(this);\r\n\t\tcomplexDataExchange = new ComplexDataExchange(this);\r\n\t}", "Handler create(Encounter<? extends Collector> encounter);", "WithCreate withKind(String kind);", "public interface HotelRfpNegotiationsConfigFactory {\n HotelRfpNegotiationsConfig create(Map<String, String> response);\n}", "public void setHolidayEnumerator(HolidayEnumerator he) {\n _holidayEnumerator = he;\n }", "void onListFragmentInteraction(Holiday holiday);", "public HomePieceOfFurniture createHomePieceOfFurniture(PieceOfFurniture piece) {\n if (piece instanceof DoorOrWindow) {\n return new HomeDoorOrWindow((DoorOrWindow)piece);\n } else if (piece instanceof Light) {\n return new HomeLight((Light)piece);\n } else {\n return new HomePieceOfFurniture(piece);\n }\n }", "public DynamicConfigEvent(Type type, ResourceId path) {\n super(type, path);\n }", "public TypeHandlerFactory getTypeHandlerFactory() {\r\n\t\treturn typeHandlerFactory;\r\n\t}", "BaseResponse getDetail(long holidayID, int companyID);", "void getHolidayDaysById(long id, AsyncCallback<HolidayDays> callback);", "Noodle orderBeefNoodle(String type) {\n /*\n * ues the factory to create noodle by simply passing on the type of the order.\n * we've replaced the new operator with a create method on the factory object,\n * no more concrete instantiation here.\n */\n Noodle noodle = noodleFactory.createNoodle(type);\n\n // if (type.equals(\"thinner\")) {\n // noodle = new ThinnerBeefNoodle();\n // } else if (type.equals(\"thin\")) {\n // noodle = new ThinBeefNoodle();\n // } else if (type.equals(\"thick\")) {\n // noodle = new ThickBeefNoodle();\n // } else {\n // noodle = new BeefNoodle();\n // }\n\n noodle.prepare();\n noodle.make();\n noodle.fill();\n return noodle;\n }", "FuelingStation createFuelingStation();", "public de.hub.clickwatch.model.Handler build() {\n final de.hub.clickwatch.model.Handler _newInstance = de.hub.clickwatch.model.ClickWatchModelFactory.eINSTANCE.createHandler();\n if (m_featureCanReadSet) {\n _newInstance.setCanRead(m_canRead);\n }\n if (m_featureCanWriteSet) {\n _newInstance.setCanWrite(m_canWrite);\n }\n if (m_featureChangedSet) {\n _newInstance.setChanged(m_changed);\n }\n if (m_featureNameSet) {\n _newInstance.setName(m_name);\n }\n if (m_featureTimestampSet) {\n _newInstance.setTimestamp(m_timestamp);\n }\n if (m_featureValueSet) {\n _newInstance.setValue(m_value);\n }\n if (m_featureAnySet) {\n _newInstance.getAny().addAll(m_any);\n }\n if (m_featureMixedSet) {\n _newInstance.getMixed().addAll(m_mixed);\n }\n return _newInstance;\n }", "public static HeavenlyBody addHeavenlyB(String name, double orbitalPeriod, String bodyType){\n if(bodyType.equals(\"planet\".toLowerCase())){\n HeavenlyBody hb = new Planet(name, orbitalPeriod, bodyType);\n planets.add(hb);\n solarSystem.put(hb.getName(),hb);\n return hb;\n }else if (bodyType.equals(\"moon\".toLowerCase())){\n HeavenlyBody hb = new Moon(name,orbitalPeriod,bodyType);\n moons.add(hb);\n solarSystem.put(hb.getName(),hb);\n return hb;\n }else {\n System.out.println(\"Body type not supported !\");\n return null;\n }\n }", "Sticker.Factory getStickerFactory();", "private HandlerRegistryInfo createHandlerRegistryInfo(String propName)\r\n throws CockpitConfigurationException {\r\n // compile the regex pattern for\r\n // 'phaseTypeId,phaseTypeName,phaseOperationEnumName' format.\r\n Pattern pattern = Pattern.compile(\"^(\\\\d+),([[\\\\w*][\\\\W*]]+),(\\\\w+)$\");\r\n\r\n // create matcher\r\n Matcher matcher = pattern.matcher(propName);\r\n\r\n if (matcher.find()) {\r\n // creates PhaseType instance\r\n long phaseTypeId = Long.parseLong(matcher.group(1));\r\n PhaseType phaseType = new PhaseType(phaseTypeId, matcher.group(2));\r\n\r\n // creates HandlerRegistryInfo instance with the phase type and\r\n // corresponding phase operation\r\n String opName = matcher.group(3);\r\n\r\n if (PhaseOperationEnum.START.getName().equalsIgnoreCase(opName)) {\r\n return new HandlerRegistryInfo(phaseType, PhaseOperationEnum.START);\r\n } else if (PhaseOperationEnum.END.getName().equalsIgnoreCase(opName)) {\r\n return new HandlerRegistryInfo(phaseType, PhaseOperationEnum.END);\r\n } else if (PhaseOperationEnum.CANCEL.getName().equalsIgnoreCase(opName)) {\r\n return new HandlerRegistryInfo(phaseType, PhaseOperationEnum.CANCEL);\r\n } else {\r\n // the phase operation is unknown\r\n throw new CockpitConfigurationException(\"The third field of child property name '\" + propName\r\n + \"' in 'handlers' property should be a name defined in '\" + PhaseOperationEnum.class\r\n + \"', [start, end or cancel]\");\r\n }\r\n } else {\r\n throw new CockpitConfigurationException(\r\n \"A child property name in 'handlers' property should be in format of \"\r\n + \"'phaseTypeId,phaseTypeName,phaseOperationEnumName' where phaseTypeId is not negative long value\");\r\n }\r\n }", "Event createEvent();", "Event createEvent();", "Weather create(WeatherInformation weatherInformation);", "ActionType createActionType();", "public void makeEvent(String type) {\n\t\teventName = type;\n\t}", "SectionType createSectionType();", "<C> ContentHandle<C> newHandle(Class<C> type);", "GetDomainType createGetDomainType();", "public interface CommandHandlerFactory {\n public CommandHandler getHandler(Command command);\n}", "public static Factory factory() {\n return ext_h::new;\n }", "public interface RentalFactory {\n\n Rental createRental(String pickUpdate, String returnDate, List<PaymentMethod> paymentMethod);\n\n}", "public Handler createHandler(Looper looper) {\n return new CatchingWorkerHandler(looper);\n }", "HxType createType(final String className);", "public static <T> Registry<T> createRegistory(Consumer<Builder<T>> consumer,\n\t\t\tFunction<String, Factory<T>> errorHandler) {\n\t\tMap<String, Factory<T>> registryMap = new HashMap<>();\n\n\t\tBuilder<T> builder = (type, factory) -> registryMap.put(type, factory);\n\t\tconsumer.accept(builder);\n\t\treturn personType -> registryMap.computeIfAbsent(personType, errorHandler);\n\n\t}", "public FoodNotificationReceiver(Handler handler) {\n\t super(handler);\n\t }", "public static Factory factory() {\n return ext_accdt::new;\n }", "abstract public TelnetServerHandler createHandler(TelnetSocket s);", "public HeandlerI makePersonCreator() {\n return new HeandlerFileImpl();\n }" ]
[ "0.6496213", "0.58100975", "0.57295346", "0.56771326", "0.5549455", "0.55054766", "0.54147106", "0.539976", "0.53863597", "0.5257558", "0.521602", "0.511642", "0.51052415", "0.5063001", "0.5056639", "0.50101423", "0.49395472", "0.49054033", "0.4887658", "0.4884352", "0.48706", "0.48652092", "0.48605138", "0.48508698", "0.48446417", "0.48396334", "0.48393112", "0.4825044", "0.4785578", "0.47773373", "0.47727534", "0.47555512", "0.47531688", "0.47297662", "0.47290885", "0.47236797", "0.46985543", "0.46767247", "0.46694797", "0.46593526", "0.46574956", "0.46537694", "0.4644695", "0.46412215", "0.46220282", "0.4621081", "0.46051964", "0.4597463", "0.4572434", "0.45424274", "0.45324978", "0.45266065", "0.4515364", "0.45150924", "0.45104873", "0.4507449", "0.44956177", "0.4485167", "0.44792435", "0.44784626", "0.44774243", "0.44643947", "0.44571996", "0.44542208", "0.44454306", "0.443414", "0.44212437", "0.44200388", "0.44147438", "0.44145125", "0.44144896", "0.441395", "0.4403874", "0.44029015", "0.44010803", "0.44009236", "0.43987018", "0.4397518", "0.43959397", "0.43927068", "0.43925664", "0.4383758", "0.4382871", "0.4382871", "0.4379313", "0.43763843", "0.43733585", "0.43726212", "0.43646523", "0.43576273", "0.4351407", "0.43508267", "0.43491706", "0.43488172", "0.4342467", "0.43355536", "0.43346113", "0.4330067", "0.43293712", "0.43247536" ]
0.78873014
0
The presenter instance to test.
@Before public void setup() { presenter = new MapEditor(view, valueChangeEvent); assertEquals(view.asWidget(), presenter.asWidget()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final P getPresenter() {\n return presenter;\n }", "@Test\n public void createPresenter_setsThePresenterToView() {\n historyPresenter = new HistoryPresenter(historyView, remoteDataSource,\n sharedPreferenceService);\n\n // Then the presenter is set to the view.\n verify(historyView).setPresenter(historyPresenter);\n }", "@Test\n public void createPresenter_setsThePresenterToView() {\n mEntryDetailPresenter = new EntryDetailPresenter(\n mEntryRepository, mEntryDetailView);\n\n // Then the presenter is set to the view\n verify(mEntryDetailView).setPresenter(mEntryDetailPresenter);\n }", "void setupPresenter() {\n mPresenter = new leaguePresenter(this);\n ScheduleList.getInstance().setPresenter(mPresenter);\n }", "private static LoginRequiredPagePresenter createPresenter() {\r\n ClientSession session = mock(ClientSession.class);\r\n SystemStateInjector systemStateInjector = mock(SystemStateInjector.class);\r\n when(systemStateInjector.getSession()).thenReturn(session);\r\n ExternalEventBus eventBus = mock(ExternalEventBus.class);\r\n ILoginRequiredPageView view = mock(ILoginRequiredPageView.class);\r\n\r\n LoginRequiredPagePresenter presenter = new LoginRequiredPagePresenter();\r\n presenter.setSystemStateInjector(systemStateInjector);\r\n presenter.setEventBus(eventBus);\r\n presenter.setView(view);\r\n\r\n assertSame(systemStateInjector, presenter.getSystemStateInjector());\r\n assertSame(session, presenter.getSession());\r\n assertSame(eventBus, presenter.getEventBus());\r\n assertSame(view, presenter.getView());\r\n\r\n return presenter;\r\n }", "private static AccountLockedPagePresenter createPresenter() {\r\n ExternalEventBus eventBus = mock(ExternalEventBus.class);\r\n IAccountLockedPageView view = mock(IAccountLockedPageView.class);\r\n\r\n AccountLockedPagePresenter presenter = new AccountLockedPagePresenter();\r\n presenter.setEventBus(eventBus);\r\n presenter.setView(view);\r\n\r\n assertSame(eventBus, presenter.getEventBus());\r\n assertSame(view, presenter.getView());\r\n\r\n return presenter;\r\n }", "interface MainPresenter {\n}", "@Override\r\n\tprotected void initializePresenter() {\n\r\n\t}", "public interface IView {\n void initializePresenter();\n BasePresenter getPresenter();\n}", "protected abstract void onPresenter();", "private void initPresenter() {\n\n RequestQueue requestQueue = App.getInstance().getRequestQueue();\n CatsHttp catsHttp = new VolleyCatsHttp(requestQueue);\n\n CatsRepository catsRepository = new CatsRepository(catsHttp);\n\n presenter = new MainPresenter(catsRepository);\n presenter.bindView(this);\n }", "public interface Presenter {\n}", "public abstract void setupMvpPresenter();", "public interface IMainPresenter {\n}", "public PrePareLivePresenter createPresenter() {\n return new PrePareLivePresenter(this.mContext, this);\n }", "@Override\r\n\tpublic void setPresenter(Presenter<UserDetails> presenter) {\n\t\t \r\n\t\tthis.presenter = presenter;\r\n\t\r\n\t\t \r\n\t}", "public bhi createPresenter() {\n return new bhi(this);\n }", "void setPresenter(P2Presenter ctrl);", "public GUIPresenter getGuiPresenter() {\n return guiPresenter;\n }", "interface presenter {\n void requestDataFromServer();\n\n void onRefreshButtonClick();\n\n void onDestroy();\n }", "public interface Reeve_presenter {\n void reSetPsw();\n}", "@SuppressWarnings(\"unchecked\")\n @NonNull\n protected V getPresenterViewHost() {\n return (V) this;\n }", "public interface PresenterInterface {\n}", "public interface MainPresenter {\n\tvoid onStartStateLoading();\n\n\tvoid onPresenterAttached(MainView mainView);\n\n\tvoid onPresenterDeattached();\n}", "public interface DetailsPresenter {\n\n void init();\n\n void getEvents();\n}", "public interface INewsPresenter {\n void callResponce();\n}", "interface Presenter extends BaseMVPPresenter<View> {\n void loadHelloText();\n }", "private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }", "public BrowserPresenter create() {\n return new BrowserPresenter(context);\n }", "public interface BasePresenter {\n}", "public interface BasePresenter {\n}", "public interface BasePresenter {\n\n}", "public interface BasePresenter {\n\n}", "public SlackPresenter() {\n if (this.slackService == null) {\n this.slackService = new SlackService();\n }\n }", "@Override\n public void setPresenter (SignUpContract.Presenter presenter){\n mSignUpPresenter = presenter;\n }", "public interface BasePresenter {\r\n}", "public IEntityPresenter<DataConnection> getPresenter()\n\t{\n\t\treturn this.presenter;\n\t}", "private void initMVP() {\n mainPresenter = new MainPresenter(this, getActivity());\n }", "MainPresenter(MainContract.View view) {\n this.view = view;\n model = new AmicableModel();\n }", "@Before\n public void resetPresenter() {\n presenter = new SearchPresenter(view);\n presenter.setAccount(new AccountDAO().findAccount(\"[email protected]\").getId());\n }", "public interface ExplorePresenter extends BasePresenter {\n\n void getRecommendedMovies();\n}", "private InCallPresenter() {\n }", "public interface BasePresenter {\n void init();\n}", "public Presentation getPresentation() {\n return presentation;\n }", "public interface IBasePresenter {\n\n}", "public interface ProjectHomePresenter {\n\n void init();\n\n}", "public interface MainScreenPresenter {\n}", "Presenter(MainActivity mainActivity){\n this.mainActivity = mainActivity;\n lingoGuess = new LingoGuess();\n }", "public interface IPresenter {\n}", "public interface ISplashPresenter extends IPresenter {\n boolean loadData();\n}", "protected abstract P onLoadPresenter(Bundle savedInstanceState);", "interface IBasePresenter {\n}", "public interface BasePresenter {\n// void start();\n\n\n\n\n}", "@Override\n protected MyInfoPresenter createPresenter() {\n return new MyInfoPresenter(MyInfoActivity.this);\n }", "public ChoosePagePresenter() {\n// mGetKnowledgeHierarchyDataFromNet = new GetKnowledgeHierarchyDataFromNet();\n dataManager = DataManager.getInstance();\n }", "Presentation getPresentation();", "@Override\n protected ActiveAreaPresenter createPresenter() {\n return new ActiveAreaPresenter(this);\n }", "public interface PersonDetailsPresenter {\n void getPersonData(String personId);\n void destroy();\n\n}", "public interface IAlbumPresenter {\n\n void loadAlbum();\n}", "public interface Presenter {\n void onCreate();\n\n void onStart();\n\n void onResume();\n\n void onPause();\n\n void onStop();\n\n void onDestroy();\n\n void onAttachView(BookView view);\n\n}", "@Before\n public void setup() {\n RoboGuice.overrideApplicationInjector(RuntimeEnvironment.application, new MyTestModule());\n mainPresenter = new MainPresenter(\n RuntimeEnvironment.application.getApplicationContext(), loginViewMock);\n\n }", "public LoginPresenter(MainView mainView)\n {\n this.mainView = mainView;\n }", "public interface RifaMainPresenter {\n void onCreate();\n void onDestroy();\n\n void getRifas();\n void saveFirma(Rifa rifa);\n void removeRifa(Rifa rifa);\n void onEventMainThread(RifaMainEvent event);\n\n RifaMainView getView();\n}", "public interface WelfarePresenter {\n void getData(int page);\n}", "public interface GamesCalendarPresenter {\n\n void setView(GamesCalendarView view);\n}", "public interface BasePresenter {\n void start();\n}", "public interface BasePresenter {\n void start();\n}", "public interface BasePresenter {\n\n void start();\n}", "public interface BasePresenter {\n\n void start();\n}", "public interface BasePresenter {\n\n void start();\n}", "public interface BasePresenter {\r\n\r\n void start();\r\n\r\n}", "public interface BasePresenter {\n\n void start();\n\n}", "public interface BasePresenter {\n void start();\n}", "public interface BasePresenter {\n void start();\n}", "public interface BasePresenter {\n void start();\n}", "public interface BasePresenter {\n void start();\n}", "protected abstract void startMvpPresenter();", "public interface BasePresenter {\n\n public void start();\n\n}", "public interface IMvpPresenter<V extends IMvpView> {\n void attachView(V view);\n\n void detachView();\n\n boolean isViewAttached();\n}", "@Override\n\tpublic void setPresenter(Presenter listener) {\n\t\tthis.listener = listener;\n\t}", "public BrowserPresenterFactory(Context context) {\n this.context = context;\n }", "public interface BasePresenter {\n\n /**\n * View 生命周期开始 调用start()\n */\n void start();\n}", "public Presentation getPresentation()\r\n\t{\r\n\t\treturn this.presentation;\r\n\t}", "interface Presenter {\n void validadteSections(Sections sections);\n void add(Sections sections);\n void edit(Sections sections);\n }", "public interface IWelcomePresenter {\n}", "interface Presenter{\n void findUserData(String clientMail);\n }", "interface ViewToPresenter extends Presenter<PresenterToView> {\n\n\n void onAddClicked();\n\n\n }", "@Before\n public void setupIntroductionScreen() {\n MockitoAnnotations.initMocks(this);\n\n // Get a reference to the class under test\n presenter = new IntroductionPresenter(new IntroductionState());\n\n // Inject dependencies to the class under test\n presenter.injectView(new WeakReference<>(viewMock));\n presenter.injectModel(modelMock);\n presenter.injectRouter(routerMock);\n\n }", "public interface MapsPresenter extends Presenter{\n\n public void setView(MapsView mapsView);\n\n public void setUpMap();\n\n public void signedIn(Bundle extras);\n\n public void markerClicked(String markerId);\n\n}", "public interface Presenter {\n\n void onCreate();\n void onPause();\n void onResume();\n void onDestroy();\n}", "@Override\n\tprotected Presentation getFixture() {\n\t\treturn (Presentation)fixture;\n\t}", "public interface IWaitroomPresenter {\n\n // View -> Facade\n void changePlayerColor(int color);\n\n void leaveGame();\n\n void startGame();\n\n // Model -> View\n void updatePlayerList();\n\n boolean gameReady();\n\n void startGameResponse(String message);\n\n void leaveGameResponse(String message);\n\n void detachView();\n}", "public interface MoviePresenter {\n\n public void getUpcomingMovieData();\n\n public void getTopRatedMovieData();\n\n public void getNowPlayingMovieData();\n\n public void getPopularMovieData();\n\n public List<Movies> getPopularTvShowsData();\n\n public void getTopRatedTvShowsData();\n\n public void getSearchForMovies(String query);\n\n public Result getResult();\n\n public void setResult(Result result);\n\n public List<Movies> getMovieLst();\n\n public void setMovieLst(ArrayList<Movies> movieLst);\n\n public void onResumePresenter();\n\n}", "public interface Presenter {\n\n void onStart();\n\n void onStop();\n\n void onPause();\n\n void attachView(View v);\n\n void attachIncomingArg(Bundle intent);\n\n void onCreate();\n\n void onDestroy();\n}", "@Override\n public void setPresenter(NotificationsTodayContract.Presenter presenter) {\n mPresenter = checkNotNull(presenter);\n }", "@Override\n public void setPresenter(ProcessContract.Presenter presenter) {\n if(presenter != null) this.processPresenter = presenter;\n else throw new RuntimeException(\"Process presenter can not be null\");\n }", "public BatchClassManagementPresenter getMainPresenter() {\n\t\treturn batchClassManagementPresenter;\n\t}", "public interface BasePresenter<T> {\n\n void setView(T view);\n\n void start();\n}", "public interface IMainPresenter {\n void initialize();\n Fragment getFragments(int page);\n}", "public RegisterPresenter(IRegisterView rv){\n\t\tregview = rv;\n\t}" ]
[ "0.7959354", "0.73398566", "0.7213276", "0.69722176", "0.69706696", "0.6953242", "0.68344307", "0.67903537", "0.6644641", "0.6640357", "0.6614062", "0.6563872", "0.6553205", "0.6535345", "0.653164", "0.64887005", "0.64638674", "0.6431495", "0.64133316", "0.63614726", "0.6359346", "0.6296397", "0.6293287", "0.6288196", "0.62722015", "0.62691116", "0.6263728", "0.62623745", "0.62567884", "0.62105554", "0.62105554", "0.62083936", "0.62083936", "0.62033135", "0.6178428", "0.6177143", "0.6172837", "0.61601007", "0.61559296", "0.61241895", "0.611272", "0.610431", "0.6096136", "0.6091664", "0.6082418", "0.60822237", "0.60706663", "0.60680795", "0.60654736", "0.60639715", "0.6061661", "0.60593545", "0.605205", "0.60351336", "0.6003848", "0.599417", "0.59904474", "0.5983647", "0.59791803", "0.5966942", "0.5950089", "0.5932549", "0.593248", "0.59220874", "0.5921138", "0.592044", "0.592044", "0.59184796", "0.59184796", "0.59184796", "0.59119564", "0.5904064", "0.5901902", "0.5901902", "0.5901902", "0.5901902", "0.5888126", "0.58862215", "0.5882568", "0.5867876", "0.58603555", "0.58600914", "0.5846061", "0.584333", "0.58266056", "0.5826027", "0.58216804", "0.58006203", "0.580037", "0.57951397", "0.5791849", "0.577892", "0.57677275", "0.5765611", "0.5761495", "0.5761158", "0.5753987", "0.57520115", "0.5751687", "0.5749305" ]
0.5785487
91
This will get the test data from testng.xml file where parameters are defined
@Test @Parameters({"url","username","password"}) public void parameterAnnoTest(String url ,String username, String password) throws Exception { //hit url driver.get(url); //Enter email & password driver.findElement(By.id("user-name")).sendKeys(username); driver.findElement(By.id("password")).sendKeys(password); Thread.sleep(2000); //Click on Login button driver.findElement(By.xpath("//input[@value='LOGIN']")).click(); Thread.sleep(2000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getConfigParameters(String[] parameters, Map<String, String> params,\n String testName) {\n for (int i = 0; i < parameters.length; i++) {\n params.put(parameters[i], null);\n }\n Log.v(TAG, \"[\" + testName + \"] \" + \"params.size() = \" + params.size());\n File f = new File(CONFIG_FILE);\n assertTrue(testName + \" test file not exists: \" + CONFIG_FILE, f.exists());\n // test suite\n XmlParser parser = new XmlParser(CONFIG_FILE);\n Node testSuiteNode = parser.getRootNode();\n String testSuiteName = parser.getAttrValue(testSuiteNode, \"name\");\n Log.v(TAG, \"[\" + testName + \"] \" + \"testSuiteName = \" + testSuiteName);\n // test case\n Node testCaseNode = null;\n String testCaseName = null;\n NodeList nodeListTestCase = parser.getNodeList(testSuiteNode, \"TestCase\");\n for (int i = 0; i < nodeListTestCase.getLength(); i++) {\n testCaseNode = nodeListTestCase.item(i);\n String tempTestCaseName = parser.getAttrValue(testCaseNode, \"name\");\n Log.v(TAG, \"[\" + testName + \"] \" + \"testCaseName = \" + tempTestCaseName);\n if (0 == tempTestCaseName.compareTo(TAG)) {\n testCaseName = tempTestCaseName;\n break;\n }\n }\n // test\n NodeList nodeList = parser.getNodeList(testCaseNode, \"Test\");\n for (int i = 0; i < nodeList.getLength(); i++) {\n Node testNode = nodeList.item(i);\n String tempTestName = parser.getAttrValue(testNode, \"name\");\n Log.v(TAG, \"[\" + testName + \"] \" + \"testName = \" + tempTestName);\n if (0 == tempTestName.compareTo(testName)) {\n for (int j = 0; j < params.size(); j++) {\n String attrValue = parser.getAttrValue(parser.getNodeByName(testNode,\n parameters[j]), \"value\");\n params.put(parameters[j], attrValue);\n Log.v(TAG, \"[\" + testName + \"] \" + \"param = \" + parameters[j] + \" value = \"\n + params.get(parameters[j]));\n }\n break;\n }\n }\n }", "@Test\n public void testFromXMLFile() {\n }", "private void getParameters() {\r\n\t\ttry {\r\n\t\t\tp_encoding = \"ISO-8859-1\";\r\n\t\t\tp_page_encoding = \"utf-8\";\r\n\t\t\tp_labels_data_file = \"resources/units/labels.txt\";\r\n\t\t\tp_multiplier_data_file = \"resources/units/muldata.txt\";\r\n\t\t\tp_category_data_file = \"resources/units/catdata.txt\";\r\n\t\t\tp_unit_data_file = \"resources/units/unitdata.txt\";\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treadDataFile(0, p_multiplier_data_file); //read data from external text file\r\n\t\treadDataFile(1, p_category_data_file); //read data from external text file\r\n\t\treadDataFile(2, p_unit_data_file); //read data from external text file\r\n\t\treadDataFile(3, p_labels_data_file); //read data from external text file\r\n\t}", "public abstract Instances _getTestingFromParams(String params);", "public void readParameters() {\r\n File directory = new File(OptionItems.XML_DEFINITION_PATH);\r\n if (directory.exists()) {\r\n parameterParserXML.readParameterDefinition(configData.getParameterList());\r\n parameterParserXML.processParameterDependency();\r\n }\r\n\r\n Log.info(\"info.progress_control.load_parameter_description\");\r\n }", "public interface IXMLDataProvider {\r\n \r\n /**\r\n * Returns the root node of the XML file.\r\n * @return\tthe root node of the XML file\r\n * @throws TestDataException\tthrown, when parsing errors occur\r\n */\r\n public Node getRootNode() throws Exception;\r\n \r\n /**\r\n * Returns the number of XML data nodes matching the given node name\r\n * @param parent the parent node where to look for child nodes with the specified name\r\n * @param nodeName\tthe node name\r\n * @return\tthe number of nodes in the XML file\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public int countNodesByName(Node parent, String nodeName) throws Exception;\r\n \r\n /**\r\n * Returns an array containing all nodes matching thi given node name\r\n * @param parent\tthe parent node where to look for nodes with the specified node name\r\n * @param nodeName\tthe name of the node\r\n * @return\tan array containing all node names, if there are no nodes matching the geven name, NULL is returned\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public Node [] getNodesByName(Node parent, String nodeName) throws Exception;\r\n \r\n /**\r\n * Returns the node value of a given node.\r\n * @param node\tthe requested node\r\n * @return\ta string representing the node value\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public String getNodeValue(Node node) throws Exception;\r\n \r\n \r\n /**\r\n * Returns the attribute value of a given attribute name within the provided node.\r\n * @param node\tthe node where to look for the attribute\r\n * @param attributeName\tthe name of the attribute to look for\r\n * @return\ta string representing the attribute value\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public String getAttributeValue(Node node, String attributeName) throws Exception;\r\n \r\n public int getNumAttributes(Node node) throws Exception ;\r\n \r\n /**\r\n * Parses an XML file specified by the given file name.\r\n * @param fileName\tthe file name of the XML file\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public void parse(String fileName) throws Exception;\r\n}", "@TestMethod(value=\"testGetParameters\")\n public Object[] getParameters() {\n // return the parameters as used for the descriptor calculation\n Object[] params = new Object[3];\n params[0] = maxIterations;\n params[1] = lpeChecker;\n params[2] = maxResonStruc;\n return params;\n }", "@Test\n public void run_main(){\n\n String resource_folder = (new File(\"src/test/resources/\")).getAbsolutePath()+ File.separator ;\n\n String[] args = new String[7];\n args[0] = \"-run\";\n args[1] = resource_folder + \"test_configs/line_ctm.xml\";\n args[2] = \"mytest\";\n args[3] = resource_folder+\"sample_output_request.xml\";\n args[4] = \"temp\";\n args[5] = \"0\";\n args[6] = \"100\";\n\n OTM.main(args);\n\n }", "private void SetParameters(XmlTest test){\r\n\t\t for (Map.Entry<String,String> entry : TestsParamList.get(test.getName()).entrySet()){\r\n\t\t\t test.addParameter(entry.getKey(), entry.getValue());\r\n\t\t }\r\n\t}", "public static void main(String[] args) {\n\t\tTestListener listener=new TestListener();\r\n\t\tXmlSuite suite=new XmlSuite();\r\n\t\tsuite.setName(\"Test Results\");\r\n\t\tsuite.setParallel(ParallelMode.METHODS);\r\n\t\tsuite.setThreadCount(Integer.parseInt(TestProperties.THREAD_COUNT.toString()));\r\n\t\tList<XmlSuite> suits=new ArrayList<XmlSuite>();\r\n\t\tsuits.add(suite);\r\n\r\n\r\n\t\tList<XmlPackage> xpackage=new ArrayList<XmlPackage>();\r\n\t\txpackage.add(new XmlPackage(TestProperties.TESTNG_PACKAGE.toString()));\r\n\r\n\t\t\r\n\t\tXmlTest test=new XmlTest(suite);\r\n\t\ttest.setPackages(xpackage);\r\n\t\tString groups=TestProperties.TESTNG_GROUP.toString();\r\n\t\tString groupArray[]=groups.split(\",\");\r\n\t\tList<String> includedGroups=new ArrayList<String>();\r\n\t\tincludedGroups.addAll(Arrays.asList(groupArray));\r\n\t\ttest.setIncludedGroups(includedGroups);\r\n\t\r\n\t\t\r\n\t\tTestNG tng=new TestNG();\r\n\t\ttng.setOutputDirectory(System.getProperty(\"user.dir\")+\"\\\\test-output\\\\\");\r\n\t\ttng.setXmlSuites(suits);\r\n\t\ttng.addListener((ITestNGListener) listener);\r\n\t\ttng.run();\r\n\t\tSystem.exit(0);\r\n\t}", "@DataProvider\r\n\t\t public Object[][] getTestData()\r\n\t\t\t{\r\n\t\t\t \r\n\t\t\t\treturn TestUtil.getData(suiteProductDescPageXls,this.getClass().getSimpleName());\r\n\t\t\t}", "@TestMethod(value=\"testGetParameterNames\")\n public String[] getParameterNames() {\n \tString[] params = new String[3];\n params[0] = \"maxIterations\";\n params[1] = \"lpeChecker\";\n params[2] = \"maxResonStruc\";\n return params;\n }", "@Test\n void loadData() {\n }", "@BeforeSuite(alwaysRun = true)\n\t protected void fetchSuiteConfiguration(ITestContext testContext) {\n\t\ttestUrl = testContext.getCurrentXmlTest().getParameter(\"selenium.url\");\n\t\t// testUrl = TestData.getURL();\n\t\tSystem.out.println(\"======\" + testUrl + \"=========\");\n\t}", "@Test (dataProvider = \"testData\")\n public void readingPropertiesFileTest (final String testUrl, final String userName, final int port) {\n assertWithMessage (\"testurl\").that (testUrl)\n .isNotEmpty ();\n assertWithMessage (\"username\").that (userName)\n .isNotEmpty ();\n assertWithMessage (\"port\").that (port)\n .isNotNull ();\n }", "public void ExecuteTests() throws IOException{\r\n\t\t\r\n\t\tAutomationSuiteRunnerImpl testcaseinfo = new AutomationSuiteRunnerImpl();\r\n\t\ttestcaseinfo.GetTestCaseInformation();\r\n\t\tTestsBrowserList = testcaseinfo.getTestsBrowserList();\r\n\t\tTestsClassesList = testcaseinfo.getTestsClassesList();\r\n\t\tClassesMethodList = testcaseinfo.getClassesMethodList();\r\n\t\tTestsParamList = testcaseinfo.getTestsParamList();\r\n\t\tTestNGConfig = testcaseinfo.getTestNGConfig();\r\n\t\tList<XmlSuite> suites = new ArrayList<XmlSuite>();\r\n\t\t\r\n\t\tlogger.info(\"Generating TestNG.xml file\");\r\n\t\t\r\n\t\t/**\r\n\t\t * The below code creates testNG xmlSuite and sets the configuration\r\n\t\t */\r\n\t\tXmlSuite suite = new XmlSuite();\r\n\t\tsuite.setName(TestNGConfig.get(\"AutomationSuiteName\"));\r\n\t\t\r\n\t\tif(TestNGConfig.get(\"ParallelMode\").toString().equalsIgnoreCase(\"True\")) {\r\n\t\t\tsuite.setParallel(XmlSuite.ParallelMode.TESTS);\r\n\t\t\tsuite.setThreadCount(Integer.parseInt(TestNGConfig.get(\"ThreadCount\")));\r\n\t\t}\r\n\t\telse {\r\n\r\n\t\t\tsuite.setParallel(XmlSuite.ParallelMode.NONE);\r\n\t\t}\r\n\t\t\r\n\t\tsuite.setVerbose(Integer.parseInt(TestNGConfig.get(\"Verbose\")));\r\n\t\tif(TestNGConfig.get(\"PreserveOrder\").toString().equalsIgnoreCase(\"True\"))\r\n\t\t\tsuite.setPreserveOrder(Boolean.TRUE);\r\n\t\telse \r\n\t\t\tsuite.setPreserveOrder(Boolean.FALSE);\r\n\t\t\r\n\t\t\r\n\t\t//suite.addListener(\"frameworkcore.ReportingClass.ListenersImpl\");\r\n\t\t\r\n\t\t/**\r\n\t\t * The below code assigns the Test classes/mathods/parameters to the TestNG Suite\r\n\t\t */\r\n\t\tfor (String key : TestsBrowserList.keySet()){\r\n\t\t\tArrayList<XmlClass> classes = new ArrayList<XmlClass>();\r\n\t\t\tXmlTest test = new XmlTest(suite);\r\n\t\t\ttest.setName(key.toString());\r\n\t\t\tHashMap<String,String> browserinfo = new HashMap<String,String>();\r\n\t\t\tbrowserinfo.put(\"BrowserName\", TestsBrowserList.get(key).toString());\r\n\t\t\ttest.setParameters(browserinfo);\r\n\t\t\tSetParameters(test);\r\n\t\t\tCollection<String> classvalues = TestsClassesList.get(key);\r\n\t\t\tfor(String testclass : classvalues){\r\n\t\t\t\tXmlClass testClass = new XmlClass();\r\n\t\t testClass.setName(testclass);\r\n\t\t Collection<String> methodvalues = ClassesMethodList.get(testclass);\r\n\t\t ArrayList<XmlInclude> methodsToRun = new ArrayList<XmlInclude>();\r\n\t\t for(String method: methodvalues){\r\n\t\t \tif(method.toLowerCase().contains(\"tag\")||method.toLowerCase().contains(\"ignore\"))\r\n\t\t \t\tlogger.info(\"Method \" + method + \" will not run\" );\r\n\t\t \telse\r\n\t\t \t\tmethodsToRun.add(new XmlInclude(method));\r\n\t\t }\r\n\t\t testClass.setIncludedMethods(methodsToRun);\r\n\t\t \r\n\t\t classes.add(testClass);\r\n\t\t\t}\r\n\t\t\ttest.setXmlClasses(classes);\r\n\t\t}\r\n\t\t\r\n\t\tsuites.add(suite);\r\n\t\t\r\n\t\t/**\r\n\t\t * Writing the TestNG.xml information to a file\r\n\t\t */\r\n\t\t FileWriter writer;\r\n\t\t File TestNGFile = new File(\"TestNG.xml\");\r\n\t\t if(TestNGFile.exists())\t\t\t\t\t\t// Delete TestNG if exists\r\n\t\t\t TestNGFile.delete();\r\n\t\t \r\n\t\t\twriter = new FileWriter(TestNGFile);\r\n\t\t\t writer.write(suite.toXml());\r\n\t\t writer.flush();\r\n\t\t writer.close();\r\n\t\t logger.info(\"TestNG file Generated Successfully\");\r\n\t\t\r\n\t\tTestNG tng = new TestNG();\r\n\t\ttng.setXmlSuites(suites);\r\n\t\ttng.run(); \r\n\t\t\r\n\t}", "String getExampleParameters();", "@Test\n public void testGetAnalyzedData() {\n System.out.println(\"getAnalyzedData\");\n \n }", "@TestMethod(value=\"testGetParameters\")\n public Object[] getParameters() {\n // return the parameters as used for the descriptor calculation\n Object[] params = new Object[1];\n params[0] = maxIterations;\n return params;\n }", "public List<Object[]> gatherData() {\n String testDir = System.getProperty(\"test.dir\");\n logger.info(\"Data from: \" + testDir);\n String testFilter = System.getProperty(\"test.filter\");\n List<Object[]> result = new ArrayList<Object[]>();\n File testDirFile = new File(testDir);\n File rootConfigFile = new File(testDirFile, \"config.properties\");\n Properties rootProp = new Properties();\n InputStream rootIn = null;\n try {\n rootIn = new FileInputStream(rootConfigFile);\n rootProp.load(rootIn);\n } catch (IOException e) {\n // if we can't get root properties, we just take empty root\n // properties\n rootProp = new Properties();\n } finally {\n IOUtils.closeQuietly(rootIn);\n }\n\n File[] childFiles = null;\n if (testFilter == null) {\n childFiles = testDirFile.listFiles();\n } else {\n String[] wildcards = testFilter.split(\";\");\n childFiles = testDirFile\n .listFiles((FilenameFilter) new WildcardFileFilter(\n wildcards));\n }\n int idx = 0;\n for (File child : childFiles) {\n if (child.isDirectory() && directoryContainsConfig(child)) {\n File configFile = new File(child, \"config.properties\");\n Properties prop = new Properties();\n InputStream in = null;\n try {\n in = new FileInputStream(configFile);\n prop.load(in);\n \n String parent = prop.getProperty(PARENT_CFG);\n if(parent != null) {\n \tFile parentFile = new File(child, parent);\n \tif(parentFile.exists()) {\n \t\tprop.clear();\n \t\tprop.load(new FileInputStream(parentFile));\n \t\tprop.load(new FileInputStream(configFile));\n \t}\n }\n \n if (isSupportedTestType(prop)) {\n Object[] data = extractDataFromConfig(configFile,\n rootProp, prop);\n result.add(data);\n String testName = idx + \"-\" + data[1].toString();\n ((BaseSignatureTestData)data[2]).setUniqueUnitTestName(testName);\n idx++;\n }\n } catch (IOException e) {\n logger.warn(\n \"Could not run test with config:\"\n + configFile.getAbsolutePath(), e);\n } finally {\n if (in != null)\n IOUtils.closeQuietly(in);\n }\n }\n }\n return result;\n }", "@DataProvider(name=\"Unverified test data\")\n\t\n\tpublic String[][] getTestData()\n\t {\n\t\tlog.info(\"reading exceldata\");\n\t\tString[][] testRecords=getData(\"Other.xlsx\", \"Unverified\");\n\t\treturn testRecords;\n\t }", "@Test\n public void test_get_scenario_names(){\n try {\n TestData X = new TestData(\"project2.opt\");\n Collection<String> x = X.project.get_scenario_names();\n assertEquals(1,x.size());\n assertTrue(x.contains(\"scenarioA\"));\n assertFalse(x.contains(\"scenarioB\"));\n } catch (Exception e) {\n fail(e.getMessage());\n }\n }", "@Test\n public void testGetConfig() throws Exception {\n\n String value = service.getConfig();\n assertEquals(\"training\", value);\n }", "public void setUpTestdata() {\n\t\tsetDefaultUserName(Config.getProperty(\"defaultUserName\"));\r\n\t\tsetDefaultPassword(Config.getProperty(\"defaultPassword\"));\r\n\t\tsetTestsiteurl(Config.getProperty(\"testsiteurl\"));\r\n\t\tsetChromeDriverPath(Config.getProperty(\"chromeDriverPath\"));\r\n\t\tsetGeckoDriverPath(Config.getProperty(\"geckoDriverPath\"));\r\n\t\tsetIeDriverPath(Config.getProperty(\"ieDriverPath\"));\r\n\t}", "@DataProvider(name=\"testdata\")\n\tpublic Object[][] getData()\n\t{\t\n\t\tString projectPath = System.getProperty(\"user.dir\");\n\t\tObject[][] data= testData(projectPath+\"/excel/data.xlsx\", \"Sheet1\");\n\t\treturn data;\n\t}", "public String getTestData(RequestTestDataType testData) {\n return testDataMap.get(testData);\n }", "@TestMethod(value=\"testGetParameterNames\")\n public String[] getParameterNames() {\n String[] params = new String[1];\n params[0] = \"maxIterations\";\n return params;\n }", "@Test\n public void retrieveDataSourceTest() throws IdfyException, Exception {\n TemplatePreview model = new TemplatePreview.Builder().build();\n String xmlTempalte = new String(\"123\");\n api.retrieveDataSource(model, xmlTempalte);\n }", "@Override\n public int getTestCaseTotal() {\n return parameters.length;\n }", "@Test\n public void firstConfigTest(){\n Driver.getDriver().get(ConfigReader.getProperty(\"app_url\"));\n\n //Assert the title equals : Caretta Hotel - Home\n String actualTitle = Driver.getDriver().getTitle();\n String expectedTitle = ConfigReader.getProperty(\"app_title\");\n Assert.assertEquals(actualTitle,expectedTitle);\n }", "public static String getTestdataContext() {\r\n if (testdataContext == null) {\r\n testdataContext = PropertiesProvider.getInstance().getProperty(\"testdata.context\", \"/testdata\");\r\n }\r\n return testdataContext;\r\n }", "@DataProvider ( name = \"CreditCardTestData\" )\r\n\t\r\n\tpublic static String[][] getTestDataForCreditCardValidations(){\r\n\t\t\r\n\t\tString[][] CreditCardCheckTestData ;\r\n\t\t\r\n\t\tCreditCardCheckTestData = TestDataInput.getMatchedInputTableRowsForApplCodeAndTestDataType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tPaymentMethod.TestDataSheetName,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tTestApplicationParams.getCurrentTestApplication(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"CreditCardTest\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\r\n\t\treturn (CreditCardCheckTestData);\r\n\t\t\r\n\t}", "@SuppressWarnings(\"rawtypes\")\n @Parameters(name=\"{0}\")\n public static Collection data() {\n\t \n\tGlobalVars testVars2 = new GlobalVars();\n return Arrays.asList(testVars2.getBrowsers());\n }", "@SuppressWarnings(\"rawtypes\")\n @Parameters(name=\"{0}\")\n public static Collection data() {\n\t \n\tGlobalVars testVars2 = new GlobalVars();\n return Arrays.asList(testVars2.getBrowsers());\n }", "@Parameters({\"name\", \"lastName\"})\n @Test\n public void test1(String name, String lastName){\n System.out.println(\"Name is \"+ name);\n System.out.println(\"Last name is \"+ lastName);\n }", "public Parameters getConfigParameters();", "public static void main (String [] args) {\r\n TestNG runner= new TestNG();\r\n suitefiles=new ArrayList<String>();\r\n checkarguments(args);\r\n //suitefiles.add(\"C:\\\\data\\\\workspace\\\\webauto\\\\Suites.xml\");\r\n runner.setTestSuites(suitefiles);\r\n runner.run();\r\n }", "@Test\n public void testAlmUtilsExample() throws GeneralLeanFtException, ReportException, IOException {\n AlmRunInfo almRunInfo = AlmUtils.getAlmRunInfo();\n if (almRunInfo != null){\n // AlmUtils.getAlmRunInfo() returned object, the test is running from ALMreturn;\n // Create a string builder, and add the properties of the test running\n StringBuilder sb = new StringBuilder();\n sb.append(\"ALMUtils test info proeprties: <BR>\");\n sb.append(String.format(\"ServerUrl: '%s' <BR>\", almRunInfo.getServerUrl()));\n sb.append(String.format(\"TesterName: '%s' <BR>\", almRunInfo.getTesterName()));\n sb.append(String.format(\"TestId: '%d' <BR>\", almRunInfo.getTestId()));\n sb.append(String.format(\"TestName: '%s' <BR>\", almRunInfo.getTestName()));\n sb.append(String.format(\"TestSetId: '%d' <BR>\", almRunInfo.getTestSetId()));\n sb.append(String.format(\"TestSetName: '%s' <BR>\", almRunInfo.getTestSetName()));\n sb.append(String.format(\"RunId: '%d' <BR>\", almRunInfo.getRunId()));\n sb.append(String.format(\"RunName: '%s' <BR>\", almRunInfo.getRunName()));\n sb.append(String.format(\"TestInstanceId: '%d' <BR>\", almRunInfo.getTestInstanceId()));\n String stringToReport = sb.toString();\n Reporter.reportEvent(\"AlmUtils.getAlmRunInfo() Properties Check\", stringToReport);\n\n }\n\n try {\n Map<String, Object> testParams = almRunInfo.getParameters();\n\n if (testParams == null) {\n Reporter.reportEvent(\"AlmUtils.getAlmRunInfo() Parameters Check\",\n \"Test is not running from ALM, therefore no parameters in the test\");\n } else {\n String paramString = \"\";\n for (Map.Entry<String, Object> testParam : testParams.entrySet()) {\n paramString += String.format(\"Parameter name: '%s', parameter value: '%s' <BR>\", testParam.getKey(), testParam.getValue().toString());\n }\n Reporter.reportEvent(\"ALMUtils.getAlmRunInfo Parameters Check\", paramString);\n }\n } catch (NullPointerException e) {\n Reporter.reportEvent(\"Exception in AlmUtils.getAlmRunInfo() Parameters Check\",\n \"Test is not running from ALM, therefore no parameters in the test\");\n }\n }", "private void testProXml(){\n\t}", "@DataProvider ( name = \"AddressSaveOptionTestData\" )\r\n\t\r\n\tpublic static String[][] getAddressSaveOptionTestData(){\r\n\t\t\r\n\t\tString[][] AddressSaveOptionTestData;\r\n\t\t\r\n\t\tAddressSaveOptionTestData = TestDataInput.getMatchedInputTableRowsForApplCodeAndTestDataType(\r\n\t\tAddress.TestDataSheetName,\r\n\t\tTestApplicationParams.getCurrentTestApplication(),\r\n\t\t\"AddressSaveOptionTest\");\r\n\t\t\t\r\n\t\treturn (AddressSaveOptionTestData);\r\n\t\t\r\n\t}", "protected String getMethodSpecificTestDataFileName() {\r\n StringBuffer result = new StringBuffer()\r\n .append(TESTDATA+\"/\")\r\n .append(getClassNameWithoutPackage())\r\n .append(\"_\")\r\n .append(getName())\r\n .append(\".xml\");\r\n return result.toString();\r\n }", "@Test\n void getArgString() {\n }", "static StringReader testData() {\n return new StringReader(\n \"@stboundedby, urn:ogc:def:crs:CRS:1.3:84, 2D, 50.23 9.23, 50.31 9.27, 2012-01-17T12:33:41Z, 2012-01-17T12:37:00Z, sec\\n\" +\n \"@columns, mfidref, trajectory, state,xsd:string, \\\"\\\"\\\"type\\\"\\\" code\\\",xsd:integer\\n\" +\n \"@foliation,Time\\n\" +\n \"a, 10, 150, 11.0 2.0 12.0 3.0, walking, 1\\n\" +\n \"b, 10, 190, 10.0 2.0 11.0 3.0, walking, 2\\n\" +\n \"a, 150, 190, 12.0 3.0 10.0 3.0\\n\" + // Omitted values are same as previous line.\n \"c, 10, 190, 12.0 1.0 10.0 2.0 11.0 3.0, vehicle, 1\\n\");\n }", "public static void main(String[] args) {\n\t\tTestNG testNG = new TestNG();\n\t\tTestListenerAdapter adapter = new TestListenerAdapter();\n\t\tList<String> suites = new ArrayList<>();\n\t\ttestNG.addListener((ITestNGListener) adapter);\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/main_testng.xml\");\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/testng1.xml\");\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/testng2.xml\");\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/testng3.xml\");\n\t\tsuites.add(\"./src/test/java/com/testautomation/testng/testng4.xml\");\n\t\ttestNG.setTestSuites(suites);\n\t\ttestNG.setParallel(XmlSuite.ParallelMode.METHODS);\n\t\ttestNG.setPreserveOrder(true);\n\t\ttestNG.setSuiteThreadPoolSize(5);\n\t\ttestNG.setVerbose(0);\n\t\ttestNG.setOutputDirectory(\"test-output\");\n\t\ttestNG.run();\n\t}", "@BeforeTest\n\tpublic void config() {\n\t\tString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\"; //after + we want new path to add to it\n\t\tExtentSparkReporter reporter=new ExtentSparkReporter(path);// this is responsible for creating report\n\t\treporter.config().setReportName(\"Web Automation Akhil\");\n\t\treporter.config().setDocumentTitle(\"Test Results\");\n\t\t\n\t\tExtentReports extent=new ExtentReports();// this is main class for Tracking the things.\n\t\textent.attachReporter(reporter); // Here is link of config with main class\n\t\textent.setSystemInfo(\"Tester\", \"Akhilesh Rawat\");\n\t}", "@SuppressWarnings(\"resource\")\n \tpublic String[] readTestNgXmlFileOutputLinesArray(String fileName) throws IOException{\n \t BufferedReader in = new BufferedReader(new FileReader(Common.testOutputFileDir + fileName));\n \t String str=null;\n \t ArrayList<String> lines = new ArrayList<String>();\n \t while ((str = in.readLine()) != null) {\n \t if (!str.contains(\"helper\") \t \t\t\n \t && (!str.contains(\"startTime\"))\n \t && (!str.contains(\"closeBrowsers\"))\n \t && (!str.contains(\"endTime\"))\n \t && (!str.contains(\"start\"))\n \t && (!str.contains(\"finish\")) \t \n \t && (str.length() != 0) \t \n \t \t) { lines.add(str); }\n \t }\n \t String[] linesArray = lines.toArray(new String[lines.size()]);\n \t return linesArray;\n \t}", "@Test(groups={\"it\"})\r\n\tpublic void testReportDetailsAllConfigurationSteps() throws Exception {\r\n\t\t\r\n\t\texecuteSubTest(new String[] {\"com.seleniumtests.it.stubclasses.StubTestClassForListener1\"}); \r\n\t\t\r\n\t\tString detailedReportContent = readTestMethodResultFile(\"test1Listener1\");\r\n\t\t\r\n\t\tAssert.assertTrue(detailedReportContent.contains(\"</i></button><span class=\\\"step-title\\\"> Pre test step: beforeMethod -\"));\r\n\t\tAssert.assertTrue(detailedReportContent.contains(\"</i></button><span class=\\\"step-title\\\"> Pre test step: beforeTest -\"));\r\n\t\tAssert.assertTrue(detailedReportContent.contains(\"</i></button><span class=\\\"step-title\\\"> Pre test step: beforeClass -\"));\r\n\t\tAssert.assertTrue(detailedReportContent.contains(\"</i></button><span class=\\\"step-title\\\"> Post test step: afterMethod -\"));\r\n\t\tAssert.assertTrue(detailedReportContent.contains(\"</i></button><span class=\\\"step-title\\\"> Post test step: afterClass -\"));\r\n\t\tAssert.assertTrue(detailedReportContent.contains(\"</i></button><span class=\\\"step-title\\\"> Post test step: afterTest -\"));\r\n\t\t\r\n\t\t// check reference to configuration methods for class / test / method are in both results (some are common)\r\n\t\tString detailedReportContent2 = readTestMethodResultFile(\"test2Listener1\");\r\n\t\t\r\n\t\tAssert.assertTrue(detailedReportContent2.contains(\"</i></button><span class=\\\"step-title\\\"> Pre test step: beforeMethod -\"));\r\n\t\tAssert.assertTrue(detailedReportContent2.contains(\"</i></button><span class=\\\"step-title\\\"> Pre test step: beforeTest -\"));\r\n\t\tAssert.assertTrue(detailedReportContent2.contains(\"</i></button><span class=\\\"step-title\\\"> Pre test step: beforeClass -\"));\r\n\t\tAssert.assertTrue(detailedReportContent2.contains(\"</i></button><span class=\\\"step-title\\\"> Post test step: afterMethod -\"));\r\n\t\tAssert.assertTrue(detailedReportContent2.contains(\"</i></button><span class=\\\"step-title\\\"> Post test step: afterClass -\"));\r\n\t\tAssert.assertTrue(detailedReportContent2.contains(\"</i></button><span class=\\\"step-title\\\"> Post test step: afterTest -\"));\r\n\t}", "@Test (dataProvider= \"My data provider\")\r\n\tpublic void TestCalcParamitarized(String in1,String Op, String in2,String Expec){ //.... 1- Parameterized test method -Define method input parameters-\r\n\t\tCalc(in1, Op, in2);\r\n\t\tassertResult(Expec);\t\t\r\n\t}", "public void testGetBasedata() {\n }", "@Test\r\n\tpublic void testCreateXml(){\n\t}", "public String getScriptOfParameters() {\r\n\t\tString str = \"\";\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tstr += var.getName() + \",\";\r\n\t\t}\r\n\t\tif (str.endsWith(\",\")) {\r\n\t\t\tstr = str.substring(0, str.length() - 1);\r\n\t\t}\r\n\t\treturn str;\r\n\t}", "public void readParameters()\n {\n readParameters(getData());\n }", "@Test \n public void GetTrustInfoFromWizardTest(){\n\tlogger.info(\"--------------------start--GetTrustInfoFromWizardTest---------------------------------------------------------------------------------------------------\");\n// \tList<District> list=districtService.GetCityListByProvinceCode(\"110000\");\n\tList<TrustInfo> list=trustManagementService.GetTrustInfoFromWizard(\"9\");\n\tfor (TrustInfo trustInfo : list) {\n\t\tlogger.info(\"查找结果getItemValue:\" + trustInfo.getItemValue()); \n\t\tlogger.info(\"查找结果getItemAliasValue:\" + trustInfo.getItemAliasValue()); \n\t}\n logger.info(\"--------------------end----GetTrustInfoFromWizardTest-------------------------------------------------------------------------------------------------\");\n }", "@Test(dataProvider=\"data-provider\")\n public void search(String ptname,String trname,String revname,String date,String walking_flat,String updown_stairs,String night,String sit_lying,String stand_upright,String catch_lock,String hip_giving_put,String stiffness,String dec_motion,String des_stairs,String asc_stairs,String rising_sitting,String putonsocks,String rising_bed,String sprint_cut,String low_sports,String jogging,String walking,String heavy_duty,String low_duty)throws InterruptedException, BiffException, IOException {\n \t \tdriver.findElement(By.className(\"cls_header_patient\")).click();\n \t \tThread.sleep(500);\n \t \tdriver.findElement(By.id(\"SearchBox\")).click();\n \t \tdriver.findElement(By.id(\"SearchBox\")).sendKeys(\"t\");\n \t \tdriver.findElement(By.className(\"btnStudySearch\")).click();\n \t \tThread.sleep(1000);\n \t WebElement ptlist = driver.findElement(By.className(\"flex_patient\"));\n\t \tList<WebElement> tagname2 = ptlist.findElements(By.tagName(\"tr\"));\n\t \tint j =1; \n\t\tfor(WebElement tlist1 : tagname2)\n\t\t{\t \t \n \t Thread.sleep(3000);\n\t\t Actions action1 = new Actions(driver);\n\t\t \n \t WebElement element1 = tlist1.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div[2]/div[2]/div/div[7]/table/tbody/tr[\"+j+\"]/td[1]/div\"));\n \t driver.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div[2]/div[2]/div/div[7]/table/tbody/tr[\"+j+\"]/td[1]/div\")).click();\n \t String pname=tlist1.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div[2]/div[2]/div/div[7]/table/tbody/tr[\"+j+\"]/td[1]/div\")).getText();\n \t System.out.println(\"Patient Name=\"+pname);\n \t \t\t \t \n if( pname.matches(ptname))\n {\n \tAction doubleClick1 = action1.doubleClick(element1).build();\n \tdoubleClick1.perform();// After performing double click Map will load\n \tThread.sleep(3000);\n \tdriver.findElement(By.className(\"clsapp_pat_treatment\")).click();\n \tThread.sleep(3000);\n \t//driver.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div[1]/div/div[7]/table/tbody/tr/td[3]/div\")).click();\n \t//Thread.sleep(3000);\n \t//driver.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div/div[7]/table/tbody/tr/td[3]/div\")).click();\n \t WebElement trlist= driver.findElement(By.className(\"flex_treatment\"));\n List<WebElement> tagname1=trlist.findElements(By.tagName(\"tr\"));\n int i=1;\n for(WebElement tlist2 : tagname1){\n \tThread.sleep(2000);\n \t//Actions action1 = new Actions(driver);\n \tWebElement element2 = tlist2.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div[1]/div/div[7]/table/tbody/tr[\"+i+\"]/td[3]/div\"));\n \tdriver.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div[1]/div/div[7]/table/tbody/tr[\"+i+\"]/td[3]/div\")).click();\n \tString tname=tlist2.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div[1]/div/div[7]/table/tbody/tr[\"+i+\"]/td[3]/div\")).getText();\n \tSystem.out.println(\"Treatment name=\"+tname);\n \t\n \tif(tname.matches(trname))\n \t\t \n \t\t{\n \t\tAction doubleClick2 = action1.doubleClick(element2).build();\n \t\tdoubleClick2.perform();\n \t\tThread.sleep(2000);\n \t\t\n \t \tThread.sleep(2000);\n \t \t//search2(evdat,mob,self,usual,pain,anxd,healt,comm);\n \t \t//Thread.sleep(3000);\n \t \t//driver.findElement(By.className(\"StudyName\")).click();\n \t \tThread.sleep(3000);\n \t \t//Thread.sleep(2000);\n\n \t \n \t \t WebElement rvlist= driver.findElement(By.className(\"flex_treat_review\"));\n \t List<WebElement> tagname3=rvlist.findElements(By.tagName(\"tr\"));\n \t int k=1;\n \t for(WebElement tlist3 : tagname3){\n \t \tThread.sleep(2000);\n \t \tWebElement element3=tlist3.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div/div[7]/table/tbody/tr[\"+k+\"]/td[3]/div\"));\n \t driver.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div/div[7]/table/tbody/tr[\"+k+\"]/td[3]/div\")).click();\n \t String rvname=tlist3.findElement(By.xpath(\"/html/body/div[3]/div[3]/div/div[2]/div/div[7]/table/tbody/tr[\"+k+\"]/td[3]/div\")).getText();\n \t System.out.println(\"Review name=\"+rvname);\n \t if(rvname.matches(revname)){\n \t \tAction doubleClick3 = action1.doubleClick(element3).build();\n \t\t \tdoubleClick3.perform();\n \t\t \tThread.sleep(2000);\n \t\t \tString rvform = \"//input[contains(@class,'leftmenuBox') and contains(@value,'Nonarthritic Score')]\";\n\t\t\t\t\t\t \n \t \t WebElement selfyes = driver.findElement(By.xpath(rvform));\n \t \t selfyes.click();\n \t \t Thread.sleep(3000);\n \t \t driver.findElement(By.id(\"edate\")).sendKeys(date);\n \t \t //Select ohs1 = new Select(driver.findElement(By.id(\"ohs_pain_usually\")));\n \t \t // ohs1.selectByVisibleText(pain);\n \t Select s=new Select(driver.findElement(By.id(\"score1\")));\n \t s.selectByVisibleText(walking_flat);\n \t Select s1=new Select(driver.findElement(By.id(\"score2\")));\n \t s1.selectByVisibleText(updown_stairs);\n \t Select s2=new Select(driver.findElement(By.id(\"score3\")));\n \t s2.selectByVisibleText(night);\n \t Select s3=new Select(driver.findElement(By.id(\"score4\")));\n \t s3.selectByVisibleText(sit_lying);\t\n \t Select s4=new Select(driver.findElement(By.id(\"score5\")));\n \t s4.selectByVisibleText(stand_upright);\t\n \t Select s5=new Select(driver.findElement(By.id(\"score6\")));\n \t s5.selectByVisibleText(catch_lock);\n \t Select s6=new Select(driver.findElement(By.id(\"score7\")));\n \t s6.selectByVisibleText(hip_giving_put);\n \t Select s7=new Select(driver.findElement(By.id(\"score8\")));\n \t s7.selectByVisibleText(stiffness);\n \t Select s8=new Select(driver.findElement(By.id(\"score9\")));\n \t s8.selectByVisibleText(dec_motion);\n \t Select s9=new Select(driver.findElement(By.id(\"score10\")));\n \t s9.selectByVisibleText(des_stairs);\n \t Select s10=new Select(driver.findElement(By.id(\"score11\")));\n \t s10.selectByVisibleText(asc_stairs);\n \t Select s11=new Select(driver.findElement(By.id(\"score12\")));\n \t s11.selectByVisibleText(rising_sitting);\n \t Select s12=new Select(driver.findElement(By.id(\"score13\")));\n \t s12.selectByVisibleText(putonsocks);\n \t Select s13=new Select(driver.findElement(By.id(\"score14\")));\n \t s13.selectByVisibleText(rising_bed);\n \t Select s14=new Select(driver.findElement(By.id(\"score15\")));\n \t s14.selectByVisibleText(sprint_cut);\n \t Select s15=new Select(driver.findElement(By.id(\"score16\")));\n \t s15.selectByVisibleText(low_sports);\n \t Select s16=new Select(driver.findElement(By.id(\"score17\")));\n \t s16.selectByVisibleText(jogging);\n \t Select s17=new Select(driver.findElement(By.id(\"score18\")));\n \t s17.selectByVisibleText(walking);\n \t Select s18=new Select(driver.findElement(By.id(\"score19\")));\n \t s18.selectByVisibleText(heavy_duty);\n \t Select s19=new Select(driver.findElement(By.id(\"score20\")));\n \t s19.selectByVisibleText(low_duty);\n \t Thread.sleep(2000);\n \t driver.findElement(By.id(\"btn_hip_nonarthritic_save\")).click();\n \t \tbreak;\n \t \t\n \t }\n \t k++;\n \t }\n \t break;\n \t\t}\n \ti++;\n }\n break;\n }\n j++;\n\t\t}\n\t\t\n }", "public static void main(String[] args) {\n\t\tTestLinkAPIClient testlinkAPIClient = new TestLinkAPIClient(CyborgConstants.DEVKEY,CyborgConstants.URL);\n\t\ttry {\n\t\t\tString ProjectId=null;\n\t\t\tString TestSuiteId=null;\n\t\t\tArrayList<Integer> TestSuitesId = new ArrayList<Integer>();\n\t\t\tTestLinkAPIResults projResult= testlinkAPIClient.getProjects();\n\t\t for (int i = 0; i < projResult.size(); i++) {\n\t\t \tif(projResult.getValueByName(i, \"name\").equals(ProjectName)){\n\t\t \t\t ProjectId= (String) projResult.getValueByName(i, \"id\");\n\t\t \t\t System.out.println(projResult.getValueByName(i, \"name\"));\n\t\t \t\t break;\n\t\t \t\t \n\t\t \t}\n\t\t\t}\n\t\t \n\t\t\t String TestPalns[]= TestPlan.split(\",\");\n\t\t\t for (int k = 0; k < TestPalns.length; k++) {\n\t\t\t\tTestLinkAPIResults testSuiteResults=testlinkAPIClient.getTestSuitesForTestPlan(ProjectName, TestPalns[k]);\n\t\t\t\t//System.out.println(\"TestPalns[k]===\"+TestPalns[k]);\n\t\t\t\tfor (int l = 0; l < testSuiteResults.size(); l++) {\n\t\t\t\t\t//System.out.println(\"TestSuite===\"+TestSuite);\n\t\t\t\t\t//System.out.println(\"Suite Name===\"+testSuiteResults.getValueByName(l, \"name\"));\n\t\t\t\t\tString TestSuites[]= TestSuite.split(\",\");\n\t\t\t\t\tfor (int z = 0; z < TestSuites.length; z++){\n\t\t\t\t\t\t\tif(testSuiteResults.getValueByName(l, \"name\").equals(TestSuites[z])){\n\t\t\t\t\t\t\tSystem.out.println(testSuiteResults.getValueByName(l, \"name\").equals(TestSuites[z]));\n\t\t\t\t\t\t\t TestSuiteId= (String) testSuiteResults.getValueByName(l, \"id\");\n\t\t\t\t\t\t\t// System.out.println(\"SuiteNamer===\"+testSuiteResults.getValueByName(l, \"name\"));\n\t\t\t\t\t\t\tString SuiteName=(String)testSuiteResults.getValueByName(l, \"name\");\n\t\t\t\t\t\t\t getTestCases(testlinkAPIClient, ProjectId, TestSuiteId,SuiteName);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t }\n\t\t\t \n\t\t \n\t\t} catch (TestLinkAPIException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void testPersonReturn(){\n// System.out.println(\"------->\"+ mHbParam.getId());\n }", "protected void getInfoFromServer(String testName) {\r\n\t\tapplicationId = getApplicationId();\r\n\t\tversionId = getVersionId();\r\n\t\tenvironmentId = getEnvironmentId();\r\n\t\t\r\n\t\tif (testName != null) {\r\n\t\t\ttestCaseId = getTestCaseId(testName);\r\n\t\t}\r\n\t}", "@Parameters\n public static Collection<Object[]> testParameters() {\n Collection<Object[]> params = new ArrayList<Object[]>();\n\n for (OPT opt: OPT.values()) {\n Object[] par = new Object[2];\n par[0] = opt;\n par[1] = opt.name();\n\n params.add( par );\n }\n\n return params;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\thtmlReporter = new ExtentHtmlReporter(\"C:\\\\Users\\\\Suresh Mylam\\\\eclipse-workspace\\\\TestNG_Listners\\\\Reports\\\\TestReport.html\");\r\n\t\textent = new ExtentReports();\r\n\t\textent.attachReporter(htmlReporter);\r\n\t\ttest= extent.createTest(\"TEst123\");\r\n\t\ttest.pass(\"pass\");\r\n\t\ttest.fail(\"fail\");\r\n\t\ttest.info(\"info\");\r\n\t\textent.flush();\r\n\t\tSystem.out.println(\"Done\");\r\n\r\n\t}", "@BeforeClass\n\tpublic void readConfig() {\n\t\t// object creation of properties file\n\n\t\tProperties prop = new Properties();\n\n\t\t// read the file: inputstream\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(\"\\\\src\\\\main\\\\java\\\\config\\\\config.properties\");\n\t\t\tprop.load(input);\n\t\t\tbrowser = prop.getProperty(\"browser\");\n\t\t//\turl = prop.getProperty(\"url\");\n\t\t\t\n\t\t}\n\n\t\tcatch (IOException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}", "@Test(dataProvider = \"dp\")\r\n\t public void DataInfo(String user,String pwd,String confpwd) {\nString chromePath=(\"C:\\\\Users\\\\Training_b6b.01.07\\\\Desktop\\\\Selenium\\\\jars\\\\ChromeDriver.exe\");\r\nSystem.setProperty(\"webdriver.chrome.driver\",chromePath);\r\nWebDriver driver=new ChromeDriver();\r\ndriver.get(\"http://www.demoaut.com/\");\r\ndriver.findElement(By.partialLinkText(\"REGISTER\")).click();\r\n \r\n\r\n\r\ndriver.findElement(By.name(\"email\")).sendKeys(user);\r\n\r\ndriver.findElement(By.name(\"password\")).sendKeys(pwd);\r\n\r\ndriver.findElement(By.name(\"confirmPassword\")).sendKeys(confpwd);\r\n\r\n\r\ndriver.close();\r\n}", "public void initData() throws IOException {\n\t\textent.loadConfig(new File(extentReportFile));\n\t\tchromedriverPath = driverData.getPropertyValue(\"chromeDriverPath\");\n\t\tfirefoxdriverPath = driverData.getPropertyValue(\"geckoDriverPath\");\n\t\tchromedriverKey = driverData.getPropertyValue(\"chromeDriverKey\");\n\t\tfirefoxdriverKey = driverData.getPropertyValue(\"geckoDriverKey\");\n\t\tapplicationUrl = testData.getPropertyValue(\"applicationURL\");\n\t\tapplicationPassword = testData.getPropertyValue(\"applicationPassword\");\n\t\tscreenShotPath = testData.getPropertyValue(\"screenshotPath\");\n\t\tdateFormat = testData.getPropertyValue(\"dateFormat\");\n\t}", "public static void main(String[] args) throws IOException, ParseException{\n\t\tGetBrowser browser=new GetBrowser();\n\t\tWebDriver driver = browser.getDriver(\"FireFox\");\n\t\t\n\t\tHashMap<String, String> test = new CommonUtilities(driver).getTestCases();\n\t\tfor(Map.Entry m:test.entrySet()){ \n\t\t\t System.out.println(m.getKey()+\" \"+m.getValue()); \n\t\t\t } \n\t}", "@DataProvider\r\n public Object[][] testData() {\r\n\r\n return new Object[][]{\r\n {\"Hidden\", \"Archived\"},\r\n {\"Required\", \"Draft\"},\r\n {\"Hidden\", \"Public\"}\r\n };\r\n }", "public String getTestName() {\n return testURL;\n }", "public Map<String, String> getRunConfigurationParamsProperties()\n throws IOException \n {\n JarFile jarFile = new JarFile(BasicFrameXmlModel.jarFileName);\n JarEntry jarEntry = jarFile.getJarEntry(\"junit-platform.properties\");\n if(jarEntry == null)\n {\n \tjarFile.close();\n return null;\n } \n InputStreamReader propertiesFileInputStream =\n new InputStreamReader(jarFile.getInputStream(jarEntry));\n Map<String, String> propertiesMap = new HashMap<>();\n Properties properties = new Properties();\n properties.load(propertiesFileInputStream);\n properties.forEach((k, v) -> propertiesMap.put((String) k, (String) v));\n jarFile.close();\n return propertiesMap;\n }", "public ParamNameTest(String testName) {\n super(testName);\n }", "String [] getParameters();", "protected List<TestData> getTestData() {\n return Arrays.asList(\n new TestData(getClassLoaderResource(\"/pict/test.pct\"), new Dimension(300, 200)),\n new TestData(getClassLoaderResource(\"/pict/food.pct\"), new Dimension(146, 194)),\n new TestData(getClassLoaderResource(\"/pict/carte.pict\"), new Dimension(782, 598)),\n // Embedded QuickTime image... Should at least include the embedded fallback text\n new TestData(getClassLoaderResource(\"/pict/u2.pict\"), new Dimension(160, 159)),\n // Obsolete V2 format with weird header\n new TestData(getClassLoaderResource(\"/pict/FLAG_B24.PCT\"), new Dimension(124, 124)),\n // PixMap\n new TestData(getClassLoaderResource(\"/pict/FC10.PCT\"), new Dimension(2265, 2593)),\n // 1000 DPI with bounding box not matching DPI\n new TestData(getClassLoaderResource(\"/pict/oom.pict\"), new Dimension(1713, 1263)),\n\n // Sample data from http://developer.apple.com/documentation/mac/QuickDraw/QuickDraw-458.html\n new TestData(DATA_V1, new Dimension(168, 108)),\n new TestData(DATA_V2, new Dimension(168, 108)),\n new TestData(DATA_EXT_V2, new Dimension(168, 108)),\n\n // Examples from http://developer.apple.com/technotes/qd/qd_14.html\n new TestData(DATA_V1_COPY_BITS, new Dimension(100, 165)),\n new TestData(DATA_V1_OVAL_RECT, new Dimension(100, 165)),\n new TestData(DATA_V1_OVERPAINTED_ARC, new Dimension(100, 165))\n );\n }", "@DataProvider(name = \"populateTestDataProvider\")\n public Object[][] populateTestDataProvider() {\n return new Object[][] { { true }, { false } };\n }", "@BeforeClass\n public static void SetupEnviron() throws FileNotFoundException, UnsupportedEncodingException {\n if (outputDir != null && baseLocalDir != null) {\n // exit early if the environ is already set\n return;\n }\n BasicConfigurator.resetConfiguration();\n BasicConfigurator.configure();\n String container = \"testConfiguration\";\n InputStream templateInputStream = null;\n try {\n File configFile = new File(\"resources/tests_config.xml\");\n templateInputStream = new FileInputStream(configFile);\n Document configDoc = XMLDomUtils.getTemplateDom(templateInputStream);\n // read from the config file\n outputDir = XMLDomUtils.getNodeValue(configDoc, container, \"outputDirectory\");\n outputDir += \"desc_sen/\";\n baseLocalDir = XMLDomUtils.getNodeValue(configDoc, container, \"projectDirectory\");\n exampleOutputDir = XMLDomUtils.getNodeValue(configDoc, container, \"outputDirectory\");\n exampleOutputDir += \"examples/\";\n } finally {\n if (templateInputStream != null) {\n try {\n templateInputStream.close();\n } catch (IOException e) {\n // ignore, closing..\n }\n }\n }\n \n File file = new File(outputDir);\n file.mkdirs();\n \n file = new File(exampleOutputDir);\n file.mkdirs();\n \n baseQuery += URLEncoder.encode(\"text/xml;subtype=\\\"sensorML/1.0.1\\\"\", \"UTF-8\") + \"&\";\n }", "public String getTestname() {\n return testname;\n }", "public final Instances getTestingFromParams(String params)\n {\n if(params.equals(\"default\"))\n return getTesting();\n return _getTestingFromParams(params);\n }", "@Test(priority = 66)\r\n@Epic(\"BILLS PAYMENT\")\r\n@Features(value = { @Feature(value = \"BUY GOODS USING MPESA\") })\r\n@Step (\"BUY GOODS USING MPESA\")\r\n@Severity(SeverityLevel.TRIVIAL)\r\npublic void Buy_Goods_Using_MPESA_Test_cases() {\n\tSystem.out.println(\"BUY GOODS AND SERVICES\");\t\r\n\tSystem.out.println(\"*************************(1)Running Buy Goods Using MPESA Testcases***********************************\");\r\n\r\n}", "@Test\r\n \tpublic void testParameters() {\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\t\t\t\t\t\r\n \t\tassertEquals(params.unescapeSource, true);\r\n \t\tassertEquals(params.trimLeading, true);\r\n \t\tassertEquals(params.trimTrailing, true);\r\n \t\tassertEquals(params.preserveWS, true);\r\n \t\tassertEquals(params.useCodeFinder, false);\r\n \t\tassertEquals(\t\t\t\t\r\n \t\t\t\t\"#v1\\ncount.i=2\\nrule0=%(([-0+#]?)[-0+#]?)((\\\\d\\\\$)?)(([\\\\d\\\\*]*)(\\\\.[\\\\d\\\\*]*)?)[dioxXucsfeEgGpn]\\n\" +\r\n \t\t\t\t\"rule1=(\\\\\\\\r\\\\\\\\n)|\\\\\\\\a|\\\\\\\\b|\\\\\\\\f|\\\\\\\\n|\\\\\\\\r|\\\\\\\\t|\\\\\\\\v\\nsample=\\nuseAllRulesWhenTesting.b=false\", \r\n \t\t\t\tparams.codeFinderRules);\r\n \t\t\t\t\t\t\t\t\t\r\n \t\t// Check if defaults are set\r\n \t\tparams = new Parameters();\r\n \t\tfilter.setParameters(params);\r\n \t\t\r\n \t\tparams.columnNamesLineNum = 1;\r\n \t\tparams.valuesStartLineNum = 1;\r\n \t\tparams.detectColumnsMode = 1;\r\n \t\tparams.numColumns = 1;\r\n \t\tparams.sendHeaderMode = 1;\r\n \t\tparams.trimMode = 1;\r\n \t\tparams.fieldDelimiter = \"1\";\r\n \t\tparams.textQualifier = \"1\";\r\n \t\tparams.sourceIdColumns = \"1\";\r\n \t\tparams.sourceColumns = \"1\";\r\n \t\tparams.targetColumns = \"1\";\r\n \t\tparams.commentColumns = \"1\";\r\n \t\tparams.preserveWS = true;\r\n \t\tparams.useCodeFinder = true;\r\n \t\t\r\n \t\tparams = getParameters();\r\n \t\t\r\n \t\tassertEquals(params.fieldDelimiter, \"1\");\r\n \t\tassertEquals(params.columnNamesLineNum, 1);\r\n \t\tassertEquals(params.numColumns, 1);\r\n \t\tassertEquals(params.sendHeaderMode, 1);\r\n \t\tassertEquals(params.textQualifier, \"1\");\r\n \t\tassertEquals(params.trimMode, 1);\r\n \t\tassertEquals(params.valuesStartLineNum, 1);\r\n \t\tassertEquals(params.preserveWS, true);\r\n \t\tassertEquals(params.useCodeFinder, true);\r\n \t\t\r\n \t\t// Load filter parameters from a file, check if params have changed\r\n //\t\tURL paramsUrl = TableFilterTest.class.getResource(\"/test_params1.txt\");\r\n //\t\tassertNotNull(paramsUrl); \r\n \t\t\r\n \r\n \t\ttry {\r\n \t\tString st = \"file:\" + getFullFileName(\"test_params1.txt\");\r\n \t\tparams.load(new URI(st), false);\r\n \t} catch (URISyntaxException e) {\r\n \t}\r\n \r\n \t\t\r\n \t\tassertEquals(\"2\", params.fieldDelimiter);\r\n \t\tassertEquals(params.columnNamesLineNum, 2);\r\n \t\tassertEquals(params.numColumns, 2);\r\n \t\tassertEquals(params.sendHeaderMode, 2);\r\n \t\tassertEquals(\"2\", params.textQualifier);\r\n \t\tassertEquals(params.trimMode, 2);\r\n \t\tassertEquals(params.valuesStartLineNum, 2);\r\n \t\tassertEquals(params.preserveWS, false);\r\n \t\tassertEquals(params.useCodeFinder, false);\r\n \t\t\r\n \t\t// Save filter parameters to a file, load and check if params have changed\r\n \t\tURL paramsUrl = TableFilterTest.class.getResource(\"/test_params2.txt\");\r\n \t\tassertNotNull(paramsUrl);\r\n \t\t\r\n \t\tparams.save(paramsUrl.getPath());\r\n \t\t\r\n \t\t// Change params before loading them\r\n \t\tparams = (Parameters) filter.getParameters();\r\n \t\tparams.fieldDelimiter = \"3\";\r\n \t\tparams.columnNamesLineNum = 3;\r\n \t\tparams.numColumns = 3;\r\n \t\tparams.sendHeaderMode = 3;\r\n \t\tparams.textQualifier = \"3\";\r\n \t\tparams.trimMode = 3;\r\n \t\tparams.valuesStartLineNum = 3;\r\n \t\tparams.preserveWS = true;\r\n \t\tparams.useCodeFinder = true;\r\n \t\t\r\n \t\tparams.load(Util.toURI(paramsUrl.getPath()), false);\r\n \t\t\r\n \t\tassertEquals(params.fieldDelimiter, \"2\");\r\n \t\tassertEquals(params.columnNamesLineNum, 2);\r\n \t\tassertEquals(params.numColumns, 2);\r\n \t\tassertEquals(params.sendHeaderMode, 2);\r\n \t\tassertEquals(params.textQualifier, \"2\");\r\n \t\tassertEquals(params.trimMode, 2);\r\n \t\tassertEquals(params.valuesStartLineNum, 2);\r\n \t\tassertEquals(params.preserveWS, false);\r\n \t\tassertEquals(params.useCodeFinder, false);\r\n \t\t\r\n \t\t// Check if parameters type is controlled\r\n \t\t\r\n \t\tfilter.setParameters(new net.sf.okapi.filters.plaintext.base.Parameters());\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test1.txt\");\r\n \t\ttry {\r\n \t\t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\tfail(\"OkapiBadFilterParametersException should've been trown\");\r\n \t\t}\r\n \t\tcatch (OkapiBadFilterParametersException e) {\r\n \t\t}\r\n \t\t\r\n \t\tfilter.close();\r\n \t\r\n \t\tfilter.setParameters(new net.sf.okapi.filters.table.csv.Parameters());\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test1.txt\");\r\n \t\ttry {\r\n \t\t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t}\r\n \t\tcatch (OkapiBadFilterParametersException e) {\r\n \t\t\tfail(\"OkapiBadFilterParametersException should NOT have been trown\");\r\n \t\t}\r\n \t\t\tfilter.close();\r\n \t}", "public static void main(String[] args) throws Exception {\n\t\tLogger.getRootLogger().setLevel(Level.OFF);\n\t\tConfigurationLib configLib = new ConfigurationLib();\n\t\tString binPath = configLib.getTestSuitePath();\n\t\tTestNG testng = new TestNG();\n\t\tList<XmlSuite> suites = new ArrayList<XmlSuite>();\n\t\tXmlSuite mySuite = new XmlSuite();\n\t\tList<XmlClass> xmlClasses = new ArrayList<XmlClass>();\n\t\tXmlTest test = null;\n\t\tString className = null;\n\t\tbinPath = binPath.replace(\"null\", \"\");\n\n\t\tFile dir = new File(binPath);\n\t\tList<File> files = (List<File>) FileUtils.listFiles(dir, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE);\n\t\tfor (File f : files) {\n\t\t\ttest = new XmlTest(mySuite);\n\t\t\tclassName = ((f.getCanonicalPath().replace(configLib.getBinaryPath(), \"\")).replace(\"\\\\\", \".\"));\n\t\t\tclassName = StringUtils.removeEnd(className, \".class\");\n\t\t\ttest.setName(className);\n\t\t\txmlClasses.add(new XmlClass(Class.forName(className)));\n\t\t}\n\n\t\ttest.setXmlClasses(xmlClasses);\n\t\tAnnotationTransformerImpl myTransformer = new AnnotationTransformerImpl();\n\t\ttestng.addListener(myTransformer);\n\t\tAlterSuiteImpl alterSuite = new AlterSuiteImpl();\n\t\ttestng.addListener(alterSuite);\n\t\tsuites.add(mySuite);\n\t\ttestng.setXmlSuites(suites);\n\t\tsuiteExec = true;\n\t\ttestng.run();\n\t}", "protected void setupParameters() {\n \n \n\n }", "@Test(priority = 75)\r\n@Epic(\"BILLS PAYMENT\")\r\n@Features(value = { @Feature(value = \"BUY GOODS USING MPESA\") })\r\n@Step (\"END OF BUY GOODS USING MPESA TILL TESTCASES\")\r\n@Severity(SeverityLevel.TRIVIAL)\r\npublic void End_Buy_Goods_Using_MPESA_Test_cases() {\n\tSystem.out.println(\"*************************End of buy Goods Using Mpesa Test cases***********************************\");\r\n\r\n}", "public static void loadTest(){\n }", "@Test\n public void detailsTest() {\n // TODO: test details\n }", "@Test\n public void detailsTest() {\n // TODO: test details\n }", "@Test\n\tpublic void SecondTest() throws IOException, XPathExpressionException, ParserConfigurationException, SAXException\n\t{\n\t\tSystem.out.println(\"Found Password:\"+getData(\"FirstTest\",\"Password\"));\n\t\tSystem.out.println(\"Found Password:\"+getData(\"FirstTest\",\"Password\"));\n\t\t\t\n\t}", "@BeforeSuite\n public void beforeSuite(ITestContext context) {\n useGrid = Boolean.parseBoolean(getTestNGParam(context,\"run.on.grid\"));\n \t//data properties file\n initDataFile(getTestNGParam(context,\"data.file.name\"));\n //device log\n initDeviceLogsFolder(context);\n }", "@Test\n public void functionalityTest() {\n new TestBuilder()\n .setModel(MODEL_PATH)\n .setContext(new ModelImplementationGroup3())\n .setPathGenerator(new RandomPath(new EdgeCoverage(100)))\n .setStart(\"e_GoToPage\")\n .execute();\n }", "@Test\n public void testWizardReport() {\n testReporterConfig(Reporter.ALL_2017_4_24, \"WizardReport.txt\");\n }", "public static void readXML(){\n try{\n Document doc = getDoc(\"config.xml\");\n Element root = doc.getRootElement();\n\n //Muestra los elementos dentro de la configuracion del xml\n \n System.out.println(\"Color : \" + root.getChildText(\"color\"));\n System.out.println(\"Pattern : \" + root.getChildText(\"pattern\"));\n System.out.println(\"Background : \" + root.getChildText(\"background\"));\n \n\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "@BeforeTest // which will be executed first before all the test methods\n@Parameters(\"browser\") //@Parameter is used to pass the values(during run time) to the test methods as arguments using .xml file\npublic void setup(String browser) throws Exception{\n \n//Check if parameter passed as 'chrome'\nif (browser.equalsIgnoreCase(\"chrome\")){\n//set path to chromedriver.exe\nSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\mouleeswaranb\\\\\\\\\\\\\\\\eclipse-workspace_Selenium learning_6127\\\\\\\\\\\\\\\\SeleniumProject\\\\\\\\\\\\\\\\drivers\\\\\\\\\\\\\\\\chromedriver.exe\");\ndriver = new ChromeDriver(); \n}\n\nelse{\n//If no browser passed throw exception\nthrow new Exception(\"Browser is not correct\");\n}\ndriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n}", "@Test\n\tpublic void testGetRequestParameter() {\n\t}", "@Test\n @ApiOperation(\"表单扩展--查询流程变量\")\n public void getVariable(){\n }", "@Test(dataProvider = \"inputs\", dataProviderClass=TestData.class)\n\tpublic void testMethod(String firstName, String lastName, String age) {\n\t\tSystem.out.println(\"first name: \" + firstName);\n\t\tSystem.out.println(\"last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t}", "@Test\n\t@Category(CategoryJmeterEnvSetup.class)\n\tpublic void test11GetJmeterUserDefinedVars() {\n\t\tString testcases_file_path = \n\t\t\t\tJmeterUtils.getUserDefinedVarFromJmeterEnv(new JUnitSampler(), TestConstants.JMETER_KEY_TEST_DATA);\n\t\tROWS = FileUtils.readExcelRows(testcases_file_path, \"Settings\");\n\t\t\n\t\tif (ROWS.size() > 0) {\n\t\t\tAssert.assertTrue(\"Verify read the test data.\", true);\n\t\t} else {\n\t\t\tint errCode = 1;\n\t\t\tSystem.exit(errCode);\n\t\t}\n\t}", "public void testParFileReading() {\n GUIManager oManager = null;\n String sFileName = null;\n try {\n\n oManager = new GUIManager(null);\n \n //Valid file 1\n oManager.clearCurrentData();\n sFileName = writeFile1();\n oManager.inputXMLParameterFile(sFileName);\n SeedPredationBehaviors oPredBeh = oManager.getSeedPredationBehaviors();\n ArrayList<Behavior> p_oBehs = oPredBeh.getBehaviorByParameterFileTag(\"DensDepRodentSeedPredation\");\n assertEquals(1, p_oBehs.size());\n DensDepRodentSeedPredation oPred = (DensDepRodentSeedPredation) p_oBehs.get(0);\n double SMALL_VAL = 0.00001;\n \n assertEquals(oPred.m_fDensDepDensDepCoeff.getValue(), 0.07, SMALL_VAL);\n assertEquals(oPred.m_fDensDepFuncRespExpA.getValue(), 0.02, SMALL_VAL);\n\n assertEquals( ( (Float) oPred.mp_fDensDepFuncRespSlope.getValue().get(0)).\n floatValue(), 0.9, SMALL_VAL);\n assertEquals( ( (Float) oPred.mp_fDensDepFuncRespSlope.getValue().get(1)).\n floatValue(), 0.05, SMALL_VAL);\n\n //Test grid setup\n assertEquals(1, oPred.getNumberOfGrids());\n Grid oGrid = oManager.getGridByName(\"Rodent Lambda\");\n assertEquals(1, oGrid.getDataMembers().length);\n assertTrue(-1 < oGrid.getFloatCode(\"rodent_lambda\")); \n \n }\n catch (ModelException oErr) {\n fail(\"Seed predation validation failed with message \" + oErr.getMessage());\n }\n catch (java.io.IOException oE) {\n fail(\"Caught IOException. Message: \" + oE.getMessage());\n }\n finally {\n new File(sFileName).delete();\n }\n }", "public String[] getTrainingSettings();", "@Test\n public void getMatchDetailsTest2(){\n try {\n RiotApiHandler userTest=RiotApiHandler.getInstance();\n Path testfile = Path.of(\"matchinfo.txt\");\n String fin = Files.readString(testfile);\n Assert.assertNotEquals(fin,userTest.getMatchDetails(\"EUN1_2775220260\",\"eun1\"));\n }\n catch (IOException exception){\n exception.printStackTrace();\n }\n }", "public static String getSampleDefintion() throws IOException\n\t{\n\t\tInputStream is = ResourceHelper.getResourceAsStream(\"org/infoglue/cms/controllers/TestContentDefinition.xml\", ContentTypeDefinitionControllerTest.class);\n\n\t\tif(is == null)\n\t\t\tfail(\"Unable to read test document, make sure it got copied to the test classpath\");\n\n\t\tString line = null;\n\t\tStringBuffer sb = new StringBuffer();\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is));\n\t\twhile((line = reader.readLine()) != null)\n\t\t\tsb.append(line);\n\n\t\treader.close();\n\t\treturn sb.toString();\n\t}", "@Test //make sure it comes from testNG\n public void testWithQueryParameterAndList(){\n given().accept(ContentType.JSON)\n .and().params(\"limit\",100)\n .when().get(ConfigurationReader.getProperty(\"hrapp.baseresturl\")+\"/employees\")\n .then().assertThat().statusCode(200)\n .and().assertThat().contentType(ContentType.JSON)\n .and().assertThat().body(\"items.employee_id\", hasSize(100));\n }", "public static void testReadGridFile() throws IOException {\n\n System.out.println(\"\\n--------- Reading Grid File ---------\");\n\n GridFile gridFile = GridFile.open(TEST_FILE);\n\n GridParameters params = gridFile.getParameters();\n\n System.out.println(\"Number of Rows: \" + params.getNumberOfRows());\n System.out.println(\"Number of Columns: \" + params.getNumberOfColumns());\n System.out.println(\"Lower Left X Corner: \" + params.getXllCorner());\n System.out.println(\"Lower Left Y Corner: \" + params.getYllCorner());\n System.out.println(\"No Data Value: \" + params.getNoDataValue());\n System.out.println(\"Word Size: \" + params.getWordSizeInBytes() + \" bytes\");\n System.out.println(\"Description: \" + params.getDescription());\n\n //Create an array to hold row data\n int[] rowValues = new int[params.getNumberOfColumns()];\n\n //Read values in row 1 and print the first 10\n gridFile.getRow(1, rowValues);\n\n for (int i = 0; i < 10; i++) {\n System.out.println(\"row[\" + i + \"] = \" + rowValues[i]);\n }\n\n //Read values in row 2 and print the first 10\n gridFile.getRow(2, rowValues);\n\n for (int i = 0; i < 10; i++) {\n System.out.println(\"row[\" + i + \"] = \" + rowValues[i]);\n }\n\n gridFile.close();\n }", "@Test\n public void test19(){\n // List<Integer> services = response.extract().path(\"data.findAll{it.services=='Samsung Experience'}.storeservices\");\n //List<HashMap<String, ?>> address = response.extract().path(\"data.findAll{it.service=='Samsung Experience'}.storeservices\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The name of all services:\" );\n System.out.println(\"------------------End of Test---------------------------\");\n }", "protected void initTestSuiteParameter() throws FileNotFoundException {\n LOGGER.info(\"............................INITIALIZE SAKULI-CONTEXT\");\n executorService = Executors.newCachedThreadPool();\n BeanLoader.CONTEXT_PATH = \"java-dsl-beanRefFactory.xml\";\n SakuliJavaPropertyPlaceholderConfigurer.TEST_SUITE_FOLDER_VALUE = getTestSuiteFolder();\n SakuliJavaPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE = getSakuliHomeFolder();\n SakuliJavaPropertyPlaceholderConfigurer.SAHI_HOME_VALUE = getSahiFolder();\n InitializingServiceHelper.invokeInitializingServcies();\n }", "public void readResult() {\n File dirXml = new File(System.getProperty(\"user.dir\") + \"/target/classes/\");\n /// Get Parent Directory\n String parentDirectory = dirXml.getParent();\n File folder = new File(parentDirectory + \"/jbehave\");\n File[] listOfFiles = folder.listFiles();\n\n if (listOfFiles != null) {\n for (File listOfFile : listOfFiles) {\n if (listOfFile.isFile()) {\n String filePath = folder.getPath() + \"/\" + listOfFile.getName();\n System.out.println(\"File \" + filePath);\n if (filePath.contains(\".xml\") && !filePath.contains(\"AfterStories\") && !filePath.contains(\n \"BeforeStories\")) {\n readXML(filePath);\n }\n }\n }\n }\n }", "@Test\n public void testSpecificationFile() {\n \texpectedExit = 0;\n \tignoreNotes = true;\n \tString subdir = \"testspecs\" + \"/\" + classname;\n \tString testname = null;\n for (File f: new File(subdir).listFiles()) {\n \tif (f.getName().startsWith(\"Test\")) {\n \t\ttestname = f.getName().replace(\".java\",\"\");\n \t\tbreak;\n \t}\n }\n \thelpTCF(subdir,subdir,testname);\n }" ]
[ "0.6704337", "0.6143898", "0.5946539", "0.59396344", "0.59207517", "0.58997566", "0.58803445", "0.58758694", "0.58599734", "0.58495414", "0.58431137", "0.58424205", "0.57205224", "0.56972146", "0.56911623", "0.5664752", "0.5661354", "0.56232715", "0.56049865", "0.5573212", "0.55515647", "0.55027056", "0.5499231", "0.54810405", "0.54445046", "0.5427361", "0.54053366", "0.5405013", "0.5399642", "0.5396886", "0.53894794", "0.53855455", "0.5384721", "0.5384721", "0.53813106", "0.5376843", "0.5376744", "0.5362054", "0.5350561", "0.53407973", "0.5329401", "0.53203475", "0.5317937", "0.5316256", "0.53075427", "0.5297558", "0.5270149", "0.52546644", "0.52219677", "0.5206776", "0.5202016", "0.51898354", "0.51896554", "0.5187542", "0.5182675", "0.5180016", "0.51725507", "0.5166287", "0.51626074", "0.5144289", "0.5137387", "0.51373327", "0.51338935", "0.51311123", "0.51150537", "0.5105583", "0.50978357", "0.50883377", "0.5087842", "0.508599", "0.5085357", "0.50851345", "0.5082737", "0.50808066", "0.5076207", "0.50739", "0.50667137", "0.50659066", "0.5065702", "0.5057004", "0.5057004", "0.50488853", "0.50433403", "0.50416887", "0.5041159", "0.5038142", "0.5034968", "0.50148886", "0.50139576", "0.5007099", "0.4993471", "0.4970917", "0.49697047", "0.49694213", "0.49657682", "0.4962612", "0.49611336", "0.49519154", "0.49505192", "0.49438956", "0.49422163" ]
0.0
-1
Gets the input stream from a response entity. If the entity is gzipped then this will get a stream over the uncompressed data.
public static InputStream getUngzippedContent(HttpEntity entity) throws IOException { InputStream responseStream = entity.getContent(); if (responseStream == null) { return responseStream; } Header header = entity.getContentEncoding(); if (header == null) { return responseStream; } String contentEncoding = header.getValue(); if (contentEncoding == null) { return responseStream; } if (contentEncoding.contains("gzip")) { if (DEBUG) Log.d(TAG, "getUngzippedContent"); responseStream = new GZIPInputStream(responseStream); } return responseStream; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static InputStream getDecompressingInputStream(final HttpResponse<InputStream> resp) throws IOException {\n final String encoding = resp.headers().firstValue(\"Content-Encoding\").orElse(\"identity\").toLowerCase(Locale.ROOT).trim();\n log.debug(\"HTTP server uses \" + encoding + \" content encoding.\");\n switch (encoding) {\n case \"gzip\": return new GZIPInputStream(resp.body());\n case \"deflate\": return new InflaterInputStream(resp.body());\n case \"identity\": return resp.body();\n }\n throw new IOException(\"Server uses an invalid content encoding: \" + encoding);\n }", "public InputStream stream() throws HttpRequestException {\n InputStream inputStream;\n InputStream inputStream2;\n if (this.code() < 400) {\n try {\n inputStream2 = this.getConnection().getInputStream();\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }\n inputStream2 = inputStream = this.getConnection().getErrorStream();\n if (inputStream == null) {\n try {\n inputStream2 = this.getConnection().getInputStream();\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }\n if (!this.uncompress) return inputStream2;\n if (!\"gzip\".equals(this.contentEncoding())) {\n return inputStream2;\n }\n try {\n return new GZIPInputStream(inputStream2);\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }", "Stream<In> getInputStream();", "public static InputStream getResponseBodyStream(HttpResponse response) throws IOException {\n if (response == null || response.getEntity() == null) {\n return null;\n }\n InputStream inStream = response.getEntity().getContent();\n Header contentEncoding = response.getFirstHeader(\"Content-Encoding\");\n\n if (contentEncoding != null\n && contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\n inStream = new GZIPInputStream(inStream);\n }\n\n return inStream;\n }", "public static InputStream getStream(HttpResponse response)\n\t\t\tthrows IllegalStateException, IOException {\n\n\t\tInputStream instream = response.getEntity().getContent();\n\t\tHeader contentEncoding = response.getFirstHeader(\"Content-Encoding\");\n\t\tif (contentEncoding != null\n\t\t\t\t&& contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\n\t\t\tinstream = new GZIPInputStream(instream);\n\t\t}\n\t\treturn instream;\n\t}", "public InputStream getContentReplayInputStream() throws IOException {\n InputStream entityStream = getEntityReplayInputStream();\n if(StringUtils.isEmpty(contentEncoding)) {\n return entityStream;\n } else if (\"gzip\".equalsIgnoreCase(contentEncoding) || \"x-gzip\".equalsIgnoreCase(contentEncoding)) {\n try {\n return new GZIPInputStream(entityStream);\n } catch (IOException ioe) {\n logger.log(Level.WARNING,\"gzip problem; using raw entity instead\",ioe);\n IOUtils.closeQuietly(entityStream); // close partially-read stream\n return getEntityReplayInputStream(); \n }\n } else if (\"deflate\".equalsIgnoreCase(contentEncoding)) {\n return new DeflaterInputStream(entityStream);\n } else if (\"identity\".equalsIgnoreCase(contentEncoding) || \"none\".equalsIgnoreCase(contentEncoding)) {\n return entityStream;\n } else {\n // shouldn't be reached given check on setContentEncoding\n logger.log(Level.INFO,\"Unknown content-encoding '\"+contentEncoding+\"' declared; using raw entity instead\");\n return entityStream; \n }\n }", "public InputStream getInputStream();", "public InputStream getInputStream();", "public InputStream getInputStream() throws IOException;", "public InputStream getInputStream() throws IOException;", "public InputStream getStream();", "public abstract InputStream getInputStream();", "public abstract InputStream getInputStream();", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "@Override\r\n\tpublic InputStream getInputStream() throws IOException {\n\t\treturn this.s.getInputStream();\r\n\t}", "public static\n InputStream inputStream() {\n return Input.wrappedInputStream;\n }", "public InputStream getInputStream(long position);", "public static InputStream getClientRequestInputStream(\r\n\t\t\tHttpServletRequest argClientRequest) throws IOException {\r\n\t\t// String ae =\r\n\t\t// argClientRequest.getHeader(HttpConstants.ACCEPT_ENCODING);\r\n\t\t// if (ae != null && ae.indexOf(HttpConstants.GZIP) >= 0) {\r\n\t\t// return new GZIPInputStream(argClientRequest.getInputStream());\r\n\t\t// }\r\n\t\treturn argClientRequest.getInputStream();\r\n\t}", "protected InputStream decorateInputStream(HttpExchange exchange, InputStream is)\r\n/* 51: */ throws IOException\r\n/* 52: */ {\r\n/* 53:125 */ return is;\r\n/* 54: */ }", "public InputStream getEntityReplayInputStream() throws IOException {\n if(inputIsChunked) {\n return new ChunkedInputStream(getRecordedInput().getMessageBodyReplayInputStream());\n } else {\n return getRecordedInput().getMessageBodyReplayInputStream();\n }\n }", "public InputStream getInputStream() throws IOException {\n return body.getInputStream();\n }", "private ObjectInputStream getInputStream() {\n\t\t// retornamos el stream de entrada\n\t\treturn this.inputStream;\n\t}", "protected InputStream decorateInputStream(HttpExchange exchange, InputStream is)\n/* */ throws IOException\n/* */ {\n/* 131 */ return is;\n/* */ }", "public InputStream openHttp2Stream(URL url) throws IOException {\r\n return openHttpEntity(url).getContent();\r\n }", "@Override\r\n public InputStream getContentStream() throws StreamIOException {\r\n\r\n HttpInputStream contentStream = null;\r\n try {\r\n contentStream = s_http.get(DSLocation, true);\r\n DSSize =\r\n new Long(contentStream\r\n .getResponseHeaderValue(\"content-length\", \"0\"))\r\n .longValue();\r\n } catch (Throwable th) {\r\n throw new StreamIOException(\"Error getting content stream\", th);\r\n }\r\n return contentStream;\r\n }", "InputStream getDataStream();", "public InputStream getInputStream() throws IOException {\n/* 521 */ return Minecraft.getMinecraft().getResourceManager().getResource(p_148612_0_).getInputStream();\n/* */ }", "public InputStream getInputStream() {\n return inputStream;\n }", "public InputStream getInputStream() {\n return inputStream;\n }", "public final InputStream returnStream()\n\t{\n\t\treturn stream;\n\t}", "public InputStream asInputStream() {\n return new ByteArrayInputStream(data);\n }", "protected abstract InputStream getStream(String resource);", "public InputStream getStream() {\n\t\treturn new ByteArrayInputStream(os.toByteArray());\n\t}", "public InputStream getInputStream() throws MorseException {\n\t\treturn null;\r\n\t}", "public InputStream getInputStream()\r\n\t{\r\n\t\treturn this.inputStream;\r\n\t}", "@Override\r\n\tpublic InputStream getInStream() {\n\t\treturn inStreamServer;\r\n\t}", "public InputStream getEntityContent(String url) throws ClientProtocolException, IOException {\n HttpGet getMethod = new HttpGet(url);\n HttpResponse response = httpClient.execute(getMethod);\n HttpEntity entity = response.getEntity();\n return entity == null ? null : entity.getContent();\n }", "public InputStream getInputStream() {\n return this.inputStream;\n }", "public InputStream getInputStream() {\n\t\treturn inputStream;\n\t}", "public InputStream getInputStream() {\n\t\treturn inputStream;\n\t}", "protected InputStream getInputStream() throws IOException\n\t {\n\t FileInputStream fin = new FileInputStream(fFilename);\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }", "protected InputStream getURLInputStream() throws Exception\n\t {\n\n\t URL url = new URL(file, fFilename);\n\t InputStream fin = url.openStream();\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }", "public InputStream getInputStream() throws IOException {\r\n if (!connected)\r\n connect();\r\n\r\n return zipFile.getInputStream(zipEntry);\r\n }", "public InputStream getStream(URL url) throws IOException {\n return engine.getStream(url);\n }", "public InputStream getStream() {\n\t\treturn this.in;\n\t}", "protected final InputStream getStream() { return _inputSource; }", "public InputStream getInputStream() {\n return this.inputStream;\n }", "public InputStream getInputStream() {\n\t\treturn fromMonet;\n\t}", "public InputStream getInputStream()\n throws ProcessingException, IOException {\n try {\n return this.source.getInputStream();\n } catch (SourceException e) {\n throw SourceUtil.handle(e);\n }\n }", "public InputStream getInputStream() {\n return _combinedInputStream;\n }", "private InputStream getInputStream (SvnClient client, SVNUrl url, String revision, String pegRevision) throws SVNClientException {\n InputStream in = null;\n try {\n in = client.getContent(url, SvnUtils.toSvnRevision(revision), SvnUtils.toSvnRevision(pegRevision));\n } catch (SVNClientException e) {\n if (SvnClientExceptionHandler.isFileNotFoundInRevision(e.getMessage()) ||\n SvnClientExceptionHandler.isPathNotFound(e.getMessage())) {\n in = new ByteArrayInputStream(new byte[]{});\n } else {\n throw e;\n }\n }\n return in;\n }", "public InputStream getInputStream() throws Exception {\r\n if (externalUrl != null) {\r\n AmazonS3URI s3Uri = DirectUtils.getS3Uri(externalUrl);\r\n if (s3Uri != null) {\r\n S3Object s3Object = DirectUtils.getS3Client().getObject(new GetObjectRequest(s3Bucket,\r\n DirectUtils.getS3FileKey(externalUrl)));\r\n return s3Object.getObjectContent();\r\n } else {\r\n DefaultHttpClient httpClient = new DefaultHttpClient();\r\n HttpGet request = new HttpGet(externalUrl);\r\n HttpResponse response = httpClient.execute(request);\r\n // skip status code >=400\r\n if (response.getStatusLine().getStatusCode() >= HttpStatus.SC_BAD_REQUEST) {\r\n throw new HttpResponseException(response.getStatusLine().getStatusCode(), \"Invalid file from external\");\r\n }\r\n\r\n HttpEntity entity = response.getEntity();\r\n if (entity == null) {\r\n throw new HttpResponseException(HttpStatus.SC_BAD_REQUEST, \"Invalid response from external\");\r\n }\r\n return entity.getContent();\r\n }\r\n }\r\n\r\n if (contest.getProjectHeader().getProjectCategory().getId() == ContestType.COPILOT_POSTING.getId()) {\r\n // it's copilot posting, append user handle to each file in the copilot posting submission\r\n Resource[] resources = contest.getResources();\r\n long userId = 0;\r\n for(Resource r : resources) {\r\n if(r.getId() == submission.getUpload().getOwner()) {\r\n userId = Long.parseLong(r.getProperty(\"External Reference ID\"));\r\n break;\r\n }\r\n }\r\n\r\n return prefixHandleToSubmissionFile(uploadedFile, userId);\r\n } else {\r\n return uploadedFile.getInputStream();\r\n }\r\n }", "@NonNull\n StreamedHttpRequest toStreamHttpRequest();", "@Override\n public ServletInputStream getInputStream() throws IOException {\n return new ServletInputStream() {\n private int lastIndexRetrieved = -1;\n private ReadListener readListener = null;\n\n @Override\n public boolean isFinished() {\n return (lastIndexRetrieved == bytes.length - 1);\n }\n\n @Override\n public boolean isReady() {\n // This implementation will never block\n // We also never need to call the readListener from this method, as this method will never return false\n return isFinished();\n }\n\n @Override\n public void setReadListener(ReadListener readListener) {\n this.readListener = readListener;\n if (!isFinished()) {\n try {\n readListener.onDataAvailable();\n } catch (IOException e) {\n readListener.onError(e);\n }\n } else {\n try {\n readListener.onAllDataRead();\n } catch (IOException e) {\n readListener.onError(e);\n }\n }\n }\n\n @Override\n public int read() throws IOException {\n int i;\n if (!isFinished()) {\n i = bytes[lastIndexRetrieved + 1];\n lastIndexRetrieved++;\n if (isFinished() && (readListener != null)) {\n try {\n readListener.onAllDataRead();\n } catch (IOException ex) {\n readListener.onError(ex);\n throw ex;\n }\n }\n return i;\n } else {\n return -1;\n }\n }\n };\n }", "public InputStream inputWrap(InputStream is) \n throws IOException {\n logger.fine(Thread.currentThread().getName() + \" wrapping input\");\n \n // discard any state from previously-recorded input\n this.characterEncoding = null;\n this.inputIsChunked = false;\n this.contentEncoding = null; \n \n this.ris.open(is);\n return this.ris;\n }", "public InputStream getInputStream() throws IOException {\n return new FileInputStream(_file);\n }", "public InputStream executeStreaming() throws DomainApiException {\n try {\n Socket socket = new Socket(HOST, PORT);\n try {\n StringBuffer sb = new StringBuffer();\n sb.append(\"GET \" + initPathParameter() + \"\\n\");\n sb.append(\"Content-Type: application/json\\n\");\n sb.append(\"Authorization: \"\n + authentificator.generateBasicAuthorization() + \"\\n\\n\");\n socket.getOutputStream().write(sb.toString().getBytes());\n } catch (IOException ex) {\n throw new DomainApiException(ex);\n }\n return socket.getInputStream();\n } catch (MalformedURLException ex) {\n throw new DomainApiException(ex);\n } catch (IOException ex) {\n throw new DomainApiException(ex);\n }\n }", "public java.io.InputStream getStream(String content) {\r\n\t\ttry {\r\n\t\t\tjava.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream(content.getBytes());\r\n\t\t\treturn bais;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(ex.getMessage());\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "protected abstract InputStream getInStreamImpl(String filename) throws IOException;", "public InputStream getAsInputStream () {\r\n\r\n\t //code description\r\n\t \r\n\t if (this.document == null) return null;\r\n\t return new ByteArrayInputStream(this.getAsBytes());\r\n\t \r\n }", "public InputStream inputStream(final String uri, final Map<String, String> creds) throws Exception {\n\t\ttry {\n\t\t\tClient c = getHttpClient();\n\t\t\tWebResource r = c.resource(url + \"/file\");\n\t\t\tcom.sun.jersey.api.client.WebResource.Builder b = r.header(HTTP_HEADER_KEY, key).header(HTTP_HEADER_URI, uri).accept(MediaType.APPLICATION_OCTET_STREAM);\n\t\t\tif (allowRedirects) b.header(HTTP_HEADER_REDIRECT, \"yes\");\n\t\t\taddMapAsHttpHeader(b, creds);\n\t\t\treturn b.get(InputStream.class);\n\t\t} catch (UniformInterfaceException e) {\n\t\t\tthrow new Exception(e.getMessage() + \" (\" + e.getResponse().getEntity(String.class) + \")\");\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t}\n\t}", "@Override\n\tpublic InputStream getInputStream() throws IOException {\n\t\treturn null;\n\t}", "public InputStream getInputStream() throws IOException {\r\n return mFile.getInputStream();\r\n }", "private InputStream getStream() throws IOException {\n if (delegatee == null) {\n try {\n delegatee = value.getStream();\n } catch (RepositoryException re) {\n throw (IOException) new IOException(re.getMessage()).initCause(re);\n }\n }\n return delegatee;\n }", "public BCPGInputStream getInputStream()\n {\n return in;\n }", "public InputStream getWrappedInputStream() {\n return this.decryptedContents;\n }", "public InputStream getInputStream() throws IOException {\n return con.getInputStream();\n }", "public InputStream getStream() {\n final CircularByteBuffer cbb = new CircularByteBuffer(1024);\n new Thread(\n new Runnable(){\n public void run(){\n ZipOutputStream zos = new ZipOutputStream(cbb.getOutputStream());\n Utils.zipDir(getVolume(), requestedDirectory.getPath(), zos);\n\n try {\n if (zos != null) {\n zos.flush();\n zos.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n ).start();\n\n return cbb.getInputStream();\n }", "@Override\r\n public InputStream contentStream() {\r\n try {\r\n return okResponse.body().byteStream();\r\n } catch (IOException e) {\r\n throw fail(e);\r\n }\r\n }", "public InputStream openInputStream() throws IOException {\n return super.openInputStream();\n //StringBuilder sb = getCharContent(true);\n //ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //( charset ==null ? new OutputStreamWriter(baos) : new OutputStreamWriter(baos,charset) )\n // .write(sb.toString()); // ouch!\n //return new ByteArrayInputStream(baos.toByteArray()); // another ouch!\n }", "protected abstract OutputStream getStream() throws IOException;", "public static InputStream getInputStream(String pageURL) throws IOException{\n InputStream is = null;\n URL url = new URL(pageURL);\n URLConnection conn = url.openConnection();\n conn.setUseCaches(false);\n conn.addRequestProperty(\"User-agent\", Common.USER_AGENT);\n is = conn.getInputStream();\n return is;\n }", "public InputStream getInputStream() {\n if (fTDeviceInputStream == null) {\n fTDeviceInputStream = new FTDeviceInputStream(this);\n }\n return fTDeviceInputStream;\n }", "InputStream getAsset(String asset) throws IOException;", "public LoggedDataInputStream getInputStream() {\n return inputStream;\n }", "InputStream getInputStream() throws ChannelConnectException,\r\n\t\t\tChannelReadException;", "public InputStream getInputStream() throws IOException {\n return this.mContext.getAssets().open(this.mAssetName);\n }", "@Override\n public Reader getInputStreamReader() throws IOException {\n return new InputStreamReader(getInputStream());\n }", "public InputStream getInputStream()\n/* */ {\n/* 105 */ InputStream in = ResourceUtils.getResourceAsStream(this, this);\n/* */ \n/* 107 */ return in;\n/* */ }", "InputStream openStream() throws IOException;", "public InputStream get(Bitstream bitstream) throws IOException {\n try {\n return new FileInputStream(getFile(bitstream));\n } catch (Exception e) {\n log.error(\"get(\" + bitstream.getInternalId() + \")\", e);\n throw new IOException(e);\n }\n }", "@NotNull InputStream openInputStream() throws IOException;", "public static InputStream openInputStreamGZ(ResourceLocator locator) throws IOException {\n\n InputStream inputStream = null;\n\n if (isDataURL(locator.getPath())) {\n String dataURL = locator.getPath();\n int commaIndex = dataURL.indexOf(',');\n if (commaIndex < 0) {\n throw new Error(\"dataURL missing commas\");\n }\n // TODO -- check optional media type - only text/plain supported\n String contents = URLDecoder.decode(dataURL.substring(commaIndex + 1), StandardCharsets.UTF_8);\n return new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8));\n } else if (HttpUtils.isRemoteURL(locator.getPath())) {\n URL url = HttpUtils.createURL(locator.getPath());\n inputStream = HttpUtils.getInstance().openConnectionStream(url);\n } else {\n String path = locator.getPath();\n if (path.startsWith(\"file://\")) {\n path = path.substring(7);\n }\n File file = new File(path);\n inputStream = new FileInputStream(file);\n }\n\n if (locator.getPath().endsWith(\"gz\")) {\n return new GZIPInputStream(inputStream);\n } else {\n return inputStream;\n }\n }", "private String getEntityContent(HttpEntity entity) throws IOException {\n return getEntityContent(entity, \"utf-8\");\n }", "@Override\n public InputStream getContentInputStream()\n {\n final class LockingFileInputStream extends FileInputStream\n {\n /** The lock to lock while reading the file. */\n private Lock lock;\n\n /**\n * The Constructor.\n *\n * @param toRead the file for this stream to read.\n * @param lock the lock to lock on creation of the stream and unlock when it is closed.\n * @throws IOException if the extended FileInputStream throws one.\n */\n public LockingFileInputStream(final File toRead, final Lock lock) throws IOException\n {\n super(toRead);\n this.lock = lock;\n lock.lock();\n }\n\n /** {@inheritDoc} */\n public void close() throws IOException\n {\n // Make sure this only happens once.\n if (this.lock != null) {\n super.close();\n this.lock.unlock();\n this.lock = null;\n }\n }\n }\n\n try {\n return new AutoCloseInputStream(\n new LockingFileInputStream(this.storageFile, this.lock.readLock()));\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to get InputStream\", e);\n }\n }", "public static InputStream getStream(Context context, String urlStr) throws IOException {\n InputStream stream = null;\n\n if (urlStr.startsWith(\"assets://\")) {\n stream = context.getAssets().open(urlStr.replaceFirst(\"assets://\", \"\"));\n } else {\n URL url = new URL(urlStr);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setConnectTimeout(15000);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n stream = connection.getInputStream();\n }\n }\n\n return stream;\n }", "private static String readInputStream(InputStream responseStream) {\n if (responseStream == null) {\n Log.e(LOG_TAG, \"Provided InputStream is null, exiting method early\");\n return null;\n }\n\n StringBuilder response = new StringBuilder();\n String line;\n\n InputStreamReader inputStreamReader = new InputStreamReader(responseStream);\n BufferedReader reader = new BufferedReader(inputStreamReader);\n\n try {\n line = reader.readLine();\n while (line != null) {\n response.append(line);\n line = reader.readLine();\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem occured while reading from response stream\");\n e.printStackTrace();\n }\n\n return response.toString();\n }", "protected InputStream _optimizedStreamFromURL(URL url)\n/* */ throws IOException\n/* */ {\n/* 1529 */ if (\"file\".equals(url.getProtocol()))\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1536 */ String host = url.getHost();\n/* 1537 */ if ((host == null) || (host.length() == 0))\n/* */ {\n/* 1539 */ String path = url.getPath();\n/* 1540 */ if (path.indexOf('%') < 0) {\n/* 1541 */ return new FileInputStream(url.getPath());\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1547 */ return url.openStream();\n/* */ }", "@Override\n\t\tpublic ServletInputStream getInputStream() throws IOException {\n\t\t\treturn null;\n\t\t}", "public InputStream openInputStream() throws IOException {\n // TODO: this mode is not set yet.\n // if ((parent.mode & Connector.READ) == 0)\n // throw new IOException(\"write-only connection\");\n\n ensureOpen();\n\n if (inputStreamOpened)\n throw new IOException(\"no more input streams available\");\n if (isGet) {\n // send the GET request here\n validateConnection();\n isValidateConnected = true;\n } else {\n if (privateInput == null) {\n privateInput = new PrivateInputStream(this);\n }\n }\n\n inputStreamOpened = true;\n\n return privateInput;\n }", "@Override\r\n public Reader contentReader() {\r\n try {\r\n return okResponse.body().charStream();\r\n } catch (IOException e) {\r\n throw fail(e);\r\n }\r\n }", "protected InputStream unarmor(InputStream stream)\r\n\t\t\tthrows IOException, PGPException {\r\n\t\treturn PGPUtil.getDecoderStream(stream);\r\n\t}", "public InputStream getIn() {\n\t\treturn proc.getInputStream();\n\t}", "protected InputStream getInputStream() throws IOException\n {\n if (fd == null) {\n throw new IOException(\"socket not created\");\n }\n\n synchronized (this) {\n if (fis == null) {\n fis = new SocketInputStream();\n }\n\n return fis;\n }\n }", "public final PrintStream getInputStream() {\n return inputStream;\n }", "public abstract InputStream getInputStream() throws AccessException;", "public InputStream getInputStream() throws IOException {\r\n \t\t \t\r\n \t\t \t\r\n \t\t \tInputStream stream = null;\r\n \t\t \r\n \t\t \tClassLoader saved = Thread.currentThread().getContextClassLoader();\r\n\t\t\ttry {\r\n\t\t\t\t Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());\r\n\t\t\t\t String newXml = null;\r\n\t\t\t\t Map<String, Object> options = new HashMap<String, Object>();\r\n\t\t\t\t options.put(\"includeSchema\", \"true\");\r\n\t\t\t\t// CONNECT TO RSUITE\r\n\t\t\t\t log.println(\"GETTING DOCUMENT WITH MO ID: \" + moId + \"...\");\r\n\t\t\t\t String document = repository.getAsString(moId, options);\r\n\t\t\t\t /*\r\n\t\t\t\t InputStream realInputStream = new URL(host + \"/rsuite/rest/v2/content/binary/id/\" + moId + \"?skey=\" + repository.sessionKey).openConnection().getInputStream();\r\n\t\t\t\t StringWriter writer = new StringWriter();\r\n\t\t\t\t IOUtils.copy(realInputStream, writer);\r\n\t\t\t\t String document = writer.toString();\r\n\t\t\t\t */\r\n\t\t\t\t log.println(\"DOCUMENT FOUND.\");\r\n\t\t\t\t log.print(document);\r\n\t\t\t\t \r\n\t\t\t\t // FIND ENCODING\r\n\t\t\t\t encoding = guessXMLEncoding(document);\r\n\r\n\t\t\t\t XMLStructureDefinitionType xmlStructureDefinitionType = getXMLStructureDefinitionType(document);\r\n\t\t\t\t newXml = document;\r\n\t\t\t\t \r\n\t\t\t\t switch (xmlStructureDefinitionType) {\r\n\t\t\t\t \tcase DTD:\r\n\t\t\t\t \t\tnewXml = replaceDtdDefinition(document, log);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase XSD:\r\n\t\t\t\t\t\tnewXml = replaceXsdDefinition(document, log);\t\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t\t }\r\n\t\t\t\t if (newXml == null) {\r\n\t\t\t\t\t newXml = document;\r\n\t\t\t\t }\r\n\t\t\t\t log.println(\"XML CONVERTED\");\r\n\t\t\t\t log.println(newXml);\r\n\t\t\t\t // RETURN DOCUMENT\r\n\t\t\t\t log.println(\"CREATING INPUT STREAM FROM NEW DOCUMENT...\");\r\n\t\t\t\t stream = new ByteArrayInputStream(newXml.getBytes(encoding));\r\n\t\t\t\t log.println(\"STREAM CREATED SUCCESSFULLY.\");\r\n\t\t\t}\r\n\t\t\tcatch(Throwable t){\r\n\t\t\t\tt.printStackTrace(log);\r\n\t\t\t\tfor (Throwable t1 : t.getSuppressed()) {\r\n\t\t\t\t\tt1.printStackTrace(log);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinally{\r\n\t\t\t\tThread.currentThread().setContextClassLoader(saved);\r\n\t\t\t}\r\n\t\t\tlog.println(\"RETURNING STREAM TO OXYGEN...\");\r\n\t\t\treturn stream;\r\n\t\t}", "@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 }" ]
[ "0.703082", "0.6991285", "0.68234766", "0.68051314", "0.67149657", "0.65271217", "0.63320893", "0.63320893", "0.6326232", "0.6326232", "0.62833196", "0.62304306", "0.62304306", "0.6207258", "0.6207258", "0.6207258", "0.6179405", "0.60259897", "0.60025996", "0.5983474", "0.59651715", "0.59503347", "0.5942619", "0.5878646", "0.587363", "0.5862535", "0.5809174", "0.5789241", "0.5760024", "0.57598233", "0.57598233", "0.57581675", "0.5739737", "0.57091546", "0.5706119", "0.56946933", "0.56863964", "0.56281364", "0.56200373", "0.56126684", "0.56044817", "0.56044817", "0.5579653", "0.5570006", "0.5568427", "0.5557334", "0.55518746", "0.55469805", "0.5527465", "0.5507299", "0.5501605", "0.54873157", "0.5471701", "0.54619485", "0.543688", "0.5423442", "0.5407613", "0.53955305", "0.53870195", "0.53844833", "0.53839505", "0.5345755", "0.53317326", "0.5331597", "0.53244054", "0.53214365", "0.53142077", "0.53054047", "0.5293696", "0.52865183", "0.5285416", "0.5283581", "0.5252338", "0.5243476", "0.52272624", "0.52099735", "0.52055275", "0.52027726", "0.5201208", "0.520008", "0.51990896", "0.5196797", "0.51901627", "0.5174724", "0.5165546", "0.5165205", "0.5160445", "0.5157722", "0.5153696", "0.51534563", "0.51500165", "0.5133513", "0.51275605", "0.5117236", "0.51164335", "0.51158124", "0.51155907", "0.5107189", "0.5100756", "0.50803685" ]
0.73949164
0
Shamelessly cribbed from AndroidHttpClient
public static final DefaultHttpClient createHttpClient(int retryCount, int timeout) { HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, HTTP.UTF_8); // HttpProtocolParams.setUseExpectContinue(params, true); // Turn off stale checking. Our connections break all the time anyway, // and it's not worth it to pay the penalty of checking every time. HttpConnectionParams.setStaleCheckingEnabled(params, false); // Default connection and socket timeout of 30 seconds. Tweak to taste. HttpConnectionParams.setConnectionTimeout(params, timeout); HttpConnectionParams.setSoTimeout(params, timeout); HttpConnectionParams.setSocketBufferSize(params, 8192); HttpClientParams.setRedirecting(params, true); ConnManagerParams.setTimeout(params, timeout); ConnManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(50)); ConnManagerParams.setMaxTotalConnections(params, 200); // Sets up the http part of the service. final SchemeRegistry supportedSchemes = new SchemeRegistry(); // Register the "http" protocol scheme, it is required // by the default operator to look up socket factories. final SocketFactory sf = PlainSocketFactory.getSocketFactory(); supportedSchemes.register(new Scheme("http", sf, 80)); supportedSchemes.register(new Scheme("https", SSLSocketFactory .getSocketFactory(), 443)); final ThreadSafeClientConnManager ccm = new ThreadSafeClientConnManager( params, supportedSchemes); DefaultHttpClient httpClient = new DefaultHttpClient(ccm, params); httpClient .setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler( retryCount, true)); // Add gzip header to requests using an interceptor // httpClient.addRequestInterceptor(new GzipHttpRequestInterceptor()); // Add gzip compression to responses using an interceptor // httpClient.addResponseInterceptor(new GzipHttpResponseInterceptor()); return httpClient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String makeHttpRequest(String url, String method,\r\n\t List<NameValuePair> params) {\r\n\t \t\r\n\t\t\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t // Making HTTP request\r\n\t try {\r\n\t \r\n\t // check for request method\r\n\t if(method == \"POST\"){\r\n\t // request method is POST\r\n\t // defaultHttpClient\r\n\t DefaultHttpClient httpClient = new DefaultHttpClient();\r\n\t\t \t\t\tHttpParams paramss = httpClient.getParams();\r\n\t\t \t\t\tHttpConnectionParams.setConnectionTimeout(paramss, 5000);\r\n\t\t \t\t\tHttpConnectionParams.setSoTimeout(paramss, 5000);\r\n\t\t \t\t\t\r\n\t \r\n\t HttpPost httpPost = new HttpPost(url);\r\n\t httpPost.setEntity(new UrlEncodedFormEntity(params));\r\n\t \r\n\t HttpResponse httpResponse = httpClient.execute(httpPost);\r\n\t HttpEntity httpEntity = httpResponse.getEntity();\r\n\t is = httpEntity.getContent();\r\n\t \r\n\t }else if(method == \"GET\"){\r\n\t // request method is GET\t \r\n\t \r\n\t DefaultHttpClient httpClient = new DefaultHttpClient();\r\n\t\t \t\t\tHttpParams paramss = httpClient.getParams();\r\n\t\t \t\t\tHttpConnectionParams.setConnectionTimeout(paramss, 3000);\r\n\t\t \t\t\tHttpConnectionParams.setSoTimeout(paramss,3000);\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t String paramString = URLEncodedUtils.format(params, \"utf-8\");\r\n\t if( paramString.length() > 0 )\r\n\t url += \"?\" + paramString;\r\n\t HttpGet httpGet = new HttpGet(url);\r\n\t \r\n\t \r\n\t HttpResponse httpResponse = httpClient.execute(httpGet);\r\n\t if(httpResponse.getStatusLine().getStatusCode() != 200 )\r\n\t \treturn null;\r\n\t HttpEntity httpEntity = httpResponse.getEntity();\r\n\t is = httpEntity.getContent();\r\n\t \r\n\t charset = getContentCharSet(httpEntity);\r\n\t \r\n\t \r\n\t Header[] headers = httpResponse.getAllHeaders();\r\n\t \tfor (Header header : headers) {\r\n\t \t\tLog.d(\"stat\",\"Key : \" + header.getName() \r\n\t + \" ,Value : \" + header.getValue());\r\n\t \r\n\t \t}\r\n\r\n\t \tSystem.out.println(\"\\nGet Response Header By Key ...\\n\");\r\n\t \tString server = httpResponse.getFirstHeader(\"Server\").getValue();\r\n\t \tLog.d(\"server\", server);\r\n\t \r\n\t \t///////////////////////////////////////////////////////////////////////////////\r\n\r\n\t } \r\n\t \r\n\t } catch (UnsupportedEncodingException e) {\r\n\t \tLog.d(\"unsupporetedencoding\", \"erro\");\r\n\t e.printStackTrace();\r\n\t return null;\r\n\t } catch (ClientProtocolException e) {\r\n\t \tLog.d(\"clientprotocalexception\", \"erro\");\r\n\t \te.printStackTrace();\r\n\t \treturn null;\r\n\t } catch (IOException e) {\r\n\t \tLog.d(\"ioexception\", \"erro\");\r\n\t e.printStackTrace();\r\n\t return null;\r\n\t }\r\n\t \r\n\t try {\r\n\t // BufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t // is, \"iso-8859-1\"), 8);\r\n\t // BufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t // is, \"iso-8859-1\"),16);\r\n\t \r\n\t \t\r\n\t \t\r\n\t \tif (charset == null) {\r\n\r\n\t \t\tcharset = HTTP.UTF_8;\r\n\r\n\t \t\t}\r\n\r\n\t \t\r\n\t \t\r\n\t BufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t is, charset));\r\n\t \r\n\t \r\n\t StringBuilder sb = new StringBuilder();\r\n\t String line = null;\r\n\t while ((line = reader.readLine()) != null) {\r\n\t sb.append(line);\r\n\t }\r\n\t is.close();\r\n\t String text = sb.toString();\r\n\t if( text.length() == 0 )\r\n\t \treturn null;\r\n\t text = text.replace(\"\\uFEFF\", \"\");\r\n\t json = Crypto3DES.Decrypte(text);\r\n\t \r\n\t Log.d(\"display\", json);\r\n\t \r\n\t } catch (Exception e) {\r\n\t Log.e(\"Buffer Error\", \"Error converting result \" + e.toString());\r\n\t Log.d(\"buffer erro\", e.toString());\r\n\t return null;\r\n\t }\r\n\t \r\n\t return json;\r\n\t }", "private static HttpClient getNewHttpClient(){\n HttpParams params = new BasicHttpParams();\n return new DefaultHttpClient(params);\n }", "private String doHttpClientGet() {\n\t\t\r\n\t\tHttpGet httpGet=new HttpGet(url);\r\n\t\tHttpClient client=new DefaultHttpClient();\r\n\t\ttry {\r\n\t\t\tHttpResponse response=client.execute(httpGet);\r\n\t\t\tif(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){\r\n\t\t\t\tresult=EntityUtils.toString(response.getEntity());\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"content----->\"+result);\r\n\t\t} catch (ClientProtocolException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private static byte[] a(org.apache.http.HttpResponse r4) throws java.lang.IllegalStateException, java.io.IOException {\n /*\n r0 = 1024(0x400, float:1.435E-42)\n byte[] r0 = new byte[r0]\n r1 = 0\n org.apache.http.HttpEntity r4 = r4.getEntity() // Catch:{ all -> 0x0030 }\n java.io.InputStream r4 = r4.getContent() // Catch:{ all -> 0x0030 }\n java.io.ByteArrayOutputStream r2 = new java.io.ByteArrayOutputStream // Catch:{ all -> 0x002e }\n r2.<init>() // Catch:{ all -> 0x002e }\n L_0x0012:\n int r1 = r4.read(r0) // Catch:{ all -> 0x002b }\n r3 = -1\n if (r1 == r3) goto L_0x001e\n r3 = 0\n r2.write(r0, r3, r1) // Catch:{ all -> 0x002b }\n goto L_0x0012\n L_0x001e:\n byte[] r0 = r2.toByteArray() // Catch:{ all -> 0x002b }\n if (r4 == 0) goto L_0x0027\n r4.close() // Catch:{ Exception -> 0x0027 }\n L_0x0027:\n r2.close() // Catch:{ Exception -> 0x002a }\n L_0x002a:\n return r0\n L_0x002b:\n r0 = move-exception\n r1 = r2\n goto L_0x0032\n L_0x002e:\n r0 = move-exception\n goto L_0x0032\n L_0x0030:\n r0 = move-exception\n r4 = r1\n L_0x0032:\n if (r4 == 0) goto L_0x0039\n r4.close() // Catch:{ Exception -> 0x0038 }\n goto L_0x0039\n L_0x0038:\n L_0x0039:\n if (r1 == 0) goto L_0x003e\n r1.close() // Catch:{ Exception -> 0x003e }\n L_0x003e:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.alipay.sdk.f.d.a(org.apache.http.HttpResponse):byte[]\");\n }", "public interface HttpClientable {\n\n void get(String url);\n\n void get(String url, ParamStore params);\n\n void get(String url, ParamStore params, String tag);\n\n void post(String url, SparseArray<String> params);\n\n void post(String url, SparseArray<String> params, String tag);\n\n void upload(String url, HashMap<String, Object> params);\n\n void upload(String url, HashMap<String, Object> params, String tag);\n\n void download(String url);\n\n void download(String url, String tag);\n\n void cancelAll();\n\n void cancel(String tag);\n\n}", "@Override\r\n protected String doInBackground(String... params) {\r\n HttpClient httpclient = new DefaultHttpClient();\r\n HttpGet httppost = new HttpGet(params[0]); // params[0] contains url string\r\n try {\r\n HttpResponse response = httpclient.execute(httppost);\r\n jsonResult = inputStreamToString(\r\n response.getEntity().getContent()).toString();\r\n }\r\n\r\n catch (ClientProtocolException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public interface HttpClient {\n\n\torg.apache.http.client.HttpClient getClient();\n\n\tString fetch(URI uri) throws IOException;\n\n\tvoid init() throws KeyManagementException, NoSuchAlgorithmException;\n}", "public interface HttpClientInterface {\n byte[] post(String url, byte[] body);\n}", "@Override\n protected Object doInBackground(Object[] objects)\n {\n URL url = null; \n\n try\n {\n url = new URL(requestUrl);\n }\n catch (MalformedURLException e)\n {\n e.printStackTrace();\n }\n\n // Create and open HTTP connection\n HttpURLConnection connection = null;\n try\n {\n connection = (HttpURLConnection) url.openConnection();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n\n try\n {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n\n while ((line = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(line);\n }\n\n bufferedReader.close();\n\n return stringBuilder.toString();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n connection.disconnect();\n }\n\n return null;\n }", "HttpContent getHttpContent();", "@Override\n protected String doInBackground(String... params) {\n String s = \"\";\n if (params.length > 0) {\n s = params[0];\n }\n HttpClient httpClient = new DefaultHttpClient();\n HttpContext localContext = new BasicHttpContext();\n HttpPost httpPost;\n HttpGet httpGet;\n ArrayList<NameValuePair> postParameters;\n\n httpGet = new HttpGet(URI);\n httpPost = new HttpPost(URI);\n\n\n if (s.length() > 0) {\n // postParameters = new ArrayList<NameValuePair>();\n //postParameters.add(new BasicNameValuePair(\"param1\", s));\n try {\n httpPost.setEntity(new StringEntity(s));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }\n\n String text = null;\n try {\n HttpResponse response;\n if (s.length() > 0) {\n response = httpClient.execute(httpPost, localContext);\n } else {\n response = httpClient.execute(httpGet, localContext);\n }\n\n HttpEntity entity = response.getEntity();\n text = getASCIIContentFromEntity(entity);\n //Log.d(Scrumptious.class.getSimpleName(), \"Received data from server at address \" + URI);\n //Log.d(Scrumptious.class.getSimpleName(), \"Data received is:\\n\" + text);\n } catch (Exception e) {\n //Log.d(Scrumptious.class.getSimpleName(), \"Failed to retrieve data from the server.\");\n return e.getLocalizedMessage();\n }\n return text;\n }", "@Override\n public void onSuccess(int i, Header[] headers, byte[] bytes) {\n try {\n JSONObject localJSONObject = (JSONObject) new JSONTokener(new String(bytes, \"UTF-8\")).nextValue();\n Log.d(\"Success\", localJSONObject.toString());\n AsyncHttpRequest.this.mCallbackContext.success(localJSONObject);\n } catch (JSONException localJSONException) {\n localJSONException.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n protected String doInBackground(String... string) {\n try {\n myurl = new URL(string[0]);\n httpURLConnection = (HttpURLConnection) myurl.openConnection();\n httpURLConnection.setRequestProperty(\"Accept\", \"application/json\");\n httpURLConnection.setRequestProperty(\"user-key\", \"e46faab9e2e5d0e8f5d57c4be68c269d\");\n httpURLConnection.connect();\n\n inputStream = httpURLConnection.getInputStream();\n inputStreamReader = new InputStreamReader(inputStream);\n bufferedReader = new BufferedReader(inputStreamReader);\n line = bufferedReader.readLine();\n result = new StringBuilder();\n while (line != null) {\n result.append(line);\n line = bufferedReader.readLine();\n }\n return result.toString();\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n return null;\n }", "@Override\n protected String doInBackground(String... params) {\n StringBuilder results = new StringBuilder();\n\n try {\n URL url = new URL(params[0]);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\n int statusCode = conn.getResponseCode();\n if (statusCode == 200) {\n InputStream inputStream = new BufferedInputStream(conn.getInputStream());\n\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n results.append(line);\n }\n }\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n return results.toString();\n }", "HttpURLConnection mo120621a(Uri uri) throws IOException;", "R get() throws IOException, ClientProtocolException;", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n // if the url is null, return the response early;\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code \" + urlConnection.getResponseCode());\n }\n\n } catch (IOException e) {\n // TODO: Handle the exception\n Log.e(LOG_TAG, \"Problem retrieving from the url\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "@Override protected String doInBackground(String... params) {\r\n String returnVal = \"\";\r\n switch ( params[0] ) {\r\n case \"getIcyMetaData\":\r\n try {\r\n java.util.HashMap<String, String> icyMetaData = commonUtil.getIcyMetaData(params[1]);\r\n if ( icyMetaData.get(\"icy-metaint\")==null ) {\r\n returnVal = \"ERROR: ICY metadata not supported.\";\r\n } else {\r\n String streamTitle = icyMetaData.get(\"StreamTitle\"); if (streamTitle!=null && streamTitle.length()>0) returnVal = streamTitle; \r\n String icyName = icyMetaData.get(\"icy-name\"); if (icyName!=null && icyName.length()>0) returnVal = \"[\" + icyName + \"] \" + returnVal;\r\n }\r\n } catch (Exception e) {\r\n returnVal = \"ERROR: \" + e.getMessage();\r\n }\r\n break;\r\n case \"getMediaUrl\":\r\n returnVal = commonUtil.getMediaUrl2(params[1]);\r\n break;\r\n case \"wget\":\r\n java.util.List lines = commonUtil.wgets(params[1]);\r\n for (int i=0; i<lines.size(); i++)\r\n returnVal+=lines.get(i).toString().trim();\r\n break;\r\n default:\r\n String url = params[0];\r\n java.net.HttpURLConnection urlConn;\r\n try {\r\n //Open a new URL connection \r\n urlConn = (java.net.HttpURLConnection) (new java.net.URL(url)).openConnection();\r\n urlConn.setRequestMethod(\"GET\");\r\n // sets request headers \r\n //urlConn.setRequestProperty(\"Content-Type\", \"application/json\");\r\n //urlConn.setRequestProperty(\"Accept\", \"application/json\");\r\n returnVal += \"[HTTP \" + String.valueOf(urlConn.getResponseCode()) + \"]\";\r\n java.io.InputStream in;\r\n try {\r\n in = urlConn.getInputStream();\r\n } catch (Exception e) {\r\n returnVal += \"\\n\" + \"ERROR: \" + e.getMessage() + \"; url=\" + urlConn.getURL();\r\n return returnVal;\r\n }\r\n try {\r\n java.io.BufferedReader r = new java.io.BufferedReader(new java.io.InputStreamReader(\r\n new java.io.BufferedInputStream(in), java.nio.charset.StandardCharsets.UTF_8\r\n ));\r\n String line=null; while ((line=r.readLine())!=null) returnVal += \"\\n\" + line;\r\n } catch (Exception e) {\r\n returnVal += \"\\n\" + \"ERROR: \" + e.getMessage() + \"; url=\" + urlConn.getURL();\r\n } finally {\r\n urlConn.disconnect();\r\n }\r\n } catch (java.io.IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n return returnVal;\r\n }", "public final HttpURLConnection mo15945c(URL url, String str) {\n C4228f.C4229a a;\n try {\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.setConnectTimeout(10000);\n httpURLConnection.setUseCaches(false);\n httpURLConnection.setReadTimeout(10000);\n httpURLConnection.addRequestProperty(\"Content-Type\", \"application/json\");\n httpURLConnection.addRequestProperty(\"Accept\", \"application/json\");\n httpURLConnection.addRequestProperty(\"Content-Encoding\", \"gzip\");\n httpURLConnection.addRequestProperty(\"Cache-Control\", \"no-cache\");\n httpURLConnection.addRequestProperty(\"X-Android-Package\", this.f8010a.getPackageName());\n if (!(this.f8012c.get() == null || this.f8011b.get() == null || (a = this.f8012c.get().mo15810a(\"fire-installations-id\")) == C4228f.C4229a.NONE)) {\n httpURLConnection.addRequestProperty(\"x-firebase-client\", this.f8011b.get().mo15341a());\n httpURLConnection.addRequestProperty(\"x-firebase-client-log-type\", Integer.toString(a.f7823g));\n }\n String str2 = null;\n try {\n Context context = this.f8010a;\n byte[] a2 = C1957a.m2688a(context, context.getPackageName());\n if (a2 == null) {\n Log.e(\"ContentValues\", \"Could not get fingerprint hash for package: \" + this.f8010a.getPackageName());\n } else {\n str2 = C1961e.m2877a(a2, false);\n }\n } catch (PackageManager.NameNotFoundException e) {\n StringBuilder u = C0843a.m460u(\"No such package: \");\n u.append(this.f8010a.getPackageName());\n Log.e(\"ContentValues\", u.toString(), e);\n }\n httpURLConnection.addRequestProperty(\"X-Android-Cert\", str2);\n httpURLConnection.addRequestProperty(\"x-goog-api-key\", str);\n return httpURLConnection;\n } catch (IOException unused) {\n throw new C4291f(\"Firebase Installations Service is unavailable. Please try again later.\", C4291f.C4292a.UNAVAILABLE);\n }\n }", "private String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n return jsonResponse;\n }\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } catch (Exception e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public interface HttpsCallbackListener {\n\n public void onFinish(String response);\n\n public void onError(Exception e);\n}", "public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}", "public interface HttpResponseListener extends AsyncListener {\n /** The http header has been sent. \n * @param response the HttpHeader that was read\n * @param bufferHandle the BufferHandle that may or may not hold unread data.\n * @param keepalive if the sender want to use keepalive.\n * @param isChunked if false content is not chunked, \n * if true content is chunked.\n * @param dataSize the contents size or -1 if size is unknown.\n */\n void httpResponse (HttpHeader response, BufferHandle bufferHandle, \n\t\t boolean keepalive, boolean isChunked, long dataSize);\n \n}", "public static String httpGet(String url) throws Exception {\r\n \t\tDefaultHttpClient client = new DefaultHttpClient();\r\n \t\tHttpResponse response = null;\r\n \t\tString responseString = null;\r\n \t\tHttpUriRequest request = new HttpGet(url);\r\n \t\trequest.setHeader(\"Accept-Encoding\", \"gzip\");\r\n \t\trequest.setHeader(\"User-Agent\", \"gzip\");\r\n\t\tresponse = client.execute(request);\r\n \t\tif (response.getStatusLine().getStatusCode() != 200) {\r\n \t\t\tthrow new HttpException(\"Server error: \"\r\n \t\t\t\t\t+ response.getStatusLine().getStatusCode());\r\n \t\t} else {\r\n \t\t\tresponseString = parseResponse(response);\r\n \r\n \t\t}\r\n \t\treturn responseString;\r\n \t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the posts JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n\n\n return jsonResponse;\n }", "SdkHttpRequest getLastRequest();", "private static String makeHttpRequest(URL url) throws IOException {\n String JSONResponse = null;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(Constants.URL_REQUEST_METHOD);\n urlConnection.setReadTimeout(Constants.URL_READ_TIME_OUT);\n urlConnection.setConnectTimeout(Constants.URL_CONNECT_TIME_OUT);\n urlConnection.connect();\n\n if (urlConnection.getResponseCode() == Constants.URL_SUCCESS_RESPONSE_CODE) {\n inputStream = urlConnection.getInputStream();\n JSONResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Response code : \" + urlConnection.getResponseCode());\n // If received any other code(i.e 400) return null JSON response\n JSONResponse = null;\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error Solving JSON response : makeHttpConnection() block\");\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n // Input stream throws IOException when trying to close, that why method signature\n // specify about IOException\n }\n }\n return JSONResponse;\n }", "public interface AsyncHttpLink{\n// @FormUrlEncoded\n// @POST(\"{url}\")\n// Call<ResponseBody> request(@Path(value = \"url\", encoded = true) String url, @FieldMap Map<String, String> params);\n\n @FormUrlEncoded\n @POST\n Call<ResponseBody> request(@Url String url, @FieldMap Map<String, String> params);\n\n @FormUrlEncoded\n @Headers(\"Authorization: basic dGFjY2lzdW06YWJjZGU=\")\n @POST\n Call<ResponseBody> login(@Url String url, @FieldMap Map<String, String> params);\n}", "ResponseHandler createResponseHandler();", "private Result performRequest(String endpointUrl, List<NameValuePair> nameValuePairs) {\n Status status = Status.FAILED_UNRECOVERABLE;\n String response = null;\n try {\n // the while(retries) loop is a workaround for a bug in some Android HttpURLConnection\n // libraries- The underlying library will attempt to reuse stale connections,\n // meaning the second (or every other) attempt to connect fails with an EOFException.\n // Apparently this nasty retry logic is the current state of the workaround art.\n int retries = 0;\n boolean succeeded = false;\n while (retries < 3 && !succeeded) {\n InputStream in = null;\n BufferedInputStream bin = null;\n OutputStream out = null;\n BufferedOutputStream bout = null;\n HttpURLConnection connection = null;\n\n try {\n final URL url = new URL(endpointUrl);\n connection = (HttpURLConnection) url.openConnection();\n if (null != nameValuePairs) {\n connection.setDoOutput(true);\n final UrlEncodedFormEntity form = new UrlEncodedFormEntity(nameValuePairs, \"UTF-8\");\n connection.setRequestMethod(\"POST\");\n connection.setFixedLengthStreamingMode((int)form.getContentLength());\n out = connection.getOutputStream();\n bout = new BufferedOutputStream(out);\n form.writeTo(bout);\n bout.close();\n bout = null;\n out.close();\n out = null;\n }\n in = connection.getInputStream();\n bin = new BufferedInputStream(in);\n response = StringUtils.inputStreamToString(in);\n bin.close();\n bin = null;\n in.close();\n in = null;\n succeeded = true;\n } catch (final EOFException e) {\n if (MPConfig.DEBUG) Log.d(LOGTAG, \"Failure to connect, likely caused by a known issue with Android lib. Retrying.\");\n retries = retries + 1;\n } finally {\n if (null != bout)\n try { bout.close(); } catch (final IOException e) { ; }\n if (null != out)\n try { out.close(); } catch (final IOException e) { ; }\n if (null != bin)\n try { bin.close(); } catch (final IOException e) { ; }\n if (null != in)\n try { in.close(); } catch (final IOException e) { ; }\n if (null != connection)\n connection.disconnect();\n }\n }// while\n } catch (final MalformedURLException e) {\n Log.e(LOGTAG, \"Cannot iterpret \" + endpointUrl + \" as a URL\", e);\n status = Status.FAILED_UNRECOVERABLE;\n } catch (final IOException e) {\n if (MPConfig.DEBUG) Log.d(LOGTAG, \"Cannot post message to Mixpanel Servers (ok, can retry.)\");\n status = Status.FAILED_RECOVERABLE;\n } catch (final OutOfMemoryError e) {\n Log.e(LOGTAG, \"Cannot post message to Mixpanel Servers, will not retry.\", e);\n status = Status.FAILED_UNRECOVERABLE;\n }\n\n if (null != response) {\n status = Status.SUCCEEDED;\n if (MPConfig.DEBUG) Log.d(LOGTAG, \"Request returned:\\n\" + response);\n }\n\n return new Result(status, response);\n }", "private static String makeHTTPRequest(URL url) throws IOException {\n\n // Create an empty json string\n String jsonResponse = \"\";\n\n //IF url is null, return early\n if (url == null) {\n return jsonResponse;\n }\n\n // Create an Http url connection, and an input stream, making both null for now\n HttpURLConnection connection = null;\n InputStream inputStream = null;\n\n try {\n\n // Try to open a connection on the url, request that we GET info from the connection,\n // Set read and connect timeouts, and connect\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setReadTimeout(10000 /*Milliseconds*/);\n connection.setConnectTimeout(15000 /*Milliseconds*/);\n connection.connect();\n\n // If response code is 200 (aka, working), then get and read from the input stream\n if (connection.getResponseCode() == 200) {\n\n Log.v(LOG_TAG, \"Response code is 200: Aka, everything is working great\");\n inputStream = connection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n\n } else {\n // if response code is not 200, Log error message\n Log.v(LOG_TAG, \"Error Response Code: \" + connection.getResponseCode());\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error making http request: \" + e);\n } finally {\n // If connection and inputStream are NOT null, close and disconnect them\n if (connection != null) {\n connection.disconnect();\n }\n\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies that an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n\n return jsonResponse;\n }", "private Connection() {\n\n//==================================================//\n\n\n //==============================//\n\n // client = new AsyncHttpClient(true, 0, 443);\n client = new AsyncHttpClient();\n client.setSSLSocketFactory(MySSLSocketFactory.getFixedSocketFactory());\n contentType = \"application/json\";\n client.setUserAgent(System.getProperty(\"http.agent\"));\n //Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\"\n // client.setUserAgent(\"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\");\n client.setTimeout(20 * 1000);\n client.setResponseTimeout(20 * 1000);\n client.setConnectTimeout(20 * 1000);\n // client.setEnableRedirects(true);\n\n // Log.e(\"agentss\",System.getProperty(\"https.agent\"));\n gson = new GsonBuilder().serializeNulls().create();\n //client.getHttpClient().getConnectionManager().shutdown();\n/*\n try {\n KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());\n trustStore.load(null, null);\n MySSLSocketFactory sf = new MySSLSocketFactory(trustStore);\n sf.setHostnameVerifier(MySSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n client.setSSLSocketFactory(sf);\n }\n catch (Exception e) {\n }\n */\n\n }", "@Override\n protected String doInBackground(String... arg0) {\n jobj = jsonparser.makeHttpRequest(url);\n try {\n metadata = jobj.getString(TAG_METADATA);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return metadata;\n }", "private HttpClient prepareHttpClient() {\n\t\tHttpClientParams htcParams = new HttpClientParams();\n\t\tmHttpClient = new HttpClient();\n\t\thtcParams.setConnectionManagerTimeout(300000);\n\t\thtcParams.setSoTimeout(300000);\n\t\tmHttpClient.setParams(htcParams);\n\t\treturn mHttpClient;\n\t}", "public interface MethodsHttpUtils {\n HttpResponse doGet(String url, String mediaType) throws AppServerNotAvailableException, IOException;\n HttpResponse doPost(String url, String mediaType, String dataJson) throws UnsupportedEncodingException, ClientProtocolException, AppServerNotAvailableException;\n HttpResponse doDelete(String url, String mediaType) throws AppServerNotAvailableException;\n HttpResponse doPut(String url, String mediaType, String dataJson) throws AppServerNotAvailableException;\n}", "protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse r7) {\n /*\n r6 = this;\n r5 = 1;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"StatusCode=\";\n r0 = r0.append(r1);\n r1 = r7.statusCode;\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = \"infoss\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"code==\";\n r1 = r1.append(r2);\n r2 = r7.statusCode;\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r2 = \"\";\n r0 = r7.statusCode;\n r1 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r0 != r1) goto L_0x013e;\n L_0x003b:\n r0 = org.greenrobot.eventbus.c.a();\n r1 = 3;\n r3 = 0;\n r1 = com.jd.fridge.bean.Event.newEvent(r1, r3);\n r0.c(r1);\n r1 = new java.lang.String;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r7.data;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = r7.headers;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = com.android.volley.toolbox.HttpHeaderParser.parseCharset(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r1.<init>(r0, r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n if (r0 == 0) goto L_0x005e;\n L_0x0059:\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.a(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x005e:\n r0 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = \"jsonStr===\";\n r0 = r0.append(r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.k.a(r0);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"jsonStr==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"gson==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r4 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r3.fromJson(r1, r4);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.fromJson(r1, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders(r7);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = com.android.volley.Response.success(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x00bc:\n return r0;\n L_0x00bd:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=1111111=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n L_0x00e6:\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n r0 = com.android.volley.Response.error(r0);\n goto L_0x00bc;\n L_0x00f0:\n r0 = move-exception;\n r1 = r2;\n L_0x00f2:\n r2 = r6.c;\n if (r2 == 0) goto L_0x00fb;\n L_0x00f6:\n r2 = r6.c;\n r2.a(r1);\n L_0x00fb:\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"JsonSyntaxException=222=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x0114:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=333=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x013e:\n r0 = \"infos\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"response fail: \";\n r1 = r1.append(r2);\n r2 = r7.data;\n r2 = r2.toString();\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"result=\";\n r0 = r0.append(r1);\n r1 = r7.data;\n r1 = r1.toString();\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = r6.f;\n r0.a(r5);\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n com.android.volley.Response.error(r0);\n goto L_0x00e6;\n L_0x0187:\n r0 = move-exception;\n goto L_0x00f2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.jd.fridge.util.a.d.parseNetworkResponse(com.android.volley.NetworkResponse):com.android.volley.Response<T>\");\n }", "public interface HttpClientFactory {\n CloseableHttpClient newHttpClient();\n}", "@Override\n public void onResponse(String response) {\n }", "public JSONArray getJSONFromUrl(String url) {\n HttpParams httpParameters = new BasicHttpParams();\n // Set the timeout in milliseconds until a connection is established.\n // The default value is zero, that means the timeout is not used.\n int timeoutConnection = 3000;\n HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\n // Set the default socket timeout (SO_TIMEOUT)\n // in milliseconds which is the timeout for waiting for data.\n int timeoutSocket = 5000;\n HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\n\n DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);\n HttpGet httpget = new HttpGet(url);\n\n // Depends on your web service\n httpget.setHeader(\"Content-type\", \"application/json\");\n InputStream inputStream = null;\n String result = null;\n try {\n HttpResponse response = httpclient.execute(httpget);\n HttpEntity entity = response.getEntity();\n\n inputStream = entity.getContent();\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"), 8);\n StringBuilder sb = new StringBuilder();\n\n String line;\n while ((line = reader.readLine()) != null)\n {\n sb.append(line).append(\"\\n\");\n }\n result = sb.toString();\n\n } catch (Exception e) {\n // Oops\n Log.i(TAG,e.toString());\n Log.i(TAG,\"reader read line didn't work\");\n }\n finally {\n try{\n if(inputStream != null)inputStream.close();\n }\n catch(Exception squish){\n Log.i(TAG,squish.toString());\n Log.i(TAG,\"sqish! inputstream did not work!\");\n }\n }\n\n if(result == null){\n Log.i(TAG,\"result was NULL\");\n return null;\n }\n try {\n Log.i(TAG,\"WE fetched this data \"+result);\n\n // Send the url along with article data\n return new JSONArray(result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return null;\n\n }", "HttpResponse httpPost(URI uri);", "@Override\n public void onResponse(String response)\n {\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n\tprotected String doInBackground(String... params) {\n\t\t RESTClient request=new RESTClient(getURL());\n\t try {\n\t\t\t\trequest.Execute(RequestMethod.GET);\n\t\t\t\treturn request.getResponse();\n\t\t\t} \n\t catch (Exception e) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t \n\t}", "private HttpClient() {\n\t}", "private HttpUriRequest createHttpRequest(String url, String method,\n\t\t\tList<NameValuePair> params) throws UnsupportedEncodingException {\n\t\tHttpUriRequest request;\n\t\tif (method.toUpperCase().equals(\"GET\")) {\n\t\t\trequest = new HttpGet(url);\n\t\t} else if (method.toUpperCase().equals(\"POST\")) {\n\t\t\tHttpPost post = new HttpPost(url);\n\t\t\tpost.setEntity(new UrlEncodedFormEntity(params));\n\t\t\trequest = post;\n\t\t} else if (method.toUpperCase().equals(\"PUT\")) {\n\t\t\trequest = new HttpPut(url);\n\t\t} else if (method.toUpperCase().equals(\"DELETE\")) {\n\t\t\trequest = new HttpDelete(url);\n\t\t} else {\n\t\t\trequest = new HttpGet();\n\t\t}\n\n\t\treturn request;\n\t}", "@Override\n protected Response<JSONArray> parseNetworkResponse (NetworkResponse response){\n// This thread is on background thread\n// Handle parsing logic here?\n try {\n String jsonString =\n new String(\n response.data,\n HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET));\n JSONArray jsonArray = new JSONArray(jsonString);\n\n// Parse on background thread\n parseResponse(jsonArray);\n\n return Response.success(jsonArray, HttpHeaderParser.parseCacheHeaders(response));\n } catch (UnsupportedEncodingException | JSONException e) {\n return Response.error(new ParseError(e));\n }\n }", "GetResponse() {\n\t}", "@Override\n protected String doInBackground(String... params) {\n\n String uri = params[0];\n\n BufferedReader bufferedReader = null;\n try {\n URL url = new URL(uri);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();//creating connection\n StringBuilder sb = new StringBuilder();\n\n bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));// getting the json string\n\n String json;\n json = bufferedReader.readLine();\n\n return json.trim(); //returning the json string\n\n }catch(Exception e){\n return null;\n }\n\n }", "@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n\r\n }", "public void httpclient(String url){\n\t\t\r\n\t\t\r\n\t\tString httpUrl =BASIC_URL+url;\r\n\t\t\r\n\t\tSystem.out.println(httpUrl);\r\n\t\t\r\n\t\tHttpGet method =new HttpGet(httpUrl);\r\n\t\t\r\n\t\tmethod.setHeader(\"Content-Type\",\"application/json\");\r\n\t\tmethod.setHeader(\"charset\",\"UTF-8\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tCloseableHttpResponse res =client.execute(method,context);\r\n\r\n\t\t AuthState targetAuthState = context.getTargetAuthState();\r\n\t\t System.out.println(\"Target auth state: \" + targetAuthState.getState());\r\n\t\t System.out.println(\"Target auth scheme: \" + targetAuthState.getAuthScheme());\r\n\t\t System.out.println(\"Target auth credentials: \" + targetAuthState.getCredentials());\r\n\t\t\t\r\n\t\t HttpEntity ent =res.getEntity();\r\n\t\t \r\n\t\t if (ent != null) { \r\n System.out.println(\"Response content length: \" + ent.getContentLength()); \r\n System.out.println(ent+\"3214242423\");\r\n \r\n System.out.println(EntityUtils.toString(ent));\r\n } \r\n\t\t \r\n\t\t} catch (IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private <T> HttpEntity createHttpEntityForJson(T body) {\r\n\t\tString dataForEntity;\r\n\t\tif (!(body instanceof String)) {\r\n\t\t\tdataForEntity = gson.toJson(body);\r\n\t\t} else {\r\n\t\t\tdataForEntity = (String) body;\r\n\t\t}\r\n\t\t// try {\r\n\t\treturn new StringEntity(dataForEntity, Charset.forName(\"utf-8\"));\r\n\t\t// } catch (UnsupportedEncodingException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\t// return null;\r\n\t}", "@Override\npublic void postExecute(HttpResponse r) {\n\t\n}", "@Override\n protected String doInBackground(String... params) {\n URL url;\n HttpURLConnection urlConnection = null;\n StringBuilder result = new StringBuilder();\n try {\n url = new URL(params[0]);\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setConnectTimeout(TIMEOUT_MS);\n urlConnection.setReadTimeout(TIMEOUT_MS);\n InputStream in = urlConnection.getInputStream();\n InputStreamReader isw = new InputStreamReader(in);\n\n int data = isw.read();\n while (data != -1) {\n char current = (char) data;\n data = isw.read();\n result.append(current);\n }\n } catch (Exception e) {\n // TODO: Proper logging\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n return result.toString();\n }", "java.lang.String getResponse();", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpPoster {\n\n /**\n * Post data to the provided URL.\n *\n * @param url http url to be reached\n * @param headers headers to be sent\n * @param body body to be sent\n * @param mediaType media type definition\n * @return http response from the POST request\n * @throws IOException in case of http request error\n */\n HttpResponse post(URL url, Map<String, String> headers, byte[] body, String mediaType)\n throws IOException;\n}", "private static JSONArray getResponseFromHttpUrl(URL url) throws IOException {\n\n Log.d(TAG, \"sending GET http request\");\n\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(3000);\n urlConnection.setConnectTimeout(5000);\n String result = \"\";\n JSONArray ja = null;\n JSONObject jo = null;\n try {\n InputStream in = urlConnection.getInputStream();\n BufferedReader buffer = new BufferedReader(new InputStreamReader(in));\n String line = \"\";\n while (line != null) {\n line = buffer.readLine();\n result += line;\n }\n\n ja = new JSONArray(result);\n } catch (JSONException e) {\n try {\n jo = new JSONObject(result);\n } catch (JSONException eo) {\n eo.printStackTrace();\n }\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n\n if (jo != null) {\n ja = new JSONArray();\n ja.put(jo);\n }\n return ja;\n }", "private void testHttp() {\n\t\t\n\n\t Thread thread = new Thread(new Runnable(){\n\t\t @Override\n\t\t public void run() {\n\t\t \tHttpClient client = new DefaultHttpClient();\n\t\t\t HttpPost post = new HttpPost(\"http://ec2-54-164-195-102.compute-1.amazonaws.com/api_places/\");\n\t try {\n\t \t\n\t List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);\n\t gpslocation = locationData;\n\t nameValuePairs.add(new BasicNameValuePair(\"gps_location\", gpslocation));\n\t nameValuePairs.add(new BasicNameValuePair(\"access_token\", fbaccesstoken));\n\t if(text_search.getText().toString()!=null){\n\t \t textlocation = text_search.getText().toString();\n\t \t nameValuePairs.add(new BasicNameValuePair(\"text_location\", textlocation));\n\t \t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t}\n\t \n\t\t Log.d(\"JSON\",nameValuePairs.toString());\n\t post.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n\t HttpResponse response = client.execute(post);\n\t Log.d(\"Response\",response.toString());\n\t BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\n\t String line = \"\";\n\t while ((line = rd.readLine()) != null) {\n\t System.out.println(line);\n\t\t Log.d(\"Line\",line);\n\t\t try {\n\t\t JSONObject json= (JSONObject) new JSONTokener(line).nextValue();\n//\t\t JSONObject json2 = json.getJSONObject(\"filename\");\n\t\t filename = (String) json.get(\"filename\");\n\t\t Log.d(\"Test\",filename);\n\t\t } catch (JSONException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t }\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t}\n\t });\n\t thread.start();\n\t try {\n\t\t\tthread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract HttpClient.Version version();", "public interface HttpEntity\n{\n\n\tpublic abstract boolean isRepeatable();\n\n\tpublic abstract boolean isChunked();\n\n\tpublic abstract long getContentLength();\n\n\tpublic abstract Header getContentType();\n\n\tpublic abstract Header getContentEncoding();\n\n\tpublic abstract InputStream getContent()\n\t\tthrows IOException, IllegalStateException;\n\n\tpublic abstract void writeTo(OutputStream outputstream)\n\t\tthrows IOException;\n\n\tpublic abstract boolean isStreaming();\n\n\tpublic abstract void consumeContent()\n\t\tthrows IOException;\n}", "public HttpClientHelper() {\n defaultHeaders.put(\"Content-Type\", \"application/json\");\n defaultHeaders.put(\"Accept-Encoding\", \"gzip\");\n\n //postDefaultHeaders.put(\"Content-Type\", \"application/json\");\n //postDefaultHeaders.put(\"Content-Encoding\", \"gzip\");\n\n String key = MessageFormat.format(\"{0}#{1}\", UserUtil.getUserUuid(), UserUtil.getUserId());\n\n //postDefaultHeaders.put(\"X-CLIENT-KEY\", key);\n defaultHeaders.put(\"X-CLIENT-KEY\", key);\n client.setTimeout(3000);\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // if url null, return\n if(url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection= (HttpURLConnection)url.openConnection();\n urlConnection.setReadTimeout(10000/*milliseconds*/);\n urlConnection.setConnectTimeout(15000/*milliseconds*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n Log.v(LOG_TAG,\"Network request made\");\n\n // if the request was successful(response code 200)\n //then read the input stream and parse the output\n if(urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n }\n else{\n Log.e(LOG_TAG,\"Error Response code: \" + urlConnection.getResponseCode());\n }\n }\n catch (IOException e) {\n Log.e(LOG_TAG,\"Problem retrieving the earthquake JSON results\",e);\n }\n finally {\n if(urlConnection != null) {\n urlConnection.disconnect();\n }\n if(inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n //Si la URL es null se devuelve inediatamente.\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(100000 /* Milisegundos.*/);\n urlConnection.setConnectTimeout(100000 /* Milisegundos.*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Si la request se realiza correctamente (código de respuesta 200) se lee el input\n // stream y se le hace parse a la respuesta.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error de conexión: \" + urlConnection.getResponseCode());\n }\n // Aquí simplemente hacemos catch a la IOException.\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problema obteniendo los datos en JSON del servidor\", e);\n // Independientemente de que se lance una exception o no en el bloque finally se realiza\n // una desconexión (o se \"cierra\" como en el caso del inputStream) para poder reusarlo.\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n // Se devuelve como resultado el JsonResponse que albergará la String inputStream.\n return jsonResponse;\n }", "private void onReceivedResponseData(org.apache.http.HttpResponse r14, com.tencent.tmassistantsdk.protocol.jce.DownloadChunkLogInfo r15) {\n /*\n r13 = this;\n r2 = 705; // 0x2c1 float:9.88E-43 double:3.483E-321;\n r6 = 206; // 0xce float:2.89E-43 double:1.02E-321;\n r7 = 0;\n r12 = 0;\n r0 = r14.getEntity();\n r1 = r13.verifyTotalLen(r14, r0);\n if (r1 != 0) goto L_0x0022;\n L_0x0010:\n r0 = \"_DownloadTask\";\n r1 = \"verifyTotalLen false\";\n com.tencent.tmassistantsdk.util.TMLog.i(r0, r1);\n r0 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\n r1 = \"totalLen is not match the requestSize\";\n r0.<init>(r2, r1);\n throw r0;\n L_0x0022:\n r1 = r13.mDownloadInfo;\n r2 = r1.getTotalSize();\n r4 = 0;\n r1 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r1 != 0) goto L_0x015c;\n L_0x002e:\n r1 = r14.getStatusLine();\n r1 = r1.getStatusCode();\n r2 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r1 != r2) goto L_0x00f9;\n L_0x003a:\n r1 = r13.mDownloadInfo;\n r2 = r0.getContentLength();\n r1.setTotalSize(r2);\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"HTTPCode 200, totalBytes:\";\n r2.<init>(r3);\n r3 = r13.mDownloadInfo;\n r4 = r3.getTotalSize();\n r2 = r2.append(r4);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.i(r1, r2);\n L_0x005f:\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"first start downloadinfoTotalSize = \";\n r2.<init>(r3);\n r3 = r13.mDownloadInfo;\n r4 = r3.getTotalSize();\n r2 = r2.append(r4);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r2);\n r1 = \"content-range\";\n r1 = r14.getFirstHeader(r1);\n if (r1 == 0) goto L_0x00a0;\n L_0x0084:\n r1 = r1.getValue();\n r1 = com.tencent.tmassistantsdk.downloadservice.ByteRange.parseContentRange(r1);\n r2 = r1.getStart();\n r15.responseRangePosition = r2;\n r2 = r1.getEnd();\n r4 = r1.getStart();\n r2 = r2 - r4;\n r4 = 1;\n r2 = r2 + r4;\n r15.responseRangeLength = r2;\n L_0x00a0:\n r1 = r13.mDownloadInfo;\n r2 = r1.getTotalSize();\n r15.responseContentLength = r2;\n L_0x00a8:\n r1 = r13.mSaveFile;\n if (r1 != 0) goto L_0x00bb;\n L_0x00ac:\n r1 = new com.tencent.tmassistantsdk.storage.TMAssistantFile;\n r2 = r13.mDownloadInfo;\n r2 = r2.mTempFileName;\n r3 = r13.mDownloadInfo;\n r3 = r3.mFileName;\n r1.<init>(r2, r3);\n r13.mSaveFile = r1;\n L_0x00bb:\n r2 = 0;\n r10 = r0.getContent();\t Catch:{ SocketException -> 0x0406 }\n r0 = \"_DownloadTask\";\n r1 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x0406 }\n r4 = \"start write file, fileName: \";\n r1.<init>(r4);\t Catch:{ SocketException -> 0x0406 }\n r4 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x0406 }\n r4 = r4.mFileName;\t Catch:{ SocketException -> 0x0406 }\n r1 = r1.append(r4);\t Catch:{ SocketException -> 0x0406 }\n r1 = r1.toString();\t Catch:{ SocketException -> 0x0406 }\n com.tencent.tmassistantsdk.util.TMLog.i(r0, r1);\t Catch:{ SocketException -> 0x0406 }\n r8 = r2;\n L_0x00dc:\n r0 = r13.mRecvBuf;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = r10.read(r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r3 <= 0) goto L_0x00eb;\n L_0x00e4:\n r0 = r13.mStopTask;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 == 0) goto L_0x0262;\n L_0x00e8:\n r10.close();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x00eb:\n r0 = r13.mSaveFile;\n if (r0 == 0) goto L_0x00f6;\n L_0x00ef:\n r0 = r13.mSaveFile;\n r0.close();\n r13.mSaveFile = r12;\n L_0x00f6:\n r15.receiveDataSize = r8;\n return;\n L_0x00f9:\n r1 = r14.getStatusLine();\n r1 = r1.getStatusCode();\n if (r1 != r6) goto L_0x0135;\n L_0x0103:\n r1 = \"content-range\";\n r1 = r14.getFirstHeader(r1);\n r2 = r13.mDownloadInfo;\n r1 = r1.getValue();\n r4 = com.tencent.tmassistantsdk.downloadservice.ByteRange.getTotalSize(r1);\n r2.setTotalSize(r4);\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"HTTPCode 206, totalBytes:\";\n r2.<init>(r3);\n r3 = r13.mDownloadInfo;\n r4 = r3.getTotalSize();\n r2 = r2.append(r4);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.i(r1, r2);\n goto L_0x005f;\n L_0x0135:\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"statusCode=\";\n r2.<init>(r3);\n r3 = r14.getStatusLine();\n r3 = r3.getStatusCode();\n r2 = r2.append(r3);\n r3 = \" onReceivedResponseData error.\";\n r2 = r2.append(r3);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r2);\n goto L_0x005f;\n L_0x015c:\n r1 = r14.getStatusLine();\n r1 = r1.getStatusCode();\n if (r1 != r6) goto L_0x00a8;\n L_0x0166:\n r1 = \"content-range\";\n r1 = r14.getFirstHeader(r1);\t Catch:{ Throwable -> 0x0214 }\n r2 = r1.getValue();\t Catch:{ Throwable -> 0x0214 }\n r2 = com.tencent.tmassistantsdk.downloadservice.ByteRange.parseContentRange(r2);\t Catch:{ Throwable -> 0x0214 }\n r3 = r1.getValue();\t Catch:{ Throwable -> 0x0214 }\n r4 = com.tencent.tmassistantsdk.downloadservice.ByteRange.getTotalSize(r3);\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r15.responseRangePosition = r8;\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getEnd();\t Catch:{ Throwable -> 0x0214 }\n r10 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r8 = r8 - r10;\n r10 = 1;\n r8 = r8 + r10;\n r15.responseRangeLength = r8;\t Catch:{ Throwable -> 0x0214 }\n r15.responseContentLength = r4;\t Catch:{ Throwable -> 0x0214 }\n r3 = \"_DownloadTask\";\n r6 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r8 = \"totalSize = \";\n r6.<init>(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r4);\t Catch:{ Throwable -> 0x0214 }\n r8 = \" downloadinfoTotalSize = \";\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r8 = r8.getTotalSize();\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.w(r3, r6);\t Catch:{ Throwable -> 0x0214 }\n r3 = \"_DownloadTask\";\n r6 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r8 = \"mReceivedBytes = \";\n r6.<init>(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r8 = r8.mReceivedBytes;\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.i(r3, r6);\t Catch:{ Throwable -> 0x0214 }\n r3 = \"_DownloadTask\";\n r6 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r8 = \"start = \";\n r6.<init>(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = \", end = \";\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getEnd();\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.i(r3, r6);\t Catch:{ Throwable -> 0x0214 }\n r2 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r6 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r8 = r6.mReceivedBytes;\t Catch:{ Throwable -> 0x0214 }\n r2 = (r2 > r8 ? 1 : (r2 == r8 ? 0 : -1));\n if (r2 == 0) goto L_0x022a;\n L_0x0209:\n r0 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ Throwable -> 0x0214 }\n r1 = 706; // 0x2c2 float:9.9E-43 double:3.49E-321;\n r2 = \"The received size is not equal with ByteRange.\";\n r0.<init>(r1, r2);\t Catch:{ Throwable -> 0x0214 }\n throw r0;\t Catch:{ Throwable -> 0x0214 }\n L_0x0214:\n r0 = move-exception;\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ all -> 0x021d }\n r2 = 704; // 0x2c0 float:9.87E-43 double:3.48E-321;\n r1.<init>(r2, r0);\t Catch:{ all -> 0x021d }\n throw r1;\t Catch:{ all -> 0x021d }\n L_0x021d:\n r0 = move-exception;\n r1 = r13.mSaveFile;\n if (r1 == 0) goto L_0x0229;\n L_0x0222:\n r1 = r13.mSaveFile;\n r1.close();\n r13.mSaveFile = r12;\n L_0x0229:\n throw r0;\n L_0x022a:\n r2 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r2 = r2.getTotalSize();\t Catch:{ Throwable -> 0x0214 }\n r2 = (r4 > r2 ? 1 : (r4 == r2 ? 0 : -1));\n if (r2 == 0) goto L_0x023f;\n L_0x0234:\n r0 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ Throwable -> 0x0214 }\n r1 = 705; // 0x2c1 float:9.88E-43 double:3.483E-321;\n r2 = \"The total size is not equal with ByteRange.\";\n r0.<init>(r1, r2);\t Catch:{ Throwable -> 0x0214 }\n throw r0;\t Catch:{ Throwable -> 0x0214 }\n L_0x023f:\n r2 = \"_DownloadTask\";\n r3 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r4 = \"response ByteRange: \";\n r3.<init>(r4);\t Catch:{ Throwable -> 0x0214 }\n r1 = r3.append(r1);\t Catch:{ Throwable -> 0x0214 }\n r1 = r1.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.d(r2, r1);\t Catch:{ Throwable -> 0x0214 }\n r1 = r13.mSaveFile;\n if (r1 == 0) goto L_0x00a8;\n L_0x0259:\n r1 = r13.mSaveFile;\n r1.close();\n r13.mSaveFile = r12;\n goto L_0x00a8;\n L_0x0262:\n r0 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = (long) r3;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0 + r4;\n r2 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r2.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1));\n if (r2 > 0) goto L_0x03be;\n L_0x0272:\n r2 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r2.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1));\n if (r0 != 0) goto L_0x0315;\n L_0x027c:\n r6 = 1;\n L_0x027d:\n r0 = r13.mSaveFile;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mRecvBuf;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 0;\n r4 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r4.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.write(r1, r2, r3, r4, r6);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 != 0) goto L_0x03b4;\n L_0x028c:\n r0 = com.tencent.tmassistantsdk.storage.TMAssistantFile.getSavePathRootDir();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = com.tencent.tmassistantsdk.downloadservice.DownloadHelper.isSpaceEnough(r0, r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 == 0) goto L_0x0367;\n L_0x029c:\n r0 = com.tencent.tmassistantsdk.storage.TMAssistantFile.isSDCardExistAndCanWrite();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 == 0) goto L_0x0318;\n L_0x02a2:\n r0 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"write file failed, fileName: \";\n r0.<init>(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r1.mFileName;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" receivedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" readedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" totalSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"_DownloadTask\";\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 703; // 0x2bf float:9.85E-43 double:3.473E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x02ef:\n r0 = move-exception;\n r2 = r8;\n L_0x02f1:\n r1 = \"_DownloadTask\";\n r4 = \"\";\n r5 = 0;\n r5 = new java.lang.Object[r5];\t Catch:{ all -> 0x0305 }\n com.tencent.mm.sdk.platformtools.w.printErrStackTrace(r1, r0, r4, r5);\t Catch:{ all -> 0x0305 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ all -> 0x0305 }\n r4 = 605; // 0x25d float:8.48E-43 double:2.99E-321;\n r1.<init>(r4, r0);\t Catch:{ all -> 0x0305 }\n throw r1;\t Catch:{ all -> 0x0305 }\n L_0x0305:\n r0 = move-exception;\n r8 = r2;\n L_0x0307:\n r1 = r13.mSaveFile;\n if (r1 == 0) goto L_0x0312;\n L_0x030b:\n r1 = r13.mSaveFile;\n r1.close();\n r13.mSaveFile = r12;\n L_0x0312:\n r15.receiveDataSize = r8;\n throw r0;\n L_0x0315:\n r6 = r7;\n goto L_0x027d;\n L_0x0318:\n r0 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"write file failed, no sdCard! fileName: \";\n r0.<init>(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r1.mFileName;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" receivedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" readedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" totalSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"_DownloadTask\";\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 711; // 0x2c7 float:9.96E-43 double:3.513E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x0365:\n r0 = move-exception;\n goto L_0x0307;\n L_0x0367:\n r0 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"write file failed, no enough space! fileName: \";\n r0.<init>(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r1.mFileName;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" receivedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" readedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" totalSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"_DownloadTask\";\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 710; // 0x2c6 float:9.95E-43 double:3.51E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x03b4:\n r0 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = (long) r3;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0.updateReceivedSize(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = (long) r3;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r8 = r8 + r0;\n goto L_0x00dc;\n L_0x03be:\n r0 = \"write file size too long.\";\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = \"write file size too long.\\r\\nreadedLen: \";\n r2.<init>(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = \"\\r\\nreceivedSize: \";\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r3.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = \"\\r\\ntotalSize: \";\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r3.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = \"\\r\\nisTheEndData: false\";\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 703; // 0x2bf float:9.85E-43 double:3.473E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x0406:\n r0 = move-exception;\n goto L_0x02f1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.tmassistantsdk.downloadservice.DownloadTask.onReceivedResponseData(org.apache.http.HttpResponse, com.tencent.tmassistantsdk.protocol.jce.DownloadChunkLogInfo):void\");\n }", "public interface HttpCallbackListener {\n void onFinish(String response);\n\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n\n void onError(Exception e);\n}", "private void setupHttpConnectionStuff() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n try {\n final File httpCacheDir = new File(getCacheDir(), \"http\");\n HttpResponseCache.install(httpCacheDir, TEN_MEGABYTES);\n } catch (IOException ioe) {\n Log.e(Constants.LOG_TAG, \"Could not install http cache on this device.\");\n }\n }\n }", "public HttpEntity openHttpEntity(URL url) throws IOException {\r\n Logger.getLogger(TargetAuthenticationStrategy.class).setLevel(Level.ERROR);\r\n Logger.getLogger(RequestTargetAuthentication.class).setLevel(Level.ERROR);\r\n DefaultHttpClient httpclient = new DefaultHttpClient();\r\n\r\n for (Cookie cookie : cookies) {\r\n httpclient.getCookieStore().addCookie(cookie);\r\n }\r\n\r\n httpclient.getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);\r\n\r\n if (socketTimeout > -1) {\r\n httpclient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, socketTimeout);\r\n }\r\n if (connectionTimeout > -1) {\r\n httpclient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, connectionTimeout);\r\n }\r\n\r\n String domain = this.domain;\r\n String username = this.username;\r\n String password = this.password;\r\n if (serviceAccountPropertiesFileName != null) {\r\n Properties serviceAccountProperties = new Properties();\r\n if (new File(serviceAccountPropertiesFileName).exists()) {\r\n serviceAccountProperties.load(new FileReader(serviceAccountPropertiesFileName));\r\n } else {\r\n try {\r\n serviceAccountProperties.load(this.getClass().getResourceAsStream(serviceAccountPropertiesFileName));\r\n } catch (Exception e) {\r\n }\r\n }\r\n domain = serviceAccountProperties.getProperty(\"http.serviceaccount.domain\", domain);\r\n username = serviceAccountProperties.getProperty(\"http.serviceaccount.username\", username);\r\n password = serviceAccountProperties.getProperty(\"http.serviceaccount.password\", password);\r\n }\r\n\r\n if (username != null && password != null) {\r\n String decryptedPassword = password;\r\n try {\r\n decryptedPassword = new StringEncrypter().decrypt(password);\r\n } catch (Exception e) {\r\n }\r\n NTCredentials creds = new NTCredentials(username, decryptedPassword, getCanonicalHostName()[0], domain);\r\n httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, creds);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.SPNEGO);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.KERBEROS);\r\n }\r\n HttpHost target = new HttpHost(url.getHost(), url.getPort(), url.getProtocol());\r\n HttpContext localContext = new BasicHttpContext();\r\n HttpGet httpGet = new HttpGet(url.getFile());\r\n HttpResponse httpResponse = httpclient.execute(target, httpGet, localContext);\r\n this.lastStatusLine = httpResponse.getStatusLine();\r\n lastCookies = httpclient.getCookieStore().getCookies();\r\n\r\n return httpResponse.getEntity();\r\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the Guardian JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "@Override\r\n\t\tprotected String doInBackground(String... params) {\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tresponse=hclient.execute(p);\r\n\t\t\t\t\r\n\t\t\t\tin=response.getEntity().getContent();\r\n\t\t\t\t\r\n\t\t\t\tStringBuilder stringBuilder=new StringBuilder();\r\n\t\t\t\t\r\n\t\t\t\tint b;\r\n\t\t\t\twhile(( b = in.read() )!= -1){\r\n\t\t \tstringBuilder.append((char)b);\r\n\t\t \t\r\n\t\t }\r\n\t\t\t\t\r\n\t\t\t\t\tLog.d(\"AsynClass\", \"Stringbuilder done\");\r\n\t\t\t\t\tbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\t\t\t\tdoc = builder.parse(new InputSource(new StringReader(stringBuilder.toString())));\r\n\t\t\t\t\tNodeList result=doc.getElementsByTagName(\"item\");\r\n\t\t\t\t\tNode node;\t\r\n\t\t\t\t\tfor(int i=0;i<result.getLength();i++){\r\n\t\t\t\t\t\tnode=result.item(i);\r\n\t\t\t\t\t\t getElementValue(node,i);\r\n\t\t\t\t\t\tLog.d(\"AsyncClass\", \"Got Value\"+i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfailureFlag=1;\r\n\t\t\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tfailureFlag=0;\r\n\t\t\t\terror=e.getMessage();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}", "public StatusLine testHttpEntity(URL url) throws IOException {\r\n Logger.getLogger(TargetAuthenticationStrategy.class).setLevel(Level.ERROR);\r\n Logger.getLogger(RequestTargetAuthentication.class).setLevel(Level.ERROR);\r\n DefaultHttpClient httpclient = new DefaultHttpClient();\r\n\r\n httpclient.getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);\r\n\r\n String domain = this.domain;\r\n String username = this.username;\r\n String password = this.password;\r\n if (serviceAccountPropertiesFileName != null) {\r\n Properties serviceAccountProperties = new Properties();\r\n if (new File(serviceAccountPropertiesFileName).exists()) {\r\n serviceAccountProperties.load(new FileReader(serviceAccountPropertiesFileName));\r\n } else {\r\n try {\r\n serviceAccountProperties.load(this.getClass().getResourceAsStream(serviceAccountPropertiesFileName));\r\n } catch (Exception e) {\r\n }\r\n }\r\n domain = serviceAccountProperties.getProperty(\"http.serviceaccount.domain\", domain);\r\n username = serviceAccountProperties.getProperty(\"http.serviceaccount.username\", username);\r\n password = serviceAccountProperties.getProperty(\"http.serviceaccount.password\", password);\r\n }\r\n\r\n if (username != null && password != null) {\r\n String decryptedPassword = password;\r\n try {\r\n decryptedPassword = new StringEncrypter().decrypt(password);\r\n } catch (Exception e) {\r\n }\r\n NTCredentials creds = new NTCredentials(username, decryptedPassword, getCanonicalHostName()[0], domain);\r\n httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, creds);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.SPNEGO);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.KERBEROS);\r\n }\r\n HttpHost target = new HttpHost(url.getHost(), url.getPort(), url.getProtocol());\r\n HttpContext localContext = new BasicHttpContext();\r\n HttpGet httpGet = new HttpGet(url.getFile());\r\n HttpResponse httpResponse = httpclient.execute(target, httpGet, localContext);\r\n StatusLine lastStatusLine = httpResponse.getStatusLine();\r\n httpGet.releaseConnection();\r\n\r\n return (this.lastStatusLine = lastStatusLine);\r\n }", "protected R a(com.sds.android.sdk.lib.a.a.a r7) {\n /*\n r6 = this;\n if (r7 != 0) goto L_0x000b;\n L_0x0002:\n r0 = \"Request\";\n r1 = \"Http request result is null, stop parse.\";\n com.sds.android.sdk.lib.util.g.c(r0, r1);\n r0 = 0;\n L_0x000a:\n return r0;\n L_0x000b:\n r1 = r6.h();\n r0 = r7.c();\n r1.setCode(r0);\n r0 = \"Location\";\n r0 = r7.a(r0);\n r1.setLocation(r0);\n r0 = r7.e();\t Catch:{ Exception -> 0x007b }\n r0 = com.sds.android.sdk.lib.util.m.a(r0);\t Catch:{ Exception -> 0x007b }\n r2 = \"Request\";\n r3 = \"TEST: jsonString %s\";\n r4 = 1;\n r4 = new java.lang.Object[r4];\t Catch:{ Exception -> 0x007b }\n r5 = 0;\n r4[r5] = r0;\t Catch:{ Exception -> 0x007b }\n com.sds.android.sdk.lib.util.g.a(r2, r3, r4);\t Catch:{ Exception -> 0x007b }\n r2 = r6.h;\t Catch:{ Exception -> 0x007b }\n if (r2 == 0) goto L_0x003e;\n L_0x0038:\n r2 = r6.h;\t Catch:{ Exception -> 0x007b }\n r0 = r2.a(r0);\t Catch:{ Exception -> 0x007b }\n L_0x003e:\n r1.setContent(r0);\t Catch:{ Exception -> 0x007b }\n r2 = r6.i;\t Catch:{ Exception -> 0x007b }\n r0 = r2.b(r0);\t Catch:{ Exception -> 0x007b }\n r0 = (com.sds.android.sdk.lib.b.b) r0;\t Catch:{ Exception -> 0x007b }\n if (r0 == 0) goto L_0x006d;\n L_0x004b:\n r2 = r1.getCode();\t Catch:{ Exception -> 0x007b }\n r0.setCode(r2);\t Catch:{ Exception -> 0x007b }\n r2 = r1.getLocation();\t Catch:{ Exception -> 0x007b }\n r0.setLocation(r2);\t Catch:{ Exception -> 0x007b }\n r2 = r1.getContent();\t Catch:{ Exception -> 0x007b }\n r0.setContent(r2);\t Catch:{ Exception -> 0x007b }\n r1 = r7.e();\t Catch:{ Exception -> 0x0068 }\n r1.close();\t Catch:{ Exception -> 0x0068 }\n goto L_0x000a;\n L_0x0068:\n r1 = move-exception;\n r1.printStackTrace();\n goto L_0x000a;\n L_0x006d:\n r0 = r7.e();\t Catch:{ Exception -> 0x0076 }\n r0.close();\t Catch:{ Exception -> 0x0076 }\n L_0x0074:\n r0 = r1;\n goto L_0x000a;\n L_0x0076:\n r0 = move-exception;\n r0.printStackTrace();\n goto L_0x0074;\n L_0x007b:\n r0 = move-exception;\n r0.printStackTrace();\t Catch:{ all -> 0x008c }\n r0 = r7.e();\t Catch:{ Exception -> 0x0087 }\n r0.close();\t Catch:{ Exception -> 0x0087 }\n goto L_0x0074;\n L_0x0087:\n r0 = move-exception;\n r0.printStackTrace();\n goto L_0x0074;\n L_0x008c:\n r0 = move-exception;\n r1 = r7.e();\t Catch:{ Exception -> 0x0095 }\n r1.close();\t Catch:{ Exception -> 0x0095 }\n L_0x0094:\n throw r0;\n L_0x0095:\n r1 = move-exception;\n r1.printStackTrace();\n goto L_0x0094;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.sds.android.sdk.lib.b.l.a(com.sds.android.sdk.lib.a.a$a):R\");\n }", "private static String makeHttpRequest(URL newsUrl) throws IOException{\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (newsUrl == null) {\n //returns no data\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n //Create the connection\n try {\n urlConnection = (HttpURLConnection) newsUrl.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n //Establish an HTTP connection with the server\n urlConnection.connect();\n\n //Test to see what response we get\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200){\n //Valid connection\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(TAG, \"makeHttpRequest: Error Code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e){\n Log.e(TAG, \"makeHttpRequest: Problem retrieving the news JSON results\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null){\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies than an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public static void m7909b(java.net.HttpURLConnection r10, @androidx.annotation.Nullable java.lang.String r11, @androidx.annotation.NonNull java.lang.String r12, @androidx.annotation.NonNull java.lang.String r13) {\n /*\n java.io.InputStream r0 = r10.getErrorStream()\n r1 = 0\n r2 = 2\n r3 = 1\n r4 = 0\n r5 = 3\n if (r0 != 0) goto L_0x000c\n goto L_0x0050\n L_0x000c:\n java.io.BufferedReader r6 = new java.io.BufferedReader\n java.io.InputStreamReader r7 = new java.io.InputStreamReader\n java.nio.charset.Charset r8 = f8009f\n r7.<init>(r0, r8)\n r6.<init>(r7)\n java.lang.StringBuilder r0 = new java.lang.StringBuilder // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r0.<init>() // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n L_0x001d:\n java.lang.String r7 = r6.readLine() // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n if (r7 == 0) goto L_0x002c\n r0.append(r7) // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r7 = 10\n r0.append(r7) // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n goto L_0x001d\n L_0x002c:\n java.lang.String r7 = \"Error when communicating with the Firebase Installations server API. HTTP response: [%d %s: %s]\"\n java.lang.Object[] r8 = new java.lang.Object[r5] // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n int r9 = r10.getResponseCode() // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9) // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r8[r4] = r9 // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n java.lang.String r10 = r10.getResponseMessage() // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r8[r3] = r10 // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r8[r2] = r0 // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n java.lang.String r10 = java.lang.String.format(r7, r8) // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r1 = r10\n goto L_0x004d\n L_0x0048:\n r10 = move-exception\n r6.close() // Catch:{ IOException -> 0x004c }\n L_0x004c:\n throw r10\n L_0x004d:\n r6.close() // Catch:{ IOException -> 0x0050 }\n L_0x0050:\n boolean r10 = android.text.TextUtils.isEmpty(r1)\n if (r10 != 0) goto L_0x007b\n java.lang.String r10 = \"Firebase-Installations\"\n android.util.Log.w(r10, r1)\n java.lang.Object[] r0 = new java.lang.Object[r5]\n r0[r4] = r12\n r0[r3] = r13\n boolean r12 = android.text.TextUtils.isEmpty(r11)\n if (r12 == 0) goto L_0x006a\n java.lang.String r11 = \"\"\n goto L_0x0070\n L_0x006a:\n java.lang.String r12 = \", \"\n java.lang.String r11 = p005b.p035e.p036a.p037a.C0843a.m451l(r12, r11)\n L_0x0070:\n r0[r2] = r11\n java.lang.String r11 = \"Firebase options used while communicating with Firebase server APIs: %s, %s%s\"\n java.lang.String r11 = java.lang.String.format(r11, r0)\n android.util.Log.w(r10, r11)\n L_0x007b:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p180d.p216x.p219n.C4312c.m7909b(java.net.HttpURLConnection, java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public String getContentByUrl(HttpClient httpClient, String url) {\n\t\tHttpEntity resEntity = null;\n\t\t\n\t\tHttpResponse response = null;\n\n\t\ttry {\n\n\t\t\tHttpGet httpget = new HttpGet(url);\n\n\t\t\tresponse = httpClient.execute(httpget);\n\n\t\t\tint status = response.getStatusLine().getStatusCode();\n\n\t\t\tif (status == HttpStatus.SC_OK) {\n\n\t\t\t\t// get reponse content type\n\t\t\t\tHeader header = response.getFirstHeader(\"Content-Type\");\n\t\t\t\tString contentType = header.getValue();\n\n\t\t\t\tif (contentType != null && contentType.startsWith(\"image/\")) {\n\t\t\t\t\t// if get an image response, return the url\n\t\t\t\t\treturn url;\n\t\t\t\t}\n\n\t\t\t\tresEntity = response.getEntity();\n\n//\t\t\t\tif(sm.encode != null && sm.encode.equals(\"\")){\n//\t\t\t\t\tsm.encode = null;\n//\t\t\t\t}\n//\t\t\t\tif (sm.encode == null\n//\t\t\t\t\t\t&& (resEntity.getContentEncoding() != null || resEntity\n//\t\t\t\t\t\t\t\t.getContentType() != null)) {\n//\t\t\t\t\tif (resEntity.getContentEncoding() != null) {\n//\t\t\t\t\t\tsm.encode = resEntity.getContentEncoding().getValue();\n//\t\t\t\t\t} else {\n//\n//\t\t\t\t\t\tHeaderElement[] eles = resEntity.getContentType()\n//\t\t\t\t\t\t\t\t.getElements();\n//\t\t\t\t\t\tfor (HeaderElement ele : eles) {\n//\t\t\t\t\t\t\tfor (NameValuePair para : ele.getParameters()) {\n//\t\t\t\t\t\t\t\tif (\"charset\".equals(para.getName())) {\n//\t\t\t\t\t\t\t\t\tsm.encode = para.getValue();\n//\t\t\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tif (sm.encode != null) {\n//\t\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n\n\t\t\t\tif(sm.encode != null && !sm.encode.equals(\"\")){\n\t\t\t\treturn EntityUtils.toString(resEntity, sm.encode);\n\t\t\t\t}else{\n\t\t\t\t\treturn EntityUtils.toString(resEntity, \"utf-8\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (OutOfMemoryError e) {\n\t\t} catch (NullPointerException ne) {\n\t\t\tne.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\tif( response.getEntity() != null ) {\n\t\t\ttry {\n\t\t\t\tEntityUtils.consume(response.getEntity());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn null;\n\t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the earthquake JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies than an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n HttpURLConnection urlConnection = null;\n\n try {\n URL data = new URL(url);\n urlConnection = (HttpURLConnection) data.openConnection();\n\n int responseCode = urlConnection.getResponseCode();\n\n if (responseCode == HttpURLConnection.HTTP_OK) {\n\n readJsonStream(urlConnection.getInputStream());\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n urlConnection.disconnect();\n return null;\n }", "public interface HttpRequestService {\n\n String get(String url,HashMap<String,String> params) throws IOException;\n\n String get(String url) throws IOException;\n\n String post(String url,HashMap<String,String> params) throws Exception;\n\n}", "private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }", "public static String getHTTP(String urlToRead) throws Exception {\n // reference: https://stackoverflow.com/questions/34691175/how-to-send-httprequest-and-get-json-response-in-android/34691486\n HttpClient httpclient = new DefaultHttpClient();\n HttpGet httpget = new HttpGet(urlToRead);\n\n HttpResponse response = httpclient.execute(httpget);\n\n if (response.getStatusLine().getStatusCode() == 200) {\n String server_response = EntityUtils.toString(response.getEntity());\n return server_response;\n } else {\n System.out.println(\"no response from server\");\n }\n return \"\";\n }", "private static String parseResponse(HttpResponse response) throws Exception {\r\n \t\tString result = null;\r\n \t\tBufferedReader reader = null;\r\n \t\ttry {\r\n \t\t\tHeader contentEncoding = response\r\n \t\t\t\t\t.getFirstHeader(\"Content-Encoding\");\r\n \t\t\tif (contentEncoding != null\r\n \t\t\t\t\t&& contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(\r\n \t\t\t\t\t\tnew GZIPInputStream(response.getEntity().getContent())));\r\n \t\t\t} else {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(response\r\n \t\t\t\t\t\t.getEntity().getContent()));\r\n \t\t\t}\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tString line = null;\r\n \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\tresult = sb.toString();\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\treader.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn result;\r\n \t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "private static String facebookGetMethod(String url){\r\n System.out.println(\"@executing facebookGetMethod():\" + url);\r\n String responseStr = null;\r\n \r\n try {\r\n HttpGet loginGet = new HttpGet(url);\r\n HttpResponse response = httpClient.execute(loginGet);\r\n HttpEntity entity = response.getEntity();\r\n \r\n System.out.println(\"facebookGetMethod: \" + response.getStatusLine());\r\n if (entity != null) {\r\n responseStr = EntityUtils.toString(entity);\r\n entity.consumeContent();\r\n }\r\n \r\n int statusCode = response.getStatusLine().getStatusCode();\r\n\r\n /**\r\n * @fixme I am not sure if 200 is the only code that \r\n * means \"success\"\r\n */\r\n if(statusCode != 200){\r\n //error occured\r\n System.out.println(\"Error Occured! Status Code = \" + statusCode);\r\n responseStr = null;\r\n }\r\n System.out.println(\"Get Method done(\" + statusCode+\"), response string length: \" + (responseStr==null? 0:responseStr.length()));\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return responseStr;\r\n }", "@Override\n protected String doInBackground(String... strings) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(strings[0]);\n InputStreamReader inputStream = new InputStreamReader(url.openConnection().getInputStream());\n BufferedReader bufferedReader = new BufferedReader(inputStream);\n String line = \"\" ;\n while ((line = bufferedReader.readLine()) != null) {\n content.append(line);\n }\n bufferedReader.close();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return content.toString();\n }", "@Override\n protected String doInBackground(String... strings) {\n String response = \"\";\n try {\n URL url = new URL(strings[0]);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setRequestMethod(\"GET\");\n con.setConnectTimeout(5000);\n con.setReadTimeout(5000);\n con.connect();\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n\n String inputLine;\n StringBuffer content = new StringBuffer();\n while ((inputLine = in.readLine()) != null) {\n content.append(inputLine);\n }\n in.close();\n response = content.toString();\n parseValuesFromResponse(response, strings[1]);\n } catch (Exception e){\n e.printStackTrace();\n }\n return null;\n }", "private static String postResponseFromHttpUrl(URL url, JSONObject postJson) throws IOException {\n\n Log.d(TAG, \"sending POST http request\");\n\n StringBuffer response = new StringBuffer();\n HttpURLConnection urlConnection = null;\n String responseJSON;\n int status = 200;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"POST\");\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestProperty(\"Content-Type\",\"application/json\");\n urlConnection.setDoInput(true);\n urlConnection.setDoOutput(true);\n\n // send json string\n DataOutputStream os = new DataOutputStream(urlConnection.getOutputStream());\n os.writeBytes(postJson.toString());\n os.flush();\n os.close();\n\n status = urlConnection.getResponseCode();\n\n } catch (IOException e){\n e.printStackTrace();\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n\n if (status != 200) {\n throw new IOException(\"Post failed with error code \" + status);\n } else {\n BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n }\n\n // json response string\n responseJSON = response.toString();\n\n return responseJSON;\n }", "public interface HttpCallbackListener {\n void onFinish(String responde);\n void onError(Exception e);\n}", "private static OkHttpClient m35241c() {\n return new OkHttpClient();\n }", "public static String makeHTTPRequest(URL url, Context context) throws IOException {\n // If the url is empty, return early\n String jsonResponse = null;\n if (url == null) {\n return jsonResponse;\n }\n final Context mContext = context;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful, the response code should be 200. Read the input stream and\n // parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromInputStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n //use a handler to create a toast on the UI thread\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(mContext, \"Error: Issue with fetching JSON results from Guardian API.\", Toast\n .LENGTH_SHORT)\n .show();\n }\n });\n\n Log.e(LOG_TAG, \"Error: Issue with fetching JSON results from Guardian API. \", e);\n } finally {\n // Close connection\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n // Close stream\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public RequestHandle get(final int requestID, final String[] arr, final HashMap<String, String> headerMap, final Context context, final String url,\n final ResponseHandler responseHandler,\n boolean showLoadingIndicator, IndicatorStyle style) {\n\n RequestHandle rQ = null;\n if (showLoadingIndicator) {\n progressDialog = new ProgressDialog(context, style).show();\n }\n\n switch (NetworkUtil.getConnectivityStatus(context)) {\n case OFFLINE:\n responseHandler.onRequestFinished(requestID, RequestStatus.NO_CONNECTION, 0, null);\n try {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n } catch (Exception e) {\n\n }\n\n break;\n case WIFI_CONNECTED_WITHOUT_INTERNET:\n responseHandler.onRequestFinished(requestID, RequestStatus.NO_INTERNET, 0, null);\n try {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n } catch (Exception e) {\n\n }\n break;\n case MOBILE_DATA_CONNECTED:\n case WIFI_CONNECTED_WITH_INTERNET:\n\n if (headerMap != null) {\n\n\n Iterator myVeryOwnIterator = headerMap.keySet().iterator();\n while (myVeryOwnIterator.hasNext()) {\n String key = (String) myVeryOwnIterator.next();\n String value = (String) headerMap.get(key);\n client.addHeader(key, value);\n // Toast.makeText(ctx, \"Key: \"+key+\" Value: \"+value, Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n rQ = client.get(url, new AsyncHttpResponseHandler() {\n\n @Override\n public void onStart() {\n Log.v(\"URL\", url);\n\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n // Header[] header=headers;\n\n if (responseBody != null) {\n String response = new String(responseBody);\n Log.v(\"Response\", response + \"\");\n // Log.e(\"statuescode\", statusCode + \"\");\n responseHandler.onRequestSucess(requestID, arr,\n RequestStatus.SUCCEED, statusCode, response);\n } else {\n responseHandler.onRequestFinished(requestID,\n RequestStatus.SUCCEED, statusCode, null);\n // Log.e(\"statuescode\",statusCode+\"\");\n\n }\n\n try {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n } catch (Exception e) {\n\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers,\n byte[] responseBody, Throwable error) {\n error.printStackTrace();\n Header[] header=headers;\n if (responseBody != null) {\n String response = new String(responseBody);\n Log.v(\"Response\", response + \"\");\n responseHandler.onRequestFinished(requestID,\n RequestStatus.FAILED, statusCode, response);\n } else {\n responseHandler.onRequestFinished(requestID,\n RequestStatus.FAILED, statusCode, null);\n }\n\n try {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n } catch (Exception e) {\n\n }\n }\n });\n // rQ.cancel(true);\n break;\n }\n return rQ;\n }", "public String doInBackground(String... args) {\n try {\n\n //create a URL object of what server to contact:\n URL url = new URL(args[0]);\n publishProgress(25);\n\n //open the connection\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n publishProgress(50);\n //wait for data:\n InputStream response = urlConnection.getInputStream();\n\n //JSON reading: Look at slide 26\n //Build the entire string response:\n BufferedReader reader = new BufferedReader(new InputStreamReader(response, \"UTF-8\"), 8);\n StringBuilder sb = new StringBuilder();\n\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n String result = sb.toString(); //result is the whole string\n\n Log.i(\"Results from JSON: \", result);\n\n publishProgress(100);\n return result;\n\n } catch (Exception e) {\n }\n\n return \"Nothing\";\n }", "private synchronized String execute(final HttpUriRequest request) {\n request.setParams(params);\n\n // Set the request's headers\n for (Entry<String, String> header : headers.entrySet()) {\n request.setHeader(header.getKey(), header.getValue());\n }\n\n // Execute the request and get it's content\n HttpResponse response;\n String content;\n try {\n\n // Execute the request\n response = getClient().execute(request);\n\n // Get the response content\n content = EntityUtils.toString(response.getEntity(), charset);\n } catch (IOException e) {\n throw new JsogClientException(\"Get request failed.\", e);\n }\n\n // Check the response code\n StatusLine sl = response.getStatusLine();\n if (sl.getStatusCode() != 200) {\n throw new Non200ResponseCodeException(\n sl.getStatusCode(),\n sl.getReasonPhrase(),\n content);\n }\n\n return content;\n }", "private ResponseEntity m37639a(C6148a aVar) throws AMapCoreException, IOException {\n Throwable th;\n PushbackInputStream pushbackInputStream;\n InputStream inputStream;\n PushbackInputStream pushbackInputStream2;\n PushbackInputStream pushbackInputStream3;\n Throwable th2;\n List<String> list;\n String str = \"\";\n ByteArrayOutputStream byteArrayOutputStream = null;\n try {\n long currentTimeMillis = System.currentTimeMillis();\n HttpURLConnection httpURLConnection = aVar.f25732a;\n httpURLConnection.connect();\n Map<String, List<String>> headerFields = httpURLConnection.getHeaderFields();\n int responseCode = httpURLConnection.getResponseCode();\n if (!(headerFields == null || (list = headerFields.get(\"gsid\")) == null || list.size() <= 0)) {\n str = list.get(0);\n }\n if (responseCode == 200) {\n m37642a(aVar, false, currentTimeMillis, System.currentTimeMillis());\n ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream();\n try {\n inputStream = httpURLConnection.getInputStream();\n try {\n pushbackInputStream = new PushbackInputStream(inputStream, 2);\n try {\n byte[] bArr = new byte[2];\n pushbackInputStream.read(bArr);\n pushbackInputStream.unread(bArr);\n FilterInputStream gZIPInputStream = (bArr[0] == 31 && bArr[1] == -117) ? new GZIPInputStream(pushbackInputStream) : pushbackInputStream;\n byte[] bArr2 = new byte[1024];\n while (true) {\n int read = gZIPInputStream.read(bArr2);\n if (read == -1) {\n break;\n }\n byteArrayOutputStream2.write(bArr2, 0, read);\n }\n SDKLogHandler.m37520c();\n ResponseEntity avVar = new ResponseEntity();\n avVar.f25744a = byteArrayOutputStream2.toByteArray();\n avVar.f25745b = headerFields;\n avVar.f25746c = this.f25729i;\n avVar.f25747d = str;\n try {\n byteArrayOutputStream2.close();\n } catch (Throwable th3) {\n BasicLogHandler.m38679a(th3, \"ht\", \"par\");\n }\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (Throwable th4) {\n BasicLogHandler.m38679a(th4, \"ht\", \"par\");\n }\n }\n try {\n pushbackInputStream.close();\n } catch (Throwable th5) {\n BasicLogHandler.m38679a(th5, \"ht\", \"par\");\n }\n try {\n gZIPInputStream.close();\n } catch (Throwable th6) {\n BasicLogHandler.m38679a(th6, \"ht\", \"par\");\n }\n return avVar;\n } catch (IOException unused) {\n byteArrayOutputStream = byteArrayOutputStream2;\n pushbackInputStream3 = null;\n try {\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th7) {\n pushbackInputStream2 = pushbackInputStream3;\n th = th7;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n } catch (Throwable th8) {\n byteArrayOutputStream = byteArrayOutputStream2;\n th = th8;\n pushbackInputStream2 = null;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n } catch (IOException unused2) {\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n pushbackInputStream3 = pushbackInputStream;\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th9) {\n th2 = th9;\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n th = th2;\n pushbackInputStream2 = pushbackInputStream;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n } catch (IOException unused3) {\n inputStream = null;\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n pushbackInputStream3 = pushbackInputStream;\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th10) {\n th2 = th10;\n inputStream = null;\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n th = th2;\n pushbackInputStream2 = pushbackInputStream;\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (Throwable th11) {\n BasicLogHandler.m38679a(th11, \"ht\", \"par\");\n }\n }\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (Throwable th12) {\n BasicLogHandler.m38679a(th12, \"ht\", \"par\");\n }\n }\n if (pushbackInputStream != null) {\n try {\n pushbackInputStream.close();\n } catch (Throwable th13) {\n BasicLogHandler.m38679a(th13, \"ht\", \"par\");\n }\n }\n if (pushbackInputStream2 != null) {\n try {\n pushbackInputStream2.close();\n } catch (Throwable th14) {\n BasicLogHandler.m38679a(th14, \"ht\", \"par\");\n }\n }\n throw th;\n }\n } else {\n AMapCoreException jVar = new AMapCoreException(\"网络异常原因:\" + httpURLConnection.getResponseMessage() + \" 网络异常状态码:\" + responseCode + \" \" + str + \" \" + this.f25729i, str, this.f25729i);\n jVar.mo41849a(responseCode);\n throw jVar;\n }\n } catch (IOException unused4) {\n pushbackInputStream3 = null;\n inputStream = null;\n pushbackInputStream = null;\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th15) {\n th = th15;\n pushbackInputStream2 = null;\n inputStream = null;\n pushbackInputStream = null;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n }", "ApacheHttpClientBuilder getApacheHttpClientBuilder();", "@Override\n public void onSuccess(int i, cz.msebera.android.httpclient.Header[] headers, byte[] bytes) {\n\n // Hide Progress Dialog\n prgDialog.hide();\n Toast.makeText(getApplicationContext(), \"hello\"+bytes.toString(),\n Toast.LENGTH_LONG).show();\n }" ]
[ "0.59878904", "0.59608257", "0.5932495", "0.59299743", "0.588291", "0.58521914", "0.58119583", "0.5801961", "0.57938635", "0.576852", "0.57307935", "0.57273215", "0.5705743", "0.5704948", "0.5703925", "0.568585", "0.5665814", "0.56324404", "0.5629055", "0.5627844", "0.5604983", "0.55999273", "0.5596679", "0.55849534", "0.55709594", "0.5568508", "0.55245304", "0.5519582", "0.54977685", "0.5488633", "0.5479097", "0.5474635", "0.5471661", "0.5462173", "0.5460658", "0.5420678", "0.5417574", "0.5417287", "0.5415725", "0.54042923", "0.5403132", "0.5396655", "0.5396655", "0.5396655", "0.53876334", "0.5386778", "0.53844184", "0.53833735", "0.5376207", "0.53728515", "0.53609353", "0.5359746", "0.535785", "0.5357503", "0.53446084", "0.5344315", "0.53352815", "0.53352815", "0.53352815", "0.53352815", "0.53352815", "0.5332575", "0.5321687", "0.5321428", "0.5320726", "0.5319737", "0.5316606", "0.5308977", "0.5307985", "0.5303664", "0.53016895", "0.53016895", "0.52978075", "0.529182", "0.5291402", "0.5290918", "0.52869695", "0.52842313", "0.5275607", "0.52751064", "0.5273334", "0.52683115", "0.52561146", "0.52550477", "0.5252195", "0.52520925", "0.52479357", "0.5247493", "0.52451575", "0.52450174", "0.5231122", "0.5230865", "0.52289563", "0.52268386", "0.52262044", "0.5225064", "0.52239287", "0.5223417", "0.5223196", "0.5219389", "0.52174026" ]
0.0
-1
Shamelessly cribbed from AndroidHttpClient
public static final DefaultHttpClient createHttpClient(int retryCount) { HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, HTTP.UTF_8); // HttpProtocolParams.setUseExpectContinue(params, true); // Turn off stale checking. Our connections break all the time anyway, // and it's not worth it to pay the penalty of checking every time. HttpConnectionParams.setStaleCheckingEnabled(params, false); // Default connection and socket timeout of 30 seconds. Tweak to taste. HttpConnectionParams.setConnectionTimeout(params, 15 * 1000); HttpConnectionParams.setSoTimeout(params, 20 * 1000); HttpConnectionParams.setSocketBufferSize(params, 8192); HttpClientParams.setRedirecting(params, true); ConnManagerParams.setTimeout(params, 5 * 1000); ConnManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(50)); ConnManagerParams.setMaxTotalConnections(params, 200); // Sets up the http part of the service. final SchemeRegistry supportedSchemes = new SchemeRegistry(); // Register the "http" protocol scheme, it is required // by the default operator to look up socket factories. final SocketFactory sf = PlainSocketFactory.getSocketFactory(); supportedSchemes.register(new Scheme("http", sf, 80)); supportedSchemes.register(new Scheme("https", SSLSocketFactory .getSocketFactory(), 443)); final ThreadSafeClientConnManager ccm = new ThreadSafeClientConnManager( params, supportedSchemes); DefaultHttpClient httpClient = new DefaultHttpClient(ccm, params); httpClient .setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler( retryCount, true)); // Add gzip header to requests using an interceptor httpClient.addRequestInterceptor(new GzipHttpRequestInterceptor()); // Add gzip compression to responses using an interceptor httpClient.addResponseInterceptor(new GzipHttpResponseInterceptor()); return httpClient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String makeHttpRequest(String url, String method,\r\n\t List<NameValuePair> params) {\r\n\t \t\r\n\t\t\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t // Making HTTP request\r\n\t try {\r\n\t \r\n\t // check for request method\r\n\t if(method == \"POST\"){\r\n\t // request method is POST\r\n\t // defaultHttpClient\r\n\t DefaultHttpClient httpClient = new DefaultHttpClient();\r\n\t\t \t\t\tHttpParams paramss = httpClient.getParams();\r\n\t\t \t\t\tHttpConnectionParams.setConnectionTimeout(paramss, 5000);\r\n\t\t \t\t\tHttpConnectionParams.setSoTimeout(paramss, 5000);\r\n\t\t \t\t\t\r\n\t \r\n\t HttpPost httpPost = new HttpPost(url);\r\n\t httpPost.setEntity(new UrlEncodedFormEntity(params));\r\n\t \r\n\t HttpResponse httpResponse = httpClient.execute(httpPost);\r\n\t HttpEntity httpEntity = httpResponse.getEntity();\r\n\t is = httpEntity.getContent();\r\n\t \r\n\t }else if(method == \"GET\"){\r\n\t // request method is GET\t \r\n\t \r\n\t DefaultHttpClient httpClient = new DefaultHttpClient();\r\n\t\t \t\t\tHttpParams paramss = httpClient.getParams();\r\n\t\t \t\t\tHttpConnectionParams.setConnectionTimeout(paramss, 3000);\r\n\t\t \t\t\tHttpConnectionParams.setSoTimeout(paramss,3000);\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t String paramString = URLEncodedUtils.format(params, \"utf-8\");\r\n\t if( paramString.length() > 0 )\r\n\t url += \"?\" + paramString;\r\n\t HttpGet httpGet = new HttpGet(url);\r\n\t \r\n\t \r\n\t HttpResponse httpResponse = httpClient.execute(httpGet);\r\n\t if(httpResponse.getStatusLine().getStatusCode() != 200 )\r\n\t \treturn null;\r\n\t HttpEntity httpEntity = httpResponse.getEntity();\r\n\t is = httpEntity.getContent();\r\n\t \r\n\t charset = getContentCharSet(httpEntity);\r\n\t \r\n\t \r\n\t Header[] headers = httpResponse.getAllHeaders();\r\n\t \tfor (Header header : headers) {\r\n\t \t\tLog.d(\"stat\",\"Key : \" + header.getName() \r\n\t + \" ,Value : \" + header.getValue());\r\n\t \r\n\t \t}\r\n\r\n\t \tSystem.out.println(\"\\nGet Response Header By Key ...\\n\");\r\n\t \tString server = httpResponse.getFirstHeader(\"Server\").getValue();\r\n\t \tLog.d(\"server\", server);\r\n\t \r\n\t \t///////////////////////////////////////////////////////////////////////////////\r\n\r\n\t } \r\n\t \r\n\t } catch (UnsupportedEncodingException e) {\r\n\t \tLog.d(\"unsupporetedencoding\", \"erro\");\r\n\t e.printStackTrace();\r\n\t return null;\r\n\t } catch (ClientProtocolException e) {\r\n\t \tLog.d(\"clientprotocalexception\", \"erro\");\r\n\t \te.printStackTrace();\r\n\t \treturn null;\r\n\t } catch (IOException e) {\r\n\t \tLog.d(\"ioexception\", \"erro\");\r\n\t e.printStackTrace();\r\n\t return null;\r\n\t }\r\n\t \r\n\t try {\r\n\t // BufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t // is, \"iso-8859-1\"), 8);\r\n\t // BufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t // is, \"iso-8859-1\"),16);\r\n\t \r\n\t \t\r\n\t \t\r\n\t \tif (charset == null) {\r\n\r\n\t \t\tcharset = HTTP.UTF_8;\r\n\r\n\t \t\t}\r\n\r\n\t \t\r\n\t \t\r\n\t BufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t is, charset));\r\n\t \r\n\t \r\n\t StringBuilder sb = new StringBuilder();\r\n\t String line = null;\r\n\t while ((line = reader.readLine()) != null) {\r\n\t sb.append(line);\r\n\t }\r\n\t is.close();\r\n\t String text = sb.toString();\r\n\t if( text.length() == 0 )\r\n\t \treturn null;\r\n\t text = text.replace(\"\\uFEFF\", \"\");\r\n\t json = Crypto3DES.Decrypte(text);\r\n\t \r\n\t Log.d(\"display\", json);\r\n\t \r\n\t } catch (Exception e) {\r\n\t Log.e(\"Buffer Error\", \"Error converting result \" + e.toString());\r\n\t Log.d(\"buffer erro\", e.toString());\r\n\t return null;\r\n\t }\r\n\t \r\n\t return json;\r\n\t }", "private static HttpClient getNewHttpClient(){\n HttpParams params = new BasicHttpParams();\n return new DefaultHttpClient(params);\n }", "private String doHttpClientGet() {\n\t\t\r\n\t\tHttpGet httpGet=new HttpGet(url);\r\n\t\tHttpClient client=new DefaultHttpClient();\r\n\t\ttry {\r\n\t\t\tHttpResponse response=client.execute(httpGet);\r\n\t\t\tif(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){\r\n\t\t\t\tresult=EntityUtils.toString(response.getEntity());\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"content----->\"+result);\r\n\t\t} catch (ClientProtocolException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private static byte[] a(org.apache.http.HttpResponse r4) throws java.lang.IllegalStateException, java.io.IOException {\n /*\n r0 = 1024(0x400, float:1.435E-42)\n byte[] r0 = new byte[r0]\n r1 = 0\n org.apache.http.HttpEntity r4 = r4.getEntity() // Catch:{ all -> 0x0030 }\n java.io.InputStream r4 = r4.getContent() // Catch:{ all -> 0x0030 }\n java.io.ByteArrayOutputStream r2 = new java.io.ByteArrayOutputStream // Catch:{ all -> 0x002e }\n r2.<init>() // Catch:{ all -> 0x002e }\n L_0x0012:\n int r1 = r4.read(r0) // Catch:{ all -> 0x002b }\n r3 = -1\n if (r1 == r3) goto L_0x001e\n r3 = 0\n r2.write(r0, r3, r1) // Catch:{ all -> 0x002b }\n goto L_0x0012\n L_0x001e:\n byte[] r0 = r2.toByteArray() // Catch:{ all -> 0x002b }\n if (r4 == 0) goto L_0x0027\n r4.close() // Catch:{ Exception -> 0x0027 }\n L_0x0027:\n r2.close() // Catch:{ Exception -> 0x002a }\n L_0x002a:\n return r0\n L_0x002b:\n r0 = move-exception\n r1 = r2\n goto L_0x0032\n L_0x002e:\n r0 = move-exception\n goto L_0x0032\n L_0x0030:\n r0 = move-exception\n r4 = r1\n L_0x0032:\n if (r4 == 0) goto L_0x0039\n r4.close() // Catch:{ Exception -> 0x0038 }\n goto L_0x0039\n L_0x0038:\n L_0x0039:\n if (r1 == 0) goto L_0x003e\n r1.close() // Catch:{ Exception -> 0x003e }\n L_0x003e:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.alipay.sdk.f.d.a(org.apache.http.HttpResponse):byte[]\");\n }", "public interface HttpClientable {\n\n void get(String url);\n\n void get(String url, ParamStore params);\n\n void get(String url, ParamStore params, String tag);\n\n void post(String url, SparseArray<String> params);\n\n void post(String url, SparseArray<String> params, String tag);\n\n void upload(String url, HashMap<String, Object> params);\n\n void upload(String url, HashMap<String, Object> params, String tag);\n\n void download(String url);\n\n void download(String url, String tag);\n\n void cancelAll();\n\n void cancel(String tag);\n\n}", "@Override\r\n protected String doInBackground(String... params) {\r\n HttpClient httpclient = new DefaultHttpClient();\r\n HttpGet httppost = new HttpGet(params[0]); // params[0] contains url string\r\n try {\r\n HttpResponse response = httpclient.execute(httppost);\r\n jsonResult = inputStreamToString(\r\n response.getEntity().getContent()).toString();\r\n }\r\n\r\n catch (ClientProtocolException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public interface HttpClient {\n\n\torg.apache.http.client.HttpClient getClient();\n\n\tString fetch(URI uri) throws IOException;\n\n\tvoid init() throws KeyManagementException, NoSuchAlgorithmException;\n}", "public interface HttpClientInterface {\n byte[] post(String url, byte[] body);\n}", "@Override\n protected Object doInBackground(Object[] objects)\n {\n URL url = null; \n\n try\n {\n url = new URL(requestUrl);\n }\n catch (MalformedURLException e)\n {\n e.printStackTrace();\n }\n\n // Create and open HTTP connection\n HttpURLConnection connection = null;\n try\n {\n connection = (HttpURLConnection) url.openConnection();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n\n try\n {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n\n while ((line = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(line);\n }\n\n bufferedReader.close();\n\n return stringBuilder.toString();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n connection.disconnect();\n }\n\n return null;\n }", "HttpContent getHttpContent();", "@Override\n protected String doInBackground(String... params) {\n String s = \"\";\n if (params.length > 0) {\n s = params[0];\n }\n HttpClient httpClient = new DefaultHttpClient();\n HttpContext localContext = new BasicHttpContext();\n HttpPost httpPost;\n HttpGet httpGet;\n ArrayList<NameValuePair> postParameters;\n\n httpGet = new HttpGet(URI);\n httpPost = new HttpPost(URI);\n\n\n if (s.length() > 0) {\n // postParameters = new ArrayList<NameValuePair>();\n //postParameters.add(new BasicNameValuePair(\"param1\", s));\n try {\n httpPost.setEntity(new StringEntity(s));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }\n\n String text = null;\n try {\n HttpResponse response;\n if (s.length() > 0) {\n response = httpClient.execute(httpPost, localContext);\n } else {\n response = httpClient.execute(httpGet, localContext);\n }\n\n HttpEntity entity = response.getEntity();\n text = getASCIIContentFromEntity(entity);\n //Log.d(Scrumptious.class.getSimpleName(), \"Received data from server at address \" + URI);\n //Log.d(Scrumptious.class.getSimpleName(), \"Data received is:\\n\" + text);\n } catch (Exception e) {\n //Log.d(Scrumptious.class.getSimpleName(), \"Failed to retrieve data from the server.\");\n return e.getLocalizedMessage();\n }\n return text;\n }", "@Override\n public void onSuccess(int i, Header[] headers, byte[] bytes) {\n try {\n JSONObject localJSONObject = (JSONObject) new JSONTokener(new String(bytes, \"UTF-8\")).nextValue();\n Log.d(\"Success\", localJSONObject.toString());\n AsyncHttpRequest.this.mCallbackContext.success(localJSONObject);\n } catch (JSONException localJSONException) {\n localJSONException.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n protected String doInBackground(String... string) {\n try {\n myurl = new URL(string[0]);\n httpURLConnection = (HttpURLConnection) myurl.openConnection();\n httpURLConnection.setRequestProperty(\"Accept\", \"application/json\");\n httpURLConnection.setRequestProperty(\"user-key\", \"e46faab9e2e5d0e8f5d57c4be68c269d\");\n httpURLConnection.connect();\n\n inputStream = httpURLConnection.getInputStream();\n inputStreamReader = new InputStreamReader(inputStream);\n bufferedReader = new BufferedReader(inputStreamReader);\n line = bufferedReader.readLine();\n result = new StringBuilder();\n while (line != null) {\n result.append(line);\n line = bufferedReader.readLine();\n }\n return result.toString();\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n return null;\n }", "@Override\n protected String doInBackground(String... params) {\n StringBuilder results = new StringBuilder();\n\n try {\n URL url = new URL(params[0]);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\n int statusCode = conn.getResponseCode();\n if (statusCode == 200) {\n InputStream inputStream = new BufferedInputStream(conn.getInputStream());\n\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n results.append(line);\n }\n }\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n return results.toString();\n }", "HttpURLConnection mo120621a(Uri uri) throws IOException;", "R get() throws IOException, ClientProtocolException;", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n // if the url is null, return the response early;\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code \" + urlConnection.getResponseCode());\n }\n\n } catch (IOException e) {\n // TODO: Handle the exception\n Log.e(LOG_TAG, \"Problem retrieving from the url\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "@Override protected String doInBackground(String... params) {\r\n String returnVal = \"\";\r\n switch ( params[0] ) {\r\n case \"getIcyMetaData\":\r\n try {\r\n java.util.HashMap<String, String> icyMetaData = commonUtil.getIcyMetaData(params[1]);\r\n if ( icyMetaData.get(\"icy-metaint\")==null ) {\r\n returnVal = \"ERROR: ICY metadata not supported.\";\r\n } else {\r\n String streamTitle = icyMetaData.get(\"StreamTitle\"); if (streamTitle!=null && streamTitle.length()>0) returnVal = streamTitle; \r\n String icyName = icyMetaData.get(\"icy-name\"); if (icyName!=null && icyName.length()>0) returnVal = \"[\" + icyName + \"] \" + returnVal;\r\n }\r\n } catch (Exception e) {\r\n returnVal = \"ERROR: \" + e.getMessage();\r\n }\r\n break;\r\n case \"getMediaUrl\":\r\n returnVal = commonUtil.getMediaUrl2(params[1]);\r\n break;\r\n case \"wget\":\r\n java.util.List lines = commonUtil.wgets(params[1]);\r\n for (int i=0; i<lines.size(); i++)\r\n returnVal+=lines.get(i).toString().trim();\r\n break;\r\n default:\r\n String url = params[0];\r\n java.net.HttpURLConnection urlConn;\r\n try {\r\n //Open a new URL connection \r\n urlConn = (java.net.HttpURLConnection) (new java.net.URL(url)).openConnection();\r\n urlConn.setRequestMethod(\"GET\");\r\n // sets request headers \r\n //urlConn.setRequestProperty(\"Content-Type\", \"application/json\");\r\n //urlConn.setRequestProperty(\"Accept\", \"application/json\");\r\n returnVal += \"[HTTP \" + String.valueOf(urlConn.getResponseCode()) + \"]\";\r\n java.io.InputStream in;\r\n try {\r\n in = urlConn.getInputStream();\r\n } catch (Exception e) {\r\n returnVal += \"\\n\" + \"ERROR: \" + e.getMessage() + \"; url=\" + urlConn.getURL();\r\n return returnVal;\r\n }\r\n try {\r\n java.io.BufferedReader r = new java.io.BufferedReader(new java.io.InputStreamReader(\r\n new java.io.BufferedInputStream(in), java.nio.charset.StandardCharsets.UTF_8\r\n ));\r\n String line=null; while ((line=r.readLine())!=null) returnVal += \"\\n\" + line;\r\n } catch (Exception e) {\r\n returnVal += \"\\n\" + \"ERROR: \" + e.getMessage() + \"; url=\" + urlConn.getURL();\r\n } finally {\r\n urlConn.disconnect();\r\n }\r\n } catch (java.io.IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n return returnVal;\r\n }", "public final HttpURLConnection mo15945c(URL url, String str) {\n C4228f.C4229a a;\n try {\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.setConnectTimeout(10000);\n httpURLConnection.setUseCaches(false);\n httpURLConnection.setReadTimeout(10000);\n httpURLConnection.addRequestProperty(\"Content-Type\", \"application/json\");\n httpURLConnection.addRequestProperty(\"Accept\", \"application/json\");\n httpURLConnection.addRequestProperty(\"Content-Encoding\", \"gzip\");\n httpURLConnection.addRequestProperty(\"Cache-Control\", \"no-cache\");\n httpURLConnection.addRequestProperty(\"X-Android-Package\", this.f8010a.getPackageName());\n if (!(this.f8012c.get() == null || this.f8011b.get() == null || (a = this.f8012c.get().mo15810a(\"fire-installations-id\")) == C4228f.C4229a.NONE)) {\n httpURLConnection.addRequestProperty(\"x-firebase-client\", this.f8011b.get().mo15341a());\n httpURLConnection.addRequestProperty(\"x-firebase-client-log-type\", Integer.toString(a.f7823g));\n }\n String str2 = null;\n try {\n Context context = this.f8010a;\n byte[] a2 = C1957a.m2688a(context, context.getPackageName());\n if (a2 == null) {\n Log.e(\"ContentValues\", \"Could not get fingerprint hash for package: \" + this.f8010a.getPackageName());\n } else {\n str2 = C1961e.m2877a(a2, false);\n }\n } catch (PackageManager.NameNotFoundException e) {\n StringBuilder u = C0843a.m460u(\"No such package: \");\n u.append(this.f8010a.getPackageName());\n Log.e(\"ContentValues\", u.toString(), e);\n }\n httpURLConnection.addRequestProperty(\"X-Android-Cert\", str2);\n httpURLConnection.addRequestProperty(\"x-goog-api-key\", str);\n return httpURLConnection;\n } catch (IOException unused) {\n throw new C4291f(\"Firebase Installations Service is unavailable. Please try again later.\", C4291f.C4292a.UNAVAILABLE);\n }\n }", "private String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n return jsonResponse;\n }\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } catch (Exception e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public interface HttpsCallbackListener {\n\n public void onFinish(String response);\n\n public void onError(Exception e);\n}", "public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}", "public interface HttpResponseListener extends AsyncListener {\n /** The http header has been sent. \n * @param response the HttpHeader that was read\n * @param bufferHandle the BufferHandle that may or may not hold unread data.\n * @param keepalive if the sender want to use keepalive.\n * @param isChunked if false content is not chunked, \n * if true content is chunked.\n * @param dataSize the contents size or -1 if size is unknown.\n */\n void httpResponse (HttpHeader response, BufferHandle bufferHandle, \n\t\t boolean keepalive, boolean isChunked, long dataSize);\n \n}", "public static String httpGet(String url) throws Exception {\r\n \t\tDefaultHttpClient client = new DefaultHttpClient();\r\n \t\tHttpResponse response = null;\r\n \t\tString responseString = null;\r\n \t\tHttpUriRequest request = new HttpGet(url);\r\n \t\trequest.setHeader(\"Accept-Encoding\", \"gzip\");\r\n \t\trequest.setHeader(\"User-Agent\", \"gzip\");\r\n\t\tresponse = client.execute(request);\r\n \t\tif (response.getStatusLine().getStatusCode() != 200) {\r\n \t\t\tthrow new HttpException(\"Server error: \"\r\n \t\t\t\t\t+ response.getStatusLine().getStatusCode());\r\n \t\t} else {\r\n \t\t\tresponseString = parseResponse(response);\r\n \r\n \t\t}\r\n \t\treturn responseString;\r\n \t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the posts JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n\n\n return jsonResponse;\n }", "SdkHttpRequest getLastRequest();", "private static String makeHttpRequest(URL url) throws IOException {\n String JSONResponse = null;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(Constants.URL_REQUEST_METHOD);\n urlConnection.setReadTimeout(Constants.URL_READ_TIME_OUT);\n urlConnection.setConnectTimeout(Constants.URL_CONNECT_TIME_OUT);\n urlConnection.connect();\n\n if (urlConnection.getResponseCode() == Constants.URL_SUCCESS_RESPONSE_CODE) {\n inputStream = urlConnection.getInputStream();\n JSONResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Response code : \" + urlConnection.getResponseCode());\n // If received any other code(i.e 400) return null JSON response\n JSONResponse = null;\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error Solving JSON response : makeHttpConnection() block\");\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n // Input stream throws IOException when trying to close, that why method signature\n // specify about IOException\n }\n }\n return JSONResponse;\n }", "public interface AsyncHttpLink{\n// @FormUrlEncoded\n// @POST(\"{url}\")\n// Call<ResponseBody> request(@Path(value = \"url\", encoded = true) String url, @FieldMap Map<String, String> params);\n\n @FormUrlEncoded\n @POST\n Call<ResponseBody> request(@Url String url, @FieldMap Map<String, String> params);\n\n @FormUrlEncoded\n @Headers(\"Authorization: basic dGFjY2lzdW06YWJjZGU=\")\n @POST\n Call<ResponseBody> login(@Url String url, @FieldMap Map<String, String> params);\n}", "ResponseHandler createResponseHandler();", "private Result performRequest(String endpointUrl, List<NameValuePair> nameValuePairs) {\n Status status = Status.FAILED_UNRECOVERABLE;\n String response = null;\n try {\n // the while(retries) loop is a workaround for a bug in some Android HttpURLConnection\n // libraries- The underlying library will attempt to reuse stale connections,\n // meaning the second (or every other) attempt to connect fails with an EOFException.\n // Apparently this nasty retry logic is the current state of the workaround art.\n int retries = 0;\n boolean succeeded = false;\n while (retries < 3 && !succeeded) {\n InputStream in = null;\n BufferedInputStream bin = null;\n OutputStream out = null;\n BufferedOutputStream bout = null;\n HttpURLConnection connection = null;\n\n try {\n final URL url = new URL(endpointUrl);\n connection = (HttpURLConnection) url.openConnection();\n if (null != nameValuePairs) {\n connection.setDoOutput(true);\n final UrlEncodedFormEntity form = new UrlEncodedFormEntity(nameValuePairs, \"UTF-8\");\n connection.setRequestMethod(\"POST\");\n connection.setFixedLengthStreamingMode((int)form.getContentLength());\n out = connection.getOutputStream();\n bout = new BufferedOutputStream(out);\n form.writeTo(bout);\n bout.close();\n bout = null;\n out.close();\n out = null;\n }\n in = connection.getInputStream();\n bin = new BufferedInputStream(in);\n response = StringUtils.inputStreamToString(in);\n bin.close();\n bin = null;\n in.close();\n in = null;\n succeeded = true;\n } catch (final EOFException e) {\n if (MPConfig.DEBUG) Log.d(LOGTAG, \"Failure to connect, likely caused by a known issue with Android lib. Retrying.\");\n retries = retries + 1;\n } finally {\n if (null != bout)\n try { bout.close(); } catch (final IOException e) { ; }\n if (null != out)\n try { out.close(); } catch (final IOException e) { ; }\n if (null != bin)\n try { bin.close(); } catch (final IOException e) { ; }\n if (null != in)\n try { in.close(); } catch (final IOException e) { ; }\n if (null != connection)\n connection.disconnect();\n }\n }// while\n } catch (final MalformedURLException e) {\n Log.e(LOGTAG, \"Cannot iterpret \" + endpointUrl + \" as a URL\", e);\n status = Status.FAILED_UNRECOVERABLE;\n } catch (final IOException e) {\n if (MPConfig.DEBUG) Log.d(LOGTAG, \"Cannot post message to Mixpanel Servers (ok, can retry.)\");\n status = Status.FAILED_RECOVERABLE;\n } catch (final OutOfMemoryError e) {\n Log.e(LOGTAG, \"Cannot post message to Mixpanel Servers, will not retry.\", e);\n status = Status.FAILED_UNRECOVERABLE;\n }\n\n if (null != response) {\n status = Status.SUCCEEDED;\n if (MPConfig.DEBUG) Log.d(LOGTAG, \"Request returned:\\n\" + response);\n }\n\n return new Result(status, response);\n }", "private static String makeHTTPRequest(URL url) throws IOException {\n\n // Create an empty json string\n String jsonResponse = \"\";\n\n //IF url is null, return early\n if (url == null) {\n return jsonResponse;\n }\n\n // Create an Http url connection, and an input stream, making both null for now\n HttpURLConnection connection = null;\n InputStream inputStream = null;\n\n try {\n\n // Try to open a connection on the url, request that we GET info from the connection,\n // Set read and connect timeouts, and connect\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setReadTimeout(10000 /*Milliseconds*/);\n connection.setConnectTimeout(15000 /*Milliseconds*/);\n connection.connect();\n\n // If response code is 200 (aka, working), then get and read from the input stream\n if (connection.getResponseCode() == 200) {\n\n Log.v(LOG_TAG, \"Response code is 200: Aka, everything is working great\");\n inputStream = connection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n\n } else {\n // if response code is not 200, Log error message\n Log.v(LOG_TAG, \"Error Response Code: \" + connection.getResponseCode());\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error making http request: \" + e);\n } finally {\n // If connection and inputStream are NOT null, close and disconnect them\n if (connection != null) {\n connection.disconnect();\n }\n\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies that an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n\n return jsonResponse;\n }", "private Connection() {\n\n//==================================================//\n\n\n //==============================//\n\n // client = new AsyncHttpClient(true, 0, 443);\n client = new AsyncHttpClient();\n client.setSSLSocketFactory(MySSLSocketFactory.getFixedSocketFactory());\n contentType = \"application/json\";\n client.setUserAgent(System.getProperty(\"http.agent\"));\n //Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\"\n // client.setUserAgent(\"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\");\n client.setTimeout(20 * 1000);\n client.setResponseTimeout(20 * 1000);\n client.setConnectTimeout(20 * 1000);\n // client.setEnableRedirects(true);\n\n // Log.e(\"agentss\",System.getProperty(\"https.agent\"));\n gson = new GsonBuilder().serializeNulls().create();\n //client.getHttpClient().getConnectionManager().shutdown();\n/*\n try {\n KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());\n trustStore.load(null, null);\n MySSLSocketFactory sf = new MySSLSocketFactory(trustStore);\n sf.setHostnameVerifier(MySSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n client.setSSLSocketFactory(sf);\n }\n catch (Exception e) {\n }\n */\n\n }", "@Override\n protected String doInBackground(String... arg0) {\n jobj = jsonparser.makeHttpRequest(url);\n try {\n metadata = jobj.getString(TAG_METADATA);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return metadata;\n }", "private HttpClient prepareHttpClient() {\n\t\tHttpClientParams htcParams = new HttpClientParams();\n\t\tmHttpClient = new HttpClient();\n\t\thtcParams.setConnectionManagerTimeout(300000);\n\t\thtcParams.setSoTimeout(300000);\n\t\tmHttpClient.setParams(htcParams);\n\t\treturn mHttpClient;\n\t}", "public interface MethodsHttpUtils {\n HttpResponse doGet(String url, String mediaType) throws AppServerNotAvailableException, IOException;\n HttpResponse doPost(String url, String mediaType, String dataJson) throws UnsupportedEncodingException, ClientProtocolException, AppServerNotAvailableException;\n HttpResponse doDelete(String url, String mediaType) throws AppServerNotAvailableException;\n HttpResponse doPut(String url, String mediaType, String dataJson) throws AppServerNotAvailableException;\n}", "protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse r7) {\n /*\n r6 = this;\n r5 = 1;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"StatusCode=\";\n r0 = r0.append(r1);\n r1 = r7.statusCode;\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = \"infoss\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"code==\";\n r1 = r1.append(r2);\n r2 = r7.statusCode;\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r2 = \"\";\n r0 = r7.statusCode;\n r1 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r0 != r1) goto L_0x013e;\n L_0x003b:\n r0 = org.greenrobot.eventbus.c.a();\n r1 = 3;\n r3 = 0;\n r1 = com.jd.fridge.bean.Event.newEvent(r1, r3);\n r0.c(r1);\n r1 = new java.lang.String;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r7.data;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = r7.headers;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = com.android.volley.toolbox.HttpHeaderParser.parseCharset(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r1.<init>(r0, r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n if (r0 == 0) goto L_0x005e;\n L_0x0059:\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.a(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x005e:\n r0 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = \"jsonStr===\";\n r0 = r0.append(r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.k.a(r0);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"jsonStr==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"gson==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r4 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r3.fromJson(r1, r4);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.fromJson(r1, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders(r7);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = com.android.volley.Response.success(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x00bc:\n return r0;\n L_0x00bd:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=1111111=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n L_0x00e6:\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n r0 = com.android.volley.Response.error(r0);\n goto L_0x00bc;\n L_0x00f0:\n r0 = move-exception;\n r1 = r2;\n L_0x00f2:\n r2 = r6.c;\n if (r2 == 0) goto L_0x00fb;\n L_0x00f6:\n r2 = r6.c;\n r2.a(r1);\n L_0x00fb:\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"JsonSyntaxException=222=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x0114:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=333=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x013e:\n r0 = \"infos\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"response fail: \";\n r1 = r1.append(r2);\n r2 = r7.data;\n r2 = r2.toString();\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"result=\";\n r0 = r0.append(r1);\n r1 = r7.data;\n r1 = r1.toString();\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = r6.f;\n r0.a(r5);\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n com.android.volley.Response.error(r0);\n goto L_0x00e6;\n L_0x0187:\n r0 = move-exception;\n goto L_0x00f2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.jd.fridge.util.a.d.parseNetworkResponse(com.android.volley.NetworkResponse):com.android.volley.Response<T>\");\n }", "public JSONArray getJSONFromUrl(String url) {\n HttpParams httpParameters = new BasicHttpParams();\n // Set the timeout in milliseconds until a connection is established.\n // The default value is zero, that means the timeout is not used.\n int timeoutConnection = 3000;\n HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\n // Set the default socket timeout (SO_TIMEOUT)\n // in milliseconds which is the timeout for waiting for data.\n int timeoutSocket = 5000;\n HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\n\n DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);\n HttpGet httpget = new HttpGet(url);\n\n // Depends on your web service\n httpget.setHeader(\"Content-type\", \"application/json\");\n InputStream inputStream = null;\n String result = null;\n try {\n HttpResponse response = httpclient.execute(httpget);\n HttpEntity entity = response.getEntity();\n\n inputStream = entity.getContent();\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"), 8);\n StringBuilder sb = new StringBuilder();\n\n String line;\n while ((line = reader.readLine()) != null)\n {\n sb.append(line).append(\"\\n\");\n }\n result = sb.toString();\n\n } catch (Exception e) {\n // Oops\n Log.i(TAG,e.toString());\n Log.i(TAG,\"reader read line didn't work\");\n }\n finally {\n try{\n if(inputStream != null)inputStream.close();\n }\n catch(Exception squish){\n Log.i(TAG,squish.toString());\n Log.i(TAG,\"sqish! inputstream did not work!\");\n }\n }\n\n if(result == null){\n Log.i(TAG,\"result was NULL\");\n return null;\n }\n try {\n Log.i(TAG,\"WE fetched this data \"+result);\n\n // Send the url along with article data\n return new JSONArray(result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return null;\n\n }", "@Override\n public void onResponse(String response) {\n }", "public interface HttpClientFactory {\n CloseableHttpClient newHttpClient();\n}", "HttpResponse httpPost(URI uri);", "@Override\n public void onResponse(String response)\n {\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n\tprotected String doInBackground(String... params) {\n\t\t RESTClient request=new RESTClient(getURL());\n\t try {\n\t\t\t\trequest.Execute(RequestMethod.GET);\n\t\t\t\treturn request.getResponse();\n\t\t\t} \n\t catch (Exception e) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t \n\t}", "private HttpClient() {\n\t}", "private HttpUriRequest createHttpRequest(String url, String method,\n\t\t\tList<NameValuePair> params) throws UnsupportedEncodingException {\n\t\tHttpUriRequest request;\n\t\tif (method.toUpperCase().equals(\"GET\")) {\n\t\t\trequest = new HttpGet(url);\n\t\t} else if (method.toUpperCase().equals(\"POST\")) {\n\t\t\tHttpPost post = new HttpPost(url);\n\t\t\tpost.setEntity(new UrlEncodedFormEntity(params));\n\t\t\trequest = post;\n\t\t} else if (method.toUpperCase().equals(\"PUT\")) {\n\t\t\trequest = new HttpPut(url);\n\t\t} else if (method.toUpperCase().equals(\"DELETE\")) {\n\t\t\trequest = new HttpDelete(url);\n\t\t} else {\n\t\t\trequest = new HttpGet();\n\t\t}\n\n\t\treturn request;\n\t}", "@Override\n protected Response<JSONArray> parseNetworkResponse (NetworkResponse response){\n// This thread is on background thread\n// Handle parsing logic here?\n try {\n String jsonString =\n new String(\n response.data,\n HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET));\n JSONArray jsonArray = new JSONArray(jsonString);\n\n// Parse on background thread\n parseResponse(jsonArray);\n\n return Response.success(jsonArray, HttpHeaderParser.parseCacheHeaders(response));\n } catch (UnsupportedEncodingException | JSONException e) {\n return Response.error(new ParseError(e));\n }\n }", "@Override\n protected String doInBackground(String... params) {\n\n String uri = params[0];\n\n BufferedReader bufferedReader = null;\n try {\n URL url = new URL(uri);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();//creating connection\n StringBuilder sb = new StringBuilder();\n\n bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));// getting the json string\n\n String json;\n json = bufferedReader.readLine();\n\n return json.trim(); //returning the json string\n\n }catch(Exception e){\n return null;\n }\n\n }", "GetResponse() {\n\t}", "@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n\r\n }", "public void httpclient(String url){\n\t\t\r\n\t\t\r\n\t\tString httpUrl =BASIC_URL+url;\r\n\t\t\r\n\t\tSystem.out.println(httpUrl);\r\n\t\t\r\n\t\tHttpGet method =new HttpGet(httpUrl);\r\n\t\t\r\n\t\tmethod.setHeader(\"Content-Type\",\"application/json\");\r\n\t\tmethod.setHeader(\"charset\",\"UTF-8\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tCloseableHttpResponse res =client.execute(method,context);\r\n\r\n\t\t AuthState targetAuthState = context.getTargetAuthState();\r\n\t\t System.out.println(\"Target auth state: \" + targetAuthState.getState());\r\n\t\t System.out.println(\"Target auth scheme: \" + targetAuthState.getAuthScheme());\r\n\t\t System.out.println(\"Target auth credentials: \" + targetAuthState.getCredentials());\r\n\t\t\t\r\n\t\t HttpEntity ent =res.getEntity();\r\n\t\t \r\n\t\t if (ent != null) { \r\n System.out.println(\"Response content length: \" + ent.getContentLength()); \r\n System.out.println(ent+\"3214242423\");\r\n \r\n System.out.println(EntityUtils.toString(ent));\r\n } \r\n\t\t \r\n\t\t} catch (IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\npublic void postExecute(HttpResponse r) {\n\t\n}", "private <T> HttpEntity createHttpEntityForJson(T body) {\r\n\t\tString dataForEntity;\r\n\t\tif (!(body instanceof String)) {\r\n\t\t\tdataForEntity = gson.toJson(body);\r\n\t\t} else {\r\n\t\t\tdataForEntity = (String) body;\r\n\t\t}\r\n\t\t// try {\r\n\t\treturn new StringEntity(dataForEntity, Charset.forName(\"utf-8\"));\r\n\t\t// } catch (UnsupportedEncodingException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\t// return null;\r\n\t}", "@Override\n protected String doInBackground(String... params) {\n URL url;\n HttpURLConnection urlConnection = null;\n StringBuilder result = new StringBuilder();\n try {\n url = new URL(params[0]);\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setConnectTimeout(TIMEOUT_MS);\n urlConnection.setReadTimeout(TIMEOUT_MS);\n InputStream in = urlConnection.getInputStream();\n InputStreamReader isw = new InputStreamReader(in);\n\n int data = isw.read();\n while (data != -1) {\n char current = (char) data;\n data = isw.read();\n result.append(current);\n }\n } catch (Exception e) {\n // TODO: Proper logging\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n return result.toString();\n }", "java.lang.String getResponse();", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n void onError(Exception e);\n}", "public interface HttpPoster {\n\n /**\n * Post data to the provided URL.\n *\n * @param url http url to be reached\n * @param headers headers to be sent\n * @param body body to be sent\n * @param mediaType media type definition\n * @return http response from the POST request\n * @throws IOException in case of http request error\n */\n HttpResponse post(URL url, Map<String, String> headers, byte[] body, String mediaType)\n throws IOException;\n}", "private void testHttp() {\n\t\t\n\n\t Thread thread = new Thread(new Runnable(){\n\t\t @Override\n\t\t public void run() {\n\t\t \tHttpClient client = new DefaultHttpClient();\n\t\t\t HttpPost post = new HttpPost(\"http://ec2-54-164-195-102.compute-1.amazonaws.com/api_places/\");\n\t try {\n\t \t\n\t List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);\n\t gpslocation = locationData;\n\t nameValuePairs.add(new BasicNameValuePair(\"gps_location\", gpslocation));\n\t nameValuePairs.add(new BasicNameValuePair(\"access_token\", fbaccesstoken));\n\t if(text_search.getText().toString()!=null){\n\t \t textlocation = text_search.getText().toString();\n\t \t nameValuePairs.add(new BasicNameValuePair(\"text_location\", textlocation));\n\t \t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t}\n\t \n\t\t Log.d(\"JSON\",nameValuePairs.toString());\n\t post.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n\t HttpResponse response = client.execute(post);\n\t Log.d(\"Response\",response.toString());\n\t BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\n\t String line = \"\";\n\t while ((line = rd.readLine()) != null) {\n\t System.out.println(line);\n\t\t Log.d(\"Line\",line);\n\t\t try {\n\t\t JSONObject json= (JSONObject) new JSONTokener(line).nextValue();\n//\t\t JSONObject json2 = json.getJSONObject(\"filename\");\n\t\t filename = (String) json.get(\"filename\");\n\t\t Log.d(\"Test\",filename);\n\t\t } catch (JSONException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t }\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t}\n\t });\n\t thread.start();\n\t try {\n\t\t\tthread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static JSONArray getResponseFromHttpUrl(URL url) throws IOException {\n\n Log.d(TAG, \"sending GET http request\");\n\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(3000);\n urlConnection.setConnectTimeout(5000);\n String result = \"\";\n JSONArray ja = null;\n JSONObject jo = null;\n try {\n InputStream in = urlConnection.getInputStream();\n BufferedReader buffer = new BufferedReader(new InputStreamReader(in));\n String line = \"\";\n while (line != null) {\n line = buffer.readLine();\n result += line;\n }\n\n ja = new JSONArray(result);\n } catch (JSONException e) {\n try {\n jo = new JSONObject(result);\n } catch (JSONException eo) {\n eo.printStackTrace();\n }\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n\n if (jo != null) {\n ja = new JSONArray();\n ja.put(jo);\n }\n return ja;\n }", "public abstract HttpClient.Version version();", "public interface HttpEntity\n{\n\n\tpublic abstract boolean isRepeatable();\n\n\tpublic abstract boolean isChunked();\n\n\tpublic abstract long getContentLength();\n\n\tpublic abstract Header getContentType();\n\n\tpublic abstract Header getContentEncoding();\n\n\tpublic abstract InputStream getContent()\n\t\tthrows IOException, IllegalStateException;\n\n\tpublic abstract void writeTo(OutputStream outputstream)\n\t\tthrows IOException;\n\n\tpublic abstract boolean isStreaming();\n\n\tpublic abstract void consumeContent()\n\t\tthrows IOException;\n}", "public HttpClientHelper() {\n defaultHeaders.put(\"Content-Type\", \"application/json\");\n defaultHeaders.put(\"Accept-Encoding\", \"gzip\");\n\n //postDefaultHeaders.put(\"Content-Type\", \"application/json\");\n //postDefaultHeaders.put(\"Content-Encoding\", \"gzip\");\n\n String key = MessageFormat.format(\"{0}#{1}\", UserUtil.getUserUuid(), UserUtil.getUserId());\n\n //postDefaultHeaders.put(\"X-CLIENT-KEY\", key);\n defaultHeaders.put(\"X-CLIENT-KEY\", key);\n client.setTimeout(3000);\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // if url null, return\n if(url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection= (HttpURLConnection)url.openConnection();\n urlConnection.setReadTimeout(10000/*milliseconds*/);\n urlConnection.setConnectTimeout(15000/*milliseconds*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n Log.v(LOG_TAG,\"Network request made\");\n\n // if the request was successful(response code 200)\n //then read the input stream and parse the output\n if(urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n }\n else{\n Log.e(LOG_TAG,\"Error Response code: \" + urlConnection.getResponseCode());\n }\n }\n catch (IOException e) {\n Log.e(LOG_TAG,\"Problem retrieving the earthquake JSON results\",e);\n }\n finally {\n if(urlConnection != null) {\n urlConnection.disconnect();\n }\n if(inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n //Si la URL es null se devuelve inediatamente.\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(100000 /* Milisegundos.*/);\n urlConnection.setConnectTimeout(100000 /* Milisegundos.*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Si la request se realiza correctamente (código de respuesta 200) se lee el input\n // stream y se le hace parse a la respuesta.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error de conexión: \" + urlConnection.getResponseCode());\n }\n // Aquí simplemente hacemos catch a la IOException.\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problema obteniendo los datos en JSON del servidor\", e);\n // Independientemente de que se lance una exception o no en el bloque finally se realiza\n // una desconexión (o se \"cierra\" como en el caso del inputStream) para poder reusarlo.\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n // Se devuelve como resultado el JsonResponse que albergará la String inputStream.\n return jsonResponse;\n }", "private void onReceivedResponseData(org.apache.http.HttpResponse r14, com.tencent.tmassistantsdk.protocol.jce.DownloadChunkLogInfo r15) {\n /*\n r13 = this;\n r2 = 705; // 0x2c1 float:9.88E-43 double:3.483E-321;\n r6 = 206; // 0xce float:2.89E-43 double:1.02E-321;\n r7 = 0;\n r12 = 0;\n r0 = r14.getEntity();\n r1 = r13.verifyTotalLen(r14, r0);\n if (r1 != 0) goto L_0x0022;\n L_0x0010:\n r0 = \"_DownloadTask\";\n r1 = \"verifyTotalLen false\";\n com.tencent.tmassistantsdk.util.TMLog.i(r0, r1);\n r0 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\n r1 = \"totalLen is not match the requestSize\";\n r0.<init>(r2, r1);\n throw r0;\n L_0x0022:\n r1 = r13.mDownloadInfo;\n r2 = r1.getTotalSize();\n r4 = 0;\n r1 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r1 != 0) goto L_0x015c;\n L_0x002e:\n r1 = r14.getStatusLine();\n r1 = r1.getStatusCode();\n r2 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r1 != r2) goto L_0x00f9;\n L_0x003a:\n r1 = r13.mDownloadInfo;\n r2 = r0.getContentLength();\n r1.setTotalSize(r2);\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"HTTPCode 200, totalBytes:\";\n r2.<init>(r3);\n r3 = r13.mDownloadInfo;\n r4 = r3.getTotalSize();\n r2 = r2.append(r4);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.i(r1, r2);\n L_0x005f:\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"first start downloadinfoTotalSize = \";\n r2.<init>(r3);\n r3 = r13.mDownloadInfo;\n r4 = r3.getTotalSize();\n r2 = r2.append(r4);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r2);\n r1 = \"content-range\";\n r1 = r14.getFirstHeader(r1);\n if (r1 == 0) goto L_0x00a0;\n L_0x0084:\n r1 = r1.getValue();\n r1 = com.tencent.tmassistantsdk.downloadservice.ByteRange.parseContentRange(r1);\n r2 = r1.getStart();\n r15.responseRangePosition = r2;\n r2 = r1.getEnd();\n r4 = r1.getStart();\n r2 = r2 - r4;\n r4 = 1;\n r2 = r2 + r4;\n r15.responseRangeLength = r2;\n L_0x00a0:\n r1 = r13.mDownloadInfo;\n r2 = r1.getTotalSize();\n r15.responseContentLength = r2;\n L_0x00a8:\n r1 = r13.mSaveFile;\n if (r1 != 0) goto L_0x00bb;\n L_0x00ac:\n r1 = new com.tencent.tmassistantsdk.storage.TMAssistantFile;\n r2 = r13.mDownloadInfo;\n r2 = r2.mTempFileName;\n r3 = r13.mDownloadInfo;\n r3 = r3.mFileName;\n r1.<init>(r2, r3);\n r13.mSaveFile = r1;\n L_0x00bb:\n r2 = 0;\n r10 = r0.getContent();\t Catch:{ SocketException -> 0x0406 }\n r0 = \"_DownloadTask\";\n r1 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x0406 }\n r4 = \"start write file, fileName: \";\n r1.<init>(r4);\t Catch:{ SocketException -> 0x0406 }\n r4 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x0406 }\n r4 = r4.mFileName;\t Catch:{ SocketException -> 0x0406 }\n r1 = r1.append(r4);\t Catch:{ SocketException -> 0x0406 }\n r1 = r1.toString();\t Catch:{ SocketException -> 0x0406 }\n com.tencent.tmassistantsdk.util.TMLog.i(r0, r1);\t Catch:{ SocketException -> 0x0406 }\n r8 = r2;\n L_0x00dc:\n r0 = r13.mRecvBuf;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = r10.read(r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r3 <= 0) goto L_0x00eb;\n L_0x00e4:\n r0 = r13.mStopTask;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 == 0) goto L_0x0262;\n L_0x00e8:\n r10.close();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x00eb:\n r0 = r13.mSaveFile;\n if (r0 == 0) goto L_0x00f6;\n L_0x00ef:\n r0 = r13.mSaveFile;\n r0.close();\n r13.mSaveFile = r12;\n L_0x00f6:\n r15.receiveDataSize = r8;\n return;\n L_0x00f9:\n r1 = r14.getStatusLine();\n r1 = r1.getStatusCode();\n if (r1 != r6) goto L_0x0135;\n L_0x0103:\n r1 = \"content-range\";\n r1 = r14.getFirstHeader(r1);\n r2 = r13.mDownloadInfo;\n r1 = r1.getValue();\n r4 = com.tencent.tmassistantsdk.downloadservice.ByteRange.getTotalSize(r1);\n r2.setTotalSize(r4);\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"HTTPCode 206, totalBytes:\";\n r2.<init>(r3);\n r3 = r13.mDownloadInfo;\n r4 = r3.getTotalSize();\n r2 = r2.append(r4);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.i(r1, r2);\n goto L_0x005f;\n L_0x0135:\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"statusCode=\";\n r2.<init>(r3);\n r3 = r14.getStatusLine();\n r3 = r3.getStatusCode();\n r2 = r2.append(r3);\n r3 = \" onReceivedResponseData error.\";\n r2 = r2.append(r3);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r2);\n goto L_0x005f;\n L_0x015c:\n r1 = r14.getStatusLine();\n r1 = r1.getStatusCode();\n if (r1 != r6) goto L_0x00a8;\n L_0x0166:\n r1 = \"content-range\";\n r1 = r14.getFirstHeader(r1);\t Catch:{ Throwable -> 0x0214 }\n r2 = r1.getValue();\t Catch:{ Throwable -> 0x0214 }\n r2 = com.tencent.tmassistantsdk.downloadservice.ByteRange.parseContentRange(r2);\t Catch:{ Throwable -> 0x0214 }\n r3 = r1.getValue();\t Catch:{ Throwable -> 0x0214 }\n r4 = com.tencent.tmassistantsdk.downloadservice.ByteRange.getTotalSize(r3);\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r15.responseRangePosition = r8;\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getEnd();\t Catch:{ Throwable -> 0x0214 }\n r10 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r8 = r8 - r10;\n r10 = 1;\n r8 = r8 + r10;\n r15.responseRangeLength = r8;\t Catch:{ Throwable -> 0x0214 }\n r15.responseContentLength = r4;\t Catch:{ Throwable -> 0x0214 }\n r3 = \"_DownloadTask\";\n r6 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r8 = \"totalSize = \";\n r6.<init>(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r4);\t Catch:{ Throwable -> 0x0214 }\n r8 = \" downloadinfoTotalSize = \";\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r8 = r8.getTotalSize();\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.w(r3, r6);\t Catch:{ Throwable -> 0x0214 }\n r3 = \"_DownloadTask\";\n r6 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r8 = \"mReceivedBytes = \";\n r6.<init>(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r8 = r8.mReceivedBytes;\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.i(r3, r6);\t Catch:{ Throwable -> 0x0214 }\n r3 = \"_DownloadTask\";\n r6 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r8 = \"start = \";\n r6.<init>(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = \", end = \";\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getEnd();\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.i(r3, r6);\t Catch:{ Throwable -> 0x0214 }\n r2 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r6 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r8 = r6.mReceivedBytes;\t Catch:{ Throwable -> 0x0214 }\n r2 = (r2 > r8 ? 1 : (r2 == r8 ? 0 : -1));\n if (r2 == 0) goto L_0x022a;\n L_0x0209:\n r0 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ Throwable -> 0x0214 }\n r1 = 706; // 0x2c2 float:9.9E-43 double:3.49E-321;\n r2 = \"The received size is not equal with ByteRange.\";\n r0.<init>(r1, r2);\t Catch:{ Throwable -> 0x0214 }\n throw r0;\t Catch:{ Throwable -> 0x0214 }\n L_0x0214:\n r0 = move-exception;\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ all -> 0x021d }\n r2 = 704; // 0x2c0 float:9.87E-43 double:3.48E-321;\n r1.<init>(r2, r0);\t Catch:{ all -> 0x021d }\n throw r1;\t Catch:{ all -> 0x021d }\n L_0x021d:\n r0 = move-exception;\n r1 = r13.mSaveFile;\n if (r1 == 0) goto L_0x0229;\n L_0x0222:\n r1 = r13.mSaveFile;\n r1.close();\n r13.mSaveFile = r12;\n L_0x0229:\n throw r0;\n L_0x022a:\n r2 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r2 = r2.getTotalSize();\t Catch:{ Throwable -> 0x0214 }\n r2 = (r4 > r2 ? 1 : (r4 == r2 ? 0 : -1));\n if (r2 == 0) goto L_0x023f;\n L_0x0234:\n r0 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ Throwable -> 0x0214 }\n r1 = 705; // 0x2c1 float:9.88E-43 double:3.483E-321;\n r2 = \"The total size is not equal with ByteRange.\";\n r0.<init>(r1, r2);\t Catch:{ Throwable -> 0x0214 }\n throw r0;\t Catch:{ Throwable -> 0x0214 }\n L_0x023f:\n r2 = \"_DownloadTask\";\n r3 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r4 = \"response ByteRange: \";\n r3.<init>(r4);\t Catch:{ Throwable -> 0x0214 }\n r1 = r3.append(r1);\t Catch:{ Throwable -> 0x0214 }\n r1 = r1.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.d(r2, r1);\t Catch:{ Throwable -> 0x0214 }\n r1 = r13.mSaveFile;\n if (r1 == 0) goto L_0x00a8;\n L_0x0259:\n r1 = r13.mSaveFile;\n r1.close();\n r13.mSaveFile = r12;\n goto L_0x00a8;\n L_0x0262:\n r0 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = (long) r3;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0 + r4;\n r2 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r2.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1));\n if (r2 > 0) goto L_0x03be;\n L_0x0272:\n r2 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r2.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1));\n if (r0 != 0) goto L_0x0315;\n L_0x027c:\n r6 = 1;\n L_0x027d:\n r0 = r13.mSaveFile;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mRecvBuf;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 0;\n r4 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r4.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.write(r1, r2, r3, r4, r6);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 != 0) goto L_0x03b4;\n L_0x028c:\n r0 = com.tencent.tmassistantsdk.storage.TMAssistantFile.getSavePathRootDir();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = com.tencent.tmassistantsdk.downloadservice.DownloadHelper.isSpaceEnough(r0, r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 == 0) goto L_0x0367;\n L_0x029c:\n r0 = com.tencent.tmassistantsdk.storage.TMAssistantFile.isSDCardExistAndCanWrite();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 == 0) goto L_0x0318;\n L_0x02a2:\n r0 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"write file failed, fileName: \";\n r0.<init>(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r1.mFileName;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" receivedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" readedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" totalSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"_DownloadTask\";\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 703; // 0x2bf float:9.85E-43 double:3.473E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x02ef:\n r0 = move-exception;\n r2 = r8;\n L_0x02f1:\n r1 = \"_DownloadTask\";\n r4 = \"\";\n r5 = 0;\n r5 = new java.lang.Object[r5];\t Catch:{ all -> 0x0305 }\n com.tencent.mm.sdk.platformtools.w.printErrStackTrace(r1, r0, r4, r5);\t Catch:{ all -> 0x0305 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ all -> 0x0305 }\n r4 = 605; // 0x25d float:8.48E-43 double:2.99E-321;\n r1.<init>(r4, r0);\t Catch:{ all -> 0x0305 }\n throw r1;\t Catch:{ all -> 0x0305 }\n L_0x0305:\n r0 = move-exception;\n r8 = r2;\n L_0x0307:\n r1 = r13.mSaveFile;\n if (r1 == 0) goto L_0x0312;\n L_0x030b:\n r1 = r13.mSaveFile;\n r1.close();\n r13.mSaveFile = r12;\n L_0x0312:\n r15.receiveDataSize = r8;\n throw r0;\n L_0x0315:\n r6 = r7;\n goto L_0x027d;\n L_0x0318:\n r0 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"write file failed, no sdCard! fileName: \";\n r0.<init>(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r1.mFileName;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" receivedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" readedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" totalSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"_DownloadTask\";\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 711; // 0x2c7 float:9.96E-43 double:3.513E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x0365:\n r0 = move-exception;\n goto L_0x0307;\n L_0x0367:\n r0 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"write file failed, no enough space! fileName: \";\n r0.<init>(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r1.mFileName;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" receivedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" readedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" totalSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"_DownloadTask\";\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 710; // 0x2c6 float:9.95E-43 double:3.51E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x03b4:\n r0 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = (long) r3;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0.updateReceivedSize(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = (long) r3;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r8 = r8 + r0;\n goto L_0x00dc;\n L_0x03be:\n r0 = \"write file size too long.\";\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = \"write file size too long.\\r\\nreadedLen: \";\n r2.<init>(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = \"\\r\\nreceivedSize: \";\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r3.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = \"\\r\\ntotalSize: \";\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r3.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = \"\\r\\nisTheEndData: false\";\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 703; // 0x2bf float:9.85E-43 double:3.473E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x0406:\n r0 = move-exception;\n goto L_0x02f1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.tmassistantsdk.downloadservice.DownloadTask.onReceivedResponseData(org.apache.http.HttpResponse, com.tencent.tmassistantsdk.protocol.jce.DownloadChunkLogInfo):void\");\n }", "public interface HttpCallbackListener {\n void onFinish(String response);\n\n void onError(Exception e);\n}", "public interface HttpCallbackListener {\n void onFinish(String response);\n\n void onError(Exception e);\n}", "private void setupHttpConnectionStuff() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n try {\n final File httpCacheDir = new File(getCacheDir(), \"http\");\n HttpResponseCache.install(httpCacheDir, TEN_MEGABYTES);\n } catch (IOException ioe) {\n Log.e(Constants.LOG_TAG, \"Could not install http cache on this device.\");\n }\n }\n }", "@Override\r\n\t\tprotected String doInBackground(String... params) {\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tresponse=hclient.execute(p);\r\n\t\t\t\t\r\n\t\t\t\tin=response.getEntity().getContent();\r\n\t\t\t\t\r\n\t\t\t\tStringBuilder stringBuilder=new StringBuilder();\r\n\t\t\t\t\r\n\t\t\t\tint b;\r\n\t\t\t\twhile(( b = in.read() )!= -1){\r\n\t\t \tstringBuilder.append((char)b);\r\n\t\t \t\r\n\t\t }\r\n\t\t\t\t\r\n\t\t\t\t\tLog.d(\"AsynClass\", \"Stringbuilder done\");\r\n\t\t\t\t\tbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\t\t\t\tdoc = builder.parse(new InputSource(new StringReader(stringBuilder.toString())));\r\n\t\t\t\t\tNodeList result=doc.getElementsByTagName(\"item\");\r\n\t\t\t\t\tNode node;\t\r\n\t\t\t\t\tfor(int i=0;i<result.getLength();i++){\r\n\t\t\t\t\t\tnode=result.item(i);\r\n\t\t\t\t\t\t getElementValue(node,i);\r\n\t\t\t\t\t\tLog.d(\"AsyncClass\", \"Got Value\"+i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfailureFlag=1;\r\n\t\t\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tfailureFlag=0;\r\n\t\t\t\terror=e.getMessage();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}", "public HttpEntity openHttpEntity(URL url) throws IOException {\r\n Logger.getLogger(TargetAuthenticationStrategy.class).setLevel(Level.ERROR);\r\n Logger.getLogger(RequestTargetAuthentication.class).setLevel(Level.ERROR);\r\n DefaultHttpClient httpclient = new DefaultHttpClient();\r\n\r\n for (Cookie cookie : cookies) {\r\n httpclient.getCookieStore().addCookie(cookie);\r\n }\r\n\r\n httpclient.getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);\r\n\r\n if (socketTimeout > -1) {\r\n httpclient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, socketTimeout);\r\n }\r\n if (connectionTimeout > -1) {\r\n httpclient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, connectionTimeout);\r\n }\r\n\r\n String domain = this.domain;\r\n String username = this.username;\r\n String password = this.password;\r\n if (serviceAccountPropertiesFileName != null) {\r\n Properties serviceAccountProperties = new Properties();\r\n if (new File(serviceAccountPropertiesFileName).exists()) {\r\n serviceAccountProperties.load(new FileReader(serviceAccountPropertiesFileName));\r\n } else {\r\n try {\r\n serviceAccountProperties.load(this.getClass().getResourceAsStream(serviceAccountPropertiesFileName));\r\n } catch (Exception e) {\r\n }\r\n }\r\n domain = serviceAccountProperties.getProperty(\"http.serviceaccount.domain\", domain);\r\n username = serviceAccountProperties.getProperty(\"http.serviceaccount.username\", username);\r\n password = serviceAccountProperties.getProperty(\"http.serviceaccount.password\", password);\r\n }\r\n\r\n if (username != null && password != null) {\r\n String decryptedPassword = password;\r\n try {\r\n decryptedPassword = new StringEncrypter().decrypt(password);\r\n } catch (Exception e) {\r\n }\r\n NTCredentials creds = new NTCredentials(username, decryptedPassword, getCanonicalHostName()[0], domain);\r\n httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, creds);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.SPNEGO);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.KERBEROS);\r\n }\r\n HttpHost target = new HttpHost(url.getHost(), url.getPort(), url.getProtocol());\r\n HttpContext localContext = new BasicHttpContext();\r\n HttpGet httpGet = new HttpGet(url.getFile());\r\n HttpResponse httpResponse = httpclient.execute(target, httpGet, localContext);\r\n this.lastStatusLine = httpResponse.getStatusLine();\r\n lastCookies = httpclient.getCookieStore().getCookies();\r\n\r\n return httpResponse.getEntity();\r\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the Guardian JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public StatusLine testHttpEntity(URL url) throws IOException {\r\n Logger.getLogger(TargetAuthenticationStrategy.class).setLevel(Level.ERROR);\r\n Logger.getLogger(RequestTargetAuthentication.class).setLevel(Level.ERROR);\r\n DefaultHttpClient httpclient = new DefaultHttpClient();\r\n\r\n httpclient.getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);\r\n\r\n String domain = this.domain;\r\n String username = this.username;\r\n String password = this.password;\r\n if (serviceAccountPropertiesFileName != null) {\r\n Properties serviceAccountProperties = new Properties();\r\n if (new File(serviceAccountPropertiesFileName).exists()) {\r\n serviceAccountProperties.load(new FileReader(serviceAccountPropertiesFileName));\r\n } else {\r\n try {\r\n serviceAccountProperties.load(this.getClass().getResourceAsStream(serviceAccountPropertiesFileName));\r\n } catch (Exception e) {\r\n }\r\n }\r\n domain = serviceAccountProperties.getProperty(\"http.serviceaccount.domain\", domain);\r\n username = serviceAccountProperties.getProperty(\"http.serviceaccount.username\", username);\r\n password = serviceAccountProperties.getProperty(\"http.serviceaccount.password\", password);\r\n }\r\n\r\n if (username != null && password != null) {\r\n String decryptedPassword = password;\r\n try {\r\n decryptedPassword = new StringEncrypter().decrypt(password);\r\n } catch (Exception e) {\r\n }\r\n NTCredentials creds = new NTCredentials(username, decryptedPassword, getCanonicalHostName()[0], domain);\r\n httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, creds);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.SPNEGO);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.KERBEROS);\r\n }\r\n HttpHost target = new HttpHost(url.getHost(), url.getPort(), url.getProtocol());\r\n HttpContext localContext = new BasicHttpContext();\r\n HttpGet httpGet = new HttpGet(url.getFile());\r\n HttpResponse httpResponse = httpclient.execute(target, httpGet, localContext);\r\n StatusLine lastStatusLine = httpResponse.getStatusLine();\r\n httpGet.releaseConnection();\r\n\r\n return (this.lastStatusLine = lastStatusLine);\r\n }", "protected R a(com.sds.android.sdk.lib.a.a.a r7) {\n /*\n r6 = this;\n if (r7 != 0) goto L_0x000b;\n L_0x0002:\n r0 = \"Request\";\n r1 = \"Http request result is null, stop parse.\";\n com.sds.android.sdk.lib.util.g.c(r0, r1);\n r0 = 0;\n L_0x000a:\n return r0;\n L_0x000b:\n r1 = r6.h();\n r0 = r7.c();\n r1.setCode(r0);\n r0 = \"Location\";\n r0 = r7.a(r0);\n r1.setLocation(r0);\n r0 = r7.e();\t Catch:{ Exception -> 0x007b }\n r0 = com.sds.android.sdk.lib.util.m.a(r0);\t Catch:{ Exception -> 0x007b }\n r2 = \"Request\";\n r3 = \"TEST: jsonString %s\";\n r4 = 1;\n r4 = new java.lang.Object[r4];\t Catch:{ Exception -> 0x007b }\n r5 = 0;\n r4[r5] = r0;\t Catch:{ Exception -> 0x007b }\n com.sds.android.sdk.lib.util.g.a(r2, r3, r4);\t Catch:{ Exception -> 0x007b }\n r2 = r6.h;\t Catch:{ Exception -> 0x007b }\n if (r2 == 0) goto L_0x003e;\n L_0x0038:\n r2 = r6.h;\t Catch:{ Exception -> 0x007b }\n r0 = r2.a(r0);\t Catch:{ Exception -> 0x007b }\n L_0x003e:\n r1.setContent(r0);\t Catch:{ Exception -> 0x007b }\n r2 = r6.i;\t Catch:{ Exception -> 0x007b }\n r0 = r2.b(r0);\t Catch:{ Exception -> 0x007b }\n r0 = (com.sds.android.sdk.lib.b.b) r0;\t Catch:{ Exception -> 0x007b }\n if (r0 == 0) goto L_0x006d;\n L_0x004b:\n r2 = r1.getCode();\t Catch:{ Exception -> 0x007b }\n r0.setCode(r2);\t Catch:{ Exception -> 0x007b }\n r2 = r1.getLocation();\t Catch:{ Exception -> 0x007b }\n r0.setLocation(r2);\t Catch:{ Exception -> 0x007b }\n r2 = r1.getContent();\t Catch:{ Exception -> 0x007b }\n r0.setContent(r2);\t Catch:{ Exception -> 0x007b }\n r1 = r7.e();\t Catch:{ Exception -> 0x0068 }\n r1.close();\t Catch:{ Exception -> 0x0068 }\n goto L_0x000a;\n L_0x0068:\n r1 = move-exception;\n r1.printStackTrace();\n goto L_0x000a;\n L_0x006d:\n r0 = r7.e();\t Catch:{ Exception -> 0x0076 }\n r0.close();\t Catch:{ Exception -> 0x0076 }\n L_0x0074:\n r0 = r1;\n goto L_0x000a;\n L_0x0076:\n r0 = move-exception;\n r0.printStackTrace();\n goto L_0x0074;\n L_0x007b:\n r0 = move-exception;\n r0.printStackTrace();\t Catch:{ all -> 0x008c }\n r0 = r7.e();\t Catch:{ Exception -> 0x0087 }\n r0.close();\t Catch:{ Exception -> 0x0087 }\n goto L_0x0074;\n L_0x0087:\n r0 = move-exception;\n r0.printStackTrace();\n goto L_0x0074;\n L_0x008c:\n r0 = move-exception;\n r1 = r7.e();\t Catch:{ Exception -> 0x0095 }\n r1.close();\t Catch:{ Exception -> 0x0095 }\n L_0x0094:\n throw r0;\n L_0x0095:\n r1 = move-exception;\n r1.printStackTrace();\n goto L_0x0094;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.sds.android.sdk.lib.b.l.a(com.sds.android.sdk.lib.a.a$a):R\");\n }", "private static String makeHttpRequest(URL newsUrl) throws IOException{\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (newsUrl == null) {\n //returns no data\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n //Create the connection\n try {\n urlConnection = (HttpURLConnection) newsUrl.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n //Establish an HTTP connection with the server\n urlConnection.connect();\n\n //Test to see what response we get\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200){\n //Valid connection\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(TAG, \"makeHttpRequest: Error Code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e){\n Log.e(TAG, \"makeHttpRequest: Problem retrieving the news JSON results\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null){\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies than an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public static void m7909b(java.net.HttpURLConnection r10, @androidx.annotation.Nullable java.lang.String r11, @androidx.annotation.NonNull java.lang.String r12, @androidx.annotation.NonNull java.lang.String r13) {\n /*\n java.io.InputStream r0 = r10.getErrorStream()\n r1 = 0\n r2 = 2\n r3 = 1\n r4 = 0\n r5 = 3\n if (r0 != 0) goto L_0x000c\n goto L_0x0050\n L_0x000c:\n java.io.BufferedReader r6 = new java.io.BufferedReader\n java.io.InputStreamReader r7 = new java.io.InputStreamReader\n java.nio.charset.Charset r8 = f8009f\n r7.<init>(r0, r8)\n r6.<init>(r7)\n java.lang.StringBuilder r0 = new java.lang.StringBuilder // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r0.<init>() // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n L_0x001d:\n java.lang.String r7 = r6.readLine() // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n if (r7 == 0) goto L_0x002c\n r0.append(r7) // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r7 = 10\n r0.append(r7) // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n goto L_0x001d\n L_0x002c:\n java.lang.String r7 = \"Error when communicating with the Firebase Installations server API. HTTP response: [%d %s: %s]\"\n java.lang.Object[] r8 = new java.lang.Object[r5] // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n int r9 = r10.getResponseCode() // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9) // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r8[r4] = r9 // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n java.lang.String r10 = r10.getResponseMessage() // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r8[r3] = r10 // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r8[r2] = r0 // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n java.lang.String r10 = java.lang.String.format(r7, r8) // Catch:{ IOException -> 0x004d, all -> 0x0048 }\n r1 = r10\n goto L_0x004d\n L_0x0048:\n r10 = move-exception\n r6.close() // Catch:{ IOException -> 0x004c }\n L_0x004c:\n throw r10\n L_0x004d:\n r6.close() // Catch:{ IOException -> 0x0050 }\n L_0x0050:\n boolean r10 = android.text.TextUtils.isEmpty(r1)\n if (r10 != 0) goto L_0x007b\n java.lang.String r10 = \"Firebase-Installations\"\n android.util.Log.w(r10, r1)\n java.lang.Object[] r0 = new java.lang.Object[r5]\n r0[r4] = r12\n r0[r3] = r13\n boolean r12 = android.text.TextUtils.isEmpty(r11)\n if (r12 == 0) goto L_0x006a\n java.lang.String r11 = \"\"\n goto L_0x0070\n L_0x006a:\n java.lang.String r12 = \", \"\n java.lang.String r11 = p005b.p035e.p036a.p037a.C0843a.m451l(r12, r11)\n L_0x0070:\n r0[r2] = r11\n java.lang.String r11 = \"Firebase options used while communicating with Firebase server APIs: %s, %s%s\"\n java.lang.String r11 = java.lang.String.format(r11, r0)\n android.util.Log.w(r10, r11)\n L_0x007b:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p180d.p216x.p219n.C4312c.m7909b(java.net.HttpURLConnection, java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public String getContentByUrl(HttpClient httpClient, String url) {\n\t\tHttpEntity resEntity = null;\n\t\t\n\t\tHttpResponse response = null;\n\n\t\ttry {\n\n\t\t\tHttpGet httpget = new HttpGet(url);\n\n\t\t\tresponse = httpClient.execute(httpget);\n\n\t\t\tint status = response.getStatusLine().getStatusCode();\n\n\t\t\tif (status == HttpStatus.SC_OK) {\n\n\t\t\t\t// get reponse content type\n\t\t\t\tHeader header = response.getFirstHeader(\"Content-Type\");\n\t\t\t\tString contentType = header.getValue();\n\n\t\t\t\tif (contentType != null && contentType.startsWith(\"image/\")) {\n\t\t\t\t\t// if get an image response, return the url\n\t\t\t\t\treturn url;\n\t\t\t\t}\n\n\t\t\t\tresEntity = response.getEntity();\n\n//\t\t\t\tif(sm.encode != null && sm.encode.equals(\"\")){\n//\t\t\t\t\tsm.encode = null;\n//\t\t\t\t}\n//\t\t\t\tif (sm.encode == null\n//\t\t\t\t\t\t&& (resEntity.getContentEncoding() != null || resEntity\n//\t\t\t\t\t\t\t\t.getContentType() != null)) {\n//\t\t\t\t\tif (resEntity.getContentEncoding() != null) {\n//\t\t\t\t\t\tsm.encode = resEntity.getContentEncoding().getValue();\n//\t\t\t\t\t} else {\n//\n//\t\t\t\t\t\tHeaderElement[] eles = resEntity.getContentType()\n//\t\t\t\t\t\t\t\t.getElements();\n//\t\t\t\t\t\tfor (HeaderElement ele : eles) {\n//\t\t\t\t\t\t\tfor (NameValuePair para : ele.getParameters()) {\n//\t\t\t\t\t\t\t\tif (\"charset\".equals(para.getName())) {\n//\t\t\t\t\t\t\t\t\tsm.encode = para.getValue();\n//\t\t\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tif (sm.encode != null) {\n//\t\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n\n\t\t\t\tif(sm.encode != null && !sm.encode.equals(\"\")){\n\t\t\t\treturn EntityUtils.toString(resEntity, sm.encode);\n\t\t\t\t}else{\n\t\t\t\t\treturn EntityUtils.toString(resEntity, \"utf-8\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (OutOfMemoryError e) {\n\t\t} catch (NullPointerException ne) {\n\t\t\tne.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\tif( response.getEntity() != null ) {\n\t\t\ttry {\n\t\t\t\tEntityUtils.consume(response.getEntity());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn null;\n\t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the earthquake JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies than an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n HttpURLConnection urlConnection = null;\n\n try {\n URL data = new URL(url);\n urlConnection = (HttpURLConnection) data.openConnection();\n\n int responseCode = urlConnection.getResponseCode();\n\n if (responseCode == HttpURLConnection.HTTP_OK) {\n\n readJsonStream(urlConnection.getInputStream());\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n urlConnection.disconnect();\n return null;\n }", "public interface HttpRequestService {\n\n String get(String url,HashMap<String,String> params) throws IOException;\n\n String get(String url) throws IOException;\n\n String post(String url,HashMap<String,String> params) throws Exception;\n\n}", "public static String getHTTP(String urlToRead) throws Exception {\n // reference: https://stackoverflow.com/questions/34691175/how-to-send-httprequest-and-get-json-response-in-android/34691486\n HttpClient httpclient = new DefaultHttpClient();\n HttpGet httpget = new HttpGet(urlToRead);\n\n HttpResponse response = httpclient.execute(httpget);\n\n if (response.getStatusLine().getStatusCode() == 200) {\n String server_response = EntityUtils.toString(response.getEntity());\n return server_response;\n } else {\n System.out.println(\"no response from server\");\n }\n return \"\";\n }", "private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }", "private static String parseResponse(HttpResponse response) throws Exception {\r\n \t\tString result = null;\r\n \t\tBufferedReader reader = null;\r\n \t\ttry {\r\n \t\t\tHeader contentEncoding = response\r\n \t\t\t\t\t.getFirstHeader(\"Content-Encoding\");\r\n \t\t\tif (contentEncoding != null\r\n \t\t\t\t\t&& contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(\r\n \t\t\t\t\t\tnew GZIPInputStream(response.getEntity().getContent())));\r\n \t\t\t} else {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(response\r\n \t\t\t\t\t\t.getEntity().getContent()));\r\n \t\t\t}\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tString line = null;\r\n \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\tresult = sb.toString();\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\treader.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn result;\r\n \t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n protected String doInBackground(String... strings) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(strings[0]);\n InputStreamReader inputStream = new InputStreamReader(url.openConnection().getInputStream());\n BufferedReader bufferedReader = new BufferedReader(inputStream);\n String line = \"\" ;\n while ((line = bufferedReader.readLine()) != null) {\n content.append(line);\n }\n bufferedReader.close();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return content.toString();\n }", "private static String facebookGetMethod(String url){\r\n System.out.println(\"@executing facebookGetMethod():\" + url);\r\n String responseStr = null;\r\n \r\n try {\r\n HttpGet loginGet = new HttpGet(url);\r\n HttpResponse response = httpClient.execute(loginGet);\r\n HttpEntity entity = response.getEntity();\r\n \r\n System.out.println(\"facebookGetMethod: \" + response.getStatusLine());\r\n if (entity != null) {\r\n responseStr = EntityUtils.toString(entity);\r\n entity.consumeContent();\r\n }\r\n \r\n int statusCode = response.getStatusLine().getStatusCode();\r\n\r\n /**\r\n * @fixme I am not sure if 200 is the only code that \r\n * means \"success\"\r\n */\r\n if(statusCode != 200){\r\n //error occured\r\n System.out.println(\"Error Occured! Status Code = \" + statusCode);\r\n responseStr = null;\r\n }\r\n System.out.println(\"Get Method done(\" + statusCode+\"), response string length: \" + (responseStr==null? 0:responseStr.length()));\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return responseStr;\r\n }", "@Override\n protected String doInBackground(String... strings) {\n String response = \"\";\n try {\n URL url = new URL(strings[0]);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setRequestMethod(\"GET\");\n con.setConnectTimeout(5000);\n con.setReadTimeout(5000);\n con.connect();\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n\n String inputLine;\n StringBuffer content = new StringBuffer();\n while ((inputLine = in.readLine()) != null) {\n content.append(inputLine);\n }\n in.close();\n response = content.toString();\n parseValuesFromResponse(response, strings[1]);\n } catch (Exception e){\n e.printStackTrace();\n }\n return null;\n }", "private static String postResponseFromHttpUrl(URL url, JSONObject postJson) throws IOException {\n\n Log.d(TAG, \"sending POST http request\");\n\n StringBuffer response = new StringBuffer();\n HttpURLConnection urlConnection = null;\n String responseJSON;\n int status = 200;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"POST\");\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestProperty(\"Content-Type\",\"application/json\");\n urlConnection.setDoInput(true);\n urlConnection.setDoOutput(true);\n\n // send json string\n DataOutputStream os = new DataOutputStream(urlConnection.getOutputStream());\n os.writeBytes(postJson.toString());\n os.flush();\n os.close();\n\n status = urlConnection.getResponseCode();\n\n } catch (IOException e){\n e.printStackTrace();\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n\n if (status != 200) {\n throw new IOException(\"Post failed with error code \" + status);\n } else {\n BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n }\n\n // json response string\n responseJSON = response.toString();\n\n return responseJSON;\n }", "public interface HttpCallbackListener {\n void onFinish(String responde);\n void onError(Exception e);\n}", "private static OkHttpClient m35241c() {\n return new OkHttpClient();\n }", "public static String makeHTTPRequest(URL url, Context context) throws IOException {\n // If the url is empty, return early\n String jsonResponse = null;\n if (url == null) {\n return jsonResponse;\n }\n final Context mContext = context;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful, the response code should be 200. Read the input stream and\n // parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromInputStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n //use a handler to create a toast on the UI thread\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(mContext, \"Error: Issue with fetching JSON results from Guardian API.\", Toast\n .LENGTH_SHORT)\n .show();\n }\n });\n\n Log.e(LOG_TAG, \"Error: Issue with fetching JSON results from Guardian API. \", e);\n } finally {\n // Close connection\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n // Close stream\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public RequestHandle get(final int requestID, final String[] arr, final HashMap<String, String> headerMap, final Context context, final String url,\n final ResponseHandler responseHandler,\n boolean showLoadingIndicator, IndicatorStyle style) {\n\n RequestHandle rQ = null;\n if (showLoadingIndicator) {\n progressDialog = new ProgressDialog(context, style).show();\n }\n\n switch (NetworkUtil.getConnectivityStatus(context)) {\n case OFFLINE:\n responseHandler.onRequestFinished(requestID, RequestStatus.NO_CONNECTION, 0, null);\n try {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n } catch (Exception e) {\n\n }\n\n break;\n case WIFI_CONNECTED_WITHOUT_INTERNET:\n responseHandler.onRequestFinished(requestID, RequestStatus.NO_INTERNET, 0, null);\n try {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n } catch (Exception e) {\n\n }\n break;\n case MOBILE_DATA_CONNECTED:\n case WIFI_CONNECTED_WITH_INTERNET:\n\n if (headerMap != null) {\n\n\n Iterator myVeryOwnIterator = headerMap.keySet().iterator();\n while (myVeryOwnIterator.hasNext()) {\n String key = (String) myVeryOwnIterator.next();\n String value = (String) headerMap.get(key);\n client.addHeader(key, value);\n // Toast.makeText(ctx, \"Key: \"+key+\" Value: \"+value, Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n rQ = client.get(url, new AsyncHttpResponseHandler() {\n\n @Override\n public void onStart() {\n Log.v(\"URL\", url);\n\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n // Header[] header=headers;\n\n if (responseBody != null) {\n String response = new String(responseBody);\n Log.v(\"Response\", response + \"\");\n // Log.e(\"statuescode\", statusCode + \"\");\n responseHandler.onRequestSucess(requestID, arr,\n RequestStatus.SUCCEED, statusCode, response);\n } else {\n responseHandler.onRequestFinished(requestID,\n RequestStatus.SUCCEED, statusCode, null);\n // Log.e(\"statuescode\",statusCode+\"\");\n\n }\n\n try {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n } catch (Exception e) {\n\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers,\n byte[] responseBody, Throwable error) {\n error.printStackTrace();\n Header[] header=headers;\n if (responseBody != null) {\n String response = new String(responseBody);\n Log.v(\"Response\", response + \"\");\n responseHandler.onRequestFinished(requestID,\n RequestStatus.FAILED, statusCode, response);\n } else {\n responseHandler.onRequestFinished(requestID,\n RequestStatus.FAILED, statusCode, null);\n }\n\n try {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n } catch (Exception e) {\n\n }\n }\n });\n // rQ.cancel(true);\n break;\n }\n return rQ;\n }", "public String doInBackground(String... args) {\n try {\n\n //create a URL object of what server to contact:\n URL url = new URL(args[0]);\n publishProgress(25);\n\n //open the connection\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n publishProgress(50);\n //wait for data:\n InputStream response = urlConnection.getInputStream();\n\n //JSON reading: Look at slide 26\n //Build the entire string response:\n BufferedReader reader = new BufferedReader(new InputStreamReader(response, \"UTF-8\"), 8);\n StringBuilder sb = new StringBuilder();\n\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n String result = sb.toString(); //result is the whole string\n\n Log.i(\"Results from JSON: \", result);\n\n publishProgress(100);\n return result;\n\n } catch (Exception e) {\n }\n\n return \"Nothing\";\n }", "private ResponseEntity m37639a(C6148a aVar) throws AMapCoreException, IOException {\n Throwable th;\n PushbackInputStream pushbackInputStream;\n InputStream inputStream;\n PushbackInputStream pushbackInputStream2;\n PushbackInputStream pushbackInputStream3;\n Throwable th2;\n List<String> list;\n String str = \"\";\n ByteArrayOutputStream byteArrayOutputStream = null;\n try {\n long currentTimeMillis = System.currentTimeMillis();\n HttpURLConnection httpURLConnection = aVar.f25732a;\n httpURLConnection.connect();\n Map<String, List<String>> headerFields = httpURLConnection.getHeaderFields();\n int responseCode = httpURLConnection.getResponseCode();\n if (!(headerFields == null || (list = headerFields.get(\"gsid\")) == null || list.size() <= 0)) {\n str = list.get(0);\n }\n if (responseCode == 200) {\n m37642a(aVar, false, currentTimeMillis, System.currentTimeMillis());\n ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream();\n try {\n inputStream = httpURLConnection.getInputStream();\n try {\n pushbackInputStream = new PushbackInputStream(inputStream, 2);\n try {\n byte[] bArr = new byte[2];\n pushbackInputStream.read(bArr);\n pushbackInputStream.unread(bArr);\n FilterInputStream gZIPInputStream = (bArr[0] == 31 && bArr[1] == -117) ? new GZIPInputStream(pushbackInputStream) : pushbackInputStream;\n byte[] bArr2 = new byte[1024];\n while (true) {\n int read = gZIPInputStream.read(bArr2);\n if (read == -1) {\n break;\n }\n byteArrayOutputStream2.write(bArr2, 0, read);\n }\n SDKLogHandler.m37520c();\n ResponseEntity avVar = new ResponseEntity();\n avVar.f25744a = byteArrayOutputStream2.toByteArray();\n avVar.f25745b = headerFields;\n avVar.f25746c = this.f25729i;\n avVar.f25747d = str;\n try {\n byteArrayOutputStream2.close();\n } catch (Throwable th3) {\n BasicLogHandler.m38679a(th3, \"ht\", \"par\");\n }\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (Throwable th4) {\n BasicLogHandler.m38679a(th4, \"ht\", \"par\");\n }\n }\n try {\n pushbackInputStream.close();\n } catch (Throwable th5) {\n BasicLogHandler.m38679a(th5, \"ht\", \"par\");\n }\n try {\n gZIPInputStream.close();\n } catch (Throwable th6) {\n BasicLogHandler.m38679a(th6, \"ht\", \"par\");\n }\n return avVar;\n } catch (IOException unused) {\n byteArrayOutputStream = byteArrayOutputStream2;\n pushbackInputStream3 = null;\n try {\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th7) {\n pushbackInputStream2 = pushbackInputStream3;\n th = th7;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n } catch (Throwable th8) {\n byteArrayOutputStream = byteArrayOutputStream2;\n th = th8;\n pushbackInputStream2 = null;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n } catch (IOException unused2) {\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n pushbackInputStream3 = pushbackInputStream;\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th9) {\n th2 = th9;\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n th = th2;\n pushbackInputStream2 = pushbackInputStream;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n } catch (IOException unused3) {\n inputStream = null;\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n pushbackInputStream3 = pushbackInputStream;\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th10) {\n th2 = th10;\n inputStream = null;\n pushbackInputStream = null;\n byteArrayOutputStream = byteArrayOutputStream2;\n th = th2;\n pushbackInputStream2 = pushbackInputStream;\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (Throwable th11) {\n BasicLogHandler.m38679a(th11, \"ht\", \"par\");\n }\n }\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (Throwable th12) {\n BasicLogHandler.m38679a(th12, \"ht\", \"par\");\n }\n }\n if (pushbackInputStream != null) {\n try {\n pushbackInputStream.close();\n } catch (Throwable th13) {\n BasicLogHandler.m38679a(th13, \"ht\", \"par\");\n }\n }\n if (pushbackInputStream2 != null) {\n try {\n pushbackInputStream2.close();\n } catch (Throwable th14) {\n BasicLogHandler.m38679a(th14, \"ht\", \"par\");\n }\n }\n throw th;\n }\n } else {\n AMapCoreException jVar = new AMapCoreException(\"网络异常原因:\" + httpURLConnection.getResponseMessage() + \" 网络异常状态码:\" + responseCode + \" \" + str + \" \" + this.f25729i, str, this.f25729i);\n jVar.mo41849a(responseCode);\n throw jVar;\n }\n } catch (IOException unused4) {\n pushbackInputStream3 = null;\n inputStream = null;\n pushbackInputStream = null;\n throw new AMapCoreException(\"IO 操作异常 - IOException\", str, this.f25729i);\n } catch (Throwable th15) {\n th = th15;\n pushbackInputStream2 = null;\n inputStream = null;\n pushbackInputStream = null;\n if (byteArrayOutputStream != null) {\n }\n if (inputStream != null) {\n }\n if (pushbackInputStream != null) {\n }\n if (pushbackInputStream2 != null) {\n }\n throw th;\n }\n }", "private synchronized String execute(final HttpUriRequest request) {\n request.setParams(params);\n\n // Set the request's headers\n for (Entry<String, String> header : headers.entrySet()) {\n request.setHeader(header.getKey(), header.getValue());\n }\n\n // Execute the request and get it's content\n HttpResponse response;\n String content;\n try {\n\n // Execute the request\n response = getClient().execute(request);\n\n // Get the response content\n content = EntityUtils.toString(response.getEntity(), charset);\n } catch (IOException e) {\n throw new JsogClientException(\"Get request failed.\", e);\n }\n\n // Check the response code\n StatusLine sl = response.getStatusLine();\n if (sl.getStatusCode() != 200) {\n throw new Non200ResponseCodeException(\n sl.getStatusCode(),\n sl.getReasonPhrase(),\n content);\n }\n\n return content;\n }", "ApacheHttpClientBuilder getApacheHttpClientBuilder();", "@Override\n public void onSuccess(int i, cz.msebera.android.httpclient.Header[] headers, byte[] bytes) {\n\n // Hide Progress Dialog\n prgDialog.hide();\n Toast.makeText(getApplicationContext(), \"hello\"+bytes.toString(),\n Toast.LENGTH_LONG).show();\n }" ]
[ "0.5989809", "0.5961187", "0.5933219", "0.5929682", "0.5881406", "0.58545524", "0.58109903", "0.5801212", "0.57957363", "0.5767749", "0.5733473", "0.57270575", "0.5707779", "0.5707109", "0.5704166", "0.568435", "0.5666374", "0.56344086", "0.5629792", "0.56285846", "0.5604191", "0.55984414", "0.5595408", "0.55855614", "0.5571718", "0.55680376", "0.5525319", "0.5519835", "0.54975843", "0.5489959", "0.5479764", "0.54755116", "0.5473025", "0.5462878", "0.5459904", "0.5421018", "0.54179263", "0.5417362", "0.5416741", "0.5404645", "0.5403341", "0.53968245", "0.53968245", "0.53968245", "0.538909", "0.5386671", "0.5384813", "0.5383831", "0.5375456", "0.5375333", "0.53606516", "0.5359765", "0.5358624", "0.53582835", "0.5346692", "0.53438663", "0.5334526", "0.5334526", "0.5334526", "0.5334526", "0.5334526", "0.5332193", "0.5323922", "0.5323109", "0.53183526", "0.53178173", "0.5316298", "0.53100693", "0.530903", "0.53041023", "0.530097", "0.530097", "0.52987725", "0.5292886", "0.5291835", "0.5291789", "0.5286751", "0.5284941", "0.5276248", "0.52756786", "0.527434", "0.52688605", "0.5257356", "0.525412", "0.52534264", "0.52518475", "0.52486664", "0.5247834", "0.5247263", "0.52452934", "0.52333707", "0.52324", "0.5228273", "0.5227298", "0.522677", "0.52258927", "0.52257335", "0.5223491", "0.5223438", "0.5218974", "0.5218287" ]
0.0
-1
Create a threadsafe client. This client does not do redirecting, to allow us to capture correct "error" codes.
public static final DefaultHttpClient createHttpClient() { return createHttpClient(3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }", "private CloseableHttpAsyncClient createHttpClient() {\n RequestConfig.Builder requestConfigBuilder = RequestConfig.custom()\n .setConnectTimeout(Timeout.ofMilliseconds(DEFAULT_CONNECT_TIMEOUT_MILLIS))\n .setResponseTimeout(Timeout.ofMilliseconds(DEFAULT_RESPONSE_TIMEOUT_MILLIS));\n if (requestConfigCallback != null) {\n requestConfigBuilder = requestConfigCallback.customizeRequestConfig(requestConfigBuilder);\n }\n\n try {\n final TlsStrategy tlsStrategy = ClientTlsStrategyBuilder.create()\n .setSslContext(SSLContext.getDefault())\n // See https://issues.apache.org/jira/browse/HTTPCLIENT-2219\n .setTlsDetailsFactory(new Factory<SSLEngine, TlsDetails>() {\n @Override\n public TlsDetails create(final SSLEngine sslEngine) {\n return new TlsDetails(sslEngine.getSession(), sslEngine.getApplicationProtocol());\n }\n })\n .build();\n\n final PoolingAsyncClientConnectionManager connectionManager = PoolingAsyncClientConnectionManagerBuilder.create()\n .setMaxConnPerRoute(DEFAULT_MAX_CONN_PER_ROUTE)\n .setMaxConnTotal(DEFAULT_MAX_CONN_TOTAL)\n .setTlsStrategy(tlsStrategy)\n .build();\n\n HttpAsyncClientBuilder httpClientBuilder = HttpAsyncClientBuilder.create()\n .setDefaultRequestConfig(requestConfigBuilder.build())\n .setConnectionManager(connectionManager)\n .setTargetAuthenticationStrategy(DefaultAuthenticationStrategy.INSTANCE)\n .disableAutomaticRetries();\n if (httpClientConfigCallback != null) {\n httpClientBuilder = httpClientConfigCallback.customizeHttpClient(httpClientBuilder);\n }\n\n final HttpAsyncClientBuilder finalBuilder = httpClientBuilder;\n return AccessController.doPrivileged((PrivilegedAction<CloseableHttpAsyncClient>) finalBuilder::build);\n } catch (NoSuchAlgorithmException e) {\n throw new IllegalStateException(\"could not create the default ssl context\", e);\n }\n }", "public static Client createClient() {\n JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();\n provider.setAnnotationsToUse(new Annotations[]{Annotations.JACKSON});\n\n ClientConfig config = new ClientConfig(provider);\n //Allow delete request with entity\n config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);\n //It helps to handle cookies\n config.property(ClientProperties.FOLLOW_REDIRECTS, Boolean.FALSE);\n //Allow PATCH\n config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);\n\n Logger logger = Logger.getLogger(\"Client\");\n Feature feature = new LoggingFeature(logger, Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY,\n null);\n\n //Allow self trusted certificates\n SSLContext sslcontext;\n try {\n sslcontext = SSLContext.getInstance(\"TLS\");\n sslcontext.init(null, new TrustManager[]{new X509TrustManager() {\n public void checkClientTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public void checkServerTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[0];\n }\n }}, new java.security.SecureRandom());\n } catch (KeyManagementException | NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n\n return ClientBuilder\n .newBuilder()\n .withConfig(config)\n .sslContext(sslcontext)\n .build()\n .register(feature)\n .register(MultiPartFeature.class);\n }", "private void createClient() {\n tc = new TestClient();\n }", "public Client create() {\n RequestProvider provider = RequestProviders.lookup();\n return provider.newClient(this);\n }", "private OkHttpClient Create() {\n final OkHttpClient.Builder baseClient = new OkHttpClient().newBuilder()\n .connectTimeout(CONNECTION_TIMEOUT, TimeUnit.SECONDS)\n .writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS)\n .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS);\n\n // If there's no proxy just create a normal client\n if (appProps.getProxyHost().isEmpty()) {\n return baseClient.build();\n }\n\n final OkHttpClient.Builder proxyClient = baseClient\n .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(appProps.getProxyHost(), Integer.parseInt(appProps.getProxyPort()))));\n\n if (!appProps.getProxyUsername().isEmpty() && !appProps.getProxyPassword().isEmpty()) {\n\n Authenticator proxyAuthenticator;\n String credentials;\n\n credentials = Credentials.basic(appProps.getProxyUsername(), appProps.getProxyPassword());\n\n // authenticate the proxy\n proxyAuthenticator = (route, response) -> response.request().newBuilder()\n .header(\"Proxy-Authorization\", credentials)\n .build();\n proxyClient.proxyAuthenticator(proxyAuthenticator);\n }\n return proxyClient.build();\n\n }", "private Socket createClient()\n\t{\n\t\tSocket client = null;\n\t\ttry {\n\t\t\tclient = this.server.accept();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tinsertLogEntry(e.getMessage(), e.getStackTrace().toString());\n\t\t}\n\t\t\n\t\treturn client;\n\t}", "public Client() {}", "static Http1Client create() {\n return create(Http1ClientConfig.create());\n }", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "private OkHttpClient createClient(){\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n return new OkHttpClient.Builder()\n .addInterceptor(logging)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(30, TimeUnit.SECONDS)\n .build();\n }", "public interface Client {\n\n\t/**\n\t * @throws Http2Exception\n\t */\n\tvoid init() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean start() throws Http2Exception;\n\n\t/**\n\t * @param request\n\t * @return\n\t * @throws Http2Exception\n\t */\n\t Http2Response request(Http2Request request) throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean isRuning() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean shutdown() throws Http2Exception;\n\n}", "private SshClient createClient() {\n java.security.Security.addProvider(\n new org.bouncycastle.jce.provider.BouncyCastleProvider());\n final SshClient client = SshClient.setUpDefaultClient();\n client.setForwardingFilter(AcceptAllForwardingFilter.INSTANCE);\n client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);\n return client;\n }", "@BeforeClass\n public static void createClient() {\n client = HttpClients.createDefault();\n }", "public abstract Client getClient();", "public void newClient() throws StatsDClientException {\n Lock wl = lock.writeLock();\n StatsDClient newClient = null;\n try {\n newClient = new NonBlockingStatsDClient(prefix, hostname, port);\n LOGGER.info(\"New StatsD client created. \" + newClient.hashCode());\n } catch (StatsDClientException e) {\n LOGGER.warning(\"Could not refresh client, will continue to use old instance\");\n\n if (this.client == null) {\n throw e;\n }\n return;\n }\n\n // only acquire write lock if hostname resolution succeeded.\n wl.lock();\n try {\n if (this.client != null) {\n // this will flush remaining messages out of queue.\n this.client.stop();\n }\n this.client = newClient;\n } catch (Exception e) {\n LOGGER.warning(\"Could not refresh client, will continue to use old instance\");\n if (this.client == null) {\n throw e;\n }\n } finally {\n wl.unlock();\n }\n }", "public AbaloneClient() {\n server = new AbaloneServer();\n clientTUI = new AbaloneClientTUI();\n }", "private HttpClient() {\n\t}", "public static Client shareClient() throws UnknownHostException {\n\n Client client = TransportClient.builder().build()\n .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(\"127.0.0.1\"), 9300));\n return client;\n\n }", "public static Client getInstance() {\n if(client == null) {\n client = new Client();\n }\n return client;\n }", "public DefaultHttpClientImpl() {\n SchemeRegistry schemeRegistry = new SchemeRegistry();\n schemeRegistry.register(new Scheme(\n \"http\", PlainSocketFactory.getSocketFactory(), 80));\n\n schemeRegistry.register(new Scheme(\n \"https\", SSLSocketFactory.getSocketFactory(), 443));\n conman = new ThreadSafeClientConnManager(params, schemeRegistry);\n }", "public Client() {\n }", "protected AbstractClient(ClientContext context) {\n this(context, RetryUtils::defaultClientRetry);\n }", "public static Client getClient(){\n // Create a new client if it hasn't been created yet\n if(client == null) client = new Client(60000,60000);\n return client;\n }", "public static Object httpClient() {\n return new Object();\n// return HttpClient.newBuilder()\n// .version(HttpClient.Version.HTTP_1_1)\n// .followRedirects(HttpClient.Redirect.NORMAL)\n// .connectTimeout(Duration.ofSeconds(300))\n// .build();\n }", "public static Client create() {\n ClientConfig clientConfig = new ClientConfig(JacksonFeature.class,\n JacksonJaxbJsonProvider.class,\n JacksonJsonProvider.class);\n return ClientBuilder.newClient(clientConfig);\n }", "private ResourceClient( ResourceConfigurationBase<?> theConfiguration, String theContractRoot, String theContractVersion, String theUserAgent, HttpClient theClient, JsonTranslationFacility theJsonFacility ) {\r\n\t\tPreconditions.checkNotNull( theConfiguration, \"need a configuration object so we can get our endpoint\" );\r\n \tPreconditions.checkArgument( !Strings.isNullOrEmpty( theContractRoot ), \"need a contract root\" );\r\n \tPreconditions.checkArgument( theContractRoot.startsWith( \"/\" ), \"the contract root '%s' must be a reference from the root (i.e. start with '/')\", theContractRoot );\r\n \tPreconditions.checkArgument( !Strings.isNullOrEmpty( theContractVersion ), \"need a version for contract root '%s'\", theContractRoot );\r\n \tPreconditions.checkArgument( ContractVersion.isValidVersion( theContractVersion), \"the version string '%s' for contract root '%s' is not valid\", theContractVersion, theContractRoot );\r\n\t\tPreconditions.checkArgument( !Strings.isNullOrEmpty( theUserAgent ), \"need a user agent for this client\" );\r\n\r\n\t\t// lets make sure the configuration is valid\r\n\t\ttheConfiguration.validate();\r\n\t\t\r\n\t\t// now let's start preparing the client\r\n\t\tendpoint = new HttpEndpoint( theConfiguration.getEndpoint( ) ); // this will do validation on the endpoint \r\n\t\tcontractRoot = theContractRoot; \r\n\t\tcontractVersion = theContractVersion;\r\n\t\tuserAgent = theUserAgent;\r\n\t\t\r\n\t\t// use the client if sent in, but create a working one otherwise\r\n\t\tif( theClient == null ) {\r\n\t\t\ttry {\r\n\t\t\t SslContextFactory sslContextFactory = null;\r\n\t\r\n\t\t\t if( endpoint.isSecure( ) ) {\r\n\t\t\t \tif( theConfiguration.getAllowUntrustedSsl() ) {\r\n\t\t\t \t\t// so we need SSL communication BUT we don't need to worry about it being valid, likley\r\n\t\t\t \t\t// because the caller is self-cert'ing or in early development ... we may need to do \r\n\t\t\t \t\t// more here mind you\r\n\t\t\t \t\t\r\n\t\t\t\t \t// the following code was based https://code.google.com/p/misc-utils/wiki/JavaHttpsUrl\r\n\t\t\t\t \t// if we were to look into mutual SSL and overall key handling, I probably want to\r\n\t\t\t\t \t// take a closer look\r\n\t\t\t\t \t\r\n\t\t\t\t \t// We need to create a trust manager that essentially doesn't except/fail checks\r\n\t\t\t\t\t final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\r\n\t\t\t\t\t \t// this was based on the code found here:\r\n\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void checkClientTrusted(X509Certificate[] chain,\r\n\t\t\t\t\t\t\t\t\tString authType) throws CertificateException {\r\n\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\tpublic void checkServerTrusted(X509Certificate[] chain,\r\n\t\t\t\t\t\t\t\t\tString authType) throws CertificateException {\r\n\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\tpublic X509Certificate[] getAcceptedIssuers() {\r\n\t\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t } };\r\n\t\t\t\t\t \r\n\t\t\t\t\t // then we need to create an SSL context that uses lax trust manager \r\n\t\t\t\t\t SSLContext sslContext = SSLContext.getInstance( \"SSL\" );\r\n\t\t\t\t\t\tsslContext.init( null, trustAllCerts, new java.security.SecureRandom() );\r\n\t\r\n\t\t\t\t\t\t// and finally, create the SSL context that\r\n\t\t\t\t\t\tsslContextFactory = new SslContextFactory();\r\n\t\t\t\t\t\tsslContextFactory.setSslContext( sslContext );\r\n\t\t\t \t} else {\r\n\t\t\t \t\t// TODO: this needs to be tested against \r\n\t\t\t \t\t//\t\t a) real certs with real paths that aren't expired\r\n\t\t\t \t\t//\t\t b) real certs with real paths that are expired\r\n\t\t\t \t\tsslContextFactory = new SslContextFactory( );\r\n\t\t\t \t}\r\n\t\t\t\t\thttpClient = new HttpClient( sslContextFactory );\r\n\t\t\t } else {\r\n\t\t\t\t\thttpClient = new HttpClient( );\r\n\t\t\t }\r\n\t\t\t httpClient.setFollowRedirects( false ); // tales doesn't have redirects (at least not yet)\r\n\t\t\t httpClient.setStrictEventOrdering( true ); // this seems to fix an odd issue on back-to-back calls to the same service on \r\n\t\t\t\thttpClient.start( );\r\n\t\t\t displayClientConfiguration( httpClient );\r\n\t\t\t} catch (NoSuchAlgorithmException | KeyManagementException e) {\r\n\t\t\t\tthrow new IllegalStateException( \"unable to create the resource client due to a problem setting up SSL\", e );\r\n\t\t\t} catch (Exception e ) {\r\n\t\t\t\tthrow new IllegalStateException( \"unable to create the resource client due to the inability to start the HttpClient\", e );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\thttpClient = theClient;\r\n\t\t}\r\n\t\thttpClient.setUserAgentField( new HttpField( HttpHeader.USER_AGENT, theUserAgent ) );\r\n\r\n\t\tif( theJsonFacility == null ) {\r\n\t\tjsonFacility = new JsonTranslationFacility( new DataContractTypeSource( ) );\r\n\t\t} else {\r\n\t\t\tjsonFacility = theJsonFacility;\r\n\t\t}\r\n\t\t\r\n\t\tjsonParser = new JsonParser( );\r\n\t\t\r\n\t\t// now that we have the json facility, let's \r\n\t\t// get the adapter for the result type\r\n\t\tJavaType type = new JavaType( ResourceResult.class );\r\n\t\tJsonTypeMap typeMap = jsonFacility.generateTypeMap( type ); // TODO: technically I can, if I have the type of the result, now do the full thing (need to have a field for it)\r\n\t\tresultTypeAdapter = new TypeFormatAdapter( \r\n\t\t\t\ttype,\r\n\t\t\t\ttypeMap.getReflectedType().getName(),\r\n \t\t\tnew JsonObjectToObjectTranslator( typeMap ),\r\n \t\t\tnew ObjectToJsonObjectTranslator( typeMap ) );\t\t\t\t\r\n\t}", "protected RestClient()\n\t{\n\t\tclient = new HttpClient();\n\t\tclient.setIdleTimeout(3000000);\n\t\t// for possible future use:\n\t\t//exchange_get = new ContentExchange()\n\t\t{\n\t\t\t// define the callback method to process the response when you get it back\n\t\t\t// protected void onResponseComplete() throws IOException\n\t\t\t// {\n\t\t\t// super.onResponseComplete();\n\t\t\t// int responseStatus = this.getStatus();\n\n\t\t\t// do something with the response content\n\t\t\t//System.out.println(\"Response status: \" + responseStatus);\n\t\t\t//System.out.println(this.getResponseContent());\n\t\t\t//\t }\n\t\t};\n\t}", "public void createClientFromCredential() {\n WebPubSubServiceAsyncClient serverClient = new WebPubSubServiceClientBuilder()\n .connectionString(\"<connection-string>\")\n .hub(\"<hub>>\")\n .buildAsyncClient();\n\n // wrap WebPubSubServiceAsyncClient.getClientAccessToken as WebPubSubClientCredential\n WebPubSubClientCredential clientCredential = new WebPubSubClientCredential(Mono.defer(() ->\n serverClient.getClientAccessToken(new GetClientAccessTokenOptions()\n .setUserId(\"<user-name>\")\n .addRole(\"webpubsub.joinLeaveGroup\")\n .addRole(\"webpubsub.sendToGroup\"))\n .map(WebPubSubClientAccessToken::getUrl)));\n\n // create WebPubSub client\n WebPubSubClient client = new WebPubSubClientBuilder()\n .credential(clientCredential)\n .buildClient();\n // END: readme-sample-createClientFromCredential\n }", "private CorrelationClient() { }", "private CloseableHttpClient getHttpClient() {\n return HttpClients.custom()\n .setConnectionManager(httpClientConnectionManager)\n .setConnectionManagerShared(true)\n .build();\n }", "void startClient(String name, Config.ClientConfig config);", "protected HttpClient getClient() {\n if (client == null) {\n synchronized (this) {\n if (client == null) {\n client = new DefaultHttpClient(conman, params);\n }\n }\n }\n\n return client;\n }", "public static HttpClient Factory() {\n\t\treturn httpclient;\n\t}", "public Client(Client client) {\n\n }", "public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }", "private static WebClient getClient(final Context context) {\n if (sInstance == null) {\n sInstance = new WebClient(context);\n }\n return sInstance;\n }", "private DefaultHttpClient createHttpClient()\n throws IOException\n {\n XCapCredentialsProvider credentialsProvider\n = new XCapCredentialsProvider();\n credentialsProvider.setCredentials(\n AuthScope.ANY,\n new UsernamePasswordCredentials(getUserName(), password));\n\n return HttpUtils.getHttpClient(\n null , null, uri.getHost(), credentialsProvider);\n }", "Client getClient();", "public LocalClient() {\n\t\tsuper(\"SERVER\", Arrays.asList(new String[] {\"*\"}), null, null);\n\t\tinputThread = new Thread(this);\n\t\tinputThread.start();\n\t}", "public TelemetryClientClient()\n {\n TelemetryClient tc = new TelemetryClient();\n if (!tc.getOnlineStatus())\n tc.connect(\"a connection string\");\n\n tc.send(\"some message\");\n\n String response = tc.receive();\n\n tc.disconnect();\n\n }", "private MatterAgentClient() {}", "@Override\n\t\tpublic DRPCClient create() throws Exception {\n\t\t\tMap<String, Object> config = Utils.readStormConfig();\n\t\t\treturn new DRPCClient(config, configuration.drpcHost,\n\t\t\t\t\tconfiguration.drpcPort, MAX_WAIT_TO_EXECUTE);\n\t\t}", "Client createNewClient(Client client);", "private static void createCouchbaseClient() {\n LOGGER.debug(\"Creating Couchbase Client\");\n String bucket = CONFIG.getString(\"couchbase.bucket\");\n String[] hosts = CONFIG.getString(\"couchbase.host\").split(\";\");\n String port = CONFIG.getString(\"couchbase.port\");\n String base = CONFIG.getString(\"couchbase.base\");\n\n List<URI> uris = new ArrayList<>();\n for (final String host : hosts) {\n uris.add(URI.create(\"http://\" + host + \":\" + port + \"/\" + base));\n }\n try {\n tapClient = new TapClient(uris, bucket, \"\");\n } catch (Exception ex) {\n LOGGER.error(\"Caught exception trying to connect to Couchbase\", ex);\n }\n }", "public ServiceClient() {\n\t\tsuper();\n\t}", "public HttpClientHelper() {\n defaultHeaders.put(\"Content-Type\", \"application/json\");\n defaultHeaders.put(\"Accept-Encoding\", \"gzip\");\n\n //postDefaultHeaders.put(\"Content-Type\", \"application/json\");\n //postDefaultHeaders.put(\"Content-Encoding\", \"gzip\");\n\n String key = MessageFormat.format(\"{0}#{1}\", UserUtil.getUserUuid(), UserUtil.getUserId());\n\n //postDefaultHeaders.put(\"X-CLIENT-KEY\", key);\n defaultHeaders.put(\"X-CLIENT-KEY\", key);\n client.setTimeout(3000);\n }", "@Override\n public SessionClient build() {\n Supplier<CompletableFuture<SessionClient>> proxyFactory = () -> CompletableFuture.completedFuture(\n new DefaultRaftSessionClient(\n primitiveName,\n primitiveType,\n serviceConfig,\n partitionId,\n DefaultRaftClient.this.protocol,\n selectorManager,\n sessionManager,\n readConsistency,\n communicationStrategy,\n threadContextFactory.createContext(),\n minTimeout,\n maxTimeout));\n\n SessionClient proxy;\n\n ThreadContext context = threadContextFactory.createContext();\n\n // If the recovery strategy is set to RECOVER, wrap the builder in a recovering proxy client.\n if (recoveryStrategy == Recovery.RECOVER) {\n proxy = new RecoveringSessionClient(\n clientId,\n partitionId,\n primitiveName,\n primitiveType,\n proxyFactory,\n context);\n } else {\n proxy = proxyFactory.get().join();\n }\n\n // If max retries is set, wrap the client in a retrying proxy client.\n if (maxRetries > 0) {\n proxy = new RetryingSessionClient(\n proxy,\n context,\n maxRetries,\n retryDelay);\n }\n return new BlockingAwareSessionClient(proxy, context);\n }", "public Factory() {\n this(getInternalClient());\n }", "public static PoolInfoClient create() {\n return new PoolInfoClient();\n }", "public TestInvoker()\n {\n super(new TestClient(), new ThreadPoolExecutorImpl(3));\n }", "public PublishingClientImpl() {\n this.httpClientSupplier = () -> HttpClients.createDefault();\n this.requestBuilder = new PublishingRequestBuilderImpl();\n }", "public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }", "private static void runClient() {\n long clientStartTime = System.currentTimeMillis();\n \n // Pick a random entry point\n int entryPointId = random.nextInt(entryPointAddresses.size());\n String[] ep = entryPointAddresses.get(entryPointId);\n String entryPointCode = ep[0];\n String entryPointAddress = ep[1];\n \n // User number and id\n int userCount = COUNT.incrementAndGet();\n String userToken = (clientLocation + userCount + \"-\" + Math.abs(random.nextInt(1000)));\n User u = USER_RESOLVER.resolve(userToken);\n \n // Point the client to the entry point\n WebTarget webTarget = entryPointTarget(entryPointAddress, userToken);\n EntryPointResponse response = new EntryPointResponse(null, null);\n try {\n String responseJson = webTarget.request(MediaType.APPLICATION_JSON).get(String.class);\n response = Jsons.fromJson(responseJson, EntryPointResponse.class);\n } catch (Exception e) {\n LOG.log(Level.SEVERE, String.format(\"Could not load responses from entry point %s: %s\", ep[0], ep[1]));\n LOG.log(Level.SEVERE, \"Attempted to connect with: \" + webTarget.getUri().toString());\n }\n \n // current time after the response\n long clientEndTime = System.currentTimeMillis(); \n \n Double latency = null;\n if (response.getRedirectAddress() != null) {\n latency = latencies.get(response.getRedirectAddress());\n }\n \n writer.writeCsv(LOG_LENS, \n sdf.format(new Date()),\n clientStartTime - Main.clientStartTime,\n userCount,\n Main.clientLocation,\n entryPointCode,\n response.getSelectedCloudSiteCode(),\n clientEndTime - clientStartTime,\n latency == null ? \"null\" : String.format(\"%.2f\", latency),\n userToken,\n Arrays.toString(u.getCitizenships().toArray()),\n Arrays.toString(u.getTags().toArray()),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getProviderCode(),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getLocationCode(),\n response.getDefinition() == null ? \"null\" : Arrays.toString(response.getDefinition().getTags().toArray()),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getCost()\n );\n //writer.flush();\n }", "private static HttpClient getNewHttpClient(){\n HttpParams params = new BasicHttpParams();\n return new DefaultHttpClient(params);\n }", "JobClient createJobClient();", "public static Client getHttpClient() {\r\n return c;\r\n }", "public StatsdClient(String prefix, String hostname, int port) throws StatsDClientException {\n this.hostname = hostname;\n this.prefix = prefix;\n this.port = port;\n\n this.lock = new ReentrantReadWriteLock();\n ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);\n exec.setRemoveOnCancelPolicy(true);\n\n Runnable refreshClient = new Runnable() {\n @Override\n public void run() {\n newClient();\n }\n };\n exec.scheduleAtFixedRate(refreshClient, CLIENT_TTL, CLIENT_TTL, TimeUnit.SECONDS);\n\n this.newClient();\n LOGGER.info(\"StatsdClient wrapper created. \" + this.hashCode());\n }", "public static void main(String[] args) {\n//\t\tnew CluelessClient();\n\t}", "public static Client getClient() {\n if (ClientHandler.client == null) {\n ClientHandler.client = new Client();\n }\n return ClientHandler.client;\n }", "public ClientLoginService(){\n this(MessageConnection.CHANNEL_DEFAULT_RELIABLE);\n }", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "public TcpClient() {\n connector = new NioSocketConnector();\n connector.setHandler(this);\n connector.getFilterChain().addLast(\"codec\", \n new ProtocolCodecFilter(new TextLineCodecFactory(Charset.forName(\"UTF-8\")))); \n ConnectFuture connFuture = connector.connect(new InetSocketAddress(\"localhost\", TcpServer.PORT));\n connFuture.awaitUninterruptibly();\n session = connFuture.getSession();\n }", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "private MockClientFacade() {\n\t\t//this.c = Client.getInstance();\n\t}", "@Before\n public void buildClient() {\n BasicCookieStore cookieStore = new BasicCookieStore();\n\n // Build Apache Http Client to execute requests\n this.httpClient = HttpClientBuilder.create()\n .setDefaultCookieStore(cookieStore)\n .setRedirectStrategy(new LaxRedirectStrategy())\n .build();\n }", "static Http1Client create(Http1ClientConfig clientConfig) {\n return new Http1ClientImpl(WebClient.create(it -> it.from(clientConfig)), clientConfig);\n }", "public TicketBoothClient()\n {\n Thread myThread = new Thread(this);\n myThread.start();\n }", "ConnectionClientTransport newClientTransport(SocketAddress serverAddress, String authority,\n @Nullable String userAgent, @Nullable ProxyParameters proxy);", "public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }", "private HttpClient getTemplateServerClient(String remoteSource) throws IOException {\n\n SocketFactory factory = (SocketFactory)mSocketFactories.get(remoteSource);\n\n if (factory == null) {\n\n int port = 80;\n String host = remoteSource.substring(TEMPLATE_LOAD_PROTOCOL.length());\n\n int portIndex = host.indexOf(\"/\");\n \n if (portIndex >= 0) {\n host = host.substring(0,portIndex); \n }\n String hostPort = host; \n portIndex = host.indexOf(\":\");\n if (portIndex >= 0) {\n try {\n port = Integer.parseInt(host.substring(portIndex+1));\n }\n catch (NumberFormatException nfe) {\n System.out.println(\"Invalid port number specified\");\n }\n host = host.substring(0,portIndex);\n }\n factory = new PooledSocketFactory(new PlainSocketFactory(InetAddress.getByName(host), \n port, 5000));\n \n if (factory != null) {\n mSocketFactories.put(hostPort, factory);\n }\n }\n return new HttpClient(factory);\n }", "@Bean(destroyMethod = \"close\")\n public RestHighLevelClient client() {\n final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();\n credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(esUser, esPassword));\n\n RestClientBuilder builder = RestClient.builder(new HttpHost(esHost, esPort, \"https\"))\n .setHttpClientConfigCallback(httpClientBuilder -> httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider));\n\n return new RestHighLevelClient(builder);\n }", "protected AbstractClient(ClientContext context, Supplier<RetryPolicy> retryPolicySupplier) {\n mContext = Preconditions.checkNotNull(context, \"context\");\n mRetryPolicySupplier = retryPolicySupplier;\n mServiceVersion = Constants.UNKNOWN_SERVICE_VERSION;\n mRpcThreshold = mContext.getClusterConf().getMs(PropertyKey.USER_LOGGING_THRESHOLD);\n }", "public static CertAuthClient client(InetSocketAddress addr) throws TimeoutException\n\t{\n\t\treturn new CertAuthClient(addr);\n\t}", "private void createClient() throws NFFGClientException {\n\t\ttry {\n\t\t\ttestNFFGClient = NFFGClientFactory.newInstance().newNFFGClient();\n\t\t} catch (FactoryConfigurationError fce) {\n\t\t\tfce.printStackTrace();\n\t\t}\n\t\tassertNotNull(\"The implementation under test generated a null NFFGClient\", testNFFGClient);\n\t}", "public UPKClient() {\n connectToServer(BASE_URL);\n }", "@SuppressWarnings(\"squid:S2095\")\n private TTransport createTransport(InetSocketAddress serverAddress)\n throws IOException {\n String hostName = serverAddress.getHostName();\n int port = serverAddress.getPort();\n TTransport socket = new TSocket(hostName, port, connectionTimeout);\n\n if (!isKerberosEnabled) {\n LOGGER.debug(\"created unprotected connection to {}:{} \", hostName, port);\n return socket;\n }\n\n String principal = SecurityUtil.getServerPrincipal(serverPrincipal, serverAddress.getAddress());\n String[] serverPrincipalParts = SaslRpcServer.splitKerberosName(principal);\n if (serverPrincipalParts.length != 3) {\n throw new IOException(\"Kerberos principal should have 3 parts: \" + principal);\n }\n\n UgiSaslClientTransport connection =\n new UgiSaslClientTransport(SaslRpcServer.AuthMethod.KERBEROS.getMechanismName(),\n serverPrincipalParts[0], serverPrincipalParts[1],\n socket, useUgi);\n\n LOGGER.debug(\"creating secured connection to {}:{} \", hostName, port);\n return connection;\n }", "public static DucktalesClient getClient() {\n \treturn client;\n }", "public static TCPClient getInstance() {\r\n if (tcpClient == null) {\r\n tcpClient = new TCPClient();\r\n }\r\n return tcpClient;\r\n }", "private ClientLoader() {\r\n }", "private static twitter4j.Twitter createClient() {\n \t\ttwitter4j.Twitter client = TwitterFactory.getSingleton();\n \t\tclient.setOAuthConsumer(consumerKey, consumerSecret);\n \t\treturn client;\n \t}", "protected MqttAsyncClient getClient() {\n return client;\n }", "private MyClientEndpoint(){\n // private to prevent anyone else from instantiating\n }", "public static void sycNewTraderClient() {\n\t\tString key = \"123\";\n\t\ttry {\n\t\t\tif(newTradeServiceLock.tryLock(5, TimeUnit.SECONDS)){\n\t\t\t\ttry{\n\t\t\t\t\tif(mapTradeService.containsKey(key)){\n\t\t\t\t\t\t//客户端发起重连,但是服务端没有断开\n\t\t\t\t\t}\n\t\t\t\t}finally{\n\t\t\t\t\tnewTradeServiceLock.unlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.err.println(\"线程已经超时返回! key : \"+key);\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t}", "public Object call() throws Exception {\n\t\t\t\t\t\tProducerSimpleNettyResponseFuture future;\n\t\t\t\t\t\tProducerSimpleNettyResponse responseFuture;\n\t\t\t\t\t\tfuture = clientProxy.request(message);\n\t\t\t\t\t\tresponseFuture = future\n\t\t\t\t\t\t\t\t.get(3000, TimeUnit.MILLISECONDS);\n\t\t\t\t\t\treturn responseFuture.getResponse();\n\t\t\t\t\t}", "public NettyClientServerCommunicationSystemClientSide(int clientId, ClientViewController controller) {\n\t\tsuper();\n\n\t\tthis.clientId = clientId;\n\t\tthis.workerGroup = new NioEventLoopGroup(Runtime.getRuntime().availableProcessors());\n\t\ttry {\n\n\t\t\tthis.secretKeyFactory = TOMUtil.getSecretFactory();\n\n\t\t\tthis.controller = controller;\n\n\t\t\t/* Tulio Ribeiro */\n\t\t\tprivKey = controller.getStaticConf().getPrivateKey();\n\n\t\t\tthis.listener = new SyncListener();\n\t\t\tthis.rl = new ReentrantReadWriteLock();\n\n\t\t\tint[] currV = controller.getCurrentViewProcesses();\n\n\t\t\tfor (int i = 0; i < currV.length; i++) {\n\t\t\t\tint replicaId = currV[i];\n\t\t\t\ttry {\n\n\t\t\t\t\tChannelFuture future = connectToReplica(replicaId, secretKeyFactory);\n\n\t\t\t\t\tlogger.debug(\"ClientID {}, connecting to replica {}, at address: {}\", clientId, replicaId,\n\t\t\t\t\t\t\tcontroller.getRemoteAddress(replicaId));\n\n\t\t\t\t\tfuture.awaitUninterruptibly();\n\n\t\t\t\t\tif (!future.isSuccess()) {\n\t\t\t\t\t\tlogger.error(\"Impossible to connect to \" + replicaId);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (java.lang.NullPointerException ex) {\n\t\t\t\t\t// What is this??? This is not possible!!!\n\t\t\t\t\tlogger.debug(\"Should fix the problem, and I think it has no other implications :-), \"\n\t\t\t\t\t\t\t+ \"but we must make the servers store the view in a different place.\");\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tlogger.error(\"Failed to initialize MAC engine\", ex);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (NoSuchAlgorithmException ex) {\n\t\t\tlogger.error(\"Failed to initialize secret key factory\", ex);\n\t\t}\n\t}", "@Bean\n public HttpClient httpClient() {\n return new HttpClient(multiThreadedHttpConnectionManager());\n }", "@Override\n public Client createClient(Client client)\n throws RemoteException {\n client=clientManager.create(client);\n \n return client;\n }", "private void getClient(SocketAddress address, RedisOptions options, Handler<AsyncResult<Redis>> onClient) {\n\n Redis cli = connections.get(address);\n\n // already have a connection to this client, return that\n if (cli != null) {\n onClient.handle(Future.succeededFuture(cli));\n return;\n }\n\n RedisClient.create(vertx, address, options, create -> {\n if (create.failed()) {\n onClient.handle(create);\n return;\n }\n\n final Redis conn = create.result();\n\n conn.exceptionHandler(t -> {\n // broken connection so force a new client to be created\n connections.remove(address);\n // propagate the exception\n if (onException != null) {\n onException.handle(t);\n }\n\n // now since the clients are unbalanced, we need to reload the slots\n getSlots(options, ar -> {\n if (ar.failed()) {\n // getting slots failed, so raise the exception\n if (onException != null) {\n onException.handle(ar.cause());\n }\n }\n });\n });\n\n conn.endHandler(v -> {\n // closed connections should be removed\n connections.remove(address);\n // how many connections are still open?\n // when there's more than 0 then we can still operate\n if (connections.size() == 0) {\n // all connections are closed so we must assume this\n // cluster is ended (or we can't recover)\n if (onEnd != null) {\n onEnd.handle(null);\n }\n }\n });\n\n conn.handler(r -> {\n if (onMessage != null) {\n onMessage.handle(r);\n }\n });\n\n connections.put(address, conn);\n onClient.handle(Future.succeededFuture(conn));\n });\n }", "private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }", "@Bean\n\tpublic HttpClient httpClient() {\n\t\treturn new HttpClient(this.multiThreadedHttpConnectionManager);\n\t}", "private void ensureRedisClient() {\n if (_redisClient != null) {\n return;\n }\n\n synchronized (RedisConnector.class) {\n if (_redisClient != null) {\n return;\n }\n\n ContainerLogger.getInstance().info(\"Creating shared lettuce.io RedisClient\");\n _redisClient = RedisClient.create();\n }\n }", "protected RestClient() {\n }", "private APIClient() {\n }", "public static KscHttpClient newInstance(String userAgent,\n boolean keepAlive, boolean requestSentRetryEnabled) {\n HttpParams params = getHttpParams(userAgent);\n\n SchemeRegistry schemeRegistry = new SchemeRegistry();\n schemeRegistry.register(new Scheme(\"http\", PlainSocketFactory\n .getSocketFactory(), 80));\n // schemeRegistry.register(new Scheme(\"https\", SSLSocketFactory\n // .getSocketFactory(), 443));\n schemeRegistry.register(ignoreAllCertificate());\n\n ClientConnectionManager manager = new ThreadSafeClientConnManager(\n params, schemeRegistry);\n\n // We use a factory method to modify superclass initialization\n // parameters without the funny call-a-static-method dance.\n return new KscHttpClient(manager, params, keepAlive,\n requestSentRetryEnabled);\n }", "public WebSocketClient(URI uri) {\n this.globalLock = new Object();\n this.uri = uri;\n this.secureRandom = new SecureRandom();\n this.connectTimeout = 0;\n this.readTimeout = 0;\n this.automaticReconnection = false;\n this.waitTimeBeforeReconnection = 0;\n this.isRunning = false;\n this.headers = new HashMap<String, String>();\n webSocketConnection = new WebSocketConnection();\n }", "private void init() throws IOReactorException {\n IOReactorConfig ioReactorConfig = IOReactorConfig.custom()\n .setIoThreadCount(Runtime.getRuntime().availableProcessors())\n .setConnectTimeout(BaseConstants.TIMEOUT_SECONDS * 1000)\n .setSoTimeout(BaseConstants.TIMEOUT_SECONDS * 1000)\n .build();\n\n // Create a custom I/O reactort\n ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(ioReactorConfig);\n PoolingNHttpClientConnectionManager connManager = new PoolingNHttpClientConnectionManager(ioReactor);\n // Configure total max or per route limits for persistent connections\n // that can be kept in the pool or leased by the connection manager.\n connManager.setMaxTotal(100);\n connManager.setDefaultMaxPerRoute(100);\n\n HttpAsyncClientBuilder clientBuilder = HttpAsyncClients.custom();\n RequestConfig.Builder requestConfig = RequestConfig.custom();\n // 连接超时,连接建立时间\n requestConfig.setConnectTimeout(BaseConstants.TIMEOUT_SECONDS * 1000);\n // 请求超时,数据传输过程中数据包之间间隔的最大时间\n requestConfig.setSocketTimeout(BaseConstants.TIMEOUT_SECONDS * 1000);\n // 使用连接池来管理连接,从连接池获取连接的超时时间\n requestConfig.setConnectionRequestTimeout(BaseConstants.TIMEOUT_SECONDS * 1000);\n clientBuilder.setConnectionManager(connManager);\n clientBuilder.setDefaultRequestConfig(requestConfig.build());\n httpclient = clientBuilder.build();\n }", "public ClientTSap() {\n socketFactory = SocketFactory.getDefault();\n }", "public HttpClientWrapper(String url, String user, String pwd, String proxyDns, int proxyPort) {\n this.url = url;\n if ( user == null && pwd == null ) {\n this.creds = null;\n } else if ( user != null && pwd != null ) {\n this.creds = new UsernamePasswordCredentials(user, pwd);\n } else {\n throw new DBCException(\"user / pwd either both null or both not null: \" + user + \" - \" + pwd);\n }\n if ( (proxyDns == null && proxyPort == 0) || (proxyDns != null && proxyPort > 0) ) {\n // ok\n } else {\n throw new DBCException(\"proxyDns / proxyPort either both null/0 or both not null/>0: \" + proxyDns + \" - \" + proxyPort);\n }\n\n this.requestConfig = RequestConfig.custom().setConnectionRequestTimeout(5000).build();\n\n SSLContext sslContext = buildSSLContext();\n SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n LOG.info(\"accepting SSLConnection for host: {}, port: {}\", session.getPeerHost(), session.getPeerPort());\n return true;\n }\n });\n\n ConnectionConfig connectionConfig = ConnectionConfig.custom().setCharset(Charset.forName(UTF_8)).build();\n PlainConnectionSocketFactory plainSF = PlainConnectionSocketFactory.getSocketFactory();\n\n RegistryBuilder<ConnectionSocketFactory> regBuilder = RegistryBuilder.<ConnectionSocketFactory> create();\n Registry<ConnectionSocketFactory> registry = regBuilder.register(\"http\", plainSF).register(\"https\", sslsf).build();\n\n PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);\n connectionManager.setMaxTotal(200);\n connectionManager.setDefaultMaxPerRoute(100);\n connectionManager.setValidateAfterInactivity(10000); // good value for the check interval?\n connectionManager.setDefaultConnectionConfig(connectionConfig);\n\n HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();\n httpClientBuilder.setConnectionManager(connectionManager);\n\n if ( proxyDns != null ) {\n // add one step proxy support\n HttpHost proxy = new HttpHost(proxyDns, proxyPort);\n DefaultProxyRoutePlanner routePlanner = new DefaultProxyRoutePlanner(proxy);\n httpClientBuilder.setRoutePlanner(routePlanner);\n }\n\n this.client = httpClientBuilder.build();\n this.idleConnectionMonitorThread = new IdleConnectionMonitorThread(connectionManager);\n new Thread(null, this.idleConnectionMonitorThread, \"IdleConn\").start();\n }" ]
[ "0.71013623", "0.6623395", "0.6525618", "0.6511192", "0.6384099", "0.63087374", "0.6304476", "0.6259121", "0.62478507", "0.6219206", "0.6159653", "0.60996884", "0.6063432", "0.5996722", "0.59741306", "0.59211504", "0.5905486", "0.58984965", "0.5898054", "0.58961767", "0.5884406", "0.58757395", "0.5867844", "0.58612835", "0.58217746", "0.58140624", "0.5813602", "0.5804137", "0.5801498", "0.57749414", "0.57718474", "0.5764795", "0.57637805", "0.57469964", "0.5738032", "0.57310164", "0.5728142", "0.5727342", "0.5726625", "0.57199794", "0.5719048", "0.56945956", "0.56912804", "0.566855", "0.5664196", "0.5655928", "0.56342226", "0.56166065", "0.5604558", "0.5602884", "0.56026536", "0.5577544", "0.557256", "0.5559396", "0.55417854", "0.5541511", "0.5531755", "0.5531443", "0.55267155", "0.5520552", "0.55082947", "0.54951626", "0.5487589", "0.5483897", "0.547541", "0.5474134", "0.5473933", "0.54708266", "0.5445957", "0.54456985", "0.5445048", "0.54434735", "0.54399073", "0.5439285", "0.543704", "0.5428096", "0.54120964", "0.54093814", "0.5398667", "0.53981006", "0.538712", "0.53830695", "0.5380239", "0.5377387", "0.5375746", "0.5374348", "0.5371506", "0.53658587", "0.53647166", "0.53600925", "0.53595364", "0.5355608", "0.53487945", "0.5347825", "0.53461725", "0.5339835", "0.5336648", "0.53362966", "0.53328866", "0.53266704" ]
0.5957229
15
Create a threadsafe client. This client does not do redirecting, to allow us to capture correct "error" codes. proxyUri ???????????? port ????????
public static final DefaultHttpClient createHttpClient(String proxyUri, int port) { // Shamelessly cribbed from AndroidHttpClient HttpParams params = new BasicHttpParams(); HttpHost host = new HttpHost(proxyUri, port); params.setParameter(ConnRouteParams.DEFAULT_PROXY, host); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, HTTP.UTF_8); // HttpProtocolParams.setUseExpectContinue(params, true); // Turn off stale checking. Our connections break all the time anyway, // and it's not worth it to pay the penalty of checking every time. HttpConnectionParams.setStaleCheckingEnabled(params, false); // Default connection and socket timeout of 30 seconds. Tweak to taste. HttpConnectionParams.setConnectionTimeout(params, 10 * 1000); HttpConnectionParams.setSoTimeout(params, 20 * 1000); HttpConnectionParams.setSocketBufferSize(params, 8192); HttpClientParams.setRedirecting(params, true); ConnManagerParams.setTimeout(params, 5 * 1000); ConnManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(50)); ConnManagerParams.setMaxTotalConnections(params, 200); // Sets up the http part of the service. final SchemeRegistry supportedSchemes = new SchemeRegistry(); // Register the "http" protocol scheme, it is required // by the default operator to look up socket factories. final SocketFactory sf = PlainSocketFactory.getSocketFactory(); supportedSchemes.register(new Scheme("http", sf, 80)); supportedSchemes.register(new Scheme("https", SSLSocketFactory .getSocketFactory(), 443)); final ThreadSafeClientConnManager ccm = new ThreadSafeClientConnManager( params, supportedSchemes); DefaultHttpClient httpClient = new DefaultHttpClient(ccm, params); httpClient .setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler( 3, true)); // Add gzip header to requests using an interceptor httpClient.addRequestInterceptor(new GzipHttpRequestInterceptor()); // Add gzip compression to responses using an interceptor httpClient.addResponseInterceptor(new GzipHttpResponseInterceptor()); return httpClient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private OkHttpClient Create() {\n final OkHttpClient.Builder baseClient = new OkHttpClient().newBuilder()\n .connectTimeout(CONNECTION_TIMEOUT, TimeUnit.SECONDS)\n .writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS)\n .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS);\n\n // If there's no proxy just create a normal client\n if (appProps.getProxyHost().isEmpty()) {\n return baseClient.build();\n }\n\n final OkHttpClient.Builder proxyClient = baseClient\n .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(appProps.getProxyHost(), Integer.parseInt(appProps.getProxyPort()))));\n\n if (!appProps.getProxyUsername().isEmpty() && !appProps.getProxyPassword().isEmpty()) {\n\n Authenticator proxyAuthenticator;\n String credentials;\n\n credentials = Credentials.basic(appProps.getProxyUsername(), appProps.getProxyPassword());\n\n // authenticate the proxy\n proxyAuthenticator = (route, response) -> response.request().newBuilder()\n .header(\"Proxy-Authorization\", credentials)\n .build();\n proxyClient.proxyAuthenticator(proxyAuthenticator);\n }\n return proxyClient.build();\n\n }", "public HttpClientWrapper(String url, String user, String pwd, String proxyDns, int proxyPort) {\n this.url = url;\n if ( user == null && pwd == null ) {\n this.creds = null;\n } else if ( user != null && pwd != null ) {\n this.creds = new UsernamePasswordCredentials(user, pwd);\n } else {\n throw new DBCException(\"user / pwd either both null or both not null: \" + user + \" - \" + pwd);\n }\n if ( (proxyDns == null && proxyPort == 0) || (proxyDns != null && proxyPort > 0) ) {\n // ok\n } else {\n throw new DBCException(\"proxyDns / proxyPort either both null/0 or both not null/>0: \" + proxyDns + \" - \" + proxyPort);\n }\n\n this.requestConfig = RequestConfig.custom().setConnectionRequestTimeout(5000).build();\n\n SSLContext sslContext = buildSSLContext();\n SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n LOG.info(\"accepting SSLConnection for host: {}, port: {}\", session.getPeerHost(), session.getPeerPort());\n return true;\n }\n });\n\n ConnectionConfig connectionConfig = ConnectionConfig.custom().setCharset(Charset.forName(UTF_8)).build();\n PlainConnectionSocketFactory plainSF = PlainConnectionSocketFactory.getSocketFactory();\n\n RegistryBuilder<ConnectionSocketFactory> regBuilder = RegistryBuilder.<ConnectionSocketFactory> create();\n Registry<ConnectionSocketFactory> registry = regBuilder.register(\"http\", plainSF).register(\"https\", sslsf).build();\n\n PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);\n connectionManager.setMaxTotal(200);\n connectionManager.setDefaultMaxPerRoute(100);\n connectionManager.setValidateAfterInactivity(10000); // good value for the check interval?\n connectionManager.setDefaultConnectionConfig(connectionConfig);\n\n HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();\n httpClientBuilder.setConnectionManager(connectionManager);\n\n if ( proxyDns != null ) {\n // add one step proxy support\n HttpHost proxy = new HttpHost(proxyDns, proxyPort);\n DefaultProxyRoutePlanner routePlanner = new DefaultProxyRoutePlanner(proxy);\n httpClientBuilder.setRoutePlanner(routePlanner);\n }\n\n this.client = httpClientBuilder.build();\n this.idleConnectionMonitorThread = new IdleConnectionMonitorThread(connectionManager);\n new Thread(null, this.idleConnectionMonitorThread, \"IdleConn\").start();\n }", "public LoginInfoClientProxy(URL proxyURL) {\n this.proxyURL = proxyURL;\n }", "HttpProxy(final Integer port,\n final Integer securePort,\n final Integer socksPort,\n final Integer directLocalPort,\n final Integer directLocalSecurePort,\n final String directRemoteHost,\n final Integer directRemotePort) {\n\n this.port = port;\n this.securePort = securePort;\n this.socksPort = socksPort;\n this.directLocalPort = directLocalPort;\n this.directLocalSecurePort = directLocalSecurePort;\n this.directRemoteHost = directRemoteHost;\n this.directRemotePort = directRemotePort;\n\n hasStarted = SettableFuture.create();\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n ChannelFuture httpChannel = createHTTPChannel(port, securePort);\n ChannelFuture httpsChannel = createHTTPSChannel(securePort);\n ChannelFuture socksChannel = createSOCKSChannel(socksPort, port);\n ChannelFuture directChannel = createDirectChannel(directLocalPort, directRemoteHost, directRemotePort);\n ChannelFuture directSecureChannel = createDirectSecureChannel(directLocalSecurePort, directRemoteHost, directRemotePort);\n\n if (httpChannel != null) {\n // create system wide proxy settings for HTTP CONNECT\n proxyStarted(port, false);\n }\n if (socksChannel != null) {\n // create system wide proxy settings for SOCKS\n proxyStarted(socksPort, true);\n }\n hasStarted.set(\"STARTED\");\n\n waitForClose(httpChannel);\n waitForClose(httpsChannel);\n waitForClose(socksChannel);\n waitForClose(directChannel);\n waitForClose(directSecureChannel);\n } catch (Exception ie) {\n logger.error(\"Exception while running proxy channels\", ie);\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n }\n }).start();\n\n try {\n // wait for proxy to start all channels\n hasStarted.get();\n } catch (Exception e) {\n logger.debug(\"Exception while waiting for proxy to complete starting up\", e);\n }\n }", "private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }", "public interface ProxyConnector {\n\n /**\n * Comprueba que se cumplan los requisitos para la conexi&oacute;n con el servicio proxy.\n * @throws IOException Cuando ocurre alg&uacute;n error en la comprobaci&oacute;n.\n */\n void init() throws IOException;\n\n /**\n * Comprueba si el servicio configurado pertenece a un proxy compatible.\n * @return {@code true} si el proxy configurado es compatible, {@code false} en caso contrario.\n * @throws IOException Cuando se produce un error al conectarse al proxy.\n */\n boolean isCompatibleService() throws IOException;\n\n /**\n * Indica si el servicio de Portafirmas correspondiente a este conector requiere un proceso\n * de login previo.\n * @return {@code true} si el servicio requiere login, {@code false} en caso contrario.\n */\n boolean needLogin();\n\n /**\n * Solicita el acceso para el usuario.\n * @return Respuesta a la petici&oacute;n con el token de acceso.\n * @throws Exception Cuando ocurre un error en la comunicaci&oacute;n.\n */\n RequestResult loginRequest() throws Exception;\n\n /**\n * Envia el token de acceso firmado al servidor para validar el acceso del usuario.\n * @param pkcs1 Firma PKCS#1 del token de acceso.\n * @param cert Certificado usado para firmar.\n * @return @code true} si el acceso se completo correctamente, {@code false} en caso contrario.\n * @throws Exception Cuando ocurre un error en la comunicaci&oacute;n.\n */\n boolean tokenValidation(byte[] pkcs1, String cert) throws Exception;\n\n /**\n * Env&aacute;a una solicitud de cierre de sesi&oacute;n.\n * @throws Exception Cuando se produce un error en la comunicaci&oacute;n.\n */\n void logoutRequest() throws Exception;\n\n /**\n * Obtiene la peticiones de firma. Las peticiones devueltas deben cumplir\n * las siguientes condiciones:\n * <ul>\n * <li>Estar en el estado se&ntilde;alado (unresolved, signed o rejected).</li>\n * <li>Que todos los documentos que contiene se tengan que firmar con los\n * formatos de firma indicados (s&oacute;lo si se indica alguno)</li>\n * <li>Que las solicitudes cumplan con los filtros establecidos. Estos\n * filtros tendran la forma: key=value</li>\n * </ul>\n * @param signRequestState Estado de las peticiones que se desean obtener.\n * @param filters\n * Listado de filtros que deben cumplir las peticiones\n * recuperadas. Los filtros soportados son:\n * <ul>\n * <li><b>orderAscDesc:</b> con valor \"asc\" para que sea orden\n * ascendente en la consulta, en cualquier otro caso ser&aacute;\n * descendente</li>\n * <li><b>initDateFilter:</b> fecha de inicio de las peticiones</li>\n * <li><b>endDateFilter:</b> fecha de fin de las peticiones</li>\n * <li><b>orderAttribute:</b> par&aacute;metro para ordenar por\n * una columna de la petici&oacute;n</li>\n * <li><b>searchFilter:</b> busca la cadena introducida en\n * cualquier texto de la petici&oacute;n (asunto, referencia,\n * etc)</li>\n * <li><b>labelFilter:</b> texto con el nombre de una etiqueta.\n * Filtra las peticiones en base a esa etiqueta, ej: \"IMPORTANTE\"\n * </li>\n * <li><b>applicationFilter:</b> texto con el identificador de\n * una aplicaci&oacute;n. Filtra las peticiones en base a la\n * aplicaci&oacute;n, ej: \"SANCIONES\"</li>\n * </ul>\n * @param numPage N&uacute;mero de p&aacute;gina del listado.\n * @param pageSize N&uacute;mero de peticiones por p&aacute;gina.\n * @return Lista de peticiones de firma\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n PartialSignRequestsList getSignRequests(\n String signRequestState, String[] filters, int numPage, int pageSize)\n throws SAXException, IOException;\n\n /** Inicia la pre-firma remota de las peticiones.\n * @param request Petici&oacute;n de firma.\n * @return Prefirmas de las peticiones enviadas.\n * @throws IOException Si ocurre algun error durante el tratamiento de datos.\n * @throws CertificateEncodingException Si no se puede obtener la codificaci&oacute;n del certificado.\n * @throws SAXException Si ocurren errores analizando el XML de respuesta. */\n TriphaseRequest[] preSignRequests(SignRequest request) throws IOException,\n CertificateException,\n SAXException;\n\n /**\n * Inicia la post-firma remota de las peticiones.\n *\n * @param requests\n * Peticiones a post-firmar\n * @return Listado con el resultado de la operaci&oacute;n de firma de cada\n * petici&oacute;n.\n * @throws IOException\n * Si ocurre algun error durante el proceso\n * @throws CertificateEncodingException\n * Cuando el certificado est&aacute; mal codificado.\n * @throws SAXException\n * Si ocurren errores analizando el XML de respuesta\n */\n RequestResult postSignRequests(TriphaseRequest[] requests) throws IOException,\n CertificateEncodingException, SAXException;\n\n /**\n * Obtiene los datos de un documento.\n *\n * @param requestId\n * Identificador de la petici&oacute;n.\n * @return Datos del documento.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;\n\n /**\n * Obtiene el listado de aplicaciones para las que hay peticiones de firma.\n * @return Configuracion de aplicaci&oacute;n.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n AppConfiguration getApplicationList()\n throws SAXException, IOException;\n\n /**\n * Rechaza las peticiones de firma indicadas.\n *\n * @param requestIds\n * Identificadores de las peticiones de firma que se quieren\n * rechazar.\n * @return Resultado de la operacion para cada una de las peticiones de\n * firma.\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n RequestResult[] rejectRequests(String[] requestIds,\n String reason) throws SAXException, IOException;\n\n /** Obtiene la previsualizaci&oacute;n de un documento.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewDocument(String documentId,\n String filename,\n String mimetype) throws IOException;\n\n /** Obtiene la previsualizaci&oacute;n de una firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewSign(String documentId,\n String filename) throws IOException;\n\n /** Obtiene la previsualizaci&oacute;n de un informe de firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewReport(String documentId,\n String filename, String mimetype) throws IOException;\n\n /**\n * Aprueba peticiones de firma (les da el visto bueno).\n *\n * @param requestIds\n * Identificador de las peticiones.\n * @return Resultado de la operaci&oacute;n.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestResult[] approveRequests(String[] requestIds) throws SAXException, IOException;\n\n /**\n * Indica si el conector soporta las funciones de notificaci&oacute;n.\n * @return {@code true} si se soportan las notificaciones, {@code false} en caso contrario.\n */\n boolean isNotificationsSupported();\n\n /**\n * Da de alta en el sistema de notificaciones.\n * @param token\n * \t\t\tToken de registro en GCM.\n * @param device\n * \t\t\tIdentificador de dispositivo.\n * @param certB64\n * \t\t\tCertificado en base 64 del usuario.\n * @return Resultado del proceso de alta en el sistema de notificaciones.\n * \t\t\tIndica\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n NotificationState signOnNotificationService(\n String token, String device, String certB64)\n throws SAXException, IOException;\n\n\n}", "public Proxy(){\n\t\tthis.useProxy = false;\n\t\tthis.host = null;\n\t\tthis.port = -1;\n\t}", "@Override\n public SessionClient build() {\n Supplier<CompletableFuture<SessionClient>> proxyFactory = () -> CompletableFuture.completedFuture(\n new DefaultRaftSessionClient(\n primitiveName,\n primitiveType,\n serviceConfig,\n partitionId,\n DefaultRaftClient.this.protocol,\n selectorManager,\n sessionManager,\n readConsistency,\n communicationStrategy,\n threadContextFactory.createContext(),\n minTimeout,\n maxTimeout));\n\n SessionClient proxy;\n\n ThreadContext context = threadContextFactory.createContext();\n\n // If the recovery strategy is set to RECOVER, wrap the builder in a recovering proxy client.\n if (recoveryStrategy == Recovery.RECOVER) {\n proxy = new RecoveringSessionClient(\n clientId,\n partitionId,\n primitiveName,\n primitiveType,\n proxyFactory,\n context);\n } else {\n proxy = proxyFactory.get().join();\n }\n\n // If max retries is set, wrap the client in a retrying proxy client.\n if (maxRetries > 0) {\n proxy = new RetryingSessionClient(\n proxy,\n context,\n maxRetries,\n retryDelay);\n }\n return new BlockingAwareSessionClient(proxy, context);\n }", "public DefaultHttpClientImpl() {\n SchemeRegistry schemeRegistry = new SchemeRegistry();\n schemeRegistry.register(new Scheme(\n \"http\", PlainSocketFactory.getSocketFactory(), 80));\n\n schemeRegistry.register(new Scheme(\n \"https\", SSLSocketFactory.getSocketFactory(), 443));\n conman = new ThreadSafeClientConnManager(params, schemeRegistry);\n }", "ConnectionClientTransport newClientTransport(SocketAddress serverAddress, String authority,\n @Nullable String userAgent, @Nullable ProxyParameters proxy);", "private HttpClient getTemplateServerClient(String remoteSource) throws IOException {\n\n SocketFactory factory = (SocketFactory)mSocketFactories.get(remoteSource);\n\n if (factory == null) {\n\n int port = 80;\n String host = remoteSource.substring(TEMPLATE_LOAD_PROTOCOL.length());\n\n int portIndex = host.indexOf(\"/\");\n \n if (portIndex >= 0) {\n host = host.substring(0,portIndex); \n }\n String hostPort = host; \n portIndex = host.indexOf(\":\");\n if (portIndex >= 0) {\n try {\n port = Integer.parseInt(host.substring(portIndex+1));\n }\n catch (NumberFormatException nfe) {\n System.out.println(\"Invalid port number specified\");\n }\n host = host.substring(0,portIndex);\n }\n factory = new PooledSocketFactory(new PlainSocketFactory(InetAddress.getByName(host), \n port, 5000));\n \n if (factory != null) {\n mSocketFactories.put(hostPort, factory);\n }\n }\n return new HttpClient(factory);\n }", "Proxy getProxy();", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt, boolean paramBoolean) throws IOException {\n/* 143 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt, paramBoolean);\n/* */ }", "private CloseableHttpAsyncClient createHttpClient() {\n RequestConfig.Builder requestConfigBuilder = RequestConfig.custom()\n .setConnectTimeout(Timeout.ofMilliseconds(DEFAULT_CONNECT_TIMEOUT_MILLIS))\n .setResponseTimeout(Timeout.ofMilliseconds(DEFAULT_RESPONSE_TIMEOUT_MILLIS));\n if (requestConfigCallback != null) {\n requestConfigBuilder = requestConfigCallback.customizeRequestConfig(requestConfigBuilder);\n }\n\n try {\n final TlsStrategy tlsStrategy = ClientTlsStrategyBuilder.create()\n .setSslContext(SSLContext.getDefault())\n // See https://issues.apache.org/jira/browse/HTTPCLIENT-2219\n .setTlsDetailsFactory(new Factory<SSLEngine, TlsDetails>() {\n @Override\n public TlsDetails create(final SSLEngine sslEngine) {\n return new TlsDetails(sslEngine.getSession(), sslEngine.getApplicationProtocol());\n }\n })\n .build();\n\n final PoolingAsyncClientConnectionManager connectionManager = PoolingAsyncClientConnectionManagerBuilder.create()\n .setMaxConnPerRoute(DEFAULT_MAX_CONN_PER_ROUTE)\n .setMaxConnTotal(DEFAULT_MAX_CONN_TOTAL)\n .setTlsStrategy(tlsStrategy)\n .build();\n\n HttpAsyncClientBuilder httpClientBuilder = HttpAsyncClientBuilder.create()\n .setDefaultRequestConfig(requestConfigBuilder.build())\n .setConnectionManager(connectionManager)\n .setTargetAuthenticationStrategy(DefaultAuthenticationStrategy.INSTANCE)\n .disableAutomaticRetries();\n if (httpClientConfigCallback != null) {\n httpClientBuilder = httpClientConfigCallback.customizeHttpClient(httpClientBuilder);\n }\n\n final HttpAsyncClientBuilder finalBuilder = httpClientBuilder;\n return AccessController.doPrivileged((PrivilegedAction<CloseableHttpAsyncClient>) finalBuilder::build);\n } catch (NoSuchAlgorithmException e) {\n throw new IllegalStateException(\"could not create the default ssl context\", e);\n }\n }", "private void httpProxyConnect(String host, int port) throws IOException {\n // connect to the proxy\n // _proxyPort validated in superconstrutor, no need to set default here\n if (_fetchHeaderTimeout > 0) {\n _proxy = new Socket();\n _proxy.setSoTimeout(_fetchHeaderTimeout);\n _proxy.connect(new InetSocketAddress(_proxyHost, _proxyPort), _fetchHeaderTimeout);\n } else {\n _proxy = new Socket(_proxyHost, _proxyPort);\n }\n httpProxyConnect(_proxy, host, port);\n }", "private HttpProxy createHttpServerConnection() {\n\n final HttpProxy httpProxy = httpConnectionFactory.create();\n\n // TODO: add configurable number of attempts, instead of looping forever\n boolean connected = false;\n while (!connected) {\n LOGGER.debug(\"Attempting connection to HTTP server...\");\n connected = httpProxy.connect();\n }\n\n LOGGER.debug(\"Connected to HTTP server\");\n\n return httpProxy;\n }", "public Object call() throws Exception {\n\t\t\t\t\t\tProducerSimpleNettyResponseFuture future;\n\t\t\t\t\t\tProducerSimpleNettyResponse responseFuture;\n\t\t\t\t\t\tfuture = clientProxy.request(message);\n\t\t\t\t\t\tresponseFuture = future\n\t\t\t\t\t\t\t\t.get(3000, TimeUnit.MILLISECONDS);\n\t\t\t\t\t\treturn responseFuture.getResponse();\n\t\t\t\t\t}", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt) throws IOException {\n/* 127 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt);\n/* */ }", "private DefaultHttpClient createHttpClient()\n throws IOException\n {\n XCapCredentialsProvider credentialsProvider\n = new XCapCredentialsProvider();\n credentialsProvider.setCredentials(\n AuthScope.ANY,\n new UsernamePasswordCredentials(getUserName(), password));\n\n return HttpUtils.getHttpClient(\n null , null, uri.getHost(), credentialsProvider);\n }", "public JDispatcherService getClientProxy() {\n\t\t try {\r\n\t\t\t Bundle bundle = Platform.getBundle(\"au.edu.unimelb.plantcell.io.ws.multialign\");\r\n\t\t\t URL u = FileLocator.find(bundle, new Path(\"META-INF/wsdl/tcoffee.wsdl\"), null);\r\n\t\t\t \r\n\t\t\t // must not call default constructor for local WSDL... so...\r\n\t\t\t JDispatcherService_Service cli = new JDispatcherService_Service(u,\r\n\t\t\t\t\t new QName(\"http://soap.jdispatcher.ebi.ac.uk\", \"JDispatcherService\"));\r\n\t\t\t return cli.getJDispatcherServiceHttpPort();\r\n\t\t } catch (Exception e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t Logger.getAnonymousLogger().warning(\"Unable to get TCoffee proxy: \"+e.getMessage());\r\n\t\t\t return null;\r\n\t\t }\r\n\t}", "private void httpProxyConnect(Socket proxy, String host, int port) throws IOException {\n _proxyIn = _proxy.getInputStream();\n _proxyOut = _proxy.getOutputStream();\n StringBuilder buf = new StringBuilder(64);\n buf.append(\"CONNECT \").append(host).append(':').append(port).append(\" HTTP/1.1\\r\\n\");\n // TODO if we need extra headers to the proxy, add a new method and list.\n // Standard extra headers go the server, not the proxy\n //if (_extraPHeaders != null) {\n // for (String hdr : _extraPHeaders) {\n // buf.append(hdr).append(\"\\r\\n\");\n //}\n if (_authState != null && _authState.authMode != AUTH_MODE.NONE) {\n // TODO untested, is this right?\n buf.append(\"Proxy-Authorization: \");\n buf.append(_authState.getAuthHeader(\"CONNECT\", host));\n buf.append(\"\\r\\n\");\n }\n buf.append(\"\\r\\n\");\n _proxyOut.write(DataHelper.getUTF8(buf.toString()));\n _proxyOut.flush();\n\n // read the proxy response\n _aborted = false;\n readHeaders();\n if (_aborted)\n throw new IOException(\"Timed out reading the proxy headers\");\n if (_responseCode == 407) {\n // TODO\n throw new IOException(\"Authorization unsupported on HTTP Proxy\");\n } else if (_responseCode != 200) {\n // readHeaders() will throw on most errors, but here we ensure it is 200\n throw new IOException(\"Invalid proxy response: \" + _responseCode + ' ' + _responseText);\n }\n if (_redirectLocation != null)\n throw new IOException(\"Proxy redirect not allowed\");\n }", "public void initProxy() {\n\n System.setProperty(\"http.proxyHost\", \"199.101.97.159\"); // set proxy server\n System.setProperty(\"http.proxyPort\", \"60099\"); // set proxy port\n //System.setProperty(\"http.proxyUser\", authUser);\n //System.setProperty(\"http.proxyPassword\", authPassword);\n Authenticator.setDefault(\n new Authenticator() {\n @Override\n public PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\n authUser, authPassword.toCharArray());\n }\n }\n );\n }", "public interface Client {\n\n\t/**\n\t * @throws Http2Exception\n\t */\n\tvoid init() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean start() throws Http2Exception;\n\n\t/**\n\t * @param request\n\t * @return\n\t * @throws Http2Exception\n\t */\n\t Http2Response request(Http2Request request) throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean isRuning() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean shutdown() throws Http2Exception;\n\n}", "public ClientBuilder proxy(@Nullable Proxy proxy) {\n this.proxy = proxy;\n return this;\n }", "public MyProxyLogon() {\n super();\n host = System.getenv(\"MYPROXY_SERVER\");\n if (host == null) {\n host = \"myproxy.teragrid.org\";\n }\n String portString = System.getenv(\"MYPROXY_SERVER_PORT\");\n if (portString != null) {\n port = Integer.parseInt(portString);\n }\n username = System.getProperty(\"user.name\");\n }", "public GRIDAClient(String host, int port, String proxyPath) {\n\n super(host, port, proxyPath);\n }", "static Http1Client create() {\n return create(Http1ClientConfig.create());\n }", "public WebSocketClient(URI uri) {\n this.globalLock = new Object();\n this.uri = uri;\n this.secureRandom = new SecureRandom();\n this.connectTimeout = 0;\n this.readTimeout = 0;\n this.automaticReconnection = false;\n this.waitTimeBeforeReconnection = 0;\n this.isRunning = false;\n this.headers = new HashMap<String, String>();\n webSocketConnection = new WebSocketConnection();\n }", "public static Object httpClient() {\n return new Object();\n// return HttpClient.newBuilder()\n// .version(HttpClient.Version.HTTP_1_1)\n// .followRedirects(HttpClient.Redirect.NORMAL)\n// .connectTimeout(Duration.ofSeconds(300))\n// .build();\n }", "public ProxyConfig createProxyConfig();", "private ResourceClient( ResourceConfigurationBase<?> theConfiguration, String theContractRoot, String theContractVersion, String theUserAgent, HttpClient theClient, JsonTranslationFacility theJsonFacility ) {\r\n\t\tPreconditions.checkNotNull( theConfiguration, \"need a configuration object so we can get our endpoint\" );\r\n \tPreconditions.checkArgument( !Strings.isNullOrEmpty( theContractRoot ), \"need a contract root\" );\r\n \tPreconditions.checkArgument( theContractRoot.startsWith( \"/\" ), \"the contract root '%s' must be a reference from the root (i.e. start with '/')\", theContractRoot );\r\n \tPreconditions.checkArgument( !Strings.isNullOrEmpty( theContractVersion ), \"need a version for contract root '%s'\", theContractRoot );\r\n \tPreconditions.checkArgument( ContractVersion.isValidVersion( theContractVersion), \"the version string '%s' for contract root '%s' is not valid\", theContractVersion, theContractRoot );\r\n\t\tPreconditions.checkArgument( !Strings.isNullOrEmpty( theUserAgent ), \"need a user agent for this client\" );\r\n\r\n\t\t// lets make sure the configuration is valid\r\n\t\ttheConfiguration.validate();\r\n\t\t\r\n\t\t// now let's start preparing the client\r\n\t\tendpoint = new HttpEndpoint( theConfiguration.getEndpoint( ) ); // this will do validation on the endpoint \r\n\t\tcontractRoot = theContractRoot; \r\n\t\tcontractVersion = theContractVersion;\r\n\t\tuserAgent = theUserAgent;\r\n\t\t\r\n\t\t// use the client if sent in, but create a working one otherwise\r\n\t\tif( theClient == null ) {\r\n\t\t\ttry {\r\n\t\t\t SslContextFactory sslContextFactory = null;\r\n\t\r\n\t\t\t if( endpoint.isSecure( ) ) {\r\n\t\t\t \tif( theConfiguration.getAllowUntrustedSsl() ) {\r\n\t\t\t \t\t// so we need SSL communication BUT we don't need to worry about it being valid, likley\r\n\t\t\t \t\t// because the caller is self-cert'ing or in early development ... we may need to do \r\n\t\t\t \t\t// more here mind you\r\n\t\t\t \t\t\r\n\t\t\t\t \t// the following code was based https://code.google.com/p/misc-utils/wiki/JavaHttpsUrl\r\n\t\t\t\t \t// if we were to look into mutual SSL and overall key handling, I probably want to\r\n\t\t\t\t \t// take a closer look\r\n\t\t\t\t \t\r\n\t\t\t\t \t// We need to create a trust manager that essentially doesn't except/fail checks\r\n\t\t\t\t\t final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\r\n\t\t\t\t\t \t// this was based on the code found here:\r\n\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void checkClientTrusted(X509Certificate[] chain,\r\n\t\t\t\t\t\t\t\t\tString authType) throws CertificateException {\r\n\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\tpublic void checkServerTrusted(X509Certificate[] chain,\r\n\t\t\t\t\t\t\t\t\tString authType) throws CertificateException {\r\n\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\tpublic X509Certificate[] getAcceptedIssuers() {\r\n\t\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t } };\r\n\t\t\t\t\t \r\n\t\t\t\t\t // then we need to create an SSL context that uses lax trust manager \r\n\t\t\t\t\t SSLContext sslContext = SSLContext.getInstance( \"SSL\" );\r\n\t\t\t\t\t\tsslContext.init( null, trustAllCerts, new java.security.SecureRandom() );\r\n\t\r\n\t\t\t\t\t\t// and finally, create the SSL context that\r\n\t\t\t\t\t\tsslContextFactory = new SslContextFactory();\r\n\t\t\t\t\t\tsslContextFactory.setSslContext( sslContext );\r\n\t\t\t \t} else {\r\n\t\t\t \t\t// TODO: this needs to be tested against \r\n\t\t\t \t\t//\t\t a) real certs with real paths that aren't expired\r\n\t\t\t \t\t//\t\t b) real certs with real paths that are expired\r\n\t\t\t \t\tsslContextFactory = new SslContextFactory( );\r\n\t\t\t \t}\r\n\t\t\t\t\thttpClient = new HttpClient( sslContextFactory );\r\n\t\t\t } else {\r\n\t\t\t\t\thttpClient = new HttpClient( );\r\n\t\t\t }\r\n\t\t\t httpClient.setFollowRedirects( false ); // tales doesn't have redirects (at least not yet)\r\n\t\t\t httpClient.setStrictEventOrdering( true ); // this seems to fix an odd issue on back-to-back calls to the same service on \r\n\t\t\t\thttpClient.start( );\r\n\t\t\t displayClientConfiguration( httpClient );\r\n\t\t\t} catch (NoSuchAlgorithmException | KeyManagementException e) {\r\n\t\t\t\tthrow new IllegalStateException( \"unable to create the resource client due to a problem setting up SSL\", e );\r\n\t\t\t} catch (Exception e ) {\r\n\t\t\t\tthrow new IllegalStateException( \"unable to create the resource client due to the inability to start the HttpClient\", e );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\thttpClient = theClient;\r\n\t\t}\r\n\t\thttpClient.setUserAgentField( new HttpField( HttpHeader.USER_AGENT, theUserAgent ) );\r\n\r\n\t\tif( theJsonFacility == null ) {\r\n\t\tjsonFacility = new JsonTranslationFacility( new DataContractTypeSource( ) );\r\n\t\t} else {\r\n\t\t\tjsonFacility = theJsonFacility;\r\n\t\t}\r\n\t\t\r\n\t\tjsonParser = new JsonParser( );\r\n\t\t\r\n\t\t// now that we have the json facility, let's \r\n\t\t// get the adapter for the result type\r\n\t\tJavaType type = new JavaType( ResourceResult.class );\r\n\t\tJsonTypeMap typeMap = jsonFacility.generateTypeMap( type ); // TODO: technically I can, if I have the type of the result, now do the full thing (need to have a field for it)\r\n\t\tresultTypeAdapter = new TypeFormatAdapter( \r\n\t\t\t\ttype,\r\n\t\t\t\ttypeMap.getReflectedType().getName(),\r\n \t\t\tnew JsonObjectToObjectTranslator( typeMap ),\r\n \t\t\tnew ObjectToJsonObjectTranslator( typeMap ) );\t\t\t\t\r\n\t}", "public void process()\n {\n ClientRequest clientRequest = threadPool.remove();\n\n if (clientRequest == null)\n {\n return;\n }\n\n\n // Do the work\n // Create new Client\n ServiceLogger.LOGGER.info(\"Building client...\");\n Client client = ClientBuilder.newClient();\n client.register(JacksonFeature.class);\n\n // Get uri\n ServiceLogger.LOGGER.info(\"Getting URI...\");\n String URI = clientRequest.getURI();\n\n ServiceLogger.LOGGER.info(\"Getting endpoint...\");\n String endpointPath = clientRequest.getEndpoint();\n\n // Create WebTarget\n ServiceLogger.LOGGER.info(\"Building WebTarget...\");\n WebTarget webTarget = client.target(URI).path(endpointPath);\n\n // Send the request and save it to a Response\n ServiceLogger.LOGGER.info(\"Sending request...\");\n Response response = null;\n if (clientRequest.getHttpMethodType() == Constants.getRequest)\n {\n // Create InvocationBuilder\n ServiceLogger.LOGGER.info(\"Starting invocation builder...\");\n Map<String, Object> queryMap = clientRequest.getQueryParams();\n String pathParam = clientRequest.getPathParam();\n\n if (pathParam != null)\n {\n webTarget = webTarget.path(pathParam);\n }\n\n if (queryMap != null)\n {\n ServiceLogger.LOGGER.info(\"QUERY MAP NOT NULL.\");\n for (Map.Entry<String, Object> entry : queryMap.entrySet())\n {\n webTarget = webTarget.queryParam(entry.getKey(), entry.getValue());\n }\n }\n ServiceLogger.LOGGER.info(\"WEBTARGET: \" + webTarget.toString());\n\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\n ServiceLogger.LOGGER.info(\"Got a GET request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .get();\n }\n else if (clientRequest.getHttpMethodType() == Constants.postRequest)\n {\n // Create InvocationBuilder\n ServiceLogger.LOGGER.info(\"Starting invocation builder...\");\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Map<String, Object> queryMap = clientRequest.getQueryParams();\n\n if (queryMap != null)\n {\n ServiceLogger.LOGGER.info(\"QUERY MAP NOT NULL.\");\n for (Map.Entry<String, Object> entry : queryMap.entrySet())\n {\n webTarget = webTarget.queryParam(entry.getKey(), entry.getValue());\n }\n }\n ServiceLogger.LOGGER.info(\"WEBTARGET: \" + webTarget.toString());\n\n ServiceLogger.LOGGER.info(\"Got a POST request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .post(Entity.entity(clientRequest.getRequest(), MediaType.APPLICATION_JSON));\n }\n else if (clientRequest.getHttpMethodType() == Constants.deleteRequest)\n {\n String pathParam = clientRequest.getPathParam();\n if (pathParam != null)\n {\n webTarget = webTarget.path(pathParam);\n }\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\n ServiceLogger.LOGGER.info(\"Got a DELETE request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .delete();\n }\n else\n {\n ServiceLogger.LOGGER.warning(ANSI_YELLOW + \"Request was not sent successfully\");\n }\n ServiceLogger.LOGGER.info(ANSI_GREEN + \"Sent!\" + ANSI_RESET);\n\n // Check status code of request\n String jsonText = \"\";\n int httpstatus = response.getStatus();\n\n jsonText = response.readEntity(String.class);\n\n // Add response to database\n String email = clientRequest.getEmail();\n String sessionID = clientRequest.getSessionID();\n ResponseDatabase.insertResponseIntoDB(clientRequest.getTransactionID(), jsonText, email, sessionID, httpstatus);\n\n }", "private void internalHttpProxyConnect(String host, int port) throws IOException {\n // connect to the proxy\n _proxy = InternalSocket.getSocket(_proxyHost, _proxyPort);\n httpProxyConnect(_proxy, host, port);\n }", "public ResponseFromHTTP makeRequest() throws CustomRuntimeException\n\t{\n\t\tResponseFromHTTP result=null;\n\t\tCloseableHttpClient httpclient=null;\n\t\tCloseableHttpResponse response=null;\n\t\tboolean needAuth=false;\n\t\tboolean viaProxy=httpTransportInfo.isUseProxy() && StringUtils.isNotBlank(httpTransportInfo.getProxyHost());\n\n\t\tHttpHost target = new HttpHost(httpTransportInfo.getHost(), httpTransportInfo.getPort(),httpTransportInfo.getProtocol());\n\t\t//basic auth for request\n\t\tCredentialsProvider credsProvider = new BasicCredentialsProvider();\n\t\tif(StringUtils.isNotBlank(httpTransportInfo.getLogin()) && \n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getPassword()))\n\t\t{\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(target.getHostName(), target.getPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getLogin(), httpTransportInfo.getPassword()));\n\t\t\tneedAuth=true;\n\t\t}\n\n\t\t//proxy auth?\n\t\tif(viaProxy && StringUtils.isNotBlank(httpTransportInfo.getProxyLogin()) &&\n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getProxyPassword()))\n\t\t{\n\t\t\t//proxy auth setting\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(httpTransportInfo.getProxyHost(), httpTransportInfo.getProxyPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getProxyLogin(), httpTransportInfo.getProxyPassword()));\n\t\t}\n\n\t\ttry\n\t\t{\n\n\t\t\tHttpClientBuilder httpclientBuilder = HttpClients.custom()\n\t\t\t\t\t.setDefaultCredentialsProvider(credsProvider);\n\t\t\t//https\n\t\t\tif(\"https\".equalsIgnoreCase(httpTransportInfo.getProtocol()))\n\t\t\t{\n\t\t\t\t//A.K. - Set stub for check certificate - deprecated from 4.4.1\n\t\t\t\tSSLContextBuilder sslContextBuilder=SSLContexts.custom();\n\t\t\t\tTrustStrategyLZ trustStrategyLZ=new TrustStrategyLZ();\n\t\t\t\tsslContextBuilder.loadTrustMaterial(null,trustStrategyLZ);\n\t\t\t\tSSLContext sslContext = sslContextBuilder.build();\n\t\t\t\tSSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n\t\t\t\thttpclientBuilder.setSSLSocketFactory(sslsf);\n\t\t\t}\n\n\t\t\thttpclient=httpclientBuilder.build();\n\n\t\t\t//timeouts\n\t\t\tBuilder builder = RequestConfig.custom()\n\t\t\t\t\t.setSocketTimeout(httpTransportInfo.getSocketTimeoutSec()*1000)\n\t\t\t\t\t.setConnectTimeout(httpTransportInfo.getConnectTimeoutSec()*1000);\n\n\t\t\t//via proxy?\n\t\t\tif(viaProxy)\n\t\t\t{\n\t\t\t\t//proxy setting\n\t\t\t\tHttpHost proxy = new HttpHost(httpTransportInfo.getProxyHost(),httpTransportInfo.getProxyPort(),httpTransportInfo.getProxyProtocol());\n\t\t\t\tbuilder.setProxy(proxy);\n\t\t\t}\n\n\t\t\tRequestConfig requestConfig=builder.build();\n\n\t\t\t// Create AuthCache instance\n\t\t\tAuthCache authCache = new BasicAuthCache();\n\t\t\t// Generate BASIC scheme object and add it to the local\n\t\t\t// auth cache\n\t\t\tBasicScheme basicAuth = new BasicScheme();\n\t\t\tauthCache.put(target, basicAuth);\n\n\t\t\t// Add AuthCache to the execution context\n\t\t\tHttpClientContext localContext = HttpClientContext.create();\n\t\t\tlocalContext.setAuthCache(authCache);\n\n\t\t\tPathParser parsedPath=new PathParser(getUri());\n\t\t\tif(restMethodDef.isUseOriginalURI())\n\t\t\t{\n\t\t\t\t//in this case params from URI will not add to all params\n\t\t\t\tparsedPath.getParams().clear();\n\t\t\t}\n\t\t\tparsedPath.getParams().addAll(getRequestDefinition().getParams());\n\t\t\t//prepare URI\n\t\t\tURIBuilder uriBuilder = new URIBuilder().setPath(parsedPath.getUri());\n\t\t\tif(!getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\t//form's parameters - GET/DELETE/OPTIONS/PUT\n\t\t\t\tfor(NameValuePair nameValuePair : parsedPath.getParams())\n\t\t\t\t{\n\t\t\t\t\turiBuilder.setParameter(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tURI resultUri =(restMethodDef.isUseOriginalURI())?new URI(getUri()):uriBuilder.build();\n\n\t\t\t//\t\t\tHttpRequestBase httpPostOrGet=(getRequestDefinition().isHttpMethodPost())?\n\t\t\t//\t\t\t\t\tnew HttpPost(resultUri):\n\t\t\t//\t\t\t\t\tnew HttpGet(resultUri);\n\n\t\t\tHttpRequestBase httpPostOrGetEtc=null;\n\t\t\t//\n\t\t\tswitch(getRequestDefinition().getHttpMethod())\n\t\t\t{\n\t\t\t\tcase POST: httpPostOrGetEtc=new HttpPost(resultUri);break;\n\t\t\t\tcase DELETE: httpPostOrGetEtc=new HttpDelete(resultUri);break;\n\t\t\t\tcase OPTIONS: httpPostOrGetEtc=new HttpOptions(resultUri);break;\n\t\t\t\tcase PUT: httpPostOrGetEtc=new HttpPut(resultUri);break;\n\n\t\t\t\tdefault: httpPostOrGetEtc=new HttpGet(resultUri);break;\n\t\t\t}\n\n\t\t\t//Specifie protocol version\n\t\t\tif(httpTransportInfo.isVersionHttp10())\n\t\t\t\thttpPostOrGetEtc.setProtocolVersion(HttpVersion.HTTP_1_0);\n\n\t\t\t//user agent\n\t\t\thttpPostOrGetEtc.setHeader(HttpHeaders.USER_AGENT,httpTransportInfo.getUserAgent());\n\t\t\t//заголовки из запроса\n\t\t\tif(getRequestDefinition().getHeaders().size()>0)\n\t\t\t{\n\t\t\t\tfor(NameValuePair nameValuePair : getRequestDefinition().getHeaders())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getName()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Additional HTTP headers from httpTransportInfo\n\t\t\tif(httpTransportInfo.getAddHeaders()!=null)\n\t\t\t{\n\t\t\t\tfor(Map.Entry<String, String> entry:httpTransportInfo.getAddHeaders().entrySet())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(entry.getKey()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(entry.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(entry.getKey(),entry.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\thttpPostOrGetEtc.setConfig(requestConfig);\n\t\t\t//Form's parameters, request POST\n\t\t\tif(getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t\telse if(parsedPath.getParams().size()>0)\n\t\t\t\t{\n\t\t\t\t\tUrlEncodedFormEntity entityForm = new UrlEncodedFormEntity(parsedPath.getParams(), httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(entityForm);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Body for PUT\n\t\t\tif(getRequestDefinition().getHttpMethod()==HttpMethod.PUT)\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPut) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresponse = httpclient.execute(target, httpPostOrGetEtc, (needAuth)?localContext:null);\n\t\t\t//response.\n\t\t\tHttpEntity entity = response.getEntity();\n\t\t\tif(entity!=null)\n\t\t\t{\n\t\t\t\t//charset\n\t\t\t\tContentType contentType = ContentType.get(entity);\n\t\t\t\tString currentCharSet=httpTransportInfo.getCharset();\n\t\t\t\tif(contentType!=null)\n\t\t\t\t{\n\t\t\t\t\t//String mimeType = contentType.getMimeType();\n\t\t\t\t\tif(contentType.getCharset()!=null)\n\t\t\t\t\t\tcurrentCharSet=contentType.getCharset().name();\n\t\t\t\t}\n\t\t\t\tInputStream inputStream=entity.getContent();\n\t\t\t\tif(getRequestDefinition().isBinaryResponseBody())\n\t\t\t\t{\n\t\t\t\t\t//binary content\n\t\t\t\t\tbyte[] bodyBin = IOUtils.toByteArray(inputStream);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),bodyBin,response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//copy content to string\n\t\t\t\t\tStringWriter writer = new StringWriter();\n\t\t\t\t\tIOUtils.copy(inputStream, writer, currentCharSet);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),writer.toString(),response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\tinputStream.close();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new CustomRuntimeException(\"fetchData over http uri: \"+getUri(),e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(response!=null)\n\t\t\t\t\tresponse.close();\n\t\t\t\tif(httpclient!=null)\n\t\t\t\t\thttpclient.close();\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t} \t\n\t\t}\t\t\n\t\treturn result;\n\n\t}", "private HttpURLConnection createConnection() {\n try {\n HttpURLConnection httpURLConnection = this.httpProxyHost != null ? CONNECTION_FACTORY.create(this.url, this.createProxy()) : CONNECTION_FACTORY.create(this.url);\n httpURLConnection.setRequestMethod(this.requestMethod);\n return httpURLConnection;\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }", "private Socket createClient()\n\t{\n\t\tSocket client = null;\n\t\ttry {\n\t\t\tclient = this.server.accept();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tinsertLogEntry(e.getMessage(), e.getStackTrace().toString());\n\t\t}\n\t\t\n\t\treturn client;\n\t}", "void startClient(String name, Config.ClientConfig config);", "public abstract Client getClient();", "private void init() throws IOReactorException {\n IOReactorConfig ioReactorConfig = IOReactorConfig.custom()\n .setIoThreadCount(Runtime.getRuntime().availableProcessors())\n .setConnectTimeout(BaseConstants.TIMEOUT_SECONDS * 1000)\n .setSoTimeout(BaseConstants.TIMEOUT_SECONDS * 1000)\n .build();\n\n // Create a custom I/O reactort\n ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(ioReactorConfig);\n PoolingNHttpClientConnectionManager connManager = new PoolingNHttpClientConnectionManager(ioReactor);\n // Configure total max or per route limits for persistent connections\n // that can be kept in the pool or leased by the connection manager.\n connManager.setMaxTotal(100);\n connManager.setDefaultMaxPerRoute(100);\n\n HttpAsyncClientBuilder clientBuilder = HttpAsyncClients.custom();\n RequestConfig.Builder requestConfig = RequestConfig.custom();\n // 连接超时,连接建立时间\n requestConfig.setConnectTimeout(BaseConstants.TIMEOUT_SECONDS * 1000);\n // 请求超时,数据传输过程中数据包之间间隔的最大时间\n requestConfig.setSocketTimeout(BaseConstants.TIMEOUT_SECONDS * 1000);\n // 使用连接池来管理连接,从连接池获取连接的超时时间\n requestConfig.setConnectionRequestTimeout(BaseConstants.TIMEOUT_SECONDS * 1000);\n clientBuilder.setConnectionManager(connManager);\n clientBuilder.setDefaultRequestConfig(requestConfig.build());\n httpclient = clientBuilder.build();\n }", "protected RestClient()\n\t{\n\t\tclient = new HttpClient();\n\t\tclient.setIdleTimeout(3000000);\n\t\t// for possible future use:\n\t\t//exchange_get = new ContentExchange()\n\t\t{\n\t\t\t// define the callback method to process the response when you get it back\n\t\t\t// protected void onResponseComplete() throws IOException\n\t\t\t// {\n\t\t\t// super.onResponseComplete();\n\t\t\t// int responseStatus = this.getStatus();\n\n\t\t\t// do something with the response content\n\t\t\t//System.out.println(\"Response status: \" + responseStatus);\n\t\t\t//System.out.println(this.getResponseContent());\n\t\t\t//\t }\n\t\t};\n\t}", "public XioClient newInstance( InetSocketAddress address);", "private void createClient() {\n tc = new TestClient();\n }", "public static final DefaultHttpClient createHttpClient() {\n\t\treturn createHttpClient(3);\n\t}", "Client getClient();", "private static HttpClient getNewHttpClient(){\n HttpParams params = new BasicHttpParams();\n return new DefaultHttpClient(params);\n }", "private <T> T proxy(Class<T> serviceClass, String serviceUrl, Client client) {\n\n final WebTarget target = client.target(serviceUrl);\n return ((ResteasyWebTarget) target).proxy(serviceClass);\n }", "public static Client createClient() {\n JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();\n provider.setAnnotationsToUse(new Annotations[]{Annotations.JACKSON});\n\n ClientConfig config = new ClientConfig(provider);\n //Allow delete request with entity\n config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);\n //It helps to handle cookies\n config.property(ClientProperties.FOLLOW_REDIRECTS, Boolean.FALSE);\n //Allow PATCH\n config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);\n\n Logger logger = Logger.getLogger(\"Client\");\n Feature feature = new LoggingFeature(logger, Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY,\n null);\n\n //Allow self trusted certificates\n SSLContext sslcontext;\n try {\n sslcontext = SSLContext.getInstance(\"TLS\");\n sslcontext.init(null, new TrustManager[]{new X509TrustManager() {\n public void checkClientTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public void checkServerTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[0];\n }\n }}, new java.security.SecureRandom());\n } catch (KeyManagementException | NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n\n return ClientBuilder\n .newBuilder()\n .withConfig(config)\n .sslContext(sslcontext)\n .build()\n .register(feature)\n .register(MultiPartFeature.class);\n }", "protected void abcdefg(String host, byte[] buf) throws Exception {\n String clientId = hostmap.get(host);\n if (clientId == null) {\n NgrokAgent.httpResp(_out, 404, \"Tunnel \" + host + \" not found\");\n return;\n }\n NgrokServerClient client = clients.get(clientId);\n if (client == null) {\n NgrokAgent.httpResp(_out, 404, \"Tunnel \" + host + \" is Closed\");\n return;\n }\n ProxySocket proxySocket;\n try {\n proxySocket = client.getProxy(host);\n }\n catch (Exception e) {\n log.debug(\"Get ProxySocket FAIL host=\" + host, e);\n NgrokAgent.httpResp(_out,\n 500,\n \"Tunnel \" + host + \" did't has any proxy conntion yet!!\");\n return;\n }\n //sw.tag(\"After Get ProxySocket\");\n PipedStreamThread srv2loc = null;\n PipedStreamThread loc2srv = null;\n //NgrokAgent.writeMsg(proxySocket.socket.getOutputStream(), NgrokMsg.startProxy(\"http://\" + host, \"\"));\n //sw.tag(\"After Send Start Proxy\");\n proxySocket.socket.getOutputStream().write(buf);\n // 服务器-->本地\n srv2loc = new PipedStreamThread(\"http2proxy\",\n _ins,\n NgrokAgent.gzip_out(client.gzip_proxy,\n proxySocket.socket.getOutputStream()),\n bufSize);\n // 本地-->服务器\n loc2srv = new PipedStreamThread(\"proxy2http\",\n NgrokAgent.gzip_in(client.gzip_proxy,\n proxySocket.socket.getInputStream()),\n _out,\n bufSize);\n //sw.tag(\"After PipedStream Make\");\n //sw.stop();\n //log.debug(\"ProxyConn Timeline = \" + sw.toString());\n // 等待其中任意一个管道的关闭\n String exitFirst = executorService.invokeAny(Arrays.asList(srv2loc, loc2srv));\n if (log.isDebugEnabled())\n log.debug(\"proxy conn exit first at \" + exitFirst);\n }", "@Override\r\n\tpublic void connect(URL url) throws RemoteException {\n\t\tclientPool=ClientPoolManager.INSTANCE.getClientPool(url);\r\n\r\n\t}", "public CachetClient(String url) {\n baseUrl = url;\n client = ClientBuilder.newClient();\n target = client.target(baseUrl);\n }", "public HttpClientUrlConnection(int methodCode, String urlString,\n\t\t\t\t HttpClient client,\n\t\t\t\t LockssUrlConnectionPool connectionPool)\n throws IOException {\n super(urlString);\n this.client = client != null ? client : new HttpClient();\n this.methodCode = methodCode;\n method = createMethod(methodCode, urlString);\n this.connectionPool = connectionPool;\n }", "private OkHttpClient createClient(){\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n return new OkHttpClient.Builder()\n .addInterceptor(logging)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(30, TimeUnit.SECONDS)\n .build();\n }", "public StatsdClient(String prefix, String hostname, int port) throws StatsDClientException {\n this.hostname = hostname;\n this.prefix = prefix;\n this.port = port;\n\n this.lock = new ReentrantReadWriteLock();\n ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);\n exec.setRemoveOnCancelPolicy(true);\n\n Runnable refreshClient = new Runnable() {\n @Override\n public void run() {\n newClient();\n }\n };\n exec.scheduleAtFixedRate(refreshClient, CLIENT_TTL, CLIENT_TTL, TimeUnit.SECONDS);\n\n this.newClient();\n LOGGER.info(\"StatsdClient wrapper created. \" + this.hashCode());\n }", "public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }", "@Test\n @Timeout(5000)\n void testWebAppProxyServerMainMethod() throws Exception {\n WebAppProxyServer mainServer = null;\n Configuration conf = new YarnConfiguration();\n conf.set(YarnConfiguration.PROXY_ADDRESS, \"localhost:9099\");\n try {\n mainServer = WebAppProxyServer.startServer(conf);\n int counter = 20;\n\n URL wrongUrl = new URL(\"http://localhost:9099/proxy/app\");\n HttpURLConnection proxyConn = null;\n while (counter > 0) {\n counter--;\n try {\n proxyConn = (HttpURLConnection) wrongUrl.openConnection();\n proxyConn.connect();\n proxyConn.getResponseCode();\n // server started ok\n counter = 0;\n } catch (Exception e) {\n Thread.sleep(100);\n }\n }\n assertNotNull(proxyConn);\n // wrong application Id\n assertEquals(HttpURLConnection.HTTP_INTERNAL_ERROR,\n proxyConn.getResponseCode());\n } finally {\n if (mainServer != null) {\n mainServer.stop();\n }\n }\n }", "public static Client shareClient() throws UnknownHostException {\n\n Client client = TransportClient.builder().build()\n .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(\"127.0.0.1\"), 9300));\n return client;\n\n }", "public void run() throws Exception {\n ServerEndpoint se = getServerEndpoint();\n TestService service = new TestServiceImpl();\n int redirectPort = getPort() + 1;\n Redirector rd = new Redirector(getHost(),getPort(),redirectPort);\n ((TestServerEndpoint) se).redirect(redirectPort);\n Thread t = new Thread(rd);\n t.start();\n BasicJeriExporter exporter = new BasicJeriExporter(se,\n new BasicILFactory());\n TestService stub = (TestService) exporter.export(service);\n //Connect to the mux server\n Socket s = new Socket(getHost(),getPort());\n InputStream is = s.getInputStream();\n OutputStream os = s.getOutputStream();\n //Send client connection header\n ClientConnectionHeader cHeader = new ClientConnectionHeader();\n cHeader.send(os);\n //Receive ServerConnection header and verify format\n ServerConnectionHeader sHeader = new ServerConnectionHeader();\n try {\n sHeader.receive(is,getTimeout());\n } catch (ProtocolException e) {\n e.printStackTrace();\n throw new TestException(e.getMessage(),e);\n }\n //Make a remote call that returns something\n stub.doSomething();\n exporter.unexport(true);\n rd.stop();\n //Extract and analyze the messages sent by the mux server\n try {\n analyzeServerDataBytes(rd.getServerConversation());\n } catch (ProtocolException e) {\n e.printStackTrace();\n throw new TestException(e.getMessage(),e);\n }\n //Ping the server\n PingMessage pm = new PingMessage().setCookie((short)0x5544);\n pm.send(os);\n //Receive a ping ack from server and verify that the correct cookie\n //is included\n se = getServerEndpoint();\n service = new TestServiceImpl();\n exporter = new BasicJeriExporter(se,\n new BasicILFactory());\n stub = (TestService) exporter.export(service);\n //Connect to the mux server\n s = new Socket(getHost(),getPort());\n is = s.getInputStream();\n os = s.getOutputStream();\n PingAckMessage pam = new PingAckMessage().setCookie((short)0x5544);\n try {\n pam.receive(is,getTimeout());\n } catch (ProtocolException e) {\n e.printStackTrace();\n throw new TestException(e.getMessage(),e);\n }\n }", "private HttpClient prepareHttpClient() {\n\t\tHttpClientParams htcParams = new HttpClientParams();\n\t\tmHttpClient = new HttpClient();\n\t\thtcParams.setConnectionManagerTimeout(300000);\n\t\thtcParams.setSoTimeout(300000);\n\t\tmHttpClient.setParams(htcParams);\n\t\treturn mHttpClient;\n\t}", "public GeoServerHttpSessionListenerProxy() {\n }", "private HttpClient() {\n\t}", "public static void main(String[] args) {\n\n Client client = ClientBuilder.newClient();\n WebTarget target = client.target(\"http\");\n\n }", "@Before\n public void buildClient() {\n BasicCookieStore cookieStore = new BasicCookieStore();\n\n // Build Apache Http Client to execute requests\n this.httpClient = HttpClientBuilder.create()\n .setDefaultCookieStore(cookieStore)\n .setRedirectStrategy(new LaxRedirectStrategy())\n .build();\n }", "@SuppressWarnings(\"unchecked\")\n public static <T> ProxyAndInfo<T> createProxy(Configuration conf,\n URI nameNodeUri, Class<T> xface, AtomicBoolean fallbackToSimpleAuth)\n throws IOException {\n Class<FailoverProxyProvider<T>> failoverProxyProviderClass =\n getFailoverProxyProviderClass(conf, nameNodeUri, xface);\n \n if (failoverProxyProviderClass == null) {\n // Non-HA case\n return createNonHAProxy(conf, NameNode.getAddress(nameNodeUri), xface,\n UserGroupInformation.getCurrentUser(), true, fallbackToSimpleAuth);\n } else {\n // HA case\n FailoverProxyProvider<T> failoverProxyProvider = NameNodeProxies\n .createFailoverProxyProvider(conf, failoverProxyProviderClass, xface,\n nameNodeUri, fallbackToSimpleAuth);\n DfsClientConf config = new DfsClientConf(conf);\n T proxy = (T) RetryProxy.create(xface, failoverProxyProvider,\n RetryPolicies.failoverOnNetworkException(\n RetryPolicies.TRY_ONCE_THEN_FAIL, config.getMaxFailoverAttempts(),\n config.getMaxRetryAttempts(), config.getFailoverSleepBaseMillis(),\n config.getFailoverSleepMaxMillis()));\n \n Text dtService = HAUtilClient.buildTokenServiceForLogicalUri(nameNodeUri, HdfsConstants.HDFS_URI_SCHEME);\n return new ProxyAndInfo<T>(proxy, dtService);\n }\n }", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "public void setHttpProxyPort(int port);", "public boolean connect(String url, String proxy) {\n mRLIURL = url;\n //push it into the internal properties object\n mConnectProps.setProperty(URL_KEY,url);\n if(proxy != null){\n mConnectProps.setProperty(PROXY_KEY, proxy);\n }\n try {\n mRLS = (proxy == null) ?\n new RLSClient(url) : //proxy is picked up from default loc /tmp\n new RLSClient(url, proxy);\n\n //set RLI timeout\n mRLS.SetTimeout(mTimeout);\n\n //connect is only successful if we have\n //successfully connected to the LRC\n mRLI = mRLS.getRLI();\n\n }\n catch (RLSException e) {\n mLogger.log(\"RLS Exception\", e,LogManager.ERROR_MESSAGE_LEVEL);\n return false;\n }\n return true;\n }", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "public Client() {}", "public int getHttpProxyPort();", "static Http1Client create(Http1ClientConfig clientConfig) {\n return new Http1ClientImpl(WebClient.create(it -> it.from(clientConfig)), clientConfig);\n }", "private static WebClient getClient(final Context context) {\n if (sInstance == null) {\n sInstance = new WebClient(context);\n }\n return sInstance;\n }", "public void testURL()\r\n {\r\n\r\n BufferedReader in = null;\r\n PrintStream holdErr = System.err;\r\n String errMsg = \"\";\r\n try\r\n {\r\n\r\n this.setSuccess(false);\r\n\r\n PrintStream fileout = new PrintStream(new FileOutputStream(\"testURLFile.html\"));\r\n System.setErr(fileout);\r\n System.err.println(\"testURL() - entry\");\r\n\r\n System.getProperties().put(\"https.proxyHost\", \"\" + this.getProxyHost());\r\n System.getProperties().put(\"https.proxyPort\", \"\" + this.getProxyPort());\r\n System.getProperties().put(\"http.proxyHost\", \"\" + this.getProxyHost());\r\n System.getProperties().put(\"http.proxyPort\", \"\" + this.getProxyPort());\r\n // System.getProperties().put(\"java.protocol.handler.pkgs\", \"com.sun.net.ssl.internal.www.protocol\");\r\n\r\n URL url = new URL(\"http://www.msn.com\");\r\n\r\n CookieModule.setCookiePolicyHandler(null); // Accept all cookies\r\n // Set the Authorization Handler\r\n // This will let us know waht we are missing\r\n DefaultAuthHandler.setAuthorizationPrompter(this);\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n HTTPResponse headRsp = con.Head(url.getFile());\r\n HTTPResponse rsp = con.Get(url.getFile());\r\n\r\n int sts = headRsp.getStatusCode();\r\n if (sts < 300)\r\n {\r\n System.err.println(\"No authorization required to access \" + url);\r\n this.setSuccess(true);\r\n }\r\n else if (sts >= 400 && sts != 401 && sts != 407)\r\n {\r\n System.err.println(\"Error trying to access \" + url + \":\\n\" + headRsp);\r\n }\r\n else if (sts == 407)\r\n {\r\n System.err.println(\r\n \"Error trying to access \"\r\n + url\r\n + \":\\n\"\r\n + headRsp\r\n + \"\\n\"\r\n + \"<HTML><HEAD><TITLE>Proxy authorization required</TITLE></HEAD>\");\r\n this.setMessage(\"Error trying to access \" + url + \":\\n\" + headRsp + \"\\n\" + \"Proxy authorization required\");\r\n }\r\n // Start reading input\r\n in = new BufferedReader(new InputStreamReader(rsp.getInputStream()));\r\n String inputLine;\r\n\r\n while ((inputLine = in.readLine()) != null)\r\n {\r\n System.err.println(inputLine);\r\n }\r\n // All Done - We were success\r\n\r\n in.close();\r\n\r\n }\r\n catch (ModuleException exc)\r\n {\r\n errMsg = \"ModuleException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (ProtocolNotSuppException exc)\r\n {\r\n errMsg = \"ProtocolNotSuppException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (MalformedURLException exc)\r\n {\r\n errMsg = \"MalformedURLException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (FileNotFoundException exc)\r\n {\r\n errMsg = \"FileNotFoundException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (IOException exc)\r\n {\r\n errMsg = \"IOException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n finally\r\n {\r\n System.err.println(\"testURL() - exit\");\r\n System.setErr(holdErr);\r\n if (in != null)\r\n {\r\n try\r\n {\r\n in.close(); // ENSURE we are CLOSED\r\n }\r\n catch (Exception exc)\r\n {\r\n // Do Nothing, It will be throwing an exception \r\n // if it cannot close the buffer\r\n }\r\n }\r\n this.setMessage(errMsg);\r\n System.gc();\r\n }\r\n\r\n }", "public HttpProxy(int port)\n {\n thisPort = port;\n }", "private static void runClient() {\n long clientStartTime = System.currentTimeMillis();\n \n // Pick a random entry point\n int entryPointId = random.nextInt(entryPointAddresses.size());\n String[] ep = entryPointAddresses.get(entryPointId);\n String entryPointCode = ep[0];\n String entryPointAddress = ep[1];\n \n // User number and id\n int userCount = COUNT.incrementAndGet();\n String userToken = (clientLocation + userCount + \"-\" + Math.abs(random.nextInt(1000)));\n User u = USER_RESOLVER.resolve(userToken);\n \n // Point the client to the entry point\n WebTarget webTarget = entryPointTarget(entryPointAddress, userToken);\n EntryPointResponse response = new EntryPointResponse(null, null);\n try {\n String responseJson = webTarget.request(MediaType.APPLICATION_JSON).get(String.class);\n response = Jsons.fromJson(responseJson, EntryPointResponse.class);\n } catch (Exception e) {\n LOG.log(Level.SEVERE, String.format(\"Could not load responses from entry point %s: %s\", ep[0], ep[1]));\n LOG.log(Level.SEVERE, \"Attempted to connect with: \" + webTarget.getUri().toString());\n }\n \n // current time after the response\n long clientEndTime = System.currentTimeMillis(); \n \n Double latency = null;\n if (response.getRedirectAddress() != null) {\n latency = latencies.get(response.getRedirectAddress());\n }\n \n writer.writeCsv(LOG_LENS, \n sdf.format(new Date()),\n clientStartTime - Main.clientStartTime,\n userCount,\n Main.clientLocation,\n entryPointCode,\n response.getSelectedCloudSiteCode(),\n clientEndTime - clientStartTime,\n latency == null ? \"null\" : String.format(\"%.2f\", latency),\n userToken,\n Arrays.toString(u.getCitizenships().toArray()),\n Arrays.toString(u.getTags().toArray()),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getProviderCode(),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getLocationCode(),\n response.getDefinition() == null ? \"null\" : Arrays.toString(response.getDefinition().getTags().toArray()),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getCost()\n );\n //writer.flush();\n }", "public ExternalNodeServiceClient() {\n this(ExternalNodeService.DEFAULT_PORT);\n }", "String getHttpProxyHost();", "protected AbstractClient(ClientContext context) {\n this(context, RetryUtils::defaultClientRetry);\n }", "Client(String host, int port) {\n super(host, port);\n }", "private static void createCouchbaseClient() {\n LOGGER.debug(\"Creating Couchbase Client\");\n String bucket = CONFIG.getString(\"couchbase.bucket\");\n String[] hosts = CONFIG.getString(\"couchbase.host\").split(\";\");\n String port = CONFIG.getString(\"couchbase.port\");\n String base = CONFIG.getString(\"couchbase.base\");\n\n List<URI> uris = new ArrayList<>();\n for (final String host : hosts) {\n uris.add(URI.create(\"http://\" + host + \":\" + port + \"/\" + base));\n }\n try {\n tapClient = new TapClient(uris, bucket, \"\");\n } catch (Exception ex) {\n LOGGER.error(\"Caught exception trying to connect to Couchbase\", ex);\n }\n }", "public String getHttpProxyHost();", "public HttpClient(String host, int port)\n\t{\n\t\tsuper(host, port);\n\t\tclient = new org.apache.commons.httpclient.HttpClient();\n\t}", "private void initialize(){\n if(uri != null)\n httpUriRequest = getHttpGet(uri);\n httpClient = HttpClients.createDefault();\n }", "public UPKClient() {\n connectToServer(BASE_URL);\n }", "@BeforeClass\n public static void createClient() {\n client = HttpClients.createDefault();\n }", "public static CertAuthClient client(InetSocketAddress addr) throws TimeoutException\n\t{\n\t\treturn new CertAuthClient(addr);\n\t}", "public TicketClient(@Value(\"${app.ticket-catalog.url}\") String serverUrl) {\n this.serverUrl = serverUrl;\n this.restTemplate = new RestTemplate();\n var requestFactory = new SimpleClientHttpRequestFactory();\n this.restTemplate.setRequestFactory(requestFactory);\n }", "public Client create() {\n RequestProvider provider = RequestProviders.lookup();\n return provider.newClient(this);\n }", "@Bean\n\tpublic SolrClient solrClient() throws Exception {\n\t\t\n\t\tfinal String solrUrl = \"http://192.168.182.132:8983/solr\";\n\t\treturn new HttpSolrClient.Builder(solrUrl).withConnectionTimeout(10000).withSocketTimeout(60000).build();\n\t}", "public AbstractClient(String host, int port) {\n // Initialize variables\n this.host = host;\n this.port = port;\n }", "int getHttpProxyPort();", "public static final DefaultHttpClient createHttpClient(int retryCount) {\n\t\tHttpParams params = new BasicHttpParams();\n\t\tHttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);\n\t\tHttpProtocolParams.setContentCharset(params, HTTP.UTF_8);\n\t\t// HttpProtocolParams.setUseExpectContinue(params, true);\n\t\t// Turn off stale checking. Our connections break all the time anyway,\n\t\t// and it's not worth it to pay the penalty of checking every time.\n\t\tHttpConnectionParams.setStaleCheckingEnabled(params, false);\n\n\t\t// Default connection and socket timeout of 30 seconds. Tweak to taste.\n\t\tHttpConnectionParams.setConnectionTimeout(params, 15 * 1000);\n\t\tHttpConnectionParams.setSoTimeout(params, 20 * 1000);\n\t\tHttpConnectionParams.setSocketBufferSize(params, 8192);\n\n\t\tHttpClientParams.setRedirecting(params, true);\n\n\t\tConnManagerParams.setTimeout(params, 5 * 1000);\n\t\tConnManagerParams.setMaxConnectionsPerRoute(params,\n\t\t\t\tnew ConnPerRouteBean(50));\n\t\tConnManagerParams.setMaxTotalConnections(params, 200);\n\n\t\t// Sets up the http part of the service.\n\t\tfinal SchemeRegistry supportedSchemes = new SchemeRegistry();\n\n\t\t// Register the \"http\" protocol scheme, it is required\n\t\t// by the default operator to look up socket factories.\n\t\tfinal SocketFactory sf = PlainSocketFactory.getSocketFactory();\n\t\tsupportedSchemes.register(new Scheme(\"http\", sf, 80));\n\t\tsupportedSchemes.register(new Scheme(\"https\", SSLSocketFactory\n\t\t\t\t.getSocketFactory(), 443));\n\t\tfinal ThreadSafeClientConnManager ccm = new ThreadSafeClientConnManager(\n\t\t\t\tparams, supportedSchemes);\n\t\tDefaultHttpClient httpClient = new DefaultHttpClient(ccm, params);\n\t\thttpClient\n\t\t\t\t.setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler(\n\t\t\t\t\t\tretryCount, true));\n\t\t// Add gzip header to requests using an interceptor\n\t\thttpClient.addRequestInterceptor(new GzipHttpRequestInterceptor());\n\t\t// Add gzip compression to responses using an interceptor\n\t\thttpClient.addResponseInterceptor(new GzipHttpResponseInterceptor());\n\n\t\treturn httpClient;\n\t}", "@Test\n public void testProxy() throws Exception {\n addHandler(new MyProxyHandler());\n URL proxyURL = new URL(url);\n\n runner.setProperty(InvokeHTTP.PROP_URL, \"http://nifi.apache.org/\"); // just a dummy URL no connection goes out\n runner.setProperty(InvokeHTTP.PROP_PROXY_HOST, proxyURL.getHost());\n\n try{\n runner.run();\n Assert.fail();\n } catch (AssertionError e){\n // Expect assertion error when proxy port isn't set but host is.\n }\n runner.setProperty(InvokeHTTP.PROP_PROXY_PORT, String.valueOf(proxyURL.getPort()));\n\n runner.setProperty(InvokeHTTP.PROP_PROXY_USER, \"username\");\n\n try{\n runner.run();\n Assert.fail();\n } catch (AssertionError e){\n // Expect assertion error when proxy password isn't set but host is.\n }\n runner.setProperty(InvokeHTTP.PROP_PROXY_PASSWORD, \"password\");\n\n createFlowFiles(runner);\n\n runner.run();\n\n runner.assertTransferCount(InvokeHTTP.REL_SUCCESS_REQ, 1);\n runner.assertTransferCount(InvokeHTTP.REL_RESPONSE, 1);\n runner.assertTransferCount(InvokeHTTP.REL_RETRY, 0);\n runner.assertTransferCount(InvokeHTTP.REL_NO_RETRY, 0);\n runner.assertTransferCount(InvokeHTTP.REL_FAILURE, 0);\n runner.assertPenalizeCount(0);\n\n //expected in request status.code and status.message\n //original flow file (+attributes)\n final MockFlowFile bundle = runner.getFlowFilesForRelationship(InvokeHTTP.REL_SUCCESS_REQ).get(0);\n bundle.assertContentEquals(\"Hello\".getBytes(\"UTF-8\"));\n bundle.assertAttributeEquals(InvokeHTTP.STATUS_CODE, \"200\");\n bundle.assertAttributeEquals(InvokeHTTP.STATUS_MESSAGE, \"OK\");\n bundle.assertAttributeEquals(\"Foo\", \"Bar\");\n\n //expected in response\n //status code, status message, all headers from server response --> ff attributes\n //server response message body into payload of ff\n final MockFlowFile bundle1 = runner.getFlowFilesForRelationship(InvokeHTTP.REL_RESPONSE).get(0);\n bundle1.assertContentEquals(\"http://nifi.apache.org/\".getBytes(\"UTF-8\"));\n bundle1.assertAttributeEquals(InvokeHTTP.STATUS_CODE, \"200\");\n bundle1.assertAttributeEquals(InvokeHTTP.STATUS_MESSAGE, \"OK\");\n bundle1.assertAttributeEquals(\"Foo\", \"Bar\");\n bundle1.assertAttributeEquals(\"Content-Type\", \"text/plain;charset=iso-8859-1\");\n }", "protected Proxy(InvocationHandler h) { }", "public static void main(String args[]) {\n int saveCerts = 0;\n boolean noVerify = false;\n String proxyHost = \"127.0.0.1\";\n int proxyPort = 0;\n ProxyType ptype = ProxyType.NONE;\n boolean error = false;\n Getopt g = new Getopt(\"ssleepget\", args, \"p:y:sz\");\n try {\n int c;\n while ((c = g.getopt()) != -1) {\n switch (c) {\n case 'p':\n String s = g.getOptarg();\n int colon = s.indexOf(':');\n if (colon >= 0) {\n // Todo IPv6 [a:b:c]:4444\n proxyHost = s.substring(0, colon);\n String port = s.substring(colon + 1);\n proxyPort = Integer.parseInt(port);\n } else {\n proxyHost = s;\n // proxyPort remains default\n }\n break;\n\n case 'y':\n String y = g.getOptarg().toUpperCase(Locale.US);\n if (y.equals(\"HTTP\") || y.equals(\"HTTPS\")) {\n ptype = ProxyType.HTTP;\n } else if (y.equals(\"SOCKS4\")) {\n ptype = ProxyType.SOCKS4;\n } else if (y.equals(\"SOCKS5\")) {\n ptype = ProxyType.SOCKS5;\n } else if (y.equals(\"I2P\")) {\n ptype = ProxyType.INTERNAL;\n proxyHost = \"localhost\";\n proxyPort = 4444;\n } else {\n error = true;\n }\n break;\n\n case 's':\n saveCerts++;\n break;\n\n case 'z':\n noVerify = true;\n break;\n\n case '?':\n case ':':\n default:\n error = true;\n break;\n } // switch\n } // while\n } catch (RuntimeException e) {\n e.printStackTrace();\n error = true;\n }\n\n if (error || args.length - g.getOptind() != 1) {\n usage();\n System.exit(1);\n }\n String url = args[g.getOptind()];\n\n String saveAs = suggestName(url);\n\n SSLEepGet get;\n if (proxyHost != null) {\n if (proxyPort == 0) {\n if (ptype == ProxyType.HTTP)\n proxyPort = 8080;\n else\n proxyPort = 1080;\n }\n get = new SSLEepGet(I2PAppContext.getGlobalContext(), ptype, proxyHost, proxyPort, saveAs, url);\n } else {\n get = new SSLEepGet(I2PAppContext.getGlobalContext(), saveAs, url);\n }\n if (saveCerts > 0)\n get._saveCerts = saveCerts;\n if (noVerify)\n get._bypassVerification = true;\n get._commandLine = true;\n get.addStatusListener(get.new CLIStatusListener(1024, 40));\n if(!get.fetch(45*1000, -1, 60*1000))\n System.exit(1);\n }", "@Override\n public void onCreate() {\n\n Thread proxy = new Thread(new proxyMainLoop());\n proxy.start();\n\n }", "private HttpProxyCacheServer getProxy() {\n\n return proxy == null ? (proxy = newProxy()) : proxy;\n }", "public SingleInvoker(InetSocketAddress serverAddress) {\n super(new SocketClient(serverAddress));\n sc = ((SocketClient) client);\n }", "private NodeMgrService.Proxy getProxy(int node) { \n Object obj = ServiceManager.proxyFor(node);\n if (! (obj instanceof NodeMgrService.Proxy)) {\n if (node == ServiceManager.LOCAL_NODE) {\n throw new InternalException(\"cannot fetch NodeManager Proxy\" +\n \" for local node\");\n } else {\n logger.warning(\"cannot retrieve proxy for node \" + node);\n }\n }\n return (NodeMgrService.Proxy) obj;\n }", "public Socket connectSocket(Socket sock, String host, int port, InetAddress localAddress, int localPort, HttpParams params)\n/* */ throws IOException\n/* */ {\n/* 105 */ if (host == null) {\n/* 106 */ throw new IllegalArgumentException(\"Target host may not be null.\");\n/* */ }\n/* 108 */ if (params == null) {\n/* 109 */ throw new IllegalArgumentException(\"Parameters may not be null.\");\n/* */ }\n/* */ \n/* 112 */ if (sock == null) {\n/* 113 */ sock = createSocket();\n/* */ }\n/* 115 */ if ((localAddress != null) || (localPort > 0))\n/* */ {\n/* */ \n/* 118 */ if (localPort < 0) {\n/* 119 */ localPort = 0;\n/* */ }\n/* 121 */ InetSocketAddress isa = new InetSocketAddress(localAddress, localPort);\n/* */ \n/* 123 */ sock.bind(isa);\n/* */ }\n/* */ \n/* 126 */ int timeout = HttpConnectionParams.getConnectionTimeout(params);\n/* */ \n/* 128 */ InetAddress[] inetadrs = InetAddress.getAllByName(host);\n/* 129 */ List<InetAddress> addresses = new ArrayList(inetadrs.length);\n/* 130 */ addresses.addAll(Arrays.asList(inetadrs));\n/* 131 */ Collections.shuffle(addresses);\n/* */ \n/* 133 */ IOException lastEx = null;\n/* 134 */ for (InetAddress remoteAddress : addresses) {\n/* */ try {\n/* 136 */ sock.connect(new InetSocketAddress(remoteAddress, port), timeout);\n/* */ }\n/* */ catch (SocketTimeoutException ex) {\n/* 139 */ throw new ConnectTimeoutException(\"Connect to \" + remoteAddress + \" timed out\");\n/* */ }\n/* */ catch (IOException ex) {\n/* 142 */ sock = new Socket();\n/* */ \n/* 144 */ lastEx = ex;\n/* */ }\n/* */ }\n/* 147 */ if (lastEx != null) {\n/* 148 */ throw lastEx;\n/* */ }\n/* 150 */ return sock;\n/* */ }", "public Client(String h, int p) {\n\t\thost = h;\n\t\tport = p;\n\t}" ]
[ "0.70228714", "0.65256125", "0.62436754", "0.62427086", "0.61749554", "0.61610156", "0.59256554", "0.5825014", "0.5819886", "0.5801569", "0.57992375", "0.5785281", "0.57806623", "0.5775967", "0.576406", "0.5760731", "0.57168263", "0.57145387", "0.5710018", "0.56722003", "0.56669056", "0.56664556", "0.5643414", "0.56394404", "0.56270295", "0.5624792", "0.5622325", "0.5610392", "0.55871487", "0.55841124", "0.55728793", "0.5545741", "0.55063045", "0.5494304", "0.5476921", "0.54700375", "0.5465535", "0.5452524", "0.5446326", "0.54443896", "0.5443588", "0.5426771", "0.54179066", "0.5413108", "0.54095024", "0.5397387", "0.53830117", "0.53546643", "0.5343476", "0.53386647", "0.533821", "0.5325105", "0.5319878", "0.5317111", "0.5309323", "0.53006774", "0.5299452", "0.5296769", "0.5296463", "0.52951044", "0.5289821", "0.5275519", "0.52693784", "0.5268943", "0.52685463", "0.5258653", "0.5253038", "0.5245325", "0.5245206", "0.5244053", "0.52392066", "0.5234845", "0.5223315", "0.52222353", "0.52147424", "0.5214394", "0.52129227", "0.52116483", "0.52096134", "0.5207931", "0.51953405", "0.518408", "0.5180803", "0.5178608", "0.51731265", "0.517165", "0.51700586", "0.51692265", "0.5168563", "0.5162354", "0.5147127", "0.5138886", "0.513771", "0.5137064", "0.5136675", "0.5133838", "0.5122766", "0.5118232", "0.51178175", "0.51163495" ]
0.63444865
2
Spawns a new bunny
public static void spawnBunny(EntityBunny bunny){ BUNNIES.add(bunny); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void spawnNew() {\n\t\tif (tier> 1) {\n\t\t\ttier--;\n\t\t\thealth = tier;\n\t\t\tdamage = tier;\n\t\t\tspeed = 5;\n\t\t\timg = getImage(updateImage(tier)); // converted getImage to protected b/c it wasn't accessible by Balloon class (child class)\n\t\t}\n\t\telse {\n\t\t\tisAlive = false;\n\t\t\tdeletePath();\t\t\t\n\t\t}\n\t}", "public static EntityBunnyMount spawnBunny(World world, EnumBunnyType type, double x, double y, double z) {\n EntityBunnyMount jordan = new EntityBunnyMount(world, type);\n\n jordan.setLocationAndAngles(x, y, z, MathHelper.wrapAngleTo180_float(world.rand.nextFloat() * 360.0F), 0.0F);\n jordan.rotationYawHead = jordan.rotationYaw;\n jordan.renderYawOffset = jordan.rotationYaw;\n world.spawnEntityInWorld(jordan);\n jordan.playSound(\"step.gravel\", 1.0F, 1.0F);\n\n return jordan;\n }", "public void spawnRubble() {\n\t\tString rubbleName \t= \"\";\n\t\tPlayer newPlayer \t= null; \n\t\tint numberOfRubble \t= server.getRubbleCount();\n\t\t\n\t\tfor(int i = 0; i < numberOfRubble; i++) {\n\t\t\trubbleName = \"Rubble\" + (i+1);\n\t\t\tnewPlayer = initPlayerToGameplane(rubbleName, \n\t\t\t\t\t\t\t\t\t\t\t PlayerType.Rubble, \n\t\t\t\t\t\t\t\t\t\t\t 0, 0);\n\t\t\t\n\t\t\tHandleCommunication.broadcastToClient(null, \n\t\t\t\t\t\t\t\t\t\t\t\t server.getConnectedClientList(), \n\t\t\t\t\t\t\t\t\t\t\t\t SendSetting.AddPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t newPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t null);\n\t\t}\n\t}", "@SuppressWarnings(\"unused\")\n void spawn(Entity entity);", "@Override\r\n\tpublic void spawn(Location location) {\n\t\t\r\n\t}", "public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}", "void spawnEntityAt(String typeName, int x, int y);", "@Override\n\tpublic void spawn(Location loc) {\n\t\t\n\t}", "public void spawn(boolean type)\n\t{\n\t\tif (type)\n\t\t{\n\t\t\triver[findEmpty()] = new Bear();\n\t\t}\n\t\telse\n\t\t{\n\t\t\triver[findEmpty()] = new Fish();\n\t\t}\n\t}", "public Ninja(int x, int y)\r\n {\r\n super(x, y, 5);\r\n }", "@Override\n public void run() {\n World world=Bukkit.getWorld(\"world\");\n world.spawnEntity(world.getHighestBlockAt(world.getSpawnLocation()).getLocation(), EntityType.VILLAGER);\n }", "private boolean spawn(int x, int y) {\n\t\treturn false;\n\t}", "public void spawnBoss(Vector2 spawnPosition) {\n\n Foe newBoss = new Foe(getController(), spawnPosition, \"boss\", 3.5f, new IABoss(getController()));\n newBoss.initialize();\n newBoss.setPlayerCanKill(false);\n newBoss.setFixedFacing(true);\n\n getController().getStage().registerActor(newBoss);\n }", "private void startSpawning()\n {\n MAUtils.setSpawnFlags(plugin, world, 1, allowMonsters, allowAnimals);\n \n // Start the spawnThread.\n spawnThread = new MASpawnThread(plugin, this);\n spawnTaskId = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, spawnThread, waveDelay, (!waveClear) ? waveInterval : 60);\n }", "public void newCandy() {\n\t\tDebugger.print(\"Making new candy\");\n\t\tint x = (Random.nextInt(1, this.SIZE * 2) - 2);\n\t\tint y = (Random.nextInt(1, this.SIZE - 2));\n\n\t\tTile t = new Tile(x, y);\n\t\tboolean foundFreeTile = false;\n\t\twhile (!foundFreeTile) {\n\t\t\tfor (Snake snake : this.snakes) {\n\t\t\t\tif (snake != null) {\n\n\t\t\t\t\tif (snake.find(t)) {\n\t\t\t\t\t\tx = (Random.nextInt(1, this.SIZE * 2) - 1);\n\t\t\t\t\t\ty = (Random.nextInt(1, this.SIZE - 1));\n\t\t\t\t\t\tt.setX(x);\n\t\t\t\t\t\tt.setY(y);\n\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\tfoundFreeTile = true;\n\t\t}\n\t\tif (this.getGui() != null) {\n\t\t\tthis.getGui().print(\"New candy made\");\n\t\t}\n\t\tthis.setCandy(new Candy(x, y));\n\t}", "public void plantBomb()\n {\n if(this.getBombs() > 0)\n {\n bController.addBomb(this.getxPos(), this.getyPos(), 25);\n this.setBombs(getBombs() - 1);\n }\n }", "private void deliverBomb(Player me, Location location) \n {\n for (int i = 0; i < NUMBER_OF_BOMBS; i++) \n {\n double plusX = Math.random() * 5;\n if ((Math.random() * 10) < 6) \n {\n \t plusX = (0 - plusX);\n }\t\t\t\n double plusZ = Math.random() * 5;\n if ((Math.random() * 10) < 6) \n {\n plusZ = (0 - plusZ);\n }\n Location newLocation = new Location(location.getWorld(),\n location.getX() + plusX, \n location.getY() + (Math.random() + 20),\n location.getZ() + plusZ);\n // This spawns the creeper at the location provided\n me.getWorld().spawn(newLocation, Creeper.class);\n } \n }", "public Bomb(int x, int y) {\n\t\tsuper(x, y);\n\t\tthis.state = new Spawned();\n\t\tthis.visualStatus = new SimpleIntegerProperty(0);\n\t}", "public void control(Spawn spawn) {}", "private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}", "void spawnZombies() throws InterruptedException {\r\n\t\tint current = zombies.size();\r\n\t\tint level = killed / 5 + 1;\r\n\t\tif (level-current > 0) planted = 0;\r\n\t\tfor (int i = 0; i < level - current; i++) {\r\n\t\t\tZombie nieuwe = new Zombie(level*3);\r\n\t\t\tnieuwe.start();\r\n\t\t\tzombies.add(nieuwe);\r\n\t\t}\r\n\t}", "void forceSpawn() throws SpawnException;", "public void spawnObstacle(){\n\t\tif(this.seconds > this.nextSpawn && !this.gameOver){\n\t\t\tint pX = this.radom.nextInt(350);\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,0,30,pX,0));\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,pX+110,30,HEIGHT-pX-111,0));\n\t\t\tthis.goals.add(new Goal(WIDTH,pX,30,110,0xffffff));\n\t\t\tthis.nextSpawn = this.seconds + this.spawnRate;\n\t\t}\n\t}", "abstract public void initSpawn();", "public void spawnCoinPickup() {\n\n Random random = new Random();\n\n coinTimer.cancel();\n coinTimer.purge();\n coinTimer = new Timer();\n coinTimer.schedule(\n new TimerTask() {\n @Override\n public void run() {\n Pickup pickup = new CoinPickup(canvas);\n pickup.spawn();\n activePickups.add(pickup);\n spawnCoinPickup();\n }\n }, (random.nextInt(COIN_MAX_SPAWN_TIME - COIN_MIN_SPAWN_TIME) + COIN_MIN_SPAWN_TIME));\n }", "public Ex spawn() {\n return spawn(false);\n }", "public GameWon()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(550, 600, 1); \n addObject(b1,275,250);\n addObject(b2,275,380);\n }", "public void spawnCreature(){\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\")){\n\t\t\tGdx.app.debug(TamerGame.LOG, this.getClass()\n\t\t\t\t\t.getSimpleName() + \" :: Ant entered\");\t\t\t\n\t\t\t//CHANGE SPAWNING IMPLEMENTATION\n\t\t\tAntOrc orc = new AntOrc();\n\t\t\torc.setPosition(getPosition());\n\t\t\torc.setWaypoint(waypoint);\n\t\t\tenvironment.addNewObject(orc);\n\t\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,1));\n\t\t}\n\t\t\t\n\t}", "public Boss() {\n\t\tlife = 3;\n\t\timage = new Image(\"/Model/boss3.png\", true);\n\t\tboss = new ImageView(image);\n\t\tRandom r = new Random();\n\t\tboss.setTranslateX(r.nextInt(900));\n\t\tboss.setTranslateY(0);\n\t\tisAlive = true;\n\t}", "public final void respawn() {\r\n World.submit(new Pulse(getRespawnRate()) {\r\n\r\n @Override\r\n public boolean pulse() {\r\n GroundItemManager.create(GroundSpawn.this);\r\n return true;\r\n }\r\n });\r\n }", "private void spawnZombie(int choose) {\n\t\tswitch (choose) {\n\t\tcase (0):\n\t\t// spawn one zombie at once.\n\t\t\tint r = (new Random()).nextInt(5);\n\t\t\tint r1 = (new Random()).nextInt(2);\n\t\t\tArrayList<AbstractZombie> z = new ArrayList();\n\t\t\tConeHeadZombie cz = new ConeHeadZombie();\n\t\t\tFastZombie fz = new FastZombie();\n\t\t\tz.add(cz);\n\t\t\tz.add(fz);\n\t\t\tAbstractZombie a = z.get(r1);\n\t\t\tthis.board.addModel(a, r, this.board.getLength() - 1);\n\t\t\tbreak;\n\n\t\tcase (1):\n\t\t// spawn two zombies at once.\n\t\t\tint r2 = (new Random()).nextInt(5);\n\t\t\tint r3 = (new Random()).nextInt(5);\n\t\t\tConeHeadZombie cr = new ConeHeadZombie();\n\t\t\tFastZombie fr = new FastZombie();\n\t\t\tif (r2 != r3) {\n\t\t\t\tthis.board.addModel(fr, r2, this.board.getLength() - 1);\n\t\t\t\tthis.board.addModel(cr, r3, this.board.getLength() - 1);\n\t\t\t} \n\t\t\tif (r2==r3){\n\t\t\twhile(r3==r2) {\n\t\t\t\tr2 = (new Random()).nextInt(5);\n\t\t\t\tr3 = (new Random()).nextInt(5);\n\t\t\t\t}\n\t\t\tthis.board.addModel(fr, r2, this.board.getLength() - 1);\n\t\t\tthis.board.addModel(cr, r3, this.board.getLength() - 1);\n\t\t\t}\n\t\t break;\n\t\t\n\t\tcase (2):\n\t\t// spawn three zombies at once\n\t\t\tint r4 = (new Random()).nextInt(5);\n\t\t int r5 = (new Random()).nextInt(5);\n\t\t int r6 = (new Random()).nextInt(5);\n\t\t ConeHeadZombie cq = new ConeHeadZombie();\n\t\t\tFastZombie fq = new FastZombie();\n\t\t\tConeHeadZombie cqq = new ConeHeadZombie();\n\t\t\tif (r4 != r5 && r4 !=r6 && r5 != r6 ) {\n\t\t\t\tthis.board.addModel(cqq, r4, this.board.getLength() - 1);\n\t\t\t\tthis.board.addModel(cq, r5, this.board.getLength() - 1);\n\t\t\t\tthis.board.addModel(fq, r6, this.board.getLength() - 1);\n\t\t\t} \n\t\t\telse {\n\t\t\t\twhile(r4==r5 || r5==r6 || r4==r6) {\n\t\t\t\tr4 = (new Random()).nextInt(5);\n\t\t\t\tr5 = (new Random()).nextInt(5);\n\t\t\t\tr6 = (new Random()).nextInt(5);\n\t\t\t }\n\t\t\t this.board.addModel(cqq,r5, this.board.getLength() - 1);\n\t\t\t this.board.addModel(cq, r4, this.board.getLength() - 1);\n\t\t\t this.board.addModel(fq, r6, this.board.getLength() - 1);\n\t\t break;\n\t\t\t}\n\t\t}\n\t}", "public void spawnEnemy(){\n\t\tint initTile = 0;\n\t\n\t\tfor(int i=0; i<screen.maps[screen.currentMap].path.getHeight(); i++){\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(0, i).getTile().getProperties().containsKey(\"ground\") == true){\n\t\t\t\tinitTile = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\txCoor = 2;\n\t\tyCoor = (initTile)*64 + 2;\n\t\tbound = new Circle(xCoor+30, yCoor+30, 30);\n\t\tinGame = true;\n\t}", "@Override\n\t\t\tpublic void Execute()\n\t\t\t{\n\t\t\tSquare square = (Square) receiver;\n\t\t\t// The args for SpawnBuildingCommand are the X,Y coordinate for the Building used by the factory, \n\t\t\tIAsteroidGameFactory factory = GameBoard.Instance().GetFactory();\n\t\t\tSystem.out.println(\"Spawning Building at (\" + args[0] + \",\" + args[1] + \")\");\n\t\t\tsquare.Add(factory.MakeBuilding());\n\t\t\tGameBoard.Instance().IncrementBuildingCount();\n\t\t}", "public void spawnRobots() {\n\t\tString robotName\t= \"\";\n\t\tPlayer newPlayer\t= null;\n\t\tint numberOfRobots \t= 0;\n\t\tint robotsPerPlayer = server.getRobotsPerPlayer();\n\t\tint numberOfPlayers = server.getPlayerCount();\n\t\tint robotsPerLevel\t= server.getRobotsPerLevel();\n\t\t\n\t\t// calculate how many robots that should be spawned\n\t\trobotsPerPlayer = robotsPerPlayer *\n\t\t\t\t\t\t (robotsPerLevel * \n\t\t\t\t\t\t currentLevel);\n\t\t\n\t\tnumberOfRobots \t= robotsPerPlayer *\n\t\t\t\t\t\t numberOfPlayers;\n\t\t\n\t\tfor(int i = 0; i < numberOfRobots; i++) {\n\t\t\trobotName \t\t\t= \"Robot\" + (i+1);\n\t\t\tnewPlayer = initPlayerToGameplane(robotName, \n\t\t\t\t\t\t\t\t \t\t\t PlayerType.Robot, \n\t\t\t\t\t\t\t\t \t\t\t 0, 0);\n\t\t\t\n\t\t\tHandleCommunication.broadcastToClient(null, \n\t\t\t\t\t\t\t\t\t\t\t\t server.getConnectedClientList(), \n\t\t\t\t\t\t\t\t\t\t\t\t SendSetting.AddPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t newPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t null);\n\t\t}\n\t}", "@Override\n\tpublic void run()\n\t{\n\t\tif (this.world.countSnakes() == 0)\n\t\t{\n\t\t\tDebug.log(\"Game.actionP: Game closing due to lack of snakes alive\");\n\t\t\tDialog.nonBlockingMessage(\"Snak\", \"Game over!\");\n\t\t\tclose();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Keep the amount of eggs\n\t\tint numEatables = this.world.countSnakes();\n\t\tfor (int i = this.world.countEatables(); i < numEatables; i++)\n\t\t\tthis.world.add(new Egg(this.world.findEmptyCell()));\n\t\t\n\t\t// Makes moves and paint\n\t\tSet<Snake> dead = this.world.move();\n\t\t\n\t\tif (this.server != null)\n\t\t{\n\t\t\tList<Element> elements = new ArrayList<Element>(this.world.getSnakes());\n\t\t\telements.addAll(this.world.getEatables());\n\t\t\n\t\t\tDebug.log(\"HostG.actionP: Elements: \" + elements);\n\t\t\tthis.server.sendFrame(elements.toArray(new Element[0]));\n\t\t\t\n\t\t\tfor (Snake snake : dead)\n\t\t\t\tthis.server.notifyDeath(snake);\n\t\t}\n\t\t\n\t\tthis.world.repaint();\n\t\t\n\t\t// Turn off keyboard listener if player's snake is dead\n\t\tif (dead.contains(this.player))\n\t\t{\n\t\t\tthis.frame.removeKeyListener(this);\n\t\t\t\n\t\t\tif (this.world.countSnakes() > 0)\n\t\t\t\tDialog.nonBlockingMessage(\"Snak\",\n\t\t\t\t\t\tnew MessagePanel()\n\t\t\t\t\t\t\t.add(\"Your snake is dead! :(\")\n\t\t\t\t\t\t\t.add(\"But allow the players to finish! :)\")\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t\t// Remove dead bots and genereate their next movements\n\t\tIterator<Bot> botIt = this.bots.iterator();\n\t\twhile (botIt.hasNext())\n\t\t{\n\t\t\tBot bot = botIt.next();\n\t\t\tif (dead.contains(bot))\n\t\t\t\tbotIt.remove();\n\t\t\telse\n\t\t\t\tbot.generateNextMovement();\n\t\t}\n\t}", "public boolean spawnBrother(Player player, Location location) {\r\n if (player.getAttribute(\"brother:\" + index, false)) {\r\n return false;\r\n }\r\n NPC npc = new BarrowBrother(player, npcId, location);\r\n npc.init();\r\n player.setAttribute(\"barrow:npc\", npc);\r\n player.setAttribute(\"brother:\" + index, true);\r\n return true;\r\n }", "public void spawnEnemy(Location location) {\r\n\t\t\tlocation.addNpc((Npc) this.getNpcSpawner().newObject());\r\n\t\t}", "public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}", "@Override\n\tpublic void spawn(List<String> args) throws IOException,\n\t\t\tURISyntaxException, InterruptedException {\n\t\t\n\t}", "void spawnNewPiece () {\n if (nextPiece == null)\n currentPiece = new Piece();\n else\n currentPiece = nextPiece;\n nextPiece = new Piece();\n\n positionToStart();\n isFalling = true;\n\n // Add blocks of the next piece to nextPiece view\n nextPieceBoard.clear();\n final int nRow = 0 - nextPiece.getOffset();\n final int nColumn = nextPieceBoard.rows / 2 - nextPiece.width / 2;\n for (int r = 0; r < nextPiece.height; ++r)\n for (int c = 0; c < nextPiece.width; ++c)\n if (nextPiece.blocks[r][c] == 1)\n nextPieceBoard.addTempBlock(new Block(nextPiece.color), r + nRow, c + nColumn);\n nextPieceView.setBlocks(nextPieceBoard.getCombined());\n nextPieceView.repaint();\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "public void spawnAroundBlock(Player player, Location loc, int itemID, Item3DRunnable run) {\r\n\t\tint centerx = (int) Math.floor(loc.getX());\r\n\t\tint centery = (int) Math.floor(loc.getY());\r\n\t\tint centerz = (int) Math.floor(loc.getZ());\r\n\t\t\r\n\t\t//-----------\r\n\t\t//-----------\r\n\t\t\r\n\t\tint x = centerx * 32 + 32 + 12;\r\n\t\tint y = centery * 32;\r\n\t\tint z = centerz * 32;\r\n\t\t\r\n\t\tbyte rotation = (byte) (0);\r\n\t\t\r\n\t\tspawnZombie(player, loc.getWorld().getName(), x, y, z, rotation, itemID, standCounter);\r\n\t\t\r\n\t\t//-----------\r\n\t\t\r\n\t\tx = (int) centerx * 32 + 32;\r\n\t\ty = (int) centery * 32;\r\n\t\tz = (int) centerz * 32 + 32 + 12;\r\n\t\t\r\n\t\trotation = (byte) (256/4*1);\r\n\t\t\r\n\t\tspawnZombie(player, loc.getWorld().getName(), x, y, z, rotation, itemID, standCounter);\r\n\t\t\r\n\t\t//-----------\r\n\t\t\r\n\t\tx = (int) centerx * 32 - 12;\r\n\t\ty = (int) centery * 32;\r\n\t\tz = (int) centerz * 32 + 32;\r\n\t\t\r\n\t\trotation = (byte) (256/4*2);\r\n\t\t\r\n\t\tspawnZombie(player, loc.getWorld().getName(), x, y, z, rotation, itemID, standCounter);\r\n\t\t\r\n\t\t//-----------\r\n\t\t\r\n\t\tx = (int) centerx * 32;\r\n\t\ty = (int) centery * 32;\r\n\t\tz = (int) centerz * 32 - 12;\r\n\t\t\r\n\t\trotation = (byte) (256/4*3);\r\n\t\t\r\n\t\tspawnZombie(player, loc.getWorld().getName(), x, y, z, rotation, itemID, standCounter);\r\n\t\r\n\t\t//-----------\r\n\t\r\n\t\tactions.put(standCounter, run);\r\n\t\t\r\n\t\t//update players\r\n\t\tfor(Player p : loc.getWorld().getPlayers()) {\r\n\t\t\trespawnAll(p);\r\n\t\t}\r\n\t\t\r\n\t\tstandCounter++;\r\n\t}", "private static Bat createBat(){\n try {\n UtilityMethods.print(\"Creating Big bat for you...!\"); \n BatGenerator batGenerator = new BatGenerator();\n BatBuilder bigBatBuilder = new BigBatBuilder();\n batGenerator.setBatBuilder(bigBatBuilder);\n batGenerator.constructBat(\n \"Bat\", \n \"Male\",\n 25,\n \"Scavenger\"\n );\n Bat bigBat = bigBatBuilder.getBat();\n UtilityMethods.print(\"\\n\"); \n bigBat.eat();\n UtilityMethods.print(\"\\n\"); \n bigBat.speak();\n UtilityMethods.print(\"\\n\"); \n bigBat.walk();\n UtilityMethods.print(\"\\n\"); \n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null; \n }", "public void spawn()\n\t{\n\t\tsynchronized(this)\n\t\t{\n\t\t\t// Set the x,y,z position of the L2Object spawn and update its _worldregion\n\t\t\tsetVisible(true);\n\t\t\tsetWorldRegion(WorldManager.getInstance().getRegion(getWorldPosition()));\n\n\t\t\t// Add the L2Object spawn in the _allobjects of L2World\n\t\t\tWorldManager.getInstance().storeObject(object);\n\n\t\t\t// Add the L2Object spawn to _visibleObjects and if necessary to _allplayers of its L2WorldRegion\n\t\t\tregion.addVisibleObject(object);\n\t\t}\n\n\t\t// this can synchronize on others instancies, so it's out of\n\t\t// synchronized, to avoid deadlocks\n\t\t// Add the L2Object spawn in the world as a visible object\n\t\tWorldManager.getInstance().addVisibleObject(object, region);\n\n\t\tobject.onSpawn();\n\t}", "public void spawnEntity(AEntityB_Existing entity){\r\n\t\tBuilderEntityExisting builder = new BuilderEntityExisting(entity.world.world);\r\n\t\tbuilder.loadedFromSavedNBT = true;\r\n\t\tbuilder.setPositionAndRotation(entity.position.x, entity.position.y, entity.position.z, (float) -entity.angles.y, (float) entity.angles.x);\r\n\t\tbuilder.entity = entity;\r\n\t\tworld.spawnEntity(builder);\r\n }", "public Robots(PApplet p) {\n\t\tbSpeed = 6;\n\t\tbSize = 1;\n\t\tparent = p;\n\t\tx = parent.random (bobWidth, parent.width/2 - bobWidth); // Bob starts in a random place on the screen\n\t\ty = parent.random (bobWidth,parent.width/2 - bobWidth); \n\t}", "private void spawnEnemy() {\n float randomEnemy = (float) Math.random();\n\n if (round == 1) {\n addActorFunction.accept(new SimpleEnemy(tileSet));\n } else {\n float speedMultiplier = 1 + (0.08f * round);\n float healthMultiplier = 1 + (0.01f * round * round);\n\n if (randomEnemy < (round - 1) * 0.1) {\n addActorFunction.accept(new HeavyEnemy(tileSet, speedMultiplier, healthMultiplier));\n } else {\n addActorFunction.accept(new SimpleEnemy(tileSet, speedMultiplier, healthMultiplier));\n }\n }\n }", "Stone create();", "SpawnController createSpawnController();", "public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }", "public void spawnFirstCreature(){\n\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\"))\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"antorc\"+spawnId);\n\t\t\n\t\t//Add new event into pool which will spawn the rest of the worms ( -1 because this method already spawned one )\n\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,spawnCount-1));\n\t}", "private void spawnOldZombie(Player p, String world, int x, int y, int z, byte rotation, int itemID, int eid, int stand) {\r\n\t\tsendPacket(p, world, x, y, z, rotation, eid, itemID);\r\n\t}", "public static void main(String[] args)\n {\n Pokeball pokeball = new Pokeball();\n Pokeball greatball = new Greatball();\n Pokeball ultraball = new Ultraball();\n Pokeball masterball = new Masterball();\n ArrayList<AbstractPokemon> ashPokemon = new ArrayList<AbstractPokemon>();\n ashPokemon.add(new Charmander());\n ashPokemon.add(new Squirtle());\n ashPokemon.add(new Bulbasaur());\n PokemonTrainer ash = new PokemonTrainer(\"Ash\", ashPokemon, AbstractPokemon.Type.ANY_TYPE, masterball);\n ActorWorld world = new ActorWorld();\n AbstractPokemon charmander = new Charmander();\n AbstractPokemon squirtle = new Squirtle();\n AbstractPokemon bulbasaur = new Bulbasaur();\n AbstractPokemon vulpix = new Vulpix();\n AbstractPokemon poliwhirl = new Poliwhirl();\n AbstractPokemon sunkern = new Sunkern();\n AbstractPokemon magby = new Magby();\n AbstractPokemon magikarp = new Magikarp();\n AbstractPokemon oddish = new Oddish();\n String[] worldChoices = {\"Randomly Generated\", \"Blank\", \"Cancel\"};\n int worldSelection = JOptionPane.showOptionDialog(null, \"Please select the world template:\", \"World Selection\",\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, worldChoices, worldChoices[0]);\n if (worldSelection == 2)\n {\n JOptionPane.showMessageDialog(null, \"No world chosen. Program will terminate.\", \"World Selection\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n else if (worldSelection == 0)\n {\n spawn(charmander, world);\n spawn(squirtle, world);\n spawn(bulbasaur, world);\n spawn(vulpix, world);\n spawn(poliwhirl, world);\n spawn(sunkern, world);\n spawn(magby, world);\n spawn(magikarp, world);\n spawn(oddish, world);\n spawn(ash, world);\n }\n world.show();\n }", "@Override\n public void run() {\n// handler.addObject(new Enemy(rnd.nextInt(Game.WIDTH), rnd.nextInt(200), ID.Trump));\n// handler.addObject(new Enemy(rnd.nextInt(Game.WIDTH), rnd.nextInt(200), ID.Trump));\n int rnd_x = rnd.nextInt(Game.WIDTH);\n handler.addObject(new Enemy(getX() + 30, y, ID.Trump, 0));\n handler.addObject(new Enemy(getX() -30, y, ID.Trump, 0));\n handler.addObject(new Enemy(getX() , y+30, ID.Trump, 0));\n handler.addObject(new Enemy(getX() , y-30, ID.Trump, 0));\n\n\n }", "public void shootBabyInto(int x, int y) {\n home.world.cells[x][y].resident\n = new Omnivore(home.world.cells[x][y]);\n }", "private void spawnZombie(Player p, String world, int x, int y, int z, byte rotation, int itemID, int stand) {\r\n\t\tint eid = DisguiseSystemHandler.newEntityID();\r\n\t\tentityIDs.add(eid);\r\n\t\tstandIDs.put(eid, stand);\r\n\t\t\r\n\t\t//save positioninfo for respawning\r\n\t\tItem3DInfo info = new Item3DInfo();\r\n\t\tinfo.setWorldName(world);\r\n\t\tinfo.setX(x);\r\n\t\tinfo.setY(y);\r\n\t\tinfo.setZ(z);\r\n\t\tinfo.setRotation(rotation);\r\n\t\tinfo.setItemID(itemID);\r\n\t\tentityInfo.put(eid, info);\r\n\t\t\r\n\t\tsendPacket(p, world, x, y, z, rotation, eid, itemID);\r\n\t}", "public void die(){\n\t\tboolean success = false;\n\t\ttile.setAnimal(null);\n\t\treleasePandas();\n\n\t\twhile(!success){\n\t\t\tRandom rng = new Random();\n\t\t\tInteger idx =rng.nextInt(gf.gp.getTiles().size());\n\t\t\tif(gf.gp.getTiles().get(idx).getAnimal() == null && gf.gp.getTiles().get(idx).getEntity() == null) {\n\t\t\t\tsuccess = spawn(gf.gp.getTiles().get(idx)); break;\n\t\t\t}\n\t\t}\n\t}", "public void setupGame() {\n\t\t// Re-spawn the appropriate number of sheep\n\t\tint numSheep = 31;\n\t\t\n\t\tif (!SheepPhysicsState.PRODUCTION) {\n\t\t\tnumSheep = 1;\n\t\t}\n\t\t\n\t\t// It takes half the sheep to win.\n\t\t_scoreToWin = numSheep / 2;\n\t\tp(\"It takes \" + _scoreToWin + \" sheep to win.\");\n\t\t\n\t\t_hasBeenWon = false;\n\t\t\n\t\t// Non-infrastructural entities.\n\t\t//////////////////////////\n\t\t\n\t\t// Don't create this stuff if I'm replaying.\n\t\tint mod = 1;\n\t\tfor (int i = 0; i < numSheep; i++) {\n\t\t\t//int x = _generator.nextInt(40) - 20;\n\t\t\t//int z = _generator.nextInt(80) - 40;\n\t\t\tmod *= -1;\n\t\t\tint x = i/2 * mod;\n\t\t\tint z = 0;\n\n\t\t\tSheep s = new Sheep(\"sheep-\" + i + \"[\" + _sheepID + \"]\", x, 2, z);\n\t\t\t\n\t\t\tif (!SheepPhysicsState.PRODUCTION) {\n\t\t\t\ts.setBehaviorActive(false);\n\t\t\t}\n\t\t\t\n\t\t\t_sheepID++;\n\t\t}\n\t\t\n\t\t// Add a wubble for testing.\n\t\tif (!_isJimboSpawned && !SheepPhysicsState.PRODUCTION) {\n\t\t\tSystem.out.println(\"Adding Jimbo.\");\n\t\t\t_isJimboSpawned = true;\n\t\t\taddWubble(\"Jimbo\", (short)100, (Integer)1);\n\t\t\taddSidekick(\"Jimbo\");\n\t\t\t//addWubble(\"Bimbo\", (short)101, (Integer)0);\n\t\t}\n\t\t\n\t\t//////////////////////////\n\n\t\t// Add some wrenches in the appropriate spots.\n\t\tnew Wrench(\"blueWrench1\", -8, 5, -20);\n\t\tnew Wrench(\"blueWrench2\", 8, 5, -20);\n\t\tnew Wrench(\"redWrench1\", -8, 5, 20);\n\t\tnew Wrench(\"redWrench2\", 8, 5, 20);\n\t\t\n\t\t// Save the start of the me.\n\t\t_gameStart = System.currentTimeMillis();\n\t\tSystem.out.println(\"Started game at \" + _gameStart);\n\t\t\n\t\t// Make some predicates.\n\t\t//Predicate p = new Predicate(\"baseClassPred\");\n\t\t//GoPred g = new GoPred(\"derivedGoClass\", 1);\n\t\t\n\t\t//new PowerUp(\"PowerUpS\", -1, PowerUpInfo.PowerUpType.SPEEDY, new Vector3f(0, 0.4f, 0));\n\t\t//new PowerUp(\"PowerUpE\", -1, PowerUpInfo.PowerUpType.EATER, new Vector3f(2, 0.4f, 0));\n\t\t//new PowerUp(\"PowerUpS\", -1, PowerUpInfo.PowerUpType.STICKY, new Vector3f(2, 0.4f, 2));\n\t}", "public void setSpawn (int x, int y) {\n xCord = x;\n yCord = y;\n }", "private void makePlay() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tplay = new Sprite(6, 6, 360, 379, new Image(\"file:./res/images/basketball.png\"), 1, 1000);\n\t\tplay.setLayoutX(140);\n\t\tplay.setLayoutY(190);\n\t\tplay.setScaleX(0.5);\n\t\tplay.setScaleY(0.5);\n\t\tgrid.getChildren().addAll(play);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1000));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(play);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().playWith();\n\t\t});\n\t\tpause.play();\n\n\t}", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "public EntityCroco spawnBabyAnimal(EntityAgeable par1EntityAgeable)\n {\n return new EntityCroco(this.worldObj);\n }", "public ItemSpawnTick() {\n super(100);\n }", "protected boolean spawn(int x, int y) {\r\n\t\t/* Create a new message, notifying the board\r\n\t\t * the unit has actually spawned at the\r\n\t\t * designated position. \r\n\t\t */\r\n\t\t\r\n\t\tint id = localMessageCounter++;\r\n\t\tMessage spawnMessage = new Message();\r\n\t\tspawnMessage.put(\"request\", MessageRequest.spawnUnit);\r\n\t\tspawnMessage.put(\"x\", x);\r\n\t\tspawnMessage.put(\"y\", y);\r\n\t\tspawnMessage.put(\"unit\", (IUnit) this);\r\n\t\tspawnMessage.put(\"id\", id);\r\n\t\tspawnMessage.put(\"origin\", \"D\" + unitID);\r\n\t\t\r\n\t\t// Send a spawn message\r\n\t\tif (!sendAndWait(spawnMessage))\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tMessage response = messageList.remove(id);\r\n\r\n\t\t// Wait for the unit to be placed\r\n\t\treturn (Boolean) response.get(\"committed\");\r\n\t}", "public void run() {\r\n this.createBallsOnTopOfPaddle();\r\n this.running = true;\r\n this.runner.run(new CountdownAnimation(2, 3, sprites));\r\n this.runner.run(this);\r\n }", "private void newGame() {\n\t\t// Firstly, we spawn the player.\n\t\tplayer = new AsteroidsPlayer(GameObject.ROOT, this);\n\t\tspawnPlayer();\n\n\t\t// Make sure that no other objects exist.\n\t\tasteroids.clear();\n\t\tlaserShots.clear();\n\t\totherObjects.clear();\n\n\t\t// Then we create the score text using two strings.\n\t\tAsteroidsString scoreText = new AsteroidsString(GameObject.ROOT, \"SCORE\", true, false);\n\t\tscoreText.translate(new Vector3(-cameraZoom, cameraZoom - 1));\n\t\totherObjects.add(scoreText);\n\t\tscoreString = new AsteroidsString(GameObject.ROOT, Integer.toString(score), true, false);\n\t\tscoreString.translate(new Vector3(-cameraZoom, cameraZoom - 3));\n\t\totherObjects.add(scoreString);\n\n\t\t// We set our starting lives to 3.\n\t\tlives = 3;\n\n\t\t//And we also create the lives text.\n\t\tAsteroidsString livesText = new AsteroidsString(GameObject.ROOT, \"LIVES\", false, true);\n\t\tlivesText.translate(new Vector3(cameraZoom, cameraZoom - 1));\n\t\totherObjects.add(livesText);\n\t\tlivesString = new AsteroidsString(GameObject.ROOT, Integer.toString(lives), false, true);\n\t\tlivesString.translate(new Vector3(cameraZoom, cameraZoom - 3));\n\t\totherObjects.add(livesString);\n\n\t\t// Then we just set the delay to the first asteroid.\n\t\ttimeToNextAsteroid = asteroidDelay;\n\t}", "@Override\n public void run() {\n serverHelper.newGame(game, player);\n }", "public Bumper(int xPos, int yPos, int objectRadius, Machine theMachine)\n {\n super(xPos, yPos, Color.GRAY, objectRadius, theMachine); \n\n }", "public int spawn() {\n int totalNumOfFryBorn = 0;\n Iterator<Guppy> it = guppiesInPool.iterator();\n ArrayList<Guppy> currentBabies = new ArrayList<>();\n\n while (it.hasNext()) {\n Guppy mother = it.next();\n ArrayList<Guppy> newBabies = mother.spawn();\n if (newBabies != null) {\n totalNumOfFryBorn += newBabies.size();\n currentBabies.addAll(newBabies);\n }\n }\n guppiesInPool.addAll(currentBabies);\n return totalNumOfFryBorn;\n }", "public Boat() {\n batch = new SpriteBatch();\n }", "Wall(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\", \"2420\");}", "@Test\r\n\tpublic void BushTest_2(){\r\n\t\tPlayer player = new Player(0,\"Chris\", new Point(1, 1), new Point(0, 1));\r\n\t\tPoint worldLocation = new Point(1, 1);\r\n\t\tPoint tileLocation = new Point(1, 1);\r\n\t\tBush bush = new Bush(worldLocation, tileLocation);\r\n\t\ttry{\r\n\t\t\ttry {\r\n\t\t\t\tbush.performAction(player);\r\n\t\t\t} catch (SignalException e) {\r\n\t\t\t}\r\n\t\t\tif(player.getPocket().getItems().size() == 1){\r\n\t\t\t\tItem item = player.getPocket().getItems().get(0);\r\n\t\t\t\tassert(item instanceof Food);\r\n\t\t\t\tassert(((Food) item).getFoodType() == FoodType.BERRY);\r\n\t\t\t}\r\n\t\t\tTimeUnit.SECONDS.sleep(11);\r\n\t\t\ttry {\r\n\t\t\t\tbush.performAction(player);\r\n\t\t\t} catch (SignalException e) {\r\n\t\t\t}\r\n\t\t\tif(player.getPocket().getItems().size() == 1 ||player.getPocket().getItems().size() == 2){\r\n\t\t\t\tint last = player.getPocket().getItems().size() - 1;\r\n\t\t\t\tItem item = player.getPocket().getItems().get(last);\r\n\t\t\t\tassert(item instanceof Food);\r\n\t\t\t\tassert(((Food) item).getFoodType() == FoodType.BERRY);\r\n\t\t\t}\r\n\t\t}catch(GameException | InterruptedException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "Strobo createStrobo();", "private void newGame(long seed) {\n ter.initialize(WIDTH, HEIGHT, 0, -3);\n GameWorld world = new GameWorld(seed);\n String toSave = \"N\" + seed + \"S\";\n world.setSaveScript(toSave);\n for (int x = 0; x < WIDTH; x += 1) {\n for (int y = 0; y < HEIGHT; y += 1) {\n world.world[x][y] = Tileset.NOTHING;\n }\n }\n world.buildManyRandomSq();\n GameWorld.Position avatarPosition = randomAvatarPosition(world);\n ter.renderFrame(world.world);\n loadAvatar(world, avatarPosition);\n }", "public void plant(int x, int y) throws IOException {\r\n\t\tint level = killed / 5 + 1;\r\n\t\t// The amount of plants cannot exceed the number of zombies\r\n\t\tif (planted <= zombies.size() ) {\r\n\t\t\tfield[x][y] = new Plant(level*3, Plants.PEASHOOTER);\r\n\t\t\tplanted++;\r\n\t\t\tupdate(getGraphics());\r\n\t\t}\r\n\t}", "public void act() {\n if (System.currentTimeMillis() - lastTime > 5000) {\n lastTime = System.currentTimeMillis();\n int y = (int)(Math.random() * ((BackGround1.height-30)+1)+30);\n int x = (int)(Math.random() * ((BackGround1.width-15)+1)+15);\n addObject(new Coin(),x ,y);\n }\n }", "public BallSpawner(Board board, String name, GridLocation location) {\n super(board, name, location, Constants.BALLSPAWNER_REFLECTION_COEFF);\n collidables.add(new FixedCircle(location.toVect().plus(new Vect(0.5,0.5)), 0.5, reflectionCoeff));\n representation = Collections.unmodifiableList(Arrays.asList(\"@\"));\n assert(checkRep());\n }", "private static void spawn(Actor actor, ActorWorld world)\n {\n Random generator = new Random();\n int row = generator.nextInt(10);\n int col = generator.nextInt(10);\n Location loc = new Location(row, col);\n while(world.getGrid().get(loc) != null)\n {\n row = generator.nextInt(10);\n col = generator.nextInt(10);\n loc = new Location(row, col);\n }\n world.add(loc, actor);\n }", "private void fuck(int x, int y) {\n\t\tFish son = new Fish(x, y, this.environment, this.appConfig, this.scheduler);\n\t\tson.color = Color.YELLOW; // yellow when fish is a newborn\n\t\tthis.environment.addAgent(son, x, y);\n\t\tthis.scheduler.birth(son);\n\t\tthis.breedTime = this.appConfig.getFishBreedTime(); // reset breed time\n\t}", "public void run() {\n\n while (!Thread.interrupted()) {\n while (randomRoomPlayers.size() > 1) {\n Player firstPlayer = randomRoomPlayers.poll();\n Player secondPlayer = randomRoomPlayers.poll();\n Thread newGameThread = new Thread(new BullCowGame(firstPlayer, secondPlayer, this));\n newGameThread.start();\n System.out.println(\"Game initiated by PlayersHolder.\");\n }\n synchronized (this) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n return;\n }\n }\n }\n }", "private void createGun() {\n gun = new Node(\"Gun\");\n Box b = new Box(.25f, .25f, 1.25f);\n Geometry bg = new Geometry(\"Box\", b);\n Material bm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n bm.setColor(\"Color\", ColorRGBA.Gray);\n bg.setMaterial(bm);\n gun.attachChild(bg);\n }", "public Player() { \n grid = new Cell[GRID_DIMENSIONS][GRID_DIMENSIONS]; //size of grid\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n grid[i][j] = new Cell(); //creating all Cells for a new grid\n }\n }\n \n fleet = new LinkedList<Boat>(); //number of boats in fleet\n for (int i = 0; i < NUM_BOATS; i++) {\n Boat temp = new Boat(BOAT_LENGTHS[i]); \n fleet.add(temp);\n }\n shipsSunk = new LinkedList<Boat>();\n }", "public BomberHuman(final int posX, final int posY, final Network nw,\n\t\t\tfinal boolean server) {\n\t\tthis.posX = posX;\n\t\tthis.posY = posY;\n\t\tthis.nw = nw;\n\t\tthis.human = true;\n\t}", "public void tick()\n {\n //We have to respawn the circles if they reach the bottom of the screen\n if (hasPassed())\n {\n //Randomly reset the x coordinates.\n this.x = minRandom + new Random().nextFloat()*(maxRandom-minRandom);\n //Fixed Y spawn\n this.y = spawnY;\n //Randomly reset the width,height, and radius of the new asteroid\n int newHeight, newWidth;\n newHeight = 32 + (int) (new Random().nextFloat()*(64.0f-32.0f));\n newWidth = newHeight;\n setWidth(newWidth);\n setHeight(newHeight);\n this.radius = width*0.5f;\n //Create a new Random color\n Random gen = new Random();\n int red, green, blue = 50;\n do\n {\n red = 40 + (int) (gen.nextFloat()*(255.0f-40.0f));\n green = 40 + (int) (gen.nextFloat()*(255.0f-40.0f));\n blue = 40 + (int) (gen.nextFloat()*(255.0f-40.0f));\n } while (red != green && red != blue);\n \n this.color = new Color(red,green,blue);\n }\n else\n {\n fall();\n move();\n }\n }", "public Bathroom(int size) {\n this.size = size;\n myBathtub = new Bathtub(100); //instantiate bathtub object during Bathroom object creation\n }", "public void askSpawn() throws RemoteException{\n respawnPopUp = new RespawnPopUp();\n respawnPopUp.setSenderRemoteController(senderRemoteController);\n respawnPopUp.setMatch(match);\n\n Platform.runLater(\n ()-> {\n try{\n respawnPopUp.start(new Stage());\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }\n );\n }", "public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }", "public static void main(String[] args) {\n\t\t\n\t\tBee b = new Bee(1, \"Black\", \"Lake\");\n\t\tSystem.out.println(\"This bee: \" + b.getSize() + \" \" + b.getColor() + \" \" + b.getSwarm());\n\t\tBee c = b.clone();\n\t\tSystem.out.println(\"This bee: \" + c.getSize() + \" \" + c.getColor() + \" \" + c.getSwarm());\n\t\t\n\t\t\n\n\t}", "void spawnBot( String className, String messager ) {\n spawnBot( className, null, null, messager);\n }", "void makeDragon() {\n new BukkitRunnable() {\n int i = 555;\n\n @Override\n public void run() {\n Set<BlockData> set = create.get(i);\n for (BlockData blockData : set) {\n blockData.setBlock();\n }\n\n i++;\n if (i > 734) {\n cancel();\n }\n }\n }.runTaskTimer(Main.plugin, 0, 2);\n // Location end = new Location(Bukkit.getWorld(\"world\"), 3, 254, 733);\n }", "private void spawnRandomAsteroid() {\n\t\tRandom r = new Random();\n\n\t\t// The size of the asteroid is randomised.\n\t\tdouble size = r. nextDouble() * (AsteroidsAsteroid.maximumSize - AsteroidsAsteroid.minimumSize) + AsteroidsAsteroid.minimumSize;\n\n\t\t// The spawn distance is a fair distance away from the action.\n\t\tfinal double spawnDistance = cameraZoom * 2 + size;\n\n\t\t// Same with its velocity magnitude.\n\t\tdouble decidedVelocity = r.nextDouble() * (AsteroidsAsteroid.maximumVelocity - AsteroidsAsteroid.minimumVelocity) + AsteroidsAsteroid.minimumVelocity;\n\n\t\t// And the angle.\n\t\tdouble decidedAngle = r.nextDouble() * 360 - 180;\n\n\t\t// The velocity is then converted to a Vector3.\n\t\tVector3 velocity = new Vector3(decidedVelocity * -Math.sin(Math.toRadians(decidedAngle)), decidedVelocity * Math.cos(Math.toRadians(decidedAngle)));\n\n\t\t// Then we pick a random point on the screen.\n\t\tVector3 randomPoint = new Vector3(r.nextDouble() * 2 * cameraZoom - cameraZoom, r.nextDouble() * 2 * cameraZoom - cameraZoom);\n\n\t\t// We then set the asteroid's starting position as that spawn distance away from the point\n\t\t// in the reverse direction to its velocity.\n\t\tVector3 startingPosition = randomPoint.add(new Vector3(spawnDistance * Math.sin(Math.toDegrees(-decidedAngle)), spawnDistance * -Math.cos(Math.toDegrees(-decidedAngle))));\n\n\t\t// Then we just create the asteroid.\n\t\tAsteroidsAsteroid asteroid = new AsteroidsAsteroid(GameObject.ROOT, this, size, velocity);\n\t\tasteroid.translate(startingPosition);\n\t\tasteroids.add(asteroid);\n\n\t}", "public static Avatar makeSneak() {\n HUD.setOccupationSprite(ImageAssets.sneakS);\n return new Avatar(new Sneak(),new Location(Settings.SPAWN_X, Settings.SPAWN_Y, Settings.SPAWN_Z));\n }", "public static void main(String[] args) {\n\t\t\n\t\tPuppy obj = new Puppy();\n\t\tobj.sleep();\n\t\tobj.run();\n\t\tobj.eat();\n\n\t}", "private void GenerateBomb(){\n\t\t\n\t\t//Update for the bomb powerup\n\t\tint randGen = rand.nextInt((int)((float)BOMB_FREQUENCY * RANDOM_DEVIATION));\n\t\trandGen = (rand.nextBoolean()) ?-randGen :randGen;\n\t\t\n\n\t\t\n\t\tif(timeSinceLastSpawns.get(CollectibleType.Bomb.ordinal()).intValue() > (BOMB_FREQUENCY + randGen)){\n\t\t\t\n\n\t\t\ttimeSinceLastSpawns.set(CollectibleType.Bomb.ordinal(), 0);\n\t\t\t\n\t\t\t//SPAWN BOMB COLLECTIBLE HERE\n\t\t}\n\t}", "private void prepareBomb(int x, int y, GraphicsContext gc) {\n\t\t Bomb bomb = new Bomb(x, y);\n\t\t GameController.getCurrentMap().addEntity(bomb, x, y);\n\t\t Thread thread = new Thread(() -> {\n\t\t try {\n\t\t Thread.sleep(2000);\n\t\t Platform.runLater(new Runnable() {\n\n\t\t @Override\n\t\t public void run() {\n\t\t bomb.bomb();\n\t\t }\n\n\t\t });\n\t\t GameController.getCurrentMap().removeEntity(x, y);\n\t\t drawGameBoard(gc, index);\n\n\t\t // GameController.getCurrentMap().addEntity(bomb, x, y);\n\t\t } catch (InterruptedException e) {\n\t\t // TODO Auto-generated catch block\n\t\t e.printStackTrace();\n\t\t }\n\t\t });\n\t\t thread.start();\n\n\t}", "private void makeSnack() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\t\t\n\t\tsnack = new Sprite(3, 3, 22, 25, new Image(\"file:./res/images/snack.png\"), 1, 1000);\n\t\tsnack.setLayoutX(150);\n\t\tsnack.setLayoutY(150);\n\t\tsnack.setScaleX(0.3);\n\t\tsnack.setScaleY(0.3);\n\t\tgrid.getChildren().addAll(snack);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1500));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(snack);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().eatSnack();\n//\t\t\tif(!model.isHealthy()){\n//\t\t\t\tsetSickImg();\n//\t\t\t}\n\t\t});\n\t\tpause.play();\n\t\t\n\t}", "@Spawns(\"moose\")\n public Entity spawnMoose(SpawnData data) {\n return entityBuilder()\n .from(data)\n .type(MOOSE)\n .viewWithBBox(texture(\"moose.png\", 40, 58))\n .with(new CollidableComponent(true))\n .with(new OffscreenCleanComponent())\n .with(new LiftComponent().yAxisSpeedDuration(150, Duration.seconds(15)))\n .build();\n }", "private void doSpawnProcess()\n\t{\n\t\t// spawn sometin\n\t\tthis.spawn();\n\t\t\n\t\t// record another spawned enemy\n\t\tspawnCurrent++;\n\t\t\n\t\t// if that wasn't the last Walker\n\t\tif(currentWave.getNumberOfWalkers() > 0)\n\t\t{\n\t\t\t// restart the spawn timer\n\t\t\tfloat delay = currentWave.getSpawnDelay();\n\t\t\tspawnTimer.start(delay);\n\t\t}\n\t\t// otherwise, we've spawned all our piggies in this wave\n\t\telse\n\t\t{\n\t\t\tprepareNextWave();\n\t\t}\n\t}", "public void spawnSlowMotionPickup() {\n Random random = new Random();\n\n slowMotionTimer.cancel();\n slowMotionTimer.purge();\n slowMotionTimer = new Timer();\n slowMotionTimer.schedule(\n new TimerTask() {\n @Override\n public void run() {\n Pickup pickup = new SlowMotionPickup(canvas);\n pickup.spawn();\n activePickups.add(pickup);\n spawnSlowMotionPickup();\n }\n }, (random.nextInt(SLOW_MOTION_MAX_SPAWN_TIME - SLOW_MOTION_MIN_SPAWN_TIME) + SLOW_MOTION_MIN_SPAWN_TIME));\n }", "public GameObject spawnBigBeamer(LogicEngine in_logicEngine) {\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bigbeamer.png\",((float)LogicEngine.SCREEN_WIDTH/2),LogicEngine.SCREEN_HEIGHT+64,0);\r\n\t\tship.i_animationFrameSizeHeight = 115;\r\n\t\tship.i_animationFrameSizeWidth = 115;\r\n\t\t\r\n\t\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\r\n\t\tship.v.setMaxForce(2.5f);\r\n\t\tship.v.setMaxVel(2.5f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tint i_shootEvery = 80;\r\n\t\t\r\n\t\tBeamShot b = new BeamShot(i_shootEvery);\r\n\t\t\r\n\t\tb.b_flare=false;\r\n\t\tb.f_offsetX=-40;\r\n\t\tb.f_offsetY=-30;\r\n\t\tb.i_delay = 40;\r\n\t\tb.i_beamWidth = 15;\r\n\t\t\r\n\t\tBeamShot b2 = new BeamShot(i_shootEvery);\r\n\t\tb2.b_flare=false;\r\n\t\tb2.f_offsetX=40;\r\n\t\tb2.f_offsetY=-30;\r\n\t\tb2.i_delay = 40+(i_shootEvery/2);\r\n\t\tb2.i_beamWidth = 15;\r\n\t\tb.nextBeam = b2;\r\n\t\t\r\n\t\tship.shootEverySteps=1;\r\n\t\tship.shotHandler = b;\r\n\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 100, 50f);\r\n\t\t\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\tif(!Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 160;\r\n\t\t\r\n\t\tc.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t}" ]
[ "0.67972565", "0.67185676", "0.655506", "0.6358791", "0.626158", "0.6248214", "0.6161559", "0.612623", "0.6110084", "0.60714906", "0.60284215", "0.6023666", "0.6003969", "0.5927336", "0.59164023", "0.5910532", "0.59091145", "0.59024453", "0.58935046", "0.5888961", "0.58807254", "0.5869163", "0.5866705", "0.5828499", "0.5816895", "0.5807465", "0.5806188", "0.5776902", "0.57754856", "0.57494146", "0.5732484", "0.57261974", "0.5716363", "0.57132953", "0.57025886", "0.5690384", "0.56745356", "0.5669069", "0.56619644", "0.56591773", "0.56424385", "0.5617293", "0.56108105", "0.55771184", "0.55733746", "0.5562576", "0.55568475", "0.5536177", "0.5534788", "0.5534731", "0.5530573", "0.5506665", "0.55049354", "0.55024296", "0.55011904", "0.5500319", "0.54972357", "0.54933006", "0.5485155", "0.54772747", "0.5473698", "0.54717857", "0.5464452", "0.5463954", "0.5446192", "0.54413086", "0.5435131", "0.5426063", "0.54244065", "0.5420403", "0.54202884", "0.5418845", "0.54171777", "0.5414091", "0.5406647", "0.53890437", "0.53863543", "0.53844005", "0.5383305", "0.5376999", "0.53639495", "0.5362281", "0.5357273", "0.535338", "0.5348578", "0.5345966", "0.53380084", "0.5335422", "0.53286296", "0.53278995", "0.53262424", "0.5325165", "0.5318592", "0.53169733", "0.53144467", "0.5312858", "0.5308504", "0.5308336", "0.53065604", "0.5306006" ]
0.79955304
0
Have a random chance to become "scared"
public void doAi(){ if(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){ setScared(true); } //Update rectangle setRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight()); rect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10); if(rect.intersects(getRectangle())){ if(StateManager.getState() == StateManager.STATE_BOSSTWO){ setDestinationX(StateGame.player.getX()); setDestinationY(StateGame.player.getY()); rect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10); reachedDestination = (true); } } //Check for collision with jelly int checkedJelly = (0); while(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){ if(EntityJelly.JELLY.get(checkedJelly).getDead() == false){ if(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){ setHealth(getHealth() - 2); if(MathHelper.getRandom(1, 10) == 10){ Announcer.addAnnouncement("-2", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY()); } } } checkedJelly++; } //If we're out of health, kill the entity if(getHealth() < 0){ setDead(true); } if(StateManager.getState() == StateManager.STATE_BOSSTWO){ if(reachedDestination == true){ if(getScared() == false){ setY(getY() + getSpeed()); }else{ setY(getY() - getSpeed() * 3); setX(getX() - getSpeed() * 3); } }else{ if(getScared() == false){ if(getX() < getDestinationX()) setX(getX() + getSpeed()); if(getX() > getDestinationX()) setX(getX() - getSpeed()); if(getY() < getDestinationY()) setY(getY() + getSpeed()); if(getY() > getDestinationY()) setY(getY() - getSpeed()); }else{ setY(getY() - getSpeed() * 3); setX(getX() - getSpeed() * 3); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void random() {\n\n\t}", "Boolean getRandomize();", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "public abstract void randomize();", "private void random() {\n GameState gs = cc.getGameState();\n ArrayList<int[]> moves = cc.getPlayerMoves(player);\n ArrayList<GameState> states = nextStates(moves, gs);\n for (int[] m : moves) {\n GameState next = checkMove(m, cc);\n states.add(next);\n }\n Random rand = new Random(System.nanoTime());\n int i = rand.nextInt(states.size());\n cc.setAIMove(states.get(i));\n }", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "float genChance();", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public Critter1() {\r\n\t\tnumberSpawned = 0;\r\n\t\twhile (fearfullness < 50) {//at minimum fearfullness is 50%\r\n\t\t\tfearfullness = getRandomInt(100);\r\n\t\t}\r\n\t}", "Randomizer getRandomizer();", "void move()\n {\n Random rand = new Random();\n int moveOrNot = rand.nextInt(2);//50% chance\n if(moveOrNot == 1)\n super.move();\n }", "private void thinking(){\n int sleepTime = (int)(Math.random()*2000);\n try{\n Thread.sleep(sleepTime);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "private void randomBehavior() {\n\t\trandom = rand.nextInt(50);\n\t\tif (random == 0) {\n\t\t\trandom = rand.nextInt(4);\n\t\t\tswitch (random) {\n\t\t\t\tcase 0:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "public static int randomNext() { return 0; }", "private void moveRandomly()\r\n {\r\n if (Greenfoot.getRandomNumber (100) == 50)\r\n turn(Greenfoot.getRandomNumber(360));\r\n else\r\n move(speed);\r\n }", "public abstract int getRandomDamage();", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(500, 800);\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "public static boolean chance() {\r\n Random rand = new Random();\r\n int chance = rand.nextInt(10);\r\n return chance > 5;\r\n }", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(10, 20); \t\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "public static int getRandomEventChance() {\r\n\t\treturn 10; // 1-in\r\n\t}", "public boolean DoBlackMagic()\n{\n\tRandom generator=new Random();\n\tint result=generator.nextInt(4);\n\tif(result==0)\n\t{\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n\n}", "public void SetRandom(boolean random);", "void randomize() {\r\n\t\trandomize(1, this.length());\r\n\t}", "public float getSpawningChance()\n {\n return 0.1F;\n }", "@Override\n public int attack() {\n return new Random().nextInt(5);\n }", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "@SideOnly(Side.CLIENT)\n @Override\n public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {\n if(!ResynthConfig.PLANTS_GENERAL.enableSmokingPlants)\n return;\n\n IBlockState iblockstate = world.getBlockState(pos);\n int amount = 3;\n\n if(!MathUtil.chance(2.0F))\n return;\n\n if (iblockstate.getMaterial() != Material.AIR) {\n for (int i = 0; i < amount; ++i){\n double d0 = rand.nextGaussian() * 0.02D;\n double d1 = rand.nextGaussian() * 0.02D;\n double d2 = rand.nextGaussian() * 0.02D;\n world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,\n (double)((float)pos.getX() + rand.nextFloat()),\n (double)pos.getY() + (double)rand.nextFloat()\n * iblockstate.getBoundingBox(world, pos).maxY,\n (double)((float)pos.getZ() + rand.nextFloat()), d0, d1, d2);\n }\n }\n else {\n for (int i1 = 0; i1 < amount; ++i1) {\n double d0 = rand.nextGaussian() * 0.02D;\n double d1 = rand.nextGaussian() * 0.02D;\n double d2 = rand.nextGaussian() * 0.02D;\n world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,\n (double)((float)pos.getX() + rand.nextFloat()),\n (double)pos.getY() + (double)rand.nextFloat() * 1.0f,\n (double)((float)pos.getZ() + rand.nextFloat()), d0, d1, d2);\n }\n }\n }", "public void randomChange() {\n\t\tif (Math.random() < .5) {\n\t\t\tthis.setOn(true);\n\t\t} else {\n\t\t\tthis.setOn(false);\n\t\t}\n\t}", "public void spin () {\n //Decide outcome.\n Random rand=new Random();\n result=rand.nextInt(100)+1+prevSpin;\n\n /**\n * Set the images\n * Image 1-11 are pictures listed bellow. 12 is wild.\n */\n //Loss\n if (result<=10) {\n //Prevention of loss streak\n prevSpin+=1;\n spinsLeft-=1;\n\n img1=rand.nextInt(12)+1;\n if (img1==12) {\n img2=rand.nextInt(11)+1;\n }\n else {\n img2=rand.nextInt(12)+1;\n }\n\n if (img1==img2) {\n img3=rand.nextInt(11)+1;\n while (img1==img3) {\n img3=rand.nextInt(11)+1;\n }\n }\n else if (img1==12 || img2==12) {\n img3=rand.nextInt(11)+1;\n while (img1==img3 || img2==img3) {\n img3=rand.nextInt(11)+1;\n }\n }\n else {\n img3=rand.nextInt(12)+1;\n }\n }\n\n //Cherry (1)\n else if (11<=result && result<=27) {\n prevSpin=0;\n spinsLeft-=1;\n score+=10;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=1;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=1;\n if (rand.nextInt(wildChance)+1==1 && (img1==1 || img2==1))\n img3=12;\n else\n img3=1;\n }\n\n //Pine tree (2)\n else if (28<=result && result<=38) {\n prevSpin=0;\n spinsLeft-=1;\n score+=20;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=2;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=2;\n if (rand.nextInt(wildChance)+1==1 && (img1==2 || img2==2))\n img3=12;\n else\n img3=2;\n }\n\n //\"Bar\" (3)\n else if (39<=result && result<=49) {\n prevSpin=0;\n spinsLeft-=1;\n score+=40;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=3;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=3;\n if (rand.nextInt(wildChance)+1==1 && (img1==3 || img2==3))\n img3=12;\n else\n img3=3;\n }\n\n //Bell (4)\n else if (50<=result && result<=58) {\n prevSpin=0;\n spinsLeft-=1;\n score+=60;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=4;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=4;\n if (rand.nextInt(wildChance)+1==1 && (img1==4 || img2==4))\n img3=12;\n else\n img3=4;\n }\n\n //Snowflake (5)\n else if (59<=result && result<=67) {\n prevSpin=0;\n spinsLeft-=1;\n score+=100;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=5;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=5;\n if (rand.nextInt(wildChance)+1==1 && (img1==5 || img2==5))\n img3=12;\n else\n img3=5;\n }\n\n //Mead tankard (6)\n else if (68<=result && result<=75) {\n prevSpin=0;\n spinsLeft-=1;\n score+=150;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=6;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=6;\n if (rand.nextInt(wildChance)+1==1 && (img1==6 || img2==6))\n img3=12;\n else\n img3=6;\n }\n\n //Snowball (7)\n else if (76<=result && result<=82) {\n prevSpin=0;\n spinsLeft-=1;\n score+=250;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=7;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=7;\n if (rand.nextInt(wildChance)+1==1 && (img1==7 || img2==7))\n img3=12;\n else\n img3=7;\n }\n\n //Moose (8)\n else if (83<=result && result<=88) {\n prevSpin=0;\n spinsLeft-=1;\n score+=350;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=8;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=8;\n if (rand.nextInt(wildChance)+1==1 && (img1==8 || img2==8))\n img3=12;\n else\n img3=8;\n }\n\n //Coin (9)\n else if (89<=result && result<=93) {\n prevSpin=0;\n score+=500;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=9;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=9;\n if (rand.nextInt(wildChance)+1==1 && (img1==9 || img2==9))\n img3=12;\n else\n img3=9;\n }\n\n //\"7\" (10)\n else if (94<=result && result<=98) {\n prevSpin=0;\n spinsLeft+=2;\n score+=777;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=10;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=10;\n if (rand.nextInt(wildChance)+1==1 && (img1==10 || img2==10))\n img3=12;\n else\n img3=10;\n }\n\n //Barbarian \"Bar\" (11)\n else if (99<=result) {\n //Prevention of \"high win\" streak\n prevSpin-=1;\n spinsLeft+=9;\n score+=1000;\n if (rand.nextInt(wildChance)+1==1)\n img1=12;\n else\n img1=11;\n if (rand.nextInt(wildChance)+1==1)\n img2=12;\n else\n img2=11;\n if (rand.nextInt(wildChance)+1==1)\n img3=12;\n else\n img3=11;\n }\n\n else {\n System.out.println(\"Result Error.\");\n }\n }", "public int monsterAttack(){\n Random ran = new Random();\n return ran.nextInt(4);\n }", "public abstract boolean isRandom();", "public int dmg(){\r\n dmg = rand.nextInt(att);\r\n if(att == 1)\r\n dmg = 1;\r\n return dmg;\r\n }", "public void tick() {\r\n\t\thunger += (10 + generateRandom());\r\n\t\tthirst += (10 + generateRandom());\r\n\t\ttemp -= (1 + generateRandom());\r\n\t\tboredom += (1 + generateRandom());\r\n\t\tcageMessiness += (1 + generateRandom());\r\n\t}", "public void randomMove(){\n ArrayList<Hole> availableHoles = availableMoves(nextToPlay);\n int holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n ArrayList<Korgool> korgools = availableHoles.get(holeIndex).getKoorgools();\n while(korgools.size() == 0){\n holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n korgools = availableHoles.get(holeIndex).getKoorgools();\n }\n redistribute(availableHoles.get(holeIndex).getHoleIndex());\n }", "private int randomWeight()\n {\n return dice.nextInt(1000000);\n }", "public static void playRandomChicken() {\n\t\t\n\t\tString[] chickenSoundArray = {\"chicken1\", \"chicken2\", \"chicken3\"};\n\t\t\n\t\tint rnd = new Random().nextInt(chickenSoundArray.length);\n\t\tplaySound(chickenSoundArray[rnd],0.5f);\n\t}", "public void setWhoGoesFirstRandom() {\n Random ran = new Random();\n int i = ran.nextInt(2) + 1;\n if(i == 1) {\n setWhoGoesFirst(humanPlayer);\n } else {\n setWhoGoesFirst(aiPlayer);\n }\n }", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "SimulatedAnnealing() {\n generator = new Random(System.currentTimeMillis());\n }", "public void shuffle () {\n this.lives = 6;\n this.attempts.clear();\n this.victory = false;\n this.lose = false;\n Random r = new Random ();\n this._word = _dictionary[r.nextInt(_dictionary.length)];\n // this._word = _dictionary[2]; // Testing purposes\n this.hint.setLength(0);\n for (int i = 0; i < _word.length(); i++) {\n this.hint.append(\"_ \");\n } \n }", "private void chance(Player currentPlayer) {\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n\n if(randomNum == 1){\n convertTextToSpeech(\"Advance to Bond Street\");\n currentPlayer.setCurrentPosition(34);\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Unpaid charges. Go to jail\");\n setJail(currentPlayer);\n }\n if(randomNum == 3){\n convertTextToSpeech(\"Build a rooftop swimming pool on your apartment, pay 300\");\n if(m_manageFunds) {\n currentPlayer.subtractMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n m_freeParking += 300;\n Log.d(\"chance subtract 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance free parking\", String.valueOf(m_freeParking));\n }\n }\n }", "public int eDmg(){\r\n eDmg = rand.nextInt(13);\r\n return eDmg;\r\n }", "public void birdDeath(){\n birdDeath[(int)(Math.random()*3)].play(1f);\n }", "public void setRandom(Random r) {\n this.r = r;\n }", "public void roam(){\r\n Random rand = new Random();\r\n String aniName = this.getName();\r\n String aniType = this.getAniType();\r\n //Chance will be a number between 1 and 100\r\n int chance = rand.nextInt(100) + 1;\r\n //25% chance that the pachyderm will charge\r\n if (chance <= 25){\r\n System.out.println(aniName + \" the \" + aniType + \" charges.\");\r\n }\r\n //75% chance the method works as originally intended.\r\n else{\r\n System.out.println(aniName + \" the \" + aniType + \" roams.\");\r\n }\r\n }", "@Override\n public int damage(){\n int damage = 0;\n Random rand = new Random();\n int x = rand.nextInt(20) + 1;\n if (x == 1)\n damage = 50;\n return damage; \n }", "public static boolean isPresent() {\n // random genrate\n //double ranValue = Math.floor(Math.random() * 10 ) % 3;\n //int ranValue = 0/1;\n return 1 == new Random().nextInt(1000)%2;\n }", "public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }", "public void randomize()\n {\n int max = list.length;\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * max) + 1;\n }", "public float getChance() {\n return chance;\n }", "public static boolean chance(int prob) {\n Random random = new Random();\n return random.nextInt(prob) == 1;\n // Do I really need to explain this??\n }", "@Override\n public void run() {\n if (random.nextInt(10) == 0)\n addPowerUp(random.nextInt(256));\n }", "int random(int m)\n {\n return (int) (1 + Math.random()%m);\n }", "private void eating(){\n int sleepTime = (int)(Math.random()*2000);\n try{\n Thread.sleep(sleepTime);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "public void setRandom(boolean random){\n this.random = random;\n }", "@Override\r\n\tpublic void doTimeStep() {\n\t\tthis.run(Critter.getRandomInt(8));\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tRandom rr=new Random();\r\n\t\t\r\n\t\tSystem.out.println(Math.random());//[0,1)\r\n\t\t \r\n\t\t// 第一种情况 int(强转之后最终的值一定是0)\r\n\t\t// 第二种情况 int(强转之后将小数点舍去 1-5)\r\n\t\tSystem.out.println((int)Math.random()*5);//0.99*5永远到不了5\r\n\t\tSystem.out.println((int)(Math.random()*5+1));//[1,5.)\r\n\t\t\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\t\r\n\t\tfor(int i=0;i<=20;i++){\r\n\t\t\tSystem.out.print(i%7+\"-\");\r\n\t\t\t\r\n\t\t}\r\n\t\t//1-M的随机产生\r\n\t\t//(int)(Math.random()*M+1)\r\n\t\t\r\n\t\t\r\n\t\t//产生0 1的概率不同 Math.random()<p?0:1\r\n\t\tSystem.out.println(\"----\"+rr.rand01p());\r\n\t\tSystem.out.println(\"----\"+rr.rand01());\r\n\t\tfor(int i=0;i<=11;i++){\r\n\t\t\tSystem.out.print(i%6+\"-\");\r\n\t\t \t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(rr.rand106());\r\n\t}", "@Override\n\tpublic void randomChanged(boolean random) {\n\t\t\n\t}", "protected Random get_rand_value()\n {\n return rand;\n }", "private int rand() {\n return (int)(Math.random()*(RAND_MAX + 1));\n }", "public void randomizeHaplotype() {\n if (rand == null) {\n log.error(\"Cannot randomize haplotype\");\n log.error(toString());\n System.exit(1);\n }\n\n isPhased = true;\n if (rand.nextDouble() > 0.5) {\n return;\n }\n byte tmp = paternal;\n paternal = maternal;\n maternal = tmp;\n }", "public void setChanceCardShuffle() {\n ChanceCardShuffle = true;\n }", "public void bake() {\n\t\twhile(true) {\n\t\t\tSystem.out.print(\"attempting to bake 1 souffle...\");\n\t\t\tif(Math.random() < 0.5) {\n\t\t\t\tSystem.out.println(\"success!\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"but it didn't rise\");\n\t\t\t\tprepare();\n\t\t\t}\n\t\t}\n\t}", "private void randomMove() {\n }", "long random(long ws) {\r\n\t\treturn (System.currentTimeMillis() % ws);\r\n\t}", "private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}", "public int getRandom() {\r\n if ((itemSize / nextIndexInCache) < 0.25) {\r\n rebuildCache();\r\n }\r\n while (true) {\r\n int i = random.nextInt(nextIndexInCache);\r\n int v = cache[i];\r\n if (contains(v)) {\r\n return v;\r\n }\r\n }\r\n }", "private static int randomCycleCap() {\n int newValue = 0;\n int iterations = 3;\n Random bombRandGen = new Random();\n\n for (int i = 0; i <= iterations; i++) {\n newValue += bombRandGen.nextInt(4);\n }\n\n return newValue;\n }", "public static double random() {\r\n return uniform();\r\n }", "private void turnAround() {\n d = Math.random();\n if (d < 0.1) {\n changeAppearance();\n }\n }", "public Card drawFromChance()\n {\n Random draw = new Random();\n \n //if the chance cards are exhausted, re-fill the cards\n if(m_chance.size() == 0)\n {\n m_chance = m_drawnChance;\n m_drawnChance.clear();\n }\n //draw a random card and add it to the list of the cards drawn\n int drawFrom = draw.nextInt(m_chance.size() - 1) + 1;\n Card card = m_chance.remove(drawFrom);\n m_drawnChance.add(card);\n \n return card;\n }", "static int getRandomDelta() {\n int d = rand.nextInt(100);\n if (d < 50) {\n return -1;\n } else {\n return 1;\n }\n }", "public void speckle() {\n\t\tint r = (height / res) - 1;\n\t\tint c = (width / res);\n\t\tfor (int i = 0; i < c; i++)\t\t{\n\t\t\tint x = rng.nextInt(25);\t\t\t\n\t\t\tif (x == 0) { // 1/25 chance of changing bottom row pixel to black\t \n\t\t\t\tvalues[r][i] = color1;\t\t\t\t\n\t\t\t}\n\t\t\telse if (x == 1) { // 1/25 chance of changing bottom row pixel to white\n\t\t\t\tvalues[r][i] = color2;\n\t\t\t}\n\t\t\t// 23/25 chance of leaving bottom pixel alone\n\t\t}\n\t}", "public static void randomInit(int r) { }", "public void makeRandomMove() {\n\t\ttry{\r\n\t\t\tif (playerId == game.getState().getTurn()){\r\n\t\t\t\tgame.execute(randPlayer.requestAction(game.getState()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e){\r\n\t\t\t\r\n\t\t}\r\n\t}", "AttackResult randomAttack();", "@Override\n public boolean run() {\n return new Random().nextBoolean();\n }", "public int performDuel(){\n Random rand = new Random();\n int intRand;\n intRand = rand(6);\n while(this.engine.getGameInformation().cards[intRand][intRand] == 0 ){\n intRand = rand(6);\n }\n return intRand;\n }", "private int randomNum() {\r\n\t return((int)(Math.random() * 100));\r\n\t }", "public void recover(){\n\tint hp = (int)((Math.random() * health)*.5);\n\n\thealth += hp;\n\t\t\n\tSystem.out.print(\"You catch your breath and pick yourself up. Recover : \");\n\tSystem.out.print(hp);\n\tSystem.out.println(\" health.\\n\"); \n }", "@Override\n public boolean strikeFirst(Battle b, ActivePokemon striker) {\n return RandomUtils.chanceTest(20);\n }", "Chromosome getRandom();", "public float getChance()\n {\n return 1.0f;\n }", "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "public static void randomDelay() {\n\n Random random = new Random();\n int delay = 500 + random.nextInt(2000);\n try {\n sleep(delay);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public static void playRandomDeath() {\n\t\t\n\t\tString[] deathSoundArray = {\"death1\", \"death2\", \"death3\"};\n\t\t\n\t\tint rnd = new Random().nextInt(deathSoundArray.length);\n\t\tplaySound(deathSoundArray[rnd], 0.4f);\n\t}", "public void shuffle();", "public void killAndHunt() {\n\t\tRandom random = new Random();\n\t\tint currentIndex = random.nextInt(N);\t\n\t\tkill(currentIndex);\n\t}", "void shuffle();", "void shuffle();", "private MoveAction wanderRandomly() {\n\t\tint intDir = rand.nextInt(8) + 1;\n\t\tDirection direction = Direction.fromInt(intDir);\n\t\treturn moveInDirection(direction);\n\t}", "int accidentVelo()\r\n\t{\r\n\t\tdouble rand = Math.random()*100;\r\n\t\tSystem.out.println(rand);\r\n\t\tif ((double)rand <= 0.5) {\r\n\t\t\tSystem.out.println(\"Finalement vous auriez du y aller à pied. Vous vous vider de votre sang sur le bord du trottoir.\");\r\n\t\t\treturn 0.5;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "private double getRandomNumber(){\n double rand = Math.random();//produce a number between 0 and 1\n rand = rand - 0.5;\n return rand;\n }", "public void setDamage() {\n\t\tRandom rand = new Random();\n\t\tint damage = rand.nextInt(getMaxDamage()) + 1;\n\t\tthis.damage = damage;\n\t}", "public void randomMove() {\r\n\t\tRandom rand = new Random();\r\n\t\tint moveNum = rand.nextInt(100)+100;\r\n\t\tcheck++;\r\n\t\tif(check >= moveNum) {\r\n\t\t\tspeed = speed*-1;\r\n\t\t\tcheck =0;\r\n\r\n\t\t}\r\n\r\n\t\tif(speed > 0) {\r\n\t\t\tsetIcon(rightImage);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetIcon(leftImage);\r\n\t\t}\r\n\t\tx += speed; setLocation(x,y); repaint();\r\n\t}", "private String RandomGoal() {\n\t\tList<String> list = Arrays.asList(\"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"t\", \"t\");\n\t\tRandom rand = new Random();\n\t\tString randomgoal = list.get(rand.nextInt(list.size()));\n\n\t\treturn randomgoal;\n\t}" ]
[ "0.7557084", "0.7239624", "0.7209215", "0.71967375", "0.7130448", "0.711912", "0.7114527", "0.70092225", "0.69801486", "0.6940233", "0.69222736", "0.6913864", "0.6889405", "0.68832225", "0.68792194", "0.6862812", "0.68624026", "0.68353146", "0.6823559", "0.6817997", "0.67717564", "0.6764174", "0.6743295", "0.67315084", "0.67310214", "0.672621", "0.67136866", "0.6688015", "0.666475", "0.6657066", "0.6644087", "0.66400313", "0.663917", "0.66385233", "0.6633202", "0.656771", "0.6556759", "0.6556151", "0.65258795", "0.6522532", "0.6519814", "0.651237", "0.65109086", "0.6509528", "0.65038276", "0.64940256", "0.64814913", "0.64800364", "0.64664274", "0.6450195", "0.6448416", "0.643756", "0.6420709", "0.6411654", "0.64107615", "0.6395298", "0.6391061", "0.63882154", "0.63860047", "0.6383393", "0.6376937", "0.6353188", "0.63414353", "0.63339543", "0.63325447", "0.63270324", "0.6319358", "0.6317785", "0.631112", "0.6307923", "0.6301339", "0.6301326", "0.6300362", "0.63003016", "0.62969875", "0.629396", "0.628848", "0.62851864", "0.62812257", "0.6280871", "0.6280432", "0.6262427", "0.62562597", "0.6254077", "0.6251563", "0.6251207", "0.625098", "0.6248906", "0.6247716", "0.62466264", "0.6242428", "0.6241275", "0.6238468", "0.6237572", "0.6237572", "0.62360966", "0.62351996", "0.6228778", "0.62279665", "0.6220459", "0.6219694" ]
0.0
-1
TODO code application logic here. We do not really need it for now, because we have test suite! :)
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private void test() {\n\n\t}", "@Override\n @Before\n public void setUp() throws IOException {\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "protected void setupLocal() {}", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "protected void onFirstUse() {}", "private test5() {\r\n\t\r\n\t}", "@Before\n public void setup() {\n }", "@Test\r\n\tpublic void contents() throws Exception {\n\t}", "@Override\n protected void setup() {\n }", "@Test\n public void testDAM30601001() {\n testDAM30102001();\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Before\n\t public void setUp() {\n\t }", "private JacobUtils() {}", "@Test\n public void testDAM30402001() {\n testDAM30101001();\n }", "private static void oneUserExample()\t{\n\t}", "@Before\r\n\tpublic void setup() {\r\n\t}", "@Before\n\tpublic void setUp() {\n\t}", "@Test\n public void testGetProductInfo() throws Exception {\n }", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "private Util() { }", "@Test\n\tpublic void getWorksTest() throws Exception {\n\t}", "@Test\n\tpublic void testDoGeneration() {\n\t}", "@Test\n public void testDAM30903001() {\n testDAM30802001();\n }", "public void testLoadOrder() throws Exception {\n }", "@Override\n protected void startUp() {\n }", "@Before\n public void setUp() throws Exception {\n\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Override\n\tpublic void beforeClassSetup() {\n\t\t\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Before\r\n\tpublic void setUp() {\n\t}", "private ProtomakEngineTestHelper() {\r\n\t}", "@Test\n\tpublic void testVersionCheck() throws Exception{\n\t}", "protected OpinionFinding() {/* intentionally empty block */}", "private void getStatus() {\n\t\t\n\t}", "@Before\n public void setUp () {\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Test\n public void testOncoKBInfo() {\n // TODO: test OncoKBInfo\n }", "private void testProXml(){\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Test\r\n public void testFindAll() throws Exception {\r\n }", "@Before\n public void setUp() throws Exception {\n\n }", "protected void setup() {\r\n }", "@Test\n\tpublic void testQueryPage() {\n\n\t}", "@Test\n public void request() throws Exception {\n\n\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Test\n public void refresh() throws Exception {\n }", "@Test\r\n\tpublic void client() {\n\t}", "public void testWriteOrders() throws Exception {\n }", "@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }", "private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "@Before\r\n\tpublic void before() {\r\n\t}", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "public void testGetBasedata() {\n }", "@Test\n public void testDAM30103001() {\n // settings as done for testDAM30102001 are identical\n testDAM30102001();\n }", "@Test\n\tpublic void testMain() {\n\t}", "private void init() {\n\n\t}", "@Test\n public void atSchemaLocationTest() {\n // TODO: test atSchemaLocation\n }", "@Test\n\tvoid searchTest() {\n\t}", "@Test\n public void getLocationById() throws Exception {\n }", "@Test\r\n\tpublic void test() {\r\n\t}", "@Test\n public void testGetTemporaryModelURI() throws Exception {\n System.out.println(\"getTemporaryModelURI\");\n\n }", "private BuilderUtils() {}", "public void testGetInsDyn() {\n }", "@Override\n public void setUp() throws Exception {}", "@Test\n public void testGetOwner() {\n \n }" ]
[ "0.5672712", "0.55718076", "0.5546797", "0.5451601", "0.53593194", "0.5328266", "0.5325273", "0.5321393", "0.5309007", "0.5297129", "0.5291771", "0.52720034", "0.5270278", "0.5259658", "0.5257917", "0.5244652", "0.5244652", "0.5244652", "0.5244652", "0.5244652", "0.5244652", "0.5238546", "0.52380437", "0.52311826", "0.52262884", "0.52248824", "0.5210238", "0.52070963", "0.5205726", "0.52055424", "0.5195181", "0.5195181", "0.5195181", "0.51814467", "0.5163443", "0.5161365", "0.51561266", "0.5151816", "0.5145046", "0.5133278", "0.51301885", "0.51188165", "0.511143", "0.510087", "0.5099649", "0.50984466", "0.5098219", "0.50935936", "0.50737244", "0.5070902", "0.50691384", "0.5064767", "0.5064767", "0.50637597", "0.5061992", "0.5061992", "0.50557506", "0.50554967", "0.50546086", "0.50487906", "0.50427425", "0.5041323", "0.50293624", "0.50284517", "0.50284517", "0.5027828", "0.5027828", "0.5027828", "0.5027828", "0.5027828", "0.50232995", "0.50228435", "0.5021358", "0.5019277", "0.5015666", "0.5014212", "0.50128376", "0.50128376", "0.50126916", "0.50122243", "0.5011533", "0.50092834", "0.5008729", "0.5007982", "0.5006488", "0.5006032", "0.5001416", "0.5001416", "0.49985042", "0.49969357", "0.49784073", "0.49771962", "0.49764526", "0.49722797", "0.49720776", "0.49705598", "0.49680048", "0.49673083", "0.49655315", "0.49645457", "0.4963722" ]
0.0
-1
accecss the items from you shop list here
@Override public void success(List<Book> book, Response response) { List<Book> ep = book; /*Example[] array = ep.toArray(new Example[ep.size()]); List<Example> listsample = ep.getSaleDate();*/ listView.setAdapter(new BookListAdapter(ep)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "@Override\n\tpublic void browseItems(Session session){\n\t\t//exception handling block\n\t\ttry{\n\t\t\tbrowseItem=mvc.browseItems(session);\n\t\t\t//displaying items from database\n\t\t\tSystem.out.println(\"<---+++---Your shopping items list here----+++--->\");\n\t\t\tSystem.out.println(\"ItemId\"+\" \"+\"ItemName\"+\" \"+\"ItemType\"+\" \"+\"ItemPrice\"+\" \"+\"ItemQuantity\");\n\t\t\tfor(int i = 0; i < browseItem.size(); i++) {\n\t System.out.println(browseItem.get(i)+\"\\t\"+\"\\t\");\n\t }\n\t System.out.println(\"<------------------------------------------------>\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App Exception- Browse Items: \" +e.getMessage());\n\t\t}\n\t}", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "public void goFiniteShopping(ArrayList<Item> items){\n for (Item item : items){\n purchasePersonalItem(item);\n }\n }", "public ShopList(MainForm mf) {\n super(mf);\n ItemList = recordSeeker.getShopList();\n setTable();\n }", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public static void items(){\n\t\ttry{\n\t\t\tConnection conn = DriverManager.getConnection(url,username,password);\n\t\t\tStatement query = conn.createStatement();\n\t\t\tResultSet re = query.executeQuery(\"select * from item\");\n\t\t\tString spc = \" \";\n\t\t\twhile (re.next()){\n\t\t\t\tSystem.out.println(re.getInt(\"itemid\")+spc+re.getString(\"title\")+spc+re.getDouble(\"price\"));\n\t\t\t}\n\t\t}catch(Exception ecx){\n\t\t\tecx.printStackTrace();\n\t\t}\n\t}", "private void updateItems()\n\t{\t\n\t\tupdatePizzaTypes(items);\n\t\tupdateSidesTypes(items);\n\t\tupdateDrinksTypes(items);\n\t}", "private void getItems() {\n getComputers();\n getPrinters();\n }", "private void addItem() {\n\n ItemBean bean2 = new ItemBean();\n int drawableId2 = getResources().getIdentifier(\"ic_swrl\", \"drawable\", this.getPackageName());\n bean2.setAddress(drawableId2);\n bean2.setName(getResources().getString(R.string.swrl));\n itemList.add(bean2);\n\n ItemBean bean3 = new ItemBean();\n int drawableId3 = getResources().getIdentifier(\"ic_bianmin\", \"drawable\", this.getPackageName());\n bean3.setAddress(drawableId3);\n bean3.setName(getResources().getString(R.string.bianmin));\n itemList.add(bean3);\n\n ItemBean bean4 = new ItemBean();\n int drawableId4 = getResources().getIdentifier(\"ic_shenghuo\", \"drawable\", this.getPackageName());\n bean4.setAddress(drawableId4);\n bean4.setName(getResources().getString(R.string.shenghuo));\n itemList.add(bean4);\n\n ItemBean bean5 = new ItemBean();\n int drawableId5 = getResources().getIdentifier(\"ic_nxwd\", \"drawable\", this.getPackageName());\n bean5.setAddress(drawableId5);\n bean5.setName(getResources().getString(R.string.nxwd));\n// itemList.add(bean5);\n\n }", "public ShoppingListItem() {}", "public List<CartItem> getAllcartitem();", "public static void main(String[] args) {\n Item item1=new Item(\"cucumber\",2,5);\n Item item2=new Item(\"appl\",3,6);\n Item item3=new Item(\"orange\",3,5);\n Item item4=new Item(\"bananas\",2,6);\n\n ArrayList<Item>shoppingList=new ArrayList<>();\n shoppingList.addAll(Arrays.asList(item1,item2,item3,item4));\n double totalCost=0;\n for (Item each:shoppingList){\n totalCost +=each.calCost();\n }\n for(int i=0;i<shoppingList.size();i++){\n totalCost+=shoppingList.get(i).calCost();\n }\n System.out.println(\"total:\"+totalCost);\n\n\n\n\n //System.out.println(item1.calCost());\n\n // System.out.println(item1);\n\n\n\n\n\n }", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void getItemListById() throws ClassNotFoundException, SQLException, IOException {\n itemCodeCombo.removeAllItems();\n ItemControllerByChule itemController = new ItemControllerByChule();\n ArrayList<Item> allItem = itemController.getAllItems();\n itemCodeCombo.addItem(\"\");\n for (Item item : allItem) {\n itemCodeCombo.addItem(item.getItemCode());\n }\n itemListById.setSearchableCombo(itemCodeCombo, true, null);\n }", "public void setArrayListOfItemsInShoppingCart(WebElement element) {\n UtilityHelper.moveToViewElement(element);\n String name = UtilityHelper.elementGetText(element.findElement(By.xpath(\".//*[@class='mjr-product-name']\")));\n addNameToShoppingCartPgeArrayList(name);\n }", "public AdapterShop(Activity context, List<shoppingcard> dades){\n super(context, R.layout.listitem_shop,dades);\n this.context = context;\n this.dades = dades;\n }", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "List<CatalogItem> getAllCatalogItems();", "public void showPurchase(Client c1) {\n\t\tfor(Book book: c1.getBuyBookList()) {\n\t\t\tSystem.out.println(\"Liste des livres acheté : \\nTitre : \" \n\t\t+ book.getTitle() + \"\\nAuteur : \" + book.getAuthor() + \"\\n\");\n\t\t}\n\t}", "public void displayAll() {\r\n \t Item currentItem;\r\n \t \r\n \t System.out.println(\"-----BOOKS-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a book.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.BOOK) \r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n \t \t\r\n \t System.out.println(\"-----MAGAZINES-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a magazine.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.MAGAZINE)\r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n\r\n }", "public void setSelectedItemsToValidation_MiniCart() {\n if (ListOfMiniCartItems.isEmpty()) {\n List<WebElement> inMiniCart = getDriver().findElements(By.xpath(\"//*[@class='productNameInner']\"));\n for (WebElement lineItem : inMiniCart) {\n ListOfMiniCartItems.add(lineItem.getText());\n }\n }\n }", "public void initShop(){\n addCountToStorage(actionProduct.findProductByName(\"Jemeson\"), 3);\n addCountToStorage(actionProduct.findProductByName(\"Red Label\"), 5);\n addCountToStorage(actionProduct.findProductByName(\"Burenka\"), 10);\n addCountToStorage(actionProduct.findProductByName(\"Kupyanskoe\"), 21);\n\n //add transaction\n int idxCustomer = actionCustomer.findCustomerByName(\"Perto\");\n int idxProduct = actionProduct.findProductByName(\"Burenka\");\n\n addTransaction(idxCustomer, idxProduct, getDate(-7), 1 , actionProduct.getPriceByIdx(idxProduct));\n\n idxProduct = actionProduct.findProductByName(\"white bread\");\n addTransaction(idxCustomer, idxProduct, getDate(-7), 1 , actionProduct.getPriceByIdx(idxProduct));\n\n idxCustomer = actionCustomer.findCustomerByName(\"Dmytro\");\n addTransaction(idxCustomer, idxProduct, getDate(-6), 2 , actionProduct.getPriceByIdx(idxProduct));\n\n idxProduct = actionProduct.findProductByName(\"burenka\");\n addTransaction(idxCustomer, idxProduct, getDate(-6), 2 , actionProduct.getPriceByIdx(idxProduct));\n\n\n }", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "private List<FreeShopProduct> getProductList() {\n\n productList = new ArrayList<>();\n productList.add(new FreeShopProduct(R.drawable.db_school_small, getResources().getString(R.string.shopItem0)));\n productList.add(new FreeShopProduct(R.drawable.db_clothes_small, getResources().getString(R.string.shopItem1)));\n productList.add(new FreeShopProduct(R.drawable.db_emotions_small, getResources().getString(R.string.shopItem2)));\n productList.add(new FreeShopProduct(R.drawable.db_etiquette_small, getResources().getString(R.string.shopItem3)));\n productList.add(new FreeShopProduct(R.drawable.db_landforms_small, getResources().getString(R.string.shopItem4)));\n productList.add(new FreeShopProduct(R.drawable.db_fruits_small, getResources().getString(R.string.shopItem5)));\n productList.add(new FreeShopProduct(R.drawable.db_kingdom_small, getResources().getString(R.string.shopItem6)));\n productList.add(new FreeShopProduct(R.drawable.db_outerspace_small, getResources().getString(R.string.shopItem7)));\n productList.add(new FreeShopProduct(R.drawable.db_festival_small, getResources().getString(R.string.shopItem8)));\n productList.add(new FreeShopProduct(R.drawable.db_music_small, getResources().getString(R.string.shopItem9)));\n\n return productList;\n }", "public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}", "public ChainShopAdapter(List<MultiItemEntity> data) {\n super(data);\n addItemType(TYPE_LEVEL_1, R.layout.item_shop_employess_list);\n addItemType(TYPE_PERSON, R.layout.item_shop_employee);\n }", "private void printToolListMenu(Shop shop) {\n System.out.println(shop.getInventory());\n }", "void selectList(ShoppingList _ShoppingList);", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "private void setUpList() {\n\n\n Contents s1 = new Contents(R.drawable.bishist,\"Bishisht Bhatta\",\"+977-9849849525\", Color.parseColor(\"#074e87\"));\n list.add(s1);\n Contents s2 = new Contents(R.drawable.sagar,\"Sagar Pant\",\"+977-9865616888\",Color.parseColor(\"#074e87\"));\n list.add(s2);\n Contents s3 = new Contents(R.drawable.rabins,\"Rabin Nath\",\"+977-9848781007\",Color.parseColor(\"#074e87\"));\n list.add(s3);\n\n\n }", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "private void updateShop(List<ItemType> items, int level) {\n\t\tfor (ItemType item : items) {\n\t\t\tString text = item.getTextureString();\n\t\t\ttext = item instanceof SpecialType ? text\n\t\t\t\t\t: text.substring(0, text.length() - 1)\n\t\t\t\t\t\t\t+ Integer.toString(level);\n\t\t\tTexture texture = textureManager.getTexture(text);\n\t\t\tImageButton button = generateItemButton(texture);\n\n\t\t\tbutton.addListener(new ClickListener() {\n\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\tstatus.setText(item.getName());\n\t\t\t\t\tif (selectedHero == null) {\n\t\t\t\t\t\tstatus.setText(\"Unsuccessful shopping, No hero exist.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (selectedHero.getHealth() <= 0) {\n\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\"Your Commander is dead. Can't buy anything.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tboolean enoughResources = checkCost(selectedHero.getOwner(),\n\t\t\t\t\t\t\titem);\n\t\t\t\t\tif (enoughResources) {\n\t\t\t\t\t\tif (item instanceof WeaponType) {\n\t\t\t\t\t\t\tWeapon weapon = new Weapon((WeaponType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(weapon);\n\t\t\t\t\t\t\tstatus.setText(boughtString + weapon.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Weapon) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else if (item instanceof ArmourType) {\n\t\t\t\t\t\t\tArmour armour = new Armour((ArmourType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(armour);\n\t\t\t\t\t\t\tstatus.setText(boughtString + armour.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Armour) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tboolean transactSuccess;\n\t\t\t\t\t\t\tSpecial special = new Special((SpecialType) item);\n\t\t\t\t\t\t\ttransactSuccess = selectedHero\n\t\t\t\t\t\t\t\t\t.addItemToInventory(special);\n\t\t\t\t\t\t\tif (transactSuccess) {\n\t\t\t\t\t\t\t\tstatus.setText(boughtString + special.getName()\n\t\t\t\t\t\t\t\t\t\t+ \"(Special) for \"\n\t\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\t\t\"Unsuccessful Shopping, can only hold 4 specials\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselectedHero.setStatsChange(true);\n\t\t\t\t\t\ttransact(selectedHero.getOwner(), item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString mes = \"Not enough resources.\";\n\t\t\t\t\t\tstatus.setText(mes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tprivate boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tscrollTable.add(button).width(iconSize).height(iconSize).top();\n\t\t\tString stats = getItemStats(item, level);\n\t\t\tString cost = getItemCost(item, level);\n\t\t\tscrollTable.add(new Label(stats, skin)).width(iconSize).top()\n\t\t\t\t\t.left();\n\t\t\tscrollTable.add(new Label(cost, skin)).width(iconSize).top().left();\n\t\t\tscrollTable.row();\n\t\t}\n\t}", "private void initList(CartInfo ci) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "void updateList(ShoppingList _ShoppingList);", "private void getAllProducts() {\n }", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "@Override\r\n\tpublic void init() {\n\t\tint numOfItems = loader.getNumOfItems();\r\n\t\tsetStoreSize(numOfItems);\r\n\r\n\t\tfor (int i = 0; i < numOfItems; i++) {\r\n DrinksStoreItem item = (DrinksStoreItem) loader.getItem(i);\r\n\t\t\tStoreObject brand = item.getContent();\r\n\t\t\tStoreObject existingBrand = findObject(brand.getName());\r\n\t\t\tif (existingBrand != null) {\r\n\t\t\t item.setContent(existingBrand);\r\n\t\t\t}\r\n\t\t\taddItem(i, item);\t\r\n\t\t}\r\n\t}", "public ArrayList<CoffeeShop> returnShops(){\r\n return allShops;\r\n }", "public List<ShopItem> getShopItems() {\n\t\treturn myItems;\n\t}", "public void setItems(String items)\n {\n _items = items;\n }", "public ArrayList getCartas();", "private void buildShipsList() {\r\n ObservableList<ShipBar> lstShips = FXCollections.observableArrayList();\r\n Map<String, ShipType> ships = Data.SHIPS.get();\r\n for (String s : planet.getShips()) {\r\n ShipType ship = ships.get(s);\r\n ShipBar u = new ShipBar();\r\n u.setKey(s);\r\n u.setText(ship.getName());\r\n u.setPrice(ship.getPrice() - currentShip.getNetWorth());\r\n u.setToggleGroup(shipGroup);\r\n lstShips.add(u);\r\n }\r\n buyShips.setItems(lstShips);\r\n }", "@GetMapping(\"/\")\n public String index(Model model, HttpServletRequest request) {\n\n List<Product> listtop = productService.getTopProducts();\n List<Product> productListFollow = listtop;//new ArrayList<>();\n if (listtop.size() >= 4)\n productListFollow = listtop.subList(0, 4);\n if (listtop.size() > 7)\n listtop = listtop.subList(1, 9);\n\n model.addAttribute(\"productlistFlow\", productListFollow);\n model.addAttribute(\"productlistTop\", listtop);\n model.addAttribute(\"cats\", categoryService.getAll());\n\n return \"buyer/home\";\n }", "@Override\r\n\tpublic void getGroup(ShoppingList sl) {\r\n\r\n\t}", "public OrganizeItemsPanel() {\n initComponents();\n// lastIndeks = catalogProducts.size();\n }", "public void addGroceryItem(String item){\n groceryList.add(item);\n }", "public Shop(String uname, String pass)\n {\n super(uname, pass);\n stock = new AllItems();\n bills = new ArrayList<>();\n id = Utilities.SHOP_CTR;\n Utilities.SHOP_CTR++;\n }", "Items(){\n}", "void addGroceryItem(String item) {\n\n\t}", "public void LlenarC(){\n for(int i=0;i< new GestionCategorias().getListCategoria().size();i++){\n catBox.addItem(new GestionCategorias().getListCategoria().get(i).getCat_nombre());\n \n }\n }", "public static void main(String[] args) {\n List<ProductCatalog> productCatalog = new ArrayList<>();\n var apple = new Product(new FruitProduct(\"apple\"));\n var grapes = new Product(new FruitProduct(\"grapes\"));\n var peaches = new Product(new FruitProduct(\"peaches\"));\n productCatalog.add(new ProductCatalog(apple,3, 2,0.2));\n productCatalog.add(new ProductCatalog(grapes,5,2,0.5));\n productCatalog.add(new ProductCatalog(peaches,7,0,0));\n var cart = new ShoppingCart();\n cart.setProductCatalogueList(productCatalog);\n cart.addItem(\"apple\",3);\n /*\n cart.setProductCatalogue(\"apple\",3);\n cart.setProductCatalogue(\"grapes\",5);\n cart.setProductCatalogue(\"peaches\",7);\n */\n //cart1.forEach((cart) -> invoice(cart));\n }", "private void bindTitleForProductItems(List<OrderItem> orderItems) {\n for (OrderItem orderItem : orderItems) {\n if (orderItem.getProductOption() != null) {\n ExtensionAttribute extensionAttribute = orderItem.getProductOption().getExtensionAttribute();\n if (extensionAttribute != null) {\n for (ItemOption itemOption : extensionAttribute.getItemOptions()) {\n String productName = orderItem.getName();\n productName += \"\\n- \" + itemOption.getLabel() + \": \" + itemOption.getValue();\n orderItem.setName(productName);\n orderItem.setSku(productName);\n }\n StringBuilder productName = new StringBuilder(orderItem.getSku());\n for (int index = 0; index < extensionAttribute.getCustomOptions().size(); index++) {\n CustomOption customOption = extensionAttribute.getCustomOptions().get(index);\n if (customOption.getOptionDetails() != null) {\n if (customOption.getLabel() != null && customOption.getLabel().contains(\"[N]\")) {\n customOption.setLabel(customOption.getLabel().replace(\"[N]\", \"\"));\n }\n productName.append(\"\\n- \").append(customOption.getLabel());\n for (OptionDetail optionDetail : customOption.getOptionDetails()) {\n// productName.append(\"\\n\\t- \").append(optionDetail.getTitle()).append(\": \").append(\"$\").append(optionDetail.getPrice());\n productName.append(\"\\n\\t- \").append(optionDetail.getTitle());\n }\n orderItem.setSku(productName.toString());\n }\n }\n }\n }\n }\n }", "public synchronized List<ShoppingCartItem> getItems(){\n List<ShoppingCartItem> cart = new ArrayList<ShoppingCartItem>();\n \n for(ShoppingCartItem cartItem : carrito){\n if(cartItem!=null)\n cart.add(cartItem);\n }\n \n return cart;\n }", "private void printSupplierList(Shop shop) {\n System.out.println(shop.supplierListToString());\n }", "public interface ShopItem\n{\n\tDrawable getIcon();\n\n\tString getDisplayName();\n\n\tString getDescription();\n\n\tString getDataName();\n\n\tBigDecimal getCost(int count);\n\n\tvoid init(GameResources resources, AtomicInteger progress);\n\n\tint getProgressCount();\n}", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "public Collection<Item> shopItems() {\n\t\treturn this.itemRepository.shopItems();\n\t}", "private static void customItems(ItemDefinition itemDef) {\n\n\t\tswitch (itemDef.id) {\n\n\t\tcase 11864:\n\t\tcase 11865:\n\t\tcase 19639:\n\t\tcase 19641:\n\t\tcase 19643:\n\t\tcase 19645:\n\t\tcase 19647:\n\t\tcase 19649:\n\t\tcase 23073:\n\t\tcase 23075:\n\t\t\titemDef.equipActions[2] = \"Log\";\n\t\t\titemDef.equipActions[1] = \"Check\";\n\t\t\tbreak;\n\n\t\tcase 13136:\n\t\t\titemDef.equipActions[2] = \"Elidinis\";\n\t\t\titemDef.equipActions[1] = \"Kalphite Hive\";\n\t\t\tbreak;\n\t\tcase 2550:\n\t\t\titemDef.equipActions[2] = \"Check\";\n\t\t\tbreak;\n\n\t\tcase 1712:\n\t\tcase 1710:\n\t\tcase 1708:\n\t\tcase 1706:\n\t\t\titemDef.equipActions[1] = \"Edgeville\";\n\t\t\titemDef.equipActions[2] = \"Karamja\";\n\t\t\titemDef.equipActions[3] = \"Draynor\";\n\t\t\titemDef.equipActions[4] = \"Al-Kharid\";\n\t\t\tbreak;\n\n\t\tcase 22000:\n\t\t\titemDef.name = \"Lava partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 22001:\n\t\t\titemDef.name = \"Infernal partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 2552:\n\t\tcase 2554:\n\t\tcase 2556:\n\t\tcase 2558:\n\t\tcase 2560:\n\t\tcase 2562:\n\t\tcase 2564:\n\t\tcase 2566: // Ring of duelling\n\t\t\titemDef.equipActions[2] = \"Shantay Pass\";\n\t\t\titemDef.equipActions[1] = \"Clan wars\";\n\t\t\tbreak;\n\n\t\tcase 21307:\n\t\t\titemDef.name = \"Pursuit crate\";\n\t\t\tbreak;\n\n\t\tcase 12792:\n\t\t\titemDef.name = \"Graceful recolor kit\";\n\t\t\tbreak;\n\n\t\tcase 12022:\n\t\t\titemDef.name = \"Bandos Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Bandos gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 12024:\n\t\t\titemDef.name = \"Armadyl Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Armadyl gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 12026:\n\t\t\titemDef.name = \"Saradomin Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Saradomin gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 12028:\n\t\t\titemDef.name = \"Zamorak Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Zamorak gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 964:\n\t\t\titemDef.name = \"Pet Petie\";\n\t\t\tbreak;\n\n\t\tcase 20853:\n\t\t\titemDef.name = \"Deep Sea Bait\";\n\t\t\titemDef.stackable = true;\n\t\t\tbreak;\n\n\t\t/*\n\t\t * case 17014: itemDef.name = \"Dragon flail\"; itemDef.modelId = 50083;\n\t\t * itemDef.modelZoom = 1440; itemDef.modelRotation2 = 272;\n\t\t * itemDef.modelRotation1 = 352; itemDef.modelOffset1 = 32;\n\t\t * //itemDef.modelOffset2 = 0; itemDef.maleModel = 50083; itemDef.femaleModel =\n\t\t * 50083; itemDef.anInt164 = -1; itemDef.anInt188 = -1; itemDef.aByte205 = -8;\n\t\t * itemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t * itemDef.inventoryOptions = new String[] { \"Wear\", null, null, null, \"Drop\" };\n\t\t * itemDef.description = \"An Ancient Dragon Flail.\"; break;\n\t\t */\n\n\t\tcase 33272:\n\t\t\titemDef.name = \"Justiciar's Longsword\";\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modelId = 65472;\n\t\t\titemDef.modelZoom = 1726;\n\t\t\titemDef.modelRotation1 = 1576;\n\t\t\titemDef.modelRotation2 = 242;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\t// itemDef.anInt204 = 0;\n\t\t\t// itemDef.aByte205 = -12;\n\t\t\t// itemDef.aByte154 = 0;\n\t\t\titemDef.maleModel = 65465;\n\t\t\titemDef.femaleModel = 65465;\n\t\t\titemDef.description = \"An ancient longsword received from the Trial of Flames.\";\n\t\t\tbreak;\n\n\t\tcase 33168:\n\t\t\titemDef.name = \"Justiciar kiteshield\";\n\t\t\titemDef.modelId = 65471;\n\t\t\titemDef.modelZoom = 1600;\n\t\t\titemDef.modelRotation2 = 250;\n\t\t\titemDef.modelRotation1 = 300;\n\t\t\titemDef.modelOffset1 = -4;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.maleModel = 65473;\n\t\t\titemDef.femaleModel = 65474;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An ancient kiteshield. Part of the Justiciar set.\";\n\t\t\tbreak;\n\n\t\tcase 2996:\n\t\t\titemDef.name = \"PKP Ticket\";\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.description = \"Exchange this for a PK Point.\";\n\t\t\tbreak;\n\t\tcase 13226:\n\t\t\titemDef.name = \"Herb Sack\";\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.description = \"A sack for storing grimy herbs.\";\n\t\t\tbreak;\n\t\tcase 13346:\n\t\t\titemDef.name = \"Raid Mystery Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Open for chances to receive Raid items & other awesome rewards.\";\n\t\t\tbreak;\n\t\tcase 8800:\n\t\t\titemDef.name = \"Donator Tokens\";\n\t\t\titemDef.modelId = 31624;\n\t\t\t// itemDef.stackAmounts = new int[] { 2, 3, 50, 100, 500000, 1000000, 2500000,\n\t\t\t// 10000000, 100000000, 0 };//amount the model will change at\n\t\t\t// itemDef.stackIDs = new int[] { 8801, 8802, 8803, 8804, 8805, 8806, 8807,\n\t\t\t// 8808, 8809, 0 };//new item id to grab the model from\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 853;\n\t\t\titemDef.modelRotation2 = 1885;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8801:\n\t\t\titemDef.name = \"Donator Tokens\";\n\t\t\titemDef.modelId = 15344;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8802:\n\t\t\titemDef.name = \"Donator Tokens\";\n\t\t\titemDef.modelId = 15345;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8803:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15346;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8804:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15347;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8805:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15348;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8806:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15349;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8807:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15350;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8808:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15351;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8809:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15352;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 15098:\n\t\t\titemDef.name = \"Dice (up to 100)\";\n\t\t\titemDef.description = \"A 100-sided dice.\";\n\t\t\titemDef.modelId = 31223;\n\t\t\titemDef.modelZoom = 1104;\n\t\t\titemDef.modelRotation2 = 215;\n\t\t\titemDef.modelRotation1 = 94;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.modelOffset1 = -18;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Public-roll\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.name = \"Dice (up to 100)\";\n\t\t\titemDef.anInt196 = 15;\n\t\t\titemDef.anInt184 = 25;\n\t\t\tbreak;\n\n\t\tcase 32991:\n\t\t\titemDef.name = \"Divine spirit shield\";\n\t\t\titemDef.description = \"An ethereal shield with an divine sigil attached to it.\";\n\t\t\titemDef.modelId = 50001;\n\t\t\titemDef.maleModel = 50002;\n\t\t\titemDef.femaleModel = 50002;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation2 = 1050;\n\t\t\titemDef.modelRotation1 = 396;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\tbreak;\n\t\tcase 32992:\n\t\t\titemDef.name = \"Rainbow spirit shield\";\n\t\t\titemDef.description = \"An ethereal shield with all 4 sigils attached to it.\";\n\t\t\titemDef.modelId = 50004;\n\t\t\titemDef.maleModel = 50005;\n\t\t\titemDef.femaleModel = 50005;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation2 = 1050;\n\t\t\titemDef.modelRotation1 = 396;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32993:\n\t\t\titemDef.name = \"Divine sigil\";\n\t\t\titemDef.description = \"A sigil in the shape of a divine symbol.\";\n\t\t\titemDef.modelId = 50003;\n\t\t\titemDef.modelZoom = 848;\n\t\t\titemDef.modelRotation1 = 267;\n\t\t\titemDef.modelRotation2 = 138;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33060:\n\t\t\titemDef.name = \"Barrows Sword\";\n\t\t\titemDef.description = \"A sword glowing with otherworldy energy.\";\n\t\t\titemDef.modelId = 22325;\n\t\t\titemDef.maleModel = 50010;\n\t\t\titemDef.femaleModel = 50010;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation2 = 1050;\n\t\t\titemDef.modelRotation1 = 396;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\tbreak;\n\t\tcase 32994:\n\t\t\titemDef.name = \"Statius's platebody\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42602;\n\t\t\titemDef.maleModel = 35951;\n\t\t\titemDef.femaleModel = 35964;\n\t\t\titemDef.modelZoom = 1312;\n\t\t\titemDef.modelRotation1 = 272;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -2;\n\t\t\titemDef.modelOffset2 = 39;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32995:\n\t\t\titemDef.name = \"Statius's platelegs\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42590;\n\t\t\titemDef.maleModel = 35947;\n\t\t\titemDef.femaleModel = 35961;\n\t\t\titemDef.modelZoom = 1625;\n\t\t\titemDef.modelRotation1 = 355;\n\t\t\titemDef.modelRotation2 = 2046;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32996:\n\t\t\titemDef.name = \"Statius's full helm\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42596;\n\t\t\titemDef.maleModel = 35943;\n\t\t\titemDef.femaleModel = 35958;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 2039;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32997:\n\t\t\titemDef.name = \"Statius's warhammer\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42577;\n\t\t\titemDef.maleModel = 35968;\n\t\t\titemDef.femaleModel = 35968;\n\t\t\titemDef.modelZoom = 1360;\n\t\t\titemDef.modelRotation1 = 507;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 7;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32998:\n\t\t\titemDef.name = \"Vesta's chainbody\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42593;\n\t\t\titemDef.maleModel = 35953;\n\t\t\titemDef.femaleModel = 35965;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 545;\n\t\t\titemDef.modelRotation2 = 2;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32999:\n\t\t\titemDef.name = \"Vesta's plateskirt\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42581;\n\t\t\titemDef.maleModel = 35950;\n\t\t\titemDef.femaleModel = 35960;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33000:\n\t\t\titemDef.name = \"Vesta's longsword\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42597;\n\t\t\titemDef.maleModel = 35969;\n\t\t\titemDef.femaleModel = 35969;\n\t\t\titemDef.modelZoom = 1744;\n\t\t\titemDef.modelRotation1 = 738;\n\t\t\titemDef.modelRotation2 = 1985;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33001:\n\t\t\titemDef.name = \"Vesta's spear\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42599;\n\t\t\titemDef.maleModel = 35973;\n\t\t\titemDef.femaleModel = 35973;\n\t\t\titemDef.modelZoom = 2022;\n\t\t\titemDef.modelRotation1 = 480;\n\t\t\titemDef.modelRotation2 = 15;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33002:\n\t\t\titemDef.name = \"Morrigan's leather body\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42578;\n\t\t\titemDef.maleModel = 35954;\n\t\t\titemDef.femaleModel = 35963;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 545;\n\t\t\titemDef.modelRotation2 = 2;\n\t\t\titemDef.modelOffset1 = -2;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33003:\n\t\t\titemDef.name = \"Morrigan's leather chaps\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42603;\n\t\t\titemDef.maleModel = 35948;\n\t\t\titemDef.femaleModel = 35959;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 482;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33004:\n\t\t\titemDef.name = \"Morrigan's coif\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42583;\n\t\t\titemDef.maleModel = 35945;\n\t\t\titemDef.femaleModel = 35956;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 537;\n\t\t\titemDef.modelRotation2 = 5;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33005:\n\t\t\titemDef.name = \"Morrigan's javelin\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42592;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.maleModel = 42613;\n\t\t\titemDef.femaleModel = 42613;\n\t\t\titemDef.modelZoom = 1872;\n\t\t\titemDef.modelRotation1 = 282;\n\t\t\titemDef.modelRotation2 = 2009;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33006:\n\t\t\titemDef.name = \"Morrigan's throwing axe\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42582;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.maleModel = 42611;\n\t\t\titemDef.femaleModel = 42611;\n\t\t\titemDef.modelZoom = 976;\n\t\t\titemDef.modelRotation1 = 672;\n\t\t\titemDef.modelRotation2 = 2024;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33007:\n\t\t\titemDef.name = \"Zuriels robe top\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42591;\n\t\t\titemDef.maleModel = 35952;\n\t\t\titemDef.femaleModel = 35966;\n\t\t\titemDef.modelZoom = 1373;\n\t\t\titemDef.modelRotation1 = 373;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33008:\n\t\t\titemDef.name = \"Zuriels robe bottom\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42588;\n\t\t\titemDef.maleModel = 35949;\n\t\t\titemDef.femaleModel = 35962;\n\t\t\titemDef.modelZoom = 1697;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33009:\n\t\t\titemDef.name = \"Zuriels hood\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42604;\n\t\t\titemDef.maleModel = 35944;\n\t\t\titemDef.femaleModel = 35957;\n\t\t\titemDef.modelZoom = 720;\n\t\t\titemDef.modelRotation1 = 28;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33010:\n\t\t\titemDef.name = \"Zuriels staff\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42595;\n\t\t\titemDef.maleModel = 35971;\n\t\t\titemDef.femaleModel = 35971;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 366;\n\t\t\titemDef.modelRotation2 = 3;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33011:\n\t\t\titemDef.name = \"Craw's bow (u)\";\n\t\t\titemDef.description = \"This bow once belonged to a formidable follower of Armadyl.\";\n\t\t\titemDef.modelId = 35777;\n\t\t\titemDef.maleModel = 35768;\n\t\t\titemDef.femaleModel = 35768;\n\t\t\titemDef.modelZoom = 1979;\n\t\t\titemDef.modelRotation1 = 1463;\n\t\t\titemDef.modelRotation2 = 510;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33012:\n\t\t\titemDef.name = \"Craw's bow\";\n\t\t\titemDef.description = \"This bow once belonged to a formidable follower of Armadyl.\";\n\t\t\titemDef.modelId = 35777;\n\t\t\titemDef.maleModel = 35769;\n\t\t\titemDef.femaleModel = 35769;\n\t\t\titemDef.modelZoom = 1979;\n\t\t\titemDef.modelRotation1 = 1463;\n\t\t\titemDef.modelRotation2 = 510;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33013:\n\t\t\titemDef.name = \"Thammaron's sceptre (u)\";\n\t\t\titemDef.description = \"A mighty sceptre used in long forgotten battles.\";\n\t\t\titemDef.modelId = 35776;\n\t\t\titemDef.maleModel = 35772;\n\t\t\titemDef.femaleModel = 35772;\n\t\t\titemDef.modelZoom = 2105;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33014:\n\t\t\titemDef.name = \"Thammaron's sceptre\";\n\t\t\titemDef.description = \"A mighty sceptre used in long forgotten battles.\";\n\t\t\titemDef.modelId = 35776;\n\t\t\titemDef.maleModel = 35773;\n\t\t\titemDef.femaleModel = 35773;\n\t\t\titemDef.modelZoom = 2105;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33015:\n\t\t\titemDef.name = \"Viggora's chainmace (u)\";\n\t\t\titemDef.description = \"An ancient chainmace with a peculiar mechanism that allows for varying attack styles.\";\n\t\t\titemDef.modelId = 35778;\n\t\t\titemDef.maleModel = 35770;\n\t\t\titemDef.femaleModel = 35770;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 944;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33016:\n\t\t\titemDef.name = \"Viggora's chainmace\";\n\t\t\titemDef.description = \"An ancient chainmace with a peculiar mechanism that allows for varying attack styles.\";\n\t\t\titemDef.modelId = 35778;\n\t\t\titemDef.maleModel = 35771;\n\t\t\titemDef.femaleModel = 35771;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 944;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33018:\n\t\t\titemDef.name = \"Amulet of avarice\";\n\t\t\titemDef.description = \"A hauntingly beautiful amulet bearing the shape of a skull.\";\n\t\t\titemDef.modelId = 35779;\n\t\t\titemDef.maleModel = 35766;\n\t\t\titemDef.femaleModel = 35766;\n\t\t\titemDef.modelZoom = 420;\n\t\t\titemDef.modelRotation1 = 191;\n\t\t\titemDef.modelRotation2 = 86;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33019:\n\t\t\titemDef.name = \"Completionist cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modelId = 65270;\n\t\t\titemDef.maleModel = 65297;\n\t\t\titemDef.femaleModel = 65316;\n\t\t\titemDef.modelZoom = 1316;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 24;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33020:\n\t\t\titemDef.name = \"Completionist cape (t)\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modelId = 65258;\n\t\t\titemDef.maleModel = 65295;\n\t\t\titemDef.femaleModel = 65328;\n\t\t\titemDef.modelZoom = 1316;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 24;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33021:\n\t\t\titemDef.name = \"Torva full helm\";\n\t\t\titemDef.description = \"An ancient warrior's full helm.\";\n\t\t\titemDef.modelId = 62714;\n\t\t\titemDef.maleModel = 62738;\n\t\t\titemDef.femaleModel = 62738;\n\t\t\titemDef.modelZoom = 672;\n\t\t\titemDef.modelRotation1 = 85;\n\t\t\titemDef.modelRotation2 = 1867;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33022:\n\t\t\titemDef.name = \"Torva platebody\";\n\t\t\titemDef.description = \"An ancient warrior's platebody.\";\n\t\t\titemDef.modelId = 62699;\n\t\t\titemDef.maleModel = 62746;\n\t\t\titemDef.femaleModel = 62746;\n\t\t\titemDef.modelZoom = 1506;\n\t\t\titemDef.modelRotation1 = 473;\n\t\t\titemDef.modelRotation2 = 2042;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33023:\n\t\t\titemDef.name = \"Torva platelegs\";\n\t\t\titemDef.description = \"An ancient warrior's platelegs.\";\n\t\t\titemDef.modelId = 62701;\n\t\t\titemDef.maleModel = 62740;\n\t\t\titemDef.femaleModel = 62740;\n\t\t\titemDef.modelZoom = 1740;\n\t\t\titemDef.modelRotation1 = 474;\n\t\t\titemDef.modelRotation2 = 2045;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33024:\n\t\t\titemDef.name = \"Pernix cowl\";\n\t\t\titemDef.description = \"An ancient warrior's cowl.\";\n\t\t\titemDef.modelId = 62693;\n\t\t\titemDef.maleModel = 62739;\n\t\t\titemDef.femaleModel = 62739;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 532;\n\t\t\titemDef.modelRotation2 = 14;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33025:\n\t\t\titemDef.name = \"Pernix body\";\n\t\t\titemDef.description = \"An ancient warrior's leather body.\";\n\t\t\titemDef.modelId = 62709;\n\t\t\titemDef.maleModel = 62744;\n\t\t\titemDef.femaleModel = 62744;\n\t\t\titemDef.modelZoom = 1378;\n\t\t\titemDef.modelRotation1 = 485;\n\t\t\titemDef.modelRotation2 = 2042;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33026:\n\t\t\titemDef.name = \"Pernix chaps\";\n\t\t\titemDef.description = \"An ancient warrior's chaps.\";\n\t\t\titemDef.modelId = 62695;\n\t\t\titemDef.maleModel = 62741;\n\t\t\titemDef.femaleModel = 62741;\n\t\t\titemDef.modelZoom = 1740;\n\t\t\titemDef.modelRotation1 = 504;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33027:\n\t\t\titemDef.name = \"Virtus mask\";\n\t\t\titemDef.description = \"An ancient warrior's mask.\";\n\t\t\titemDef.modelId = 62710;\n\t\t\titemDef.maleModel = 62736;\n\t\t\titemDef.femaleModel = 62736;\n\t\t\titemDef.modelZoom = 928;\n\t\t\titemDef.modelRotation1 = 406;\n\t\t\titemDef.modelRotation2 = 2041;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33028:\n\t\t\titemDef.name = \"Virtus robe top\";\n\t\t\titemDef.description = \"An ancient warrior's robe top.\";\n\t\t\titemDef.modelId = 62704;\n\t\t\titemDef.maleModel = 62748;\n\t\t\titemDef.femaleModel = 62748;\n\t\t\titemDef.modelZoom = 1122;\n\t\t\titemDef.modelRotation1 = 488;\n\t\t\titemDef.modelRotation2 = 3;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33029:\n\t\t\titemDef.name = \"Virtus robe legs\";\n\t\t\titemDef.description = \"An ancient warrior's robe legs.\";\n\t\t\titemDef.modelId = 62700;\n\t\t\titemDef.maleModel = 62742;\n\t\t\titemDef.femaleModel = 62742;\n\t\t\titemDef.modelZoom = 1740;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 2045;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33030:\n\t\t\titemDef.name = \"Zaryte bow\";\n\t\t\titemDef.description = \"An ancient warrior's bow.\";\n\t\t\titemDef.modelId = 62692;\n\t\t\titemDef.maleModel = 62750;\n\t\t\titemDef.femaleModel = 62750;\n\t\t\titemDef.modelZoom = 1703;\n\t\t\titemDef.modelRotation1 = 221;\n\t\t\titemDef.modelRotation2 = 404;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -13;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33083:\n\t\t\titemDef.name = \"Tokhaar-kal\";\n\t\t\titemDef.description = \"\tA cape made of ancient, enchanted obsidian.\";\n\t\t\titemDef.modelId = 52073;\n\t\t\titemDef.maleModel = 52072;\n\t\t\titemDef.femaleModel = 52071;\n\t\t\titemDef.modelZoom = 1615;\n\t\t\titemDef.modelRotation1 = 339;\n\t\t\titemDef.modelRotation2 = 192;\n\t\t\titemDef.modelOffset1 = -4;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33089:\n\t\t\titemDef.name = \"Chaotic maul\";\n\t\t\titemDef.description = \"A maul used to claim life from those who don't deserve it.\";\n\t\t\titemDef.modelId = 54286;\n\t\t\titemDef.maleModel = 56294;\n\t\t\titemDef.femaleModel = 56294;\n\t\t\titemDef.modelZoom = 1447;\n\t\t\titemDef.modelRotation1 = 525;\n\t\t\titemDef.modelRotation2 = 350;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33094:\n\t\t\titemDef.name = \"Chaotic crossbow\";\n\t\t\titemDef.description = \"A small crossbow, only effective at short distance.\";\n\t\t\titemDef.modelId = 54331;\n\t\t\titemDef.maleModel = 56307;\n\t\t\titemDef.femaleModel = 56307;\n\t\t\titemDef.modelZoom = 1028;\n\t\t\titemDef.modelRotation1 = 249;\n\t\t\titemDef.modelRotation2 = 2021;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -54;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33095:\n\t\t\titemDef.name = \"Chaotic staff\";\n\t\t\titemDef.description = \"This staff makes destructive spells more powerful.\";\n\t\t\titemDef.modelId = 54367;\n\t\t\titemDef.maleModel = 56286;\n\t\t\titemDef.femaleModel = 56286;\n\t\t\titemDef.modelZoom = 1711;\n\t\t\titemDef.modelRotation1 = 471;\n\t\t\titemDef.modelRotation2 = 391;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33096:\n\t\t\titemDef.name = \"Chaotic kiteshield\";\n\t\t\titemDef.description = \"A large metal shield.\";\n\t\t\titemDef.modelId = 54358;\n\t\t\titemDef.maleModel = 56038;\n\t\t\titemDef.femaleModel = 56038;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 276;\n\t\t\titemDef.modelRotation2 = 1101;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33031:\n\t\t\titemDef.name = \"Chaotic rapier\";\n\t\t\titemDef.description = \"A razor-sharp rapier.\";\n\t\t\titemDef.modelId = 54197;\n\t\t\titemDef.maleModel = 56252;\n\t\t\titemDef.femaleModel = 56252;\n\t\t\titemDef.modelZoom = 1425;\n\t\t\titemDef.modelRotation1 = 540;\n\t\t\titemDef.modelRotation2 = 1370;\n\t\t\titemDef.modelOffset1 = 9;\n\t\t\titemDef.modelOffset2 = 13;\n\t\t\titemDef.maleOffset = -12;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33032:\n\t\t\titemDef.name = \"Chaotic longsword\";\n\t\t\titemDef.description = \"A razor-sharp longsword.\";\n\t\t\titemDef.modelId = 54204;\n\t\t\titemDef.maleModel = 56237;\n\t\t\titemDef.femaleModel = 56237;\n\t\t\titemDef.modelZoom = 1650;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 1300;\n\t\t\t// itemDef.aByte154 = -14;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33097:\n\t\t\titemDef.name = \"Sword of Onyxia\";\n\t\t\titemDef.description = \"A razor-sharp longsword.\";\n\t\t\titemDef.modelId = 53091;\n\t\t\titemDef.maleModel = 53092;\n\t\t\titemDef.femaleModel = 53092;\n\t\t\titemDef.modelZoom = 2007;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33098:\n\t\t\titemDef.name = \"Onyxia longsword\";\n\t\t\titemDef.description = \"A razor-sharp 2h sword.\";\n\t\t\titemDef.modelId = 53093;\n\t\t\titemDef.maleModel = 53094;\n\t\t\titemDef.femaleModel = 53094;\n\t\t\titemDef.modelZoom = 4007;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33099:\n\t\t\titemDef.name = \"White scimitar\";\n\t\t\titemDef.description = \"A razor-sharp scimitar.\";\n\t\t\titemDef.modelId = 53097;\n\t\t\titemDef.maleModel = 53098;\n\t\t\titemDef.femaleModel = 53098;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 312;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\t// itemDef.aByte154 = -14;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33100:\n\t\t\titemDef.name = \"White kiteshield\";\n\t\t\titemDef.description = \"a heavy kiteshield.\";\n\t\t\titemDef.modelId = 53095;\n\t\t\titemDef.maleModel = 53096;\n\t\t\titemDef.femaleModel = 53096;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation1 = 303;\n\t\t\titemDef.modelRotation2 = 180;\n\t\t\t// itemDef.aByte154 = -14;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33033:\n\t\t\titemDef.name = \"Agility master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 677, 801, 43540, 43543, 43546, 43549, 43550, 43552, 43554, 43558,\n\t\t\t\t\t43560, 43575 };\n\t\t\titemDef.modelId = 50030;\n\t\t\titemDef.maleModel = 50031;\n\t\t\titemDef.femaleModel = 50031;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33034:\n\t\t\titemDef.name = \"Attack master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 7104, 9151, 911, 914, 917, 920, 921, 923, 925, 929, 931, 946 };\n\t\t\titemDef.modelId = 50032;\n\t\t\titemDef.maleModel = 50033;\n\t\t\titemDef.femaleModel = 50033;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33035:\n\t\t\titemDef.name = \"Construction master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 6061, 5945, 6327, 6330, 6333, 6336, 6337, 6339, 6341, 6345, 6347,\n\t\t\t\t\t6362 };\n\t\t\titemDef.modelId = 50034;\n\t\t\titemDef.maleModel = 50035;\n\t\t\titemDef.femaleModel = 50035;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33036:\n\t\t\titemDef.name = \"Cooking master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 920, 920, 51856, 51859, 51862, 51865, 51866, 51868, 51870, 51874,\n\t\t\t\t\t51876, 51891 };\n\t\t\titemDef.modelId = 50036;\n\t\t\titemDef.maleModel = 50037;\n\t\t\titemDef.femaleModel = 50037;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33037:\n\t\t\titemDef.name = \"Crafting master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9142, 9152, 4511, 4514, 4517, 4520, 4521, 4523, 4525, 4529, 4531,\n\t\t\t\t\t4546 };\n\t\t\titemDef.modelId = 50038;\n\t\t\titemDef.maleModel = 50039;\n\t\t\titemDef.femaleModel = 50039;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33038:\n\t\t\titemDef.name = \"Defence master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 10460, 10473, 41410, 41413, 41416, 41419, 41420, 41422, 41424,\n\t\t\t\t\t41428, 41430, 41445 };\n\t\t\titemDef.modelId = 50040;\n\t\t\titemDef.maleModel = 50041;\n\t\t\titemDef.femaleModel = 50041;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33039:\n\t\t\titemDef.name = \"Farming master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 14775, 14792, 22026, 22029, 22032, 22035, 22036, 22038, 22040,\n\t\t\t\t\t22044, 22046, 22061 };\n\t\t\titemDef.modelId = 50042;\n\t\t\titemDef.maleModel = 50043;\n\t\t\titemDef.femaleModel = 50043;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33040:\n\t\t\titemDef.name = \"Firemaking master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 8125, 9152, 4015, 4018, 4021, 4024, 4025, 4027, 4029, 4033, 4035,\n\t\t\t\t\t4050 };\n\t\t\titemDef.modelId = 50044;\n\t\t\titemDef.maleModel = 50045;\n\t\t\titemDef.femaleModel = 50045;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33041:\n\t\t\titemDef.name = \"Fishing master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9144, 9152, 38202, 38205, 38208, 38211, 38212, 38214, 38216,\n\t\t\t\t\t38220, 38222, 38237 };\n\t\t\titemDef.modelId = 50046;\n\t\t\titemDef.maleModel = 50047;\n\t\t\titemDef.femaleModel = 50047;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33042:\n\t\t\titemDef.name = \"Fletching master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 6067, 9152, 33670, 33673, 33676, 33679, 33680, 33682, 33684,\n\t\t\t\t\t33688, 33690, 33705 };\n\t\t\titemDef.modelId = 50048;\n\t\t\titemDef.maleModel = 50049;\n\t\t\titemDef.femaleModel = 50049;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33043:\n\t\t\titemDef.name = \"Herblore master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9145, 9156, 22414, 22417, 22420, 22423, 22424, 22426, 22428,\n\t\t\t\t\t22432, 22434, 22449 };\n\t\t\titemDef.modelId = 50050;\n\t\t\titemDef.maleModel = 50051;\n\t\t\titemDef.femaleModel = 50051;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33044:\n\t\t\titemDef.name = \"Hitpoints master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 818, 951, 8291, 8294, 8297, 8300, 8301, 8303, 8305, 8309, 8311,\n\t\t\t\t\t8319 };\n\t\t\titemDef.modelId = 50052;\n\t\t\titemDef.maleModel = 50053;\n\t\t\titemDef.femaleModel = 50053;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\titemDef.femaleOffset = 4;\n\t\t\tbreak;\n\t\tcase 33045:\n\t\t\titemDef.name = \"Hunter master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 5262, 6020, 8472, 8475, 8478, 8481, 8482, 8484, 8486, 8490, 8492,\n\t\t\t\t\t8507 };\n\t\t\titemDef.modelId = 50054;\n\t\t\titemDef.maleModel = 50055;\n\t\t\titemDef.femaleModel = 50055;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33046:\n\t\t\titemDef.name = \"Magic master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 43569, 43685, 6336, 6339, 6342, 6345, 6346, 6348, 6350, 6354,\n\t\t\t\t\t6356, 6371 };\n\t\t\titemDef.modelId = 50056;\n\t\t\titemDef.maleModel = 50057;\n\t\t\titemDef.femaleModel = 50057;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33047:\n\t\t\titemDef.name = \"Mining master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 36296, 36279, 10386, 10389, 10392, 10395, 10396, 10398, 10400,\n\t\t\t\t\t10404, 10406, 10421 };\n\t\t\titemDef.modelId = 50058;\n\t\t\titemDef.maleModel = 50059;\n\t\t\titemDef.femaleModel = 50059;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33048:\n\t\t\titemDef.name = \"Prayer master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9163, 9168, 117, 120, 123, 126, 127, 127, 127, 127, 127, 127 };\n\t\t\titemDef.modelId = 50060;\n\t\t\titemDef.maleModel = 50061;\n\t\t\titemDef.femaleModel = 50061;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33049:\n\t\t\titemDef.name = \"Range master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 3755, 3998, 15122, 15125, 15128, 15131, 15132, 15134, 15136,\n\t\t\t\t\t15140, 15142, 15157 };\n\t\t\titemDef.modelId = 50062;\n\t\t\titemDef.maleModel = 50063;\n\t\t\titemDef.femaleModel = 50063;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33050:\n\t\t\titemDef.name = \"Runecrafting master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9152, 8128, 10318, 10321, 10324, 10327, 10328, 10330, 10332,\n\t\t\t\t\t10336, 10338, 10353 };\n\t\t\titemDef.modelId = 50064;\n\t\t\titemDef.maleModel = 50065;\n\t\t\titemDef.femaleModel = 50065;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33051:\n\t\t\titemDef.name = \"Slayer master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811 };\n\t\t\titemDef.originalModelColors = new int[] { 912, 920 };\n\t\t\titemDef.modelId = 50066;\n\t\t\titemDef.maleModel = 50067;\n\t\t\titemDef.femaleModel = 50067;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33052:\n\t\t\titemDef.name = \"Smithing master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 8115, 9148, 10386, 10389, 10392, 10395, 10396, 10398, 10400,\n\t\t\t\t\t10404, 10406, 10421 };\n\t\t\titemDef.modelId = 50068;\n\t\t\titemDef.maleModel = 50069;\n\t\t\titemDef.femaleModel = 50069;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33053:\n\t\t\titemDef.name = \"Strength master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 935, 931, 27538, 27541, 27544, 27547, 27548, 27550, 27552, 27556,\n\t\t\t\t\t27558, 27573 };\n\t\t\titemDef.modelId = 50070;\n\t\t\titemDef.maleModel = 50071;\n\t\t\titemDef.femaleModel = 50071;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33054:\n\t\t\titemDef.name = \"Thieving master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 11, 0, 58779, 58782, 58785, 58788, 58789, 57891, 58793, 58797,\n\t\t\t\t\t58799, 58814 };\n\t\t\titemDef.modelId = 50072;\n\t\t\titemDef.maleModel = 50073;\n\t\t\titemDef.femaleModel = 50073;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33055:\n\t\t\titemDef.name = \"Woodcutting master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 25109, 24088, 6693, 6696, 6699, 6702, 6703, 6705, 6707, 6711,\n\t\t\t\t\t6713, 6728 };\n\t\t\titemDef.modelId = 50074;\n\t\t\titemDef.maleModel = 50075;\n\t\t\titemDef.femaleModel = 50075;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33057:\n\t\t\titemDef.name = \"Abyssal Scythe\";\n\t\t\titemDef.description = \"\tA Scythe recieved from the Trials of Xeric CUSTOM RAID.\";\n\t\t\titemDef.modelId = 50081;\n\t\t\titemDef.maleModel = 50080;\n\t\t\titemDef.femaleModel = 50080;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.maleOffset = -12;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33090:\n\t\t\titemDef.name = \"Goliath gloves (Black)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50100;\n\t\t\titemDef.femaleModel = 50101;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33091:\n\t\t\titemDef.name = \"Goliath gloves (Red)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50102;\n\t\t\titemDef.femaleModel = 50103;\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 65046, 65051, 65056 };\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33092:\n\t\t\titemDef.name = \"Goliath gloves (White)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50104;\n\t\t\titemDef.femaleModel = 50105;\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 64585, 64590, 64595 };\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33093:\n\t\t\titemDef.name = \"Goliath gloves (Yellow)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50106;\n\t\t\titemDef.femaleModel = 50107;\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 9767, 9772, 9777 };\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 12639:\n\t\tcase 12637:\n\t\tcase 12638:\n\t\t\titemDef.description = \"Provides players with infinite run energy!\";\n\t\t\tbreak;\n\t\tcase 33056:\n\t\t\titemDef.name = \"Events cape (slayer)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 933, 0, 0, 0, 0 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33081:\n\t\t\titemDef.name = \"Events cape (agility)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 669, 43430, 43430, 43430, 43430 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33080:\n\t\t\titemDef.name = \"Events cape (attack)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 9926, 1815, 1815, 1815, 1815 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33059:\n\t\t\titemDef.name = \"Events cape (construction)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 6967, 6343, 6343, 6343, 6343 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33061:\n\t\t\titemDef.name = \"Events cape (cooking)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 1819, 49685, 49685, 49685, 49685 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33062:\n\t\t\titemDef.name = \"Events cape (crafting)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 7994, 4516, 4516, 4516, 4516 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33063:\n\t\t\titemDef.name = \"Events cape (defence)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 39367, 10472, 10472, 10472, 10472 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33064:\n\t\t\titemDef.name = \"Events cape (farming)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10698, 19734, 19734, 19734, 19734 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33065:\n\t\t\titemDef.name = \"Events cape (firemaking)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10059, 4922, 4922, 4922, 4922 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33066:\n\t\t\titemDef.name = \"Events cape (fishing)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10047, 36165, 36165, 36165, 36165 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33067:\n\t\t\titemDef.name = \"Events cape (fletching)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10047, 31500, 31500, 31500, 31500 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33068:\n\t\t\titemDef.name = \"Events cape (herblore)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10051, 20889, 20889, 20889, 20889 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33069:\n\t\t\titemDef.name = \"Events cape (hitpoints)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 1836, 8296, 8296, 8296, 8296 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33070:\n\t\t\titemDef.name = \"Events cape (hunter)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 6916, 8477, 8477, 8477, 8477 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33071:\n\t\t\titemDef.name = \"Events cape (magic)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 43556, 6339, 6339, 6339, 6339 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33072:\n\t\t\titemDef.name = \"Events cape (mining)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 34111, 10391, 10391, 10391, 10391 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33073:\n\t\t\titemDef.name = \"Events cape (prayer)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 9927, 2169, 2169, 2169, 2169 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33074:\n\t\t\titemDef.name = \"Events cape (range)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 3626, 20913, 20913, 20913, 20913 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33075:\n\t\t\titemDef.name = \"Events cape (runecrafting)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10047, 10323, 10323, 10323, 10323 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33076:\n\t\t\titemDef.name = \"Events cape (smithing)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10044, 5412, 5412, 5412, 5412 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33077:\n\t\t\titemDef.name = \"Events cape (strength)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 1819, 30487, 30487, 30487, 30487 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33078:\n\t\t\titemDef.name = \"Events cape (thieveing)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 8, 57636, 57636, 57636, 57636 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33079:\n\t\t\titemDef.name = \"Events cape (woodcutting)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 26007, 6570, 6570, 6570, 6570 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33101:\n\t\t\titemDef.name = \"Vorkath platebody\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53100;\n\t\t\titemDef.maleModel = 53099;\n\t\t\titemDef.femaleModel = 53099;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33102:\n\t\t\titemDef.name = \"Vorkath platelegs\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53102;\n\t\t\titemDef.maleModel = 53101;\n\t\t\titemDef.femaleModel = 53101;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33103:\n\t\t\titemDef.name = \"Vorkath boots\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53104;\n\t\t\titemDef.maleModel = 53103;\n\t\t\titemDef.femaleModel = 53103;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33104:\n\t\t\titemDef.name = \"Vorkath gloves\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53106;\n\t\t\titemDef.maleModel = 53105;\n\t\t\titemDef.femaleModel = 53105;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33105:\n\t\t\titemDef.name = \"Vorkath helmet\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53108;\n\t\t\titemDef.maleModel = 53107;\n\t\t\titemDef.femaleModel = 53107;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33106:\n\t\t\titemDef.name = \"Tekton helmet\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53118;\n\t\t\titemDef.maleModel = 53117;\n\t\t\titemDef.femaleModel = 53117;\n\t\t\titemDef.modelZoom = 724;\n\t\t\titemDef.modelRotation1 = 81;\n\t\t\titemDef.modelRotation2 = 1670;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33107:\n\t\t\titemDef.name = \"Tekton platebody\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53110;\n\t\t\titemDef.maleModel = 53109;\n\t\t\titemDef.femaleModel = 53109;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33108:\n\t\t\titemDef.name = \"Tekton platelegs\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53112;\n\t\t\titemDef.maleModel = 53111;\n\t\t\titemDef.femaleModel = 53111;\n\t\t\titemDef.modelZoom = 1550;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 186;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33109:\n\t\t\titemDef.name = \"Tekton gloves\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53116;\n\t\t\titemDef.maleModel = 53115;\n\t\t\titemDef.femaleModel = 53115;\n\t\t\titemDef.modelZoom = 830;\n\t\t\titemDef.modelRotation1 = 536;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33110:\n\t\t\titemDef.name = \"Tekton boots\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53114;\n\t\t\titemDef.maleModel = 53113;\n\t\t\titemDef.femaleModel = 53113;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33111:\n\t\t\titemDef.name = \"Anti-santa scythe\";\n\t\t\titemDef.description = \"Legend says this is the biggest arse scratcher around.\";\n\t\t\titemDef.modelId = 57002;\n\t\t\titemDef.maleModel = 57001;\n\t\t\titemDef.femaleModel = 57001;\n\t\t\titemDef.modelZoom = 3224;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 714;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33112:\n\t\t\titemDef.name = \"Dominion staff\";\n\t\t\titemDef.description = \"Dominion staff.\";\n\t\t\titemDef.modelId = 59029;\n\t\t\titemDef.maleModel = 59305;\n\t\t\titemDef.femaleModel = 59305;\n\t\t\titemDef.modelZoom = 1872;\n\t\t\titemDef.modelRotation1 = 288;\n\t\t\titemDef.modelRotation2 = 1685;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33113:\n\t\t\titemDef.name = \"Dominion sword\";\n\t\t\titemDef.description = \"Dominion sword.\";\n\t\t\titemDef.modelId = 59832;\n\t\t\titemDef.maleModel = 59306;\n\t\t\titemDef.femaleModel = 59306;\n\t\t\titemDef.modelZoom = 1829;\n\t\t\titemDef.modelRotation1 = 513;\n\t\t\titemDef.modelRotation2 = 546;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33114:\n\t\t\titemDef.name = \"Dominion crossbow\";\n\t\t\titemDef.description = \"Dominion crossbow.\";\n\t\t\titemDef.modelId = 59839;\n\t\t\titemDef.maleModel = 59304;\n\t\t\titemDef.femaleModel = 59304;\n\t\t\titemDef.modelZoom = 1490;\n\t\t\titemDef.modelRotation1 = 362;\n\t\t\titemDef.modelRotation2 = 791;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33115:\n\t\t\titemDef.name = \"Dragonfire Shield (e)\";\n\t\t\titemDef.description = \"unamed shield.\";\n\t\t\titemDef.modelId = 53120;\n\t\t\titemDef.maleModel = 53119;\n\t\t\titemDef.femaleModel = 53119;\n\t\t\titemDef.modelZoom = 2022;\n\t\t\titemDef.modelRotation1 = 540;\n\t\t\titemDef.modelRotation2 = 123;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[] { null, \"Wear\", \"Inspect\", \"Empty\", \"Drop\" };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33116:\n\t\t\titemDef.name = \"Zilyana's longbow\";\n\t\t\titemDef.description = \"A bow belonged to Zilyana.\";\n\t\t\titemDef.modelId = 53122;\n\t\t\titemDef.maleModel = 53121;\n\t\t\titemDef.femaleModel = 53121;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 636;\n\t\t\titemDef.modelRotation2 = 1010;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33117:\n\t\t\titemDef.name = \"Black dragon hunter crossbow\";\n\t\t\titemDef.description = \"Black dragon hunter crossbow.\";\n\t\t\titemDef.modelId = 53124;\n\t\t\titemDef.maleModel = 53123;\n\t\t\titemDef.femaleModel = 53123;\n\t\t\titemDef.modelZoom = 1554;\n\t\t\titemDef.modelRotation1 = 636;\n\t\t\titemDef.modelRotation2 = 1010;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33118:\n\t\t\titemDef.name = \"Vorkath blowpipe\";\n\t\t\titemDef.description = \"Vorkath blowpipe.\";\n\t\t\titemDef.modelId = 53126;\n\t\t\titemDef.maleModel = 53125;\n\t\t\titemDef.femaleModel = 53125;\n\t\t\titemDef.modelZoom = 1158;\n\t\t\titemDef.modelRotation1 = 768;\n\t\t\titemDef.modelRotation2 = 189;\n\t\t\titemDef.modelOffset1 = -7;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33119:\n\t\t\titemDef.name = \"Superior twisted bow\";\n\t\t\titemDef.description = \"An upgraded twisted bow.\";\n\t\t\titemDef.modelId = 53128;\n\t\t\titemDef.maleModel = 53127;\n\t\t\titemDef.femaleModel = 53127;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\titemDef.maleOffset = -4;\n\t\t\titemDef.femaleOffset = -4;\n\t\t\tbreak;\n\t\tcase 33123:\n\t\t\titemDef.name = \"Staff of sliske\";\n\t\t\titemDef.description = \"Staff of sliske.\";\n\t\t\titemDef.modelId = 59234;\n\t\t\titemDef.maleModel = 59233;\n\t\t\titemDef.femaleModel = 59233;\n\t\t\titemDef.modelZoom = 1872;\n\t\t\titemDef.modelRotation1 = 288;\n\t\t\titemDef.modelRotation2 = 1685;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33124:\n\t\t\titemDef.name = \"Twisted crossbow\";\n\t\t\titemDef.description = \"Twisted crossbow.\";\n\t\t\titemDef.modelId = 62777;\n\t\t\titemDef.maleModel = 62776;\n\t\t\titemDef.femaleModel = 62776;\n\t\t\titemDef.modelZoom = 926;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 258;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33125:\n\t\t\titemDef.name = \"Present\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modelId = 2426;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.modifiedModelColors = new int[] { 22410, 2999 };\n\t\t\titemDef.originalModelColors = new int[] { 933, 24410 };\n\t\t\titemDef.description = \"Santa's stolen present\";\n\t\t\tbreak;\n\t\tcase 33126:\n\t\t\titemDef.name = \"Christmas tree branch\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modelId = 2412;\n\t\t\titemDef.modelZoom = 940;\n\t\t\titemDef.modelRotation1 = 268;\n\t\t\titemDef.modelRotation2 = 152;\n\t\t\titemDef.modelOffset1 = -8;\n\t\t\titemDef.modelOffset2 = -21;\n\t\t\titemDef.modifiedModelColors = new int[] { 11144 };\n\t\t\titemDef.originalModelColors = new int[] { 6047 };\n\t\t\titemDef.description = \"Enter examine here.\";\n\t\t\tbreak;\n\t\tcase 33127:\n\t\t\titemDef.name = \"Kbd gloves\";\n\t\t\titemDef.description = \"Kbd gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 33085 };\n\t\t\titemDef.originalModelColors = new int[] { 1060 };\n\t\t\titemDef.modelId = 53106;\n\t\t\titemDef.maleModel = 53105;\n\t\t\titemDef.femaleModel = 53105;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33128:\n\t\t\titemDef.name = \"Kbd boots\";\n\t\t\titemDef.description = \"Kbd boots.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 33198, 33202, 33206, 33215, 33210 };\n\t\t\titemDef.originalModelColors = new int[] { 1060, 1061, 1063, 1064, 1065 };\n\t\t\titemDef.modelId = 53104;\n\t\t\titemDef.maleModel = 53103;\n\t\t\titemDef.femaleModel = 53103;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33129:\n\t\t\titemDef.name = \"Kbd platelegs\";\n\t\t\titemDef.description = \"Kbd platelegs.\";\n\t\t\titemDef.modelId = 59994;\n\t\t\titemDef.maleModel = 59995;\n\t\t\titemDef.femaleModel = 59995;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33130:\n\t\t\titemDef.name = \"Kbd platebody\";\n\t\t\titemDef.description = \"Kbd platebody.\";\n\t\t\titemDef.modelId = 59998;\n\t\t\titemDef.maleModel = 59999;\n\t\t\titemDef.femaleModel = 59999;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33131:\n\t\t\titemDef.name = \"Kbd helmet\";\n\t\t\titemDef.description = \"Kbd helmet.\";\n\t\t\titemDef.modelId = 59996;\n\t\t\titemDef.maleModel = 59997;\n\t\t\titemDef.femaleModel = 59997;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33132:\n\t\t\titemDef.name = \"Kbd cape\";\n\t\t\titemDef.description = \"Kbd cape.\";\n\t\t\titemDef.modelId = 59992;\n\t\t\titemDef.maleModel = 59993;\n\t\t\titemDef.femaleModel = 59993;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33133:\n\t\t\titemDef.name = \"Anti-imp pet\";\n\t\t\titemDef.description = \"Anti-imp pet.\";\n\t\t\titemDef.modelId = 45294;\n\t\t\titemDef.modelZoom = 1500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33134:\n\t\t\titemDef.name = \"Anti-santa pet\";\n\t\t\titemDef.description = \"Anti-santa pet.\";\n\t\t\titemDef.modelId = 29030;\n\t\t\titemDef.modelZoom = 653;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 1966;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33135:\n\t\t\titemDef.name = \"Bandos mask\";\n\t\t\titemDef.description = \"Bandos helmet.\";\n\t\t\titemDef.modelId = 59987;\n\t\t\titemDef.maleModel = 59991;\n\t\t\titemDef.femaleModel = 59991;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33136:\n\t\t\titemDef.name = \"Armadyl mask\";\n\t\t\titemDef.description = \"Armadyl mask.\";\n\t\t\titemDef.modelId = 59986;\n\t\t\titemDef.maleModel = 59990;\n\t\t\titemDef.femaleModel = 59990;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33137:\n\t\t\titemDef.name = \"Zamorak mask\";\n\t\t\titemDef.description = \"Zamorak mask.\";\n\t\t\titemDef.modelId = 59985;\n\t\t\titemDef.maleModel = 59989;\n\t\t\titemDef.femaleModel = 59989;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33138:\n\t\t\titemDef.name = \"Saradomin mask\";\n\t\t\titemDef.description = \"Saradomin mask.\";\n\t\t\titemDef.modelId = 59984;\n\t\t\titemDef.maleModel = 59988;\n\t\t\titemDef.femaleModel = 59988;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33139:\n\t\t\titemDef.name = \"Zamarok godbow\";\n\t\t\titemDef.description = \"Zamarok godbow.\";\n\t\t\titemDef.modelId = 60560;//60553\n\t\t\titemDef.maleModel = 60560;\n\t\t\titemDef.femaleModel = 60560;\n\t\t\titemDef.modelZoom = 2100;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33140:\n\t\t\titemDef.name = \"Saradomin godbow\";\n\t\t\titemDef.description = \"Saradomin godbow.\";\n\t\t\titemDef.modelId = 60555;\n\t\t\titemDef.maleModel = 60554;\n\t\t\titemDef.femaleModel = 60554;\n\t\t\titemDef.modelZoom = 2100;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33141:\n\t\t\titemDef.name = \"Bandos godbow\";\n\t\t\titemDef.description = \"Bandos godbow.\";\n\t\t\titemDef.modelId = 60559;\n\t\t\titemDef.maleModel = 60558;\n\t\t\titemDef.femaleModel = 60558;\n\t\t\titemDef.modelZoom = 2100;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33142:\n\t\t\titemDef.name = \"Fire cape (purple)\";\n\t\t\titemDef.description = \"Fire cape (purple).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33148:\n\t\t\titemDef.name = \"Fire cape (cyan)\";\n\t\t\titemDef.description = \"Fire cape (cyan).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33144:\n\t\t\titemDef.name = \"Fire cape (green)\";\n\t\t\titemDef.description = \"Fire cape (green).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33145:\n\t\t\titemDef.name = \"Fire cape (red)\";\n\t\t\titemDef.description = \"Fire cape (red).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33143:\n\t\t\titemDef.name = \"Infernal cape (blue)\";\n\t\t\titemDef.description = \"Infernal cape (blue).\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5056, 5066, 924, 3005 };\n\t\t\titemDef.originalModelColors = new int[] { 39851, 39851, 39851, 39851 };\n\t\t\titemDef.modelId = 33144;\n\t\t\titemDef.maleModel = 33103;\n\t\t\titemDef.femaleModel = 33111;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33146:\n\t\t\titemDef.name = \"Infernal cape (green)\";\n\t\t\titemDef.description = \"Infernal cape (green).\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5056, 5066, 924, 3005 };\n\t\t\titemDef.originalModelColors = new int[] { 21167, 21167, 21167, 21167 };\n\t\t\titemDef.modelId = 33144;\n\t\t\titemDef.maleModel = 33103;\n\t\t\titemDef.femaleModel = 33111;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33147:\n\t\t\titemDef.name = \"Infernal cape (purple)\";\n\t\t\titemDef.description = \"Infernal cape (purple).\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5056, 5066, 924, 3005 };\n\t\t\titemDef.originalModelColors = new int[] { 53160, 53160, 53160, 53160 };\n\t\t\titemDef.modelId = 33144;\n\t\t\titemDef.maleModel = 33103;\n\t\t\titemDef.femaleModel = 33111;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33150:\n\t\t\titemDef.name = \"Infernal key piece 1\";\n\t\t\titemDef.description = \"Infernal key piece 1.\";\n\t\t\titemDef.modelId = 61001;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Combine\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33151:\n\t\t\titemDef.name = \"Infernal key piece 2\";\n\t\t\titemDef.description = \"Infernal key piece 2.\";\n\t\t\titemDef.modelId = 61002;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Combine\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33152:\n\t\t\titemDef.name = \"Infernal key piece 3\";\n\t\t\titemDef.description = \"Infernal key piece 3.\";\n\t\t\titemDef.modelId = 61003;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Combine\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33153:\n\t\t\titemDef.name = \"Infernal key\";\n\t\t\titemDef.description = \"Infernal key.\";\n\t\t\titemDef.modelId = 61111;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\t\t//DOPES ITEMS NIGGAHAHAHAHAHAHAH\n\t\tcase 2749:\n\t\t\titemDef.name = \"Bloody Axe\";\n\t\t\titemDef.description = \"Look at all that blood!\";\n\t\t\titemDef.modelId = 65495;\n\t\t\titemDef.femaleModel = 65495;\n\t\t\titemDef.maleModel = 65495;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 2750:\n\t\t\titemDef.name = \"Bloody Axe Offhand\";\n\t\t\titemDef.description = \"Look at all that blood!\";\n\t\t\titemDef.modelId = 65496;\n\t\t\titemDef.femaleModel = 65496;\n\t\t\titemDef.maleModel = 65496;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33154:\n\t\t\titemDef.name = \"Infernal mystery box\";\n\t\t\titemDef.description = \"Infernal mystery box.\";\n\t\t\titemDef.modelId = 61110;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Open\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33155:\n\t\t\titemDef.name = \"Ethereal sword (red)\";\n\t\t\titemDef.description = \"Ethereal sword (red).\";\n\t\t\titemDef.modelId = 61005;\n\t\t\titemDef.maleModel = 61004;\n\t\t\titemDef.femaleModel = 61004;\n\t\t\titemDef.modelZoom = 1645;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33156:\n\t\t\titemDef.name = \"Ethereal sword (blue)\";\n\t\t\titemDef.description = \"Ethereal sword (blue).\";\n\t\t\titemDef.modelId = 61006;\n\t\t\titemDef.maleModel = 61007;\n\t\t\titemDef.femaleModel = 61007;\n\t\t\titemDef.modelZoom = 1645;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33157:\n\t\t\titemDef.name = \"Ethereal sword (green)\";\n\t\t\titemDef.description = \"Ethereal sword (green).\";\n\t\t\titemDef.modelId = 61008;\n\t\t\titemDef.maleModel = 61009;\n\t\t\titemDef.femaleModel = 61009;\n\t\t\titemDef.modelZoom = 1645;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33158:\n\t\t\titemDef.name = \"Dagon' hai top\";\n\t\t\titemDef.description = \"An elite dark mages robes.\";\n\t\t\titemDef.modelId = 60317;\n\t\t\titemDef.maleModel = 43614;\n\t\t\titemDef.femaleModel = 43689;\n\t\t\titemDef.anInt188 = 44594;\n\t\t\titemDef.anInt164 = 43681;\n\t\t\titemDef.modelZoom = 1697;\n\t\t\titemDef.modelRotation1 = 536;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33159:\n\t\t\titemDef.name = \"Dagon' hai hat\";\n\t\t\titemDef.description = \"An elite dark mages hat.\";\n\t\t\titemDef.modelId = 60319;\n\t\t\titemDef.maleModel = 60318;\n\t\t\titemDef.femaleModel = 60318;\n\t\t\titemDef.anInt188 = -1;\n\t\t\titemDef.anInt164 = -1;\n\t\t\titemDef.modelZoom = 1373;\n\t\t\titemDef.modelRotation1 = 98;\n\t\t\titemDef.modelRotation2 = 1988;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33160:\n\t\t\titemDef.name = \"Dagon' hai robe\";\n\t\t\titemDef.description = \"An elite dark mages robe.\";\n\t\t\titemDef.modelId = 60321;\n\t\t\titemDef.maleModel = 60320;\n\t\t\titemDef.femaleModel = 60320;\n\t\t\titemDef.anInt188 = -1;\n\t\t\titemDef.anInt164 = -1;\n\t\t\titemDef.modelZoom = 2216;\n\t\t\titemDef.modelRotation1 = 572;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 14;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33161:\n\t\t\titemDef.name = \"Blue infernal cape mix\";\n\t\t\titemDef.description = \"Changes the color of the Infernal Cape to Blue.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33162:\n\t\t\titemDef.name = \"Green infernal cape mix\";\n\t\t\titemDef.description = \"Changes the color of the Infernal Cape to Green.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33163:\n\t\t\titemDef.name = \"Purple infernal cape mix\";\n\t\t\titemDef.description = \"Changes the color of the Infernal Cape to Purple.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33164:\n\t\t\titemDef.name = \"Purple firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to purple.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33165:\n\t\t\titemDef.name = \"Cyan firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to cyan.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33166:\n\t\t\titemDef.name = \"Green firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to green.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33167:\n\t\t\titemDef.name = \"Red firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to red.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33169:\n\t\t\titemDef.name = \"K'ril robe top\";\n\t\t\titemDef.description = \"A top worn by magic-using followers of Zamorak.\";\n\t\t\titemDef.modelId = 62558;\n\t\t\titemDef.maleModel = 62559;\n\t\t\titemDef.femaleModel = 62559;\n\t\t\titemDef.modelZoom = 1358;\n\t\t\titemDef.modelRotation1 = 514;\n\t\t\titemDef.modelRotation2 = 2041;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33170:\n\t\t\titemDef.name = \"K'ril robe bottom\";\n\t\t\titemDef.description = \"A robe worn by magic-using followers of Zamorak.\";\n\t\t\titemDef.modelId = 62553;\n\t\t\titemDef.maleModel = 62554;\n\t\t\titemDef.femaleModel = 62554;\n\t\t\titemDef.modelZoom = 1690;\n\t\t\titemDef.modelRotation1 = 435;\n\t\t\titemDef.modelRotation2 = 9;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33171:\n\t\t\titemDef.name = \"K'ril hat\";\n\t\t\titemDef.description = \"A hat worn by magic-using followers of Zamorak.\";\n\t\t\titemDef.modelId = 62551;\n\t\t\titemDef.maleModel = 62552;\n\t\t\titemDef.femaleModel = 62552;\n\t\t\titemDef.modelZoom = 1236;\n\t\t\titemDef.modelRotation1 = 118;\n\t\t\titemDef.modelRotation2 = 10;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -12;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33172:\n\t\t\titemDef.name = \"K'ril swords\";\n\t\t\titemDef.description = \"Sheath & Unsheath this sword in the Equipment tab. Hits an enemy twice.\";\n\t\t\titemDef.equipActions[2] = \"Sheath\";\n\t\t\titemDef.modelId = 62556;\n\t\t\titemDef.maleModel = 62557;\n\t\t\titemDef.femaleModel = 62557;\n\t\t\titemDef.modelZoom = 1650;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 1300;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33173:\n\t\t\titemDef.name = \"K'ril swords (sheathed)\";\n\t\t\titemDef.description = \"Sheath & Unsheath this sword in the Equipment tab. Hits an enemy twice.\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 62556;\n\t\t\titemDef.maleModel = 62556;\n\t\t\titemDef.femaleModel = 62556;\n\t\t\titemDef.modelZoom = 1650;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 1300;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33174:\n\t\t\titemDef.name = \"Pet demonic gorilla\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 31241;\n\t\t\titemDef.modelZoom = 16000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33175:\n\t\t\titemDef.name = \"Pet crawling hand\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5071;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33176:\n\t\t\titemDef.name = \"Pet cave bug\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 23854;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33177:\n\t\t\titemDef.name = \"Pet cave crawler\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5066;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33178:\n\t\t\titemDef.name = \"Pet banshee\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5063;\n\t\t\titemDef.modelZoom = 3200;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33179:\n\t\t\titemDef.name = \"Pet cave slime\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5786;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33180:\n\t\t\titemDef.name = \"Pet rockslug\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5084;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33181:\n\t\t\titemDef.name = \"Pet cockatrice\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5070;\n\t\t\titemDef.modelZoom = 3200;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33182:\n\t\t\titemDef.name = \"Pet pyrefiend\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5083;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33183:\n\t\t\titemDef.name = \"Pet basilisk\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5064;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33184:\n\t\t\titemDef.name = \"Pet infernal mage\";\n\t\t\titemDef.modifiedModelColors = new int[] { -26527, -24618, -25152, -25491, 119 };\n\t\t\titemDef.originalModelColors = new int[] { 924, 148, 0, 924, 924 };\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5047;\n\t\t\titemDef.modelZoom = 3940;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 84;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33185:\n\t\t\titemDef.name = \"Pet bloodveld\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5065;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33186:\n\t\t\titemDef.name = \"Pet jelly\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5081;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33187:\n\t\t\titemDef.name = \"Pet turoth\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5086;\n\t\t\titemDef.modelZoom = 2600;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33188:\n\t\t\titemDef.name = \"Pet aberrant spectre\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5085;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 450;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33189:\n\t\t\titemDef.name = \"Pet dust devil\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5076;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33190:\n\t\t\titemDef.name = \"Pet kurask\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5082;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33191:\n\t\t\titemDef.name = \"Pet skeletal wyvern\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 10350;\n\t\t\titemDef.modelZoom = 1104;\n\t\t\titemDef.modelRotation1 = 27;\n\t\t\titemDef.modelRotation2 = 1634;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33192:\n\t\t\titemDef.name = \"Pet garygoyle\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5078;\n\t\t\titemDef.modelZoom = 4000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33193:\n\t\t\titemDef.name = \"Pet nechryael\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5074;\n\t\t\titemDef.modelZoom = 4000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33194:\n\t\t\titemDef.name = \"Pet abyssal demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5062;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33195:\n\t\t\titemDef.name = \"Pet dark beast\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 26395;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33196:\n\t\t\titemDef.name = \"Pet night beast\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32933;\n\t\t\titemDef.modelZoom = 7000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33197:\n\t\t\titemDef.name = \"Pet greater abyssal demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32921;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33198:\n\t\t\titemDef.name = \"Pet crushing hand\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32922;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33199:\n\t\t\titemDef.name = \"Pet chasm crawler\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32918;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33200:\n\t\t\titemDef.name = \"Pet screaming banshee\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32823;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33201:\n\t\t\titemDef.name = \"Pet twisted banshee\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32847;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33202:\n\t\t\titemDef.name = \"Pet giant rockslug\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32919;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33203:\n\t\t\titemDef.name = \"Pet cockathrice\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32920;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33204:\n\t\t\titemDef.name = \"Pet flaming pyrelord\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32923;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33205:\n\t\t\titemDef.name = \"Pet monstrous basilisk\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32924;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33206:\n\t\t\titemDef.name = \"Pet malevolent mage\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32929;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33207:\n\t\t\titemDef.name = \"Pet insatiable bloodveld\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32926;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33208:\n\t\t\titemDef.name = \"Pet insatiable mutated bloodveld\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32925;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33209:\n\t\t\titemDef.name = \"Pet vitreous jelly\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32852;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33210:\n\t\t\titemDef.name = \"Pet vitreous warped jelly\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32917;\n\t\t\titemDef.modelZoom = 6000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33211:\n\t\t\titemDef.name = \"Pet cave abomination\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32935;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33212:\n\t\t\titemDef.name = \"Pet abhorrent spectre\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32930;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33213:\n\t\t\titemDef.name = \"pet repugnant spectre\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32926;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33214:\n\t\t\titemDef.name = \"Pet choke devil\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32927;\n\t\t\titemDef.modelZoom = 6000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33215:\n\t\t\titemDef.name = \"Pet king kurask\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32934;\n\t\t\titemDef.modelZoom = 8000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33217:\n\t\t\titemDef.name = \"Pet nuclear smoke devil\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32928;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33218:\n\t\t\titemDef.name = \"Pet marble gargoyle\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34251;\n\t\t\titemDef.modelZoom = 8000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33219:\n\t\t\titemDef.name = \"Pet nechryarch\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32932;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33220:\n\t\t\titemDef.name = \"Pet Patrity\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32035;\n\t\t\titemDef.modelZoom = 653;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1535;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33221:\n\t\t\titemDef.name = \"Pet xarpus\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35383;\n\t\t\titemDef.modelZoom = 14000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33222:\n\t\t\titemDef.name = \"Pet nyclocas vasilias\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35182;\n\t\t\titemDef.modelZoom = 12000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33223:\n\t\t\titemDef.name = \"Pet pestilent bloat\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35404;\n\t\t\titemDef.modelZoom = 8500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33224:\n\t\t\titemDef.name = \"Pet maiden of sugadinti\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35385;\n\t\t\titemDef.modelZoom = 8500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33225:\n\t\t\titemDef.name = \"Pet lizardman shaman\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 4039;\n\t\t\titemDef.modelZoom = 8500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33226:\n\t\t\titemDef.name = \"Pet abyssal sire\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 29477;\n\t\t\titemDef.modelZoom = 9000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33227:\n\t\t\titemDef.name = \"Pet black demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 31984;\n\t\t\titemDef.modelZoom = 1104;\n\t\t\titemDef.modelRotation1 = 144;\n\t\t\titemDef.modelRotation2 = 1826;\n\t\t\titemDef.modelOffset1 = 7;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 11802:\n\t\tcase 11804:\n\t\tcase 11806:\n\t\tcase 11808:\n\t\t\titemDef.equipActions[2] = \"Sheath\";\n\t\t\tbreak;// godsword sheathing operating\n\n\t\tcase 33228:\n\t\t\titemDef.name = \"Pet greater demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32015;\n\t\t\titemDef.modelZoom = 902;\n\t\t\titemDef.modelRotation1 = 216;\n\t\t\titemDef.modelRotation2 = 138;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = -16;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33229:\n\t\t\titemDef.name = \"Armadyl godsword (sheathed)\";\n\t\t\titemDef.description = \"Armadyl godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28075;\n\t\t\titemDef.maleModel = 62683;\n\t\t\titemDef.femaleModel = 62683;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33230:\n\t\t\titemDef.name = \"Bandos godsword (sheathed)\";\n\t\t\titemDef.description = \"Bandos godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28059;\n\t\t\titemDef.maleModel = 62684;\n\t\t\titemDef.femaleModel = 62684;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33231:\n\t\t\titemDef.name = \"Saradomin godsword (sheathed)\";\n\t\t\titemDef.description = \"Saradomin godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28070;\n\t\t\titemDef.maleModel = 62685;\n\t\t\titemDef.femaleModel = 62685;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33232:\n\t\t\titemDef.name = \"Zamorak godsword (sheathed)\";\n\t\t\titemDef.description = \"Zamorak godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28060;\n\t\t\titemDef.maleModel = 62686;\n\t\t\titemDef.femaleModel = 62686;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33233:\n\t\t\titemDef.name = \"Pet revenant imp\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34156;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33234:\n\t\t\titemDef.name = \"Pet revenant goblin\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34262;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33235:\n\t\t\titemDef.name = \"Pet revenant pyrefiend\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34142;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33236:\n\t\t\titemDef.name = \"Pet revenant hobgoblin\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34157;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33237:\n\t\t\titemDef.name = \"Pet revenant cyclops\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34155;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33238:\n\t\t\titemDef.name = \"Pet revenant hellhound\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34143;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33239:\n\t\t\titemDef.name = \"Pet revenant demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32015;\n\t\t\titemDef.modifiedModelColors = new int[] { 1690, 910, 912, 1814, 1938 };\n\t\t\titemDef.originalModelColors = new int[] { 43078, 43078, 43078, 43078, 43078, 43078 };\n\t\t\titemDef.modelZoom = 902;\n\t\t\titemDef.modelRotation1 = 216;\n\t\t\titemDef.modelRotation2 = 138;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = -16;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33240:\n\t\t\titemDef.name = \"Pet revenant ork\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34154;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33242:\n\t\t\titemDef.name = \"Pet revenant dark beast\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34158;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33243:\n\t\t\titemDef.name = \"Pet revenant knight\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34145;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33244:\n\t\t\titemDef.name = \"Pet revenant dragon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34163;\n\t\t\titemDef.modelZoom = 7500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33245:\n\t\t\titemDef.name = \"Pet glob\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 26074;\n\t\t\titemDef.modelZoom = 10000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33246:\n\t\t\titemDef.name = \"Pet ice queen\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 104;\n\t\t\titemDef.modifiedModelColors = new int[] { 41, 61, 4550, 12224, 25238, 6798 };\n\t\t\titemDef.originalModelColors = new int[] { -22052, -26150, -24343, -22052, -22052, -23327 };\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33247:\n\t\t\titemDef.name = \"Pet enraged tarn\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60322;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33248:\n\t\t\titemDef.name = \"Pet jaltok-jad\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 33012;\n\t\t\titemDef.modelZoom = 12000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33249:\n\t\t\titemDef.name = \"Pet rune dragon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34668;\n\t\t\titemDef.modelZoom = 2541;\n\t\t\titemDef.modelRotation1 = 83;\n\t\t\titemDef.modelRotation2 = 1826;\n\t\t\titemDef.modelOffset1 = -97;\n\t\t\titemDef.modelOffset2 = 9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33271:\n\t\t\titemDef.name = \"Moo\";\n\t\t\titemDef.description = \"cow goes moo.\";\n\t\t\titemDef.modelId = 23889;\n\t\t\titemDef.modelZoom = 2541;\n\t\t\titemDef.modelRotation1 = 83;\n\t\t\titemDef.modelRotation2 = 1826;\n\t\t\titemDef.modelOffset1 = -97;\n\t\t\titemDef.modelOffset2 = 9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33250:\n\t\t\titemDef.name = \"Swift gloves (Black)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62657;\n\t\t\titemDef.femaleModel = 62658;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33251:\n\t\t\titemDef.name = \"Swift gloves (Red)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 65046, 65051, 65056 };\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62659;\n\t\t\titemDef.femaleModel = 62660;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33252:\n\t\t\titemDef.name = \"Swift gloves (White)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 64585, 64590, 64595 };\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62661;\n\t\t\titemDef.femaleModel = 62662;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33253:\n\t\t\titemDef.name = \"Swift gloves (Yellow)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 9767, 9772, 9777 };\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62663;\n\t\t\titemDef.femaleModel = 62664;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33254:\n\t\t\titemDef.name = \"Spellcaster gloves (Black)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62665;\n\t\t\titemDef.femaleModel = 62666;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33255:\n\t\t\titemDef.name = \"Spellcaster gloves (Red)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 65046, 65051, 65056 };\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62667;\n\t\t\titemDef.femaleModel = 62668;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33256:\n\t\t\titemDef.name = \"Spellcaster gloves (White)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 64585, 64590, 64595 };\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62669;\n\t\t\titemDef.femaleModel = 62670;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33257:\n\t\t\titemDef.name = \"Spellcaster gloves (Yellow)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 9767, 9772, 9777 };\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62671;\n\t\t\titemDef.femaleModel = 62672;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33258:\n\t\t\titemDef.name = \"Tekton longsword\";\n\t\t\titemDef.description = \"Tekton longsword.\";\n\t\t\titemDef.modelId = 62682;\n\t\t\titemDef.maleModel = 62681;\n\t\t\titemDef.femaleModel = 62681;\n\t\t\titemDef.modelZoom = 1445;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33259:\n\t\t\titemDef.name = \"Pet wyrm\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 36922;\n\t\t\titemDef.modelZoom = 2547;\n\t\t\titemDef.modelRotation1 = 97;\n\t\t\titemDef.modelRotation2 = 1820;\n\t\t\titemDef.modelOffset1 = -7;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33260:\n\t\t\titemDef.name = \"Pet drake\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 36160;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33261:\n\t\t\titemDef.name = \"Pet wyrm\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 36922;\n\t\t\titemDef.modelZoom = 2547;\n\t\t\titemDef.modelRotation1 = 97;\n\t\t\titemDef.modelRotation2 = 1820;\n\t\t\titemDef.modelOffset1 = -7;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33262:\n\t\t\titemDef.name = \"Valentines Balloon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62766;\n\t\t\titemDef.maleModel = 62767;\n\t\t\titemDef.femaleModel = 62767;\n\t\t\titemDef.modelZoom = 2200;\n\t\t\titemDef.modelRotation1 = 270;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33263:\n\t\t\titemDef.name = \"Cupid bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62768;\n\t\t\titemDef.maleModel = 62769;\n\t\t\titemDef.femaleModel = 62769;\n\t\t\titemDef.modelZoom = 1072;\n\t\t\titemDef.modelRotation1 = 127;\n\t\t\titemDef.modelRotation2 = 103;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33264:\n\t\t\titemDef.name = \"Halo and horns\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62771;\n\t\t\titemDef.maleModel = 62770;\n\t\t\titemDef.femaleModel = 62770;\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation1 = 228;\n\t\t\titemDef.modelRotation2 = 141;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33265:\n\t\t\titemDef.name = \"Heart\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62782;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33266:\n\t\t\titemDef.name = \"Valentines mystery box\";\n\t\t\titemDef.description = \"You make me hard.\";\n\t\t\titemDef.modelId = 62773;\n\t\t\titemDef.modelZoom = 464;\n\t\t\titemDef.modelRotation1 = 423;\n\t\t\titemDef.modelRotation2 = 1928;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Open\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33267:\n\t\t\titemDef.name = \"Staff of adoration\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62774;\n\t\t\titemDef.maleModel = 62775;\n\t\t\titemDef.femaleModel = 62775;\n\t\t\titemDef.modelZoom = 1579;\n\t\t\titemDef.modelRotation1 = 660;\n\t\t\titemDef.modelRotation2 = 48;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33268:\n\t\t\titemDef.name = \"Valentines crossbow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62778;\n\t\t\titemDef.maleModel = 62779;\n\t\t\titemDef.femaleModel = 62779;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 258;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33269:\n\t\t\titemDef.name = \"Onyxia Mystery Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 2426;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.modifiedModelColors = new int[] { 22410, 2999 };\n\t\t\titemDef.originalModelColors = new int[] { 2130, 38693 };\n\t\t\titemDef.description = \"Chances at several unqiue items found only in this box! (ex: Tekton Armor)\";\n\t\t\tbreak;\n\t\tcase 33270:\n\t\t\titemDef.name = \"Dragon Hunter Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 2426;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.modifiedModelColors = new int[] { 22410, 2999 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 1050 };\n\t\t\titemDef.description = \"Chances for items that give bonuses toward dragons. (ex: Dragonhunter Lance)\";\n\t\t\tbreak;\n\t\tcase 33273:\n\t\t\titemDef.name = \"Ancient sword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60201;\n\t\t\titemDef.maleModel = 60200;\n\t\t\titemDef.femaleModel = 60200;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33274:\n\t\t\titemDef.name = \"Armadyl staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60203;\n\t\t\titemDef.maleModel = 60202;\n\t\t\titemDef.femaleModel = 60202;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33275:\n\t\t\titemDef.name = \"Bork axe\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60205;\n\t\t\titemDef.maleModel = 60204;\n\t\t\titemDef.femaleModel = 60204;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33276:\n\t\t\titemDef.name = \"Bree bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60207;\n\t\t\titemDef.maleModel = 60206;\n\t\t\titemDef.femaleModel = 60206;\n\t\t\titemDef.modelZoom = 1700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33277:\n\t\t\titemDef.name = \"Infernal staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60209;\n\t\t\titemDef.maleModel = 60208;\n\t\t\titemDef.femaleModel = 60208;\n\t\t\titemDef.modelZoom = 2200;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33278:\n\t\t\titemDef.name = \"Infernal longsword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60211;\n\t\t\titemDef.maleModel = 60210;\n\t\t\titemDef.femaleModel = 60210;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33279:\n\t\t\titemDef.name = \"Necrolord staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60213;\n\t\t\titemDef.maleModel = 60212;\n\t\t\titemDef.femaleModel = 60212;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33280:\n\t\t\titemDef.name = \"Insert name here\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60215;\n\t\t\titemDef.maleModel = 60214;\n\t\t\titemDef.femaleModel = 60214;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33281:\n\t\t\titemDef.name = \"Infernal bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60219;\n\t\t\titemDef.maleModel = 60218;\n\t\t\titemDef.femaleModel = 60218;\n\t\t\titemDef.modelZoom = 3334;\n\t\t\titemDef.modelRotation1 = 533;\n\t\t\titemDef.modelRotation2 = 1294;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33282:\n\t\t\titemDef.name = \"Infernal warhammer\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60221;\n\t\t\titemDef.maleModel = 60220;\n\t\t\titemDef.femaleModel = 60220;\n\t\t\titemDef.modelZoom = 2512;\n\t\t\titemDef.modelRotation1 = 317;\n\t\t\titemDef.modelRotation2 = 1988;\n\t\t\titemDef.modelOffset1 = -8;\n\t\t\titemDef.modelOffset2 = 45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33283:\n\t\t\titemDef.name = \"Imbued Porazdir's heart\";\n\t\t\titemDef.modelId = 32298;\n\t\t\titemDef.modelZoom = 1168;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 1690;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 60826, 59796, 54544, 58904, 54561 };\n\t\t\titemDef.originalModelColors = new int[] { 13263, 13014, 13243, 13000, 13275 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Invigorate\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Boosts your strength for a period of time.\";\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33284:\n\t\t\titemDef.name = \"Imbued Justiciar's heart\";\n\t\t\titemDef.modelId = 32298;\n\t\t\titemDef.modelZoom = 1168;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 1690;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 60826, 59796, 54544, 58904, 54561 };\n\t\t\titemDef.originalModelColors = new int[] { 31661, 31418, 31661, 31167, 31445 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Invigorate\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Boosts your Defence for a period of time.\";\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32285:\n\t\t\titemDef.name = \"Imbued Derwen's heart\";\n\t\t\titemDef.modelId = 32298;\n\t\t\titemDef.modelZoom = 1168;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 1690;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 60826, 59796, 54544, 58904, 54561 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 930, 936, 940, 950 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Invigorate\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Boosts your Attack for a period of time.\";\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32286:\n\t\t\titemDef.name = \"Bronze fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 5652, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32287:\n\t\t\titemDef.name = \"Iron fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 33, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32288:\n\t\t\titemDef.name = \"Steel fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 61, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32289:\n\t\t\titemDef.name = \"Black fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32290:\n\t\t\titemDef.name = \"Mithril fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 43297, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32291:\n\t\t\titemDef.name = \"Adamant fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 21662, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32292:\n\t\t\titemDef.name = \"Rune fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 36133, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32293:\n\t\t\titemDef.name = \"Dragon fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing. Can also be used for Deep sea fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 924, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32294:\n\t\t\titemDef.name = \"Raw eel\";\n\t\t\titemDef.description = \"Slimy\";\n\t\t\titemDef.modelId = 6856;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 296;\n\t\t\titemDef.modelRotation2 = 352;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = 42;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32295:\n\t\t\titemDef.name = \"Burnt eel\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 6856;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 296;\n\t\t\titemDef.modelRotation2 = 352;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = 42;\n\t\t\titemDef.modifiedModelColors = new int[] { 8485, 14622, 12589 };\n\t\t\titemDef.originalModelColors = new int[] { 8724, 3226, 9754 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32296:\n\t\t\titemDef.name = \"Eel\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Eat\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 6856;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 296;\n\t\t\titemDef.modelRotation2 = 352;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = 42;\n\t\t\titemDef.modifiedModelColors = new int[] { 8485, 14622, 8386, 12589 };\n\t\t\titemDef.originalModelColors = new int[] { 8088, 6032, 57, 2960 };\n\t\t\titemDef.description = \"None\";\n\t\t\tbreak;\n\n\t\tcase 32297:\n\t\t\titemDef.name = \"Raw baron shark\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 2594;\n\t\t\titemDef.modelZoom = 1860;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 12;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 12;\n\t\t\titemDef.modifiedModelColors = new int[] { 103, 103 };\n\t\t\titemDef.originalModelColors = new int[] { 7756, 5349 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32298:\n\t\t\titemDef.name = \"Burnt baron shark\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 2594;\n\t\t\titemDef.modelZoom = 1860;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 12;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 12;\n\t\t\titemDef.modifiedModelColors = new int[] { 61, 103 };\n\t\t\titemDef.originalModelColors = new int[] { 28, 41 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32299:\n\t\t\titemDef.name = \"Baron shark\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Eat\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 2594;\n\t\t\titemDef.modelZoom = 1860;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 12;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 12;\n\t\t\titemDef.modifiedModelColors = new int[] { 61, 103 };\n\t\t\titemDef.originalModelColors = new int[] { 8109, 4795 };\n\t\t\titemDef.description = \"None\";\n\t\t\tbreak;\n\n\t\tcase 32300:\n\t\t\titemDef.name = \"Raw cavefish\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60223;\n\t\t\titemDef.modelZoom = 1284;\n\t\t\titemDef.modelRotation1 = 499;\n\t\t\titemDef.modelRotation2 = 1907;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32301:\n\t\t\titemDef.name = \"Burnt cavefish\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60227;\n\t\t\titemDef.modelZoom = 1284;\n\t\t\titemDef.modelRotation1 = 499;\n\t\t\titemDef.modelRotation2 = 1907;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32302:\n\t\t\titemDef.name = \"Cavefish\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Eat\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 60228;\n\t\t\titemDef.modelZoom = 1284;\n\t\t\titemDef.modelRotation1 = 499;\n\t\t\titemDef.modelRotation2 = 1907;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.description = \"None\";\n\t\t\tbreak;\n\n\t\tcase 32303:\n\t\t\titemDef.name = \"Dragonfire visage (e)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 26456;\n\t\t\titemDef.modelZoom = 1697;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 152;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.modifiedModelColors = new int[] { 45, 41, 33, 24, 20, 57, 22, 37 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33285:\n\t\t\titemDef.name = \"Easter Mystery Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 61110;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\t// itemDef.modifiedModelColors = new int[] {22410, 2999};\n\t\t\t// itemDef.originalModelColors = new int[] {35321, 350};\n\t\t\titemDef.description = \"Chances for all sorts of Easter Items!\";\n\t\t\tbreak;\n\n\t\tcase 33286:\n\t\t\titemDef.name = \"Easter Cape\";\n\t\t\titemDef.inventoryOptions = new String[] { null, \"wear\", null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"An Easter Cape.\";\n\t\t\tbreak;\n\n\t\tcase 33287:\n\t\t\titemDef.name = \"Pet Easter Bunny\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"You've captured the Easter bunny!\";\n\t\t\tbreak;\n\n\t\tcase 33288:\n\t\t\titemDef.name = \"Pet Choco\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"mmm... a chocolate bunny\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 7079 };\n\t\t\tbreak;\n\n\t\tcase 33289:\n\t\t\titemDef.name = \"Pet Milkie\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"mmm... a chocolate bunny\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 6040 };\n\t\t\tbreak;\n\n\t\tcase 33290:\n\t\t\titemDef.name = \"Pet Goldie\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"oh wow... a rare golden bunny!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 9152 };\n\t\t\tbreak;\n\n\t\tcase 33291:\n\t\t\titemDef.name = \"Pet Blue\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"A blue bunny... kinda looks like the easter bunny!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 35321 };\n\t\t\tbreak;\n\n\t\tcase 33292:\n\t\t\titemDef.name = \"Crazed bunny\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 23901;\n\t\t\titemDef.modelZoom = 500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"What a bloody mess...\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5413, 5417, 5421 };\n\t\t\titemDef.originalModelColors = new int[] { 935, 111, 127 };\n\t\t\tbreak;\n\n\t\tcase 33293:\n\t\t\titemDef.name = \"Peter Rabbit\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 28602;\n\t\t\titemDef.modelZoom = 500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"Hi Peter!\";\n\t\t\tbreak;\n\n\t\tcase 33294:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947 };\n\t\t\titemDef.originalModelColors = new int[] { 8128 };\n\t\t\tbreak;\n\n\t\tcase 33295:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947, 8301 };\n\t\t\titemDef.originalModelColors = new int[] { 8128, 25511 };\n\t\t\tbreak;\n\n\t\tcase 33296:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947, 8301 };\n\t\t\titemDef.originalModelColors = new int[] { 8128, 38835 };\n\t\t\tbreak;\n\n\t\tcase 33297:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947, 8301 };\n\t\t\titemDef.originalModelColors = new int[] { 8128, 947 };\n\t\t\tbreak;\n\n\t\tcase 33305:\n\t\t\titemDef.name = \"$10 bond\";\n\t\t\titemDef.description = \"$10 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 84, 84, 84, 84, 84, 84, 84 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33306:\n\t\t\titemDef.name = \"$25 bond\";\n\t\t\titemDef.description = \"$25 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 87, 87, 87, 87, 87, 87, 87 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33307:\n\t\t\titemDef.name = \"$50 bond\";\n\t\t\titemDef.description = \"$50 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 65, 65, 65, 65, 65, 65, 65 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33308:\n\t\t\titemDef.name = \"$100 bond\";\n\t\t\titemDef.description = \"$25 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 75, 75, 75, 75, 75, 75, 75 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33309:\n\t\t\titemDef.name = \"$200 bond\";\n\t\t\titemDef.description = \"$200 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 88, 88, 88, 88, 88, 88, 88 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33310:\n\t\t\titemDef.name = \"$500 bond\";\n\t\t\titemDef.description = \"$500 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 85, 85, 85, 85, 85, 85, 85 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33311:\n\t\t\titemDef.name = \"$1000 bond\";\n\t\t\titemDef.description = \"$1000 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 86, 86, 86, 86, 86, 86, 86 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33312:\n\t\t\titemDef.name = \"Armadyl battlestaff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60332;\n\t\t\titemDef.maleModel = 60333;\n\t\t\titemDef.femaleModel = 60333;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 225;\n\t\t\titemDef.modelRotation2 = 1994;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\n\t\tcase 33313:\n\t\t\titemDef.name = \"Colossal platebody\";\n\t\t\titemDef.description = \"Colossal platebody.\";\n\t\t\titemDef.modelId = 60323;\n\t\t\titemDef.maleModel = 60324;\n\t\t\titemDef.femaleModel = 60324;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33314:\n\t\t\titemDef.name = \"Colossal platelegs\";\n\t\t\titemDef.description = \"Colossal platelegs.\";\n\t\t\titemDef.modelId = 60325;\n\t\t\titemDef.maleModel = 60326;\n\t\t\titemDef.femaleModel = 60326;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33315:\n\t\t\titemDef.name = \"Colossal boots\";\n\t\t\titemDef.description = \"Colossal boots.\";\n\t\t\titemDef.modelId = 60329;\n\t\t\titemDef.maleModel = 60329;\n\t\t\titemDef.femaleModel = 60329;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33316:\n\t\t\titemDef.name = \"Colossal gloves\";\n\t\t\titemDef.description = \"Colossal gloves.\";\n\t\t\titemDef.modelId = 60330;\n\t\t\titemDef.maleModel = 60331;\n\t\t\titemDef.femaleModel = 60331;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33317:\n\t\t\titemDef.name = \"Colossal helmet\";\n\t\t\titemDef.description = \"Colossal helmet.\";\n\t\t\titemDef.modelId = 60327;\n\t\t\titemDef.maleModel = 60328;\n\t\t\titemDef.femaleModel = 60328;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33318:\n\t\t\titemDef.name = \"Polypore staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60334;\n\t\t\titemDef.maleModel = 60335;\n\t\t\titemDef.femaleModel = 60335;\n\t\t\titemDef.modelZoom = 3750;\n\t\t\titemDef.modelRotation1 = 1454;\n\t\t\titemDef.modelRotation2 = 997;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\n\t\tcase 33319:\n\t\t\titemDef.name = \"Ganodermic platebody\";\n\t\t\titemDef.description = \"Ganodermic platebody.\";\n\t\t\titemDef.modelId = 60338;\n\t\t\titemDef.maleModel = 60339;\n\t\t\titemDef.femaleModel = 60339;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33320:\n\t\t\titemDef.name = \"Ganodermic platelegs\";\n\t\t\titemDef.description = \"Ganodermic platelegs.\";\n\t\t\titemDef.modelId = 60340;\n\t\t\titemDef.maleModel = 60341;\n\t\t\titemDef.femaleModel = 60341;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33321:\n\t\t\titemDef.name = \"Ganodermic helmet\";\n\t\t\titemDef.description = \"Ganodermic helmet.\";\n\t\t\titemDef.modelId = 60336;\n\t\t\titemDef.maleModel = 60337;\n\t\t\titemDef.femaleModel = 60337;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33322:\n\t\t\titemDef.name = \"Grotesque platebody\";\n\t\t\titemDef.description = \"Grosteq platebody.\";\n\t\t\titemDef.modelId = 60347;\n\t\t\titemDef.maleModel = 60348;\n\t\t\titemDef.femaleModel = 60348;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33323:\n\t\t\titemDef.name = \"Grotesque platelegs\";\n\t\t\titemDef.description = \"Grosteq platelegs.\";\n\t\t\titemDef.modelId = 60349;\n\t\t\titemDef.maleModel = 60350;\n\t\t\titemDef.femaleModel = 60350;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33324:\n\t\t\titemDef.name = \"Grotesque helmet\";\n\t\t\titemDef.description = \"Grosteqc helmet.\";\n\t\t\titemDef.modelId = 60345;\n\t\t\titemDef.maleModel = 60346;\n\t\t\titemDef.femaleModel = 60346;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33325:\n\t\t\titemDef.name = \"Grotesque cape\";\n\t\t\titemDef.description = \"Grosteq cape.\";\n\t\t\titemDef.modelId = 60351;\n\t\t\titemDef.maleModel = 60352;\n\t\t\titemDef.femaleModel = 60352;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33326:\n\t\t\titemDef.name = \"Stunning Hammer\";\n\t\t\titemDef.description = \"Has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60353;\n\t\t\titemDef.maleModel = 60354;\n\t\t\titemDef.femaleModel = 60354;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1985;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\n\t\tcase 33327:\n\t\t\titemDef.name = \"Stunning Katagon platebody\";\n\t\t\titemDef.description = \"has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60356;\n\t\t\titemDef.maleModel = 60357;\n\t\t\titemDef.femaleModel = 60357;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33328:\n\t\t\titemDef.name = \"Stunning Katagon platelegs\";\n\t\t\titemDef.description = \"has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60358;\n\t\t\titemDef.maleModel = 60359;\n\t\t\titemDef.femaleModel = 60359;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33329:\n\t\t\titemDef.name = \"Stunning Katagon helmet\";\n\t\t\titemDef.description = \"has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60360;\n\t\t\titemDef.maleModel = 60361;\n\t\t\titemDef.femaleModel = 60361;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33331:\n\t\t\titemDef.name = \"Ancient platebody\";\n\t\t\titemDef.description = \"Ancient platebody.\";\n\t\t\titemDef.modelId = 60366;\n\t\t\titemDef.maleModel = 60367;\n\t\t\titemDef.femaleModel = 60367;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33332:\n\t\t\titemDef.name = \"Ancient platelegs\";\n\t\t\titemDef.description = \"Ancient platelegs.\";\n\t\t\titemDef.modelId = 60368;\n\t\t\titemDef.maleModel = 60369;\n\t\t\titemDef.femaleModel = 60369;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33334:\n\t\t\titemDef.name = \"Ancient boots\";\n\t\t\titemDef.description = \"Ancient boots.\";\n\t\t\titemDef.modelId = 60372;\n\t\t\titemDef.maleModel = 60372;\n\t\t\titemDef.femaleModel = 60372;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33335:\n\t\t\titemDef.name = \"Ancient gloves\";\n\t\t\titemDef.description = \"Ancient gloves.\";\n\t\t\titemDef.modelId = 60370;\n\t\t\titemDef.maleModel = 60371;\n\t\t\titemDef.femaleModel = 60371;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33336:\n\t\t\titemDef.name = \"Ancient helmet\";\n\t\t\titemDef.description = \"Ancient helmet.\";\n\t\t\titemDef.modelId = 60364;\n\t\t\titemDef.maleModel = 60365;\n\t\t\titemDef.femaleModel = 60365;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33341:\n\t\t\titemDef.name = \"Vanguard helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60391;\n\t\t\titemDef.maleModel = 60392;\n\t\t\titemDef.femaleModel = 60392;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33342:\n\t\t\titemDef.name = \"Vanguard platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60393;\n\t\t\titemDef.maleModel = 60394;\n\t\t\titemDef.femaleModel = 60394;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33343:\n\t\t\titemDef.name = \"Vanguard platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60395;\n\t\t\titemDef.maleModel = 60396;\n\t\t\titemDef.femaleModel = 60396;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33344:\n\t\t\titemDef.name = \"Vanguard boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60398;\n\t\t\titemDef.maleModel = 60398;\n\t\t\titemDef.femaleModel = 60398;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33345:\n\t\t\titemDef.name = \"Vanguard gloves\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60373;\n\t\t\titemDef.maleModel = 60397;\n\t\t\titemDef.femaleModel = 60397;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33346:\n\t\t\titemDef.name = \"Celestial staff of light\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60401;\n\t\t\titemDef.maleModel = 60402;\n\t\t\titemDef.femaleModel = 60402;\n\t\t\titemDef.modelZoom = 3200;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 101 };\n\t\t\titemDef.originalModelColors = new int[] { 12 };\n\t\t\titemDef.maleOffset = -6;\n\t\t\titemDef.femaleOffset = -6;\n\t\t\tbreak;\n\n\t\tcase 33347:\n\t\t\titemDef.name = \"Hood of sorrow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60438;\n\t\t\titemDef.maleModel = 60403;\n\t\t\titemDef.femaleModel = 60403;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33348:\n\t\t\titemDef.name = \"Celestial robe top\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60404;\n\t\t\titemDef.maleModel = 60405;\n\t\t\titemDef.femaleModel = 60405;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33349:\n\t\t\titemDef.name = \"Celestial robe legs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60406;\n\t\t\titemDef.maleModel = 60407;\n\t\t\titemDef.femaleModel = 60407;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33350:\n\t\t\titemDef.name = \"Primal 2h sword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60408;\n\t\t\titemDef.maleModel = 60409;\n\t\t\titemDef.femaleModel = 60409;\n\t\t\titemDef.modelZoom = 1701;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.modelRotation2 = 1529;\n\t\t\titemDef.modelRotation1 = 1713;\n\t\t\titemDef.modelRotationY = 898;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33353:\n\t\t\titemDef.name = \"Primal longsword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60417;\n\t\t\titemDef.maleModel = 60418;\n\t\t\titemDef.femaleModel = 60418;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.modelRotation2 = 1793;\n\t\t\titemDef.modelRotation1 = 1473;\n\t\t\titemDef.modelRotationY = 1121;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33354:\n\t\t\titemDef.name = \"Primal maul\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60419;\n\t\t\titemDef.maleModel = 60420;\n\t\t\titemDef.femaleModel = 60420;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 525;\n\t\t\titemDef.modelRotation2 = 350;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33359:\n\t\t\titemDef.name = \"Primal rapier\";\n\t\t\titemDef.description = \"Good for fighting the ...\";\n\t\t\titemDef.modelId = 60433;\n\t\t\titemDef.maleModel = 60433;\n\t\t\titemDef.femaleModel = 60433;\n\t\t\titemDef.modelZoom = 1300;\n\t\t\titemDef.modelRotation1 = 1401;\n\t\t\titemDef.modelRotation2 = 1724;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 15;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33360:\n\t\t\titemDef.name = \"Primal spear\";\n\t\t\titemDef.description = \"Good for fighting the Corperal Beast.\";\n\t\t\titemDef.modelId = 60434;\n\t\t\titemDef.maleModel = 60435;\n\t\t\titemDef.femaleModel = 60435;\n\t\t\titemDef.modelZoom = 1711;\n\t\t\titemDef.modelRotation1 = 485;\n\t\t\titemDef.modelRotation2 = 391;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -10;\n\t\t\titemDef.maleOffset = -10;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33361:\n\t\t\titemDef.name = \"Primal warhammer\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60436;\n\t\t\titemDef.maleModel = 60437;\n\t\t\titemDef.femaleModel = 60437;\n\t\t\titemDef.modelZoom = 1330;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 148;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33362:\n\t\t\titemDef.name = \"Chitin helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60445;\n\t\t\titemDef.maleModel = 60446;\n\t\t\titemDef.femaleModel = 60446;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33364:\n\t\t\titemDef.name = \"Chitin platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60447;\n\t\t\titemDef.maleModel = 60448;\n\t\t\titemDef.femaleModel = 60448;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33365:\n\t\t\titemDef.name = \"Chitin platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60449;\n\t\t\titemDef.maleModel = 60450;\n\t\t\titemDef.femaleModel = 60450;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33366:\n\t\t\titemDef.name = \"Chitin cape\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60443;\n\t\t\titemDef.maleModel = 60444;\n\t\t\titemDef.femaleModel = 60444;\n\t\t\titemDef.modelZoom = 1500;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = -4;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33367:\n\t\t\titemDef.name = \"Supreme void helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60467;\n\t\t\titemDef.maleModel = 60464;\n\t\t\titemDef.femaleModel = 60464;\n\t\t\titemDef.modelZoom = 900;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33368:\n\t\t\titemDef.name = \"Supreme void robe top\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60468;\n\t\t\titemDef.maleModel = 60465;\n\t\t\titemDef.femaleModel = 60465;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33369:\n\t\t\titemDef.name = \"Supreme void robe\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60469;\n\t\t\titemDef.maleModel = 60466;\n\t\t\titemDef.femaleModel = 60466;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33370:\n\t\t\titemDef.name = \"Korasi's sword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60471;\n\t\t\titemDef.maleModel = 60470;\n\t\t\titemDef.femaleModel = 60470;\n\t\t\titemDef.modelZoom = 1744;\n\t\t\titemDef.modelRotation1 = 330;\n\t\t\titemDef.modelRotation2 = 1505;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -4;\n\t\t\titemDef.femaleOffset = -4;\n\t\t\tbreak;\n\n\t\tcase 33371:\n\t\t\titemDef.name = \"Spiked slayer helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60475;\n\t\t\titemDef.maleModel = 60476;\n\t\t\titemDef.femaleModel = 60476;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33372:\n\t\t\titemDef.name = \"Slayer platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60478;\n\t\t\titemDef.maleModel = 60479;\n\t\t\titemDef.femaleModel = 60479;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33373:\n\t\t\titemDef.name = \"Slayer platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60474;\n\t\t\titemDef.maleModel = 60477;\n\t\t\titemDef.femaleModel = 60477;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33374:\n\t\t\titemDef.name = \"Slayer boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60472;\n\t\t\titemDef.maleModel = 60473;\n\t\t\titemDef.femaleModel = 60473;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 164;\n\t\t\titemDef.modelRotation2 = 156;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33375:\n\t\t\titemDef.name = \"Blood Justiciar helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60482;\n\t\t\titemDef.maleModel = 60483;\n\t\t\titemDef.femaleModel = 60483;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33376:\n\t\t\titemDef.name = \"Blood Justiciar platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60484;\n\t\t\titemDef.maleModel = 60485;\n\t\t\titemDef.femaleModel = 60485;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33377:\n\t\t\titemDef.name = \"Blood justiciar platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60486;\n\t\t\titemDef.maleModel = 60487;\n\t\t\titemDef.femaleModel = 60487;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33378:\n\t\t\titemDef.name = \"Blood justiciar boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60488;\n\t\t\titemDef.maleModel = 60488;\n\t\t\titemDef.femaleModel = 60488;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 164;\n\t\t\titemDef.modelRotation2 = 156;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33379:\n\t\t\titemDef.name = \"Blood justiciar gloves\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60489;\n\t\t\titemDef.maleModel = 60490;\n\t\t\titemDef.femaleModel = 60490;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33380:\n\t\t\titemDef.name = \"Blood scythe of vitur\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60480;\n\t\t\titemDef.maleModel = 60481;\n\t\t\titemDef.femaleModel = 60481;\n\t\t\titemDef.modelZoom = 3850;\n\t\t\titemDef.modelRotation1 = 727;\n\t\t\titemDef.modelRotation2 = 997;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33381:\n\t\t\titemDef.name = \"Skiller cape\";\n\t\t\titemDef.description = \"Skiller cape.\";\n\t\t\titemDef.modelId = 60494;\n\t\t\titemDef.maleModel = 60493;\n\t\t\titemDef.femaleModel = 60492;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33382:\n\t\t\titemDef.name = \"Justiciar faceguard (zamorak)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33383:\n\t\t\titemDef.name = \"Justiciar faceguard (guthix)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33384:\n\t\t\titemDef.name = \"Justiciar faceguard (saradomin)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33385:\n\t\t\titemDef.name = \"Justiciar faceguard (ancient)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33387:\n\t\t\titemDef.name = \"Justiciar faceguard (bandos)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33389:\n\t\t\titemDef.name = \"Justiciar faceguard (armadyl)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33390:\n\t\t\titemDef.name = \"Justiciar chestguard (zamorak)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33391:\n\t\t\titemDef.name = \"Justiciar chestguard (guthix)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33392:\n\t\t\titemDef.name = \"Justiciar chestguard (saradomin)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33393:\n\t\t\titemDef.name = \"Justiciar chestguard (ancient)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33394:\n\t\t\titemDef.name = \"Justiciar chestguard (bandos)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33395:\n\t\t\titemDef.name = \"Justiciar chestguard (armadyl)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33396:\n\t\t\titemDef.name = \"Justiciar legguards (zamorak)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33397:\n\t\t\titemDef.name = \"Justiciar legguards (guthix)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33398:\n\t\t\titemDef.name = \"Justiciar legguards (saradomin)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33399:\n\t\t\titemDef.name = \"Justiciar legguards (ancient)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33400:\n\t\t\titemDef.name = \"Justiciar legguards (bandos)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33401:\n\t\t\titemDef.name = \"Justiciar legguards (armadyl)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33402:\n\t\t\titemDef.name = \"Pet andy\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 50169;\n\t\t\titemDef.modelZoom = 1500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33403:\n\t\t\titemDef.name = \"Pet mod divine\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 14283;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33404:\n\t\t\titemDef.name = \"Celestial fairy\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60491;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 947 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 937, 11200 };\n\t\t\titemDef.originalModelColors = new int[] { 42663, 41883 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33405:\n\t\t\titemDef.name = \"Lava partyhat (red)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33406:\n\t\t\titemDef.name = \"Lava partyhat (green)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33407:\n\t\t\titemDef.name = \"Lava partyhat (cyan)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33408:\n\t\t\titemDef.name = \"Lava partyhat (purple)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33409:\n\t\t\titemDef.name = \"Infernal partyhat (blue)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33410:\n\t\t\titemDef.name = \"Infernal partyhat (green)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33411:\n\t\t\titemDef.name = \"Infernal partyhat (purple)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33412:\n\t\t\titemDef.name = \"Infernal partyhat (rainbow)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33413:\n\t\t\titemDef.name = \"Celestial partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33414:\n\t\t\titemDef.name = \"Blood partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33415:\n\t\t\titemDef.name = \"Shadow partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33416:\n\t\t\titemDef.name = \"Light blue partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33417:\n\t\t\titemDef.name = \"Easter partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33418:\n\t\t\titemDef.name = \"Dark sparkle partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33419:\n\t\t\titemDef.name = \"Rainbow partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33420:\n\t\t\titemDef.name = \"Fire partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33421:\n\t\t\titemDef.name = \"Pet star sprite\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60506;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33422:\n\t\t\titemDef.name = \"Stargaze Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 61110;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\t// itemDef.modifiedModelColors = new int[] {22410, 2999};\n\t\t\t// itemDef.originalModelColors = new int[] {35321, 350};\n\t\t\titemDef.description = \"none\";\n\t\t\tbreak;\n\n\t\tcase 33423:\n\t\t\titemDef.name = \"Star Dust\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Exchange\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modelId = 60496;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 279;\n\t\t\titemDef.modelRotation2 = 1994;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 47;\n\t\t\t// itemDef.modifiedModelColors = new int[] {22410, 2999};\n\t\t\t// itemDef.originalModelColors = new int[] {35321, 350};\n\t\t\titemDef.description = \"none\";\n\t\t\tbreak;\n\n\t\tcase 33424:\n\t\t\titemDef.name = \"Blood twisted bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32799;\n\t\t\titemDef.maleModel = 32674;\n\t\t\titemDef.femaleModel = 32674;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10318, 10334 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 66, 66 };\n\t\t\titemDef.modifiedModelColors = new int[] { 14236, 13223 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33425:\n\t\t\titemDef.name = \"Celestial crow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60507;\n\t\t\titemDef.modelZoom = 1000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10382 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 10378, 10502 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33426:\n\t\t\titemDef.name = \"Celestial penguin\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60508;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10343 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 16, 12, 20, 24, 8, 10332, 10337 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0, 0, 0, 0, 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33427:\n\t\t\titemDef.name = \"Celestial snake\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60509;\n\t\t\titemDef.modelZoom = 1800;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10644, 10512 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78, 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 10413, 10405, 10524 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33428:\n\t\t\titemDef.name = \"Celestial scorpion\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60510;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 142 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 4884, 4636, 3974, 4525, 4645 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0, 0, 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33429:\n\t\t\titemDef.name = \"Armadyl dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\tbreak;\n\n\t\tcase 33430:\n\t\t\titemDef.name = \"Guthix dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\tbreak;\n\n\t\tcase 33431:\n\t\t\titemDef.name = \"Zamorak dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\tbreak;\n\n\t\tcase 33432:\n\t\t\titemDef.name = \"Ancient dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\tbreak;\n\n\t\tcase 33433:\n\t\t\titemDef.name = \"Bandos dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\tbreak;\n\n\t\tcase 33434:\n\t\t\titemDef.name = \"Saradomin dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\tbreak;\n\n\t\tcase 33435:\n\t\t\titemDef.name = \"Celestial egg\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 7171;\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelRotation2 = 16;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 476 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Hatch\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\tbreak;\n\n\t\tcase 33436:\n\t\t\titemDef.name = \"Elite void top (placeholder)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 10586;\n\t\t\titemDef.maleModel = 10687;\n\t\t\titemDef.anInt188 = 10681;\n\t\t\titemDef.femaleModel = 10694;\n\t\t\titemDef.anInt164 = 10688;\n\t\t\titemDef.modelZoom = 1221;\n\t\t\titemDef.modelRotation1 = 459;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\t// itemDef.originalTextureColors = new int [] { 695};\n\t\t\t// itemDef.modifiedTextureColors = new int [] { 66};\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33437:\n\t\t\titemDef.name = \"Elite void robe (placeholder)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60528;\n\t\t\titemDef.maleModel = 60526;\n\t\t\titemDef.femaleModel = 60527;\n\t\t\titemDef.modelZoom = 2105;\n\t\t\titemDef.modelRotation1 = 525;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\t// itemDef.originalTextureColors = new int [] { 695};\n\t\t\t// itemDef.modifiedTextureColors = new int [] { 66};\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33438:\n\t\t\titemDef.name = \"Blood chest\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60516;\n\t\t\titemDef.modelZoom = 2640;\n\t\t\titemDef.modelRotation1 = 114;\n\t\t\titemDef.modelRotation2 = 1883;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33439:\n\t\t\titemDef.name = \"Blood bird\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60517;\n\t\t\titemDef.modelZoom = 2768;\n\t\t\titemDef.modelRotation1 = 141;\n\t\t\titemDef.modelRotation2 = 1790;\n\t\t\titemDef.modelOffset1 = -8;\n\t\t\titemDef.modelOffset2 = -13;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\titemDef.originalTextureColors = new int[] { 1946, 2983, 6084, 2735, 5053, 6082, 4013, 2733, 4011, 2880,\n\t\t\t\t\t8150 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 };\n\t\t\tbreak;\n\n\t\tcase 33440:\n\t\t\titemDef.name = \"Blood Death\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60441;\n\t\t\titemDef.modelZoom = 16000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33442:\n\t\t\titemDef.name = \"10 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Claim\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33446:\n\t\t\titemDef.name = \"10 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Claim\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33450:\n\t\t\titemDef.name = \"10 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Claim\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33454:\n\t\t\titemDef.name = \"10 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33458:\n\t\t\titemDef.name = \"10 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33462:\n\t\t\titemDef.name = \"10 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33443:\n\t\t\titemDef.name = \"30 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33447:\n\t\t\titemDef.name = \"30 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33451:\n\t\t\titemDef.name = \"30 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33455:\n\t\t\titemDef.name = \"30 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33459:\n\t\t\titemDef.name = \"30 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33463:\n\t\t\titemDef.name = \"30 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33444:\n\t\t\titemDef.name = \"60 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33448:\n\t\t\titemDef.name = \"60 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33452:\n\t\t\titemDef.name = \"60 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33456:\n\t\t\titemDef.name = \"60 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33460:\n\t\t\titemDef.name = \"60 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33464:\n\t\t\titemDef.name = \"60 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33445:\n\t\t\titemDef.name = \"120 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33449:\n\t\t\titemDef.name = \"120 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33453:\n\t\t\titemDef.name = \"120 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33457:\n\t\t\titemDef.name = \"120 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33461:\n\t\t\titemDef.name = \"120 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33465:\n\t\t\titemDef.name = \"120 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33466:\n\t\t\titemDef.name = \"Deathtouched dart\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60534;\n\t\t\titemDef.maleModel = 60533;\n\t\t\titemDef.femaleModel = 60533;\n\t\t\titemDef.modelZoom = 1053;\n\t\t\titemDef.modelRotation1 = 471;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33467:\n\t\t\titemDef.name = \"Justiciar boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60535;\n\t\t\titemDef.maleModel = 60535;\n\t\t\titemDef.femaleModel = 60535;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 164;\n\t\t\titemDef.modelRotation2 = 156;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33468:\n\t\t\titemDef.name = \"Justiciar gloves\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 31022;\n\t\t\titemDef.maleModel = 31006;\n\t\t\titemDef.femaleModel = 31013;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 636;\n\t\t\titemDef.modelRotation2 = 2015;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 123, 70 };\n\t\t\titemDef.originalModelColors = new int[] { 6736, 59441 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33469:\n\t\t\titemDef.name = \"Magic mushroom\";\n\t\t\titemDef.description = \"offers a 10% droprate increase while this pet follows you.\";\n\t\t\titemDef.modelId = 60532;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33470:\n\t\t\titemDef.name = \"Twisted staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60538;\n\t\t\titemDef.maleModel = 60539;\n\t\t\titemDef.femaleModel = 60539;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33471:\n\t\t\titemDef.name = \"Cowboy hat\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60540;\n\t\t\titemDef.maleModel = 60541;\n\t\t\titemDef.femaleModel = 60541;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 108;\n\t\t\titemDef.modelRotation2 = 1535;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33472:\n\t\t\titemDef.name = \"Stick\";\n\t\t\titemDef.description = \"Careful of that chub.\";\n\t\t\titemDef.modelId = 60545;\n\t\t\titemDef.maleModel = 60545;\n\t\t\titemDef.femaleModel = 60545;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33473:\n\t\t\titemDef.name = \"#1 Tob cape\";\n\t\t\titemDef.description = \"Reward to the first to complete tob solo and in a team.\";\n\t\t\titemDef.modelId = 60551;\n\t\t\titemDef.maleModel = 60550;\n\t\t\titemDef.femaleModel = 60550;\n\t\t\titemDef.modelZoom = 2295;\n\t\t\titemDef.modelRotation1 = 367;\n\t\t\titemDef.modelRotation2 = 1212;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33474:\n\t\t\titemDef.name = \"Supreme void upgrade kit\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 4847;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 163;\n\t\t\titemDef.modelRotation2 = 73;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { -32709, 10295, 10304, 10287, 10275, 10283 };\n\t\t\titemDef.originalModelColors = new int[] { 10, 10, 10, 10, 10, 10 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33475:\n\t\t\titemDef.name = \"Hunter's penguin\";\n\t\t\titemDef.description = \"the one and only's pet.\";\n\t\t\titemDef.modelId = 60548;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33476:\n\t\t\titemDef.name = \"Chef Harambe\";\n\t\t\titemDef.description = \"I like to dip my balls in a deep fryer.\";\n\t\t\titemDef.modelId = 60921;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33477:\n\t\t\titemDef.name = \"Void knight champion jr\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60463;\n\t\t\titemDef.modelZoom = 14000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33478:\n\t\t\titemDef.name = \"Custom pet token\";\n\t\t\titemDef.description = \"Trade this to corey after filling out a form on the forums post custom pets\";\n\t\t\titemDef.modelId = 13838;\n\t\t\titemDef.modelZoom = 530;\n\t\t\titemDef.modelRotation1 = 415;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33479:\n\t\t\titemDef.name = \"Mr jaycorr\";\n\t\t\titemDef.description = \"The autistic one.\";\n\t\t\titemDef.modelId = 60592;\n\t\t\titemDef.modelZoom = 7500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33480:\n\t\t\titemDef.name = \"Broom broom\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60593;\n\t\t\titemDef.maleModel = 60593;\n\t\t\titemDef.femaleModel = 60593;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33481:\n\t\t\titemDef.name = \"Test\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 11773:\n\t\tcase 11771:\n\t\tcase 11770:\n\t\tcase 11772:\n\t\t\titemDef.anInt196 += 45;\n\t\t\tbreak;\n\t\tcase 22610:\n\t\t\titemDef.name = \"Vesta's spear (deg)\";\n\t\t\tbreak;\n\t\tcase 22614:\n\t\t\titemDef.name = \"Vesta's longsword (deg)\";\n\t\t\tbreak;\n\t\tcase 22616:\n\t\t\titemDef.name = \"Vesta's chainbody (deg)\";\n\t\t\tbreak;\n\t\tcase 22619:\n\t\t\titemDef.name = \"Vesta's plateskirt (deg)\";\n\t\t\tbreak;\n\t\tcase 22622:\n\t\t\titemDef.name = \"Statius's warhammer (deg)\";\n\t\t\tbreak;\n\t\tcase 22625:\n\t\t\titemDef.name = \"Statius's full helm (deg)\";\n\t\t\tbreak;\n\t\tcase 22628:\n\t\t\titemDef.name = \"Statius's platebody (deg)\";\n\t\t\tbreak;\n\t\tcase 22631:\n\t\t\titemDef.name = \"Statius's platelegs (deg)\";\n\t\t\tbreak;\n\t\tcase 22638:\n\t\t\titemDef.name = \"Morrigan's coif (deg)\";\n\t\t\tbreak;\n\t\tcase 22641:\n\t\t\titemDef.name = \"Morrigan's leather body (deg)\";\n\t\t\tbreak;\n\t\tcase 22644:\n\t\t\titemDef.name = \"Morrigan's leather chaps (deg)\";\n\t\t\tbreak;\n\t\tcase 22647:\n\t\t\titemDef.name = \"Zuriel's staff (deg)\";\n\t\t\tbreak;\n\t\tcase 22650:\n\t\t\titemDef.name = \"Zuriel's hood (deg)\";\n\t\t\tbreak;\n\t\tcase 22653:\n\t\t\titemDef.name = \"Zuriel's robe top (deg)\";\n\t\t\tbreak;\n\t\tcase 22656:\n\t\t\titemDef.name = \"Zuriel's robe bottom (deg)\";\n\t\t\tbreak;\n\n\t\tcase 13303:\n\t\t\titemDef.name = \"Event Key (Tarn)\";\n\t\t\titemDef.description = \"Use this to open the Event Boss chest.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 8128 };\n\t\t\titemDef.originalModelColors = new int[] { 933 };\n\t\t\tbreak;\n\t\tcase 13302:\n\t\t\titemDef.name = \"Event Key (Graardor)\";\n\t\t\titemDef.description = \"Use this to open the Event Boss chest.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 8128 };\n\t\t\titemDef.originalModelColors = new int[] { 933 };\n\t\t\tbreak;\n\t\tcase 13305:\n\t\t\titemDef.name = \"Tastey-Looking Key\";\n\t\t\titemDef.description = \"Use this to open the Event Boss chest.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 8128 };\n\t\t\titemDef.originalModelColors = new int[] { 933 };\n\t\t\tbreak;\n\t\tcase 2697:\n\t\t\titemDef.name = \"$10 Scroll\";\n\t\t\titemDef.description = \"Get donor status at a cheaper cost!\";\n\t\t\tbreak;\n\t\tcase 2698:\n\t\t\titemDef.name = \"$50 Scroll\";\n\t\t\titemDef.description = \"Read this scroll to be rewarded with the Super Donator status.\";\n\t\t\tbreak;\n\t\tcase 2699:\n\t\t\titemDef.name = \"$100 Donator\";\n\t\t\titemDef.description = \"Read this scroll to be rewarded with the Extreme Donator status.\";\n\t\t\tbreak;\n\t\tcase 2700:\n\t\t\titemDef.name = \"$5 Scroll\";\n\t\t\titemDef.description = \"Read this scroll to be rewarded with the Legendary Donator status.\";\n\t\t\tbreak;\n\t\tcase 1464:\n\t\t\titemDef.name = \"Vote ticket\";\n\t\t\titemDef.description = \"This ticket can be exchanged for a voting point.\";\n\t\t\tbreak;\n\n\t\tcase 11739:\n\t\t\titemDef.name = \"Daily reward box\";\n\t\t\titemDef.description = \"Open this box for a daily reward.\";\n\t\t\tbreak;\n\n\t\tcase 13066:// super set\n\t\tcase 12873:// barrows\n\t\tcase 12875:\n\t\tcase 12877:\n\t\tcase 12879:\n\t\tcase 12881:\n\t\tcase 12883:\n\t\tcase 12789:// clue box\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public ShoppingCart() {\n\t\t_items = new ArrayList<Product>();\n\t}", "@SideOnly(Side.CLIENT)\n/* 34: */ public void getSubItems(Item itemId, CreativeTabs table, List list)\n/* 35: */ {\n/* 36:35 */ for (int i = 0; i < 13; i++)\n/* 37: */ {\n/* 38:36 */ ItemStack is = new ItemStack(itemId);\n/* 39:37 */ is.stackTagCompound = new NBTTagCompound();\n/* 40:38 */ is.stackTagCompound.setShort(\"Shield\", (short)i);\n/* 41:39 */ list.add(is);\n/* 42: */ }\n/* 43: */ }", "void addList(ShoppingList _ShoppingList);", "public void popItems() {\n\t\t\n\t\tItemList.add(HPup);\n\t\tItemList.add(SHPup);\n\t\tItemList.add(DMGup);\n\t\tItemList.add(SDMGup);\n\t\tItemList.add(EVup);\n\t\tItemList.add(SEVup);\n\t\t\n\t\trandomDrops.add(HPup);\n\t\trandomDrops.add(SHPup);\n\t\trandomDrops.add(DMGup);\n\t\trandomDrops.add(SDMGup);\n\t\trandomDrops.add(EVup);\n\t\trandomDrops.add(SEVup);\n\t\t\n\t\tcombatDrops.add(SHPup);\n\t\tcombatDrops.add(SDMGup);\n\t\tcombatDrops.add(SEVup);\n\t}", "@RequestMapping(method = RequestMethod.GET,value = \"/\")\n public String HomePage(Model model, HttpSession session){\n model.addAttribute(\"listBook\",bookService.books());\n\n ShoppingCart shoppingCart = (ShoppingCart) session.getAttribute(\"list-order\");\n\n if (shoppingCart != null){\n\n Set<CartItem> listCartItem = new HashSet<>();\n for (Long hashMapKey:shoppingCart.getItems().keySet()\n ) {\n CartItem cartItem = shoppingCart.getItems().get(hashMapKey);\n listCartItem.add(cartItem);\n System.out.println(\"quantity : \" + cartItem.getQuantity());\n System.out.println(\"size list cart : \" + listCartItem.size());\n }\n model.addAttribute(\"listCartItem\",listCartItem);\n }\n\n\n return \"homePage\";\n }", "public void buyItem() {\n List<Gnome> cart = user.getCart();\n String message = \"\";\n List<Gnome> bought = shopFacade.buyGnomes(cart);\n if (!bought.isEmpty()) {\n message = bought.size() + \" items bought\";\n } else {\n message = \"Could not buy any items\";\n }\n userFacade.assignBought(user, bought);\n user.getCart().removeAll(bought);\n cart.removeAll(bought);\n userFacade.setCartToUser(user.getUsername(), cart);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Gnomes\", message);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n }", "private static ArrayList<String> loadShop(File file) {\n System.out.println(\"Loading shop \" + file.getName() + \"...\");\n\n ArrayList<String> temp = new ArrayList<>();\n\n try {\n //load file into a list of strings\n String lineRead;\n ArrayList<String> lines = new ArrayList<>();\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(\"./plugins/SkyblockShop/\" + file.getName()), \"UTF-8\"));\n while ((lineRead = bufferedReader.readLine()) != null) {\n lines.add(ChatColor.translateAlternateColorCodes('&', lineRead));\n }\n bufferedReader.close();\n\n //set what number the list is on for counting\n int itemNum = -1;\n\n //parse list of strings\n for (String line : lines) {\n //split line into args\n String[] args = line.trim().split(\":\");\n\n //check validity\n if (args.length == 2) {\n //switch for line\n switch(args[0].toUpperCase()) {\n case(\"ITEM\"):\n //move to next item and start adding it\n itemNum++;\n temp.add(args[1]);\n break;\n case(\"NAME\"):\n case(\"CATEGORY\"):\n case(\"SLOT\"):\n case(\"ACTION\"):\n case(\"VALUE\"):\n //add to current item\n temp.set(itemNum, temp.get(itemNum) + \"->\" + args[1]);\n break;\n default:\n break;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"Something went wrong while reading the file!\");\n }\n\n return temp;\n }", "public void setArrayListOfItemsToBeDeletedViaNotificationModal() {\n List<WebElement> itemsToBeRemoved = UnavailableItems_Modal.findElements(By.xpath(\".//*[@class='mjr-product-name']\"));\n for (WebElement item : itemsToBeRemoved) {\n listOfDeletedItemNameShoppingCart.add(UtilityHelper.elementGetText(item));\n }\n }", "private void populateItems() {\n \t try {\n \t File myObj = new File(\"items.txt\");\n \t Scanner myReader = new Scanner(myObj);\n \t while (myReader.hasNextLine()) {\n\t \t String data = myReader.nextLine();\n\t \t String[] variables = data.split(\",\");\n\t \t int price = (int) Math.floor(Math.random() * 100); \n\t \t \n\t \t itemList += variables[0] + \",\"+ variables[1] +\",\" + \"0\" + \", \"+ \",\"+price + \",\";\n\t \t Item x = new Item(variables[0], 0, \"\", price, variables[1]);\n\t \t items.add(x);\n \t }\n \t myReader.close();\n \t } catch (FileNotFoundException e) {\n \t System.out.println(\"An error occurred.\");\n \t e.printStackTrace();\n \t }\n\t\t\n\t}", "private void basketData() {\n basketViewModel.setBasketListObj(selectedShopId);\n basketViewModel.getAllBasketList().observe(this, resourse -> {\n if (resourse != null) {\n basketViewModel.basketCount = resourse.size();\n if (resourse.size() > 0) {\n setBasketMenuItemVisible(true);\n } else {\n setBasketMenuItemVisible(false);\n }\n }\n });\n }", "@Override\r\n\t\t\tpublic void itemClick(ItemClickEvent event) {\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"buscar Objects\");\r\n\t\t\t\tidPack = (int) event.getItem().getItemProperty(\"IdPack\").getValue();\r\n\t\t\t\tbuscaObjectsByPacks((int) event.getItem().getItemProperty(\"IdPack\").getValue());\r\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }", "public void add_to_my_list_process(View v) {\n\n addToCart_flag = false;\n // get current login value saved in sharedpreferences object\n SharedPreferences loginSharedPref = getSharedPreferences(\"LoginData\", MODE_PRIVATE);\n // get current agent id\n final String AgentID = loginSharedPref.getString(\"ID\", \"\");\n // create string\n create_final_string_product();\n /* get all list names into arraylist object */\n ArrayList<String> listNames = get_list_data_from_local_DB(AgentID);\n // display alert box to choose list name by user\n display_list_names(listNames, AgentID);\n // clear all data after adding product into cart\n clear_data();\n }", "private void equipButtonClicked(final ShopItem shopItem) {\n shopItem.setState(ItemStatusID.EQUIPPED);\n if (shopItem instanceof Shovel) {\n for (Shovel shovel : SHOVELS) {\n if (shovel.equals(shopItem)) {\n continue;\n } else if (shovel.getState() == ItemStatusID.EQUIPPED) {\n shovel.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n } else if (shopItem instanceof Background) {\n for (Background background : BACKGROUNDS) {\n if (background.equals(shopItem)) {\n continue;\n } else if (background.getState() == ItemStatusID.EQUIPPED) {\n background.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n }\n updateUI();\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "@Override\n protected void customize(final UserAgentBuilder builder) {\n List<Product> products = request.getProducts();\n if (products != null) {\n for (Product product : products) {\n builder.product(product);\n }\n }\n }", "private void loadGroceryCursor(ArrayList<String> items) {\n groceryCursor = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items);\n groceryList.setAdapter(groceryCursor);\n }", "public String navigatePurchaseorderheaderList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Purchaseorderheader_items\", this.getSelected().getPurchaseorderheaderList());\n }\n return \"/purchaseorderheader/index\";\n }", "private void addNameToShoppingCartPgeArrayList(String productName) {\n productName = productName.replace(\"?\", \"\");\n productName = productName.replace(\"®\", \"\");\n productName = productName.replace(\"™\", \"\");\n listOfShoppingCardItem.add(productName);\n }", "public ShoppingListItem(String product, String amount) {\r\n this.product = product;\r\n this.amount = amount;\r\n }", "public RecyclerViewProductos( List<Producto> lista) {\n this.productoList=lista;\n }", "public void setItems(ItemList items) {\r\n this.items = items;\r\n }", "@Override\n\tpublic void addItems(Workspace workspace) {\n//\t\tSession currentSession = sessionFactory.getCurrentSession();\n//\t\tfor(Cart_items myCart : workspace.getCartItems()) {\t\n//\t\t\tcurrentSession.save(myCart);\n//\t\t}\n\t}", "public String getItems(String name){\n return \"\";\n }", "Items(){\r\n\t\tname=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//Parts to the vaccine[1-3]\r\n\t\t\t\t\"Mysterious Vial\", \"Piece of alien meteorite\",\"Alien X\",\r\n\t\t\t\t//Keys[4-6]\r\n\t\t\t\t\"Mysterious Key\",\"Office Key\",\"Captian's Key\",\r\n\t\t\t\t//suit[7,8]\r\n\t\t\t\t\"Hazmat Suit\",\"Gas Mask\",\r\n\t\t\t\t//vials[9-11]\r\n\t\t\t\t\"Blue Vial\",\"Pink Vial\", \"Gold Vial\",\r\n\t\t\t\t//other[12,13]\r\n\t\t\t\t\"X Files\", \"Demon's Bane Flower\",\"Reinforced Armor\"\r\n\t\t};\r\n\t\tdescription=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//vaccine parts[2-4]\r\n\t\t\t\t\"A special vial coated with a mysterious substance\",\r\n\t\t\t\t\"Part of an alien meteorite that the crew excavated\",\r\n\t\t\t\t\"A powerful allergen that instantly kills one’s immune system and their whole well-being, mutating them into something inhuman\",\r\n\t\t\t\t//keys\r\n\t\t\t\t\"A metal key that must open a door\",\r\n\t\t\t\t\"Looks like a normal key\",\r\n\t\t\t\t\"A metal key used to unlock something\",\r\n\t\t\t\t//Suit\r\n\t\t\t\t\"A full-body suit designed to keep harmful toxins away from the wearer. The face mask is missing, however\",\r\n\t\t\t\t\"A mask that goes over the wearer’s head and filters out all harmful substances in the air\",\r\n\t\t\t\t//Vials\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows light blue\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows bright pink\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows golden yellow\",\r\n\t\t\t\t//other\r\n\t\t\t\t\"Recorded documentation of all experiments and research done while in space. Most importantly it contains reports on events leading up to the virus spreading throughout the ship\",\r\n\t\t\t\t\"A beautiful flower that seems to survive unattached to the ground, the veins running through its petals give a faint glow as a heavenly scent fills the room\",\r\n\t\t\t\t\"A set of fine leather armor with metal plates reinforcing vulnerable areas\"\r\n\t\t};\r\n\t}", "public List<Item> getItemList();", "public void add_item_button(View v){\n if(expiry_date==0){ //if no expiry date was chosen,\n if(product_name.equals(\"Milk\")){//and if the product is milk, \n expiry_date=7; //set it to the default of 7 days until expiry\n }else{//If the product is bread,\n expiry_date=3;//set it to the default of 7 days until expiry\n }\n }\n Product added_p=new Product(product_name,expiry_date); //added_p : product chosen by the user that they currently own\n added_list.add(added_p); //this product is added to the list \n text=(TextView) findViewById(R.id.added_list);\n String content=\"\";\n for(Product p:added_list){\n content=content+(p.getProduct_name()+\" \"+p.getProduct_exp()+\" days \\n\"); //then displayed to show the user \n }\n text.setText(content);\n }", "Items(int quantidade,Produto produto){\n\t\tqntd = quantidade;\n\t\tthis.produto = produto;\n\t\t\n\t}", "@Override\n public void takeOrder(List<Item> restItem, int constID) {\n\n }", "public void process(Page page) {\n \n \tpage.putField(\"title\", page.getHtml().xpath(\"//h1[@id='title']/span[@id='productTitle']/text()\").toString());\n if (page.getResultItems().get(\"title\")==null){\n //skip this page\n page.setSkip(true);\n }\n \n page.putField(\"style\", page.getHtml().xpath(\"//div[@id='variation_style_name']/div[@class='a-row']/span[@class='selection']/text()\"));\n page.putField(\"size\", page.getHtml().xpath(\"//div[@id='variation_size_name']/div[@class='a-row']/span[@class='selection']/text()\"));\n page.putField(\"color\", page.getHtml().xpath(\"//div[@id='variation_color_name']/div[@class='a-row']/span[@class='selection']/text()\"));\n \n page.putField(\"price\", page.getHtml().xpath(\"//span[@id='priceblock_ourprice']/text()\"));\n \n resultItems = page.getResultItems();\n System.out.println(page.getResultItems().toString());\n }", "public void setItems(Item items) {\n this.items = items;\n }", "protected void enhanceGoodsShelfList(SmartList<GoodsShelf> goodsShelfList,Map<String,Object> options){\n\t}", "public List<ItemDTO> getItems()\n\t{\t\n\t\tList<ItemDTO> itemsList = new ArrayList<>();\n\t\tfor (ItemData item : items) \n\t\t\titemsList.add(new ItemDTO(item.idItem,item.description,item.price,item.VAT,item.quantitySold));\t\n\t\treturn itemsList;\n\t}", "public void shuffleItems() {\n LoadProducts(idCategory);\n }", "@Override\n public void onClick(View v)\n {\n Card.addtoCard(new CardItem(content.get(position).getName(),\n content.get(position).getDescription(),\n content.get(position).getPrice(),(long) 1,\"None\",\n content.get(position).getPrice()));\n Toast.makeText(RecycleViewAdapter.this.mContext,\"Added to Cart\",Toast.LENGTH_LONG).show();\n }", "private static List<Item> getItems() {\n\t\treturn items;\n\t}", "public ArrayList<ItemModel> getAllProducts() {\n ArrayList<ItemModel> products = new ArrayList<ItemModel>();\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_SHOPPINGLIST, null);\n\n c.moveToFirst();\n Log.d(DatabaseHelper.class.getName(), \"getAllProducts:\");\n\n while (!c.isAfterLast()) {\n String product = String.valueOf(c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_PID)));\n String quantity=String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.SHOPPINGLIST_QUANTITY)));\n String unit = String.valueOf(c.getString(c.getColumnIndex(DBHelper.SHOPPINGLIST_UNIT)));\n int che = c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_CHECKMARK));\n boolean check;\n if (che==0) {check=Boolean.FALSE;} else {check = Boolean.TRUE;}\n\n ItemModel model = new ItemModel(product, quantity, unit, check);\n products.add(model);\n\n\n c.moveToNext();\n }\n\n db.close();\n\n for (ItemModel ph: products) {\n ph.setProduct(getNameByPID(Integer.parseInt(ph.getProductName())));\n Log.d(DatabaseHelper.class.getName(), \"\\tgetAllProducts:\" + ph.toString());\n }\n\n return products;\n }", "public static void putCraftableItemInArrayList() {\n\n craftableItem.addItemToCraftableList(campfire);\n craftableItem.addItemToCraftableList(raft);\n craftableItem.addItemToCraftableList(axe);\n craftableItem.addItemToCraftableList(spear);\n }", "@Override\n public void mostrarListadoEquipos(List<Equipo> equipos) {\n\n }", "public ItemMenu(JDealsController sysCtrl) {\n super(\"Item Menu\", sysCtrl);\n\n this.addItem(\"Add general good\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.GOODS);\n }\n });\n this.addItem(\"Restourant Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.RESTOURANT);\n }\n });\n this.addItem(\"Travel Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.TRAVEL);\n }\n });\n }", "private void populateItems (ObservableList<Item> itemList) throws ClassNotFoundException {\n\t\ttblResult.setItems(itemList);\n\t}", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }" ]
[ "0.63110787", "0.6110588", "0.6088371", "0.59605247", "0.59329116", "0.58467764", "0.57491434", "0.57419664", "0.5712112", "0.5707184", "0.5688548", "0.56798124", "0.5672227", "0.5663048", "0.565338", "0.56528485", "0.56219876", "0.5615666", "0.5614693", "0.5613463", "0.5612224", "0.55884916", "0.5586612", "0.55853707", "0.5584031", "0.55784905", "0.55757034", "0.55700964", "0.5570036", "0.55662966", "0.55608433", "0.555945", "0.555453", "0.5542818", "0.5540232", "0.5538066", "0.55272484", "0.55136025", "0.5509027", "0.55004954", "0.5497945", "0.5493127", "0.5487002", "0.5483602", "0.5475917", "0.5474797", "0.54733735", "0.5457058", "0.5455283", "0.5453964", "0.5431891", "0.5422412", "0.5403972", "0.54014736", "0.539996", "0.53887075", "0.53872156", "0.53809816", "0.5380538", "0.5372907", "0.53695357", "0.53632265", "0.5362546", "0.5354947", "0.5346188", "0.5341195", "0.53409594", "0.5337022", "0.53365296", "0.53351045", "0.53273934", "0.532535", "0.5316666", "0.5316545", "0.53041077", "0.5300157", "0.5292696", "0.5291894", "0.5286598", "0.5283891", "0.5268229", "0.5265996", "0.5260834", "0.5260659", "0.5259856", "0.5257532", "0.52546763", "0.52540505", "0.5248941", "0.5246513", "0.52408355", "0.5237364", "0.5236905", "0.5235513", "0.52286035", "0.522842", "0.52269745", "0.52263135", "0.5224447", "0.5223125", "0.5221686" ]
0.0
-1
Hide the refresh after 2sec
@Override public void run() { BookInfo.this.runOnUiThread(new Runnable() { @Override public void run() { mSwipyRefreshLayout.setRefreshing(false); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void toggleRefresh() {\n if (mProgressBar.getVisibility() == View.INVISIBLE) {\n mProgressBar.setVisibility(View.VISIBLE);\n mRefreshImageView.setVisibility(View.INVISIBLE);\n } else {\n mProgressBar.setVisibility(View.INVISIBLE);\n mRefreshImageView.setVisibility(View.VISIBLE);\n }\n }", "@Override\n\tpublic void refresh() {\n\t\thandler.postDelayed(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\trefreshListView.stopRefresh();\n\t\t\t}\n\t\t}, 2000);\n\t\t\n\t}", "public void hideIn1() {\r\n\t\thideTimer.schedule(500);\r\n\t}", "@Override\n public void onRefresh(PullRefreshLayout pullRefreshLayout) {\n pullRefreshLayout.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n refreshLayout.finishRefresh();\n }\n }, 2000);\n }", "private void delayedHide(int delayMillis) {\n\n }", "public void stopRefresh() {\n\t\twaitRefresh = false;\n\t\trefreshing = false;\n\t\tpullRefresh = true;\n\t}", "@Override\n\tpublic long updateDisplay() {\n\t\treturn AppStatus.NO_REFRESH;\n\t}", "@Override\n public void showLoading() {\n setRefresh(true);\n }", "private void doTheAutoRefresh() {\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n setDatatoList();\n }\n }, 120000);\n }", "abstract protected void refresh(long time);", "private void stopRefresh(){\n if(mPullRefreshing==true){\n mPullRefreshing=false;\n resetHeaderHeight();\n }\n }", "@Override\n public void onShowRefresh(boolean notUsed) {\n // nothing required for this assignment.\n }", "public void showTimer(){\n mTimerProgressBar.setVisibility(View.VISIBLE);\n mTimerText.setVisibility(View.VISIBLE);\n }", "public void setNewRefreshTime(int refreshTime){\n resetTimer(refreshTime);\n }", "private void SetRefreshUI(boolean isRefreshing){\n swipeRefreshLayout.setRefreshing(isRefreshing);\n\n if(!isRefreshing)\n return;\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n swipeRefreshLayout.setRefreshing(false);\n }\n }, 1000*15);\n }", "protected void refresh()\n {\n refresh(System.currentTimeMillis());\n }", "public void hideAnswerResult(boolean refresh) {\n imgCenter.setVisible(false);\n imgCenter.invalidate();\n\n labelAnswerResult.setText(\"\");\n labelClarification.setText(\"\");\n\n buttonDismiss.setVisible(false);\n buttonOptionA.setEnabled(true);\n buttonOptionB.setEnabled(true);\n buttonOptionBoth.setEnabled(true);\n buttonDismiss.setEnabled(true);\n\n if (timerAnswer != null) {\n timerAnswer.stop();\n timerAnswer = null;\n }\n \n if (refresh)\n refreshGame();\n }", "void hideNextEventsLoadingWheel();", "@Override\r\n\t\t\t\t\tpublic boolean isRefreshNeeded() {\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic boolean isRefreshNeeded() {\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}", "@Override\r\n\t\tpublic void run() {\n\t\t\twhile((second--)!=1) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\tPlatform.runLater(new Runnable() {\r\n\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t public void run() {\r\n\t\t\t\t\t\t\t SetTime();\r\n\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} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsubmitbtn.setDisable(true);\r\n\t\t\tbackbtn.setDisable(false);\r\n\t\t\t}", "@Override\r\n\t\tpublic boolean isRefreshNeeded() {\n\t\t\treturn false;\r\n\t\t}", "@Override\r\n\t\tpublic boolean isRefreshNeeded() {\n\t\t\treturn false;\r\n\t\t}", "public void stopRefreshing() {\n if (null != this.renewal) {\n this.renewal.cancel(true);\n }\n }", "@Override\n\tpublic void load() {\n\t\thandler.postDelayed(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\trefreshListView.stopLoad();\n\t\t\t}\n\t\t}, 2000);\n\t}", "private void reactMain_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm() {\n\t\tif (sCIButtons.topLeftPressed) {\n\t\t\tswitch (stateVector[1]) {\n\t\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm :\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm :\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttimer.setTimer(this, 3, 250, false);\n\n\t\t\tsCIDisplay.operationCallback.refreshChronoDisplay();\n\n\t\t\tsCILogicUnit.operationCallback.getChrono();\n\n\t\t\tnextStateIndex = 1;\n\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingChrono;\n\t\t} else {\n\t\t\tif (sCIButtons.bottomLeftPressed) {\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\ttimer.unsetTimer(this, 2);\n\n\t\t\t\ttimer.setTimer(this, 1, 1 * 1000, false);\n\n\t\t\t\tsCIDisplay.operationCallback.refreshTimeDisplay();\n\n\t\t\t\tsCIDisplay.operationCallback.refreshDateDisplay();\n\n\t\t\t\tsCIDisplay.operationCallback.refreshAlarmDisplay();\n\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm;\n\t\t\t} else {\n\t\t\t\tif (timeEvents[2]) {\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 2);\n\n\t\t\t\t\ttimer.setTimer(this, 2, 1 * 1000, false);\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshTimeDisplay();\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshDateDisplay();\n\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void showTimeOutWarning(){\n\t\t clearTimeOutWarning();\n\t\t warningBannerWidget = new HTML(\"Warning! Your session is about to expire at \" + formattedTime +\n\t\t\t\t \". Please click on the screen or press any key to continue. Unsaved changes will not be retained if the session is allowed to time out.\");\n\t\t RootPanel.get(\"timeOutWarning\").add(buildTimeOutWarningPanel());\n\t\t RootPanel.get(\"timeOutWarning\").getElement().setAttribute(\"role\", \"alert\");\n\t\t RootPanel.get(\"timeOutWarning\").getElement().focus();\n\t\t RootPanel.get(\"timeOutWarning\").getElement().setTabIndex(0);\n\t}", "protected void showNotify () {\n if (timer != null) {\n timer.cancel ();\n }\n\n timer = new Timer ();\n timer.schedule (new updateTask (), 500, 500);\n cityMap.addMapListener (this);\n }", "private void closeNetworkCacheCardView() {\r\n try {\r\n Thread.sleep(1200);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n networkCacheCardView.setVisibility(View.GONE);\r\n }\r\n });\r\n\r\n }", "@Override\n\tpublic void onRefresh() {\n\t\trequestTime = 1;\n\t\trefreshFromServer(ListViewCompat.REFRESH);\n\t}", "@Override\n public void onStopRefresh() {\n Log.d(SampleExtensionService.LOG_TAG, \"stopRefesh\");\n\n // Cancel pending clock updates\n cancelScheduledRefresh(SampleExtensionService.EXTENSION_KEY);\n }", "private void showPaySuccessCardView() {\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n paySuccessCardView.setVisibility(View.VISIBLE);\r\n }\r\n });\r\n try {\r\n Thread.sleep(1200);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n paySuccessCardView.setVisibility(View.GONE);\r\n }\r\n });\r\n\r\n }", "public void onStop() {\n this.mIsShowing.set(false);\n RefreshTask refreshTask = this.mRefreshTask;\n if (refreshTask != null) {\n refreshTask.cancel(true);\n this.mRefreshTask = null;\n }\n NetworkDiagnosticsActivity.super.onStop();\n }", "void hidePreviousEventsLoadingWheel();", "public Boolean getAutoRefresh();", "private void updateRefreshTime(){\n\t\t\trefreshLabel.setText(\"Last Updated: \" + (new Date()).toString());\n\t\t}", "long lastAutomaticRefresh();", "public void displayLoadingWindowServerDown()\r\n\t{\r\n\t\tloadingWindow.hideLoadingBar();\r\n\t\tloadingWindow.setDescription(\"The HVMK server is down. Please try again later.\");\r\n\t}", "private void autoSrocllRefreshView() {\n\t\tString cityName = cityWeatherPreferences.getString(\"cityweathername\",\n\t\t\t\tnull);\n\t\ttry {\n\t\t\tif (cityName != null) {\n\t\t\t\tString cityId = cityIdPreferences.getString(cityName, null);\n\t\t\t\tcityTv.setText(cityName.substring(cityName.indexOf(\"-\") + 1));\n\t\t\t\tif(OpenNetWork.getConn()){\n\t\t\t\t\tParameters params = new Parameters();\n\t\t\t\t\tparams.add(\"cityname\", cityId);\n\t\t\t\t\tparams.add(\"dtype\", \"json\");\n\t\t\t\t\tJuHeRequest.getJuHeData(params, getActivity(), 73,\n\t\t\t\t\t\t\t\"http://op.juhe.cn/onebox/weather/query\", JuheData.GET,\n\t\t\t\t\t\t\thandler, 0);\n\t\t\t\t}else{\t\n\t\t\t\t\trefreshList();\n\t\t\t\t\tToast.makeText(getActivity(), \"数据加载失败,请检查网络!!!\", 500).show();\n\n\t\t\t\t}\n\t\t\t\tisAutoRefresh=false;\n\t\t\t} else {\n\t\t\t\tIntent intent = new Intent(getActivity(),\n\t\t\t\t\t\tCitySearchLocationActivity.class);\n\t\t\t\tintent.putExtra(\"cityclass\", 1);\n\t\t\t\tgetActivity().startActivity(intent);\n\t\t\t}\n\t\t\tweatherPrs.postDelayed(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tweatherPrs.onRefreshComplete();\n\t\t }\n\t\t }, 1000);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void hideStatsButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_STATS_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "private void refreshContent() {\n\n mSwipeRefreshLayout.setRefreshing(false);\n }", "@Override\n\tpublic void hide() {\n\t\tmDismissed = true;\n\t\tremoveShowCallback();\n\t\tlong diff = System.currentTimeMillis() - mStartTime;\n\t\tif (diff >= mShowTime || mStartTime == -1) {\n\t\t\t// The progress spinner has been shown long enough\n\t\t\t// OR was not shown yet. If it wasn't shown yet,\n\t\t\t// it will just never be shown.\n\t\t\tsuper.hide();\n\t\t} else {\n\t\t\t// The progress spinner is shown, but not long enough,\n\t\t\t// so put a delayed message in to hide it when its been\n\t\t\t// shown long enough.\n\t\t\tif (!mPostedHide) {\n\t\t\t\tpostDelayed(mDelayedHide, mShowTime - diff);\n\t\t\t\tmPostedHide = true;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onRefresh() {\n listView.setOnItemClickListener(null);\n getActivity().setProgressBarIndeterminateVisibility(true);\n Log.i(TAG,\"Refresh Call\");\n //fetchMovies();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Log.i(TAG,\"Fetch Movie Call\");\n swipeRefreshLayout.setRefreshing(false);\n fetchMovies();\n int index = listView.getFirstVisiblePosition();\n View v = listView.getChildAt(0);\n int top = (v == null) ? 0 : v.getTop();\n listView.setSelectionFromTop(index, top);\n }\n }, 2000);\n }", "@Override\n public void run() {\n refreshLayout.finishRefresh();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\trefreshListView.stopRefresh();\n\t\t\t}", "@Override\n public void onRefresh() {\n if(!swipeRefreshLayout.isRefreshing()){\n swipeRefreshLayout.setRefreshing(true);\n }\n progressBar.setVisibility(View.GONE);\n listView.setVisibility(View.GONE);\n loadNotifications();\n }", "@Override\n public void run() {\n binding.swipeRefresh.setRefreshing(false);\n }", "private void timerMethod() {\n getActivity().runOnUiThread(refreshListView);\n }", "public void teleopPeriodic() {\n driverScreen.updateLCD();\n }", "public void refresh(int milliseconds){\n final Handler handler = new Handler();\n\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n getUserProfile();\n }\n };\n handler.postDelayed(runnable, milliseconds);\n }", "private void onSearchLoadTimeout() {\n ViewGroup root = (ViewGroup) getView();\n Activity host = getActivity();\n if (root != null && host != null) {\n mListPanel.setVisibility(View.GONE);\n mWarningContainer = (ViewGroup) LayoutInflater.from(host).inflate(\n R.layout.message_list_warning, root, false);\n TextView title = UiUtilities.getView(mWarningContainer, R.id.message_title);\n TextView message = UiUtilities.getView(mWarningContainer, R.id.message_warning);\n title.setText(R.string.search_slow_warning_title);\n message.setText(R.string.search_slow_warning_message);\n root.addView(mWarningContainer);\n }\n }", "protected boolean provideRefresh() {\n return false;\n }", "@Override\r\n public void onRefresh(final PullToRefreshLayout pullToRefreshLayout) {\n pullToRefreshLayout.postDelayed(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n pullToRefreshLayout.refreshFinish(PullToRefreshLayout.SUCCEED);\r\n Toast.makeText(RefreshScrolloListViewActivity.this,\"上拉刷新成功\",Toast.LENGTH_SHORT).show();\r\n }\r\n }, 2000);\r\n }", "public void transitionToTimer(boolean isShow) {\n }", "void refresh();", "void refresh();", "void refresh();", "void refresh();", "void refresh();", "void onRefresh() {\n\t}", "public void UI_Refresh ()\r\n\t{\r\n\t\tUI_RefreshSensorData ();\r\n\t\tUI_RefreshConnStatus ();\r\n\t}", "@Override\n public void onRefresh() {\n requestSoal();\n swipeRefreshLayout.setRefreshing(false);\n }", "protected void hideNotify () {\n if (timer != null) {\n timer.cancel ();\n timer = null;\n }\n\n cityMap.removeMapListener (this);\n }", "private void hideLoading()\n {\n relLoadingPanel.setVisibility(View.GONE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, true);\n }", "private void refresh() {\n\t\t\tRunnable run = new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(table.isDisposed())return;\n\t\t\t\t\tviewer.refresh();\n\t\t\t\t}\t\t\t\n\t\t\t};\n\t\t\tDisplay.getDefault().asyncExec(run);\n\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t\tMascota.set_desinfectar();\r\n\t\t\t\tmostrar_vida.setText(Mascota.get_vida() + \" %\");\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\r\n\t\t\t\t\teti_actividad.setText(\"Grrr...grrrr...Hijos de puta!\");\r\n\t\t\t\t\teti_actividad.setVisible(true);\r\n\t\t\t\t\tThread.sleep(6000);\r\n\t\t\t\t\teti_actividad.setVisible(false);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "public void showUnready();", "public void refreshNet(View view) {\n ll.setVisibility(View.GONE);\n getMovies();\n }", "private void reactMain_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm() {\n\t\tif (sCIButtons.topLeftPressed) {\n\t\t\tswitch (stateVector[1]) {\n\t\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm :\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm :\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttimer.setTimer(this, 3, 250, false);\n\n\t\t\tsCIDisplay.operationCallback.refreshChronoDisplay();\n\n\t\t\tsCILogicUnit.operationCallback.getChrono();\n\n\t\t\tnextStateIndex = 1;\n\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingChrono;\n\t\t} else {\n\t\t\tif (sCIButtons.bottomLeftPressed) {\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\ttimer.unsetTimer(this, 1);\n\n\t\t\t\ttimer.setTimer(this, 2, 1 * 1000, false);\n\n\t\t\t\tsCIDisplay.operationCallback.refreshTimeDisplay();\n\n\t\t\t\tsCIDisplay.operationCallback.refreshDateDisplay();\n\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm;\n\t\t\t} else {\n\t\t\t\tif (timeEvents[1]) {\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 1);\n\n\t\t\t\t\ttimer.setTimer(this, 1, 1 * 1000, false);\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshTimeDisplay();\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshDateDisplay();\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshAlarmDisplay();\n\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void changeToReleaseRefresh() {\n\n\t}", "protected void speedRefresh() {\r\n\t\t\ttStartTime = System.currentTimeMillis();\r\n\t\t\ttDownloaded = 0;\r\n\t\t}", "public void infoProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.GONE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }", "public void Refresh()\n\t{\n\t}", "@Override\n\tpublic synchronized void onRefresh() {\n\t\ttry {\n\t\t\t// 此处可取当前时间,为刷新时间\n\t\t\tcurDate = new Date(System.currentTimeMillis());\n\t\t\tsdf = new SimpleDateFormat(\"MM-dd HH:mm\");\n\t\t\tif (System.currentTimeMillis() - time > 500) {\n\t\t\t\tURL = URL.substring(0, URL.lastIndexOf(\"_\") + 1);\n\t\t\t\tURL = URL + \"1.xml\";\n\t\t\t\tif (lsnb != null) {\n\t\t\t\t\tlsnb_temp.addAll(lsnb);\n\t\t\t\t\tlsnb = null;\n\t\t\t\t}\n\n\t\t\t\tnew AsyncLoadNews(lsnb, URL).execute();\n\t\t\t} else {\n\t\t\t\tToast toast = Toast.makeText(getActivity(), \"目前是最新数据!\",\n\t\t\t\t\t\tToast.LENGTH_LONG);\n\t\t\t\t// toast.getView().setBackgroundResource(R.drawable.red_toast_bg);\n\t\t\t\ttoast.getView().setPadding(20, 10, 20, 10);\n\t\t\t\ttoast.show();\n\t\t\t\tonLoadStop();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void run() {\n swipeLayout.setRefreshing(false);\n }", "@Override\n\tpublic void onRefresh() {\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.getDefault());\t\t\n\t\tmAdapterView.setRefreshTime(sdf.format(new Date()));\n\t\tmAdapterView.stopRefresh();\n\t\tFindHttpPost();\n\t\tpage = 1;\n\t\t\n\t\tif(mLocationClient.isStarted()){\n\t\t\tmLocationClient.stop();\n\t\t}else{\n\t\t\tmLocationClient.start();\n\t\t\tmLocationClient.requestLocation();\n\t\t}\n\t}", "public void redisplay();", "void hideMainLoadingWheel();", "public void hideMessageDelay() {\n if(System.currentTimeMillis() - lastChanceToKick > 1000) {\n Log.d(\"Time\", \"\" + (System.currentTimeMillis() - lastChanceToKick));\n displayed_message = \"\";\n }\n }", "public void f_restart() {\n\n result.setVisibility(View.GONE);\n request_button_content.setVisibility(View.VISIBLE);\n\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n pulsator_left.setVisibility(View.VISIBLE);\n pulsator_up.setVisibility(View.VISIBLE);\n pulsator_right.setVisibility(View.VISIBLE);\n\n visible = false;\n TransitionSet set_request = new TransitionSet()\n .addTransition(new Scale(0.7f))\n .addTransition(new Fade())\n .setInterpolator(visible ? new LinearOutSlowInInterpolator() :\n new FastOutLinearInInterpolator());\n\n TransitionManager.beginDelayedTransition(request_button_content, set_request);\n btnClick.setVisibility(visible ? View.GONE : View.VISIBLE);\n }\n }, 250);\n }", "@Override\n public void run() {\n refreshLayout.finishLoadMore(true);\n }", "private void hideLoadingAndUpdate() {\n image.setVisibility(View.VISIBLE);\n loadingBar.setVisibility(View.INVISIBLE);\n shareBtn.setVisibility(shareBtnVisibility);\n\n }", "public void hide() {\n hidden = true;\n }", "@Override\n public void hide() {\n mHandler.post(mHide);\n }", "@Override\n public void run() {\n swipeView.setRefreshing(false);\n //refresh();\n }", "@Override\r\n\tpublic void onRefresh() {\n\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\trefreshListView.stopLoad();\n\t\t\t}", "@Override\n public void hiddenLoading() {\n Log.i(Tag, \"hiddenLoading\");\n }", "public void refresh() {\n \t\n /* Attach a rotating ImageView to the refresh item as an ActionView */\n LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n ImageView iv = (ImageView) inflater.inflate(R.layout.refresh_action_view, null);\n\n Animation rotation = AnimationUtils.loadAnimation(mContext, R.anim.clockwise_refresh);\n rotation.setRepeatCount(Animation.INFINITE);\n iv.startAnimation(rotation);\n\n mSGV.setVisibility(View.INVISIBLE);\n mProgress.setVisibility(View.VISIBLE);\n \n mRefreshItem.setActionView(iv);\n refreshGoodsItems();\n \n }", "@Override\n\t\tpublic synchronized void onRefresh() {\n\t\t\ttry {\n\t\t\t\t//此处可取当前时间,为刷新时间\n\t\t\t\tcurDate = new Date(System.currentTimeMillis());\n\t\t\t\tsdf = new SimpleDateFormat(\"MM-dd HH:mm\");\n\t\t\t\tif(System.currentTimeMillis()-time>500){\n\t\t\t\t\tURL = URL.substring(0, URL.lastIndexOf(\"_\")+1);\n\t\t\t\t\tURL = URL+\"1.xml\";\n\t\t\t\t\tif(lsnb != null){\n\t\t\t\t\t\tlsnb_temp.addAll(lsnb);\n\t\t\t\t\t\tlsnb = null;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tnew AsyncLoadNews(flag,lsnb,URL).execute();\n\t\t\t\t}else{\n\t\t\t\t\tToast toast = Toast.makeText(getActivity(), \"目前是最新数据!\", Toast.LENGTH_LONG);\n//\t\t\t\t\ttoast.getView().setBackgroundResource(R.drawable.red_toast_bg);\n\t\t\t\t\ttoast.getView().setPadding(20, 10, 20, 10);\n\t\t\t\t\ttoast.show();\n\t\t\t\t\tonLoadStop();\n\t\t\t\t}\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\t\n\t\t}", "@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 }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "public void onRefresh() {\n }", "@Override\n public void onRefresh() {\n mSwipeRefreshLayout.setRefreshing(false);\n }", "@Override\n public void run() {\n mZoomSeekBar.setVisibility(View.GONE);\n }", "public void refresh() {\n }", "@Override\n public void onRefresh() {\n }", "@Override\n public void onRefresh() {\n mSwipeRefreshLayout.setRefreshing(false);\n\n }", "@Override\n public boolean onRefresh(MotionEvent ev) {\n return false;\n }", "@Override\n public void periodic() {\n UpdateDashboard();\n }" ]
[ "0.6889476", "0.6877883", "0.6804392", "0.67299837", "0.6435388", "0.6314349", "0.6298261", "0.62781507", "0.62390375", "0.62311786", "0.61133265", "0.6097762", "0.60856634", "0.60604197", "0.6059965", "0.6042489", "0.6037613", "0.6005256", "0.6003257", "0.6003257", "0.5980022", "0.596039", "0.596039", "0.5935343", "0.5907778", "0.58877915", "0.5882687", "0.58735025", "0.5847084", "0.58358455", "0.5818534", "0.5809112", "0.58032995", "0.5798825", "0.5797645", "0.57868075", "0.57760876", "0.5770018", "0.5767094", "0.5766821", "0.5760345", "0.57494736", "0.5743517", "0.5742301", "0.5740903", "0.57158715", "0.5709423", "0.5698952", "0.5698435", "0.56821424", "0.5681867", "0.5673567", "0.5662333", "0.5656782", "0.56531733", "0.56531733", "0.56531733", "0.56531733", "0.56531733", "0.56453246", "0.56445265", "0.5643297", "0.5631847", "0.56302655", "0.56263345", "0.56222594", "0.5619829", "0.5618173", "0.5599937", "0.55998725", "0.55961114", "0.5594936", "0.55782217", "0.5573576", "0.5561637", "0.5559624", "0.5554232", "0.5543066", "0.554167", "0.5535106", "0.5521109", "0.5514144", "0.5513272", "0.55127877", "0.5512762", "0.55096596", "0.55086577", "0.55065763", "0.5492668", "0.54901904", "0.54857796", "0.54836607", "0.54828197", "0.5479523", "0.547784", "0.5477793", "0.5476028", "0.5472475", "0.5468726", "0.54683876" ]
0.618337
10
accecss the items from you shop list here
@Override public void success(List<Book> book, Response response) { List<Book> ep = book; /*Example[] array = ep.toArray(new Example[ep.size()]); List<Example> listsample = ep.getSaleDate();*/ listView.setAdapter(new BookListAdapter(ep)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "@Override\n\tpublic void browseItems(Session session){\n\t\t//exception handling block\n\t\ttry{\n\t\t\tbrowseItem=mvc.browseItems(session);\n\t\t\t//displaying items from database\n\t\t\tSystem.out.println(\"<---+++---Your shopping items list here----+++--->\");\n\t\t\tSystem.out.println(\"ItemId\"+\" \"+\"ItemName\"+\" \"+\"ItemType\"+\" \"+\"ItemPrice\"+\" \"+\"ItemQuantity\");\n\t\t\tfor(int i = 0; i < browseItem.size(); i++) {\n\t System.out.println(browseItem.get(i)+\"\\t\"+\"\\t\");\n\t }\n\t System.out.println(\"<------------------------------------------------>\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App Exception- Browse Items: \" +e.getMessage());\n\t\t}\n\t}", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "public void goFiniteShopping(ArrayList<Item> items){\n for (Item item : items){\n purchasePersonalItem(item);\n }\n }", "public ShopList(MainForm mf) {\n super(mf);\n ItemList = recordSeeker.getShopList();\n setTable();\n }", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public static void items(){\n\t\ttry{\n\t\t\tConnection conn = DriverManager.getConnection(url,username,password);\n\t\t\tStatement query = conn.createStatement();\n\t\t\tResultSet re = query.executeQuery(\"select * from item\");\n\t\t\tString spc = \" \";\n\t\t\twhile (re.next()){\n\t\t\t\tSystem.out.println(re.getInt(\"itemid\")+spc+re.getString(\"title\")+spc+re.getDouble(\"price\"));\n\t\t\t}\n\t\t}catch(Exception ecx){\n\t\t\tecx.printStackTrace();\n\t\t}\n\t}", "private void updateItems()\n\t{\t\n\t\tupdatePizzaTypes(items);\n\t\tupdateSidesTypes(items);\n\t\tupdateDrinksTypes(items);\n\t}", "private void getItems() {\n getComputers();\n getPrinters();\n }", "private void addItem() {\n\n ItemBean bean2 = new ItemBean();\n int drawableId2 = getResources().getIdentifier(\"ic_swrl\", \"drawable\", this.getPackageName());\n bean2.setAddress(drawableId2);\n bean2.setName(getResources().getString(R.string.swrl));\n itemList.add(bean2);\n\n ItemBean bean3 = new ItemBean();\n int drawableId3 = getResources().getIdentifier(\"ic_bianmin\", \"drawable\", this.getPackageName());\n bean3.setAddress(drawableId3);\n bean3.setName(getResources().getString(R.string.bianmin));\n itemList.add(bean3);\n\n ItemBean bean4 = new ItemBean();\n int drawableId4 = getResources().getIdentifier(\"ic_shenghuo\", \"drawable\", this.getPackageName());\n bean4.setAddress(drawableId4);\n bean4.setName(getResources().getString(R.string.shenghuo));\n itemList.add(bean4);\n\n ItemBean bean5 = new ItemBean();\n int drawableId5 = getResources().getIdentifier(\"ic_nxwd\", \"drawable\", this.getPackageName());\n bean5.setAddress(drawableId5);\n bean5.setName(getResources().getString(R.string.nxwd));\n// itemList.add(bean5);\n\n }", "public ShoppingListItem() {}", "public List<CartItem> getAllcartitem();", "public static void main(String[] args) {\n Item item1=new Item(\"cucumber\",2,5);\n Item item2=new Item(\"appl\",3,6);\n Item item3=new Item(\"orange\",3,5);\n Item item4=new Item(\"bananas\",2,6);\n\n ArrayList<Item>shoppingList=new ArrayList<>();\n shoppingList.addAll(Arrays.asList(item1,item2,item3,item4));\n double totalCost=0;\n for (Item each:shoppingList){\n totalCost +=each.calCost();\n }\n for(int i=0;i<shoppingList.size();i++){\n totalCost+=shoppingList.get(i).calCost();\n }\n System.out.println(\"total:\"+totalCost);\n\n\n\n\n //System.out.println(item1.calCost());\n\n // System.out.println(item1);\n\n\n\n\n\n }", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void getItemListById() throws ClassNotFoundException, SQLException, IOException {\n itemCodeCombo.removeAllItems();\n ItemControllerByChule itemController = new ItemControllerByChule();\n ArrayList<Item> allItem = itemController.getAllItems();\n itemCodeCombo.addItem(\"\");\n for (Item item : allItem) {\n itemCodeCombo.addItem(item.getItemCode());\n }\n itemListById.setSearchableCombo(itemCodeCombo, true, null);\n }", "public void setArrayListOfItemsInShoppingCart(WebElement element) {\n UtilityHelper.moveToViewElement(element);\n String name = UtilityHelper.elementGetText(element.findElement(By.xpath(\".//*[@class='mjr-product-name']\")));\n addNameToShoppingCartPgeArrayList(name);\n }", "public AdapterShop(Activity context, List<shoppingcard> dades){\n super(context, R.layout.listitem_shop,dades);\n this.context = context;\n this.dades = dades;\n }", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "List<CatalogItem> getAllCatalogItems();", "public void displayAll() {\r\n \t Item currentItem;\r\n \t \r\n \t System.out.println(\"-----BOOKS-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a book.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.BOOK) \r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n \t \t\r\n \t System.out.println(\"-----MAGAZINES-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a magazine.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.MAGAZINE)\r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n\r\n }", "public void showPurchase(Client c1) {\n\t\tfor(Book book: c1.getBuyBookList()) {\n\t\t\tSystem.out.println(\"Liste des livres acheté : \\nTitre : \" \n\t\t+ book.getTitle() + \"\\nAuteur : \" + book.getAuthor() + \"\\n\");\n\t\t}\n\t}", "public void setSelectedItemsToValidation_MiniCart() {\n if (ListOfMiniCartItems.isEmpty()) {\n List<WebElement> inMiniCart = getDriver().findElements(By.xpath(\"//*[@class='productNameInner']\"));\n for (WebElement lineItem : inMiniCart) {\n ListOfMiniCartItems.add(lineItem.getText());\n }\n }\n }", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "public void initShop(){\n addCountToStorage(actionProduct.findProductByName(\"Jemeson\"), 3);\n addCountToStorage(actionProduct.findProductByName(\"Red Label\"), 5);\n addCountToStorage(actionProduct.findProductByName(\"Burenka\"), 10);\n addCountToStorage(actionProduct.findProductByName(\"Kupyanskoe\"), 21);\n\n //add transaction\n int idxCustomer = actionCustomer.findCustomerByName(\"Perto\");\n int idxProduct = actionProduct.findProductByName(\"Burenka\");\n\n addTransaction(idxCustomer, idxProduct, getDate(-7), 1 , actionProduct.getPriceByIdx(idxProduct));\n\n idxProduct = actionProduct.findProductByName(\"white bread\");\n addTransaction(idxCustomer, idxProduct, getDate(-7), 1 , actionProduct.getPriceByIdx(idxProduct));\n\n idxCustomer = actionCustomer.findCustomerByName(\"Dmytro\");\n addTransaction(idxCustomer, idxProduct, getDate(-6), 2 , actionProduct.getPriceByIdx(idxProduct));\n\n idxProduct = actionProduct.findProductByName(\"burenka\");\n addTransaction(idxCustomer, idxProduct, getDate(-6), 2 , actionProduct.getPriceByIdx(idxProduct));\n\n\n }", "private List<FreeShopProduct> getProductList() {\n\n productList = new ArrayList<>();\n productList.add(new FreeShopProduct(R.drawable.db_school_small, getResources().getString(R.string.shopItem0)));\n productList.add(new FreeShopProduct(R.drawable.db_clothes_small, getResources().getString(R.string.shopItem1)));\n productList.add(new FreeShopProduct(R.drawable.db_emotions_small, getResources().getString(R.string.shopItem2)));\n productList.add(new FreeShopProduct(R.drawable.db_etiquette_small, getResources().getString(R.string.shopItem3)));\n productList.add(new FreeShopProduct(R.drawable.db_landforms_small, getResources().getString(R.string.shopItem4)));\n productList.add(new FreeShopProduct(R.drawable.db_fruits_small, getResources().getString(R.string.shopItem5)));\n productList.add(new FreeShopProduct(R.drawable.db_kingdom_small, getResources().getString(R.string.shopItem6)));\n productList.add(new FreeShopProduct(R.drawable.db_outerspace_small, getResources().getString(R.string.shopItem7)));\n productList.add(new FreeShopProduct(R.drawable.db_festival_small, getResources().getString(R.string.shopItem8)));\n productList.add(new FreeShopProduct(R.drawable.db_music_small, getResources().getString(R.string.shopItem9)));\n\n return productList;\n }", "public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}", "public ChainShopAdapter(List<MultiItemEntity> data) {\n super(data);\n addItemType(TYPE_LEVEL_1, R.layout.item_shop_employess_list);\n addItemType(TYPE_PERSON, R.layout.item_shop_employee);\n }", "private void printToolListMenu(Shop shop) {\n System.out.println(shop.getInventory());\n }", "void selectList(ShoppingList _ShoppingList);", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "private void setUpList() {\n\n\n Contents s1 = new Contents(R.drawable.bishist,\"Bishisht Bhatta\",\"+977-9849849525\", Color.parseColor(\"#074e87\"));\n list.add(s1);\n Contents s2 = new Contents(R.drawable.sagar,\"Sagar Pant\",\"+977-9865616888\",Color.parseColor(\"#074e87\"));\n list.add(s2);\n Contents s3 = new Contents(R.drawable.rabins,\"Rabin Nath\",\"+977-9848781007\",Color.parseColor(\"#074e87\"));\n list.add(s3);\n\n\n }", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "private void updateShop(List<ItemType> items, int level) {\n\t\tfor (ItemType item : items) {\n\t\t\tString text = item.getTextureString();\n\t\t\ttext = item instanceof SpecialType ? text\n\t\t\t\t\t: text.substring(0, text.length() - 1)\n\t\t\t\t\t\t\t+ Integer.toString(level);\n\t\t\tTexture texture = textureManager.getTexture(text);\n\t\t\tImageButton button = generateItemButton(texture);\n\n\t\t\tbutton.addListener(new ClickListener() {\n\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\tstatus.setText(item.getName());\n\t\t\t\t\tif (selectedHero == null) {\n\t\t\t\t\t\tstatus.setText(\"Unsuccessful shopping, No hero exist.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (selectedHero.getHealth() <= 0) {\n\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\"Your Commander is dead. Can't buy anything.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tboolean enoughResources = checkCost(selectedHero.getOwner(),\n\t\t\t\t\t\t\titem);\n\t\t\t\t\tif (enoughResources) {\n\t\t\t\t\t\tif (item instanceof WeaponType) {\n\t\t\t\t\t\t\tWeapon weapon = new Weapon((WeaponType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(weapon);\n\t\t\t\t\t\t\tstatus.setText(boughtString + weapon.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Weapon) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else if (item instanceof ArmourType) {\n\t\t\t\t\t\t\tArmour armour = new Armour((ArmourType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(armour);\n\t\t\t\t\t\t\tstatus.setText(boughtString + armour.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Armour) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tboolean transactSuccess;\n\t\t\t\t\t\t\tSpecial special = new Special((SpecialType) item);\n\t\t\t\t\t\t\ttransactSuccess = selectedHero\n\t\t\t\t\t\t\t\t\t.addItemToInventory(special);\n\t\t\t\t\t\t\tif (transactSuccess) {\n\t\t\t\t\t\t\t\tstatus.setText(boughtString + special.getName()\n\t\t\t\t\t\t\t\t\t\t+ \"(Special) for \"\n\t\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\t\t\"Unsuccessful Shopping, can only hold 4 specials\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselectedHero.setStatsChange(true);\n\t\t\t\t\t\ttransact(selectedHero.getOwner(), item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString mes = \"Not enough resources.\";\n\t\t\t\t\t\tstatus.setText(mes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tprivate boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tscrollTable.add(button).width(iconSize).height(iconSize).top();\n\t\t\tString stats = getItemStats(item, level);\n\t\t\tString cost = getItemCost(item, level);\n\t\t\tscrollTable.add(new Label(stats, skin)).width(iconSize).top()\n\t\t\t\t\t.left();\n\t\t\tscrollTable.add(new Label(cost, skin)).width(iconSize).top().left();\n\t\t\tscrollTable.row();\n\t\t}\n\t}", "private void initList(CartInfo ci) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "void updateList(ShoppingList _ShoppingList);", "private void getAllProducts() {\n }", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "@Override\r\n\tpublic void init() {\n\t\tint numOfItems = loader.getNumOfItems();\r\n\t\tsetStoreSize(numOfItems);\r\n\r\n\t\tfor (int i = 0; i < numOfItems; i++) {\r\n DrinksStoreItem item = (DrinksStoreItem) loader.getItem(i);\r\n\t\t\tStoreObject brand = item.getContent();\r\n\t\t\tStoreObject existingBrand = findObject(brand.getName());\r\n\t\t\tif (existingBrand != null) {\r\n\t\t\t item.setContent(existingBrand);\r\n\t\t\t}\r\n\t\t\taddItem(i, item);\t\r\n\t\t}\r\n\t}", "public ArrayList<CoffeeShop> returnShops(){\r\n return allShops;\r\n }", "public void setItems(String items)\n {\n _items = items;\n }", "public List<ShopItem> getShopItems() {\n\t\treturn myItems;\n\t}", "public ArrayList getCartas();", "private void buildShipsList() {\r\n ObservableList<ShipBar> lstShips = FXCollections.observableArrayList();\r\n Map<String, ShipType> ships = Data.SHIPS.get();\r\n for (String s : planet.getShips()) {\r\n ShipType ship = ships.get(s);\r\n ShipBar u = new ShipBar();\r\n u.setKey(s);\r\n u.setText(ship.getName());\r\n u.setPrice(ship.getPrice() - currentShip.getNetWorth());\r\n u.setToggleGroup(shipGroup);\r\n lstShips.add(u);\r\n }\r\n buyShips.setItems(lstShips);\r\n }", "@GetMapping(\"/\")\n public String index(Model model, HttpServletRequest request) {\n\n List<Product> listtop = productService.getTopProducts();\n List<Product> productListFollow = listtop;//new ArrayList<>();\n if (listtop.size() >= 4)\n productListFollow = listtop.subList(0, 4);\n if (listtop.size() > 7)\n listtop = listtop.subList(1, 9);\n\n model.addAttribute(\"productlistFlow\", productListFollow);\n model.addAttribute(\"productlistTop\", listtop);\n model.addAttribute(\"cats\", categoryService.getAll());\n\n return \"buyer/home\";\n }", "@Override\r\n\tpublic void getGroup(ShoppingList sl) {\r\n\r\n\t}", "public void addGroceryItem(String item){\n groceryList.add(item);\n }", "public OrganizeItemsPanel() {\n initComponents();\n// lastIndeks = catalogProducts.size();\n }", "Items(){\n}", "void addGroceryItem(String item) {\n\n\t}", "public Shop(String uname, String pass)\n {\n super(uname, pass);\n stock = new AllItems();\n bills = new ArrayList<>();\n id = Utilities.SHOP_CTR;\n Utilities.SHOP_CTR++;\n }", "public void LlenarC(){\n for(int i=0;i< new GestionCategorias().getListCategoria().size();i++){\n catBox.addItem(new GestionCategorias().getListCategoria().get(i).getCat_nombre());\n \n }\n }", "public static void main(String[] args) {\n List<ProductCatalog> productCatalog = new ArrayList<>();\n var apple = new Product(new FruitProduct(\"apple\"));\n var grapes = new Product(new FruitProduct(\"grapes\"));\n var peaches = new Product(new FruitProduct(\"peaches\"));\n productCatalog.add(new ProductCatalog(apple,3, 2,0.2));\n productCatalog.add(new ProductCatalog(grapes,5,2,0.5));\n productCatalog.add(new ProductCatalog(peaches,7,0,0));\n var cart = new ShoppingCart();\n cart.setProductCatalogueList(productCatalog);\n cart.addItem(\"apple\",3);\n /*\n cart.setProductCatalogue(\"apple\",3);\n cart.setProductCatalogue(\"grapes\",5);\n cart.setProductCatalogue(\"peaches\",7);\n */\n //cart1.forEach((cart) -> invoice(cart));\n }", "private void bindTitleForProductItems(List<OrderItem> orderItems) {\n for (OrderItem orderItem : orderItems) {\n if (orderItem.getProductOption() != null) {\n ExtensionAttribute extensionAttribute = orderItem.getProductOption().getExtensionAttribute();\n if (extensionAttribute != null) {\n for (ItemOption itemOption : extensionAttribute.getItemOptions()) {\n String productName = orderItem.getName();\n productName += \"\\n- \" + itemOption.getLabel() + \": \" + itemOption.getValue();\n orderItem.setName(productName);\n orderItem.setSku(productName);\n }\n StringBuilder productName = new StringBuilder(orderItem.getSku());\n for (int index = 0; index < extensionAttribute.getCustomOptions().size(); index++) {\n CustomOption customOption = extensionAttribute.getCustomOptions().get(index);\n if (customOption.getOptionDetails() != null) {\n if (customOption.getLabel() != null && customOption.getLabel().contains(\"[N]\")) {\n customOption.setLabel(customOption.getLabel().replace(\"[N]\", \"\"));\n }\n productName.append(\"\\n- \").append(customOption.getLabel());\n for (OptionDetail optionDetail : customOption.getOptionDetails()) {\n// productName.append(\"\\n\\t- \").append(optionDetail.getTitle()).append(\": \").append(\"$\").append(optionDetail.getPrice());\n productName.append(\"\\n\\t- \").append(optionDetail.getTitle());\n }\n orderItem.setSku(productName.toString());\n }\n }\n }\n }\n }\n }", "public synchronized List<ShoppingCartItem> getItems(){\n List<ShoppingCartItem> cart = new ArrayList<ShoppingCartItem>();\n \n for(ShoppingCartItem cartItem : carrito){\n if(cartItem!=null)\n cart.add(cartItem);\n }\n \n return cart;\n }", "private void printSupplierList(Shop shop) {\n System.out.println(shop.supplierListToString());\n }", "public interface ShopItem\n{\n\tDrawable getIcon();\n\n\tString getDisplayName();\n\n\tString getDescription();\n\n\tString getDataName();\n\n\tBigDecimal getCost(int count);\n\n\tvoid init(GameResources resources, AtomicInteger progress);\n\n\tint getProgressCount();\n}", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "private static void customItems(ItemDefinition itemDef) {\n\n\t\tswitch (itemDef.id) {\n\n\t\tcase 11864:\n\t\tcase 11865:\n\t\tcase 19639:\n\t\tcase 19641:\n\t\tcase 19643:\n\t\tcase 19645:\n\t\tcase 19647:\n\t\tcase 19649:\n\t\tcase 23073:\n\t\tcase 23075:\n\t\t\titemDef.equipActions[2] = \"Log\";\n\t\t\titemDef.equipActions[1] = \"Check\";\n\t\t\tbreak;\n\n\t\tcase 13136:\n\t\t\titemDef.equipActions[2] = \"Elidinis\";\n\t\t\titemDef.equipActions[1] = \"Kalphite Hive\";\n\t\t\tbreak;\n\t\tcase 2550:\n\t\t\titemDef.equipActions[2] = \"Check\";\n\t\t\tbreak;\n\n\t\tcase 1712:\n\t\tcase 1710:\n\t\tcase 1708:\n\t\tcase 1706:\n\t\t\titemDef.equipActions[1] = \"Edgeville\";\n\t\t\titemDef.equipActions[2] = \"Karamja\";\n\t\t\titemDef.equipActions[3] = \"Draynor\";\n\t\t\titemDef.equipActions[4] = \"Al-Kharid\";\n\t\t\tbreak;\n\n\t\tcase 22000:\n\t\t\titemDef.name = \"Lava partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 22001:\n\t\t\titemDef.name = \"Infernal partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 2552:\n\t\tcase 2554:\n\t\tcase 2556:\n\t\tcase 2558:\n\t\tcase 2560:\n\t\tcase 2562:\n\t\tcase 2564:\n\t\tcase 2566: // Ring of duelling\n\t\t\titemDef.equipActions[2] = \"Shantay Pass\";\n\t\t\titemDef.equipActions[1] = \"Clan wars\";\n\t\t\tbreak;\n\n\t\tcase 21307:\n\t\t\titemDef.name = \"Pursuit crate\";\n\t\t\tbreak;\n\n\t\tcase 12792:\n\t\t\titemDef.name = \"Graceful recolor kit\";\n\t\t\tbreak;\n\n\t\tcase 12022:\n\t\t\titemDef.name = \"Bandos Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Bandos gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 12024:\n\t\t\titemDef.name = \"Armadyl Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Armadyl gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 12026:\n\t\t\titemDef.name = \"Saradomin Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Saradomin gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 12028:\n\t\t\titemDef.name = \"Zamorak Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Zamorak gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 964:\n\t\t\titemDef.name = \"Pet Petie\";\n\t\t\tbreak;\n\n\t\tcase 20853:\n\t\t\titemDef.name = \"Deep Sea Bait\";\n\t\t\titemDef.stackable = true;\n\t\t\tbreak;\n\n\t\t/*\n\t\t * case 17014: itemDef.name = \"Dragon flail\"; itemDef.modelId = 50083;\n\t\t * itemDef.modelZoom = 1440; itemDef.modelRotation2 = 272;\n\t\t * itemDef.modelRotation1 = 352; itemDef.modelOffset1 = 32;\n\t\t * //itemDef.modelOffset2 = 0; itemDef.maleModel = 50083; itemDef.femaleModel =\n\t\t * 50083; itemDef.anInt164 = -1; itemDef.anInt188 = -1; itemDef.aByte205 = -8;\n\t\t * itemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t * itemDef.inventoryOptions = new String[] { \"Wear\", null, null, null, \"Drop\" };\n\t\t * itemDef.description = \"An Ancient Dragon Flail.\"; break;\n\t\t */\n\n\t\tcase 33272:\n\t\t\titemDef.name = \"Justiciar's Longsword\";\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modelId = 65472;\n\t\t\titemDef.modelZoom = 1726;\n\t\t\titemDef.modelRotation1 = 1576;\n\t\t\titemDef.modelRotation2 = 242;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\t// itemDef.anInt204 = 0;\n\t\t\t// itemDef.aByte205 = -12;\n\t\t\t// itemDef.aByte154 = 0;\n\t\t\titemDef.maleModel = 65465;\n\t\t\titemDef.femaleModel = 65465;\n\t\t\titemDef.description = \"An ancient longsword received from the Trial of Flames.\";\n\t\t\tbreak;\n\n\t\tcase 33168:\n\t\t\titemDef.name = \"Justiciar kiteshield\";\n\t\t\titemDef.modelId = 65471;\n\t\t\titemDef.modelZoom = 1600;\n\t\t\titemDef.modelRotation2 = 250;\n\t\t\titemDef.modelRotation1 = 300;\n\t\t\titemDef.modelOffset1 = -4;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.maleModel = 65473;\n\t\t\titemDef.femaleModel = 65474;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An ancient kiteshield. Part of the Justiciar set.\";\n\t\t\tbreak;\n\n\t\tcase 2996:\n\t\t\titemDef.name = \"PKP Ticket\";\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.description = \"Exchange this for a PK Point.\";\n\t\t\tbreak;\n\t\tcase 13226:\n\t\t\titemDef.name = \"Herb Sack\";\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.description = \"A sack for storing grimy herbs.\";\n\t\t\tbreak;\n\t\tcase 13346:\n\t\t\titemDef.name = \"Raid Mystery Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Open for chances to receive Raid items & other awesome rewards.\";\n\t\t\tbreak;\n\t\tcase 8800:\n\t\t\titemDef.name = \"Donator Tokens\";\n\t\t\titemDef.modelId = 31624;\n\t\t\t// itemDef.stackAmounts = new int[] { 2, 3, 50, 100, 500000, 1000000, 2500000,\n\t\t\t// 10000000, 100000000, 0 };//amount the model will change at\n\t\t\t// itemDef.stackIDs = new int[] { 8801, 8802, 8803, 8804, 8805, 8806, 8807,\n\t\t\t// 8808, 8809, 0 };//new item id to grab the model from\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 853;\n\t\t\titemDef.modelRotation2 = 1885;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8801:\n\t\t\titemDef.name = \"Donator Tokens\";\n\t\t\titemDef.modelId = 15344;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8802:\n\t\t\titemDef.name = \"Donator Tokens\";\n\t\t\titemDef.modelId = 15345;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8803:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15346;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8804:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15347;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8805:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15348;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8806:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15349;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8807:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15350;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8808:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15351;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8809:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15352;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 15098:\n\t\t\titemDef.name = \"Dice (up to 100)\";\n\t\t\titemDef.description = \"A 100-sided dice.\";\n\t\t\titemDef.modelId = 31223;\n\t\t\titemDef.modelZoom = 1104;\n\t\t\titemDef.modelRotation2 = 215;\n\t\t\titemDef.modelRotation1 = 94;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.modelOffset1 = -18;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Public-roll\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.name = \"Dice (up to 100)\";\n\t\t\titemDef.anInt196 = 15;\n\t\t\titemDef.anInt184 = 25;\n\t\t\tbreak;\n\n\t\tcase 32991:\n\t\t\titemDef.name = \"Divine spirit shield\";\n\t\t\titemDef.description = \"An ethereal shield with an divine sigil attached to it.\";\n\t\t\titemDef.modelId = 50001;\n\t\t\titemDef.maleModel = 50002;\n\t\t\titemDef.femaleModel = 50002;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation2 = 1050;\n\t\t\titemDef.modelRotation1 = 396;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\tbreak;\n\t\tcase 32992:\n\t\t\titemDef.name = \"Rainbow spirit shield\";\n\t\t\titemDef.description = \"An ethereal shield with all 4 sigils attached to it.\";\n\t\t\titemDef.modelId = 50004;\n\t\t\titemDef.maleModel = 50005;\n\t\t\titemDef.femaleModel = 50005;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation2 = 1050;\n\t\t\titemDef.modelRotation1 = 396;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32993:\n\t\t\titemDef.name = \"Divine sigil\";\n\t\t\titemDef.description = \"A sigil in the shape of a divine symbol.\";\n\t\t\titemDef.modelId = 50003;\n\t\t\titemDef.modelZoom = 848;\n\t\t\titemDef.modelRotation1 = 267;\n\t\t\titemDef.modelRotation2 = 138;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33060:\n\t\t\titemDef.name = \"Barrows Sword\";\n\t\t\titemDef.description = \"A sword glowing with otherworldy energy.\";\n\t\t\titemDef.modelId = 22325;\n\t\t\titemDef.maleModel = 50010;\n\t\t\titemDef.femaleModel = 50010;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation2 = 1050;\n\t\t\titemDef.modelRotation1 = 396;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\tbreak;\n\t\tcase 32994:\n\t\t\titemDef.name = \"Statius's platebody\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42602;\n\t\t\titemDef.maleModel = 35951;\n\t\t\titemDef.femaleModel = 35964;\n\t\t\titemDef.modelZoom = 1312;\n\t\t\titemDef.modelRotation1 = 272;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -2;\n\t\t\titemDef.modelOffset2 = 39;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32995:\n\t\t\titemDef.name = \"Statius's platelegs\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42590;\n\t\t\titemDef.maleModel = 35947;\n\t\t\titemDef.femaleModel = 35961;\n\t\t\titemDef.modelZoom = 1625;\n\t\t\titemDef.modelRotation1 = 355;\n\t\t\titemDef.modelRotation2 = 2046;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32996:\n\t\t\titemDef.name = \"Statius's full helm\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42596;\n\t\t\titemDef.maleModel = 35943;\n\t\t\titemDef.femaleModel = 35958;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 2039;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32997:\n\t\t\titemDef.name = \"Statius's warhammer\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42577;\n\t\t\titemDef.maleModel = 35968;\n\t\t\titemDef.femaleModel = 35968;\n\t\t\titemDef.modelZoom = 1360;\n\t\t\titemDef.modelRotation1 = 507;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 7;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32998:\n\t\t\titemDef.name = \"Vesta's chainbody\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42593;\n\t\t\titemDef.maleModel = 35953;\n\t\t\titemDef.femaleModel = 35965;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 545;\n\t\t\titemDef.modelRotation2 = 2;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32999:\n\t\t\titemDef.name = \"Vesta's plateskirt\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42581;\n\t\t\titemDef.maleModel = 35950;\n\t\t\titemDef.femaleModel = 35960;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33000:\n\t\t\titemDef.name = \"Vesta's longsword\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42597;\n\t\t\titemDef.maleModel = 35969;\n\t\t\titemDef.femaleModel = 35969;\n\t\t\titemDef.modelZoom = 1744;\n\t\t\titemDef.modelRotation1 = 738;\n\t\t\titemDef.modelRotation2 = 1985;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33001:\n\t\t\titemDef.name = \"Vesta's spear\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42599;\n\t\t\titemDef.maleModel = 35973;\n\t\t\titemDef.femaleModel = 35973;\n\t\t\titemDef.modelZoom = 2022;\n\t\t\titemDef.modelRotation1 = 480;\n\t\t\titemDef.modelRotation2 = 15;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33002:\n\t\t\titemDef.name = \"Morrigan's leather body\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42578;\n\t\t\titemDef.maleModel = 35954;\n\t\t\titemDef.femaleModel = 35963;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 545;\n\t\t\titemDef.modelRotation2 = 2;\n\t\t\titemDef.modelOffset1 = -2;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33003:\n\t\t\titemDef.name = \"Morrigan's leather chaps\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42603;\n\t\t\titemDef.maleModel = 35948;\n\t\t\titemDef.femaleModel = 35959;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 482;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33004:\n\t\t\titemDef.name = \"Morrigan's coif\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42583;\n\t\t\titemDef.maleModel = 35945;\n\t\t\titemDef.femaleModel = 35956;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 537;\n\t\t\titemDef.modelRotation2 = 5;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33005:\n\t\t\titemDef.name = \"Morrigan's javelin\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42592;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.maleModel = 42613;\n\t\t\titemDef.femaleModel = 42613;\n\t\t\titemDef.modelZoom = 1872;\n\t\t\titemDef.modelRotation1 = 282;\n\t\t\titemDef.modelRotation2 = 2009;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33006:\n\t\t\titemDef.name = \"Morrigan's throwing axe\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42582;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.maleModel = 42611;\n\t\t\titemDef.femaleModel = 42611;\n\t\t\titemDef.modelZoom = 976;\n\t\t\titemDef.modelRotation1 = 672;\n\t\t\titemDef.modelRotation2 = 2024;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33007:\n\t\t\titemDef.name = \"Zuriels robe top\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42591;\n\t\t\titemDef.maleModel = 35952;\n\t\t\titemDef.femaleModel = 35966;\n\t\t\titemDef.modelZoom = 1373;\n\t\t\titemDef.modelRotation1 = 373;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33008:\n\t\t\titemDef.name = \"Zuriels robe bottom\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42588;\n\t\t\titemDef.maleModel = 35949;\n\t\t\titemDef.femaleModel = 35962;\n\t\t\titemDef.modelZoom = 1697;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33009:\n\t\t\titemDef.name = \"Zuriels hood\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42604;\n\t\t\titemDef.maleModel = 35944;\n\t\t\titemDef.femaleModel = 35957;\n\t\t\titemDef.modelZoom = 720;\n\t\t\titemDef.modelRotation1 = 28;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33010:\n\t\t\titemDef.name = \"Zuriels staff\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42595;\n\t\t\titemDef.maleModel = 35971;\n\t\t\titemDef.femaleModel = 35971;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 366;\n\t\t\titemDef.modelRotation2 = 3;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33011:\n\t\t\titemDef.name = \"Craw's bow (u)\";\n\t\t\titemDef.description = \"This bow once belonged to a formidable follower of Armadyl.\";\n\t\t\titemDef.modelId = 35777;\n\t\t\titemDef.maleModel = 35768;\n\t\t\titemDef.femaleModel = 35768;\n\t\t\titemDef.modelZoom = 1979;\n\t\t\titemDef.modelRotation1 = 1463;\n\t\t\titemDef.modelRotation2 = 510;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33012:\n\t\t\titemDef.name = \"Craw's bow\";\n\t\t\titemDef.description = \"This bow once belonged to a formidable follower of Armadyl.\";\n\t\t\titemDef.modelId = 35777;\n\t\t\titemDef.maleModel = 35769;\n\t\t\titemDef.femaleModel = 35769;\n\t\t\titemDef.modelZoom = 1979;\n\t\t\titemDef.modelRotation1 = 1463;\n\t\t\titemDef.modelRotation2 = 510;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33013:\n\t\t\titemDef.name = \"Thammaron's sceptre (u)\";\n\t\t\titemDef.description = \"A mighty sceptre used in long forgotten battles.\";\n\t\t\titemDef.modelId = 35776;\n\t\t\titemDef.maleModel = 35772;\n\t\t\titemDef.femaleModel = 35772;\n\t\t\titemDef.modelZoom = 2105;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33014:\n\t\t\titemDef.name = \"Thammaron's sceptre\";\n\t\t\titemDef.description = \"A mighty sceptre used in long forgotten battles.\";\n\t\t\titemDef.modelId = 35776;\n\t\t\titemDef.maleModel = 35773;\n\t\t\titemDef.femaleModel = 35773;\n\t\t\titemDef.modelZoom = 2105;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33015:\n\t\t\titemDef.name = \"Viggora's chainmace (u)\";\n\t\t\titemDef.description = \"An ancient chainmace with a peculiar mechanism that allows for varying attack styles.\";\n\t\t\titemDef.modelId = 35778;\n\t\t\titemDef.maleModel = 35770;\n\t\t\titemDef.femaleModel = 35770;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 944;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33016:\n\t\t\titemDef.name = \"Viggora's chainmace\";\n\t\t\titemDef.description = \"An ancient chainmace with a peculiar mechanism that allows for varying attack styles.\";\n\t\t\titemDef.modelId = 35778;\n\t\t\titemDef.maleModel = 35771;\n\t\t\titemDef.femaleModel = 35771;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 944;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33018:\n\t\t\titemDef.name = \"Amulet of avarice\";\n\t\t\titemDef.description = \"A hauntingly beautiful amulet bearing the shape of a skull.\";\n\t\t\titemDef.modelId = 35779;\n\t\t\titemDef.maleModel = 35766;\n\t\t\titemDef.femaleModel = 35766;\n\t\t\titemDef.modelZoom = 420;\n\t\t\titemDef.modelRotation1 = 191;\n\t\t\titemDef.modelRotation2 = 86;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33019:\n\t\t\titemDef.name = \"Completionist cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modelId = 65270;\n\t\t\titemDef.maleModel = 65297;\n\t\t\titemDef.femaleModel = 65316;\n\t\t\titemDef.modelZoom = 1316;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 24;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33020:\n\t\t\titemDef.name = \"Completionist cape (t)\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modelId = 65258;\n\t\t\titemDef.maleModel = 65295;\n\t\t\titemDef.femaleModel = 65328;\n\t\t\titemDef.modelZoom = 1316;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 24;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33021:\n\t\t\titemDef.name = \"Torva full helm\";\n\t\t\titemDef.description = \"An ancient warrior's full helm.\";\n\t\t\titemDef.modelId = 62714;\n\t\t\titemDef.maleModel = 62738;\n\t\t\titemDef.femaleModel = 62738;\n\t\t\titemDef.modelZoom = 672;\n\t\t\titemDef.modelRotation1 = 85;\n\t\t\titemDef.modelRotation2 = 1867;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33022:\n\t\t\titemDef.name = \"Torva platebody\";\n\t\t\titemDef.description = \"An ancient warrior's platebody.\";\n\t\t\titemDef.modelId = 62699;\n\t\t\titemDef.maleModel = 62746;\n\t\t\titemDef.femaleModel = 62746;\n\t\t\titemDef.modelZoom = 1506;\n\t\t\titemDef.modelRotation1 = 473;\n\t\t\titemDef.modelRotation2 = 2042;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33023:\n\t\t\titemDef.name = \"Torva platelegs\";\n\t\t\titemDef.description = \"An ancient warrior's platelegs.\";\n\t\t\titemDef.modelId = 62701;\n\t\t\titemDef.maleModel = 62740;\n\t\t\titemDef.femaleModel = 62740;\n\t\t\titemDef.modelZoom = 1740;\n\t\t\titemDef.modelRotation1 = 474;\n\t\t\titemDef.modelRotation2 = 2045;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33024:\n\t\t\titemDef.name = \"Pernix cowl\";\n\t\t\titemDef.description = \"An ancient warrior's cowl.\";\n\t\t\titemDef.modelId = 62693;\n\t\t\titemDef.maleModel = 62739;\n\t\t\titemDef.femaleModel = 62739;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 532;\n\t\t\titemDef.modelRotation2 = 14;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33025:\n\t\t\titemDef.name = \"Pernix body\";\n\t\t\titemDef.description = \"An ancient warrior's leather body.\";\n\t\t\titemDef.modelId = 62709;\n\t\t\titemDef.maleModel = 62744;\n\t\t\titemDef.femaleModel = 62744;\n\t\t\titemDef.modelZoom = 1378;\n\t\t\titemDef.modelRotation1 = 485;\n\t\t\titemDef.modelRotation2 = 2042;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33026:\n\t\t\titemDef.name = \"Pernix chaps\";\n\t\t\titemDef.description = \"An ancient warrior's chaps.\";\n\t\t\titemDef.modelId = 62695;\n\t\t\titemDef.maleModel = 62741;\n\t\t\titemDef.femaleModel = 62741;\n\t\t\titemDef.modelZoom = 1740;\n\t\t\titemDef.modelRotation1 = 504;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33027:\n\t\t\titemDef.name = \"Virtus mask\";\n\t\t\titemDef.description = \"An ancient warrior's mask.\";\n\t\t\titemDef.modelId = 62710;\n\t\t\titemDef.maleModel = 62736;\n\t\t\titemDef.femaleModel = 62736;\n\t\t\titemDef.modelZoom = 928;\n\t\t\titemDef.modelRotation1 = 406;\n\t\t\titemDef.modelRotation2 = 2041;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33028:\n\t\t\titemDef.name = \"Virtus robe top\";\n\t\t\titemDef.description = \"An ancient warrior's robe top.\";\n\t\t\titemDef.modelId = 62704;\n\t\t\titemDef.maleModel = 62748;\n\t\t\titemDef.femaleModel = 62748;\n\t\t\titemDef.modelZoom = 1122;\n\t\t\titemDef.modelRotation1 = 488;\n\t\t\titemDef.modelRotation2 = 3;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33029:\n\t\t\titemDef.name = \"Virtus robe legs\";\n\t\t\titemDef.description = \"An ancient warrior's robe legs.\";\n\t\t\titemDef.modelId = 62700;\n\t\t\titemDef.maleModel = 62742;\n\t\t\titemDef.femaleModel = 62742;\n\t\t\titemDef.modelZoom = 1740;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 2045;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33030:\n\t\t\titemDef.name = \"Zaryte bow\";\n\t\t\titemDef.description = \"An ancient warrior's bow.\";\n\t\t\titemDef.modelId = 62692;\n\t\t\titemDef.maleModel = 62750;\n\t\t\titemDef.femaleModel = 62750;\n\t\t\titemDef.modelZoom = 1703;\n\t\t\titemDef.modelRotation1 = 221;\n\t\t\titemDef.modelRotation2 = 404;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -13;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33083:\n\t\t\titemDef.name = \"Tokhaar-kal\";\n\t\t\titemDef.description = \"\tA cape made of ancient, enchanted obsidian.\";\n\t\t\titemDef.modelId = 52073;\n\t\t\titemDef.maleModel = 52072;\n\t\t\titemDef.femaleModel = 52071;\n\t\t\titemDef.modelZoom = 1615;\n\t\t\titemDef.modelRotation1 = 339;\n\t\t\titemDef.modelRotation2 = 192;\n\t\t\titemDef.modelOffset1 = -4;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33089:\n\t\t\titemDef.name = \"Chaotic maul\";\n\t\t\titemDef.description = \"A maul used to claim life from those who don't deserve it.\";\n\t\t\titemDef.modelId = 54286;\n\t\t\titemDef.maleModel = 56294;\n\t\t\titemDef.femaleModel = 56294;\n\t\t\titemDef.modelZoom = 1447;\n\t\t\titemDef.modelRotation1 = 525;\n\t\t\titemDef.modelRotation2 = 350;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33094:\n\t\t\titemDef.name = \"Chaotic crossbow\";\n\t\t\titemDef.description = \"A small crossbow, only effective at short distance.\";\n\t\t\titemDef.modelId = 54331;\n\t\t\titemDef.maleModel = 56307;\n\t\t\titemDef.femaleModel = 56307;\n\t\t\titemDef.modelZoom = 1028;\n\t\t\titemDef.modelRotation1 = 249;\n\t\t\titemDef.modelRotation2 = 2021;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -54;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33095:\n\t\t\titemDef.name = \"Chaotic staff\";\n\t\t\titemDef.description = \"This staff makes destructive spells more powerful.\";\n\t\t\titemDef.modelId = 54367;\n\t\t\titemDef.maleModel = 56286;\n\t\t\titemDef.femaleModel = 56286;\n\t\t\titemDef.modelZoom = 1711;\n\t\t\titemDef.modelRotation1 = 471;\n\t\t\titemDef.modelRotation2 = 391;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33096:\n\t\t\titemDef.name = \"Chaotic kiteshield\";\n\t\t\titemDef.description = \"A large metal shield.\";\n\t\t\titemDef.modelId = 54358;\n\t\t\titemDef.maleModel = 56038;\n\t\t\titemDef.femaleModel = 56038;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 276;\n\t\t\titemDef.modelRotation2 = 1101;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33031:\n\t\t\titemDef.name = \"Chaotic rapier\";\n\t\t\titemDef.description = \"A razor-sharp rapier.\";\n\t\t\titemDef.modelId = 54197;\n\t\t\titemDef.maleModel = 56252;\n\t\t\titemDef.femaleModel = 56252;\n\t\t\titemDef.modelZoom = 1425;\n\t\t\titemDef.modelRotation1 = 540;\n\t\t\titemDef.modelRotation2 = 1370;\n\t\t\titemDef.modelOffset1 = 9;\n\t\t\titemDef.modelOffset2 = 13;\n\t\t\titemDef.maleOffset = -12;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33032:\n\t\t\titemDef.name = \"Chaotic longsword\";\n\t\t\titemDef.description = \"A razor-sharp longsword.\";\n\t\t\titemDef.modelId = 54204;\n\t\t\titemDef.maleModel = 56237;\n\t\t\titemDef.femaleModel = 56237;\n\t\t\titemDef.modelZoom = 1650;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 1300;\n\t\t\t// itemDef.aByte154 = -14;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33097:\n\t\t\titemDef.name = \"Sword of Onyxia\";\n\t\t\titemDef.description = \"A razor-sharp longsword.\";\n\t\t\titemDef.modelId = 53091;\n\t\t\titemDef.maleModel = 53092;\n\t\t\titemDef.femaleModel = 53092;\n\t\t\titemDef.modelZoom = 2007;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33098:\n\t\t\titemDef.name = \"Onyxia longsword\";\n\t\t\titemDef.description = \"A razor-sharp 2h sword.\";\n\t\t\titemDef.modelId = 53093;\n\t\t\titemDef.maleModel = 53094;\n\t\t\titemDef.femaleModel = 53094;\n\t\t\titemDef.modelZoom = 4007;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33099:\n\t\t\titemDef.name = \"White scimitar\";\n\t\t\titemDef.description = \"A razor-sharp scimitar.\";\n\t\t\titemDef.modelId = 53097;\n\t\t\titemDef.maleModel = 53098;\n\t\t\titemDef.femaleModel = 53098;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 312;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\t// itemDef.aByte154 = -14;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33100:\n\t\t\titemDef.name = \"White kiteshield\";\n\t\t\titemDef.description = \"a heavy kiteshield.\";\n\t\t\titemDef.modelId = 53095;\n\t\t\titemDef.maleModel = 53096;\n\t\t\titemDef.femaleModel = 53096;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation1 = 303;\n\t\t\titemDef.modelRotation2 = 180;\n\t\t\t// itemDef.aByte154 = -14;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33033:\n\t\t\titemDef.name = \"Agility master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 677, 801, 43540, 43543, 43546, 43549, 43550, 43552, 43554, 43558,\n\t\t\t\t\t43560, 43575 };\n\t\t\titemDef.modelId = 50030;\n\t\t\titemDef.maleModel = 50031;\n\t\t\titemDef.femaleModel = 50031;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33034:\n\t\t\titemDef.name = \"Attack master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 7104, 9151, 911, 914, 917, 920, 921, 923, 925, 929, 931, 946 };\n\t\t\titemDef.modelId = 50032;\n\t\t\titemDef.maleModel = 50033;\n\t\t\titemDef.femaleModel = 50033;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33035:\n\t\t\titemDef.name = \"Construction master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 6061, 5945, 6327, 6330, 6333, 6336, 6337, 6339, 6341, 6345, 6347,\n\t\t\t\t\t6362 };\n\t\t\titemDef.modelId = 50034;\n\t\t\titemDef.maleModel = 50035;\n\t\t\titemDef.femaleModel = 50035;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33036:\n\t\t\titemDef.name = \"Cooking master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 920, 920, 51856, 51859, 51862, 51865, 51866, 51868, 51870, 51874,\n\t\t\t\t\t51876, 51891 };\n\t\t\titemDef.modelId = 50036;\n\t\t\titemDef.maleModel = 50037;\n\t\t\titemDef.femaleModel = 50037;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33037:\n\t\t\titemDef.name = \"Crafting master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9142, 9152, 4511, 4514, 4517, 4520, 4521, 4523, 4525, 4529, 4531,\n\t\t\t\t\t4546 };\n\t\t\titemDef.modelId = 50038;\n\t\t\titemDef.maleModel = 50039;\n\t\t\titemDef.femaleModel = 50039;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33038:\n\t\t\titemDef.name = \"Defence master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 10460, 10473, 41410, 41413, 41416, 41419, 41420, 41422, 41424,\n\t\t\t\t\t41428, 41430, 41445 };\n\t\t\titemDef.modelId = 50040;\n\t\t\titemDef.maleModel = 50041;\n\t\t\titemDef.femaleModel = 50041;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33039:\n\t\t\titemDef.name = \"Farming master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 14775, 14792, 22026, 22029, 22032, 22035, 22036, 22038, 22040,\n\t\t\t\t\t22044, 22046, 22061 };\n\t\t\titemDef.modelId = 50042;\n\t\t\titemDef.maleModel = 50043;\n\t\t\titemDef.femaleModel = 50043;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33040:\n\t\t\titemDef.name = \"Firemaking master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 8125, 9152, 4015, 4018, 4021, 4024, 4025, 4027, 4029, 4033, 4035,\n\t\t\t\t\t4050 };\n\t\t\titemDef.modelId = 50044;\n\t\t\titemDef.maleModel = 50045;\n\t\t\titemDef.femaleModel = 50045;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33041:\n\t\t\titemDef.name = \"Fishing master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9144, 9152, 38202, 38205, 38208, 38211, 38212, 38214, 38216,\n\t\t\t\t\t38220, 38222, 38237 };\n\t\t\titemDef.modelId = 50046;\n\t\t\titemDef.maleModel = 50047;\n\t\t\titemDef.femaleModel = 50047;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33042:\n\t\t\titemDef.name = \"Fletching master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 6067, 9152, 33670, 33673, 33676, 33679, 33680, 33682, 33684,\n\t\t\t\t\t33688, 33690, 33705 };\n\t\t\titemDef.modelId = 50048;\n\t\t\titemDef.maleModel = 50049;\n\t\t\titemDef.femaleModel = 50049;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33043:\n\t\t\titemDef.name = \"Herblore master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9145, 9156, 22414, 22417, 22420, 22423, 22424, 22426, 22428,\n\t\t\t\t\t22432, 22434, 22449 };\n\t\t\titemDef.modelId = 50050;\n\t\t\titemDef.maleModel = 50051;\n\t\t\titemDef.femaleModel = 50051;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33044:\n\t\t\titemDef.name = \"Hitpoints master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 818, 951, 8291, 8294, 8297, 8300, 8301, 8303, 8305, 8309, 8311,\n\t\t\t\t\t8319 };\n\t\t\titemDef.modelId = 50052;\n\t\t\titemDef.maleModel = 50053;\n\t\t\titemDef.femaleModel = 50053;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\titemDef.femaleOffset = 4;\n\t\t\tbreak;\n\t\tcase 33045:\n\t\t\titemDef.name = \"Hunter master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 5262, 6020, 8472, 8475, 8478, 8481, 8482, 8484, 8486, 8490, 8492,\n\t\t\t\t\t8507 };\n\t\t\titemDef.modelId = 50054;\n\t\t\titemDef.maleModel = 50055;\n\t\t\titemDef.femaleModel = 50055;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33046:\n\t\t\titemDef.name = \"Magic master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 43569, 43685, 6336, 6339, 6342, 6345, 6346, 6348, 6350, 6354,\n\t\t\t\t\t6356, 6371 };\n\t\t\titemDef.modelId = 50056;\n\t\t\titemDef.maleModel = 50057;\n\t\t\titemDef.femaleModel = 50057;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33047:\n\t\t\titemDef.name = \"Mining master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 36296, 36279, 10386, 10389, 10392, 10395, 10396, 10398, 10400,\n\t\t\t\t\t10404, 10406, 10421 };\n\t\t\titemDef.modelId = 50058;\n\t\t\titemDef.maleModel = 50059;\n\t\t\titemDef.femaleModel = 50059;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33048:\n\t\t\titemDef.name = \"Prayer master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9163, 9168, 117, 120, 123, 126, 127, 127, 127, 127, 127, 127 };\n\t\t\titemDef.modelId = 50060;\n\t\t\titemDef.maleModel = 50061;\n\t\t\titemDef.femaleModel = 50061;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33049:\n\t\t\titemDef.name = \"Range master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 3755, 3998, 15122, 15125, 15128, 15131, 15132, 15134, 15136,\n\t\t\t\t\t15140, 15142, 15157 };\n\t\t\titemDef.modelId = 50062;\n\t\t\titemDef.maleModel = 50063;\n\t\t\titemDef.femaleModel = 50063;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33050:\n\t\t\titemDef.name = \"Runecrafting master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9152, 8128, 10318, 10321, 10324, 10327, 10328, 10330, 10332,\n\t\t\t\t\t10336, 10338, 10353 };\n\t\t\titemDef.modelId = 50064;\n\t\t\titemDef.maleModel = 50065;\n\t\t\titemDef.femaleModel = 50065;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33051:\n\t\t\titemDef.name = \"Slayer master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811 };\n\t\t\titemDef.originalModelColors = new int[] { 912, 920 };\n\t\t\titemDef.modelId = 50066;\n\t\t\titemDef.maleModel = 50067;\n\t\t\titemDef.femaleModel = 50067;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33052:\n\t\t\titemDef.name = \"Smithing master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 8115, 9148, 10386, 10389, 10392, 10395, 10396, 10398, 10400,\n\t\t\t\t\t10404, 10406, 10421 };\n\t\t\titemDef.modelId = 50068;\n\t\t\titemDef.maleModel = 50069;\n\t\t\titemDef.femaleModel = 50069;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33053:\n\t\t\titemDef.name = \"Strength master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 935, 931, 27538, 27541, 27544, 27547, 27548, 27550, 27552, 27556,\n\t\t\t\t\t27558, 27573 };\n\t\t\titemDef.modelId = 50070;\n\t\t\titemDef.maleModel = 50071;\n\t\t\titemDef.femaleModel = 50071;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33054:\n\t\t\titemDef.name = \"Thieving master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 11, 0, 58779, 58782, 58785, 58788, 58789, 57891, 58793, 58797,\n\t\t\t\t\t58799, 58814 };\n\t\t\titemDef.modelId = 50072;\n\t\t\titemDef.maleModel = 50073;\n\t\t\titemDef.femaleModel = 50073;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33055:\n\t\t\titemDef.name = \"Woodcutting master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 25109, 24088, 6693, 6696, 6699, 6702, 6703, 6705, 6707, 6711,\n\t\t\t\t\t6713, 6728 };\n\t\t\titemDef.modelId = 50074;\n\t\t\titemDef.maleModel = 50075;\n\t\t\titemDef.femaleModel = 50075;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33057:\n\t\t\titemDef.name = \"Abyssal Scythe\";\n\t\t\titemDef.description = \"\tA Scythe recieved from the Trials of Xeric CUSTOM RAID.\";\n\t\t\titemDef.modelId = 50081;\n\t\t\titemDef.maleModel = 50080;\n\t\t\titemDef.femaleModel = 50080;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.maleOffset = -12;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33090:\n\t\t\titemDef.name = \"Goliath gloves (Black)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50100;\n\t\t\titemDef.femaleModel = 50101;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33091:\n\t\t\titemDef.name = \"Goliath gloves (Red)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50102;\n\t\t\titemDef.femaleModel = 50103;\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 65046, 65051, 65056 };\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33092:\n\t\t\titemDef.name = \"Goliath gloves (White)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50104;\n\t\t\titemDef.femaleModel = 50105;\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 64585, 64590, 64595 };\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33093:\n\t\t\titemDef.name = \"Goliath gloves (Yellow)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50106;\n\t\t\titemDef.femaleModel = 50107;\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 9767, 9772, 9777 };\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 12639:\n\t\tcase 12637:\n\t\tcase 12638:\n\t\t\titemDef.description = \"Provides players with infinite run energy!\";\n\t\t\tbreak;\n\t\tcase 33056:\n\t\t\titemDef.name = \"Events cape (slayer)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 933, 0, 0, 0, 0 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33081:\n\t\t\titemDef.name = \"Events cape (agility)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 669, 43430, 43430, 43430, 43430 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33080:\n\t\t\titemDef.name = \"Events cape (attack)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 9926, 1815, 1815, 1815, 1815 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33059:\n\t\t\titemDef.name = \"Events cape (construction)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 6967, 6343, 6343, 6343, 6343 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33061:\n\t\t\titemDef.name = \"Events cape (cooking)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 1819, 49685, 49685, 49685, 49685 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33062:\n\t\t\titemDef.name = \"Events cape (crafting)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 7994, 4516, 4516, 4516, 4516 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33063:\n\t\t\titemDef.name = \"Events cape (defence)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 39367, 10472, 10472, 10472, 10472 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33064:\n\t\t\titemDef.name = \"Events cape (farming)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10698, 19734, 19734, 19734, 19734 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33065:\n\t\t\titemDef.name = \"Events cape (firemaking)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10059, 4922, 4922, 4922, 4922 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33066:\n\t\t\titemDef.name = \"Events cape (fishing)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10047, 36165, 36165, 36165, 36165 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33067:\n\t\t\titemDef.name = \"Events cape (fletching)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10047, 31500, 31500, 31500, 31500 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33068:\n\t\t\titemDef.name = \"Events cape (herblore)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10051, 20889, 20889, 20889, 20889 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33069:\n\t\t\titemDef.name = \"Events cape (hitpoints)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 1836, 8296, 8296, 8296, 8296 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33070:\n\t\t\titemDef.name = \"Events cape (hunter)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 6916, 8477, 8477, 8477, 8477 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33071:\n\t\t\titemDef.name = \"Events cape (magic)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 43556, 6339, 6339, 6339, 6339 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33072:\n\t\t\titemDef.name = \"Events cape (mining)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 34111, 10391, 10391, 10391, 10391 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33073:\n\t\t\titemDef.name = \"Events cape (prayer)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 9927, 2169, 2169, 2169, 2169 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33074:\n\t\t\titemDef.name = \"Events cape (range)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 3626, 20913, 20913, 20913, 20913 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33075:\n\t\t\titemDef.name = \"Events cape (runecrafting)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10047, 10323, 10323, 10323, 10323 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33076:\n\t\t\titemDef.name = \"Events cape (smithing)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10044, 5412, 5412, 5412, 5412 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33077:\n\t\t\titemDef.name = \"Events cape (strength)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 1819, 30487, 30487, 30487, 30487 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33078:\n\t\t\titemDef.name = \"Events cape (thieveing)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 8, 57636, 57636, 57636, 57636 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33079:\n\t\t\titemDef.name = \"Events cape (woodcutting)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 26007, 6570, 6570, 6570, 6570 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33101:\n\t\t\titemDef.name = \"Vorkath platebody\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53100;\n\t\t\titemDef.maleModel = 53099;\n\t\t\titemDef.femaleModel = 53099;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33102:\n\t\t\titemDef.name = \"Vorkath platelegs\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53102;\n\t\t\titemDef.maleModel = 53101;\n\t\t\titemDef.femaleModel = 53101;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33103:\n\t\t\titemDef.name = \"Vorkath boots\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53104;\n\t\t\titemDef.maleModel = 53103;\n\t\t\titemDef.femaleModel = 53103;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33104:\n\t\t\titemDef.name = \"Vorkath gloves\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53106;\n\t\t\titemDef.maleModel = 53105;\n\t\t\titemDef.femaleModel = 53105;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33105:\n\t\t\titemDef.name = \"Vorkath helmet\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53108;\n\t\t\titemDef.maleModel = 53107;\n\t\t\titemDef.femaleModel = 53107;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33106:\n\t\t\titemDef.name = \"Tekton helmet\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53118;\n\t\t\titemDef.maleModel = 53117;\n\t\t\titemDef.femaleModel = 53117;\n\t\t\titemDef.modelZoom = 724;\n\t\t\titemDef.modelRotation1 = 81;\n\t\t\titemDef.modelRotation2 = 1670;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33107:\n\t\t\titemDef.name = \"Tekton platebody\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53110;\n\t\t\titemDef.maleModel = 53109;\n\t\t\titemDef.femaleModel = 53109;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33108:\n\t\t\titemDef.name = \"Tekton platelegs\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53112;\n\t\t\titemDef.maleModel = 53111;\n\t\t\titemDef.femaleModel = 53111;\n\t\t\titemDef.modelZoom = 1550;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 186;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33109:\n\t\t\titemDef.name = \"Tekton gloves\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53116;\n\t\t\titemDef.maleModel = 53115;\n\t\t\titemDef.femaleModel = 53115;\n\t\t\titemDef.modelZoom = 830;\n\t\t\titemDef.modelRotation1 = 536;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33110:\n\t\t\titemDef.name = \"Tekton boots\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53114;\n\t\t\titemDef.maleModel = 53113;\n\t\t\titemDef.femaleModel = 53113;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33111:\n\t\t\titemDef.name = \"Anti-santa scythe\";\n\t\t\titemDef.description = \"Legend says this is the biggest arse scratcher around.\";\n\t\t\titemDef.modelId = 57002;\n\t\t\titemDef.maleModel = 57001;\n\t\t\titemDef.femaleModel = 57001;\n\t\t\titemDef.modelZoom = 3224;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 714;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33112:\n\t\t\titemDef.name = \"Dominion staff\";\n\t\t\titemDef.description = \"Dominion staff.\";\n\t\t\titemDef.modelId = 59029;\n\t\t\titemDef.maleModel = 59305;\n\t\t\titemDef.femaleModel = 59305;\n\t\t\titemDef.modelZoom = 1872;\n\t\t\titemDef.modelRotation1 = 288;\n\t\t\titemDef.modelRotation2 = 1685;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33113:\n\t\t\titemDef.name = \"Dominion sword\";\n\t\t\titemDef.description = \"Dominion sword.\";\n\t\t\titemDef.modelId = 59832;\n\t\t\titemDef.maleModel = 59306;\n\t\t\titemDef.femaleModel = 59306;\n\t\t\titemDef.modelZoom = 1829;\n\t\t\titemDef.modelRotation1 = 513;\n\t\t\titemDef.modelRotation2 = 546;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33114:\n\t\t\titemDef.name = \"Dominion crossbow\";\n\t\t\titemDef.description = \"Dominion crossbow.\";\n\t\t\titemDef.modelId = 59839;\n\t\t\titemDef.maleModel = 59304;\n\t\t\titemDef.femaleModel = 59304;\n\t\t\titemDef.modelZoom = 1490;\n\t\t\titemDef.modelRotation1 = 362;\n\t\t\titemDef.modelRotation2 = 791;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33115:\n\t\t\titemDef.name = \"Dragonfire Shield (e)\";\n\t\t\titemDef.description = \"unamed shield.\";\n\t\t\titemDef.modelId = 53120;\n\t\t\titemDef.maleModel = 53119;\n\t\t\titemDef.femaleModel = 53119;\n\t\t\titemDef.modelZoom = 2022;\n\t\t\titemDef.modelRotation1 = 540;\n\t\t\titemDef.modelRotation2 = 123;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[] { null, \"Wear\", \"Inspect\", \"Empty\", \"Drop\" };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33116:\n\t\t\titemDef.name = \"Zilyana's longbow\";\n\t\t\titemDef.description = \"A bow belonged to Zilyana.\";\n\t\t\titemDef.modelId = 53122;\n\t\t\titemDef.maleModel = 53121;\n\t\t\titemDef.femaleModel = 53121;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 636;\n\t\t\titemDef.modelRotation2 = 1010;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33117:\n\t\t\titemDef.name = \"Black dragon hunter crossbow\";\n\t\t\titemDef.description = \"Black dragon hunter crossbow.\";\n\t\t\titemDef.modelId = 53124;\n\t\t\titemDef.maleModel = 53123;\n\t\t\titemDef.femaleModel = 53123;\n\t\t\titemDef.modelZoom = 1554;\n\t\t\titemDef.modelRotation1 = 636;\n\t\t\titemDef.modelRotation2 = 1010;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33118:\n\t\t\titemDef.name = \"Vorkath blowpipe\";\n\t\t\titemDef.description = \"Vorkath blowpipe.\";\n\t\t\titemDef.modelId = 53126;\n\t\t\titemDef.maleModel = 53125;\n\t\t\titemDef.femaleModel = 53125;\n\t\t\titemDef.modelZoom = 1158;\n\t\t\titemDef.modelRotation1 = 768;\n\t\t\titemDef.modelRotation2 = 189;\n\t\t\titemDef.modelOffset1 = -7;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33119:\n\t\t\titemDef.name = \"Superior twisted bow\";\n\t\t\titemDef.description = \"An upgraded twisted bow.\";\n\t\t\titemDef.modelId = 53128;\n\t\t\titemDef.maleModel = 53127;\n\t\t\titemDef.femaleModel = 53127;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\titemDef.maleOffset = -4;\n\t\t\titemDef.femaleOffset = -4;\n\t\t\tbreak;\n\t\tcase 33123:\n\t\t\titemDef.name = \"Staff of sliske\";\n\t\t\titemDef.description = \"Staff of sliske.\";\n\t\t\titemDef.modelId = 59234;\n\t\t\titemDef.maleModel = 59233;\n\t\t\titemDef.femaleModel = 59233;\n\t\t\titemDef.modelZoom = 1872;\n\t\t\titemDef.modelRotation1 = 288;\n\t\t\titemDef.modelRotation2 = 1685;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33124:\n\t\t\titemDef.name = \"Twisted crossbow\";\n\t\t\titemDef.description = \"Twisted crossbow.\";\n\t\t\titemDef.modelId = 62777;\n\t\t\titemDef.maleModel = 62776;\n\t\t\titemDef.femaleModel = 62776;\n\t\t\titemDef.modelZoom = 926;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 258;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33125:\n\t\t\titemDef.name = \"Present\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modelId = 2426;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.modifiedModelColors = new int[] { 22410, 2999 };\n\t\t\titemDef.originalModelColors = new int[] { 933, 24410 };\n\t\t\titemDef.description = \"Santa's stolen present\";\n\t\t\tbreak;\n\t\tcase 33126:\n\t\t\titemDef.name = \"Christmas tree branch\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modelId = 2412;\n\t\t\titemDef.modelZoom = 940;\n\t\t\titemDef.modelRotation1 = 268;\n\t\t\titemDef.modelRotation2 = 152;\n\t\t\titemDef.modelOffset1 = -8;\n\t\t\titemDef.modelOffset2 = -21;\n\t\t\titemDef.modifiedModelColors = new int[] { 11144 };\n\t\t\titemDef.originalModelColors = new int[] { 6047 };\n\t\t\titemDef.description = \"Enter examine here.\";\n\t\t\tbreak;\n\t\tcase 33127:\n\t\t\titemDef.name = \"Kbd gloves\";\n\t\t\titemDef.description = \"Kbd gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 33085 };\n\t\t\titemDef.originalModelColors = new int[] { 1060 };\n\t\t\titemDef.modelId = 53106;\n\t\t\titemDef.maleModel = 53105;\n\t\t\titemDef.femaleModel = 53105;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33128:\n\t\t\titemDef.name = \"Kbd boots\";\n\t\t\titemDef.description = \"Kbd boots.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 33198, 33202, 33206, 33215, 33210 };\n\t\t\titemDef.originalModelColors = new int[] { 1060, 1061, 1063, 1064, 1065 };\n\t\t\titemDef.modelId = 53104;\n\t\t\titemDef.maleModel = 53103;\n\t\t\titemDef.femaleModel = 53103;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33129:\n\t\t\titemDef.name = \"Kbd platelegs\";\n\t\t\titemDef.description = \"Kbd platelegs.\";\n\t\t\titemDef.modelId = 59994;\n\t\t\titemDef.maleModel = 59995;\n\t\t\titemDef.femaleModel = 59995;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33130:\n\t\t\titemDef.name = \"Kbd platebody\";\n\t\t\titemDef.description = \"Kbd platebody.\";\n\t\t\titemDef.modelId = 59998;\n\t\t\titemDef.maleModel = 59999;\n\t\t\titemDef.femaleModel = 59999;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33131:\n\t\t\titemDef.name = \"Kbd helmet\";\n\t\t\titemDef.description = \"Kbd helmet.\";\n\t\t\titemDef.modelId = 59996;\n\t\t\titemDef.maleModel = 59997;\n\t\t\titemDef.femaleModel = 59997;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33132:\n\t\t\titemDef.name = \"Kbd cape\";\n\t\t\titemDef.description = \"Kbd cape.\";\n\t\t\titemDef.modelId = 59992;\n\t\t\titemDef.maleModel = 59993;\n\t\t\titemDef.femaleModel = 59993;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33133:\n\t\t\titemDef.name = \"Anti-imp pet\";\n\t\t\titemDef.description = \"Anti-imp pet.\";\n\t\t\titemDef.modelId = 45294;\n\t\t\titemDef.modelZoom = 1500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33134:\n\t\t\titemDef.name = \"Anti-santa pet\";\n\t\t\titemDef.description = \"Anti-santa pet.\";\n\t\t\titemDef.modelId = 29030;\n\t\t\titemDef.modelZoom = 653;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 1966;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33135:\n\t\t\titemDef.name = \"Bandos mask\";\n\t\t\titemDef.description = \"Bandos helmet.\";\n\t\t\titemDef.modelId = 59987;\n\t\t\titemDef.maleModel = 59991;\n\t\t\titemDef.femaleModel = 59991;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33136:\n\t\t\titemDef.name = \"Armadyl mask\";\n\t\t\titemDef.description = \"Armadyl mask.\";\n\t\t\titemDef.modelId = 59986;\n\t\t\titemDef.maleModel = 59990;\n\t\t\titemDef.femaleModel = 59990;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33137:\n\t\t\titemDef.name = \"Zamorak mask\";\n\t\t\titemDef.description = \"Zamorak mask.\";\n\t\t\titemDef.modelId = 59985;\n\t\t\titemDef.maleModel = 59989;\n\t\t\titemDef.femaleModel = 59989;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33138:\n\t\t\titemDef.name = \"Saradomin mask\";\n\t\t\titemDef.description = \"Saradomin mask.\";\n\t\t\titemDef.modelId = 59984;\n\t\t\titemDef.maleModel = 59988;\n\t\t\titemDef.femaleModel = 59988;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33139:\n\t\t\titemDef.name = \"Zamarok godbow\";\n\t\t\titemDef.description = \"Zamarok godbow.\";\n\t\t\titemDef.modelId = 60560;//60553\n\t\t\titemDef.maleModel = 60560;\n\t\t\titemDef.femaleModel = 60560;\n\t\t\titemDef.modelZoom = 2100;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33140:\n\t\t\titemDef.name = \"Saradomin godbow\";\n\t\t\titemDef.description = \"Saradomin godbow.\";\n\t\t\titemDef.modelId = 60555;\n\t\t\titemDef.maleModel = 60554;\n\t\t\titemDef.femaleModel = 60554;\n\t\t\titemDef.modelZoom = 2100;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33141:\n\t\t\titemDef.name = \"Bandos godbow\";\n\t\t\titemDef.description = \"Bandos godbow.\";\n\t\t\titemDef.modelId = 60559;\n\t\t\titemDef.maleModel = 60558;\n\t\t\titemDef.femaleModel = 60558;\n\t\t\titemDef.modelZoom = 2100;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33142:\n\t\t\titemDef.name = \"Fire cape (purple)\";\n\t\t\titemDef.description = \"Fire cape (purple).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33148:\n\t\t\titemDef.name = \"Fire cape (cyan)\";\n\t\t\titemDef.description = \"Fire cape (cyan).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33144:\n\t\t\titemDef.name = \"Fire cape (green)\";\n\t\t\titemDef.description = \"Fire cape (green).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33145:\n\t\t\titemDef.name = \"Fire cape (red)\";\n\t\t\titemDef.description = \"Fire cape (red).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33143:\n\t\t\titemDef.name = \"Infernal cape (blue)\";\n\t\t\titemDef.description = \"Infernal cape (blue).\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5056, 5066, 924, 3005 };\n\t\t\titemDef.originalModelColors = new int[] { 39851, 39851, 39851, 39851 };\n\t\t\titemDef.modelId = 33144;\n\t\t\titemDef.maleModel = 33103;\n\t\t\titemDef.femaleModel = 33111;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33146:\n\t\t\titemDef.name = \"Infernal cape (green)\";\n\t\t\titemDef.description = \"Infernal cape (green).\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5056, 5066, 924, 3005 };\n\t\t\titemDef.originalModelColors = new int[] { 21167, 21167, 21167, 21167 };\n\t\t\titemDef.modelId = 33144;\n\t\t\titemDef.maleModel = 33103;\n\t\t\titemDef.femaleModel = 33111;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33147:\n\t\t\titemDef.name = \"Infernal cape (purple)\";\n\t\t\titemDef.description = \"Infernal cape (purple).\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5056, 5066, 924, 3005 };\n\t\t\titemDef.originalModelColors = new int[] { 53160, 53160, 53160, 53160 };\n\t\t\titemDef.modelId = 33144;\n\t\t\titemDef.maleModel = 33103;\n\t\t\titemDef.femaleModel = 33111;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33150:\n\t\t\titemDef.name = \"Infernal key piece 1\";\n\t\t\titemDef.description = \"Infernal key piece 1.\";\n\t\t\titemDef.modelId = 61001;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Combine\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33151:\n\t\t\titemDef.name = \"Infernal key piece 2\";\n\t\t\titemDef.description = \"Infernal key piece 2.\";\n\t\t\titemDef.modelId = 61002;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Combine\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33152:\n\t\t\titemDef.name = \"Infernal key piece 3\";\n\t\t\titemDef.description = \"Infernal key piece 3.\";\n\t\t\titemDef.modelId = 61003;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Combine\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33153:\n\t\t\titemDef.name = \"Infernal key\";\n\t\t\titemDef.description = \"Infernal key.\";\n\t\t\titemDef.modelId = 61111;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\t\t//DOPES ITEMS NIGGAHAHAHAHAHAHAH\n\t\tcase 2749:\n\t\t\titemDef.name = \"Bloody Axe\";\n\t\t\titemDef.description = \"Look at all that blood!\";\n\t\t\titemDef.modelId = 65495;\n\t\t\titemDef.femaleModel = 65495;\n\t\t\titemDef.maleModel = 65495;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 2750:\n\t\t\titemDef.name = \"Bloody Axe Offhand\";\n\t\t\titemDef.description = \"Look at all that blood!\";\n\t\t\titemDef.modelId = 65496;\n\t\t\titemDef.femaleModel = 65496;\n\t\t\titemDef.maleModel = 65496;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33154:\n\t\t\titemDef.name = \"Infernal mystery box\";\n\t\t\titemDef.description = \"Infernal mystery box.\";\n\t\t\titemDef.modelId = 61110;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Open\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33155:\n\t\t\titemDef.name = \"Ethereal sword (red)\";\n\t\t\titemDef.description = \"Ethereal sword (red).\";\n\t\t\titemDef.modelId = 61005;\n\t\t\titemDef.maleModel = 61004;\n\t\t\titemDef.femaleModel = 61004;\n\t\t\titemDef.modelZoom = 1645;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33156:\n\t\t\titemDef.name = \"Ethereal sword (blue)\";\n\t\t\titemDef.description = \"Ethereal sword (blue).\";\n\t\t\titemDef.modelId = 61006;\n\t\t\titemDef.maleModel = 61007;\n\t\t\titemDef.femaleModel = 61007;\n\t\t\titemDef.modelZoom = 1645;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33157:\n\t\t\titemDef.name = \"Ethereal sword (green)\";\n\t\t\titemDef.description = \"Ethereal sword (green).\";\n\t\t\titemDef.modelId = 61008;\n\t\t\titemDef.maleModel = 61009;\n\t\t\titemDef.femaleModel = 61009;\n\t\t\titemDef.modelZoom = 1645;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33158:\n\t\t\titemDef.name = \"Dagon' hai top\";\n\t\t\titemDef.description = \"An elite dark mages robes.\";\n\t\t\titemDef.modelId = 60317;\n\t\t\titemDef.maleModel = 43614;\n\t\t\titemDef.femaleModel = 43689;\n\t\t\titemDef.anInt188 = 44594;\n\t\t\titemDef.anInt164 = 43681;\n\t\t\titemDef.modelZoom = 1697;\n\t\t\titemDef.modelRotation1 = 536;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33159:\n\t\t\titemDef.name = \"Dagon' hai hat\";\n\t\t\titemDef.description = \"An elite dark mages hat.\";\n\t\t\titemDef.modelId = 60319;\n\t\t\titemDef.maleModel = 60318;\n\t\t\titemDef.femaleModel = 60318;\n\t\t\titemDef.anInt188 = -1;\n\t\t\titemDef.anInt164 = -1;\n\t\t\titemDef.modelZoom = 1373;\n\t\t\titemDef.modelRotation1 = 98;\n\t\t\titemDef.modelRotation2 = 1988;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33160:\n\t\t\titemDef.name = \"Dagon' hai robe\";\n\t\t\titemDef.description = \"An elite dark mages robe.\";\n\t\t\titemDef.modelId = 60321;\n\t\t\titemDef.maleModel = 60320;\n\t\t\titemDef.femaleModel = 60320;\n\t\t\titemDef.anInt188 = -1;\n\t\t\titemDef.anInt164 = -1;\n\t\t\titemDef.modelZoom = 2216;\n\t\t\titemDef.modelRotation1 = 572;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 14;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33161:\n\t\t\titemDef.name = \"Blue infernal cape mix\";\n\t\t\titemDef.description = \"Changes the color of the Infernal Cape to Blue.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33162:\n\t\t\titemDef.name = \"Green infernal cape mix\";\n\t\t\titemDef.description = \"Changes the color of the Infernal Cape to Green.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33163:\n\t\t\titemDef.name = \"Purple infernal cape mix\";\n\t\t\titemDef.description = \"Changes the color of the Infernal Cape to Purple.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33164:\n\t\t\titemDef.name = \"Purple firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to purple.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33165:\n\t\t\titemDef.name = \"Cyan firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to cyan.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33166:\n\t\t\titemDef.name = \"Green firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to green.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33167:\n\t\t\titemDef.name = \"Red firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to red.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33169:\n\t\t\titemDef.name = \"K'ril robe top\";\n\t\t\titemDef.description = \"A top worn by magic-using followers of Zamorak.\";\n\t\t\titemDef.modelId = 62558;\n\t\t\titemDef.maleModel = 62559;\n\t\t\titemDef.femaleModel = 62559;\n\t\t\titemDef.modelZoom = 1358;\n\t\t\titemDef.modelRotation1 = 514;\n\t\t\titemDef.modelRotation2 = 2041;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33170:\n\t\t\titemDef.name = \"K'ril robe bottom\";\n\t\t\titemDef.description = \"A robe worn by magic-using followers of Zamorak.\";\n\t\t\titemDef.modelId = 62553;\n\t\t\titemDef.maleModel = 62554;\n\t\t\titemDef.femaleModel = 62554;\n\t\t\titemDef.modelZoom = 1690;\n\t\t\titemDef.modelRotation1 = 435;\n\t\t\titemDef.modelRotation2 = 9;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33171:\n\t\t\titemDef.name = \"K'ril hat\";\n\t\t\titemDef.description = \"A hat worn by magic-using followers of Zamorak.\";\n\t\t\titemDef.modelId = 62551;\n\t\t\titemDef.maleModel = 62552;\n\t\t\titemDef.femaleModel = 62552;\n\t\t\titemDef.modelZoom = 1236;\n\t\t\titemDef.modelRotation1 = 118;\n\t\t\titemDef.modelRotation2 = 10;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -12;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33172:\n\t\t\titemDef.name = \"K'ril swords\";\n\t\t\titemDef.description = \"Sheath & Unsheath this sword in the Equipment tab. Hits an enemy twice.\";\n\t\t\titemDef.equipActions[2] = \"Sheath\";\n\t\t\titemDef.modelId = 62556;\n\t\t\titemDef.maleModel = 62557;\n\t\t\titemDef.femaleModel = 62557;\n\t\t\titemDef.modelZoom = 1650;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 1300;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33173:\n\t\t\titemDef.name = \"K'ril swords (sheathed)\";\n\t\t\titemDef.description = \"Sheath & Unsheath this sword in the Equipment tab. Hits an enemy twice.\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 62556;\n\t\t\titemDef.maleModel = 62556;\n\t\t\titemDef.femaleModel = 62556;\n\t\t\titemDef.modelZoom = 1650;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 1300;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33174:\n\t\t\titemDef.name = \"Pet demonic gorilla\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 31241;\n\t\t\titemDef.modelZoom = 16000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33175:\n\t\t\titemDef.name = \"Pet crawling hand\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5071;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33176:\n\t\t\titemDef.name = \"Pet cave bug\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 23854;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33177:\n\t\t\titemDef.name = \"Pet cave crawler\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5066;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33178:\n\t\t\titemDef.name = \"Pet banshee\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5063;\n\t\t\titemDef.modelZoom = 3200;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33179:\n\t\t\titemDef.name = \"Pet cave slime\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5786;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33180:\n\t\t\titemDef.name = \"Pet rockslug\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5084;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33181:\n\t\t\titemDef.name = \"Pet cockatrice\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5070;\n\t\t\titemDef.modelZoom = 3200;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33182:\n\t\t\titemDef.name = \"Pet pyrefiend\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5083;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33183:\n\t\t\titemDef.name = \"Pet basilisk\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5064;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33184:\n\t\t\titemDef.name = \"Pet infernal mage\";\n\t\t\titemDef.modifiedModelColors = new int[] { -26527, -24618, -25152, -25491, 119 };\n\t\t\titemDef.originalModelColors = new int[] { 924, 148, 0, 924, 924 };\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5047;\n\t\t\titemDef.modelZoom = 3940;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 84;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33185:\n\t\t\titemDef.name = \"Pet bloodveld\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5065;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33186:\n\t\t\titemDef.name = \"Pet jelly\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5081;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33187:\n\t\t\titemDef.name = \"Pet turoth\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5086;\n\t\t\titemDef.modelZoom = 2600;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33188:\n\t\t\titemDef.name = \"Pet aberrant spectre\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5085;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 450;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33189:\n\t\t\titemDef.name = \"Pet dust devil\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5076;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33190:\n\t\t\titemDef.name = \"Pet kurask\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5082;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33191:\n\t\t\titemDef.name = \"Pet skeletal wyvern\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 10350;\n\t\t\titemDef.modelZoom = 1104;\n\t\t\titemDef.modelRotation1 = 27;\n\t\t\titemDef.modelRotation2 = 1634;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33192:\n\t\t\titemDef.name = \"Pet garygoyle\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5078;\n\t\t\titemDef.modelZoom = 4000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33193:\n\t\t\titemDef.name = \"Pet nechryael\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5074;\n\t\t\titemDef.modelZoom = 4000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33194:\n\t\t\titemDef.name = \"Pet abyssal demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5062;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33195:\n\t\t\titemDef.name = \"Pet dark beast\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 26395;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33196:\n\t\t\titemDef.name = \"Pet night beast\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32933;\n\t\t\titemDef.modelZoom = 7000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33197:\n\t\t\titemDef.name = \"Pet greater abyssal demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32921;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33198:\n\t\t\titemDef.name = \"Pet crushing hand\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32922;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33199:\n\t\t\titemDef.name = \"Pet chasm crawler\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32918;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33200:\n\t\t\titemDef.name = \"Pet screaming banshee\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32823;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33201:\n\t\t\titemDef.name = \"Pet twisted banshee\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32847;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33202:\n\t\t\titemDef.name = \"Pet giant rockslug\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32919;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33203:\n\t\t\titemDef.name = \"Pet cockathrice\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32920;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33204:\n\t\t\titemDef.name = \"Pet flaming pyrelord\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32923;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33205:\n\t\t\titemDef.name = \"Pet monstrous basilisk\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32924;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33206:\n\t\t\titemDef.name = \"Pet malevolent mage\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32929;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33207:\n\t\t\titemDef.name = \"Pet insatiable bloodveld\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32926;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33208:\n\t\t\titemDef.name = \"Pet insatiable mutated bloodveld\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32925;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33209:\n\t\t\titemDef.name = \"Pet vitreous jelly\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32852;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33210:\n\t\t\titemDef.name = \"Pet vitreous warped jelly\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32917;\n\t\t\titemDef.modelZoom = 6000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33211:\n\t\t\titemDef.name = \"Pet cave abomination\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32935;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33212:\n\t\t\titemDef.name = \"Pet abhorrent spectre\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32930;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33213:\n\t\t\titemDef.name = \"pet repugnant spectre\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32926;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33214:\n\t\t\titemDef.name = \"Pet choke devil\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32927;\n\t\t\titemDef.modelZoom = 6000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33215:\n\t\t\titemDef.name = \"Pet king kurask\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32934;\n\t\t\titemDef.modelZoom = 8000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33217:\n\t\t\titemDef.name = \"Pet nuclear smoke devil\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32928;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33218:\n\t\t\titemDef.name = \"Pet marble gargoyle\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34251;\n\t\t\titemDef.modelZoom = 8000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33219:\n\t\t\titemDef.name = \"Pet nechryarch\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32932;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33220:\n\t\t\titemDef.name = \"Pet Patrity\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32035;\n\t\t\titemDef.modelZoom = 653;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1535;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33221:\n\t\t\titemDef.name = \"Pet xarpus\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35383;\n\t\t\titemDef.modelZoom = 14000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33222:\n\t\t\titemDef.name = \"Pet nyclocas vasilias\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35182;\n\t\t\titemDef.modelZoom = 12000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33223:\n\t\t\titemDef.name = \"Pet pestilent bloat\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35404;\n\t\t\titemDef.modelZoom = 8500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33224:\n\t\t\titemDef.name = \"Pet maiden of sugadinti\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35385;\n\t\t\titemDef.modelZoom = 8500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33225:\n\t\t\titemDef.name = \"Pet lizardman shaman\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 4039;\n\t\t\titemDef.modelZoom = 8500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33226:\n\t\t\titemDef.name = \"Pet abyssal sire\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 29477;\n\t\t\titemDef.modelZoom = 9000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33227:\n\t\t\titemDef.name = \"Pet black demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 31984;\n\t\t\titemDef.modelZoom = 1104;\n\t\t\titemDef.modelRotation1 = 144;\n\t\t\titemDef.modelRotation2 = 1826;\n\t\t\titemDef.modelOffset1 = 7;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 11802:\n\t\tcase 11804:\n\t\tcase 11806:\n\t\tcase 11808:\n\t\t\titemDef.equipActions[2] = \"Sheath\";\n\t\t\tbreak;// godsword sheathing operating\n\n\t\tcase 33228:\n\t\t\titemDef.name = \"Pet greater demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32015;\n\t\t\titemDef.modelZoom = 902;\n\t\t\titemDef.modelRotation1 = 216;\n\t\t\titemDef.modelRotation2 = 138;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = -16;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33229:\n\t\t\titemDef.name = \"Armadyl godsword (sheathed)\";\n\t\t\titemDef.description = \"Armadyl godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28075;\n\t\t\titemDef.maleModel = 62683;\n\t\t\titemDef.femaleModel = 62683;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33230:\n\t\t\titemDef.name = \"Bandos godsword (sheathed)\";\n\t\t\titemDef.description = \"Bandos godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28059;\n\t\t\titemDef.maleModel = 62684;\n\t\t\titemDef.femaleModel = 62684;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33231:\n\t\t\titemDef.name = \"Saradomin godsword (sheathed)\";\n\t\t\titemDef.description = \"Saradomin godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28070;\n\t\t\titemDef.maleModel = 62685;\n\t\t\titemDef.femaleModel = 62685;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33232:\n\t\t\titemDef.name = \"Zamorak godsword (sheathed)\";\n\t\t\titemDef.description = \"Zamorak godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28060;\n\t\t\titemDef.maleModel = 62686;\n\t\t\titemDef.femaleModel = 62686;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33233:\n\t\t\titemDef.name = \"Pet revenant imp\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34156;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33234:\n\t\t\titemDef.name = \"Pet revenant goblin\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34262;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33235:\n\t\t\titemDef.name = \"Pet revenant pyrefiend\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34142;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33236:\n\t\t\titemDef.name = \"Pet revenant hobgoblin\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34157;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33237:\n\t\t\titemDef.name = \"Pet revenant cyclops\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34155;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33238:\n\t\t\titemDef.name = \"Pet revenant hellhound\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34143;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33239:\n\t\t\titemDef.name = \"Pet revenant demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32015;\n\t\t\titemDef.modifiedModelColors = new int[] { 1690, 910, 912, 1814, 1938 };\n\t\t\titemDef.originalModelColors = new int[] { 43078, 43078, 43078, 43078, 43078, 43078 };\n\t\t\titemDef.modelZoom = 902;\n\t\t\titemDef.modelRotation1 = 216;\n\t\t\titemDef.modelRotation2 = 138;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = -16;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33240:\n\t\t\titemDef.name = \"Pet revenant ork\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34154;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33242:\n\t\t\titemDef.name = \"Pet revenant dark beast\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34158;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33243:\n\t\t\titemDef.name = \"Pet revenant knight\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34145;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33244:\n\t\t\titemDef.name = \"Pet revenant dragon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34163;\n\t\t\titemDef.modelZoom = 7500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33245:\n\t\t\titemDef.name = \"Pet glob\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 26074;\n\t\t\titemDef.modelZoom = 10000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33246:\n\t\t\titemDef.name = \"Pet ice queen\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 104;\n\t\t\titemDef.modifiedModelColors = new int[] { 41, 61, 4550, 12224, 25238, 6798 };\n\t\t\titemDef.originalModelColors = new int[] { -22052, -26150, -24343, -22052, -22052, -23327 };\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33247:\n\t\t\titemDef.name = \"Pet enraged tarn\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60322;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33248:\n\t\t\titemDef.name = \"Pet jaltok-jad\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 33012;\n\t\t\titemDef.modelZoom = 12000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33249:\n\t\t\titemDef.name = \"Pet rune dragon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34668;\n\t\t\titemDef.modelZoom = 2541;\n\t\t\titemDef.modelRotation1 = 83;\n\t\t\titemDef.modelRotation2 = 1826;\n\t\t\titemDef.modelOffset1 = -97;\n\t\t\titemDef.modelOffset2 = 9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33271:\n\t\t\titemDef.name = \"Moo\";\n\t\t\titemDef.description = \"cow goes moo.\";\n\t\t\titemDef.modelId = 23889;\n\t\t\titemDef.modelZoom = 2541;\n\t\t\titemDef.modelRotation1 = 83;\n\t\t\titemDef.modelRotation2 = 1826;\n\t\t\titemDef.modelOffset1 = -97;\n\t\t\titemDef.modelOffset2 = 9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33250:\n\t\t\titemDef.name = \"Swift gloves (Black)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62657;\n\t\t\titemDef.femaleModel = 62658;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33251:\n\t\t\titemDef.name = \"Swift gloves (Red)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 65046, 65051, 65056 };\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62659;\n\t\t\titemDef.femaleModel = 62660;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33252:\n\t\t\titemDef.name = \"Swift gloves (White)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 64585, 64590, 64595 };\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62661;\n\t\t\titemDef.femaleModel = 62662;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33253:\n\t\t\titemDef.name = \"Swift gloves (Yellow)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 9767, 9772, 9777 };\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62663;\n\t\t\titemDef.femaleModel = 62664;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33254:\n\t\t\titemDef.name = \"Spellcaster gloves (Black)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62665;\n\t\t\titemDef.femaleModel = 62666;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33255:\n\t\t\titemDef.name = \"Spellcaster gloves (Red)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 65046, 65051, 65056 };\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62667;\n\t\t\titemDef.femaleModel = 62668;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33256:\n\t\t\titemDef.name = \"Spellcaster gloves (White)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 64585, 64590, 64595 };\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62669;\n\t\t\titemDef.femaleModel = 62670;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33257:\n\t\t\titemDef.name = \"Spellcaster gloves (Yellow)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 9767, 9772, 9777 };\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62671;\n\t\t\titemDef.femaleModel = 62672;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33258:\n\t\t\titemDef.name = \"Tekton longsword\";\n\t\t\titemDef.description = \"Tekton longsword.\";\n\t\t\titemDef.modelId = 62682;\n\t\t\titemDef.maleModel = 62681;\n\t\t\titemDef.femaleModel = 62681;\n\t\t\titemDef.modelZoom = 1445;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33259:\n\t\t\titemDef.name = \"Pet wyrm\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 36922;\n\t\t\titemDef.modelZoom = 2547;\n\t\t\titemDef.modelRotation1 = 97;\n\t\t\titemDef.modelRotation2 = 1820;\n\t\t\titemDef.modelOffset1 = -7;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33260:\n\t\t\titemDef.name = \"Pet drake\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 36160;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33261:\n\t\t\titemDef.name = \"Pet wyrm\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 36922;\n\t\t\titemDef.modelZoom = 2547;\n\t\t\titemDef.modelRotation1 = 97;\n\t\t\titemDef.modelRotation2 = 1820;\n\t\t\titemDef.modelOffset1 = -7;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33262:\n\t\t\titemDef.name = \"Valentines Balloon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62766;\n\t\t\titemDef.maleModel = 62767;\n\t\t\titemDef.femaleModel = 62767;\n\t\t\titemDef.modelZoom = 2200;\n\t\t\titemDef.modelRotation1 = 270;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33263:\n\t\t\titemDef.name = \"Cupid bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62768;\n\t\t\titemDef.maleModel = 62769;\n\t\t\titemDef.femaleModel = 62769;\n\t\t\titemDef.modelZoom = 1072;\n\t\t\titemDef.modelRotation1 = 127;\n\t\t\titemDef.modelRotation2 = 103;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33264:\n\t\t\titemDef.name = \"Halo and horns\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62771;\n\t\t\titemDef.maleModel = 62770;\n\t\t\titemDef.femaleModel = 62770;\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation1 = 228;\n\t\t\titemDef.modelRotation2 = 141;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33265:\n\t\t\titemDef.name = \"Heart\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62782;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33266:\n\t\t\titemDef.name = \"Valentines mystery box\";\n\t\t\titemDef.description = \"You make me hard.\";\n\t\t\titemDef.modelId = 62773;\n\t\t\titemDef.modelZoom = 464;\n\t\t\titemDef.modelRotation1 = 423;\n\t\t\titemDef.modelRotation2 = 1928;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Open\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33267:\n\t\t\titemDef.name = \"Staff of adoration\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62774;\n\t\t\titemDef.maleModel = 62775;\n\t\t\titemDef.femaleModel = 62775;\n\t\t\titemDef.modelZoom = 1579;\n\t\t\titemDef.modelRotation1 = 660;\n\t\t\titemDef.modelRotation2 = 48;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33268:\n\t\t\titemDef.name = \"Valentines crossbow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62778;\n\t\t\titemDef.maleModel = 62779;\n\t\t\titemDef.femaleModel = 62779;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 258;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33269:\n\t\t\titemDef.name = \"Onyxia Mystery Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 2426;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.modifiedModelColors = new int[] { 22410, 2999 };\n\t\t\titemDef.originalModelColors = new int[] { 2130, 38693 };\n\t\t\titemDef.description = \"Chances at several unqiue items found only in this box! (ex: Tekton Armor)\";\n\t\t\tbreak;\n\t\tcase 33270:\n\t\t\titemDef.name = \"Dragon Hunter Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 2426;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.modifiedModelColors = new int[] { 22410, 2999 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 1050 };\n\t\t\titemDef.description = \"Chances for items that give bonuses toward dragons. (ex: Dragonhunter Lance)\";\n\t\t\tbreak;\n\t\tcase 33273:\n\t\t\titemDef.name = \"Ancient sword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60201;\n\t\t\titemDef.maleModel = 60200;\n\t\t\titemDef.femaleModel = 60200;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33274:\n\t\t\titemDef.name = \"Armadyl staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60203;\n\t\t\titemDef.maleModel = 60202;\n\t\t\titemDef.femaleModel = 60202;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33275:\n\t\t\titemDef.name = \"Bork axe\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60205;\n\t\t\titemDef.maleModel = 60204;\n\t\t\titemDef.femaleModel = 60204;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33276:\n\t\t\titemDef.name = \"Bree bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60207;\n\t\t\titemDef.maleModel = 60206;\n\t\t\titemDef.femaleModel = 60206;\n\t\t\titemDef.modelZoom = 1700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33277:\n\t\t\titemDef.name = \"Infernal staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60209;\n\t\t\titemDef.maleModel = 60208;\n\t\t\titemDef.femaleModel = 60208;\n\t\t\titemDef.modelZoom = 2200;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33278:\n\t\t\titemDef.name = \"Infernal longsword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60211;\n\t\t\titemDef.maleModel = 60210;\n\t\t\titemDef.femaleModel = 60210;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33279:\n\t\t\titemDef.name = \"Necrolord staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60213;\n\t\t\titemDef.maleModel = 60212;\n\t\t\titemDef.femaleModel = 60212;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33280:\n\t\t\titemDef.name = \"Insert name here\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60215;\n\t\t\titemDef.maleModel = 60214;\n\t\t\titemDef.femaleModel = 60214;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33281:\n\t\t\titemDef.name = \"Infernal bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60219;\n\t\t\titemDef.maleModel = 60218;\n\t\t\titemDef.femaleModel = 60218;\n\t\t\titemDef.modelZoom = 3334;\n\t\t\titemDef.modelRotation1 = 533;\n\t\t\titemDef.modelRotation2 = 1294;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33282:\n\t\t\titemDef.name = \"Infernal warhammer\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60221;\n\t\t\titemDef.maleModel = 60220;\n\t\t\titemDef.femaleModel = 60220;\n\t\t\titemDef.modelZoom = 2512;\n\t\t\titemDef.modelRotation1 = 317;\n\t\t\titemDef.modelRotation2 = 1988;\n\t\t\titemDef.modelOffset1 = -8;\n\t\t\titemDef.modelOffset2 = 45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33283:\n\t\t\titemDef.name = \"Imbued Porazdir's heart\";\n\t\t\titemDef.modelId = 32298;\n\t\t\titemDef.modelZoom = 1168;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 1690;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 60826, 59796, 54544, 58904, 54561 };\n\t\t\titemDef.originalModelColors = new int[] { 13263, 13014, 13243, 13000, 13275 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Invigorate\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Boosts your strength for a period of time.\";\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33284:\n\t\t\titemDef.name = \"Imbued Justiciar's heart\";\n\t\t\titemDef.modelId = 32298;\n\t\t\titemDef.modelZoom = 1168;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 1690;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 60826, 59796, 54544, 58904, 54561 };\n\t\t\titemDef.originalModelColors = new int[] { 31661, 31418, 31661, 31167, 31445 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Invigorate\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Boosts your Defence for a period of time.\";\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32285:\n\t\t\titemDef.name = \"Imbued Derwen's heart\";\n\t\t\titemDef.modelId = 32298;\n\t\t\titemDef.modelZoom = 1168;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 1690;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 60826, 59796, 54544, 58904, 54561 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 930, 936, 940, 950 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Invigorate\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Boosts your Attack for a period of time.\";\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32286:\n\t\t\titemDef.name = \"Bronze fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 5652, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32287:\n\t\t\titemDef.name = \"Iron fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 33, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32288:\n\t\t\titemDef.name = \"Steel fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 61, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32289:\n\t\t\titemDef.name = \"Black fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32290:\n\t\t\titemDef.name = \"Mithril fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 43297, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32291:\n\t\t\titemDef.name = \"Adamant fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 21662, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32292:\n\t\t\titemDef.name = \"Rune fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 36133, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32293:\n\t\t\titemDef.name = \"Dragon fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing. Can also be used for Deep sea fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 924, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32294:\n\t\t\titemDef.name = \"Raw eel\";\n\t\t\titemDef.description = \"Slimy\";\n\t\t\titemDef.modelId = 6856;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 296;\n\t\t\titemDef.modelRotation2 = 352;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = 42;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32295:\n\t\t\titemDef.name = \"Burnt eel\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 6856;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 296;\n\t\t\titemDef.modelRotation2 = 352;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = 42;\n\t\t\titemDef.modifiedModelColors = new int[] { 8485, 14622, 12589 };\n\t\t\titemDef.originalModelColors = new int[] { 8724, 3226, 9754 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32296:\n\t\t\titemDef.name = \"Eel\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Eat\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 6856;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 296;\n\t\t\titemDef.modelRotation2 = 352;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = 42;\n\t\t\titemDef.modifiedModelColors = new int[] { 8485, 14622, 8386, 12589 };\n\t\t\titemDef.originalModelColors = new int[] { 8088, 6032, 57, 2960 };\n\t\t\titemDef.description = \"None\";\n\t\t\tbreak;\n\n\t\tcase 32297:\n\t\t\titemDef.name = \"Raw baron shark\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 2594;\n\t\t\titemDef.modelZoom = 1860;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 12;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 12;\n\t\t\titemDef.modifiedModelColors = new int[] { 103, 103 };\n\t\t\titemDef.originalModelColors = new int[] { 7756, 5349 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32298:\n\t\t\titemDef.name = \"Burnt baron shark\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 2594;\n\t\t\titemDef.modelZoom = 1860;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 12;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 12;\n\t\t\titemDef.modifiedModelColors = new int[] { 61, 103 };\n\t\t\titemDef.originalModelColors = new int[] { 28, 41 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32299:\n\t\t\titemDef.name = \"Baron shark\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Eat\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 2594;\n\t\t\titemDef.modelZoom = 1860;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 12;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 12;\n\t\t\titemDef.modifiedModelColors = new int[] { 61, 103 };\n\t\t\titemDef.originalModelColors = new int[] { 8109, 4795 };\n\t\t\titemDef.description = \"None\";\n\t\t\tbreak;\n\n\t\tcase 32300:\n\t\t\titemDef.name = \"Raw cavefish\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60223;\n\t\t\titemDef.modelZoom = 1284;\n\t\t\titemDef.modelRotation1 = 499;\n\t\t\titemDef.modelRotation2 = 1907;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32301:\n\t\t\titemDef.name = \"Burnt cavefish\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60227;\n\t\t\titemDef.modelZoom = 1284;\n\t\t\titemDef.modelRotation1 = 499;\n\t\t\titemDef.modelRotation2 = 1907;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32302:\n\t\t\titemDef.name = \"Cavefish\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Eat\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 60228;\n\t\t\titemDef.modelZoom = 1284;\n\t\t\titemDef.modelRotation1 = 499;\n\t\t\titemDef.modelRotation2 = 1907;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.description = \"None\";\n\t\t\tbreak;\n\n\t\tcase 32303:\n\t\t\titemDef.name = \"Dragonfire visage (e)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 26456;\n\t\t\titemDef.modelZoom = 1697;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 152;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.modifiedModelColors = new int[] { 45, 41, 33, 24, 20, 57, 22, 37 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33285:\n\t\t\titemDef.name = \"Easter Mystery Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 61110;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\t// itemDef.modifiedModelColors = new int[] {22410, 2999};\n\t\t\t// itemDef.originalModelColors = new int[] {35321, 350};\n\t\t\titemDef.description = \"Chances for all sorts of Easter Items!\";\n\t\t\tbreak;\n\n\t\tcase 33286:\n\t\t\titemDef.name = \"Easter Cape\";\n\t\t\titemDef.inventoryOptions = new String[] { null, \"wear\", null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"An Easter Cape.\";\n\t\t\tbreak;\n\n\t\tcase 33287:\n\t\t\titemDef.name = \"Pet Easter Bunny\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"You've captured the Easter bunny!\";\n\t\t\tbreak;\n\n\t\tcase 33288:\n\t\t\titemDef.name = \"Pet Choco\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"mmm... a chocolate bunny\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 7079 };\n\t\t\tbreak;\n\n\t\tcase 33289:\n\t\t\titemDef.name = \"Pet Milkie\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"mmm... a chocolate bunny\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 6040 };\n\t\t\tbreak;\n\n\t\tcase 33290:\n\t\t\titemDef.name = \"Pet Goldie\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"oh wow... a rare golden bunny!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 9152 };\n\t\t\tbreak;\n\n\t\tcase 33291:\n\t\t\titemDef.name = \"Pet Blue\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"A blue bunny... kinda looks like the easter bunny!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 35321 };\n\t\t\tbreak;\n\n\t\tcase 33292:\n\t\t\titemDef.name = \"Crazed bunny\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 23901;\n\t\t\titemDef.modelZoom = 500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"What a bloody mess...\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5413, 5417, 5421 };\n\t\t\titemDef.originalModelColors = new int[] { 935, 111, 127 };\n\t\t\tbreak;\n\n\t\tcase 33293:\n\t\t\titemDef.name = \"Peter Rabbit\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 28602;\n\t\t\titemDef.modelZoom = 500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"Hi Peter!\";\n\t\t\tbreak;\n\n\t\tcase 33294:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947 };\n\t\t\titemDef.originalModelColors = new int[] { 8128 };\n\t\t\tbreak;\n\n\t\tcase 33295:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947, 8301 };\n\t\t\titemDef.originalModelColors = new int[] { 8128, 25511 };\n\t\t\tbreak;\n\n\t\tcase 33296:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947, 8301 };\n\t\t\titemDef.originalModelColors = new int[] { 8128, 38835 };\n\t\t\tbreak;\n\n\t\tcase 33297:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947, 8301 };\n\t\t\titemDef.originalModelColors = new int[] { 8128, 947 };\n\t\t\tbreak;\n\n\t\tcase 33305:\n\t\t\titemDef.name = \"$10 bond\";\n\t\t\titemDef.description = \"$10 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 84, 84, 84, 84, 84, 84, 84 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33306:\n\t\t\titemDef.name = \"$25 bond\";\n\t\t\titemDef.description = \"$25 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 87, 87, 87, 87, 87, 87, 87 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33307:\n\t\t\titemDef.name = \"$50 bond\";\n\t\t\titemDef.description = \"$50 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 65, 65, 65, 65, 65, 65, 65 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33308:\n\t\t\titemDef.name = \"$100 bond\";\n\t\t\titemDef.description = \"$25 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 75, 75, 75, 75, 75, 75, 75 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33309:\n\t\t\titemDef.name = \"$200 bond\";\n\t\t\titemDef.description = \"$200 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 88, 88, 88, 88, 88, 88, 88 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33310:\n\t\t\titemDef.name = \"$500 bond\";\n\t\t\titemDef.description = \"$500 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 85, 85, 85, 85, 85, 85, 85 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33311:\n\t\t\titemDef.name = \"$1000 bond\";\n\t\t\titemDef.description = \"$1000 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 86, 86, 86, 86, 86, 86, 86 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33312:\n\t\t\titemDef.name = \"Armadyl battlestaff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60332;\n\t\t\titemDef.maleModel = 60333;\n\t\t\titemDef.femaleModel = 60333;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 225;\n\t\t\titemDef.modelRotation2 = 1994;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\n\t\tcase 33313:\n\t\t\titemDef.name = \"Colossal platebody\";\n\t\t\titemDef.description = \"Colossal platebody.\";\n\t\t\titemDef.modelId = 60323;\n\t\t\titemDef.maleModel = 60324;\n\t\t\titemDef.femaleModel = 60324;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33314:\n\t\t\titemDef.name = \"Colossal platelegs\";\n\t\t\titemDef.description = \"Colossal platelegs.\";\n\t\t\titemDef.modelId = 60325;\n\t\t\titemDef.maleModel = 60326;\n\t\t\titemDef.femaleModel = 60326;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33315:\n\t\t\titemDef.name = \"Colossal boots\";\n\t\t\titemDef.description = \"Colossal boots.\";\n\t\t\titemDef.modelId = 60329;\n\t\t\titemDef.maleModel = 60329;\n\t\t\titemDef.femaleModel = 60329;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33316:\n\t\t\titemDef.name = \"Colossal gloves\";\n\t\t\titemDef.description = \"Colossal gloves.\";\n\t\t\titemDef.modelId = 60330;\n\t\t\titemDef.maleModel = 60331;\n\t\t\titemDef.femaleModel = 60331;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33317:\n\t\t\titemDef.name = \"Colossal helmet\";\n\t\t\titemDef.description = \"Colossal helmet.\";\n\t\t\titemDef.modelId = 60327;\n\t\t\titemDef.maleModel = 60328;\n\t\t\titemDef.femaleModel = 60328;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33318:\n\t\t\titemDef.name = \"Polypore staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60334;\n\t\t\titemDef.maleModel = 60335;\n\t\t\titemDef.femaleModel = 60335;\n\t\t\titemDef.modelZoom = 3750;\n\t\t\titemDef.modelRotation1 = 1454;\n\t\t\titemDef.modelRotation2 = 997;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\n\t\tcase 33319:\n\t\t\titemDef.name = \"Ganodermic platebody\";\n\t\t\titemDef.description = \"Ganodermic platebody.\";\n\t\t\titemDef.modelId = 60338;\n\t\t\titemDef.maleModel = 60339;\n\t\t\titemDef.femaleModel = 60339;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33320:\n\t\t\titemDef.name = \"Ganodermic platelegs\";\n\t\t\titemDef.description = \"Ganodermic platelegs.\";\n\t\t\titemDef.modelId = 60340;\n\t\t\titemDef.maleModel = 60341;\n\t\t\titemDef.femaleModel = 60341;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33321:\n\t\t\titemDef.name = \"Ganodermic helmet\";\n\t\t\titemDef.description = \"Ganodermic helmet.\";\n\t\t\titemDef.modelId = 60336;\n\t\t\titemDef.maleModel = 60337;\n\t\t\titemDef.femaleModel = 60337;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33322:\n\t\t\titemDef.name = \"Grotesque platebody\";\n\t\t\titemDef.description = \"Grosteq platebody.\";\n\t\t\titemDef.modelId = 60347;\n\t\t\titemDef.maleModel = 60348;\n\t\t\titemDef.femaleModel = 60348;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33323:\n\t\t\titemDef.name = \"Grotesque platelegs\";\n\t\t\titemDef.description = \"Grosteq platelegs.\";\n\t\t\titemDef.modelId = 60349;\n\t\t\titemDef.maleModel = 60350;\n\t\t\titemDef.femaleModel = 60350;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33324:\n\t\t\titemDef.name = \"Grotesque helmet\";\n\t\t\titemDef.description = \"Grosteqc helmet.\";\n\t\t\titemDef.modelId = 60345;\n\t\t\titemDef.maleModel = 60346;\n\t\t\titemDef.femaleModel = 60346;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33325:\n\t\t\titemDef.name = \"Grotesque cape\";\n\t\t\titemDef.description = \"Grosteq cape.\";\n\t\t\titemDef.modelId = 60351;\n\t\t\titemDef.maleModel = 60352;\n\t\t\titemDef.femaleModel = 60352;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33326:\n\t\t\titemDef.name = \"Stunning Hammer\";\n\t\t\titemDef.description = \"Has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60353;\n\t\t\titemDef.maleModel = 60354;\n\t\t\titemDef.femaleModel = 60354;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1985;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\n\t\tcase 33327:\n\t\t\titemDef.name = \"Stunning Katagon platebody\";\n\t\t\titemDef.description = \"has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60356;\n\t\t\titemDef.maleModel = 60357;\n\t\t\titemDef.femaleModel = 60357;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33328:\n\t\t\titemDef.name = \"Stunning Katagon platelegs\";\n\t\t\titemDef.description = \"has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60358;\n\t\t\titemDef.maleModel = 60359;\n\t\t\titemDef.femaleModel = 60359;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33329:\n\t\t\titemDef.name = \"Stunning Katagon helmet\";\n\t\t\titemDef.description = \"has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60360;\n\t\t\titemDef.maleModel = 60361;\n\t\t\titemDef.femaleModel = 60361;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33331:\n\t\t\titemDef.name = \"Ancient platebody\";\n\t\t\titemDef.description = \"Ancient platebody.\";\n\t\t\titemDef.modelId = 60366;\n\t\t\titemDef.maleModel = 60367;\n\t\t\titemDef.femaleModel = 60367;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33332:\n\t\t\titemDef.name = \"Ancient platelegs\";\n\t\t\titemDef.description = \"Ancient platelegs.\";\n\t\t\titemDef.modelId = 60368;\n\t\t\titemDef.maleModel = 60369;\n\t\t\titemDef.femaleModel = 60369;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33334:\n\t\t\titemDef.name = \"Ancient boots\";\n\t\t\titemDef.description = \"Ancient boots.\";\n\t\t\titemDef.modelId = 60372;\n\t\t\titemDef.maleModel = 60372;\n\t\t\titemDef.femaleModel = 60372;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33335:\n\t\t\titemDef.name = \"Ancient gloves\";\n\t\t\titemDef.description = \"Ancient gloves.\";\n\t\t\titemDef.modelId = 60370;\n\t\t\titemDef.maleModel = 60371;\n\t\t\titemDef.femaleModel = 60371;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33336:\n\t\t\titemDef.name = \"Ancient helmet\";\n\t\t\titemDef.description = \"Ancient helmet.\";\n\t\t\titemDef.modelId = 60364;\n\t\t\titemDef.maleModel = 60365;\n\t\t\titemDef.femaleModel = 60365;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33341:\n\t\t\titemDef.name = \"Vanguard helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60391;\n\t\t\titemDef.maleModel = 60392;\n\t\t\titemDef.femaleModel = 60392;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33342:\n\t\t\titemDef.name = \"Vanguard platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60393;\n\t\t\titemDef.maleModel = 60394;\n\t\t\titemDef.femaleModel = 60394;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33343:\n\t\t\titemDef.name = \"Vanguard platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60395;\n\t\t\titemDef.maleModel = 60396;\n\t\t\titemDef.femaleModel = 60396;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33344:\n\t\t\titemDef.name = \"Vanguard boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60398;\n\t\t\titemDef.maleModel = 60398;\n\t\t\titemDef.femaleModel = 60398;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33345:\n\t\t\titemDef.name = \"Vanguard gloves\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60373;\n\t\t\titemDef.maleModel = 60397;\n\t\t\titemDef.femaleModel = 60397;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33346:\n\t\t\titemDef.name = \"Celestial staff of light\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60401;\n\t\t\titemDef.maleModel = 60402;\n\t\t\titemDef.femaleModel = 60402;\n\t\t\titemDef.modelZoom = 3200;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 101 };\n\t\t\titemDef.originalModelColors = new int[] { 12 };\n\t\t\titemDef.maleOffset = -6;\n\t\t\titemDef.femaleOffset = -6;\n\t\t\tbreak;\n\n\t\tcase 33347:\n\t\t\titemDef.name = \"Hood of sorrow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60438;\n\t\t\titemDef.maleModel = 60403;\n\t\t\titemDef.femaleModel = 60403;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33348:\n\t\t\titemDef.name = \"Celestial robe top\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60404;\n\t\t\titemDef.maleModel = 60405;\n\t\t\titemDef.femaleModel = 60405;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33349:\n\t\t\titemDef.name = \"Celestial robe legs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60406;\n\t\t\titemDef.maleModel = 60407;\n\t\t\titemDef.femaleModel = 60407;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33350:\n\t\t\titemDef.name = \"Primal 2h sword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60408;\n\t\t\titemDef.maleModel = 60409;\n\t\t\titemDef.femaleModel = 60409;\n\t\t\titemDef.modelZoom = 1701;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.modelRotation2 = 1529;\n\t\t\titemDef.modelRotation1 = 1713;\n\t\t\titemDef.modelRotationY = 898;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33353:\n\t\t\titemDef.name = \"Primal longsword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60417;\n\t\t\titemDef.maleModel = 60418;\n\t\t\titemDef.femaleModel = 60418;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.modelRotation2 = 1793;\n\t\t\titemDef.modelRotation1 = 1473;\n\t\t\titemDef.modelRotationY = 1121;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33354:\n\t\t\titemDef.name = \"Primal maul\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60419;\n\t\t\titemDef.maleModel = 60420;\n\t\t\titemDef.femaleModel = 60420;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 525;\n\t\t\titemDef.modelRotation2 = 350;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33359:\n\t\t\titemDef.name = \"Primal rapier\";\n\t\t\titemDef.description = \"Good for fighting the ...\";\n\t\t\titemDef.modelId = 60433;\n\t\t\titemDef.maleModel = 60433;\n\t\t\titemDef.femaleModel = 60433;\n\t\t\titemDef.modelZoom = 1300;\n\t\t\titemDef.modelRotation1 = 1401;\n\t\t\titemDef.modelRotation2 = 1724;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 15;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33360:\n\t\t\titemDef.name = \"Primal spear\";\n\t\t\titemDef.description = \"Good for fighting the Corperal Beast.\";\n\t\t\titemDef.modelId = 60434;\n\t\t\titemDef.maleModel = 60435;\n\t\t\titemDef.femaleModel = 60435;\n\t\t\titemDef.modelZoom = 1711;\n\t\t\titemDef.modelRotation1 = 485;\n\t\t\titemDef.modelRotation2 = 391;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -10;\n\t\t\titemDef.maleOffset = -10;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33361:\n\t\t\titemDef.name = \"Primal warhammer\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60436;\n\t\t\titemDef.maleModel = 60437;\n\t\t\titemDef.femaleModel = 60437;\n\t\t\titemDef.modelZoom = 1330;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 148;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33362:\n\t\t\titemDef.name = \"Chitin helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60445;\n\t\t\titemDef.maleModel = 60446;\n\t\t\titemDef.femaleModel = 60446;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33364:\n\t\t\titemDef.name = \"Chitin platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60447;\n\t\t\titemDef.maleModel = 60448;\n\t\t\titemDef.femaleModel = 60448;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33365:\n\t\t\titemDef.name = \"Chitin platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60449;\n\t\t\titemDef.maleModel = 60450;\n\t\t\titemDef.femaleModel = 60450;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33366:\n\t\t\titemDef.name = \"Chitin cape\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60443;\n\t\t\titemDef.maleModel = 60444;\n\t\t\titemDef.femaleModel = 60444;\n\t\t\titemDef.modelZoom = 1500;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = -4;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33367:\n\t\t\titemDef.name = \"Supreme void helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60467;\n\t\t\titemDef.maleModel = 60464;\n\t\t\titemDef.femaleModel = 60464;\n\t\t\titemDef.modelZoom = 900;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33368:\n\t\t\titemDef.name = \"Supreme void robe top\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60468;\n\t\t\titemDef.maleModel = 60465;\n\t\t\titemDef.femaleModel = 60465;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33369:\n\t\t\titemDef.name = \"Supreme void robe\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60469;\n\t\t\titemDef.maleModel = 60466;\n\t\t\titemDef.femaleModel = 60466;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33370:\n\t\t\titemDef.name = \"Korasi's sword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60471;\n\t\t\titemDef.maleModel = 60470;\n\t\t\titemDef.femaleModel = 60470;\n\t\t\titemDef.modelZoom = 1744;\n\t\t\titemDef.modelRotation1 = 330;\n\t\t\titemDef.modelRotation2 = 1505;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -4;\n\t\t\titemDef.femaleOffset = -4;\n\t\t\tbreak;\n\n\t\tcase 33371:\n\t\t\titemDef.name = \"Spiked slayer helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60475;\n\t\t\titemDef.maleModel = 60476;\n\t\t\titemDef.femaleModel = 60476;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33372:\n\t\t\titemDef.name = \"Slayer platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60478;\n\t\t\titemDef.maleModel = 60479;\n\t\t\titemDef.femaleModel = 60479;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33373:\n\t\t\titemDef.name = \"Slayer platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60474;\n\t\t\titemDef.maleModel = 60477;\n\t\t\titemDef.femaleModel = 60477;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33374:\n\t\t\titemDef.name = \"Slayer boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60472;\n\t\t\titemDef.maleModel = 60473;\n\t\t\titemDef.femaleModel = 60473;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 164;\n\t\t\titemDef.modelRotation2 = 156;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33375:\n\t\t\titemDef.name = \"Blood Justiciar helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60482;\n\t\t\titemDef.maleModel = 60483;\n\t\t\titemDef.femaleModel = 60483;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33376:\n\t\t\titemDef.name = \"Blood Justiciar platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60484;\n\t\t\titemDef.maleModel = 60485;\n\t\t\titemDef.femaleModel = 60485;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33377:\n\t\t\titemDef.name = \"Blood justiciar platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60486;\n\t\t\titemDef.maleModel = 60487;\n\t\t\titemDef.femaleModel = 60487;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33378:\n\t\t\titemDef.name = \"Blood justiciar boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60488;\n\t\t\titemDef.maleModel = 60488;\n\t\t\titemDef.femaleModel = 60488;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 164;\n\t\t\titemDef.modelRotation2 = 156;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33379:\n\t\t\titemDef.name = \"Blood justiciar gloves\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60489;\n\t\t\titemDef.maleModel = 60490;\n\t\t\titemDef.femaleModel = 60490;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33380:\n\t\t\titemDef.name = \"Blood scythe of vitur\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60480;\n\t\t\titemDef.maleModel = 60481;\n\t\t\titemDef.femaleModel = 60481;\n\t\t\titemDef.modelZoom = 3850;\n\t\t\titemDef.modelRotation1 = 727;\n\t\t\titemDef.modelRotation2 = 997;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33381:\n\t\t\titemDef.name = \"Skiller cape\";\n\t\t\titemDef.description = \"Skiller cape.\";\n\t\t\titemDef.modelId = 60494;\n\t\t\titemDef.maleModel = 60493;\n\t\t\titemDef.femaleModel = 60492;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33382:\n\t\t\titemDef.name = \"Justiciar faceguard (zamorak)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33383:\n\t\t\titemDef.name = \"Justiciar faceguard (guthix)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33384:\n\t\t\titemDef.name = \"Justiciar faceguard (saradomin)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33385:\n\t\t\titemDef.name = \"Justiciar faceguard (ancient)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33387:\n\t\t\titemDef.name = \"Justiciar faceguard (bandos)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33389:\n\t\t\titemDef.name = \"Justiciar faceguard (armadyl)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33390:\n\t\t\titemDef.name = \"Justiciar chestguard (zamorak)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33391:\n\t\t\titemDef.name = \"Justiciar chestguard (guthix)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33392:\n\t\t\titemDef.name = \"Justiciar chestguard (saradomin)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33393:\n\t\t\titemDef.name = \"Justiciar chestguard (ancient)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33394:\n\t\t\titemDef.name = \"Justiciar chestguard (bandos)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33395:\n\t\t\titemDef.name = \"Justiciar chestguard (armadyl)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33396:\n\t\t\titemDef.name = \"Justiciar legguards (zamorak)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33397:\n\t\t\titemDef.name = \"Justiciar legguards (guthix)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33398:\n\t\t\titemDef.name = \"Justiciar legguards (saradomin)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33399:\n\t\t\titemDef.name = \"Justiciar legguards (ancient)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33400:\n\t\t\titemDef.name = \"Justiciar legguards (bandos)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33401:\n\t\t\titemDef.name = \"Justiciar legguards (armadyl)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33402:\n\t\t\titemDef.name = \"Pet andy\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 50169;\n\t\t\titemDef.modelZoom = 1500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33403:\n\t\t\titemDef.name = \"Pet mod divine\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 14283;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33404:\n\t\t\titemDef.name = \"Celestial fairy\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60491;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 947 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 937, 11200 };\n\t\t\titemDef.originalModelColors = new int[] { 42663, 41883 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33405:\n\t\t\titemDef.name = \"Lava partyhat (red)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33406:\n\t\t\titemDef.name = \"Lava partyhat (green)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33407:\n\t\t\titemDef.name = \"Lava partyhat (cyan)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33408:\n\t\t\titemDef.name = \"Lava partyhat (purple)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33409:\n\t\t\titemDef.name = \"Infernal partyhat (blue)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33410:\n\t\t\titemDef.name = \"Infernal partyhat (green)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33411:\n\t\t\titemDef.name = \"Infernal partyhat (purple)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33412:\n\t\t\titemDef.name = \"Infernal partyhat (rainbow)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33413:\n\t\t\titemDef.name = \"Celestial partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33414:\n\t\t\titemDef.name = \"Blood partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33415:\n\t\t\titemDef.name = \"Shadow partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33416:\n\t\t\titemDef.name = \"Light blue partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33417:\n\t\t\titemDef.name = \"Easter partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33418:\n\t\t\titemDef.name = \"Dark sparkle partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33419:\n\t\t\titemDef.name = \"Rainbow partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33420:\n\t\t\titemDef.name = \"Fire partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33421:\n\t\t\titemDef.name = \"Pet star sprite\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60506;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33422:\n\t\t\titemDef.name = \"Stargaze Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 61110;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\t// itemDef.modifiedModelColors = new int[] {22410, 2999};\n\t\t\t// itemDef.originalModelColors = new int[] {35321, 350};\n\t\t\titemDef.description = \"none\";\n\t\t\tbreak;\n\n\t\tcase 33423:\n\t\t\titemDef.name = \"Star Dust\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Exchange\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modelId = 60496;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 279;\n\t\t\titemDef.modelRotation2 = 1994;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 47;\n\t\t\t// itemDef.modifiedModelColors = new int[] {22410, 2999};\n\t\t\t// itemDef.originalModelColors = new int[] {35321, 350};\n\t\t\titemDef.description = \"none\";\n\t\t\tbreak;\n\n\t\tcase 33424:\n\t\t\titemDef.name = \"Blood twisted bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32799;\n\t\t\titemDef.maleModel = 32674;\n\t\t\titemDef.femaleModel = 32674;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10318, 10334 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 66, 66 };\n\t\t\titemDef.modifiedModelColors = new int[] { 14236, 13223 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33425:\n\t\t\titemDef.name = \"Celestial crow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60507;\n\t\t\titemDef.modelZoom = 1000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10382 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 10378, 10502 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33426:\n\t\t\titemDef.name = \"Celestial penguin\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60508;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10343 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 16, 12, 20, 24, 8, 10332, 10337 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0, 0, 0, 0, 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33427:\n\t\t\titemDef.name = \"Celestial snake\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60509;\n\t\t\titemDef.modelZoom = 1800;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10644, 10512 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78, 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 10413, 10405, 10524 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33428:\n\t\t\titemDef.name = \"Celestial scorpion\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60510;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 142 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 4884, 4636, 3974, 4525, 4645 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0, 0, 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33429:\n\t\t\titemDef.name = \"Armadyl dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\tbreak;\n\n\t\tcase 33430:\n\t\t\titemDef.name = \"Guthix dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\tbreak;\n\n\t\tcase 33431:\n\t\t\titemDef.name = \"Zamorak dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\tbreak;\n\n\t\tcase 33432:\n\t\t\titemDef.name = \"Ancient dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\tbreak;\n\n\t\tcase 33433:\n\t\t\titemDef.name = \"Bandos dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\tbreak;\n\n\t\tcase 33434:\n\t\t\titemDef.name = \"Saradomin dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\tbreak;\n\n\t\tcase 33435:\n\t\t\titemDef.name = \"Celestial egg\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 7171;\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelRotation2 = 16;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 476 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Hatch\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\tbreak;\n\n\t\tcase 33436:\n\t\t\titemDef.name = \"Elite void top (placeholder)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 10586;\n\t\t\titemDef.maleModel = 10687;\n\t\t\titemDef.anInt188 = 10681;\n\t\t\titemDef.femaleModel = 10694;\n\t\t\titemDef.anInt164 = 10688;\n\t\t\titemDef.modelZoom = 1221;\n\t\t\titemDef.modelRotation1 = 459;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\t// itemDef.originalTextureColors = new int [] { 695};\n\t\t\t// itemDef.modifiedTextureColors = new int [] { 66};\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33437:\n\t\t\titemDef.name = \"Elite void robe (placeholder)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60528;\n\t\t\titemDef.maleModel = 60526;\n\t\t\titemDef.femaleModel = 60527;\n\t\t\titemDef.modelZoom = 2105;\n\t\t\titemDef.modelRotation1 = 525;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\t// itemDef.originalTextureColors = new int [] { 695};\n\t\t\t// itemDef.modifiedTextureColors = new int [] { 66};\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33438:\n\t\t\titemDef.name = \"Blood chest\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60516;\n\t\t\titemDef.modelZoom = 2640;\n\t\t\titemDef.modelRotation1 = 114;\n\t\t\titemDef.modelRotation2 = 1883;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33439:\n\t\t\titemDef.name = \"Blood bird\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60517;\n\t\t\titemDef.modelZoom = 2768;\n\t\t\titemDef.modelRotation1 = 141;\n\t\t\titemDef.modelRotation2 = 1790;\n\t\t\titemDef.modelOffset1 = -8;\n\t\t\titemDef.modelOffset2 = -13;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\titemDef.originalTextureColors = new int[] { 1946, 2983, 6084, 2735, 5053, 6082, 4013, 2733, 4011, 2880,\n\t\t\t\t\t8150 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 };\n\t\t\tbreak;\n\n\t\tcase 33440:\n\t\t\titemDef.name = \"Blood Death\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60441;\n\t\t\titemDef.modelZoom = 16000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33442:\n\t\t\titemDef.name = \"10 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Claim\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33446:\n\t\t\titemDef.name = \"10 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Claim\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33450:\n\t\t\titemDef.name = \"10 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Claim\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33454:\n\t\t\titemDef.name = \"10 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33458:\n\t\t\titemDef.name = \"10 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33462:\n\t\t\titemDef.name = \"10 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33443:\n\t\t\titemDef.name = \"30 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33447:\n\t\t\titemDef.name = \"30 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33451:\n\t\t\titemDef.name = \"30 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33455:\n\t\t\titemDef.name = \"30 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33459:\n\t\t\titemDef.name = \"30 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33463:\n\t\t\titemDef.name = \"30 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33444:\n\t\t\titemDef.name = \"60 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33448:\n\t\t\titemDef.name = \"60 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33452:\n\t\t\titemDef.name = \"60 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33456:\n\t\t\titemDef.name = \"60 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33460:\n\t\t\titemDef.name = \"60 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33464:\n\t\t\titemDef.name = \"60 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33445:\n\t\t\titemDef.name = \"120 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33449:\n\t\t\titemDef.name = \"120 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33453:\n\t\t\titemDef.name = \"120 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33457:\n\t\t\titemDef.name = \"120 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33461:\n\t\t\titemDef.name = \"120 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33465:\n\t\t\titemDef.name = \"120 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33466:\n\t\t\titemDef.name = \"Deathtouched dart\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60534;\n\t\t\titemDef.maleModel = 60533;\n\t\t\titemDef.femaleModel = 60533;\n\t\t\titemDef.modelZoom = 1053;\n\t\t\titemDef.modelRotation1 = 471;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33467:\n\t\t\titemDef.name = \"Justiciar boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60535;\n\t\t\titemDef.maleModel = 60535;\n\t\t\titemDef.femaleModel = 60535;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 164;\n\t\t\titemDef.modelRotation2 = 156;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33468:\n\t\t\titemDef.name = \"Justiciar gloves\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 31022;\n\t\t\titemDef.maleModel = 31006;\n\t\t\titemDef.femaleModel = 31013;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 636;\n\t\t\titemDef.modelRotation2 = 2015;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 123, 70 };\n\t\t\titemDef.originalModelColors = new int[] { 6736, 59441 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33469:\n\t\t\titemDef.name = \"Magic mushroom\";\n\t\t\titemDef.description = \"offers a 10% droprate increase while this pet follows you.\";\n\t\t\titemDef.modelId = 60532;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33470:\n\t\t\titemDef.name = \"Twisted staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60538;\n\t\t\titemDef.maleModel = 60539;\n\t\t\titemDef.femaleModel = 60539;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33471:\n\t\t\titemDef.name = \"Cowboy hat\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60540;\n\t\t\titemDef.maleModel = 60541;\n\t\t\titemDef.femaleModel = 60541;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 108;\n\t\t\titemDef.modelRotation2 = 1535;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33472:\n\t\t\titemDef.name = \"Stick\";\n\t\t\titemDef.description = \"Careful of that chub.\";\n\t\t\titemDef.modelId = 60545;\n\t\t\titemDef.maleModel = 60545;\n\t\t\titemDef.femaleModel = 60545;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33473:\n\t\t\titemDef.name = \"#1 Tob cape\";\n\t\t\titemDef.description = \"Reward to the first to complete tob solo and in a team.\";\n\t\t\titemDef.modelId = 60551;\n\t\t\titemDef.maleModel = 60550;\n\t\t\titemDef.femaleModel = 60550;\n\t\t\titemDef.modelZoom = 2295;\n\t\t\titemDef.modelRotation1 = 367;\n\t\t\titemDef.modelRotation2 = 1212;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33474:\n\t\t\titemDef.name = \"Supreme void upgrade kit\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 4847;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 163;\n\t\t\titemDef.modelRotation2 = 73;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { -32709, 10295, 10304, 10287, 10275, 10283 };\n\t\t\titemDef.originalModelColors = new int[] { 10, 10, 10, 10, 10, 10 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33475:\n\t\t\titemDef.name = \"Hunter's penguin\";\n\t\t\titemDef.description = \"the one and only's pet.\";\n\t\t\titemDef.modelId = 60548;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33476:\n\t\t\titemDef.name = \"Chef Harambe\";\n\t\t\titemDef.description = \"I like to dip my balls in a deep fryer.\";\n\t\t\titemDef.modelId = 60921;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33477:\n\t\t\titemDef.name = \"Void knight champion jr\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60463;\n\t\t\titemDef.modelZoom = 14000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33478:\n\t\t\titemDef.name = \"Custom pet token\";\n\t\t\titemDef.description = \"Trade this to corey after filling out a form on the forums post custom pets\";\n\t\t\titemDef.modelId = 13838;\n\t\t\titemDef.modelZoom = 530;\n\t\t\titemDef.modelRotation1 = 415;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33479:\n\t\t\titemDef.name = \"Mr jaycorr\";\n\t\t\titemDef.description = \"The autistic one.\";\n\t\t\titemDef.modelId = 60592;\n\t\t\titemDef.modelZoom = 7500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33480:\n\t\t\titemDef.name = \"Broom broom\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60593;\n\t\t\titemDef.maleModel = 60593;\n\t\t\titemDef.femaleModel = 60593;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33481:\n\t\t\titemDef.name = \"Test\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 11773:\n\t\tcase 11771:\n\t\tcase 11770:\n\t\tcase 11772:\n\t\t\titemDef.anInt196 += 45;\n\t\t\tbreak;\n\t\tcase 22610:\n\t\t\titemDef.name = \"Vesta's spear (deg)\";\n\t\t\tbreak;\n\t\tcase 22614:\n\t\t\titemDef.name = \"Vesta's longsword (deg)\";\n\t\t\tbreak;\n\t\tcase 22616:\n\t\t\titemDef.name = \"Vesta's chainbody (deg)\";\n\t\t\tbreak;\n\t\tcase 22619:\n\t\t\titemDef.name = \"Vesta's plateskirt (deg)\";\n\t\t\tbreak;\n\t\tcase 22622:\n\t\t\titemDef.name = \"Statius's warhammer (deg)\";\n\t\t\tbreak;\n\t\tcase 22625:\n\t\t\titemDef.name = \"Statius's full helm (deg)\";\n\t\t\tbreak;\n\t\tcase 22628:\n\t\t\titemDef.name = \"Statius's platebody (deg)\";\n\t\t\tbreak;\n\t\tcase 22631:\n\t\t\titemDef.name = \"Statius's platelegs (deg)\";\n\t\t\tbreak;\n\t\tcase 22638:\n\t\t\titemDef.name = \"Morrigan's coif (deg)\";\n\t\t\tbreak;\n\t\tcase 22641:\n\t\t\titemDef.name = \"Morrigan's leather body (deg)\";\n\t\t\tbreak;\n\t\tcase 22644:\n\t\t\titemDef.name = \"Morrigan's leather chaps (deg)\";\n\t\t\tbreak;\n\t\tcase 22647:\n\t\t\titemDef.name = \"Zuriel's staff (deg)\";\n\t\t\tbreak;\n\t\tcase 22650:\n\t\t\titemDef.name = \"Zuriel's hood (deg)\";\n\t\t\tbreak;\n\t\tcase 22653:\n\t\t\titemDef.name = \"Zuriel's robe top (deg)\";\n\t\t\tbreak;\n\t\tcase 22656:\n\t\t\titemDef.name = \"Zuriel's robe bottom (deg)\";\n\t\t\tbreak;\n\n\t\tcase 13303:\n\t\t\titemDef.name = \"Event Key (Tarn)\";\n\t\t\titemDef.description = \"Use this to open the Event Boss chest.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 8128 };\n\t\t\titemDef.originalModelColors = new int[] { 933 };\n\t\t\tbreak;\n\t\tcase 13302:\n\t\t\titemDef.name = \"Event Key (Graardor)\";\n\t\t\titemDef.description = \"Use this to open the Event Boss chest.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 8128 };\n\t\t\titemDef.originalModelColors = new int[] { 933 };\n\t\t\tbreak;\n\t\tcase 13305:\n\t\t\titemDef.name = \"Tastey-Looking Key\";\n\t\t\titemDef.description = \"Use this to open the Event Boss chest.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 8128 };\n\t\t\titemDef.originalModelColors = new int[] { 933 };\n\t\t\tbreak;\n\t\tcase 2697:\n\t\t\titemDef.name = \"$10 Scroll\";\n\t\t\titemDef.description = \"Get donor status at a cheaper cost!\";\n\t\t\tbreak;\n\t\tcase 2698:\n\t\t\titemDef.name = \"$50 Scroll\";\n\t\t\titemDef.description = \"Read this scroll to be rewarded with the Super Donator status.\";\n\t\t\tbreak;\n\t\tcase 2699:\n\t\t\titemDef.name = \"$100 Donator\";\n\t\t\titemDef.description = \"Read this scroll to be rewarded with the Extreme Donator status.\";\n\t\t\tbreak;\n\t\tcase 2700:\n\t\t\titemDef.name = \"$5 Scroll\";\n\t\t\titemDef.description = \"Read this scroll to be rewarded with the Legendary Donator status.\";\n\t\t\tbreak;\n\t\tcase 1464:\n\t\t\titemDef.name = \"Vote ticket\";\n\t\t\titemDef.description = \"This ticket can be exchanged for a voting point.\";\n\t\t\tbreak;\n\n\t\tcase 11739:\n\t\t\titemDef.name = \"Daily reward box\";\n\t\t\titemDef.description = \"Open this box for a daily reward.\";\n\t\t\tbreak;\n\n\t\tcase 13066:// super set\n\t\tcase 12873:// barrows\n\t\tcase 12875:\n\t\tcase 12877:\n\t\tcase 12879:\n\t\tcase 12881:\n\t\tcase 12883:\n\t\tcase 12789:// clue box\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public Collection<Item> shopItems() {\n\t\treturn this.itemRepository.shopItems();\n\t}", "public ShoppingCart() {\n\t\t_items = new ArrayList<Product>();\n\t}", "@SideOnly(Side.CLIENT)\n/* 34: */ public void getSubItems(Item itemId, CreativeTabs table, List list)\n/* 35: */ {\n/* 36:35 */ for (int i = 0; i < 13; i++)\n/* 37: */ {\n/* 38:36 */ ItemStack is = new ItemStack(itemId);\n/* 39:37 */ is.stackTagCompound = new NBTTagCompound();\n/* 40:38 */ is.stackTagCompound.setShort(\"Shield\", (short)i);\n/* 41:39 */ list.add(is);\n/* 42: */ }\n/* 43: */ }", "public void popItems() {\n\t\t\n\t\tItemList.add(HPup);\n\t\tItemList.add(SHPup);\n\t\tItemList.add(DMGup);\n\t\tItemList.add(SDMGup);\n\t\tItemList.add(EVup);\n\t\tItemList.add(SEVup);\n\t\t\n\t\trandomDrops.add(HPup);\n\t\trandomDrops.add(SHPup);\n\t\trandomDrops.add(DMGup);\n\t\trandomDrops.add(SDMGup);\n\t\trandomDrops.add(EVup);\n\t\trandomDrops.add(SEVup);\n\t\t\n\t\tcombatDrops.add(SHPup);\n\t\tcombatDrops.add(SDMGup);\n\t\tcombatDrops.add(SEVup);\n\t}", "void addList(ShoppingList _ShoppingList);", "@RequestMapping(method = RequestMethod.GET,value = \"/\")\n public String HomePage(Model model, HttpSession session){\n model.addAttribute(\"listBook\",bookService.books());\n\n ShoppingCart shoppingCart = (ShoppingCart) session.getAttribute(\"list-order\");\n\n if (shoppingCart != null){\n\n Set<CartItem> listCartItem = new HashSet<>();\n for (Long hashMapKey:shoppingCart.getItems().keySet()\n ) {\n CartItem cartItem = shoppingCart.getItems().get(hashMapKey);\n listCartItem.add(cartItem);\n System.out.println(\"quantity : \" + cartItem.getQuantity());\n System.out.println(\"size list cart : \" + listCartItem.size());\n }\n model.addAttribute(\"listCartItem\",listCartItem);\n }\n\n\n return \"homePage\";\n }", "public void buyItem() {\n List<Gnome> cart = user.getCart();\n String message = \"\";\n List<Gnome> bought = shopFacade.buyGnomes(cart);\n if (!bought.isEmpty()) {\n message = bought.size() + \" items bought\";\n } else {\n message = \"Could not buy any items\";\n }\n userFacade.assignBought(user, bought);\n user.getCart().removeAll(bought);\n cart.removeAll(bought);\n userFacade.setCartToUser(user.getUsername(), cart);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Gnomes\", message);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n }", "public void setArrayListOfItemsToBeDeletedViaNotificationModal() {\n List<WebElement> itemsToBeRemoved = UnavailableItems_Modal.findElements(By.xpath(\".//*[@class='mjr-product-name']\"));\n for (WebElement item : itemsToBeRemoved) {\n listOfDeletedItemNameShoppingCart.add(UtilityHelper.elementGetText(item));\n }\n }", "private void populateItems() {\n \t try {\n \t File myObj = new File(\"items.txt\");\n \t Scanner myReader = new Scanner(myObj);\n \t while (myReader.hasNextLine()) {\n\t \t String data = myReader.nextLine();\n\t \t String[] variables = data.split(\",\");\n\t \t int price = (int) Math.floor(Math.random() * 100); \n\t \t \n\t \t itemList += variables[0] + \",\"+ variables[1] +\",\" + \"0\" + \", \"+ \",\"+price + \",\";\n\t \t Item x = new Item(variables[0], 0, \"\", price, variables[1]);\n\t \t items.add(x);\n \t }\n \t myReader.close();\n \t } catch (FileNotFoundException e) {\n \t System.out.println(\"An error occurred.\");\n \t e.printStackTrace();\n \t }\n\t\t\n\t}", "private static ArrayList<String> loadShop(File file) {\n System.out.println(\"Loading shop \" + file.getName() + \"...\");\n\n ArrayList<String> temp = new ArrayList<>();\n\n try {\n //load file into a list of strings\n String lineRead;\n ArrayList<String> lines = new ArrayList<>();\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(\"./plugins/SkyblockShop/\" + file.getName()), \"UTF-8\"));\n while ((lineRead = bufferedReader.readLine()) != null) {\n lines.add(ChatColor.translateAlternateColorCodes('&', lineRead));\n }\n bufferedReader.close();\n\n //set what number the list is on for counting\n int itemNum = -1;\n\n //parse list of strings\n for (String line : lines) {\n //split line into args\n String[] args = line.trim().split(\":\");\n\n //check validity\n if (args.length == 2) {\n //switch for line\n switch(args[0].toUpperCase()) {\n case(\"ITEM\"):\n //move to next item and start adding it\n itemNum++;\n temp.add(args[1]);\n break;\n case(\"NAME\"):\n case(\"CATEGORY\"):\n case(\"SLOT\"):\n case(\"ACTION\"):\n case(\"VALUE\"):\n //add to current item\n temp.set(itemNum, temp.get(itemNum) + \"->\" + args[1]);\n break;\n default:\n break;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"Something went wrong while reading the file!\");\n }\n\n return temp;\n }", "@Override\r\n\t\t\tpublic void itemClick(ItemClickEvent event) {\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"buscar Objects\");\r\n\t\t\t\tidPack = (int) event.getItem().getItemProperty(\"IdPack\").getValue();\r\n\t\t\t\tbuscaObjectsByPacks((int) event.getItem().getItemProperty(\"IdPack\").getValue());\r\n\t\t\t\t\r\n\t\t\t}", "private void basketData() {\n basketViewModel.setBasketListObj(selectedShopId);\n basketViewModel.getAllBasketList().observe(this, resourse -> {\n if (resourse != null) {\n basketViewModel.basketCount = resourse.size();\n if (resourse.size() > 0) {\n setBasketMenuItemVisible(true);\n } else {\n setBasketMenuItemVisible(false);\n }\n }\n });\n }", "@Override\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }", "public void add_to_my_list_process(View v) {\n\n addToCart_flag = false;\n // get current login value saved in sharedpreferences object\n SharedPreferences loginSharedPref = getSharedPreferences(\"LoginData\", MODE_PRIVATE);\n // get current agent id\n final String AgentID = loginSharedPref.getString(\"ID\", \"\");\n // create string\n create_final_string_product();\n /* get all list names into arraylist object */\n ArrayList<String> listNames = get_list_data_from_local_DB(AgentID);\n // display alert box to choose list name by user\n display_list_names(listNames, AgentID);\n // clear all data after adding product into cart\n clear_data();\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "private void equipButtonClicked(final ShopItem shopItem) {\n shopItem.setState(ItemStatusID.EQUIPPED);\n if (shopItem instanceof Shovel) {\n for (Shovel shovel : SHOVELS) {\n if (shovel.equals(shopItem)) {\n continue;\n } else if (shovel.getState() == ItemStatusID.EQUIPPED) {\n shovel.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n } else if (shopItem instanceof Background) {\n for (Background background : BACKGROUNDS) {\n if (background.equals(shopItem)) {\n continue;\n } else if (background.getState() == ItemStatusID.EQUIPPED) {\n background.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n }\n updateUI();\n }", "@Override\n protected void customize(final UserAgentBuilder builder) {\n List<Product> products = request.getProducts();\n if (products != null) {\n for (Product product : products) {\n builder.product(product);\n }\n }\n }", "private void loadGroceryCursor(ArrayList<String> items) {\n groceryCursor = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items);\n groceryList.setAdapter(groceryCursor);\n }", "public String navigatePurchaseorderheaderList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Purchaseorderheader_items\", this.getSelected().getPurchaseorderheaderList());\n }\n return \"/purchaseorderheader/index\";\n }", "private void addNameToShoppingCartPgeArrayList(String productName) {\n productName = productName.replace(\"?\", \"\");\n productName = productName.replace(\"®\", \"\");\n productName = productName.replace(\"™\", \"\");\n listOfShoppingCardItem.add(productName);\n }", "public ShoppingListItem(String product, String amount) {\r\n this.product = product;\r\n this.amount = amount;\r\n }", "public RecyclerViewProductos( List<Producto> lista) {\n this.productoList=lista;\n }", "public void setItems(ItemList items) {\r\n this.items = items;\r\n }", "@Override\n\tpublic void addItems(Workspace workspace) {\n//\t\tSession currentSession = sessionFactory.getCurrentSession();\n//\t\tfor(Cart_items myCart : workspace.getCartItems()) {\t\n//\t\t\tcurrentSession.save(myCart);\n//\t\t}\n\t}", "Items(){\r\n\t\tname=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//Parts to the vaccine[1-3]\r\n\t\t\t\t\"Mysterious Vial\", \"Piece of alien meteorite\",\"Alien X\",\r\n\t\t\t\t//Keys[4-6]\r\n\t\t\t\t\"Mysterious Key\",\"Office Key\",\"Captian's Key\",\r\n\t\t\t\t//suit[7,8]\r\n\t\t\t\t\"Hazmat Suit\",\"Gas Mask\",\r\n\t\t\t\t//vials[9-11]\r\n\t\t\t\t\"Blue Vial\",\"Pink Vial\", \"Gold Vial\",\r\n\t\t\t\t//other[12,13]\r\n\t\t\t\t\"X Files\", \"Demon's Bane Flower\",\"Reinforced Armor\"\r\n\t\t};\r\n\t\tdescription=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//vaccine parts[2-4]\r\n\t\t\t\t\"A special vial coated with a mysterious substance\",\r\n\t\t\t\t\"Part of an alien meteorite that the crew excavated\",\r\n\t\t\t\t\"A powerful allergen that instantly kills one’s immune system and their whole well-being, mutating them into something inhuman\",\r\n\t\t\t\t//keys\r\n\t\t\t\t\"A metal key that must open a door\",\r\n\t\t\t\t\"Looks like a normal key\",\r\n\t\t\t\t\"A metal key used to unlock something\",\r\n\t\t\t\t//Suit\r\n\t\t\t\t\"A full-body suit designed to keep harmful toxins away from the wearer. The face mask is missing, however\",\r\n\t\t\t\t\"A mask that goes over the wearer’s head and filters out all harmful substances in the air\",\r\n\t\t\t\t//Vials\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows light blue\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows bright pink\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows golden yellow\",\r\n\t\t\t\t//other\r\n\t\t\t\t\"Recorded documentation of all experiments and research done while in space. Most importantly it contains reports on events leading up to the virus spreading throughout the ship\",\r\n\t\t\t\t\"A beautiful flower that seems to survive unattached to the ground, the veins running through its petals give a faint glow as a heavenly scent fills the room\",\r\n\t\t\t\t\"A set of fine leather armor with metal plates reinforcing vulnerable areas\"\r\n\t\t};\r\n\t}", "public List<Item> getItemList();", "public String getItems(String name){\n return \"\";\n }", "Items(int quantidade,Produto produto){\n\t\tqntd = quantidade;\n\t\tthis.produto = produto;\n\t\t\n\t}", "public void add_item_button(View v){\n if(expiry_date==0){ //if no expiry date was chosen,\n if(product_name.equals(\"Milk\")){//and if the product is milk, \n expiry_date=7; //set it to the default of 7 days until expiry\n }else{//If the product is bread,\n expiry_date=3;//set it to the default of 7 days until expiry\n }\n }\n Product added_p=new Product(product_name,expiry_date); //added_p : product chosen by the user that they currently own\n added_list.add(added_p); //this product is added to the list \n text=(TextView) findViewById(R.id.added_list);\n String content=\"\";\n for(Product p:added_list){\n content=content+(p.getProduct_name()+\" \"+p.getProduct_exp()+\" days \\n\"); //then displayed to show the user \n }\n text.setText(content);\n }", "@Override\n public void takeOrder(List<Item> restItem, int constID) {\n\n }", "public void setItems(Item items) {\n this.items = items;\n }", "public void process(Page page) {\n \n \tpage.putField(\"title\", page.getHtml().xpath(\"//h1[@id='title']/span[@id='productTitle']/text()\").toString());\n if (page.getResultItems().get(\"title\")==null){\n //skip this page\n page.setSkip(true);\n }\n \n page.putField(\"style\", page.getHtml().xpath(\"//div[@id='variation_style_name']/div[@class='a-row']/span[@class='selection']/text()\"));\n page.putField(\"size\", page.getHtml().xpath(\"//div[@id='variation_size_name']/div[@class='a-row']/span[@class='selection']/text()\"));\n page.putField(\"color\", page.getHtml().xpath(\"//div[@id='variation_color_name']/div[@class='a-row']/span[@class='selection']/text()\"));\n \n page.putField(\"price\", page.getHtml().xpath(\"//span[@id='priceblock_ourprice']/text()\"));\n \n resultItems = page.getResultItems();\n System.out.println(page.getResultItems().toString());\n }", "protected void enhanceGoodsShelfList(SmartList<GoodsShelf> goodsShelfList,Map<String,Object> options){\n\t}", "public List<ItemDTO> getItems()\n\t{\t\n\t\tList<ItemDTO> itemsList = new ArrayList<>();\n\t\tfor (ItemData item : items) \n\t\t\titemsList.add(new ItemDTO(item.idItem,item.description,item.price,item.VAT,item.quantitySold));\t\n\t\treturn itemsList;\n\t}", "public void shuffleItems() {\n LoadProducts(idCategory);\n }", "@Override\n public void onClick(View v)\n {\n Card.addtoCard(new CardItem(content.get(position).getName(),\n content.get(position).getDescription(),\n content.get(position).getPrice(),(long) 1,\"None\",\n content.get(position).getPrice()));\n Toast.makeText(RecycleViewAdapter.this.mContext,\"Added to Cart\",Toast.LENGTH_LONG).show();\n }", "private static List<Item> getItems() {\n\t\treturn items;\n\t}", "public static void putCraftableItemInArrayList() {\n\n craftableItem.addItemToCraftableList(campfire);\n craftableItem.addItemToCraftableList(raft);\n craftableItem.addItemToCraftableList(axe);\n craftableItem.addItemToCraftableList(spear);\n }", "public ArrayList<ItemModel> getAllProducts() {\n ArrayList<ItemModel> products = new ArrayList<ItemModel>();\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_SHOPPINGLIST, null);\n\n c.moveToFirst();\n Log.d(DatabaseHelper.class.getName(), \"getAllProducts:\");\n\n while (!c.isAfterLast()) {\n String product = String.valueOf(c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_PID)));\n String quantity=String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.SHOPPINGLIST_QUANTITY)));\n String unit = String.valueOf(c.getString(c.getColumnIndex(DBHelper.SHOPPINGLIST_UNIT)));\n int che = c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_CHECKMARK));\n boolean check;\n if (che==0) {check=Boolean.FALSE;} else {check = Boolean.TRUE;}\n\n ItemModel model = new ItemModel(product, quantity, unit, check);\n products.add(model);\n\n\n c.moveToNext();\n }\n\n db.close();\n\n for (ItemModel ph: products) {\n ph.setProduct(getNameByPID(Integer.parseInt(ph.getProductName())));\n Log.d(DatabaseHelper.class.getName(), \"\\tgetAllProducts:\" + ph.toString());\n }\n\n return products;\n }", "@Override\n public void mostrarListadoEquipos(List<Equipo> equipos) {\n\n }", "private void populateItems (ObservableList<Item> itemList) throws ClassNotFoundException {\n\t\ttblResult.setItems(itemList);\n\t}", "public ItemMenu(JDealsController sysCtrl) {\n super(\"Item Menu\", sysCtrl);\n\n this.addItem(\"Add general good\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.GOODS);\n }\n });\n this.addItem(\"Restourant Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.RESTOURANT);\n }\n });\n this.addItem(\"Travel Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.TRAVEL);\n }\n });\n }", "public void AddItemsToRecyclerView()\n {\n source = new Vector();\n source.add(\"排班\");\n source.add(\"加班\");\n source.add(\"打卡\");\n source.add(\"請假\");\n source.add(\"文件\");\n source.add(\"訂餐\");\n }" ]
[ "0.63115466", "0.61125976", "0.60880494", "0.5962389", "0.59328765", "0.58484626", "0.5752316", "0.5745151", "0.5714306", "0.5711455", "0.56887025", "0.5680068", "0.5671223", "0.56643856", "0.56565243", "0.56525344", "0.56228006", "0.5619135", "0.5615359", "0.5613155", "0.5612558", "0.5589051", "0.55889463", "0.5584186", "0.5582508", "0.55801266", "0.55775744", "0.55694294", "0.55690694", "0.5568583", "0.5563664", "0.5561865", "0.55552983", "0.5544681", "0.55397266", "0.55382466", "0.5529829", "0.5516441", "0.55059755", "0.55024505", "0.55001605", "0.54913086", "0.5487135", "0.5482952", "0.54778504", "0.54766107", "0.5475998", "0.5458967", "0.54566145", "0.54562193", "0.54325396", "0.542226", "0.54060763", "0.54025775", "0.5398439", "0.5388627", "0.5388478", "0.5384311", "0.5380305", "0.5372637", "0.5372351", "0.53651583", "0.5363196", "0.53549063", "0.53477967", "0.53424424", "0.53412014", "0.53395736", "0.5337852", "0.53367907", "0.53275853", "0.53266096", "0.5318822", "0.53161395", "0.5306389", "0.53025293", "0.52931774", "0.5290157", "0.52871764", "0.5284879", "0.5272762", "0.52676487", "0.52637184", "0.5263305", "0.5262705", "0.5258413", "0.52583694", "0.5257181", "0.5251699", "0.5249552", "0.5242605", "0.523937", "0.52384233", "0.52365345", "0.5232265", "0.52303237", "0.5229019", "0.52279097", "0.5226453", "0.5226354", "0.52208275" ]
0.0
-1
Method that define the rule to execute.
protected abstract boolean makeDecision (Map<Key, Object> context);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "void setRule(Rule rule);", "public void add_rule(Rule rule) throws Exception;", "Rule createRule();", "Rule createRule();", "Rule createRule();", "public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "Rule getRule();", "public static void main(String[] args)\n {\n /*\n * Create a new loader with default factory.\n * \n * A factory will create all rule components when loader requires them\n * Default engine is used that creates all the default constructs in:\n * org.achacha.rules.compare\n * org.achacha.rules.condition\n * org.achacha.rules.action\n * \n * RulesEngineFactoryExtension can be used to extend a default factory while keeping existing constructs\n * for basic rules the default factory provides a wide variety of comparators and action elements\n * \n * The loader uses the factory to resolve where the rule parts are loaded from\n * There are several load types (file system, in-memory string, in-memory XML)\n * Here we will configure a simple in-memory string based loader and add the\n * conditions and actions from constants\n */\n RulesEngineLoaderImplMappedString loader = new RulesEngineLoaderImplMappedString(new RulesEngineFactory());\n \n // Add a simple rule and call it 'alwaysTrue', we will execute this rule using this name\n loader.addRule(\"alwaysTrue\", SIMPLE_RULE);\n \n /*\n * Create a rules engine that uses the loader and factory we just created\n * Normally these 3 objects would be someone retained so we don't have to re-parse the rules every execution\n * However this is a tutorial example\n */\n RulesEngine engine = new RulesEngine(loader);\n \n /////////////////////////// Everything above is initialization ///////////////////////////////////////\n \n /////////////////////////// Everything below is rule execution ///////////////////////////////////////\n /*\n * Now we need to have some input for the rule to process but since were are using constants in comparison we can just pass\n * an empty input model\n * \n * We use dom4j XML Element for input\n * \n * <request>\n * <input />\n * </request>\n */\n Element request = DocumentHelper.createElement(\"request\");\n request.addElement(\"input\");\n \n /*\n * RuleContext is an object that holds the input, output, event log, etc for a given rule execution\n * The engine can create a new context for us if we specify the input for the rule\n */\n RuleContext ruleContext = engine.createContext(request);\n \n /*\n * Now that we have set up our context we can execute the rule\n * Since we used addRule above and called this rule 'alwaysTrue', this is how we invoke this rule\n * \n * NOTE:\n * you can run multiple rules sequentially against the same context\n * some actions can modify input context and some conditions can check output context\n * so rules can depend on other rules\n */\n engine.execute(ruleContext, \"alwaysTrue\");\n \n /*\n * Display the output model\n * \n * Since the action we used is:\n * \n * <Action Operator='OutputValueSet'>\"\n * <Path>/result</Path>\"\n * <Value Source='Constant'><Data>yes</Data></Value>\"\n * </Action>\"\n * \n * We get the following output model:\n * <output><result>yes</result></output>\n * \n * NOTE: The path on the output action is always relative to the output element\n */\n System.out.println(\"Output Model\\n------------\");\n System.out.println(ruleContext.getOutputModel().asXML());\n }", "public void setRule(final String rule) {\r\n this.rule = rule;\r\n }", "public void setRule(java.lang.String rule) {\n this.rule = rule;\n }", "public MethodBuilder rule(String rule) {\n\t\tthis.rule = rule;\n\t\treturn this;\n\t}", "public void setRule(IRule rule)\n\t{\n\t\tthis.rule = rule;\n\t}", "java.lang.String getRule();", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setRule(RuleDefinition.Builder rule) {\r\n\t\t\tthis.rule = rule;\r\n\t\t}", "public String getRule() {\r\n return rule;\r\n }", "@Override\n\tpublic void reportRuleInvocation(Rule rule, Triple triple, DataObject dataObject) {\n\t\t\n\t}", "public HashMap<String,Rule> get_rules_to_action() throws Exception;", "CmdRule createCmdRule();", "@Override\r\npublic void initRules(){\r\n\t\r\n}", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }" ]
[ "0.72256875", "0.6716461", "0.66609156", "0.6645639", "0.6645639", "0.6645639", "0.6635223", "0.6631664", "0.6482948", "0.64214903", "0.6412268", "0.6379708", "0.6378164", "0.63059473", "0.6250376", "0.62161297", "0.6178751", "0.6140426", "0.61236334", "0.6122127", "0.6115786", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845", "0.6055845" ]
0.0
-1
Method that set the positive rule to execute.
public void setPositiveOutcomeStep (AbstractComponent positiveOutcomeStep) { // set the positive rule. this.positiveOutcomeStep = positiveOutcomeStep; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setRule(Rule rule);", "private void setCurrentRule(){\n\tfor(int i=0; i<ConditionTree.length;i++){\n\t\tif(ConditionTree[i][1].equals(\"-\")){\n\t\t\tcurrentRule = ConditionTree[i][0];\n\t\t\tcurrentRuleIndex = i;\n\t\t}\n\t}\n}", "public void setRule(int r)\n { \n rule = r;\n repaint();\n }", "public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "public void setNegativePermissions();", "private void setValueToRule() {\n\t\t\n\t\tif(!currRule.isEmpty()) {\n\t\t\tAntiSpamFilterControl.setWeigthByRuleManual(currRule, Double.parseDouble(manualRuleValue.getText()));\n\t\t}\n\t\t\n\t\tif(manualCBRules.isValid()) {\n\t\t\tcurrRule = manualCBRules.getSelectedItem().toString();\n\t\t}\n\t\tmanualRuleValue.setText(AntiSpamFilterControl.getWeigthByRule(currRule, true) + \"\");\n\t}", "@Override\n public StreamRule<ItemCollection> defineRule() {\n return s -> s.peek(p -> {\n if (p.getPrecio() > ((Integer) this.getParameters().get(\"precio\")).intValue()) {\n p.setPrecio(DiscountedPriceRule.PRICE_99);\n }\n });\n }", "public void setNegative(boolean negative) {\n this.negative = negative;\n }", "public static <N extends Number> PropertyConstraint<N> positive() {\n return ConstraintFactory.fromPredicate(\n new Predicate<N>() {\n @Override\n public boolean test(N t) {\n return t.intValue() > 0;\n }\n },\n \"Should be positive\"\n );\n }", "@Override\r\npublic void initRules(){\r\n\t\r\n}", "public AscendingRules() {}", "@Override\n public S isZero() {\n rule.addConstraint(new IsEqualAccordingToCompareToConstraint<>(zero()));\n return myself;\n }", "public void setCost(int cost) {\n/* 79 */ Validate.isTrue((cost > 0), \"The cost must be greater than 0!\");\n/* */ \n/* 81 */ this.cost = cost;\n/* */ }", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "@Override\r\n public boolean invokeRuleMethod(BusinessRule rule) {\r\n boolean result = super.invokeRuleMethod(rule);\r\n cleanErrorMessages();\r\n return result;\r\n }", "private void addBeforeRule(AroundProcesser<AggMaschineVO> processer)\r\n {\n\t\t\r\n\t processer.addBeforeRule(new BDPKLockSuperVORule());\r\n\t processer.addBeforeRule(new BizLockRule());\r\n\t processer.addBeforeRule(new VersionValidateRule());\r\n\t processer.addBeforeRule(new BDReferenceCheckerRule());\r\n\t processer.addBeforeRule(new FireEventRule(\"1005\"));\r\n\t processer.addBeforeRule(new NotifyVersionChangeWhenDataDeletedRule());\r\n }", "public void setAllowNegative(boolean allowNegative) {\n\t\tthis.allowNegative = allowNegative;\n\t\trequestRepaint();\n\t}", "public void setScoreZero() {\n this.points = 10000;\n }", "public abstract boolean isPositive();", "public void add_rule(Rule rule) throws Exception;", "public void setNegativeOutcomeStep (AbstractComponent negativeOutcomeStep) {\n\n\t\t// Set the negative rule.\n\t\tthis.negativeOutcomeStep = negativeOutcomeStep;\n\t}", "private void setPositiveCount(int value) {\n m_PositiveCount = value;\n }", "public MethodBuilder rule(String rule) {\n\t\tthis.rule = rule;\n\t\treturn this;\n\t}", "@DesireNoWarning(\"TQ\")\n public void set(@CheckForSigned int possibleNegativeValue) {\n if (possibleNegativeValue >= 0)\n nonNegativeValue = possibleNegativeValue;\n }", "public void setDirection(boolean positive) {\n setRange(mRangeStart, mRange, positive);\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tsaveRule();\n\t\t\t\t\t\t\t}", "public EmptyRuleActionImpl() {}", "private void addAndEnterEpsilonRule()\n {\n ruleTextField.setText(ruleTextField.getText() + \"\\u025B\");\n enterRules();\n }", "void setNilSearchRecurrenceRule();", "public void setRule(final String rule) {\r\n this.rule = rule;\r\n }", "public NotRule(ExecutionPolicy rule)\n\t\t{\n\t\t\tthis.rule = rule;\n\t\t}", "private boolean setAllPolicy(String webMethodName, String opName, String toPermit) \r\n\t{\r\n\t NAASIntegration naas = new NAASIntegration(Phrase.AdministrationLoggerName);\r\n\t boolean ret = true;\r\n\t if(toPermit.equalsIgnoreCase(\"Y\")){\r\n\t \tret = naas.setAllPolicy(webMethodName, opName, NAASRequestor.ACTION_DENY);\r\n\t }else{\r\n\t \tString isExit = verifyPolicy(webMethodName, opName);\r\n\t \tif(isExit!= null && isExit.equalsIgnoreCase(\"deny\")){\r\n\t\t \tret = naas.setAllPolicy(webMethodName, opName, \"\");\t \t\t \t\t\r\n\t \t}\r\n\t }\r\n\t return ret;\r\n\t}", "public void start(int rule) {\n\n if (rule > 255 || rule < 0) {\n throw new IllegalArgumentException(\"Ruleset must be between 0 and 255!\");\n }\n\n reset();\n ruleset = intToBinaryReverse(rule);\n draw();\n }", "public void testAllowDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public AccrualRule(){}", "@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }", "private void markNegativeCycle(boolean[] checked, int nodeIndex) {\n\t\thasNegativeCycle[nodeIndex] = true;\n\t\tchecked[nodeIndex] = true;\n\t\tdistances[nodeIndex] = Integer.MIN_VALUE;\n\t}", "public void setRule(RuleDefinition.Builder rule) {\r\n\t\t\tthis.rule = rule;\r\n\t\t}", "public Rule call()\n \t{\n \t\treturn sequence(id(),\n \t\t\t\tfirstOf(\n \t\t\t\tsequence(enforcedSequence(PAR_L, optional(args()), PAR_R), optional(closure())), //params & opt. closure\n \t\t\t\tclosure())); // closure only\n \t}", "public void setRule(IRule rule)\n\t{\n\t\tthis.rule = rule;\n\t}", "private void setNegativeCount(int value) {\n m_NegativeCount = value;\n }", "private void applyRules () throws DataNormalizationException {\n\t\tapplyRules(null);\n\t}", "@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}", "private void applyRules(boolean install, FlowRule rule) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n\n ops = install ? ops.add(rule) : ops.remove(rule);\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.trace(\"HP Driver: - applyRules onSuccess rule {}\", rule);\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.trace(\"HP Driver: applyRules onError rule: \" + rule);\n }\n }));\n }", "public ArrayList<StatementParse> positiveFirst(ArrayList<StatementParse> expression){\n for (int i = 0; i < expression.size(); i++){\n if (expression.get(i).isNegative()) continue;\n\n // move the first positive to the front\n StatementParse positive = expression.get(i);\n expression.remove(i);\n expression.add(0, positive);\n return expression;\n }\n // if no positive node exist, or the collapsed array is empty\n // insert a 0 in the front\n expression.add(0, new IntegerParse(0));\n return expression;\n }", "private void scaleToPositive() {\r\n // Obtain min value\r\n double minScalarization = Double.MAX_VALUE;\r\n for (S solution : solutions()) {\r\n if (scalarization.getAttribute(solution) < minScalarization) {\r\n minScalarization = scalarization.getAttribute(solution);\r\n }\r\n }\r\n if (minScalarization < 0) {\r\n // Avoid scalarization values of 0\r\n double eps = 10e-6;\r\n for (S solution : solutions()) {\r\n scalarization.setAttribute(solution, eps + scalarization.getAttribute(solution) + minScalarization);\r\n }\r\n }\r\n }", "public void setRule(java.lang.String rule) {\n this.rule = rule;\n }", "@Required\n public void setRules(Set<Rule> rules)\n {\n this.rules = new TreeSet<Rule>(new RuleComparator());\n this.rules.addAll(rules);\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void setRules() {\n\t\tthis.result = Result.START;\n\t\t// Create all initial rule executors, and shuffle them if needed.\n\t\tthis.rules = new LinkedList<>();\n\t\tModule module = getModule();\n\t\tfor (Rule rule : module.getRules()) {\n\t\t\tRuleStackExecutor executor = (RuleStackExecutor) getExecutor(rule, getSubstitution());\n\t\t\texecutor.setContext(module);\n\t\t\tthis.rules.add(executor);\n\t\t}\n\t\tif (getRuleOrder() == RuleEvaluationOrder.RANDOM || getRuleOrder() == RuleEvaluationOrder.RANDOMALL) {\n\t\t\tCollections.shuffle((List<RuleStackExecutor>) this.rules);\n\t\t}\n\t}", "public void makeApprovedIfNull() {\n int x = getHifiveRating();\n if (x == 0) {\n setHifiveRating(HIFIVERATING_approved);\n }\n }", "public FlowRule() {\r\n }", "@Test\n\t\tpublic void noApplyGoal() {\n\t\t\tassertFailure(\" ;H; ;S; x∈{1,2} ;; {1}⊆S |- 3=3\");\n\t\t}", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void createAfterTrackEnterXMinRule(){\n ECAAgent.getDefaultECAAgent().createRule(\"XMinAfterEntrace_\"+name,afterTrackEnterXMin,\"MAKEFITS.Track.C_trueCond\",\"MAKEFITS.Track.A_XMinAfterTrackEnter\",1,CouplingMode.IMMEDIATE ,ParamContext.RECENT);\n// ECAAgent.getDefaultECAAgent().createRule(\"XMinAfterEntrace_\"+name,afterTrackEnterXMin,\"MAKEFITS.Track.C_trueCond\",\"MAKEFITS.Track.A_XMinAfterTrackEnter\",1,CouplingMode.IMMEDIATE ,Context.RECENT);\n }", "private boolean isPositive() {\n return this._isPositive;\n }", "@Override\n\tprotected void execute() {\n\t\tmyLowerArm.set(-0.25);\n\t}", "@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 AbstractComponent getPositiveOutcomeStep () {\n\n\t\t// Return the positive rule.\n\t\treturn positiveOutcomeStep;\n\t}", "private void negate()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.negate();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}", "private void incrPositiveCount(){\n m_PositiveCount++;\n }", "public void control()\n {\n if(this.listOperator.contains(this.operator))\n {\n\n if(this.operator.equals(\"=\")) // If the operator is \"=\"\n {\n // We ask to the model to display the result\n this.calc.getResult();\n }\n else // Else, we give the operator to the model\n {\n this.calc.setOperator(this.operator);\n }\n }\n \n // If the number is ok\n if(this.number.matches(\"^[0-9.]+$\"))\n {\n this.calc.setNumber(this.number);\n }\n\n this.operator = \"\";\n this.number = \"\";\n }", "public static void isPositive(int userInput) {\n\t\tif (userInput <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"You must enter a positive number. Please try again:\");\n\t\t}\n\t}", "private void incrNegativeCount(){\n m_NegativeCount++;\n }", "public void setPositive(String positive, DialogInterface.OnClickListener positiveListener) {\n this.mPositive = positive;\n this.mPositiveListener = positiveListener;\n }", "public PositiveMessageVisitor() {\n\t\t\n\t\tpositiveCount = 0;\n\t\tmessageCount = 0;\n\t\t\n\t}", "@Override\r\n protected void initializeRules(List<AbstractValidationCheck> rules) {\n\r\n }", "AssignmentRule createAssignmentRule();", "public XorRule(ExecutionPolicy...rules)\n\t\t{\n\t\t\tsuper(rules);\n\t\t}", "public boolean isPositive()\n\t{\n\t\treturn _bIsPositive;\n\t}", "@Override\n public void enterEveryRule(final ParserRuleContext ctx) {\n }", "protected boolean applyRuleTransaction(StateRuleTransaction tr) {\t\n\t\tString ruleCode = ((StateRuleTransaction)tr).code;\n\t\tSimpleRule rule = new SimpleRule(ruleCode);\n\t\t\n\t\tboolean isConditionValid = false;\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(rule.account_condition)){\n\t\t\t\tisConditionValid = rule.validateOperand(account.getData()); \n\t\t\t}\n\t\t}\n\n\t\tif (isConditionValid) {\n\t\t\tfor(AccountInterface account: accounts) {\n\t\t\t\tif (account.getAddress().equals(rule.account_effect)){\n\t\t\t\t\taccount.setAssetType(rule.value_effect);\n\t\t\t\t\taccount.increaseNonce();\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\t\n\t}", "public Builder setRule(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n rule_ = value;\n onChanged();\n return this;\n }", "public void testDenyDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n \n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "Rule createRule();", "Rule createRule();", "Rule createRule();", "public void setScore(int score) {\r\n\t\tif(score >=0) {\r\n\t\t\tthis.score = score;\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tprotected void resetFalseClause() {\n\t\t\n\t}", "public NegationExpression(Expression passinnum){\r\n\t\tthis.arg=passinnum;\r\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) { //the radio button changes the values of the modes\r\n\t\t\t\tif(add == false){//if its negative, set it to positive\r\n\t\t\t\t\tadd = true;\r\n\t\t\t\t\tSystem.out.println(add);\r\n\t\t\t\t}\r\n\t\t\t\telse if(add == true){\r\n\t\t\t\t\tadd = false;\r\n\t\t\t\t\tSystem.out.println(add);\r\n\t\t\t\t}\r\n\t\t\t}", "public FlowRule(Flow flow, int seq) {\r\n super(flow, seq);\r\n }", "private ASTNode unaryMinusRules(ASTNode operand){\n Token operandToken = operand.getToken();\n if (operand instanceof UnaryOP && operandToken.getType() == TokenType.MINUS) {\n return ((UnaryOP) operand).getOperand();\n }\n else{\n return operand;\n }\n }", "@Override\n\tpublic void abs1_m1() {\n\t\t\n\t}", "public void addNegativePoints(int pts) {\r\n\t\t negativePoints=(negativePoints + pts);\r\n }", "public LogicalRule(ExecutionPolicy...rules)\n\t\t{\n\t\t\tthis.rules = rules;\n\t\t}", "IRuleset add(IRuleset rule);", "public void setMandatory(boolean mandatory)\n {\n this.mandatory = mandatory;\n performFlags();\n }", "protected void addRule(BinaryRule rule) {\n\t\tif (rule.getPurity() >= mMinimumPurity)\n\t\t\tthis.mBinaryRules.add(rule);\n\t}", "public void changeChecker()\n {\n\tif (pennies < 0 || nickels < 0 || dimes < 0 || quarters < 0)\n\t throw new IllegalArgumentException();\t// no negative amounts\n }", "@PathParam(\"rule\")\n public void setRule(@NotNull(message = \"rule name can't be NULL\")\n final String rle) {\n this.rule = rle;\n }", "public void setNegative(String negative, DialogInterface.OnClickListener negativeListener) {\n this.mNegative = negative;\n this.mNegativeListener = negativeListener;\n }", "private Action(){\r\n\t\tthis(-1);\r\n\t}", "@Override\n\t\tpublic void validate() throws ValidationError {\n\t\t\tif (newValueOfPropertyToChange < 0) {\n\t\t\t\tthrow new TestFailure(\"propertyToChange is not ok\");\n\t\t\t}\n\t\t}", "private void setZero(){\r\n\t for(int i = 0; i < nodes.size(); i++){\r\n\t Node currentNode = nodes.get(i);\r\n\t for (int j = 0; j < currentNode.getEdges().size(); j++){\r\n\t Edge currentEdge = currentNode.getEdge(j);\r\n\t currentEdge.setResidualFlow(currentEdge.getFlow());\r\n\t currentEdge.setFlow(0);\r\n }\r\n }\r\n }", "public void setRules(ArrayList<Rule> rules) {\n\t\tthis.rules = rules;\n\t}", "public void setEnchantmentLevel(int enchantmentLevel) {\n/* 57 */ Validate.isTrue((enchantmentLevel > 0), \"The enchantment level must be greater than 0!\");\n/* */ \n/* 59 */ this.enchantmentLevel = enchantmentLevel;\n/* */ }", "@Test(expected = NegativeValueException.class)\n public void setTotalIsNegative() throws NegativeValueException {\n cartItem.setTotal(-5);\n }", "void negarAnalise();", "@Override\n public void setScore(int score) throws IllegalStateException {\n objective.checkValid();\n this.score = score;\n objective.getScoreboard()\n .broadcast(new ScoreboardScoreMessage(entry, objective.getName(), score));\n }", "public void rulesOnEnter() {\n try {\n String ruleString = ruleInputField.getText().toUpperCase();\n gOL.setRuleString(ruleString);\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n ruleInputField.setText(\"\");\n\n //Checks if the input matches any predefined rules. Clears the selection if not.\n if(!chooseRulesList.contains(gOL.getRuleName())){\n chooseRulesBox.getSelectionModel().clearSelection();\n }else{\n chooseRulesBox.getSelectionModel().select(gOL.getRuleName());\n }\n\n //Produces a warning if a RulesFormatException is thrown\n } catch (RulesFormatException rfe) {\n PopUpAlerts.ruleAlert2();\n }\n }" ]
[ "0.59064996", "0.5825316", "0.5562324", "0.554433", "0.5426941", "0.52906674", "0.52796394", "0.52737916", "0.52596956", "0.52382636", "0.52100337", "0.52082664", "0.5147388", "0.51097786", "0.5101862", "0.5094682", "0.50943995", "0.5088035", "0.5032409", "0.5009156", "0.50070006", "0.49774173", "0.4975263", "0.49450088", "0.49357644", "0.49355924", "0.49350548", "0.49254867", "0.4906067", "0.48944265", "0.48841098", "0.48815894", "0.4877558", "0.4875666", "0.4865606", "0.4861123", "0.48602", "0.48544616", "0.48530334", "0.48443586", "0.48417777", "0.48340058", "0.48172912", "0.481311", "0.48111534", "0.48051152", "0.47899053", "0.47761878", "0.47758627", "0.47651914", "0.4746966", "0.47419113", "0.47383535", "0.4734904", "0.4732146", "0.4714384", "0.47143015", "0.46941018", "0.46940437", "0.4691266", "0.46847504", "0.4684143", "0.4660821", "0.46524918", "0.46210536", "0.4615937", "0.46071702", "0.46044177", "0.460305", "0.4602295", "0.46020618", "0.46007642", "0.45987943", "0.4594479", "0.4594479", "0.4594479", "0.45940813", "0.4593139", "0.459297", "0.45908034", "0.4586744", "0.45856866", "0.45834884", "0.45802152", "0.45779413", "0.45698065", "0.4564809", "0.4562844", "0.45625168", "0.45583972", "0.455716", "0.45482206", "0.4543153", "0.4542523", "0.45229042", "0.4518882", "0.45171553", "0.45137477", "0.45095557", "0.45094705" ]
0.58056813
2
Method that return the positive rule to execute.
public AbstractComponent getPositiveOutcomeStep () { // Return the positive rule. return positiveOutcomeStep; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getRule();", "Rule getRule();", "public abstract boolean isPositive();", "public String getRule() {\r\n return rule;\r\n }", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "public R getRule() {\n return this.rule;\n }", "public AbstractComponent getNegativeOutcomeStep () {\n\n\t\t// Return the negative rule.\n\t\treturn negativeOutcomeStep;\n\t}", "public Node negaposi()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.PLUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Positive(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\tif(lexer.getToken()==Lexer.Token.MINUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Negative(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn power();\r\n\t}", "private Rule honorRules(InstanceWaypoint context){\n \t\t\n \t\tStyle style = getStyle(context);\n \t\tRule[] rules = SLD.rules(style);\n \t\t\n \t\t//do rules exist?\n \t\t\n \t\tif(rules == null || rules.length == 0){\n \t\t\treturn null;\n \t\t}\n \t\t\n \t\t\n \t\t//sort the elserules at the end\n \t\tif(rules.length > 1){\n \t\t\trules = sortRules(rules);\n \t\t}\n \t\t\n \t\t//if rule exists\n \t\tInstanceReference ir = context.getValue();\n \t\tInstanceService is = (InstanceService) PlatformUI.getWorkbench().getService(InstanceService.class);\n \t\tInstance inst = is.getInstance(ir);\n \t\t\t\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\t\n \t\t\tif(rules[i].getFilter() != null){\t\t\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(rules[i].getFilter().evaluate(inst)){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t//if a rule exist without a filter and without being an else-filter,\n \t\t\t//the found rule applies to all types\n \t\t\telse{\n \t\t\t\tif(!rules[i].isElseFilter()){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t//if there is no appropriate rule, check if there is an else-rule\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\tif(rules[i].isElseFilter()){\n \t\t\t\treturn rules[i];\n \t\t\t}\n \t\t}\n \t\t\n \t \n \t\t//return null if no rule was found\n \t\treturn null;\n \t\n \t}", "Rule createRule();", "Rule createRule();", "Rule createRule();", "@Override\n public S isZero() {\n rule.addConstraint(new IsEqualAccordingToCompareToConstraint<>(zero()));\n return myself;\n }", "public Rule call()\n \t{\n \t\treturn sequence(id(),\n \t\t\t\tfirstOf(\n \t\t\t\tsequence(enforcedSequence(PAR_L, optional(args()), PAR_R), optional(closure())), //params & opt. closure\n \t\t\t\tclosure())); // closure only\n \t}", "@Override\n\tdouble evaluate() {\n\t\treturn Math.abs(operand.getVal());\n\t}", "public java.lang.String getRule() {\n return rule;\n }", "private ASTNode unaryMinusRules(ASTNode operand){\n Token operandToken = operand.getToken();\n if (operand instanceof UnaryOP && operandToken.getType() == TokenType.MINUS) {\n return ((UnaryOP) operand).getOperand();\n }\n else{\n return operand;\n }\n }", "public String getRule() {\n\t\treturn this.rule;\n\t}", "public Rule_in_State get_unprocessed_rule();", "T negativeResult();", "@Override\r\n public boolean invokeRuleMethod(BusinessRule rule) {\r\n boolean result = super.invokeRuleMethod(rule);\r\n cleanErrorMessages();\r\n return result;\r\n }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }" ]
[ "0.6028544", "0.6027713", "0.5830299", "0.5705726", "0.56903064", "0.5687376", "0.56456286", "0.557769", "0.55726576", "0.5552394", "0.5552394", "0.5552394", "0.55199534", "0.5507606", "0.54729855", "0.5417346", "0.54027885", "0.5385887", "0.53828", "0.5367642", "0.5341149", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.53139293", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911", "0.5296911" ]
0.59149086
2
Method that set the negative rule to execute.
public void setNegativeOutcomeStep (AbstractComponent negativeOutcomeStep) { // Set the negative rule. this.negativeOutcomeStep = negativeOutcomeStep; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNegativePermissions();", "public void setNegative(boolean negative) {\n this.negative = negative;\n }", "public final void mRULE_MINUS() throws RecognitionException {\n try {\n int _type = RULE_MINUS;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12803:12: ( '-' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12803:14: '-'\n {\n match('-'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void setAllowNegative(boolean allowNegative) {\n\t\tthis.allowNegative = allowNegative;\n\t\trequestRepaint();\n\t}", "private void negate()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.negate();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}", "public NotRule(ExecutionPolicy rule)\n\t\t{\n\t\t\tthis.rule = rule;\n\t\t}", "void setRule(Rule rule);", "private void setNegativeCount(int value) {\n m_NegativeCount = value;\n }", "private ASTNode unaryMinusRules(ASTNode operand){\n Token operandToken = operand.getToken();\n if (operand instanceof UnaryOP && operandToken.getType() == TokenType.MINUS) {\n return ((UnaryOP) operand).getOperand();\n }\n else{\n return operand;\n }\n }", "public void setNegative(String negative, DialogInterface.OnClickListener negativeListener) {\n this.mNegative = negative;\n this.mNegativeListener = negativeListener;\n }", "public final void negate() {\n \n \tthis.m00 = -this.m00;\n \tthis.m01 = -this.m01;\n \tthis.m02 = -this.m02;\n this.m10 = -this.m10;\n this.m11 = -this.m11;\n this.m12 = -this.m12;\n this.m20 = -this.m20;\n this.m21 = -this.m21;\n this.m22 = -this.m22;\n }", "@Override\r\n\tpublic void minusFromCost() {\n\t\t\r\n\t}", "public ExecutionPolicy not()\n\t{\n\t\treturn new NotRule(this);\n\t}", "public void setNegativecount(Integer negativecount) {\n this.negativecount = negativecount;\n }", "public void neg_() {\n TH.THTensor_(neg)(this, this);\n }", "public NegationExpression(Expression passinnum){\r\n\t\tthis.arg=passinnum;\r\n\t}", "public abstract ArithValue negate();", "@Override\n protected void negativeClick() {\n\n }", "void unsetSearchRecurrenceRule();", "public long setAmountNeg() {\n return -amount;\n }", "private void setCurrentRule(){\n\tfor(int i=0; i<ConditionTree.length;i++){\n\t\tif(ConditionTree[i][1].equals(\"-\")){\n\t\t\tcurrentRule = ConditionTree[i][0];\n\t\t\tcurrentRuleIndex = i;\n\t\t}\n\t}\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 void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "public AbstractComponent getNegativeOutcomeStep () {\n\n\t\t// Return the negative rule.\n\t\treturn negativeOutcomeStep;\n\t}", "void setNilSearchRecurrenceRule();", "Relation getNegation();", "default void negate()\n {\n getAxis().negate();\n setAngle(-getAngle());\n }", "void visit(MinusExpression expression);", "public void setRule(int r)\n { \n rule = r;\n repaint();\n }", "public void setRejectIfNoRule(final boolean reject) {\n \t\t_rejectIfNoRule = reject;\n \t}", "private void markNegativeCycle(boolean[] checked, int nodeIndex) {\n\t\thasNegativeCycle[nodeIndex] = true;\n\t\tchecked[nodeIndex] = true;\n\t\tdistances[nodeIndex] = Integer.MIN_VALUE;\n\t}", "public CustomLimitsDialogBuilder setNegativeButtonText(int negativeButtonTextId) {\n this.negativeButtonText = context.getResources().getString(\n negativeButtonTextId);\n return this;\n }", "public interface NegativeAction {\n void negativeAction();\n}", "public void ratedNegative(View arg0){\r\n\t\t/*if (!checkiFRated(-1)){\r\n\t\t\tToast.makeText(ShowAnswerActivity.this,\"RATED NEGATIVE\",Toast.LENGTH_SHORT).show();\r\n\t\t\trates--;\r\n\t\t\ttxtview_Rates.setText(String.valueOf(rates));\r\n\t\t\tsetRate(-1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tToast.makeText(ShowAnswerActivity.this,\"YOU ALREADY RATED THIS ANSWER\",\tToast.LENGTH_SHORT).show();\r\n\t\t}\t*/\r\n\t\t//\tanimation = new WaitingAnimation(this);\r\n\t\t//\tanimation.execute();\r\n\r\n\t}", "public Builder setNegativeButton(int negativeButtonText,\r\n DialogInterface.OnClickListener listener) {\r\n this.negativeButtonText = (String) context\r\n .getText(negativeButtonText);\r\n this.negativeButtonClickListener = listener;\r\n return this;\r\n }", "public void setIsNegative(String isNegative) {\r\n this.isNegative = isNegative;\r\n }", "public Builder setNegativeButton(int negativeButtonText,\n OnClickListener listener) {\n this.negativeText = (String) context\n .getText(negativeButtonText);\n this.negativeButtonClickListener = listener;\n return this;\n }", "void negarAnalise();", "public Node negaposi()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.PLUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Positive(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\tif(lexer.getToken()==Lexer.Token.MINUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Negative(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn power();\r\n\t}", "public Builder setNegativeButton(String negativeButtonText,\n OnClickListener listener) {\n this.negativeText = negativeButtonText;\n this.negativeButtonClickListener = listener;\n return this;\n }", "public Builder setNegativeButton(String negativeButtonText, DialogInterface.OnClickListener listener) {\n this.negativeButtonText = negativeButtonText;\n this.negativeButtonClickListener = listener;\n return this;\n }", "@DesireNoWarning(\"TQ\")\n public void set(@CheckForSigned int possibleNegativeValue) {\n if (possibleNegativeValue >= 0)\n nonNegativeValue = possibleNegativeValue;\n }", "public void setNegativeKeywordListId(long negativeKeywordListId) {\n this.setParentId(negativeKeywordListId);\n }", "public final void mMINUS() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = MINUS;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// src/VSLLexer.g:43:11: ( '-' )\n\t\t\t// src/VSLLexer.g:43:13: '-'\n\t\t\t{\n\t\t\tmatch('-'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public void unsetRules()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(RULES$26);\n }\n }", "public Point2F negative()\r\n {return scale(-1);}", "@Override\n public R visit(NumericLiteralNegative n, A argu) {\n R _ret = null;\n n.nodeChoice.accept(this, argu);\n return _ret;\n }", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Negation p, A arg)\n {\n\n p.arithmeticexpr_.accept(new ArithmeticExprVisitor<R,A>(), arg);\n\n return null;\n }", "public Builder setNegativeButton(String negativeButtonText,\r\n DialogInterface.OnClickListener listener) {\r\n this.negativeButtonText = negativeButtonText;\r\n this.negativeButtonClickListener = listener;\r\n return this;\r\n }", "@Override\n\tpublic void ruleReject(String campaignActivityId) throws ASException {\n\t\tCampaignActivity ca = caDao.get(campaignActivityId);\n\t\t\n\t\tif( ca.getRedeemStatus().equals(CampaignActivity.REDEEM_STATUS_DELIVERED)) { \n\t\t\t\n\t\t\tca.setRedeemStatus(CampaignActivity.REDEEM_STATUS_RULE_REJECTED);\n\t\t\tca.setStatusChangeDateTime(new Date());\n\t\t\t\n\t\t\tcaDao.update(ca);\n\n\t\t} else {\n\t\t\tthrow ASExceptionHelper.forbiddenException();\n\t\t}\n\t}", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "public final expressionParser.negation_return negation() throws RecognitionException {\n expressionParser.negation_return retval = new expressionParser.negation_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal51=null;\n\n CommonTree char_literal51_tree=null;\n RewriteRuleTokenStream stream_47=new RewriteRuleTokenStream(adaptor,\"token 47\");\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:94:3: ( '-' -> NEGATION )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:94:5: '-'\n {\n char_literal51=(Token)match(input,47,FOLLOW_47_in_negation523); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_47.add(char_literal51);\n\n\n\n // AST REWRITE\n // elements: \n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\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 // 94:9: -> NEGATION\n {\n adaptor.addChild(root_0, (CommonTree)adaptor.create(NEGATION, \"NEGATION\"));\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\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 }", "@Test(groups = { \"wso2.esb\" }, description = \"agilezen {updateTask} integration test with negative case.\", dependsOnMethods = { \"testCreateStoryWithOptionalParameters\" })\n public void testUpdateTaskWithNegativeCase() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:updateTask\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_updateTask_negative.json\");\n \n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + connectorProperties.getProperty(\"storyId\") + \"/tasks/999999\";\n RestResponse<JSONObject> apiRestResponse =\n sendJsonRestRequest(apiEndPoint, \"POST\", apiRequestHeadersMap, \"api_updateTask_negative.json\");\n \n Assert.assertEquals(esbRestResponse.getHttpStatusCode(), 404);\n Assert.assertEquals(apiRestResponse.getHttpStatusCode(), 404);\n }", "public void disableAccessRules() {\n\t\tm_parser.disableAccessRules();\n\t}", "public void setRule(final String rule) {\r\n this.rule = rule;\r\n }", "@PathParam(\"rule\")\n public void setRule(@NotNull(message = \"rule name can't be NULL\")\n final String rle) {\n this.rule = rle;\n }", "public void setNegativeSuffix(String newValue) {\n negativeSuffix = newValue;\n negSuffixPattern = null;\n }", "public Arginfo visit(MinusExpression n, Arginfo argu) {\n\t \t Arginfo _ret=null;\n\t int num=labelctr++;\n\t System.out.println(\"BEGIN\\nNOOP\\n RETURN MINUS \");\n\t n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t \n\t System.out.println(\"\\nEND\\n\");\n\t return _ret;\n }", "public RETEReasoner(List rules) {\n if (rules == null) throw new NullPointerException( \"null rules\" );\n this.rules = rules;\n }", "public final void mMINUS() throws RecognitionException {\r\n try {\r\n int _type = MINUS;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:280:7: ( '-' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:280:9: '-'\r\n {\r\n match('-'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public boolean offForEvaluation();", "public Builder setNegativeButtonText(String text) {\n this.negativeButtonText = text;\n return this;\n }", "public boolean isNegative() {\n return this.negative;\n }", "private Action(){\r\n\t\tthis(-1);\r\n\t}", "@Test\n public void testCalculateRPNCustomNegativeNumbers() throws Exception {\n String[] expression = {\"3\",\"4\",\"+\",\"8\",\"3\",\"-\",\"+\",\"-10\",\"*\"};\n double result = solver.calculateRPNCustom(expression);\n\n assertThat(result, is(-120.0));\n }", "public void setAsDown () \n\t{ \n\t\tn.setFailureState(false);\n\t\tfinal SortedSet<WLightpathRequest> affectedDemands = new TreeSet<> ();\n\t\tgetOutgoingFibers().forEach(f->affectedDemands.addAll(f.getTraversingLpRequestsInAtLeastOneLp()));\n\t\tgetIncomingFibers().forEach(f->affectedDemands.addAll(f.getTraversingLpRequestsInAtLeastOneLp()));\n\t\tfor (WLightpathRequest lpReq : affectedDemands)\n\t\t\tlpReq.internalUpdateOfRoutesCarriedTrafficFromFailureState();\n\t}", "@Override\n\tprotected void resetFalseClause() {\n\t\t\n\t}", "public NetworkRuleBypassOptions bypass() {\n return this.bypass;\n }", "T negativeResult();", "public void setRule(java.lang.String rule) {\n this.rule = rule;\n }", "@Override\n\tpublic void onNegativeButtonClicked(int requestCode) {\n\n\t}", "private ASTNode binaryMinusRules(ASTNode left, ASTNode right) throws Exception {\n\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n TokenType numType = TokenType.NUMBER;\n TokenType varType = TokenType.VAR;\n TokenType minusType = TokenType.MINUS;\n TokenType plusType = TokenType.PLUS;\n\n Token tempToken;\n\n if (patternMatcher(leftType, rightType, numType, numType)){\n //left is num and right is num -> num\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n Double sum = leftVal + rightVal;\n\n //if sum is negative, store the new node as unaryMinus(abs(left+right))\n if (sum < 0){\n tempToken = new Token(minusType);\n Token tempInnerToken = new Token(numType, String.valueOf(sum * -1));\n ASTNode tempOperand = new Num(tempInnerToken);\n return new UnaryOP(tempToken, tempOperand);\n }\n else{\n String tempString = String.valueOf(sum);\n tempToken = new Token(numType, tempString);\n return new Num(tempToken);\n }\n }\n else if (patternMatcher(leftType, rightType, varType, varType)){\n //left is var and right is var -> 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightType == minusType && right instanceof UnaryOP){\n //left is anything and right is unary minus -> var+right.operand\n tempToken = new Token(plusType);\n return new BinaryOp(tempToken, left, ((UnaryOP) right).getOperand());\n }\n else if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0 -> anything\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything -> -anything\n tempToken = new Token(minusType);\n return new UnaryOP(tempToken, right);\n }\n //else\n tempToken = new Token(minusType);\n return new BinaryOp(tempToken ,left, right);\n }", "@Override\n public void onFailure(Rule rule, Exception e) {\n RulesContext.put(\"status\", \"failed\");\n RulesContext.put(\"message\", this.getClass().getCanonicalName() + \" \" + e.getCause().getMessage());\n\n }", "@Override\n public void visit(final OpMinus opMinus) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpMinus\");\n }\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n addOp(OpMinus.create(rewriteOp2(opMinus, rewriter), rewriter.getResult()));\n }", "@Ability(name = \"No Fall Damage\", info = \"Take no fall damage.\", type = Ability.Type.PASSIVE, placeholder = true)\n public void noFallDamageAbility() {\n }", "@Test\n\tpublic void testSimpleOneRuleFailExecution() {\n\n\t\tSkRuleBase rule = buildThings(ONE_RULE_FAIL_FILE_NAME, SkRuleBase.class, \"rule\");\n\n\t\tSkRuleMaster master = new SkRuleMaster.Builder().addRule(rule)\n\t\t\t\t.build();\n\t\tSkRuleRunner runner = master.getRuleRunner();\n\n\t\ttry {\n\t\t\trunner.setValue(\"THIS_MACRO_DOES_NOT_EXIST\", \"X\");\n\t\t\trule.run(runner);\n\t\t\tAssert.fail(\"We should have thrown an error.\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(String.format(\"We expected this error : '%s'\", e.toString()));\n\t\t}\n\t\trunner.setValue(\"MILK.QTY\", 2);\n\t\trule.run(runner);\n\t}", "public boolean isNegative();", "public String visit(MinusExpression n, String s) {\n n.f0.accept(this, null);\n n.f2.accept(this, null);\n return null;\n }", "public void setRule(IRule rule)\n\t{\n\t\tthis.rule = rule;\n\t}", "@Override\r\n public final boolean isUseless() {\r\n int i;\r\n Rule[] r;\r\n\r\n r = this.m_rules;\r\n for (i = (r.length - 1); i >= 0; i--) {\r\n if (!(r[i].isUseless()))\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public void testDenyDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n \n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "@Override\n public void onNegativeClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n }", "public void validateStringNegativeTest() {\n\t\tPercentageInputValidator percentInputValidator = new PercentageInputValidator();\n\t\tString name = \"codeCoverageThreshold\";\n\t\tString value = \"abc\";\n\t\tString referenceResult = \"valid argument\";\n\t\tString result = referenceResult;\n\t\ttry {\n\t\t\tpercentInputValidator.validate(name, value);\n\t\t} catch (ParameterException e) {\n\t\t\tresult = e.getMessage();\n\t\t}\n\t\tLOG.debug(\"result:\" + result);\n\t\tAssert.assertTrue(!result.equals(referenceResult));\n\t}", "public boolean getNegated() {\r\n return Negated;\r\n }", "public boolean isNegative()\n\t{\n\t\t// TO DO\n\t\treturn isNeg;\n\t}", "public Builder clearRule() {\n \n rule_ = getDefaultInstance().getRule();\n onChanged();\n return this;\n }", "@Test(dependsOnMethods = { \"testGetReminderWithMandatoryParameters\" },\n description = \"podio {getReminder} integration test with negative case.\")\n public void testGetReminderWithNegativeCase() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:getReminder\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_getReminder_negative.json\");\n \n String apiEndPoint = apiUrl + \"/reminder/task/Invalid\";\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getString(\"error\"), apiRestResponse.getBody().getString(\"error\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"error_description\"), apiRestResponse.getBody()\n .getString(\"error_description\"));\n }", "public final void mMINUS() throws RecognitionException {\n try {\n int _type = MINUS;\n // /Users/benjamincoe/HackWars/C.g:210:12: ( '-' )\n // /Users/benjamincoe/HackWars/C.g:210:14: '-'\n {\n match('-'); \n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "public void subtract() {\n\t\t\n\t}", "private void setValueToRule() {\n\t\t\n\t\tif(!currRule.isEmpty()) {\n\t\t\tAntiSpamFilterControl.setWeigthByRuleManual(currRule, Double.parseDouble(manualRuleValue.getText()));\n\t\t}\n\t\t\n\t\tif(manualCBRules.isValid()) {\n\t\t\tcurrRule = manualCBRules.getSelectedItem().toString();\n\t\t}\n\t\tmanualRuleValue.setText(AntiSpamFilterControl.getWeigthByRule(currRule, true) + \"\");\n\t}", "@Test(groups = { \"wso2.esb\" }, description = \"agilezen {getTask} integration test with negative case.\", dependsOnMethods = { \"testCreateStoryWithOptionalParameters\" })\n public void testGetTaskWithNegativeCase() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:getTask\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_getTask_negative.json\");\n \n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + connectorProperties.getProperty(\"storyId\") + \"/tasks/123456\";\n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getHttpStatusCode(), 404);\n Assert.assertEquals(apiRestResponse.getHttpStatusCode(), 404);\n }", "@Override\r\n public boolean invokeRuleMethod(BusinessRule rule) {\r\n boolean result = super.invokeRuleMethod(rule);\r\n cleanErrorMessages();\r\n return result;\r\n }", "TextStyle negate();", "public void setNegativePrefix(String newValue) {\n negativePrefix = newValue;\n negPrefixPattern = null;\n }", "public Vector2D neg()\n\t{\n\t\treturn this.mul(-1);\n\t}", "public EmptyRuleActionImpl() {}", "public void negateUnxepectedTagPenalty() {\n\t\tnegateUnxepectedTagPenalty = true;\n\t}", "@Override\n\tprotected void minus(char c, InterimResult ir)\n\t{\n\t\tNegateAction Negate = new NegateAction();\n\t\tNegate.execute(ir, c);\t\t\n\t}", "@Override\n public void onNegativeClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n }", "@Override\n public void onNegativeClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n }" ]
[ "0.67029566", "0.6370217", "0.63655406", "0.63162625", "0.6181946", "0.6142491", "0.5892702", "0.5892192", "0.5848954", "0.5844905", "0.5838264", "0.5835751", "0.58239734", "0.57937455", "0.5780743", "0.5767131", "0.5749085", "0.5658265", "0.56526345", "0.56437284", "0.56414384", "0.56352305", "0.56088877", "0.5572937", "0.5520993", "0.55118823", "0.54873514", "0.54807657", "0.5479188", "0.5431641", "0.5422652", "0.5402598", "0.5396434", "0.5376715", "0.5337264", "0.53343016", "0.53204936", "0.53081423", "0.53027713", "0.5289939", "0.52869385", "0.52841", "0.52627426", "0.5259866", "0.52382326", "0.52339095", "0.521745", "0.52137727", "0.52118635", "0.5198674", "0.5193375", "0.5172256", "0.5171187", "0.51602083", "0.5147415", "0.5145778", "0.51454866", "0.51395893", "0.5120737", "0.5115397", "0.51145345", "0.51117074", "0.51004696", "0.50938666", "0.5091513", "0.5086756", "0.50845844", "0.5074128", "0.50695676", "0.5066898", "0.5062864", "0.5051886", "0.50500244", "0.504878", "0.5045833", "0.50443834", "0.504194", "0.5035221", "0.50340116", "0.5032063", "0.5025592", "0.5015498", "0.50116825", "0.49979198", "0.4992652", "0.49904096", "0.4988285", "0.4986767", "0.49853578", "0.49848777", "0.49787745", "0.4976079", "0.4975169", "0.4970817", "0.49639824", "0.4963678", "0.4941426", "0.49359983", "0.49351868", "0.49351868" ]
0.65398103
1
Method that return the negative rule to execute.
public AbstractComponent getNegativeOutcomeStep () { // Return the negative rule. return negativeOutcomeStep; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T negativeResult();", "Relation getNegation();", "public ExecutionPolicy not()\n\t{\n\t\treturn new NotRule(this);\n\t}", "private ASTNode unaryMinusRules(ASTNode operand){\n Token operandToken = operand.getToken();\n if (operand instanceof UnaryOP && operandToken.getType() == TokenType.MINUS) {\n return ((UnaryOP) operand).getOperand();\n }\n else{\n return operand;\n }\n }", "public Rule_in_State get_unprocessed_rule();", "public final void mRULE_MINUS() throws RecognitionException {\n try {\n int _type = RULE_MINUS;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12803:12: ( '-' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12803:14: '-'\n {\n match('-'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public Node negaposi()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.PLUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Positive(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\tif(lexer.getToken()==Lexer.Token.MINUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Negative(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn power();\r\n\t}", "java.lang.String getRule();", "Rule getRule();", "private void negate()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.negate();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}", "public Record getCancelWipRule(Record record);", "public abstract ArithValue negate();", "public Vector2D neg()\n\t{\n\t\treturn this.mul(-1);\n\t}", "public Scalar neg() {\n\t\treturn mul(new RealScalar(-1));\n\t}", "public final expressionParser.negation_return negation() throws RecognitionException {\n expressionParser.negation_return retval = new expressionParser.negation_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal51=null;\n\n CommonTree char_literal51_tree=null;\n RewriteRuleTokenStream stream_47=new RewriteRuleTokenStream(adaptor,\"token 47\");\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:94:3: ( '-' -> NEGATION )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:94:5: '-'\n {\n char_literal51=(Token)match(input,47,FOLLOW_47_in_negation523); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_47.add(char_literal51);\n\n\n\n // AST REWRITE\n // elements: \n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\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 // 94:9: -> NEGATION\n {\n adaptor.addChild(root_0, (CommonTree)adaptor.create(NEGATION, \"NEGATION\"));\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\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 }", "boolean getNegated();", "public String getRule() {\r\n return rule;\r\n }", "@Override\r\n public final boolean isUseless() {\r\n int i;\r\n Rule[] r;\r\n\r\n r = this.m_rules;\r\n for (i = (r.length - 1); i >= 0; i--) {\r\n if (!(r[i].isUseless()))\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public R getRule() {\n return this.rule;\n }", "public boolean isNegative();", "public boolean getNegated() {\r\n return Negated;\r\n }", "@Override\r\n\tpublic void minusFromCost() {\n\t\t\r\n\t}", "void negarAnalise();", "public java.lang.String getRule() {\n return rule;\n }", "public Binary negative(){\n\n Binary ret1= this.flip();\n Binary ret2= ret1.suma1();\n return ret2;\n }", "public String getRule() {\n\t\treturn this.rule;\n\t}", "public boolean isNegative() {\n return this.negative;\n }", "public NotRule(ExecutionPolicy rule)\n\t\t{\n\t\t\tthis.rule = rule;\n\t\t}", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public EnumRule getRule() { return rule; }", "public long setAmountNeg() {\n return -amount;\n }", "private Rule honorRules(InstanceWaypoint context){\n \t\t\n \t\tStyle style = getStyle(context);\n \t\tRule[] rules = SLD.rules(style);\n \t\t\n \t\t//do rules exist?\n \t\t\n \t\tif(rules == null || rules.length == 0){\n \t\t\treturn null;\n \t\t}\n \t\t\n \t\t\n \t\t//sort the elserules at the end\n \t\tif(rules.length > 1){\n \t\t\trules = sortRules(rules);\n \t\t}\n \t\t\n \t\t//if rule exists\n \t\tInstanceReference ir = context.getValue();\n \t\tInstanceService is = (InstanceService) PlatformUI.getWorkbench().getService(InstanceService.class);\n \t\tInstance inst = is.getInstance(ir);\n \t\t\t\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\t\n \t\t\tif(rules[i].getFilter() != null){\t\t\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(rules[i].getFilter().evaluate(inst)){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t//if a rule exist without a filter and without being an else-filter,\n \t\t\t//the found rule applies to all types\n \t\t\telse{\n \t\t\t\tif(!rules[i].isElseFilter()){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t//if there is no appropriate rule, check if there is an else-rule\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\tif(rules[i].isElseFilter()){\n \t\t\t\treturn rules[i];\n \t\t\t}\n \t\t}\n \t\t\n \t \n \t\t//return null if no rule was found\n \t\treturn null;\n \t\n \t}", "public Point2F negative()\r\n {return scale(-1);}", "public JTensor neg() {\n JTensor r = new JTensor();\n TH.THTensor_(neg)(r, this);\n return r;\n }", "public boolean isNegative()\n\t{\n\t\t// TO DO\n\t\treturn isNeg;\n\t}", "public Integer getNegativecount() {\n return negativecount;\n }", "public int getReferentialActionDeleteRule();", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Negation p, A arg)\n {\n\n p.arithmeticexpr_.accept(new ArithmeticExprVisitor<R,A>(), arg);\n\n return null;\n }", "@Override\n\tdouble evaluate() {\n\t\treturn Math.abs(operand.getVal());\n\t}", "public T negative() {\n T A = copy();\n ops.changeSign(A.mat);\n return A;\n }", "@Test\n public void testCalculateRPNCustomNegativeNumbers() throws Exception {\n String[] expression = {\"3\",\"4\",\"+\",\"8\",\"3\",\"-\",\"+\",\"-10\",\"*\"};\n double result = solver.calculateRPNCustom(expression);\n\n assertThat(result, is(-120.0));\n }", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "public interface NegativeAction {\n void negativeAction();\n}", "public Heading negate() {\r\n return new Heading(HeadingType.DEGREES, -this.degreeNum);\r\n }", "public NetworkRuleBypassOptions bypass() {\n return this.bypass;\n }", "public int getReferentialActionUpdateRule();", "private ASTNode binaryMinusRules(ASTNode left, ASTNode right) throws Exception {\n\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n TokenType numType = TokenType.NUMBER;\n TokenType varType = TokenType.VAR;\n TokenType minusType = TokenType.MINUS;\n TokenType plusType = TokenType.PLUS;\n\n Token tempToken;\n\n if (patternMatcher(leftType, rightType, numType, numType)){\n //left is num and right is num -> num\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n Double sum = leftVal + rightVal;\n\n //if sum is negative, store the new node as unaryMinus(abs(left+right))\n if (sum < 0){\n tempToken = new Token(minusType);\n Token tempInnerToken = new Token(numType, String.valueOf(sum * -1));\n ASTNode tempOperand = new Num(tempInnerToken);\n return new UnaryOP(tempToken, tempOperand);\n }\n else{\n String tempString = String.valueOf(sum);\n tempToken = new Token(numType, tempString);\n return new Num(tempToken);\n }\n }\n else if (patternMatcher(leftType, rightType, varType, varType)){\n //left is var and right is var -> 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightType == minusType && right instanceof UnaryOP){\n //left is anything and right is unary minus -> var+right.operand\n tempToken = new Token(plusType);\n return new BinaryOp(tempToken, left, ((UnaryOP) right).getOperand());\n }\n else if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0 -> anything\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything -> -anything\n tempToken = new Token(minusType);\n return new UnaryOP(tempToken, right);\n }\n //else\n tempToken = new Token(minusType);\n return new BinaryOp(tempToken ,left, right);\n }", "public void neg_() {\n TH.THTensor_(neg)(this, this);\n }", "private int getNegativeCount(){\n return m_NegativeCount;\n }", "TextStyle negate();", "public void setNegativeOutcomeStep (AbstractComponent negativeOutcomeStep) {\n\n\t\t// Set the negative rule.\n\t\tthis.negativeOutcomeStep = negativeOutcomeStep;\n\t}", "public IRule getRule()\n\t{\n\t\treturn this.rule;\n\t}", "public Arginfo visit(MinusExpression n, Arginfo argu) {\n\t \t Arginfo _ret=null;\n\t int num=labelctr++;\n\t System.out.println(\"BEGIN\\nNOOP\\n RETURN MINUS \");\n\t n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t \n\t System.out.println(\"\\nEND\\n\");\n\t return _ret;\n }", "public Complex negate() {\n return new Complex(-re, -im);\n }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }" ]
[ "0.6573107", "0.6475294", "0.6259845", "0.62428606", "0.62333626", "0.61936057", "0.6186222", "0.61788183", "0.60739917", "0.5999644", "0.5926662", "0.591972", "0.59057736", "0.5854843", "0.58463585", "0.58074", "0.58010596", "0.57942754", "0.5779226", "0.57532376", "0.5734429", "0.57238925", "0.5721293", "0.56958944", "0.56632376", "0.5661655", "0.56544554", "0.565252", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.56232345", "0.5589911", "0.55508083", "0.55461055", "0.5469169", "0.54559964", "0.5450337", "0.54396594", "0.54299706", "0.54259366", "0.5420474", "0.5416632", "0.540862", "0.54049426", "0.5404024", "0.53998584", "0.5361694", "0.53605074", "0.5351666", "0.5346608", "0.53404236", "0.5332434", "0.5330672", "0.5323741", "0.53132904", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768", "0.5310768" ]
0.6813546
0
Execute the business and get the result.
@Override public final void execute (Map<Key, Object> context) { boolean outcome = makeDecision (context); if (outcome) { positiveOutcomeStep.execute (context); } else { negativeOutcomeStep.execute (context); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n public <T> T execute() {\n return (T) fetchResponse(getCallToExecute());\n }", "public Object runAndGetResult() {\n run();\n return getResult();\n }", "protected void execute() {\n \t\n }", "protected void execute() {\n \t\n }", "@Override\n public void execute() {\n this.setMyReturnValue(myHandler.getXcor());\n }", "ResponseEntity execute();", "@Override\n public byte[] execute() {\n return buildResponse();\n }", "Result getResult();", "public void receiveResultexecute(\n loadbalance.LoadBalanceStub.ExecuteResponse result\n ) {\n }", "@Override\n\tpublic void execute() throws Exception {\n\t\tAccount account = OperationContext.getContext().getAccount();\n\t\tHotelDao HDao = DaoManager.getInstance().getDao(HotelDao.class);\t\t\n\t\thotelId = HDao.getHotelIdByAccountId(account.getId());\n\t\thotel = HDao.getHotelByHotelId(hotelId);\t\t\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "@Override\n\tpublic void execute() {\n\t\tDMNModel model = getDmnRuntime().getModels().get(0); // assuming there is only one model in the KieBase\n\t\t\n\t\t// setting input data\n\t\tDMNContext dmnContext = createDmnContext(\n\t\t\t\tImmutablePair.of(\"customerData\", new CustomerData(\"Silver\", new BigDecimal(15)))\n\t\t);\n\t\t\n\t\t// executing decision logic\n\t\tDMNResult topLevelResult = getDmnRuntime().evaluateAll(model, dmnContext);\n\t\t\n\t\t// retrieving execution results\n\t\tSystem.out.println(\"--- results of evaluating all ---\");\n\t\ttopLevelResult.getDecisionResults().forEach(this::printAsJson);\n\t}", "@Override\n public void execute() throws EngineException {\n Object target = JavaReflectionUtil.getObject(this.target, \n callStatement.getEntries().subList(1,\n callStatement.getEntries().size() - 1));\n this.getParent().setResult(executeMethod(target, callStatement));\n pop();\n }", "public abstract int execute();", "protected abstract QueryResult executeWorkFlow(LogicalWorkflow workflow) throws ConnectorException;", "public IStatus getResult();", "public int execute();", "public void execute() throws AeBusinessProcessException;", "protected void execute() {}", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "protected void execute() {\r\n }", "public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=getHandler().obtainMessage();\n\t\t\thmsg.obj=map;\n\t\t\thmsg.arg1=1;\n\t\t\tgetHandler().sendMessage(hmsg);\n\t\t\tsetHandler(null);\n\t\t}\n\t}", "@Override\n\tpublic Response call() throws Exception {\n\t\tClientResponse response = callWebService(this.spaceEntry);\n\t\tthis.transId = (int) response.getEntity(Integer.class);\n\t\tresponse.close();\n\t\t/*wait for web service to provide tuple Object result*/\n\t\tawaitResult();\n\t\t\n\t\t/*return result*/\n\t\treturn result;\n\t}", "@Override\n public void execute() throws CompanyNotFoundException, UnexpectedErrorException {\n try {\n _log.debug( \"Id recibido en GetCompanyByUser: \" +_co.get_idCompany() );\n IDAOCompany _dao = DAOFactory.instanciateDaoCompany();\n _coList = _dao.companiesByUser( _co );\n\n }catch(NullPointerException e) {\n _log.error( \"Se ha lanzado un CompanyNotFoundException en;\"+ getClass().getName() );\n throw new CompanyNotFoundException(\"Compañia no encontrada\",e);\n }catch ( Exception e ){\n _log.error( \"Se ha lanzado un UnexpectedErrorException en;\"+ getClass().getName() );\n throw new UnexpectedErrorException( e );\n }\n\n }", "@Override\n\tpublic Object execute() {\n\n\t\treturn null;\n\t}", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "public void execute() {\r\n\t\r\n\t}", "@Api(1.1)\n public Response execute() throws HaloNetException {\n return mBuilder.mClient.request(mRequest);\n }", "protected void execute() {\n\t\t\n\t}", "public void execute() {\n\t\t\n\t}", "public void execute() {\n\n\t}", "protected void execute() {\n\n\t}", "@Override\n\tpublic String execute() throws Exception {\n\t\t\n\t\treturn super.execute();\n\t}", "protected void execute()\n {\n }", "public String process() throws Exception\r\n\t{\r\n\t\treturn result;\r\n\t}", "public void execute() {\n }", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn super.execute();\n\t}", "ExecutionResult<Void> execute();", "public boolean execute();", "protected void execute()\n\t{\n\t}", "protected void execute() {\n\t}", "protected abstract O getResult();", "protected abstract void execute();", "public void execute() {\n if (hasError())\n return;\n\n runLocally();\n runRemotely();\n }", "@SuppressWarnings(\"unchecked\")\n public void execute() {\n execute(null, null);\n }", "public void execute(){\n\t\t\n\t}", "CommandResult execute();", "@Override\r\n\tpublic Object execute() {\n\t\tgameState.endGame();\r\n\t\tObject[] r=gameState.getGameData();\r\n\t\treturn r;\r\n\t}", "public T getResult();", "@Override\r\n\tpublic String execute() throws Exception {\n\t\treturn null;\r\n\t}", "public String process() {\r\n\r\n\t\tString status = null;\r\n\t\tLOGGER.info(\"Orchestration started\");\r\n\t\ttry {\r\n\t\t\t//validate the injections\r\n\t\t\tvalidateDependencies();\r\n\t\t\t\r\n\t\t\t// check whether the connection is properly established before the\r\n\t\t\t// processor starts with its orchestration\r\n\t\t\tif (dataReader.isConnectedEstablished()) {\r\n\t\t\t\t// read till there is no more data available with the reader\r\n\t\t\t\twhile (!dataReader.isDone()) {\r\n\r\n\t\t\t\t\tList<ClientInstructions> instructions = dataReader.read();\r\n\t\t\t\t\t// validate the settlement date before we start with actual\r\n\t\t\t\t\t// processing\r\n\t\t\t\t\tinstructions.forEach(p -> getManipulationService().updateSettlementDates(p));\r\n\t\t\t\t\tcalculateOutgoings(instructions);\r\n\t\t\t\t\tcalculateIncomings(instructions);\r\n\t\t\t\t\tcalculateOutgoingRankings(instructions);\r\n\t\t\t\t\tcalculateIncomingRankings(instructions);\r\n\t\t\t\t}\r\n\t\t\t\t// generate reports for the dataset\r\n\t\t\t\tgenerateReports();\r\n\t\t\t\tstatus = ReportingSystemConstants.STATUS_SUCCESS;\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.error(\"Connection not established, please open a connection\");\r\n\t\t\t\tstatus = ReportingSystemConstants.STATUS_FAILURE;\r\n\t\t\t}\r\n\r\n\t\t\t// handle the exception and close the resources\r\n\t\t} catch (Exception exception) {\r\n\t\t\tstatus = ReportingSystemConstants.STATUS_FAILURE;\r\n\t\t\tLOGGER.error(exception.getMessage(), exception);\r\n\t\t\ttry {\r\n\t\t\t\tif(dataReader != null)\r\n\t\t\t\t\tdataReader.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tLOGGER.info(\"Orchestration completed with status={}\", status);\r\n\t\treturn status;\r\n\t}", "@Override\r\n\tpublic void execute() {\n\t\tif (this.content != null) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.e2eValidationClient.execute(this.content);\r\n\t\t\t\tthis.result = this.e2eValidationClient.getResponse();\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\tthrow new RuntimeException(e);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Nothing to execute!\");\r\n\t\t}\r\n\r\n\t}", "public String execute() throws DomainApiException {\n try {\n initConnection();\n if (method == POST || method == PUT) {\n sendHttpRequest(buildBody());\n }\n return readHttpResponse();\n } catch (MalformedURLException ex) {\n throw new DomainApiException(ex);\n } catch (IOException ex) {\n throw new DomainApiException(ex);\n }\n }", "public abstract String getResult();", "@Override\n\tpublic String execute() throws Exception {\n\t\tSystem.out.println(bean.toString());\n\t\treturn Action.SUCCESS;\n\t}", "public TestResult run() {\n TestResult result= createResult();\n run(result);\n return result;\n }", "@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"ServiceImpl execute\");\n\t}", "int getResult();", "public CreditCheckBO execute() throws WOMExternalSystemException {\n\t\texecuteSapFunction();\n\t\treturn new CreditCheckBO(this.creditBlock, this.orderBlock);\n\t}", "@Override\n public void execute() {\n modelFacade.getFoodItems().addAll(modelFacade.fetchMatchingFoodItemResults(sb.toString()));\n }", "@Override\n\tpublic void execute() {\n\t\trecevier.doSomething();\n\t}", "public abstract void execute();", "public abstract void execute();", "public abstract void execute();", "@SuppressWarnings(\"unchecked\")\n\tpublic String execute() throws Exception {\n\t\tif(this.client == null)\n\t\t\tthis.client = this.bpmUserClientUtil.getClient();\n\t\t\n\t\tString hisId = this.getSelfHistoryId();\n\t\tActivityInstHistory his = client.getActivityInstHistory(hisId);\n\t\t\t\n\t\tList<ActivityInst> insts = client.getActivityInstListByOutActvityInstHistory(hisId, null);\n\t\n\t\ttotalCount = insts.size();\n\t\tfor(int i=0; i<insts.size(); i++){\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tActivityInst inst = insts.get(i);\n\t\t\tif(!inst.isCanTakeBack()){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(\"suspended\".equals(inst.getState())){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tString name = inst.getActivityDef().getName();\n\t\t\tSystem.out.println(name);\n\t\t\tmap.put(\"name\", name);\n\t\t\tmap.put(\"arriveTime\", DateUtils.format(inst.getArrivedTime(),\n\t\t\t\t\t\"yyyy-MM-dd HH:mm:ss\"));\n\t\t\tif(inst.getStartTime() != null)\n\t\t\t\tmap.put(\"startTime\", DateUtils.format(inst.getStartTime(),\"yyyy-MM-dd HH:mm:ss\"));\n\t\t\telse\n\t\t\t\tmap.put(\"startTime\", \"\");\n\t\t\tmap.put(\"status\", this.getStatus(inst));\n\t\t\tList performers = (List)client.getActivityInstRightAttribute(inst.getActivityInstId(), OARightConstants.ACTIVITYINST_RIGHT_ATT_PERFORMER, null);\n\t\t\tSystem.out.println(inst.getActivityInstId());\n\t\t\tPerson p = (Person) performers.get(0);\n\t\t\tString person = p.getName() + '/' + p.getOrgs()[0].getName();\n\t\t\tmap.put(\"person\", person);\n\t\t\tmap.put(\"instId\", inst.getActivityInstId());\n\t\t\tmap.put(\"historyId\", his.getActivityHistoryId());\n\t\t\tlist.add(map);\n\t\t}\n\t\t\n\t\treturn SUCCESS;\n\t}", "public CClass execute() {\n return this.executeOnScope(this.staticScope);\n }", "public String execute() throws Exception {\t\t\n\t\t//Obtains user information from session, then sets it to Model.\n\t\tthis.yjaService.setUserInfoToModel(actionModel);\t\t\n\t\treturn initExecute();\t\t\n\t}", "public void receiveResultexecute(\n com.exacttarget.wsdl.partnerapi.ExecuteResponseMsgDocument result\n ) {\n }", "public String execute() throws Exception{\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tHttpSession session = request.getSession();\n\t\tservicePatModel = (ServicePatientModel) session.getAttribute(\"ServicePatientModel\");\n\t\tsetPatHN(servicePatModel.getHn());\n\t\t\n\t\tif(!request.getParameter(\"branchModel.branch_code\").isEmpty()){\n\t\t\tsetBranch_code(request.getParameter(\"branchModel.branch_code\"));\n\t\t\tGeneratePatientBranchID gpbID = new GeneratePatientBranchID();\n\t\t\tgpbID.generateBranchHN(getBranch_code());\n\t\t\tthis.branch_code = gpbID.getBranchCode();\n\t\t\t\n\t\t\tsetBranchHN(gpbID.getResultID()[0]);\n\t\t\tsetNextNumber(gpbID.getResultID()[1]);\n\t\t\tsetBranchID(gpbID.getResultID()[2]);\n\t\t\t\n\t\t\t/**\n\t\t\t * UPDATE DATABASE\n\t\t\t */\n\t\t\tBranchData bd = new BranchData();\n\t\t\tif(bd.updateBranchHN(\n\t\t\t\t\tthis.nextNumber,\n\t\t\t\t\tthis.branch_code,\n\t\t\t\t\tthis.patHN,\n\t\t\t\t\tthis.branchHN,\n\t\t\t\t\tthis.branchID\n\t\t\t)){\n\t\t\t\treturn SUCCESS;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn SUCCESS;\n\t}", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "protected void execute() {\n\n\n \n }", "protected R getResult() {\n\t\treturn result;\n\t}", "@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}", "T getResult();", "T getResult();", "@Override\n public String execute() {\n final OAuth20Service service = new ServiceBuilder(API_APP_KEY)\n .apiSecret(API_APP_SECRET)\n .callback(\"http://127.0.0.1:8080/connectFacebook\")\n .scope(\"publish_actions\")\n .build(FacebookApi.instance());\n\n final OAuth2AccessToken accessToken;\n try {\n accessToken = service.getAccessToken(code);\n\n // Get user id and name\n final OAuthRequest request = new OAuthRequest(Verb.GET, URL);\n service.signRequest(accessToken, request);\n\n // Get response from API\n final Response response = service.execute(request);\n System.out.println(response);\n System.out.println(response.getCode());\n System.out.println(response.getMessage());\n System.out.println(response.getBody());\n\n // Parse response\n JSONObject body = (JSONObject) JSONValue.parse(response.getBody());\n\n\n this.getLigacaoFbBean().setUtilizador((String) session.get(\"UTILIZADOR\"));\n this.getLigacaoFbBean().setFacebookId((String) body.get(\"id\"));\n this.getLigacaoFbBean().setAcessToken(accessToken.getAccessToken());\n resultado = this.getLigacaoFbBean().ligacaoFB();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n return SUCCESS;\n }", "public String getResult();" ]
[ "0.68611896", "0.65765494", "0.6434308", "0.6434308", "0.64306796", "0.64205205", "0.6296884", "0.6286489", "0.6277063", "0.62698996", "0.6260871", "0.6260871", "0.6260871", "0.6239126", "0.61876357", "0.6179589", "0.6172312", "0.6167368", "0.6166756", "0.61625767", "0.61502194", "0.6141754", "0.6141754", "0.6141754", "0.6141754", "0.6118313", "0.61175144", "0.6113259", "0.6085241", "0.6082086", "0.6072579", "0.6072579", "0.6072579", "0.6072579", "0.6072579", "0.6072579", "0.6072579", "0.6072579", "0.6072579", "0.6072579", "0.6072579", "0.6072579", "0.60635763", "0.6050879", "0.6047693", "0.6042512", "0.60416895", "0.60373586", "0.6011048", "0.6009046", "0.6007193", "0.60062486", "0.600554", "0.600554", "0.600554", "0.6001351", "0.5982256", "0.5979325", "0.59788346", "0.59788007", "0.5962327", "0.59598136", "0.5951375", "0.5950556", "0.59453076", "0.59279495", "0.592541", "0.59175956", "0.59051514", "0.5904013", "0.58979565", "0.58925796", "0.58900005", "0.58559704", "0.5847168", "0.5844656", "0.5840822", "0.5837822", "0.5837661", "0.58217", "0.58217", "0.58217", "0.5813924", "0.58023393", "0.57995445", "0.57787716", "0.5776152", "0.57527983", "0.57527983", "0.57527983", "0.57527983", "0.57527983", "0.57527983", "0.57527983", "0.57364", "0.5736397", "0.5709956", "0.5706609", "0.5706609", "0.5704034", "0.570334" ]
0.0
-1
/ parse one XmlPullParser to DeviceInformation
private static DeviceInformation parseDeviceInfor(XmlPullParser parser) { try { parser.require(XmlPullParser.START_TAG, XMLParser.NS, DeviceInformation.DEVICE_INFORMATION); DeviceInformation device = new DeviceInformation(); while (parser.next() != XmlPullParser.END_TAG) { if (parser.getEventType() != XmlPullParser.START_TAG) { continue; } String name = parser.getName(); if (DeviceInformation.LOGICAL_ADDRESS.equals(name)) { device.setLogAddr(getIntValue(XMLParser.getValue(parser, DeviceInformation.LOGICAL_ADDRESS))); } else if (DeviceInformation.PHYSICAL_ADDRESS.equals(name)) { device.setPhyAddr(XMLParser.getValue(parser, DeviceInformation.PHYSICAL_ADDRESS)); } else if (DeviceInformation.DEVICE_TYPE.equals(name)) { device.setDevType(getIntValue(XMLParser.getValue(parser, DeviceInformation.DEVICE_TYPE))); } else if (DeviceInformation.VENDOR_ID.equals(name)) { device.setVendorId(XMLParser.getValue(parser, DeviceInformation.VENDOR_ID)); } else if (DeviceInformation.HDMI_PORT_NUM.equals(name)) { device.setHdmiPort(getIntValue(XMLParser.getValue(parser, DeviceInformation.HDMI_PORT_NUM))); } else if (DeviceInformation.CONNECTEDTOAMP.equals(name)) { device.setCntToAmp(Boolean.valueOf(XMLParser.getValue( parser, DeviceInformation.CONNECTEDTOAMP))); } else if (DeviceInformation.OSD_NAME.equals(name)) { device.setOsdName(XMLParser.getValue(parser, DeviceInformation.OSD_NAME)); } else { XMLParser.skip(parser); } } return device; } catch (XmlPullParserException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Device> getXmlDevice(String xmlpath) {\n List<Device> devices =null;\n Device device =null;\n List<Integer> parents =null;\n List<Integer> sons =null;\n int pcnt=0,scnt =0;\n try {\n InputStream xml = new FileInputStream(xmlpath);\n XmlPullParser pullParser = Xml.newPullParser();\n pullParser.setInput(xml, \"UTF-8\");\n int event = pullParser.getEventType();\n while ( event!= XmlPullParser.END_DOCUMENT)\n {\n switch (event){\n case XmlPullParser.START_DOCUMENT:\n devices =new ArrayList<>(20);\n break;\n case XmlPullParser.START_TAG:\n if(\"Device\".equals(pullParser.getName()))\n {\n String id = pullParser.getAttributeValue(null,\"ID\");\n\n if(id.startsWith(\"000101\")) //ES-brewer\n {\n device = new Dev_ES(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_ES)device).setMax_capability(Integer.parseInt(pullParser.getAttributeValue(null,\"Max_Capability\")));\n ((Dev_ES)device).setInlet_flow(Integer.parseInt(pullParser.getAttributeValue(null,\"Flow_Meter\")));\n ((Dev_ES)device).setLife_brewer_motor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Motor\")));\n ((Dev_ES)device).setLife_inlet_valve(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Valve\")));\n }\n else if(id.startsWith(\"0002\")) //grinder\n {\n device = new Dev_Grinder(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_Grinder)device).setDosage_value(Integer.parseInt(pullParser.getAttributeValue(null,\"Dosage_Value\")));\n ((Dev_Grinder)device).setMotor_life(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Motor\")));\n }\n else if(id.startsWith(\"0003\")) //canister\n {\n device =new Dev_Canister(0x02,0x01);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_Canister)device).setMotor_life(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Motor\")));\n (device).setCompent_type(Integer.parseInt(pullParser.getAttributeValue(null,\"Type\")));\n ((Dev_Canister)device).setDosage_value(Integer.parseInt(pullParser.getAttributeValue(null,\"Dosage_Value\")));\n ((Dev_Canister)device).setPowder_type(Integer.parseInt(pullParser.getAttributeValue(null,\"Powder\")));\n ((Dev_Canister)device).setMax_capability(Integer.parseInt(pullParser.getAttributeValue(null,\"Max_Capability\")));\n }\n else if(id.startsWith(\"0004\")) //mixer\n {\n device = new Dev_Mixer_L(0x01);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_Mixer_L)device).setMax_capability(Integer.parseInt(pullParser.getAttributeValue(null,\"Max_Capability\")));\n ((Dev_Mixer_L)device).setRun_speed(Integer.parseInt(pullParser.getAttributeValue(null,\"Speed\")));\n ((Dev_Mixer_L)device).setHot_valve_flow(Integer.parseInt(pullParser.getAttributeValue(null,\"Hot_flow\")));\n ((Dev_Mixer_L)device).setCold_valve_flow(Integer.parseInt(pullParser.getAttributeValue(null,\"Cold_flow\")));\n ((Dev_Mixer_L)device).setLife_motor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Motor\")));\n ((Dev_Mixer_L)device).setLife_cold_valve(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_cold_valve\")));\n ((Dev_Mixer_L)device).setLife_hot_valve(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_hot_valve\")));\n ((Dev_Mixer_L)device).setLife_whipper(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_whipper\")));\n }\n else if(id.startsWith(\"0005\")) //flowmeter\n {\n device =new Dev_SenFlowmeter(1,1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_SenFlowmeter)device).setPluse(Integer.parseInt(pullParser.getAttributeValue(null,\"Pluse\")));\n }\n else if(id.startsWith(\"0006\")) //ntc\n {\n device = new Dev_SenNtc(Integer.parseInt(pullParser.getAttributeValue(null,\"Type\")));\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_SenNtc)device).setLife_sensor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Sensor\")));\n ((Dev_SenNtc)device).setTemperature_normal(Integer.parseInt(pullParser.getAttributeValue(null,\"Normal\")));\n ((Dev_SenNtc)device).setTemperature_warning(Integer.parseInt(pullParser.getAttributeValue(null,\"Warn\")));\n ((Dev_SenNtc)device).setTemperature_block(Integer.parseInt(pullParser.getAttributeValue(null,\"Block\")));\n ((Dev_SenNtc)device).setTemperature_eco(Integer.parseInt(pullParser.getAttributeValue(null,\"ECO\")));\n ((Dev_SenNtc)device).setTemperature_offset(Integer.parseInt(pullParser.getAttributeValue(null,\"Offset\")));\n }\n else if(id.startsWith(\"0007\")) //water level\n {\n device = new Dev_SenWater(Integer.parseInt(pullParser.getAttributeValue(null,\"Type\")));\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_SenWater)device).setLife_sensor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Sensor\")));\n }\n else if(id.startsWith(\"0008\")) //cup sensor\n {\n device = new Dev_SenCup(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_SenCup)device).setLife_sensor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Sensor\")));\n }\n else if(id.startsWith(\"0009\")) //pressure sensor\n {\n device = new Dev_SenPressuer(1,1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setCompent_type(Integer.parseInt(id.substring(4,6),16));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_SenPressuer)device).setLife_sensor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Sensor\")));\n }\n else if(id.startsWith(\"000A\")) //pump water\n {\n device = new DEV_Waterpump(1,1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setCompent_type(Integer.parseInt(id.substring(4,6),16));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((DEV_Waterpump)device).setMotor_life(Integer.parseInt(pullParser.getAttributeValue(null,\"Motor_life\")));\n ((DEV_Waterpump)device).setSpeed(Integer.parseInt(pullParser.getAttributeValue(null,\"Speed\")));\n }\n else if(id.startsWith(\"000C\")) //led\n {\n device = new Dev_Led(Integer.parseInt(pullParser.getAttributeValue(null,\"Type\")),1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_Led)device).setLed_idel_mode(Integer.parseInt(pullParser.getAttributeValue(null,\"IdleMode\")));\n ((Dev_Led)device).setLed_idel_color(Integer.parseInt(pullParser.getAttributeValue(null,\"IdleColor\")));\n ((Dev_Led)device).setLed_idel_intensity(Integer.parseInt(pullParser.getAttributeValue(null,\"IdleInt\")));\n ((Dev_Led)device).setLed_warn_mode(Integer.parseInt(pullParser.getAttributeValue(null,\"WarnMode\")));\n ((Dev_Led)device).setLed_warn_color(Integer.parseInt(pullParser.getAttributeValue(null,\"WarnColor\")));\n ((Dev_Led)device).setLed_warn_intensity(Integer.parseInt(pullParser.getAttributeValue(null,\"WarnInt\")));\n ((Dev_Led)device).setLife_led(Integer.parseInt(pullParser.getAttributeValue(null,\"LedLife\")));\n }\n else if(id.startsWith(\"000e\")) //air\n {\n device =new Dev_Airbreak(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n }\n else if(id.startsWith(\"000F02\")) //boiler\n {\n device =new Dev_Boiler_G(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_Boiler_G)device).setMax_capability(Integer.parseInt(pullParser.getAttributeValue(null,\"Max_Capability\")));\n ((Dev_Boiler_G)device).setInlet_water_type(Integer.parseInt(pullParser.getAttributeValue(null,\"Water\")));\n ((Dev_Boiler_G)device).setLife_intlet_valve(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_inlet_valve\")));\n ((Dev_Boiler_G)device).setCycle_boiler_clean(Integer.parseInt(pullParser.getAttributeValue(null,\"Clean_cycle\")));\n }\n else if(id.startsWith(\"000F03\")) //boiler\n {\n device =new Dev_Boiler_ES(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_Boiler_ES)device).setMax_capability(Integer.parseInt(pullParser.getAttributeValue(null,\"Max_Capability\")));\n ((Dev_Boiler_ES)device).setInlet_water_type(Integer.parseInt(pullParser.getAttributeValue(null,\"Water\")));\n ((Dev_Boiler_ES)device).setLife_intlet_valve(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_inlet_valve\")));\n ((Dev_Boiler_ES)device).setCycle_boiler_clean(Integer.parseInt(pullParser.getAttributeValue(null,\"Clean_cycle\")));\n }\n else if(id.startsWith(\"0014\")) //fan\n {\n device =new Dev_Fan(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_Fan)device).setLife_motor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Motor\")));\n ((Dev_Fan)device).setRun_speed(Integer.parseInt(pullParser.getAttributeValue(null,\"Speed\")));\n }\n else if(id.startsWith(\"0015\")) //hopper\n {\n device = new Dev_Hopper(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_Hopper)device).setMax_capability(Integer.parseInt(pullParser.getAttributeValue(null,\"Max_Capability\")));\n ((Dev_Hopper)device).setPowder_type(Integer.parseInt(pullParser.getAttributeValue(null,\"Powder\")));\n //((Dev_Hopper)device).setDosage_value(Integer.parseInt(pullParser.getAttributeValue(null,\"Speed\")));\n ((Dev_Hopper)device).setMotor_life(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Motor\")));\n }\n else if(id.startsWith(\"0016\")) //heater\n {\n device = new Dev_Heater(1,1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setCompent_type(Integer.parseInt(id.substring(4,6),16));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_Heater)device).setMax_heat_time(Integer.parseInt(pullParser.getAttributeValue(null,\"Max_heat_time\")));\n ((Dev_Heater)device).setLife_times(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_times\")));\n }\n else if(id.startsWith(\"0018\")) //driptray\n {\n device = new Dev_SenDriptray(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_SenDriptray)device).setLife_sensor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Sensor\")));\n ((Dev_SenDriptray)device).setMax_capability(Integer.parseInt(pullParser.getAttributeValue(null,\"Max_Capability\")));\n }\n else if(id.startsWith(\"0019\")) //wasterbin\n {\n device = new Dev_SenWaster(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_SenWaster)device).setLife_sensor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Sensor\")));\n ((Dev_SenWaster)device).setMax_capability(Integer.parseInt(pullParser.getAttributeValue(null,\"Max_Capability\")));\n }\n else if(id.startsWith(\"001A\")) //door\n {\n device = new Dev_SenDoor(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n device.setPosition_id(Integer.parseInt(id.substring(6),16));\n ((Dev_SenDoor)device).setLife_sensor(Integer.parseInt(pullParser.getAttributeValue(null,\"Life_Sensor\")));\n }\n else if(id.startsWith(\"000002\")) //machine\n {\n\n device =new DEV_virMachine(1);\n device.setID(pullParser.getAttributeValue(null,\"GUID\"));\n }\n\n }\n else if(\"Parents\".equals(pullParser.getName()))\n {\n int count = Integer.parseInt(pullParser.getAttributeValue(null,\"Count\"));\n pcnt =count;\n if(count >0)\n parents = new ArrayList<>(count);\n }\n else if(\"Parent\".equals(pullParser.getName()))\n {\n if(pcnt>0)\n parents.add(Integer.parseInt(pullParser.getAttributeValue(null,\"ID\"),16));\n }\n else if(\"Sons\".equals(pullParser.getName()))\n {\n int count = Integer.parseInt(pullParser.getAttributeValue(null,\"Count\"));\n scnt =count;\n if(count >0)\n sons = new ArrayList<>(count);\n }\n else if(\"Son\".equals(pullParser.getName()))\n {\n if(scnt>0)\n sons.add(Integer.parseInt(pullParser.getAttributeValue(null,\"ID\"),16));\n }\n break;\n case XmlPullParser.END_TAG:\n if(\"Device_Map\".equals(pullParser.getName()))\n {\n break;\n }\n else if(\"Device\".equals(pullParser.getName()))\n {\n devices.add(device);\n device =null;\n }\n else if(\"Parent\".equals(pullParser.getName()))\n {\n if(parents!=null && parents.size() == pcnt) {\n device.setParent_id_list(parents);\n parents =null;\n pcnt=0;\n }\n }\n else if(\"Son\".equals(pullParser.getName()))\n {\n if(sons!=null && sons.size() == scnt) {\n device.setSon_id_list(sons);\n sons =null;\n scnt= 0;\n }\n }\n break;\n }\n event = pullParser.next();\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n return devices;\n }", "void read(XmlPullParser xmlPullParser) throws IOException, XmlPullParserException;", "private void parseSpecificDevice(final String name,\n final XMLStreamReader reader)\n throws ParsingException, XMLStreamException {\n if (Parameter.valueOf(name.toUpperCase())\n == Parameter.PERIPHERALDEVICE) {\n PeripheralDevice peripheralDevice\n = buildPeripheralDevice(reader);\n getDevices().add(peripheralDevice);\n } else {\n if (Parameter.valueOf(name.toUpperCase())\n == Parameter.INNERDEVICE) {\n InnerDevice innerDevice = buildInnerDevice(reader);\n getDevices().add(innerDevice);\n }\n }\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localSpIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"spId\"));\r\n \r\n if (localSpId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSpId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"spId cannot be null!!\");\r\n }\r\n } if (localSpPasswordTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"spPassword\"));\r\n \r\n if (localSpPassword != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSpPassword));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"spPassword cannot be null!!\");\r\n }\r\n } if (localServiceIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"serviceId\"));\r\n \r\n if (localServiceId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localServiceId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"serviceId cannot be null!!\");\r\n }\r\n } if (localTimeStampTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"timeStamp\"));\r\n \r\n if (localTimeStamp != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localTimeStamp));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"timeStamp cannot be null!!\");\r\n }\r\n } if (localOATracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"OA\"));\r\n \r\n if (localOA != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOA));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"OA cannot be null!!\");\r\n }\r\n } if (localOauth_tokenTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"oauth_token\"));\r\n \r\n if (localOauth_token != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOauth_token));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"oauth_token cannot be null!!\");\r\n }\r\n } if (localFATracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"FA\"));\r\n \r\n if (localFA != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFA));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"FA cannot be null!!\");\r\n }\r\n } if (localTokenTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"token\"));\r\n \r\n if (localToken != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localToken));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"token cannot be null!!\");\r\n }\r\n } if (localWatcherTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"watcher\"));\r\n \r\n if (localWatcher != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localWatcher));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"watcher cannot be null!!\");\r\n }\r\n } if (localPresentityTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"presentity\"));\r\n \r\n if (localPresentity != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPresentity));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"presentity cannot be null!!\");\r\n }\r\n } if (localAuthIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"authId\"));\r\n \r\n if (localAuthId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAuthId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"authId cannot be null!!\");\r\n }\r\n } if (localLinkidTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"linkid\"));\r\n \r\n if (localLinkid != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localLinkid));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"linkid cannot be null!!\");\r\n }\r\n } if (localPresentidTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"presentid\"));\r\n \r\n if (localPresentid != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPresentid));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"presentid cannot be null!!\");\r\n }\r\n } if (localMsgTypeTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"msgType\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMsgType));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public static List<DeviceItemLayout> getXmlLayout(String xmlpath)\n {\n List<DeviceItemLayout> devices =null;\n DeviceItemLayout device =null;\n String tagName = \"\";\n try {\n InputStream xml = new FileInputStream(xmlpath);\n XmlPullParser pullParser = Xml.newPullParser();\n pullParser.setInput(xml, \"UTF-8\");\n int event = pullParser.getEventType();\n while (event != XmlPullParser.END_DOCUMENT) {\n switch (event) {\n case XmlPullParser.START_DOCUMENT:\n devices = new ArrayList<>(10);\n break;\n case XmlPullParser.START_TAG:\n tagName = pullParser.getName();\n if (\"DeviceItem\".equals(tagName)) {\n device = new DeviceItemLayout();\n }\n break;\n case XmlPullParser.TEXT:\n String text = pullParser.getText().equals(\"\")?\"0\":pullParser.getText();\n if (\"Uid\".equals(tagName)) {\n device.setUid(text);\n } else if (\"Left\".equals(tagName)) {\n device.setLeft(Float.parseFloat(text));\n } else if (\"Top\".equals(tagName)) {\n device.setTop(Float.parseFloat(text));\n } else if (\"Width\".equals(tagName)) {\n device.setWidth(Float.parseFloat(text));\n } else if (\"Height\".equals(tagName)) {\n device.setHeight(Float.parseFloat(text));\n }\n break;\n case XmlPullParser.END_TAG:\n if (\"DeviceItem\".equals(pullParser.getName())) {\n if(!device.getUid().equals(\"0000-00\")) {\n devices.add(device);\n }\n device = null;\n }tagName = \"\";\n break;\n }\n event = pullParser.next();\n }\n }\n catch (Exception e)\n {\n return null;\n }\n return devices;\n }", "@Override\n public void buildListDevices(final String fileName) {\n XMLStreamReader reader;\n String name;\n try (FileInputStream inputStream\n = new FileInputStream(new File(fileName))) {\n reader = inputFactory.createXMLStreamReader(inputStream);\n\n while (reader.hasNext()) {\n int type = reader.next();\n if (type == XMLStreamConstants.START_ELEMENT) {\n name = reader.getLocalName();\n parseSpecificDevice(name, reader);\n }\n }\n\n LOGGER.info(\"Parsing by DOM parser was successfully done!\");\n } catch (XMLStreamException ex) {\n LOGGER.error(\"StAX parsing error!\");\n } catch (FileNotFoundException ex) {\n LOGGER.error(\"File \" + fileName + \" not found!\");\n } catch (ParsingException e) {\n LOGGER.error(e.getMessage());\n } catch (IOException e) {\n LOGGER.error(\"Exception with file.\");\n }\n }", "private Device getDevFromElement(Element devElement, String address) {\n\n String devId = devElement.getElementsByTagName(\"Id\").item(0).getTextContent();\n NodeList nodeList = devElement.getElementsByTagName(\"Names\").item(0).getChildNodes();\n Map<Locale, String> actNames = new HashMap<>();\n\n for (int i = 0; i < nodeList.getLength(); i++) {\n NodeList nameNodes = nodeList.item(i).getChildNodes();\n String locale = nameNodes.item(0).getTextContent();\n String name = nameNodes.item(1).getTextContent();\n actNames.put(new Locale(locale.split(\"_\")[0], locale.split(\"_\")[1]), name);\n }\n\n String type = devElement.getElementsByTagName(\"Type\").item(0).getTextContent();\n String image = devElement.getElementsByTagName(\"Image\").item(0).getTextContent();\n // create device\n Device device = new Device(devId, actNames, Integer.parseInt(address), type, image);\n\n NodeList capList = devElement.getElementsByTagName(\"Capabilities\").item(0).getChildNodes();\n\n for (int j = 0; j < capList.getLength(); j++) {\n String capId = capList.item(j).getTextContent();\n Capability cap = readFromCapabilityFile(capId);\n cap.setDevice(device);\n device.addCapability(cap);\n }\n return device;\n }", "private void buildCommonInformation(final Device device,\n final XMLStreamReader reader)\n throws XMLStreamException, ParsingException {\n String tagName;\n int numberOfCommonTags = 0;\n while (reader.hasNext()) {\n int parameter = reader.next();\n switch (parameter) {\n case XMLStreamReader.START_ELEMENT:\n tagName = reader.getLocalName();\n switch (Parameter.valueOf(tagName.toUpperCase())) {\n case NAME:\n device.setName(getXMLText(reader));\n break;\n case ORIGIN:\n device.setOrigin(getXMLText(reader));\n break;\n case PRICE:\n device.setPrice(Double.parseDouble(getXMLText(\n reader)));\n break;\n case DATEOFDELIVERY:\n String date = getXMLText(reader);\n StringTokenizer tokenizer\n = new StringTokenizer(date, \"-\");\n device.setDateOfDelivery(new\n GregorianCalendar(Integer\n .parseInt(tokenizer.nextToken()),\n Integer.parseInt(tokenizer.nextToken()),\n Integer.parseInt(tokenizer.nextToken())));\n break;\n case TYPE:\n device.getType().setCooler(Boolean\n .parseBoolean(reader.getAttributeValue(\n null,\n Parameter.COOLER.getValue())));\n device.getType().setPort(Port.valueOf(reader\n .getAttributeValue(null,\n Parameter.PORTS.getValue())));\n device.getType().setCritical(Boolean.parseBoolean(\n reader.getAttributeValue(null,\n Parameter.CRITICAL.getValue())));\n buildTypeInformation(device, reader);\n break;\n default:\n break;\n }\n break;\n case XMLStreamReader.END_ELEMENT:\n if (numberOfCommonTags == TAGS_NUMBER_FOR_TYPE) {\n return;\n }\n numberOfCommonTags++;\n break;\n default:\n break;\n }\n }\n }", "public static android.service.notification.ZenModeConfig readXml(org.xmlpull.v1.XmlPullParser r17) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {\n /*\n r12 = r17.getEventType();\n r14 = 2;\n if (r12 == r14) goto L_0x0009;\n L_0x0007:\n r8 = 0;\n L_0x0008:\n return r8;\n L_0x0009:\n r11 = r17.getName();\n r14 = \"zen\";\n r14 = r14.equals(r11);\n if (r14 != 0) goto L_0x0018;\n L_0x0016:\n r8 = 0;\n goto L_0x0008;\n L_0x0018:\n r8 = new android.service.notification.ZenModeConfig;\n r8.<init>();\n r14 = \"version\";\n r15 = 1;\n r0 = r17;\n r13 = safeInt(r0, r14, r15);\n r2 = new java.util.ArrayList;\n r2.<init>();\n r4 = new java.util.ArrayList;\n r4.<init>();\n L_0x0031:\n r12 = r17.next();\n r14 = 1;\n if (r12 == r14) goto L_0x0184;\n L_0x0038:\n r11 = r17.getName();\n r14 = 3;\n if (r12 != r14) goto L_0x006b;\n L_0x003f:\n r14 = \"zen\";\n r14 = r14.equals(r11);\n if (r14 == 0) goto L_0x006b;\n L_0x0048:\n r14 = r2.isEmpty();\n if (r14 != 0) goto L_0x0008;\n L_0x004e:\n r14 = r2.size();\n r14 = new android.content.ComponentName[r14];\n r14 = r2.toArray(r14);\n r14 = (android.content.ComponentName[]) r14;\n r8.conditionComponents = r14;\n r14 = r4.size();\n r14 = new android.net.Uri[r14];\n r14 = r4.toArray(r14);\n r14 = (android.net.Uri[]) r14;\n r8.conditionIds = r14;\n goto L_0x0008;\n L_0x006b:\n r14 = 2;\n if (r12 != r14) goto L_0x0031;\n L_0x006e:\n r14 = \"allow\";\n r14 = r14.equals(r11);\n if (r14 == 0) goto L_0x00c9;\n L_0x0076:\n r14 = \"calls\";\n r15 = 0;\n r0 = r17;\n r14 = safeBoolean(r0, r14, r15);\n r8.allowCalls = r14;\n r14 = \"messages\";\n r15 = 0;\n r0 = r17;\n r14 = safeBoolean(r0, r14, r15);\n r8.allowMessages = r14;\n r14 = \"events\";\n r15 = 1;\n r0 = r17;\n r14 = safeBoolean(r0, r14, r15);\n r8.allowEvents = r14;\n r14 = \"from\";\n r15 = 0;\n r0 = r17;\n r14 = safeInt(r0, r14, r15);\n r8.allowFrom = r14;\n r14 = r8.allowFrom;\n if (r14 < 0) goto L_0x00ac;\n L_0x00a7:\n r14 = r8.allowFrom;\n r15 = 2;\n if (r14 <= r15) goto L_0x0031;\n L_0x00ac:\n r14 = new java.lang.IndexOutOfBoundsException;\n r15 = new java.lang.StringBuilder;\n r15.<init>();\n r16 = \"bad source in config:\";\n r15 = r15.append(r16);\n r0 = r8.allowFrom;\n r16 = r0;\n r15 = r15.append(r16);\n r15 = r15.toString();\n r14.<init>(r15);\n throw r14;\n L_0x00c9:\n r14 = \"sleep\";\n r14 = r14.equals(r11);\n if (r14 == 0) goto L_0x0142;\n L_0x00d2:\n r14 = 0;\n r15 = \"mode\";\n r0 = r17;\n r7 = r0.getAttributeValue(r14, r15);\n r14 = isValidSleepMode(r7);\n if (r14 == 0) goto L_0x0138;\n L_0x00e2:\n r8.sleepMode = r7;\n r14 = \"none\";\n r15 = 0;\n r0 = r17;\n r14 = safeBoolean(r0, r14, r15);\n r8.sleepNone = r14;\n r14 = \"startHour\";\n r15 = 0;\n r0 = r17;\n r9 = safeInt(r0, r14, r15);\n r14 = \"startMin\";\n r15 = 0;\n r0 = r17;\n r10 = safeInt(r0, r14, r15);\n r14 = \"endHour\";\n r15 = 0;\n r0 = r17;\n r5 = safeInt(r0, r14, r15);\n r14 = \"endMin\";\n r15 = 0;\n r0 = r17;\n r6 = safeInt(r0, r14, r15);\n r14 = isValidHour(r9);\n if (r14 == 0) goto L_0x013a;\n L_0x011c:\n r8.sleepStartHour = r9;\n r14 = isValidMinute(r10);\n if (r14 == 0) goto L_0x013c;\n L_0x0124:\n r8.sleepStartMinute = r10;\n r14 = isValidHour(r5);\n if (r14 == 0) goto L_0x013e;\n L_0x012c:\n r8.sleepEndHour = r5;\n r14 = isValidMinute(r6);\n if (r14 == 0) goto L_0x0140;\n L_0x0134:\n r8.sleepEndMinute = r6;\n goto L_0x0031;\n L_0x0138:\n r7 = 0;\n goto L_0x00e2;\n L_0x013a:\n r9 = 0;\n goto L_0x011c;\n L_0x013c:\n r10 = 0;\n goto L_0x0124;\n L_0x013e:\n r5 = 0;\n goto L_0x012c;\n L_0x0140:\n r6 = 0;\n goto L_0x0134;\n L_0x0142:\n r14 = \"condition\";\n r14 = r14.equals(r11);\n if (r14 == 0) goto L_0x0166;\n L_0x014a:\n r14 = \"component\";\n r0 = r17;\n r1 = safeComponentName(r0, r14);\n r14 = \"id\";\n r0 = r17;\n r3 = safeUri(r0, r14);\n if (r1 == 0) goto L_0x0031;\n L_0x015c:\n if (r3 == 0) goto L_0x0031;\n L_0x015e:\n r2.add(r1);\n r4.add(r3);\n goto L_0x0031;\n L_0x0166:\n r14 = \"exitCondition\";\n r14 = r14.equals(r11);\n if (r14 == 0) goto L_0x0031;\n L_0x016e:\n r14 = readConditionXml(r17);\n r8.exitCondition = r14;\n r14 = r8.exitCondition;\n if (r14 == 0) goto L_0x0031;\n L_0x0178:\n r14 = \"component\";\n r0 = r17;\n r14 = safeComponentName(r0, r14);\n r8.exitConditionComponent = r14;\n goto L_0x0031;\n L_0x0184:\n r14 = new java.lang.IllegalStateException;\n r15 = \"Failed to reach END_DOCUMENT\";\n r14.<init>(r15);\n throw r14;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.service.notification.ZenModeConfig.readXml(org.xmlpull.v1.XmlPullParser):android.service.notification.ZenModeConfig\");\n }", "private void readEntry(XmlPullParser parser) throws XmlPullParserException, IOException {\n\n while (parser.next() != XmlPullParser.END_TAG) {\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n continue;\n }\n String name = parser.getName();\n\n switch (name) {\n case \"profile\":\n readProfile(parser);\n break;\n case \"examresult\":\n readExamResult(parser);\n break;\n case \"feesrecord\":\n readFee(parser);\n break;\n case \"attendancerecord\":\n readAttendance(parser);\n break;\n case \"noticesrecord\":\n readNoticeRecord(parser);\n break;\n case \"teachersrecord\":\n readTeacherRecord(parser);\n break;\n default:\n skip(parser);\n break;\n }\n\n }\n complete_flag = true;\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localTokenTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"token\"));\n \n elementList.add(localToken==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localToken));\n } if (localObjectNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"objectName\"));\n \n elementList.add(localObjectName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localObjectName));\n } if (localOldProperty_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldProperty_description\"));\n \n elementList.add(localOldProperty_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldProperty_description));\n } if (localOldValues_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldValues_description\"));\n \n elementList.add(localOldValues_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldValues_description));\n } if (localNewProperty_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newProperty_description\"));\n \n elementList.add(localNewProperty_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewProperty_description));\n } if (localNewValues_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newValues_description\"));\n \n elementList.add(localNewValues_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewValues_description));\n } if (localOldProperty_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldProperty_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldProperty_descriptionType));\n } if (localOldValues_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldValues_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldValues_descriptionType));\n } if (localNewProperty_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newProperty_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewProperty_descriptionType));\n } if (localNewValues_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newValues_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewValues_descriptionType));\n } if (localOldCardinalityTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldCardinalityType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldCardinalityType));\n } if (localOldCardinalityNumTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldCardinalityNum\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldCardinalityNum));\n } if (localNewCardinalityTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newCardinalityType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewCardinalityType));\n } if (localNewCardinalityNumTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newCardinalityNum\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewCardinalityNum));\n } if (localDescriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDescriptionType));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "private Map<String,ProductInfo> parseProductInfo(Document doc) {\n\t\tMap<String,ProductInfo> pInfoMap = new LinkedHashMap<String, ProductInfo>();\n\n\t\tElement docEle = doc.getDocumentElement();\n\n\t\t// Print root element of the document\n\t\tSystem.out.println(\"Root element of the document: \"\n\t\t\t\t+ docEle.getNodeName());\n\n\t\tNodeList halalInfoList = docEle.getElementsByTagName(\"halalInfo\");\n\n\t\t// Print total student elements in document\n\t\tSystem.out.println(\"Total halal infos: \" + halalInfoList.getLength());\n\n\t\tif (halalInfoList != null && halalInfoList.getLength() > 0) {\n\t\t\tfor (int i = 0; i < halalInfoList.getLength(); i++) {\n\n\t\t\t\tNode node = halalInfoList.item(i);\n\n\t\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tProductInfo pInfo = new ProductInfo();\n\t\t\t\t\tSystem.out.println(\"=====================\");\n\n\t\t\t\t\tElement e = (Element) node;\n\t\t\t\t\tNodeList nodeList = e.getElementsByTagName(\"halalId\");\n\t\t\t\t\tpInfo.setHalalId(nodeList.item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tSystem.out.println(\"halalId: \" + pInfo.getHalalId() );\n\n\t\t\t\t\tnodeList = e.getElementsByTagName(\"product\");\n\t\t\t\t\tpInfo.setProduct(nodeList.item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tSystem.out.println(\"product: \" + pInfo.getProduct() );\n\n\t\t\t\t\tnodeList = e.getElementsByTagName(\"validFrom\");\n\t\t\t\t\tpInfo.setHalalBeginDate(nodeList.item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tSystem.out.println(\"valid from: \" + pInfo.getHalalBeginDate() );\n\n\t\t\t\t\tnodeList = e.getElementsByTagName(\"validTo\");\n\t\t\t\t\tpInfo.setHalalExpDate(nodeList.item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tSystem.out.println(\"valid to: \" + pInfo.getHalalExpDate() );\n\n\t\t\t\t\tnodeList = e.getElementsByTagName(\"otherInfo\");\n\t\t\t\t\tpInfo.setOtherInfo(nodeList.item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tSystem.out.println(\"other info: \" + pInfo.getOtherInfo() );\n\t\t\t\t\t\n\t\t\t\t\tpInfoMap.put(pInfo.getHalalId(), pInfo);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn pInfoMap;\n\t}", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry/xsd\",\r\n \"id\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localId));\r\n } if (localIpTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry/xsd\",\r\n \"ip\"));\r\n \r\n elementList.add(localIp==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localIp));\r\n } if (localNameTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry/xsd\",\r\n \"name\"));\r\n \r\n elementList.add(localName==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));\r\n } if (localPortTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry/xsd\",\r\n \"port\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPort));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public Sensor parseSensor() {\n Element e = document.getDocumentElement();\n // found Sensor Element in XML\n if (e != null && e.getNodeName().equals(\"sensor\")) {\n // creates new Sensor with id as the name\n Sensor sensor = new Sensor(e.getAttribute(\"id\"));\n\n for (int i = 0; i < e.getChildNodes().getLength(); i++) {\n Node childNode = e.getChildNodes().item(i);\n if (childNode instanceof Element) {\n Element childElement = (Element) childNode;\n switch (childNode.getNodeName()) {\n case \"measurement\" :\n Measurement m = parseMeasurement(childElement);\n sensor.addMeasurement(m);\n break;\n case \"information\" :\n // maybe a new Type for extra Information from the\n // Sensor\n break;\n\n default :\n System.out.println(\n \"No case for \" + childNode.getNodeName());\n }\n }\n }\n\n return sensor;\n } else {\n return null;\n }\n }", "private void parsePrivate(String xmlString) throws XmlPullParserException,\n IOException\n {\n if (xmlString == null || xmlString.length() == 0)\n return;\n\n XmlPullParserFactory factory = XmlPullParserFactory.newInstance();\n // factory.setNamespaceAware(true);\n XmlPullParser xpp = factory.newPullParser();\n\n xpp.setInput(new StringReader(xmlString));\n int eventType = xpp.getEventType();\n while (eventType != XmlPullParser.END_DOCUMENT)\n {\n if (eventType == XmlPullParser.START_DOCUMENT)\n {\n Log.v(TAG, \"Start document\");\n }\n else if (eventType == XmlPullParser.START_TAG)\n {\n String name = xpp.getName();\n //Log.v(TAG, \"Start tag: \" + name);\n if (name.equalsIgnoreCase(TEMPERATURE))\n {\n String attrValue = readAttributeValue(xpp, \"type\",\n INVALID);\n if (attrValue.equalsIgnoreCase(MAXIMUM))\n readMaxTemperatureValues(xpp);\n else if (attrValue.equalsIgnoreCase(MINIMUM))\n readMinTemperatureValues(xpp);\n }\n else if (name.equalsIgnoreCase(WEATHER))\n {\n readWeatherConditions(xpp);\n }\n else if (name.equalsIgnoreCase(CONDITIONS_ICON))\n {\n readIconLinks(xpp);\n }\n }\n eventType = xpp.next();\n }\n }", "private int parseXML(String xml) {\n int total = 0;\n try {\n int i = 0;\n String tagName = \"\";\n boolean onreh = false;\n boolean onEnd = false;\n boolean isItemTag1 = false;\n\n // Initialize XmlPullParser\n XmlPullParserFactory factory = XmlPullParserFactory.newInstance();\n XmlPullParser parser = factory.newPullParser();\n parser.setInput(new StringReader(xml));\n\n int eventType = parser.getEventType();\n while (eventType != XmlPullParser.END_DOCUMENT) {\n if (eventType == XmlPullParser.START_TAG) {\n tagName = parser.getName();\n if (tagName.equals(\"data\")) {\n shortWeathers.add(new ShortWeather());\n onEnd = false;\n isItemTag1 = true;\n }\n } else if (eventType == XmlPullParser.TEXT && isItemTag1) {\n if (tagName.equals(\"reh\") && !onreh) {\n shortWeathers.get(i).setReh(parser.getText());\n total += Integer.parseInt(parser.getText());\n onreh = true;\n }\n } else if (eventType == XmlPullParser.END_TAG) {\n if (tagName.equals(\"s06\") && onEnd == false) {\n i++;\n isItemTag1 = false;\n onreh = false;\n onEnd = true;\n }\n }\n eventType = parser.next();\n }\n } catch (Exception e) {\n e.getStackTrace();\n }\n return total / shortWeathers.size();\n }", "public void mo1779d(XmlPullParser xmlPullParser) {\n }", "public void mo1778c(XmlPullParser xmlPullParser) {\n }", "public abstract T readFromXml(XmlPullParser parser, int version, Context context)\n throws IOException, XmlPullParserException;", "private void buildTypeInformation(final Device device,\n final XMLStreamReader reader)\n throws XMLStreamException, ParsingException {\n String name;\n int numberOfElementsInTypeTag = 0;\n while (reader.hasNext()) {\n int type = reader.next();\n switch (type) {\n case XMLStreamReader.START_ELEMENT:\n name = reader.getLocalName();\n switch (Parameter.valueOf(name.toUpperCase())) {\n case POWERUSAGE:\n device.getType().setPowerUsage(Double\n .parseDouble(getXMLText(reader)));\n break;\n case GROUPOFCOMPLECTS:\n device.getType().setGroupOfComplects(getXMLText(\n reader));\n break;\n default:\n throw new ParsingException(\"Using of illegal tag!\");\n }\n break;\n case XMLStreamReader.END_ELEMENT:\n if (numberOfElementsInTypeTag == 1) {\n return;\n }\n numberOfElementsInTypeTag++;\n break;\n default:\n break;\n }\n }\n }", "DeviceInfo getDeviceInfo(DeviceIdentifier deviceIdentifier) throws DeviceDetailsMgtException;", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localFteReasonCodeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"FteReasonCode\"));\n \n elementList.add(localFteReasonCode==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFteReasonCode));\n } if (localPrimaryPrintIndicatorTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"PrimaryPrintIndicator\"));\n \n elementList.add(localPrimaryPrintIndicator==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPrimaryPrintIndicator));\n } if (localSecondaryPrintIndicatorTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"SecondaryPrintIndicator\"));\n \n elementList.add(localSecondaryPrintIndicator==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSecondaryPrintIndicator));\n } if (localFingerprintTemplateTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"FingerprintTemplate\"));\n \n elementList.add(localFingerprintTemplate);\n } if (localNfiqScoresTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"NfiqScores\"));\n \n \n elementList.add(localNfiqScores==null?null:\n localNfiqScores);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public void parse(InfoflowAndroidConfiguration config) {\n\t\t// Parse the data\n\t\tSAXParserFactory pf = SAXParserFactory.newInstance();\n\t\ttry {\n\t\t\tSAXParser parser = pf.newSAXParser();\n\t\t\tparser.parse(xmlStream, new SAXHandler(config));\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private List<String> getExtendedDeviceInfo(IBuildInfo buildInfo) {\n List<String> extendedDeviceInfo = new ArrayList<>();\n File deviceInfoPath = buildInfo.getFile(DeviceInfoCollector.DEVICE_INFO_DIR);\n if (deviceInfoPath == null || !deviceInfoPath.exists()) {\n CLog.w(\"Device Info directory was not created (Make sure you are not running plan \" +\n \"\\\"*ts-dev\\\" or including option -d/--skip-device-info)\");\n return extendedDeviceInfo;\n }\n List<String> requiredDeviceInfo = null;\n try {\n requiredDeviceInfo = DynamicConfigFileReader.getValuesFromConfig(\n buildInfo, getSuiteName(), DYNAMIC_CONFIG_EXTENDED_DEVICE_INFO_KEY);\n } catch (XmlPullParserException | IOException e) {\n CLog.e(\"Failed to pull business logic Extended DeviceInfo from dynamic config. \"\n + \"Error: %s\", e);\n return extendedDeviceInfo;\n }\n File ediFile = null;\n String[] fileAndKey = null;\n try{\n for (String ediEntry: requiredDeviceInfo) {\n fileAndKey = ediEntry.split(\":\");\n if (fileAndKey.length <= 1) {\n CLog.e(\"Dynamic config Extended DeviceInfo key has problem.\");\n return new ArrayList<>();\n }\n ediFile = FileUtil\n .findFile(deviceInfoPath, fileAndKey[0] + \".deviceinfo.json\");\n if (ediFile == null) {\n CLog.e(\n \"Could not find Extended DeviceInfo JSON file: %s.\",\n deviceInfoPath + fileAndKey[0] + \".deviceinfo.json\");\n return new ArrayList<>();\n }\n String jsonString = FileUtil.readStringFromFile(ediFile);\n JSONObject jsonObj = new JSONObject(jsonString);\n String value = jsonObj.getString(fileAndKey[1]);\n extendedDeviceInfo\n .add(String.format(\"%s:%s:%s\", fileAndKey[0], fileAndKey[1], value));\n }\n }catch(JSONException | IOException | RuntimeException e){\n CLog.e(\n \"Failed to read or parse Extended DeviceInfo JSON file: %s. Error: %s\",\n deviceInfoPath + fileAndKey[0] + \".deviceinfo.json\", e);\n return new ArrayList<>();\n }\n return extendedDeviceInfo;\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localNameTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"name\"));\r\n \r\n elementList.add(localName==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));\r\n } if (localIpTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"ip\"));\r\n \r\n elementList.add(localIp==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localIp));\r\n } if (localPortTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"port\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPort));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"PatientID\"));\n \n if (localPatientID != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPatientID));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"PatientID cannot be null!!\");\n }\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"RadiologyOrderID\"));\n \n if (localRadiologyOrderID != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRadiologyOrderID));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"RadiologyOrderID cannot be null!!\");\n }\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"DateOfExamination\"));\n \n if (localDateOfExamination != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDateOfExamination));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"DateOfExamination cannot be null!!\");\n }\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"ReportText\"));\n \n if (localReportText != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localReportText));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"ReportText cannot be null!!\");\n }\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public void mo1776b(XmlPullParser xmlPullParser) {\n }", "public ParseXML() throws XmlPullParserException, IOException\n {\n\t input =\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><Balls version=1.0><ball><name>900 Global Hook! Black </name><brand>900 Global</brand><release_date>05/15/2012</release_date><radius_of_gyration>2.551</radius_of_gyration><differential>0.046</differential><mass_biass_diff>n/a</mass_biass_diff><lane_condition>Medium</lane_condition><finish>Polished</finish><coverstock>Reactive Resin</coverstock><coverstock_name>S43 Pearl Reactive</coverstock_name><factory_finish>n/a</factory_finish><core_type>Symmetric</core_type><core_name>n/a</core_name></ball><ball><name>900 Global Hook! Hybrid</name><brand>900 Global</brand><release_date>05/15/2012</release_date><radius_of_gyration>2.551</radius_of_gyration><differential>0.046</differential><mass_biass_diff>n/a</mass_biass_diff><lane_condition>Medium</lane_condition><finish>Polished</finish><coverstock>Hybrid Reactive</coverstock><coverstock_name>S43 Hybrid Reactive</coverstock_name><factory_finish>n/a</factory_finish><core_type>Symmetric</core_type><core_name>Symmetric (10# has a pancake core)</core_name></ball>\"; \n\t parse();\n }", "public Device readFromDeviceFile(String fileName, String address) {\n\n Element eElement = null;\n File file = new File(SifebUtil.DEV_FILE_DIR + fileName + \".xml\");\n try {\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(file);\n doc.getDocumentElement().normalize();\n System.out.println(\"Root element :\" + doc.getDocumentElement().getNodeName());\n NodeList nList = doc.getElementsByTagName(\"Device\");\n Node nNode = nList.item(0);\n eElement = (Element) nNode;\n } catch (ParserConfigurationException | SAXException | IOException e) {\n e.printStackTrace();\n }\n\n return getDevFromElement(eElement, address);\n }", "private void readFeed(XmlPullParser parser) throws XmlPullParserException, IOException {\n\n String name;\n\n while (parser.next() != XmlPullParser.END_TAG) {\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n\n if (complete_flag) {\n break;\n }\n continue;\n }\n name = parser.getName();\n // Starts by looking for the entry tag\n if (name.equals(\"student\")) {\n readEntry(parser);\n } else {\n skip(parser);\n }\n }\n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"codigo\"));\n \n elementList.add(localCodigo==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCodigo));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"bloqueado\"));\n \n elementList.add(localBloqueado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localBloqueado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"estado\"));\n \n \n elementList.add(localEstado==null?null:\n localEstado);\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"fechaFacturado\"));\n \n elementList.add(localFechaFacturado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFechaFacturado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"fechaSolicitud\"));\n \n elementList.add(localFechaSolicitud==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFechaSolicitud));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"flete\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFlete));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"motivoRechazo\"));\n \n \n elementList.add(localMotivoRechazo==null?null:\n localMotivoRechazo);\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"observacion\"));\n \n elementList.add(localObservacion==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localObservacion));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"origen\"));\n \n elementList.add(localOrigen==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOrigen));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoDescuento\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoDescuento));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoEstimado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoEstimado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoSolicitado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoSolicitado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoFacturado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoFacturado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoFacturadoSinDescuento\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoFacturadoSinDescuento));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"percepcion\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPercepcion));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"cantidadCUVErrado\"));\n \n elementList.add(localCantidadCUVErrado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCantidadCUVErrado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"cantidadFaltanteAnunciado\"));\n \n elementList.add(localCantidadFaltanteAnunciado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCantidadFaltanteAnunciado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoPedidoRechazado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoPedidoRechazado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoCatalogoEstimado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoCatalogoEstimado));\n \n if (localPedidoDetalle!=null) {\n for (int i = 0;i < localPedidoDetalle.length;i++){\n\n if (localPedidoDetalle[i] != null){\n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"pedidoDetalle\"));\n elementList.add(localPedidoDetalle[i]);\n } else {\n \n throw new org.apache.axis2.databinding.ADBException(\"pedidoDetalle cannot be null !!\");\n \n }\n\n }\n } else {\n \n throw new org.apache.axis2.databinding.ADBException(\"pedidoDetalle cannot be null!!\");\n \n }\n\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public static FingerprintInformation parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n FingerprintInformation object =\n new FingerprintInformation();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"FingerprintInformation\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (FingerprintInformation)gov.gsa.hspd12.federated.enrollment.ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\"FteReasonCode\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setFteReasonCode(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\"PrimaryPrintIndicator\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setPrimaryPrintIndicator(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\"SecondaryPrintIndicator\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setSecondaryPrintIndicator(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\"FingerprintTemplate\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setFingerprintTemplate(null);\n reader.next();\n } else {\n \n object.setFingerprintTemplate(org.apache.axiom.util.stax.XMLStreamReaderUtils.getDataHandlerFromElement(reader));\n \n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\"NfiqScores\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setNfiqScores(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setNfiqScores(gov.gsa.hspd12.federated.enrollment.ArrayOfFingerprintScore.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public ArrayList getDeviceInfo();", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localMsisdnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"msisdn\"));\n \n elementList.add(localMsisdn==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMsisdn));\n } if (localBundleIDTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"bundleID\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localBundleID));\n } if (localSpidTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"spid\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSpid));\n } if (localBucketIDTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"bucketID\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localBucketID));\n } if (localBalancesTracker){\n if (localBalances!=null) {\n for (int i = 0;i < localBalances.length;i++){\n\n if (localBalances[i] != null){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"balances\"));\n elementList.add(localBalances[i]);\n } else {\n \n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"balances\"));\n elementList.add(null);\n \n }\n\n }\n } else {\n \n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"balances\"));\n elementList.add(localBalances);\n \n }\n\n } if (localUnitTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"unitType\"));\n \n \n elementList.add(localUnitType==null?null:\n localUnitType);\n } if (localExpiryTimeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"expiryTime\"));\n \n elementList.add(localExpiryTime==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localExpiryTime));\n } if (localActivationTimeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"activationTime\"));\n \n elementList.add(localActivationTime==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localActivationTime));\n } if (localProvisionTimeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"provisionTime\"));\n \n elementList.add(localProvisionTime==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localProvisionTime));\n } if (localStatusTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"status\"));\n \n \n elementList.add(localStatus==null?null:\n localStatus);\n } if (localBundleNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://soap.crmapi.util.redknee.com/subscriptions/xsd/2010/06\",\n \"bundleName\"));\n \n elementList.add(localBundleName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localBundleName));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localGBInterval_fromTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_from\"));\n \n if (localGBInterval_from != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGBInterval_from));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_from cannot be null!!\");\n }\n } if (localGBInterval_toTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_to\"));\n \n if (localGBInterval_to != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGBInterval_to));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_to cannot be null!!\");\n }\n } if (localGBInterval_pointTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_point\"));\n \n if (localGBInterval_point != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGBInterval_point));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_point cannot be null!!\");\n }\n } if (localGBInterval_iscompTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_iscomp\"));\n \n \n if (localGBInterval_iscomp==null){\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_iscomp cannot be null!!\");\n }\n elementList.add(localGBInterval_iscomp);\n } if (localGBInterval_interbpTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_interbp\"));\n \n \n if (localGBInterval_interbp==null){\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_interbp cannot be null!!\");\n }\n elementList.add(localGBInterval_interbp);\n }\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_accession\"));\n \n if (localGBInterval_accession != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGBInterval_accession));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_accession cannot be null!!\");\n }\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localAxisOperationTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"axisOperation\"));\n \n \n elementList.add(localAxisOperation==null?null:\n localAxisOperation);\n } if (localCompleteTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"complete\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localComplete));\n } if (localConfigurationContextTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"configurationContext\"));\n \n \n elementList.add(localConfigurationContext==null?null:\n localConfigurationContext);\n } if (localKeyTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"key\"));\n \n elementList.add(localKey==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localKey));\n } if (localLogCorrelationIDStringTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"logCorrelationIDString\"));\n \n elementList.add(localLogCorrelationIDString==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localLogCorrelationIDString));\n } if (localMessageContextsTracker){\n if (localMessageContexts!=null){\n for (int i = 0;i < localMessageContexts.length;i++){\n \n if (localMessageContexts[i] != null){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"messageContexts\"));\n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMessageContexts[i]));\n } else {\n \n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"messageContexts\"));\n elementList.add(null);\n \n }\n \n\n }\n } else {\n \n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"messageContexts\"));\n elementList.add(null);\n \n }\n\n } if (localOperationNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"operationName\"));\n \n elementList.add(localOperationName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOperationName));\n } if (localRootContextTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"rootContext\"));\n \n \n elementList.add(localRootContext==null?null:\n localRootContext);\n } if (localServiceContextTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"serviceContext\"));\n \n \n elementList.add(localServiceContext==null?null:\n localServiceContext);\n } if (localServiceGroupNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"serviceGroupName\"));\n \n elementList.add(localServiceGroupName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localServiceGroupName));\n } if (localServiceNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"serviceName\"));\n \n elementList.add(localServiceName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localServiceName));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public DeviceInfo() {}", "private VmDevice readVmDevice(XmlNode node, Guid deviceId) {\n VmDevice vmDevice = new VmDevice();\n vmDevice.setId(new VmDeviceId(deviceId, vmBase.getId()));\n if (node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS).innerText)) {\n vmDevice.setAddress(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS).innerText));\n } else {\n vmDevice.setAddress(\"\");\n }\n if (node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS).innerText)) {\n vmDevice.setAlias(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS).innerText));\n } else {\n vmDevice.setAlias(\"\");\n }\n XmlNode specParamsNode = node.SelectSingleNode(OvfProperties.VMD_SPEC_PARAMS, _xmlNS);\n if (specParamsNode != null\n && !StringUtils.isEmpty(specParamsNode.innerText)) {\n vmDevice.setSpecParams(getMapNode(specParamsNode));\n } else {\n // Empty map\n vmDevice.setSpecParams(Collections.<String, Object>emptyMap());\n }\n if (node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS).innerText)) {\n vmDevice.setType(VmDeviceGeneralType.forValue(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS).innerText)));\n } else {\n int resourceType = getResourceType(node, OvfProperties.VMD_RESOURCE_TYPE);\n vmDevice.setType(VmDeviceGeneralType.forValue(VmDeviceType.getoVirtDevice(resourceType)));\n }\n if (node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS).innerText)) {\n vmDevice.setDevice(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS).innerText));\n } else {\n setDeviceByResource(node, vmDevice);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS).innerText)) {\n vmDevice.setBootOrder(Integer.valueOf(node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS).innerText));\n } else {\n vmDevice.setBootOrder(0);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS).innerText)) {\n vmDevice.setIsPlugged(Boolean.valueOf(node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS).innerText));\n } else {\n vmDevice.setIsPlugged(Boolean.TRUE);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS).innerText)) {\n vmDevice.setIsReadOnly(Boolean.valueOf(node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS).innerText));\n } else {\n vmDevice.setIsReadOnly(Boolean.FALSE);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS) != null\n && StringUtils.isNotEmpty(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)) {\n vmDevice.setCustomProperties(DevicePropertiesUtils.getInstance().convertProperties(\n String.valueOf(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)));\n } else {\n vmDevice.setCustomProperties(null);\n }\n\n if (node.SelectSingleNode(OvfProperties.VMD_SNAPSHOT_PROP, _xmlNS) != null\n && StringUtils.isNotEmpty(node.SelectSingleNode(OvfProperties.VMD_SNAPSHOT_PROP, _xmlNS).innerText)) {\n vmDevice.setSnapshotId(new Guid(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)));\n }\n\n return vmDevice;\n }", "public Profile getProfile(String xmlString){\n\tProfile profile = null;\n profile = new Profile();\n String text = \"\";\n XmlPullParserFactory factory = null;\n XmlPullParser parser = null;\n try {\n factory = XmlPullParserFactory.newInstance();\n factory.setNamespaceAware(true);\n parser = factory.newPullParser();\n\n parser.setInput(new StringReader(xmlString.replaceAll(\"&\", \"&amp;\")));\n\n int eventType = parser.getEventType();\n while (eventType != XmlPullParser.END_DOCUMENT) {\n String tagname = parser.getName();\n switch (eventType) {\n case XmlPullParser.START_TAG:\n break;\n\n case XmlPullParser.TEXT:\n //Convert html encoding\n String rawText = parser.getText();\n Spanned escapedText = Html.fromHtml(rawText);\n text = escapedText.toString();\n break;\n\n case XmlPullParser.END_TAG:\n if (tagname.equalsIgnoreCase(\"id\")) {\n profile.setName(text);\n } else if (tagname.equalsIgnoreCase(\"level\")) {\n profile.setLevel(Integer.parseInt(text));\n } else if (tagname.equalsIgnoreCase(\"aboutme\")) {\n profile.setAboutMe(text);\n } else if (tagname.equalsIgnoreCase(\"avatar\")) {\n profile.setAvatar(text);\n } else if (tagname.equalsIgnoreCase(\"progress\")) {\n profile.setProgress(Integer.parseInt(text));\n } else if (tagname.equalsIgnoreCase(\"Platinum\")) {\n profile.setPlatium(Integer.parseInt(text));\n } else if (tagname.equalsIgnoreCase(\"Gold\")) {\n profile.setGold(Integer.parseInt(text));\n } else if (tagname.equalsIgnoreCase(\"Silver\")) {\n profile.setSilver(Integer.parseInt(text));\n } else if (tagname.equalsIgnoreCase(\"Bronze\")) {\n profile.setBronze(Integer.parseInt(text));\n } else if (tagname.equalsIgnoreCase(\"Plus\")) {\n if(text.equalsIgnoreCase(\"1\")){\n profile.setPlus(true);\n }\n else{\n profile.setPlus(false);\n }\n } else if (tagname.equalsIgnoreCase(\"R\")) {\n profile.setBackgroundRed(Integer.parseInt(text.replaceFirst(\"#\", \"\"), 16)); // To convert hexadecimal to integer and remove #\n } else if (tagname.equalsIgnoreCase(\"G\")) {\n profile.setBackgroundGreen(Integer.parseInt(text.replaceFirst(\"#\", \"\"), 16));\n } else if (tagname.equalsIgnoreCase(\"B\")) {\n profile.setBackgroundBlue(Integer.parseInt(text.replaceFirst(\"#\", \"\"), 16));\n }\n break;\n\n default:\n break;\n }\n eventType = parser.next();\n }\n\n } catch (XmlPullParserException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\t\n\treturn profile;\n}", "private void readProfile(XmlPullParser parser) throws IOException, XmlPullParserException {\n String students_info, photo_link, school_name, result_type;\n parser.require(XmlPullParser.START_TAG, ns, \"profile\");\n parser.next();\n\n students_info = readText(parser);\n parser.next();\n\n\n school_name = readText(parser);\n parser.next();\n\n photo_link = readText(parser);\n\n\n byte[] byte_array;\n ConvertToByteArray cvb = new ConvertToByteArray();\n if (!photo_link.equals(\"\")) {\n try {\n byte_array = cvb.getLogoImage(photo_link);\n DataStoreInDBProfile dsp = new DataStoreInDBProfile(mContext);\n dsp.storeStudenInfo(students_info, school_name, byte_array, true, false);\n\n } catch (Exception e) {\n\n }\n } else {\n photo_link = \"https://dabble.co/assets/fallback/default_user_photo-5cf83e232ebc4a1bab67fb6bf24fa1d1da9b603af2a2bc8e98c6d4c2d015d107.png\";\n try {\n byte_array = cvb.getLogoImage(photo_link);\n DataStoreInDBProfile dsp = new DataStoreInDBProfile(mContext);\n dsp.storeStudenInfo(students_info, school_name, byte_array, true, false);\n } catch (Exception e) {\n\n }\n }\n parser.next();\n\n\n\n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"PatientID\"));\n \n if (localPatientID != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPatientID));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"PatientID cannot be null!!\");\n }\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"CaseID\"));\n \n if (localCaseID != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCaseID));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"CaseID cannot be null!!\");\n }\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"ExaminationType\"));\n \n \n if (localExaminationType==null){\n throw new org.apache.axis2.databinding.ADBException(\"ExaminationType cannot be null!!\");\n }\n elementList.add(localExaminationType);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "IElementDef parse(ConfigSource configSource);", "public boolean DecodeGetSystemInfoResponse(byte[] GetSystemInfoResponse) {\r\n DataDevice ma = (DataDevice) getApplication();\r\n //if the tag has returned a good response\r\n if (GetSystemInfoResponse[0] == (byte) 0x00 && GetSystemInfoResponse.length >= 12) {\r\n //DataDevice ma = (DataDevice)getApplication();\r\n String uidToString = \"\";\r\n byte[] uid = new byte[8];\r\n // change uid format from byteArray to a String\r\n for (int i = 1; i <= 8; i++) {\r\n uid[i - 1] = GetSystemInfoResponse[10 - i];\r\n uidToString += Helper.ConvertHexByteToString(uid[i - 1]);\r\n }\r\n\r\n //***** TECHNO ******\r\n ma.setUid(uidToString);\r\n if (uid[0] == (byte) 0xE0)\r\n ma.setTechno(\"ISO 15693\");\r\n else if (uid[0] == (byte) 0xD0)\r\n ma.setTechno(\"ISO 14443\");\r\n else\r\n ma.setTechno(\"Unknown techno\");\r\n\r\n //***** MANUFACTURER ****\r\n if (uid[1] == (byte) 0x02)\r\n ma.setManufacturer(\"STMicroelectronics\");\r\n else if (uid[1] == (byte) 0x04)\r\n ma.setManufacturer(\"NXP\");\r\n else if (uid[1] == (byte) 0x07)\r\n ma.setManufacturer(\"Texas Instruments\");\r\n else if (uid[1] == (byte) 0x01) //MOTOROLA (updated 20140228)\r\n ma.setManufacturer(\"Motorola\");\r\n else if (uid[1] == (byte) 0x03) //HITASHI (updated 20140228)\r\n ma.setManufacturer(\"Hitachi\");\r\n else if (uid[1] == (byte) 0x04) //NXP SEMICONDUCTORS\r\n ma.setManufacturer(\"NXP\");\r\n else if (uid[1] == (byte) 0x05) //INFINEON TECHNOLOGIES (updated 20140228)\r\n ma.setManufacturer(\"Infineon\");\r\n else if (uid[1] == (byte) 0x06) //CYLINC (updated 20140228)\r\n ma.setManufacturer(\"Cylinc\");\r\n else if (uid[1] == (byte) 0x07) //TEXAS INSTRUMENTS TAG-IT\r\n ma.setManufacturer(\"Texas Instruments\");\r\n else if (uid[1] == (byte) 0x08) //FUJITSU LIMITED (updated 20140228)\r\n ma.setManufacturer(\"Fujitsu\");\r\n else if (uid[1] == (byte) 0x09) //MATSUSHITA ELECTRIC INDUSTRIAL (updated 20140228)\r\n ma.setManufacturer(\"Matsushita\");\r\n else if (uid[1] == (byte) 0x0A) //NEC (updated 20140228)\r\n ma.setManufacturer(\"NEC\");\r\n else if (uid[1] == (byte) 0x0B) //OKI ELECTRIC (updated 20140228)\r\n ma.setManufacturer(\"Oki\");\r\n else if (uid[1] == (byte) 0x0C) //TOSHIBA (updated 20140228)\r\n ma.setManufacturer(\"Toshiba\");\r\n else if (uid[1] == (byte) 0x0D) //MITSUBISHI ELECTRIC (updated 20140228)\r\n ma.setManufacturer(\"Mitsubishi\");\r\n else if (uid[1] == (byte) 0x0E) //SAMSUNG ELECTRONICS (updated 20140228)\r\n ma.setManufacturer(\"Samsung\");\r\n else if (uid[1] == (byte) 0x0F) //HUYNDAI ELECTRONICS (updated 20140228)\r\n ma.setManufacturer(\"Hyundai\");\r\n else if (uid[1] == (byte) 0x10) //LG SEMICONDUCTORS (updated 20140228)\r\n ma.setManufacturer(\"LG\");\r\n else\r\n ma.setManufacturer(\"Unknown manufacturer\");\r\n\r\n if (uid[1] == (byte) 0x02) {\r\n //**** PRODUCT NAME *****\r\n if (uid[2] >= (byte) 0x04 && uid[2] <= (byte) 0x07) {\r\n ma.setProductName(\"LRI512\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x14 && uid[2] <= (byte) 0x17) {\r\n ma.setProductName(\"LRI64\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x20 && uid[2] <= (byte) 0x23) {\r\n ma.setProductName(\"LRI2K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x28 && uid[2] <= (byte) 0x2B) {\r\n ma.setProductName(\"LRIS2K\");\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x2C && uid[2] <= (byte) 0x2F) {\r\n ma.setProductName(\"M24LR64\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x40 && uid[2] <= (byte) 0x43) {\r\n ma.setProductName(\"LRI1K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x44 && uid[2] <= (byte) 0x47) {\r\n ma.setProductName(\"LRIS64K\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x48 && uid[2] <= (byte) 0x4B) {\r\n ma.setProductName(\"M24LR01E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x4C && uid[2] <= (byte) 0x4F) {\r\n ma.setProductName(\"M24LR16E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x50 && uid[2] <= (byte) 0x53) {\r\n ma.setProductName(\"M24LR02E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n } else if (uid[2] >= (byte) 0x54 && uid[2] <= (byte) 0x57) {\r\n ma.setProductName(\"M24LR32E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x58 && uid[2] <= (byte) 0x5B) {\r\n ma.setProductName(\"M24LR04E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x5C && uid[2] <= (byte) 0x5F) {\r\n ma.setProductName(\"M24LR64E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x60 && uid[2] <= (byte) 0x63) {\r\n ma.setProductName(\"M24LR08E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else if (uid[2] >= (byte) 0x64 && uid[2] <= (byte) 0x67) {\r\n ma.setProductName(\"M24LR128E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0x6C && uid[2] <= (byte) 0x6F) {\r\n ma.setProductName(\"M24LR256E\");\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n if (ma.isBasedOnTwoBytesAddress() == false)\r\n return false;\r\n } else if (uid[2] >= (byte) 0xF8 && uid[2] <= (byte) 0xFB) {\r\n ma.setProductName(\"detected product\");\r\n ma.setBasedOnTwoBytesAddress(true);\r\n ma.setMultipleReadSupported(true);\r\n ma.setMemoryExceed2048bytesSize(true);\r\n } else {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n }\r\n\r\n //*** DSFID ***\r\n ma.setDsfid(Helper.ConvertHexByteToString(GetSystemInfoResponse[10]));\r\n\r\n //*** AFI ***\r\n ma.setAfi(Helper.ConvertHexByteToString(GetSystemInfoResponse[11]));\r\n\r\n //*** MEMORY SIZE ***\r\n if (ma.isBasedOnTwoBytesAddress()) {\r\n String temp = new String();\r\n temp += Helper.ConvertHexByteToString(GetSystemInfoResponse[13]);\r\n temp += Helper.ConvertHexByteToString(GetSystemInfoResponse[12]);\r\n ma.setMemorySize(temp);\r\n } else\r\n ma.setMemorySize(Helper.ConvertHexByteToString(GetSystemInfoResponse[12]));\r\n\r\n //*** BLOCK SIZE ***\r\n if (ma.isBasedOnTwoBytesAddress())\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[14]));\r\n else\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[13]));\r\n\r\n //*** IC REFERENCE ***\r\n if (ma.isBasedOnTwoBytesAddress())\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[15]));\r\n else\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[14]));\r\n } else {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n //ma.setAfi(\"00 \");\r\n ma.setAfi(Helper.ConvertHexByteToString(GetSystemInfoResponse[11])); //changed 22-10-2014\r\n //ma.setDsfid(\"00 \");\r\n ma.setDsfid(Helper.ConvertHexByteToString(GetSystemInfoResponse[10])); //changed 22-10-2014\r\n //ma.setMemorySize(\"FF \");\r\n ma.setMemorySize(Helper.ConvertHexByteToString(GetSystemInfoResponse[12])); //changed 22-10-2014\r\n //ma.setBlockSize(\"03 \");\r\n ma.setBlockSize(Helper.ConvertHexByteToString(GetSystemInfoResponse[13])); //changed 22-10-2014\r\n //ma.setIcReference(\"00 \");\r\n ma.setIcReference(Helper.ConvertHexByteToString(GetSystemInfoResponse[14])); //changed 22-10-2014\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // in case of Inventory OK and Get System Info HS\r\n else if (ma.getTechno() == \"ISO 15693\") {\r\n ma.setProductName(\"Unknown product\");\r\n ma.setBasedOnTwoBytesAddress(false);\r\n ma.setMultipleReadSupported(false);\r\n ma.setMemoryExceed2048bytesSize(false);\r\n ma.setAfi(\"00 \");\r\n ma.setDsfid(\"00 \");\r\n ma.setMemorySize(\"3F \"); //changed 22-10-2014\r\n ma.setBlockSize(\"03 \");\r\n ma.setIcReference(\"00 \");\r\n return true;\r\n }\r\n\r\n //if the tag has returned an error code\r\n else\r\n return false;\r\n\r\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"getDirectSrvInfoReturn\"));\n \n \n elementList.add(localGetDirectSrvInfoReturn==null?null:\n localGetDirectSrvInfoReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public void parseXML(String xmlString) {\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); \n Document document = null; \n try { \n //DOM parser instance \n DocumentBuilder builder = builderFactory.newDocumentBuilder(); \n \n //parse an XML file into a DOM tree, in this case, change the filepath to xml String \n document = builder.parse(new File(filePath));\n \n //get root element, which is <Airports>\n Element rootElement = document.getDocumentElement(); \n \n //traverse child elements. retrieve all the <Airport>\n NodeList nodes = rootElement.getChildNodes(); \n for (int i=0; i < nodes.getLength(); i++) \n { \n Node node = nodes.item(i); \n if (node.getNodeType() == Node.ELEMENT_NODE) { \n Element airport = (Element) node; \n \n //process child element \n String code = airport.getAttribute(\"Code\");\n String name = airport.getAttribute(\"Name\"); \n \n // child node of airport\n NodeList airportChildren = airport.getChildNodes();\n \n // value of longitude & latitude\n String longitude = airportChildren.item(1).getTextContent();\n String latitude = airportChildren.item(2).getTextContent();\n \n Location location = new Location(longitude, latitude);\n airportList.add(new Airport(code, name, location));\n } \n } \n \n // another approach to traverse all the listNode by tagName \n /*NodeList nodeList = rootElement.getElementsByTagName(\"book\"); \n if(nodeList != null) \n { \n for (int i = 0 ; i < nodeList.getLength(); i++) \n { \n Element element = (Element)nodeList.item(i); \n String id = element.getAttribute(\"id\"); \n } \n }*/\n // add the DOM object to the airportList\n } catch (ParserConfigurationException e) { \n e.printStackTrace(); \n } catch (SAXException e) { \n e.printStackTrace(); \n } catch (IOException e) { \n e.printStackTrace(); \n } \n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"getTerminalCardTypeReturn\"));\n \n \n elementList.add(localGetTerminalCardTypeReturn==null?null:\n localGetTerminalCardTypeReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "@Override\n public StreamInitiation parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment)\n throws IOException, XmlPullParserException, SmackParsingException\n {\n boolean done = false;\n\n // si\n String id = parser.getAttributeValue(\"\", \"id\");\n String mimeType = parser.getAttributeValue(\"\", \"mime-type\");\n StreamInitiation initiation = new StreamInitiation();\n\n // file\n String name = null;\n String size = null;\n String hash = null;\n String date = null;\n String desc = null;\n Thumbnail thumbnail = null;\n boolean isRanged = false;\n\n // feature\n DataForm form = null;\n DataFormProvider dataFormProvider = new DataFormProvider();\n\n XmlPullParser.Event eventType;\n String elementName;\n String namespace;\n while (!done) {\n eventType = parser.next();\n elementName = parser.getName();\n namespace = parser.getNamespace();\n if (eventType == XmlPullParser.Event.START_ELEMENT) {\n if (elementName.equals(\"file\")) {\n name = parser.getAttributeValue(\"\", \"name\");\n size = parser.getAttributeValue(\"\", \"size\");\n hash = parser.getAttributeValue(\"\", \"hash\");\n date = parser.getAttributeValue(\"\", \"date\");\n }\n else if (elementName.equals(\"desc\")) {\n desc = parser.nextText();\n }\n else if (elementName.equals(\"range\")) {\n isRanged = true;\n }\n else if (elementName.equals(\"x\") && namespace.equals(\"jabber:x:data\")) {\n form = dataFormProvider.parse(parser);\n }\n else if (elementName.equals(\"thumbnail\")) {\n thumbnail = new Thumbnail(parser);\n }\n }\n else if (eventType == XmlPullParser.Event.END_ELEMENT) {\n if (elementName.equals(\"si\")) {\n done = true;\n }\n // The name-attribute is required per XEP-0096, so ignore the IQ if the name is not\n // set to avoid exceptions. Particularly,\n // the SI response of Empathy contains an invalid, empty file-tag.\n else if (elementName.equals(\"file\") && (name != null)) {\n long fileSize = 0;\n size = StringUtils.returnIfNotEmptyTrimmed(size);\n if (size != null) {\n try {\n fileSize = Long.parseLong(size);\n } catch (NumberFormatException e) {\n Timber.w(e, \"Received an invalid file size, continuing with fileSize set to 0\");\n }\n }\n ThumbnailFile file = new ThumbnailFile(name, fileSize);\n file.setHash(hash);\n\n if (date != null) {\n try {\n file.setDate(XmppDateTime.parseDate(date));\n } catch (ParseException e) {\n Timber.w(\"Unknown dateformat on incoming file transfer: %s\", date);\n }\n }\n else {\n file.setDate(new Date());\n }\n\n if (thumbnail != null)\n file.setThumbnail(thumbnail);\n\n file.setDesc(desc);\n file.setRanged(isRanged);\n initiation.setFile(file);\n }\n }\n }\n initiation.setSessionID(id);\n initiation.setMimeType(mimeType);\n initiation.setFeatureNegotiationForm(form);\n return initiation;\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException {\n\n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (this.localContainerArrayTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://www.scene7.com/IpsApi/xsd/2016-01-14-beta\",\n \"containerArray\"));\n\n if (this.localContainerArray == null) {\n throw new org.apache.axis2.databinding.ADBException(\"containerArray cannot be null!!\");\n }\n elementList.add(this.localContainerArray);\n }\n if (this.localMemberArrayTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://www.scene7.com/IpsApi/xsd/2016-01-14-beta\",\n \"memberArray\"));\n\n if (this.localMemberArray == null) {\n throw new org.apache.axis2.databinding.ADBException(\"memberArray cannot be null!!\");\n }\n elementList.add(this.localMemberArray);\n }\n if (this.localLayerReferenceArrayTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://www.scene7.com/IpsApi/xsd/2016-01-14-beta\",\n \"layerReferenceArray\"));\n\n if (this.localLayerReferenceArray == null) {\n throw new org.apache.axis2.databinding.ADBException(\"layerReferenceArray cannot be null!!\");\n }\n elementList.add(this.localLayerReferenceArray);\n }\n if (this.localOwnerArrayTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://www.scene7.com/IpsApi/xsd/2016-01-14-beta\",\n \"ownerArray\"));\n\n if (this.localOwnerArray == null) {\n throw new org.apache.axis2.databinding.ADBException(\"ownerArray cannot be null!!\");\n }\n elementList.add(this.localOwnerArray);\n }\n if (this.localDerivedArrayTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://www.scene7.com/IpsApi/xsd/2016-01-14-beta\",\n \"derivedArray\"));\n\n if (this.localDerivedArray == null) {\n throw new org.apache.axis2.databinding.ADBException(\"derivedArray cannot be null!!\");\n }\n elementList.add(this.localDerivedArray);\n }\n if (this.localGeneratorArrayTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://www.scene7.com/IpsApi/xsd/2016-01-14-beta\",\n \"generatorArray\"));\n\n if (this.localGeneratorArray == null) {\n throw new org.apache.axis2.databinding.ADBException(\"generatorArray cannot be null!!\");\n }\n elementList.add(this.localGeneratorArray);\n }\n if (this.localGeneratedArrayTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://www.scene7.com/IpsApi/xsd/2016-01-14-beta\",\n \"generatedArray\"));\n\n if (this.localGeneratedArray == null) {\n throw new org.apache.axis2.databinding.ADBException(\"generatedArray cannot be null!!\");\n }\n elementList.add(this.localGeneratedArray);\n }\n if (this.localThumbAssetTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://www.scene7.com/IpsApi/xsd/2016-01-14-beta\",\n \"thumbAsset\"));\n\n if (this.localThumbAsset == null) {\n throw new org.apache.axis2.databinding.ADBException(\"thumbAsset cannot be null!!\");\n }\n elementList.add(this.localThumbAsset);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"getDirectAreaInfoReturn\"));\n \n \n elementList.add(localGetDirectAreaInfoReturn==null?null:\n localGetDirectAreaInfoReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "private GeneralInfoVO getGeneralInfo(String xmlResponse) {\r\n\t\t\t\r\n\t\tGeneralInfoVO generalInfo = new GeneralInfoVO();\r\n\t\tElement root;\r\n\t\t\r\n\t\ttry {\r\n\t\t\troot = DOMUtils.openDocument(new ByteArrayInputStream(xmlResponse.getBytes()));\r\n\t\t\tElement data = DOMUtils.getElement(root, \"data\", true);\r\n\t\t\tdata = DOMUtils.getElement(data, \"customer\", true);\r\n\t\t\t\r\n\t\t\t// Obtain the client status from the DOM \r\n\t\t\tElement element;\r\n//\t\t\tElement element = DOMUtils.getElement(data, \"status\", true);\r\n//\t\t\tgeneralInfo.setStatus(formatStatus(DOMUtils.getText(element).toString()));\r\n\t\t\t//sets '' to status for a while (until this issue were defined)\r\n\t\t\tgeneralInfo.setStatus(\"\");\r\n\t\t\t\r\n\t\t\t/* Address */\t\t\t\t\t\t\r\n\t\t\tdata = DOMUtils.getElement(data, \"address\", true);\r\n\t\t\t// Obtain the street type from the DOM\r\n\t\t\telement = DOMUtils.getElement(data, \"street-type\", true);\r\n\t\t\tString address = DOMUtils.getText(element).toString();\r\n\t\r\n\t\t\t// Obtain the street name from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"street\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\t// Obtain the street number from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"street-no\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\t// Obtain the complement from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"complement\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\t// Obtain the district from the DOM\r\n\t\t\telement = DOMUtils.getElement(data, \"district\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\t\t\t\r\n\t\t\t// Obtain the city from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"city\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\t// Obtain the state from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"state\", true);\r\n\t\t\taddress += \" \" + DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t\tgeneralInfo.setAddress(address);\r\n\t\t\t/* --------- */\t\t\t\r\n\t\t\t\r\n\t\t\t// Obtain the subscriber name from the DOM \r\n\t\t\telement = DOMUtils.getElement(data, \"full-name\", true);\r\n\t\t\t\r\n\t\t\tgeneralInfo.setSubscriberName(DOMUtils.getText(element).toString());\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tlog.error(\"Error parsing xml response from Infobus\", e);\r\n\t\t\tthrow new ErrorMessageException(e);\r\n\t\t}\r\n\r\n\t\treturn generalInfo;\r\n\t\t\r\n\t}", "private Map<String, Map<String, String>> getEventsFromAnXML(Activity activity)throws XmlPullParserException, IOException {\n\t\tMap<String, Map<String, String>>detailMap = new HashMap<String, Map<String,String>>();\n//\t\tStringBuffer stringBuffer = new StringBuffer();\n\t\tResources res = activity.getResources();\n//\t\tXmlResourceParser xpp = res.getXml(R.xml.vacc_detail_eng);\n\t\tXmlResourceParser xpp = MiraConstants.LANGUAGE.equals(MiraConstants.HINDI)?res.getXml(R.xml.vacc_detail_hnd):res.getXml(R.xml.vacc_detail_eng);\n\t\txpp.next();\n\t\tint eventType = xpp.getEventType();\n\t\tString name = \"sorry\";\n\t\tString text = \"sorry\";\n\t\tHashMap<String, String>map= new HashMap<String, String>();\n\t\twhile (eventType != XmlPullParser.END_DOCUMENT) {\n\t\t\tif (eventType == XmlPullParser.START_TAG) {\n\t\t\t\tname = xpp.getName();\n\n\t\t\t\tif(name.equals(\"VaccId\")){\n\t\t\t\t\tmap= new HashMap<String, String>();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (eventType == XmlPullParser.TEXT) {\n\t\t\t\ttext = xpp.getText();\n //System.out.println(\"Parsing \"+name +\" Value \"+text);\n\t\t\t}\n\t\t\tif (eventType == XmlPullParser.END_TAG) {\n\t\t\t\tif(xpp.getName().equals(\"VaccId\")){\n//\t\t\t\t\tpreArrayList.add(map);\n\t\t\t\t\tdetailMap.put(map.get(\"VaccName\"), map);\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif (name.equals(\"VaccName\")) {\n\t\t\t\t\tmap.put(name, text);\n\t\t\t\t\tname = \"\";\n\t\t\t\t\ttext=\"\";\n\t\t\t\t}\n\t\t\t\tif (name.equals(\"VaccMessage\")) {\n\t\t\t\t\tmap.put(name, text);\n\t\t\t\t\tname = \"\";\n\t\t\t\t\ttext=\"\";\n\t\t\t\t}\n\t\t\t\tif (name.equals(\"AdministrationMSG\")) {\n\t\t\t\t\tmap.put(name, text);\n\t\t\t\t\tname = \"\";\n\t\t\t\t\ttext=\"\";\n\t\t\t\t}\n\t\t\t\tif (name.equals(\"AboutMsg\")) {\n\t\t\t\t\tmap.put(name, text);\n\t\t\t\t\tname = \"\";\n\t\t\t\t\ttext=\"\";\n\t\t\t\t}\t\t\t\n\t\t\t}\n System.out.println(\"In Xml....\"+detailMap);\n\t\t\teventType = xpp.next();\n\t\t}\n\t\treturn detailMap;\n\t}", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"getDownLoadCardReturn\"));\n \n \n elementList.add(localGetDownLoadCardReturn==null?null:\n localGetDownLoadCardReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localUserTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"user\"));\r\n \r\n elementList.add(localUser==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUser));\r\n } if (localNewFilesTracker){\r\n if (localNewFiles!=null){\r\n for (int i = 0;i < localNewFiles.length;i++){\r\n \r\n if (localNewFiles[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"newFiles\"));\r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewFiles[i]));\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"newFiles\"));\r\n elementList.add(null);\r\n \r\n }\r\n \r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"newFiles\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "private void readAndApplyTags(XmlPullParser parser) throws XmlPullParserException, IOException {\n\n\t\tprefEdit.putString(\"name\", profileName);\n\n\t\tparser.require(XmlPullParser.START_TAG, null, \"resources\");\n\n\t\twhile (parser.next() != XmlPullParser.END_TAG) {\n\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = parser.getName();\n\n switch (name) {\n case \"lockscreen\":\n setLockscreen(parser);\n break;\n case \"wifi\":\n setWifi(parser);\n break;\n case \"mobile_data\":\n setMobileData(parser);\n break;\n case \"bluetooth\":\n setBluetooth(parser);\n break;\n case \"display\":\n setDisplay(parser);\n break;\n case \"ringer_mode\":\n setRingerMode(parser);\n break;\n default:\n Log.i(\"XmlParser\", \"Skip!\");\n parser.nextTag();\n break;\n }\n\t\t\tprefEdit.commit();\n\t\t}\n\t}", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) throws org.apache.axis2.databinding.ADBException {\n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n if (localAnnouncesTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"announces\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAnnounces));\n }\n if (localAttenuatorTracker) {\n if (localAttenuator != null) {\n for (int i = 0; i < localAttenuator.length; i++) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"attenuator\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAttenuator[i]));\n }\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"attenuator\"));\n elementList.add(null);\n }\n }\n if (localChannelListTracker) {\n if (localChannelList != null) {\n for (int i = 0; i < localChannelList.length; i++) {\n if (localChannelList[i] != null) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"channelList\"));\n elementList.add(localChannelList[i]);\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"channelList\"));\n elementList.add(null);\n }\n }\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"channelList\"));\n elementList.add(localChannelList);\n }\n }\n if (localFiltersTracker) {\n if (localFilters != null) {\n for (int i = 0; i < localFilters.length; i++) {\n if (localFilters[i] != null) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"filters\"));\n elementList.add(localFilters[i]);\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"filters\"));\n elementList.add(null);\n }\n }\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"filters\"));\n elementList.add(localFilters);\n }\n }\n if (localHasGetFuncTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"hasGetFunc\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localHasGetFunc));\n }\n if (localHasGetLevelTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"hasGetLevel\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localHasGetLevel));\n }\n if (localHasGetParmTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"hasGetParm\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localHasGetParm));\n }\n if (localHasSetFuncTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"hasSetFunc\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localHasSetFunc));\n }\n if (localHasSetLevelTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"hasSetLevel\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localHasSetLevel));\n }\n if (localHasSetParmTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"hasSetParm\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localHasSetParm));\n }\n if (localItuRegionTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"ituRegion\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localItuRegion));\n }\n if (localMaxIfShiftTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"maxIfShift\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMaxIfShift));\n }\n if (localMaxRITTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"maxRIT\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMaxRIT));\n }\n if (localMaxXITTracker) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"maxXIT\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMaxXIT));\n }\n if (localPreampTracker) {\n if (localPreamp != null) {\n for (int i = 0; i < localPreamp.length; i++) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"preamp\"));\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPreamp[i]));\n }\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"preamp\"));\n elementList.add(null);\n }\n }\n if (localRxRangeListTracker) {\n if (localRxRangeList != null) {\n for (int i = 0; i < localRxRangeList.length; i++) {\n if (localRxRangeList[i] != null) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"rxRangeList\"));\n elementList.add(localRxRangeList[i]);\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"rxRangeList\"));\n elementList.add(null);\n }\n }\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"rxRangeList\"));\n elementList.add(localRxRangeList);\n }\n }\n if (localTuningStepsTracker) {\n if (localTuningSteps != null) {\n for (int i = 0; i < localTuningSteps.length; i++) {\n if (localTuningSteps[i] != null) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"tuningSteps\"));\n elementList.add(localTuningSteps[i]);\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"tuningSteps\"));\n elementList.add(null);\n }\n }\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"tuningSteps\"));\n elementList.add(localTuningSteps);\n }\n }\n if (localTxRangeListTracker) {\n if (localTxRangeList != null) {\n for (int i = 0; i < localTxRangeList.length; i++) {\n if (localTxRangeList[i] != null) {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"txRangeList\"));\n elementList.add(localTxRangeList[i]);\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"txRangeList\"));\n elementList.add(null);\n }\n }\n } else {\n elementList.add(new javax.xml.namespace.QName(\"http://rigctl.service.cwterm/xsd\", \"txRangeList\"));\n elementList.add(localTxRangeList);\n }\n }\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localUserTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"user\"));\r\n \r\n elementList.add(localUser==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUser));\r\n } if (localDeletedFilesTracker){\r\n if (localDeletedFiles!=null){\r\n for (int i = 0;i < localDeletedFiles.length;i++){\r\n \r\n if (localDeletedFiles[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"deletedFiles\"));\r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDeletedFiles[i]));\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"deletedFiles\"));\r\n elementList.add(null);\r\n \r\n }\r\n \r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"deletedFiles\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public static GetVehicleAlarmInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPage object =\n new GetVehicleAlarmInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetDirectSrvInfo parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectSrvInfo object =\n new GetDirectSrvInfo();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectSrvInfo\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectSrvInfo)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"terminalReturnCardReturn\"));\n \n \n elementList.add(localTerminalReturnCardReturn==null?null:\n localTerminalReturnCardReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public static GetDirectAreaInfo parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfo object =\n new GetDirectAreaInfo();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfo\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfo)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker){\r\n if (local_return!=null){\r\n for (int i = 0;i < local_return.length;i++){\r\n \r\n if (local_return[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return[i]));\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(null);\r\n \r\n }\r\n \r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localUserTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"user\"));\r\n \r\n elementList.add(localUser==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUser));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localVersionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://ws.platform.blackboard/xsd\",\n \"version\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localVersion));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public static GetVehicleAlarmInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPageResponse object =\n new GetVehicleAlarmInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void parse(String systemId)\n throws SAXException, IOException\n {\n parse(new InputSource(systemId));\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker){\r\n if (local_return!=null) {\r\n for (int i = 0;i < local_return.length;i++){\r\n\r\n if (local_return[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(local_return[i]);\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(local_return);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localNameTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"name\"));\r\n \r\n elementList.add(localName==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "private void parseXML(String rawXML){\n Log.w(\"AndroidParseXMLActivity\", \"Start Parsing\");\n SAXParserFactory factory = SAXParserFactory.newInstance();\n try {\n\n //Use the sax parser to parse the raw XML.\n SAXParser saxParser = factory.newSAXParser();\n XMLReader xmlreader = saxParser.getXMLReader();\n\n //Use the handler to parse the XML to text\n PaintingXMLHandler handler = new PaintingXMLHandler();\n xmlreader.setContentHandler(handler);\n\n //Objects to read the stream.\n InputSource inStream = new InputSource();\n inStream.setCharacterStream(new StringReader(rawXML));\n\n //Parse the input stream\n xmlreader.parse(inStream);\n\n //Get the map markers from the handler.\n if (handler.getPaintLines() != null) {\n touchArea.loadPainting(handler.getPaintLines());\n }\n setBackgroundColor(handler.getBackground());\n\n\n Toast.makeText(this, \"Loaded\", Toast.LENGTH_LONG).show();\n } catch (ParserConfigurationException e) {\n Toast.makeText(this, \"Error 1 reading xml file.\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (SAXException e) {\n Toast.makeText(this, \"Error 2 reading xml file.\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }catch(IOException e){\n Toast.makeText(this, \"Error 3 reading xml file.\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localErrorMessageTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\n \"errorMessage\"));\n \n elementList.add(localErrorMessage==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localErrorMessage));\n } if (localResponseXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\n \"responseXml\"));\n \n elementList.add(localResponseXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localResponseXml));\n } if (localResultTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\n \"result\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localResult));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public static GetVehicleInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPage object =\n new GetVehicleInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"terminalDownloadQueryForDayReturn\"));\n \n \n elementList.add(localTerminalDownloadQueryForDayReturn==null?null:\n localTerminalDownloadQueryForDayReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"directChargeReturn\"));\n \n \n elementList.add(localDirectChargeReturn==null?null:\n localDirectChargeReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "private void prepareData() {\n devices.clear();\n\n Set<String> s = Blue.getInstance().devices.keySet();\n Iterator<String> it = s.iterator();\n String address;\n while (it.hasNext()) {\n address = it.next();\n devices.add(new Device(address, Blue.getInstance().devices.get(address)));\n }\n }", "public static GetDirectAreaInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfoResponse object =\n new GetDirectAreaInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectAreaInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectAreaInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectAreaInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void parseXML(String XML);", "void visitElement_platform(org.w3c.dom.Element element) { // <platform>\n // element.getValue();\n org.w3c.dom.NamedNodeMap attrs = element.getAttributes();\n for (int i = 0; i < attrs.getLength(); i++) {\n org.w3c.dom.Attr attr = (org.w3c.dom.Attr)attrs.item(i);\n if (attr.getName().equals(\"name\")) { // <platform name=\"???\">\n list.platforms.add(attr.getValue());\n }\n }\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n }\n }\n }", "protected abstract void _fromXml_(Element in_xml) throws ConfigurationException;", "public void readXML(InputStream in) throws ParserConfigurationException, IOException, SAXException {\n\n\t\tfor(int i = 0; i < desktops.size(); i++) {\n\t\t\tWSDesktop desk = (WSDesktop) desktops.get(i);\n\t\t\tdesk.clear();\n\t\t}\n\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\tDocument doc = builder.parse(in);\n\t\tElement root = doc.getDocumentElement();\n\t\tif(root.getNodeName().equals(\"DockingDesktop\")) {\n\t\t\t// this is an old desktop file, missing the VLDocking root node (VLDocking 2.0 format)\n\t\t\t// so we noly have a single desktop\n\t\t\tWSDesktop desk = getDesktop(0); // only one\n\t\t\tdesk.readDesktopNode(root);\n\t\t} else {\n\t\t\tNodeList desktopChildren = root.getChildNodes();\n\t\t\tfor(int i = 0, len = desktopChildren.getLength(); i < len; i++) {\n\t\t\t\tNode node = desktopChildren.item(i);\n\t\t\t\tif(node instanceof Element) {\n\t\t\t\t\tElement deskChild = (Element) node;\n\t\t\t\t\tWSDesktop desk = getDesktop(deskChild.getAttribute(\"name\"));\n\t\t\t\t\tdesk.readDesktopNode(deskChild);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"CSPID\"));\n \n \n elementList.add(localCSPID==null?null:\n localCSPID);\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"LSPID\"));\n \n \n elementList.add(localLSPID==null?null:\n localLSPID);\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"CorrelateID\"));\n \n \n elementList.add(localCorrelateID==null?null:\n localCorrelateID);\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"CmdFileURL\"));\n \n \n elementList.add(localCmdFileURL==null?null:\n localCmdFileURL);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "List<DeviceInfo> getDevicesInfo(List<DeviceIdentifier> deviceIdentifiers) throws DeviceDetailsMgtException;", "public static GetDirectSrvInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectSrvInfoResponse object =\n new GetDirectSrvInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectSrvInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectSrvInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectSrvInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectSrvInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectSrvInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetDownLoadCard parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDownLoadCard object =\n new GetDownLoadCard();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDownLoadCard\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDownLoadCard)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private List<String> readTemperatureValues(XmlPullParser xpp)\n throws XmlPullParserException, IOException\n {\n List<String> values = new ArrayList<String>();\n\n int eventType = xpp.next();\n while (eventType != XmlPullParser.END_DOCUMENT)\n {\n if (eventType == XmlPullParser.START_TAG)\n {\n if (xpp.getName().equalsIgnoreCase(VALUE))\n {\n String value = xpp.nextText();\n if(value.length() != 0)\n values.add(value);\n else\n // sometimes you get an empty value like <value type=\"nil\" />\n values.add(INVALID); \n }\n }\n else if (eventType == XmlPullParser.END_TAG)\n {\n // exit when we get to \"</temperature>\"\n if (xpp.getName().equalsIgnoreCase(TEMPERATURE))\n break;\n }\n eventType = xpp.next();\n }\n return values;\n }", "private boolean readFile() {\n\t\ttry {\n\n\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\tDocument doc = docBuilder.parse(cnfFile);\n\n\t\t\t// normalize text representation\n\t\t\tdoc.getDocumentElement().normalize();\n\t\t\tSystem.out.println(\"Root element of the doc is \" + doc.getDocumentElement().getNodeName());\n\t\t\tdoc.getDocumentElement().getAttributeNode(\"version\");\n\n\t\t\tNodeList rootNode = doc.getElementsByTagName(\"SCMS_DATA\");\n\t\t\tif (rootNode.getLength() < 1) {\n\t\t\t\tSystem.out.println(\"ERROR in config data file: there is no SCMS_DATA element\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tString version = rootNode.item(0).getAttributes().getNamedItem(\"version\").getNodeValue();\n\t\t\tfinal String dataVersion = \"0.1\";\n\t\t\tif (!version.equals(dataVersion)) {\n\t\t\t\tSystem.out.println(\"ERROR in config data file: required version is \" + dataVersion);\n\t\t\t\tSystem.out.println(\"Version \" + version + \" is not supported.\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tNodeList listOfDevices = doc.getElementsByTagName(\"DEVICE\");\n\t\t\tint totalDevices = listOfDevices.getLength();\n\t\t\tSystem.out.println(\"Total no of devices : \" + totalDevices);\n\n\t\t\tHashMap<String, CnfDevice> devices = new HashMap<>();\n\t\t\tfor (int s = 0; s < listOfDevices.getLength(); s++) {\n\n\t\t\t\tNode node = listOfDevices.item(s);\n\t\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\n\t\t\t\t\tString id = node.getAttributes().getNamedItem(\"id\").getNodeValue();\n\t\t\t\t\tString name = node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\t\tString description = node.getAttributes().getNamedItem(\"description\").getNodeValue();\n\t\t\t\t\tString pi_name = node.getAttributes().getNamedItem(\"PI_Name\").getNodeValue();\n\t\t\t\t\tString pixHor = node.getAttributes().getNamedItem(\"pixHor\").getNodeValue();\n\t\t\t\t\tString pixVer = node.getAttributes().getNamedItem(\"pixVer\").getNodeValue();\n\t\t\t\t\tString location = node.getAttributes().getNamedItem(\"location\").getNodeValue();\n\n\t\t\t\t\tdevices.put(id, new CnfDevice(id, name, description, pi_name,\n\t\t\t\t\t\t\tInteger.valueOf(pixHor), Integer.valueOf(pixVer),location));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcnfData.setDevices(devices);\n\n\t\t\tNodeList listOfViews = doc.getElementsByTagName(\"VIEW\");\n\t\t\tint totalViews = listOfViews.getLength();\n\t\t\tSystem.out.println(\"Total no of views : \" + totalViews);\n\n\t\t\tHashMap<String, CnfView> views = new HashMap<>();\n\t\t\tfor (int s = 0; s < listOfViews.getLength(); s++) {\n\n\t\t\t\tNode node = listOfViews.item(s);\n\n\t\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tString id = node.getAttributes().getNamedItem(\"id\").getNodeValue();\n\t\t\t\t\tString name = node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\t\tString description = node.getAttributes().getNamedItem(\"description\").getNodeValue();\n\t\t\t\t\tString pixHor = node.getAttributes().getNamedItem(\"pixHor\").getNodeValue();\n\t\t\t\t\tString pixVer = node.getAttributes().getNamedItem(\"pixVer\").getNodeValue();\n\t\t\t\t\tString asso_device = node.getAttributes().getNamedItem(\"associatedDevice\").getNodeValue();\n\n\t\t\t\t\tElement element = (Element) node;\n\t\t\t\t\tNodeList listOfImages = ((Element) node).getElementsByTagName(\"IMAGE\");\n\t\t\t\t\tElement iElement = (Element) listOfImages.item(0);\n\t\t\t\t\tString[] images = new String[listOfImages.getLength()];\n\t\t\t\t\tfor (int i = 0; i < listOfImages.getLength(); i++) {\n\n\t\t\t\t\t\tNode iNode = listOfImages.item(i);\n\t\t\t\t\t\timages[i] = iNode.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\t\t}\n\n\t\t\t\t\tviews.put(id, new CnfView(id, name, description,\n\t\t\t\t\t\t\tInteger.valueOf(pixHor), Integer.valueOf(pixVer), asso_device, images));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcnfData.setViews(views);\n\n\t\t\tNodeList listOfSections = doc.getElementsByTagName(\"SECTION\");\n\t\t\tint totalSections = listOfSections.getLength();\n\t\t\tSystem.out.println(\"Total no of sections : \" + totalSections);\n\n\t\t\tHashMap<String, CnfSection> sections = new HashMap<>();\n\t\t\tfor (int s = 0; s < totalSections; s++) {\n\t\t\t\tNode node = listOfSections.item(s);\n\n\t\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tString sectionId = node.getAttributes().getNamedItem(\"sectionId\").getNodeValue();\n\t\t\t\t\tString deviceId = node.getAttributes().getNamedItem(\"deviceId\").getNodeValue();\n\t\t\t\t\tString positionId = node.getAttributes().getNamedItem(\"positionId\").getNodeValue();\n\t\t\t\t\tString vOffset = node.getAttributes().getNamedItem(\"vOffset\").getNodeValue();\n\n\t\t\t\t\t// A section is invalid if the deviceId doesn't exist\n\t\t\t\t\tif (null == cnfData.getDeviceById(deviceId)) {\n\t\t\t\t\t\tSystem.out.println(\"ERROR in SECTION config data: deviceId \" + deviceId + \" sectionId \" + sectionId);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsections.put(deviceId, new CnfSection(sectionId, deviceId, positionId, vOffset));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcnfData.setSections(sections);\n\t\t\treturn true;\n\n\t\t} catch (SAXParseException err) {\n\t\t\tSystem.out.println(\"** Parsing error\" + \", line \" + err.getLineNumber() + \", uri \" + err.getSystemId());\n\t\t\tSystem.out.println(\" \" + err.getMessage());\n\n\t\t} catch (SAXException e) {\n\t\t\tException x = e.getException();\n\t\t\t((x == null) ? e : x).printStackTrace();\n\n\t\t} catch (Throwable t) {\n\t\t\tt.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n \r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "@Override\n public void endElement(String str1, String str2, String element) throws SAXException {\n \n if (element.equals(\"phone\")) {\n phones.put(\"S\"+x, phone);\n x++;\n\n return;\n }\n if (element.equalsIgnoreCase(\"phoneImage\")) {\n phone.setImage(elementValueRead);\n\n return;\n }\n if (element.equalsIgnoreCase(\"phoneName\")) {\n phone.setName(elementValueRead);\n\n return;\n }\n if (element.equalsIgnoreCase(\"phoneCompany\")) {\n phone.setCompany(elementValueRead);\n\n return;\n }\n if (element.equalsIgnoreCase(\"phoneCondition\")) {\n phone.setCondition(elementValueRead);\n\n return;\n }\n if(element.equalsIgnoreCase(\"phonePrice\")){\n phone.setPrice(Float.parseFloat(elementValueRead));\n\n return;\n }\n if(element.equalsIgnoreCase(\"phoneColor\")){\n phone.setColor(elementValueRead);\n \n return;\n }\n if(element.equalsIgnoreCase(\"phoneDescription\")){\n phone.setDescription(elementValueRead);\n return;\n }\n\t\t\nif(element.equalsIgnoreCase(\"phoneQuantity\")){\n phone.setQty(Integer.parseInt(elementValueRead));\n return;\n }\n \n if(element.equalsIgnoreCase(\"phoneRebate\")){\n phone.setRebate(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"phoneRebateName\")){\n phone.setRebateName(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"phoneOriginal\")){\n phone.setOriginal(Float.parseFloat(elementValueRead));\n\t\t\t\n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"phoneSale\")){\n phone.setSale(elementValueRead);\n return;\n }\n//Fetching values of Smart Watches\n\n if (element.equals(\"smartwatch\")) {\n smartwatches.put(\"T\"+y, watch);\n y++;\n return;\n }\n if (element.equalsIgnoreCase(\"watchImage\")) {\n watch.setImage(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"watchName\")) {\n watch.setName(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"watchCompany\")) {\n watch.setCompany(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"watchCondition\")) {\n watch.setCondition(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"watchPrice\")){\n watch.setPrice(Float.parseFloat(elementValueRead));\n return;\n }\n if(element.equalsIgnoreCase(\"watchColor\")){\n watch.setColor(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"watchDescription\")){\n watch.setDescription(elementValueRead);\n //watches.put(\"T\", watch);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"watchQuantity\")){\n watch.setQty(Integer.parseInt(elementValueRead));\n return;\n }\n if(element.equalsIgnoreCase(\"watchRebate\")){\n watch.setRebate(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"watchRebateName\")){\n watch.setRebateName(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"watchOriginal\")){\n watch.setOriginal(Float.parseFloat(elementValueRead));\n\t\t\t\n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"watchSale\")){\n watch.setSale(elementValueRead);\n return;\n }\n \n// Fetching values of Laptops\n\n if (element.equals(\"laptop\")) {\n laptops.put(\"L\"+z, laptop);\n z++;\n return;\n }\n if (element.equalsIgnoreCase(\"laptopImage\")) {\n laptop.setImage(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"laptopName\")) {\n laptop.setName(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"laptopCompany\")) {\n laptop.setCompany(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"laptopCondition\")) {\n laptop.setCondition(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"laptopPrice\")){\n laptop.setPrice(Float.parseFloat(elementValueRead));\n return;\n }\n if(element.equalsIgnoreCase(\"laptopColor\")){\n laptop.setColor(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"laptopDescription\")){\n laptop.setDescription(elementValueRead);\n //laptops.put(\"L\", laptop);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"laptopQuantity\")){\n laptop.setQty(Integer.parseInt(elementValueRead));\n return;\n }\n if(element.equalsIgnoreCase(\"laptopRebate\")){\n laptop.setRebate(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"laptopRebateName\")){\n laptop.setRebateName(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"laptopOriginal\")){\n laptop.setOriginal(Float.parseFloat(elementValueRead));\n\t\t\t\n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"laptopSale\")){\n laptop.setSale(elementValueRead);\n return;\n }\n\n\n// Fetching values of Speakers\n\n\n\n if (element.equals(\"speaker\")) {\n speakers.put(\"S\"+s, speaker);\n s++;\n return;\n }\n if (element.equalsIgnoreCase(\"speakerImage\")) {\n speaker.setImage(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"speakerName\")) {\n speaker.setName(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"speakerCompany\")) {\n speaker.setCompany(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"speakerCondition\")) {\n speaker.setCondition(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"speakerPrice\")){\n speaker.setPrice(Float.parseFloat(elementValueRead));\n return;\n }\n if(element.equalsIgnoreCase(\"speakerColor\")){\n speaker.setColor(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"speakerDescription\")){\n speaker.setDescription(elementValueRead);\n //speakers.put(\"Tv\", speaker);\n return;\n }\n if(element.equalsIgnoreCase(\"speakerQuantity\")){\n speaker.setQty(Integer.parseInt(elementValueRead));\n return;\n }\nif(element.equalsIgnoreCase(\"speakerRebate\")){\n speaker.setRebate(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"speakerRebateName\")){\n speaker.setRebateName(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"speakerOriginal\")){\n speaker.setOriginal(Float.parseFloat(elementValueRead));\n\t\t\t\n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"speakerSale\")){\n speaker.setSale(elementValueRead);\n return;\n }\n\n\nif (element.equals(\"headphone\")) {\n headphones.put(\"H\"+h, headphone);\n h++;\n return;\n }\n if (element.equalsIgnoreCase(\"headphoneImage\")) {\n headphone.setImage(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"headphoneName\")) {\n headphone.setName(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"headphoneCompany\")) {\n headphone.setCompany(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"headphoneCondition\")) {\n headphone.setCondition(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"headphonePrice\")){\n headphone.setPrice(Float.parseFloat(elementValueRead));\n return;\n }\n if(element.equalsIgnoreCase(\"headphoneColor\")){\n headphone.setColor(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"headphoneDescription\")){\n headphone.setDescription(elementValueRead);\n //speakers.put(\"Tv\", speaker);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"headphoneQuantity\")){\n headphone.setQty(Integer.parseInt(elementValueRead));\n return;\n }\n if(element.equalsIgnoreCase(\"headphoneRebate\")){\n headphone.setRebate(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"headphoneRebateName\")){\n headphone.setRebateName(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"headphoneOriginal\")){\n headphone.setOriginal(Float.parseFloat(elementValueRead));\n\t\t\t\n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"headphoneSale\")){\n headphone.setSale(elementValueRead);\n return;\n }\n\t\t\n\t\t\nif (element.equals(\"externalstorage\")) {\n externalstorages.put(\"E\"+e, externalstorage);\n e++;\n return;\n }\n if (element.equalsIgnoreCase(\"externalstorageImage\")) {\n externalstorage.setImage(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"externalstorageName\")) {\n externalstorage.setName(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"externalstorageCompany\")) {\n externalstorage.setCompany(elementValueRead);\n return;\n }\n if (element.equalsIgnoreCase(\"externalstorageCondition\")) {\n externalstorage.setCondition(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"externalstoragePrice\")){\n externalstorage.setPrice(Float.parseFloat(elementValueRead));\n return;\n }\n if(element.equalsIgnoreCase(\"externalstorageColor\")){\n externalstorage.setColor(elementValueRead);\n return;\n }\n if(element.equalsIgnoreCase(\"externalstorageDescription\")){\n externalstorage.setDescription(elementValueRead);\n //speakers.put(\"Tv\", speaker);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"externalstorageQuantity\")){\n externalstorage.setQty(Integer.parseInt(elementValueRead));\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"externalstorageRebate\")){\n externalstorage.setRebate(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"externalstorageRebateName\")){\n externalstorage.setRebateName(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"externalstorageOriginal\")){\n externalstorage.setOriginal(Float.parseFloat(elementValueRead));\n\t\t\t\n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"externalstorageSale\")){\n externalstorage.setSale(elementValueRead);\n return;\n }\n\t\t\n\t\t\n\t\t\n if (element.equals(\"accessory\")) {\n\t\t\taccessories.put(\"A\"+a, accessory);\n\t\t\ta++;\n\t\t\t\n\t return;\n }\n if (element.equalsIgnoreCase(\"accessoryImage\")) {\n accessory.setImage(elementValueRead);\n\t\t\n\t return;\n }\n if (element.equalsIgnoreCase(\"accessoryName\")) {\n accessory.setName(elementValueRead);\n\t\t\t\n\t return;\n }\n\t\tif (element.equalsIgnoreCase(\"accessoryCompany\")) {\n accessory.setCompany(elementValueRead);\n\t\t\t\n\t return;\n }\n\t\tif (element.equalsIgnoreCase(\"accessoryCondition\")) {\n accessory.setCondition(elementValueRead);\n\t\t\t\n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"accessoryPrice\")){\n accessory.setPrice(Float.parseFloat(elementValueRead));\n\t\t\t\n\t return;\n }\n if(element.equalsIgnoreCase(\"accessoryColor\")){\n accessory.setColor(elementValueRead);\n\t\t \n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"accessoryDescription\")){\n accessory.setDescription(elementValueRead);\n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"accessoryQuantity\")){\n accessory.setQty(Integer.parseInt(elementValueRead));\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"accessoryRebate\")){\n accessory.setRebate(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"accessoryRebateName\")){\n accessory.setRebateName(elementValueRead);\n return;\n }\n\t\tif(element.equalsIgnoreCase(\"accessoryOriginal\")){\n accessory.setOriginal(Float.parseFloat(elementValueRead));\n\t\t\t\n\t return;\n }\n\t\tif(element.equalsIgnoreCase(\"accessorySale\")){\n accessory.setSale(elementValueRead);\n return;\n }\n\t\t\n\t\t\n\t\t\n\t}", "void visitElement_os(org.w3c.dom.Element element) { // <os>\n // element.getValue();\n org.w3c.dom.NamedNodeMap attrs = element.getAttributes();\n for (int i = 0; i < attrs.getLength(); i++) {\n org.w3c.dom.Attr attr = (org.w3c.dom.Attr)attrs.item(i);\n if (attr.getName().equals(\"name\")) { // <os name=\"???\">\n list.operatingSystems.add(attr.getValue());\n }\n }\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n }\n }\n }", "public HelperClass parseXML(File file1)\n\t{\n\t\tString a =null;\n\t\tList<String> list1 = new ArrayList<String>();\n\t\tString id = \"\";\n\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\ttry\n\t\t{\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument doc = builder.parse(file1.toString());\n\t\t\tElement root = doc.getDocumentElement();\n\t\t\tid = root.getAttribute(\"id\");\n\t\t\t\n\t\t\tNodeList requirementList = doc.getElementsByTagName(\"requirements\");\n\t\t\tfor(int k=0;k<requirementList.getLength();k++) \n\t\t\t{\n\t\t\t\tNode r = requirementList.item(k);\n\t\t\t\tif(r.getNodeType() == Node.ELEMENT_NODE)\n\t\t\t\t{\n\t\t\t\t\tElement requirement = (Element) r;\n\t\t\t\t\tNodeList nameList = requirement.getChildNodes();\n\t\t\t\t\tfor(int j=0;j<nameList.getLength();j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tNode n = nameList.item(j); \n\t\t\t\t\t\tif(n.getNodeType() == Node.ELEMENT_NODE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tElement name3 = (Element) n;\n\t\t\t\t\t\t\ta = name3.getTextContent();\n\t\t\t\t\t\t\tlist1.add(a);\n\t\t\t\t\t\t\tSystem.out.println(a);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tHelperClass toolIdMap = new HelperClass();\n\t\ttoolIdMap.setKey(id);\n\t\ttoolIdMap.setTools(list1);\n\t\treturn toolIdMap;\n\n\t}", "public static GetVehicleInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPageResponse object =\n new GetVehicleInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public boolean writeToDeviceFile(Device dev) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element device = doc.createElement(\"Device\");\n rootElement.appendChild(device);\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(dev.getDeviceID()));\n device.appendChild(id);\n Element names = doc.createElement(\"Names\");\n device.appendChild(names);\n\n for (Map.Entry<Locale, String> entry : dev.getDeviceNames().entrySet()) {\n Element name = doc.createElement(\"Name\");\n Element locale = doc.createElement(\"Locale\");\n Element nameStr = doc.createElement(\"Value\");\n\n locale.appendChild(doc.createTextNode(entry.getKey().toString()));\n nameStr.appendChild(doc.createTextNode(entry.getValue()));\n\n name.appendChild(locale);\n name.appendChild(nameStr);\n names.appendChild(name);\n }\n\n Element type = doc.createElement(\"Type\");\n type.appendChild(doc.createTextNode(dev.getType()));\n device.appendChild(type);\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(dev.getImgName()));\n device.appendChild(image);\n Element capabilities = doc.createElement(\"Capabilities\");\n device.appendChild(capabilities);\n\n for (int j = 0; j < dev.getCapabilities().size(); j++) {\n Element cap = doc.createElement(\"capability\");\n cap.appendChild(doc.createTextNode(dev.getCapabilities().get(j).getCapID()));\n capabilities.appendChild(cap);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.DEV_FILE_DIR + dev.getDeviceID() + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n return true;\n\n } catch (ParserConfigurationException | TransformerException pce) {\n return false;\n }\n }", "public interface XML_Reader {\n /**\n * The enum Tags to read from XML file. Covers all Concrete Classes that are broken up into sections\n */\n public enum Tags_To_Read {\n //Login Tags\n Account_Name, Password,\n //Medical Tags\n Bags, Urine, Hydration, WellBeing, Location, Entry_Time, Medical_State,\n //Account Tags\n Gamification, Notification, State, Name, Last_Daily_Review_Date, Last_Export_Date,\n //Tags used for multiple entries retrieved, for use when getting last 24hours or all data to export. The number of entries will be recorded and returned the Map\n //Under the Key \"Entries\". This is for the Medical Data Only currently due to functionality.\n Last_Entry, Daily_Data, Export_Data,\n //Tag for number of entries returned with the medical reader\n Entries_Retrieved,\n\n }\n\n /**\n * Public Method Call to read information specified in the file linked to the XMLPullParser and return results as\n * String pairs in a Map object\n *\n * @param xmlPullParser Represents the XML Reader Object used to read users data file stored on the device\n * @param tags the tags to read from the XML file specified\n * @param account_Name Name of the account for login purposes, Set to Null if not using Login_Reader Functionality\n * @return a Map with string pair values, with Tag name attached to the value read in, if empty it will be \"\";\n * @throws NullPointerException if XmlPullParser Object is Null, No Tags Given, or account_Name Null\n * @throws XML_Reader_Exception if an XMLPullParserException or IOException occurs when trying to read and parse\n * the login data file\n */\n\n Map<String, String> Read_File(XmlPullParser xmlPullParser, List<Tags_To_Read> tags, String account_Name) throws NullPointerException, XML_Reader_Exception;\n}" ]
[ "0.692133", "0.61544096", "0.6063664", "0.5958543", "0.5854782", "0.5764271", "0.5746824", "0.57224154", "0.571415", "0.55816907", "0.5543181", "0.5518056", "0.54996973", "0.54773265", "0.5461755", "0.5451519", "0.5450907", "0.5444173", "0.54401255", "0.54351616", "0.5411223", "0.5393788", "0.5365021", "0.5363224", "0.5342032", "0.5319189", "0.5318995", "0.53151673", "0.53114873", "0.5292627", "0.52820766", "0.52680606", "0.5242766", "0.5226794", "0.51914966", "0.51787996", "0.5142222", "0.51375765", "0.5113328", "0.51128393", "0.50998724", "0.5098864", "0.50778157", "0.50457656", "0.5043845", "0.50251436", "0.50130993", "0.50110567", "0.5004145", "0.499544", "0.4992918", "0.49669176", "0.49576855", "0.49373123", "0.49249053", "0.4917801", "0.49175483", "0.4915593", "0.4912784", "0.4910072", "0.4905889", "0.4902428", "0.48910326", "0.48806417", "0.4874946", "0.48747435", "0.48701084", "0.4861314", "0.48595673", "0.4856479", "0.48550037", "0.48550037", "0.48550037", "0.48550037", "0.48550037", "0.48550037", "0.48550037", "0.48550037", "0.48550037", "0.48531047", "0.48319504", "0.482837", "0.4825382", "0.48145095", "0.48119265", "0.4800959", "0.48000038", "0.47988588", "0.47984615", "0.4773526", "0.47729728", "0.47704116", "0.47560784", "0.4753115", "0.47527903", "0.47524744", "0.47493604", "0.47423738", "0.4739939", "0.47381112" ]
0.78988075
0
Get int value from string
private static int getIntValue(String s) { try { return Integer.parseInt(s, 16); } catch (NumberFormatException e) { e.printStackTrace(); return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getInt(String value)\r\n\t{\r\n\t\treturn getInt(value, 0);\r\n\t}", "public static int getIntegerValue(String value)\n\t{\n\t\treturn Integer.parseInt(value);\n\t}", "private static int getVal(String s) {\n int val = Integer.parseInt(s.split(\" \")[0]);\r\n return val;\r\n }", "private static int extractInt(String str) {\n\n String num = \"\";\n for (int i = 0; i < str.length(); i++) {\n if (java.lang.Character.isDigit(str.charAt(i))) num += str.charAt(i);\n }\n return (num.equals(\"\")) ? 0 : java.lang.Integer.parseInt(num);\n\n }", "public int getNumber(String s) {\n String snum = s.substring(1,s.length()-1);\n return Integer.parseInt(snum);\n }", "private int getInt(String next) {\n\t\ttry {\n\t\t\tint a = Integer.parseInt(next);\n\t\t\tif (a > 10) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn a;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn 0;\n\t\t}\n\t}", "public static int toInt(String str){\r\n\t\tInteger i = toInteger(str);\r\n\t\treturn i==null?0:i;\r\n\t}", "static int getNumberFromString(String s) {\n if (s == null) {\n throw new NumberFormatException(\"null\");\n }\n int result = 0;\n int startIndex = 0;\n int length = s.length();\n boolean negative = false;\n char firstChar = s.charAt(0);\n if (firstChar == '-') {\n negative = true;\n startIndex = 1;\n }\n\n for (int i = startIndex; i < length; i++) {\n char num = s.charAt(i);\n result = result * 10 + num - '0';\n }\n\n return negative ? -result : result;\n }", "public static int parseInt(String value)\n\t{\n\t\treturn value.matches(\"-?\\\\d+\") ? Integer.parseInt(value) : 0;\n\t}", "private static int i(String s) {\n return Integer.parseInt(s);\n }", "public int parseNumber(String str) {\r\n \r\n try {\r\n int i = Integer.parseInt(str);\r\n return i;\r\n } catch (Exception e) {\r\n \r\n }\r\n \r\n return 0;\r\n }", "protected static Integer getIntegerString(String string) {\n Integer i;\n try {\n i = Integer.parseInt(string);\n } catch(Exception e) {\n return null;\n }\n\n return i;\n }", "public static Integer getIntegerFromString(String value) {\n\n if (value == null) {\n return null;\n }\n\n Integer intVal = null;\n\n try {\n intVal = Integer.parseInt(value);\n } catch (RuntimeException exc) {\n // could not parse into int, null will be returned\n }\n return intVal;\n }", "public static int getInt() throws IOException {\n\t\nString s = getString();\nreturn Integer.parseInt(s);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Returns the integer in the string as an Int.\n\t\n}", "private static int parseInt(String s) {\n int value;\n try {\n value = Integer.parseInt(s);\n } catch (NumberFormatException e) {\n value = 0;\n }\n return value;\n }", "public static int stringToInt(String numb) {\r\n\t\tint temp = 0;\r\n\t\t\r\n\t\t//Convert the string to an int. Set it to a value of zero if not a number.\r\n\t\ttry {\r\n\t\t\ttemp = Integer.parseInt(numb);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\ttemp = 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn temp;\r\n\t}", "static int convertToInt(String s){\n\n int value = -1;\n\n try{\n value = Integer.parseInt(s);\n return value;\n }\n catch(NumberFormatException e) {\n return value;\n }\n catch(NullPointerException e) {\n return value;\n }\n }", "public int extractInt(String s) {\n String pattern = \"(\\\\d+)\";\n //Create a Pattern object\n Pattern r = Pattern.compile(pattern);\n //Look for a match\n Matcher m = r.matcher(s);\n if (m.find( )) {\n Log.i(\"REGEX\", \"Found value: \" + m.group(0));\n return Integer.parseInt(m.group(0));\n } else {\n Log.i(\"REGEX\", \"No match found.\");\n return 0;\n }\n }", "@Override\n public Integer fromString(String value) {\n if (value == null) {\n return null;\n }\n\n // Take off the spaces\n value = value.trim();\n\n // If it's 0 (Was full of spaces) return 0\n if (value.length() < 1) {\n return null;\n }\n int valueConverted = 0;\n try {\n valueConverted = Integer.valueOf(value);\n } catch (NumberFormatException e) {\n System.err.println(\"[ERROR-INFO (IntegerString Converter)] - \" + e);\n }\n return valueConverted;\n }", "public static int m2197ao(String str) {\n try {\n return Integer.valueOf(str).intValue();\n } catch (Exception e) {\n return -1;\n }\n }", "public static int convertStringToValue(String value) {\n\t\treturn Integer.valueOf(value);\n\t}", "public static int parseInt(String s){\r\n int v=-1;\r\n try{\r\n v = Integer.parseInt(s);\r\n }catch(NumberFormatException e){\r\n \r\n }\r\n return v;\r\n }", "public static int getInt() throws IOException {\n String s = getString();\n return Integer.parseInt(s);\n }", "public static int getInt() throws IOException {\r\n String s = getString();\r\n return Integer.parseInt(s);\r\n }", "@Override\r\n\tpublic int getInt(String string) {\n\t\treturn 0;\r\n\t}", "private static Integer parseIntString( String valueString ) {\n return Integer.parseInt( valueString.replaceAll( \"[^0-9]\", \"\" ) );\n }", "public static int parseInt(String s) {\r\n // s consists of digit characters.\r\n // For example, if s is \"125\", the return value\r\n // should be 125.\r\n return Integer.parseInt(s);\r\n\r\n }", "public static int StringToInt(String StringValue){\n Integer integer;\n integer = Integer.valueOf(StringValue);\n return integer.intValue();\n }", "@Override\n\t\tpublic Integer convert(String s) {\n\t\t\treturn Integer.parseInt(s);\n\t\t}", "public int getInteger(String key) {\r\n try {\r\n return Integer.decode(getString(key)).intValue();\r\n }\r\n catch (Exception e) {\r\n return 0;\r\n }\r\n }", "String getInt();", "public static int parseInt(String string) {\n return (int) Double.parseDouble(string);\n }", "private int extractInt() {\n\t\tint startIndex = index;\n\t\tfor (; index < exprLen; index++) {\n\t\t\tchar c = expr.charAt(index);\n\t\t\tif (!Character.isDigit(c)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tint endIndex = index;\n\t\tint value;\n\t\ttry {\n\t\t\tvalue = Integer.parseInt(expr.substring(startIndex, endIndex));\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(e.getMessage());\n\t\t}\n\n\t\treturn value;\n\t}", "public static int parseInt(String S1){\n return Integer.parseInt(S1);\n }", "public Integer tryIntParsing(String s) {\n try {\n int parsedInt = Integer.parseInt(s);\n return parsedInt;\n } catch (NumberFormatException e) {\n return 0;\n }\n }", "public static int get(String s) {\n int buffer = map.get(s);\n return (int) buffer;\n }", "public int myAtoi(String str) {\n\t\tboolean isStarted = false;\n\t\tint startPos = str.length();\n\t\tint endPos = str.length();\n\t\tif (str == null || str.length() == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tchar[] s = str.toCharArray();\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (s[i] == ' ') {\n\t\t\t\tif (!isStarted) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tendPos = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isValidNumber(s[i])) {\n\t\t\t\tif (!isStarted) {\n\t\t\t\t\tisStarted = true;\n\t\t\t\t\tstartPos = i;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (isValidChar(i, s[i], str)) {\n\t\t\t\tisStarted = true;\n\t\t\t\tstartPos = i;\n\t\t\t} else {\n\t\t\t\tif (!isStarted) {\n\t\t\t\t\treturn 0;\n\t\t\t\t} else {\n\t\t\t\t\tendPos = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tString valueStr = str.substring(startPos, endPos);\n\t\tvalueStr = (valueStr.equals(\"+\") || valueStr.equals(\"-\") || valueStr.isEmpty()) ? \"0\" : valueStr;\n\t\treturn filterOverflow(Double.valueOf(valueStr));\n\t}", "static Integer stringToInt(String s){\n int result = 0;\n for(int i = 0; i < s.length(); i++){\n //If the character is not a digit\n if(!Character.isDigit(s.charAt(i))){\n return null;\n }\n //Otherwise convert the digit to a number and add it to result\n result += (s.charAt(i) - '0') * Math.pow(10, s.length()-1-i);\n }\n return result;\n }", "public static int atoi(String s)\n {\n return (int) atol(s);\n }", "private int strToInt(String str) {\n\t\tif (str.equals(\"\")) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Integer.parseInt(str);\n\t}", "public static int stringToInt(Object val) {\n String intStr = String.valueOf(val);\n return Integer.parseInt(intStr);\n }", "public int toInt(){\n\t\tString s = txt().trim();\n\t\tint i;\n\t\ttry{\n\t\t\ti = Integer.parseInt(s);\n\t\t}catch(NumberFormatException exp){\n\t\t\texp.printStackTrace();\n\t\t\treturn 0;\n\t\t}\n\t\treturn i;\t\n\t}", "public Integer fromString(String s) {\n if (s == null || s.trim().length() == 0)\n return 0;\n try {\n return Integer.parseInt(s);\n }\n catch (NumberFormatException e) {\n return null;\n }\n }", "public final int getInt(final String tagToGet) {\n try {\n return Integer.parseInt(getStr(tagToGet));\n } catch (final Exception t) {\n return 0;\n }\n }", "static int getValue(String str, int i, int m) {\n\t\tif (i + m > str.length()) {\n\t\t\treturn -1;\n\t\t}\n\n\t\t// Find value at index i and length m.\n\t\tint value = 0;\n\t\tfor (int j = 0; j < m; j++) {\n\t\t\tint c = str.charAt(i + j) - '0';\n\t\t\tif (c < 0 || c > 9) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tvalue = value * 10 + c;\n\t\t}\n\t\treturn value;\n\t}", "public int myAtoi(String str) {\n\n\t\t// 去除前后空格\n\t\tstr = str.trim();\n\n\t\tif (str.equals(\"\"))\n\t\t\treturn 0;\n\n\t\tString s = \"\";\n\t\tint symbol = -1;\n\n\t\tfor (int i = 0, j = 0; i < 12 && i < str.length(); i++) {\n\n\t\t\tif (i == 0) {\n\t\t\t\tchar ch = str.charAt(i);\n\n\t\t\t\tif (str.charAt(i) > '9' || str.charAt(i) < '0')\n\t\t\t\t\tif (str.charAt(i) != '+' && str.charAt(i) != '-')\n\t\t\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (i > 1 && s.equals(\"\"))\n\t\t\t\treturn 0;\n\n\t\t\tif (str.charAt(i) <= '9' && str.charAt(i) >= '0') {\n\t\t\t\ts += str.charAt(i);\n\t\t\t\tif (symbol < 0)\n\t\t\t\t\tsymbol = i;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (i > j)\n\t\t\t\tbreak;\n\t\t\tj++;\n\t\t}\n\n\t\tif (s.equals(\"\"))\n\t\t\treturn 0;\n\n\t\tif (symbol > 0 && str.charAt(symbol - 1) == '-') {\n\t\t\ts = \"-\" + s;\n\t\t\tif (s.length() > 11 || Long.parseLong(s) <= Integer.MIN_VALUE)\n\t\t\t\treturn Integer.MIN_VALUE;\n\t\t\telse\n\t\t\t\treturn Integer.parseInt(s);\n\t\t}\n\n\t\tif (s.length() > 10 || Long.parseLong(s) >= Integer.MAX_VALUE) {\n\t\t\treturn Integer.MAX_VALUE;\n\t\t}\n\n\t\treturn Integer.parseInt(s);\n\t}", "public int getIntValue2(String b) {\n int c = Integer.parseInt(b);\n return c;\n }", "private static int parseInteger(String s, int index)\n\t{\n\t\tString temp = \"\";\n\t\tint i = index;\n\t\twhile (Character.isDigit(s.charAt(i)))\n\t\t{\n\t\t\ttemp += s.charAt(i++);\n\t\t}\n\t\treturn Integer.parseInt(temp);\n\t}", "int toInt(String a){\n\t\tint name=0;\r\n\t\tfor(int i=0;i<a.length();i++){\r\n\t\t\tname+=(int)a.charAt(i);\r\n\t\t}\r\n\t\treturn name;\r\n\t}", "public static int parseInt(final CharSequence s)\n {\n // no string\n if (s == null)\n {\n throw new NumberFormatException(\"null\");\n }\n\n // determine length\n final int length = s.length();\n\n if (length == 0)\n {\n throw new NumberFormatException(\"length = 0\");\n }\n\n // that is safe, we already know that we are > 0\n final int digit = s.charAt(0);\n\n // turn the compare around to allow the compiler and cpu\n // to run the next code most of the time\n if (digit < '0' || digit > '9')\n {\n return Integer.parseInt(s.toString());\n }\n\n int value = digit - DIGITOFFSET;\n\n for (int i = 1; i < length; i++)\n {\n final int d = s.charAt(i);\n if (d < '0' || d > '9')\n {\n throw new NumberFormatException(\"Not an int \" + s.toString());\n }\n\n value = ((value << 3) + (value << 1));\n value += (d - DIGITOFFSET);\n }\n\n return value;\n }", "@Override\n public int strToInt(String source) {\n try {\n return Integer.parseInt(source);\n } catch (NumberFormatException nfe) {\n return 0;\n }\n }", "public static Integer parseInt(String s){\n\t\ttry{\n\t\t\treturn Integer.parseInt(s);\n\t\t}catch(NumberFormatException e){\n\t\t\treturn null;\n\t\t}\n\t}", "private int convertInteger(String val)\n\t{\n\t\tint value = 0;\n\t\ttry {\n\t\t\tvalue = Integer.parseInt(val);\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\tSystem.err.print(\"\");\n\t\t}\n\t\treturn value;\n\t}", "private int getValueAsInteger(String valueToBeReturnAsInteger) {\n\t\t\n\t\tint defaultValue = 0;\n\t\t\n\t\ttry {\n\t\t\tif(null != valueToBeReturnAsInteger && StringUtils.isNotBlank(valueToBeReturnAsInteger)) {\n\t\t\t\tdefaultValue = Integer.parseInt(valueToBeReturnAsInteger);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"Error in parsing the String value to Integer for[{}]\", valueToBeReturnAsInteger);\n\t\t}\n\t\t\n\t\treturn defaultValue;\n\t}", "public int convertStringToInt(String value) throws NumberFormatException, IOException {\n\t\t\t\ttry {\n\t\t\t\t return Integer.parseInt(value);\n\t\t\t\t } catch(NumberFormatException e) {\n\t\t\t\t \tfileWriterPrinter(\"NullPointerException:\\nString '\" + value + \"is not convertable to Integer...\");\n\t\t\t\t \treturn 0;\n\t\t\t\t }\n\t\t\t\t}", "public static int getValue(String string){\n for (ItemAttributeEnum item : ItemAttributeEnum.values()) {\n if (string.equals(item.toString())){\n return item.intValue;\n }\n }\n return -1;\n }", "public int getInt(String name)\r\n throws NumberFormatException\r\n {\r\n return Integer.parseInt(getString(name));\r\n }", "public static Integer stringToInteger(String s) {\n\t Integer ret = null;\n\t if (!Controleur.isVide(s))\n\t try {\n ret = Integer.valueOf(s);\n } catch (NumberFormatException e) {\n }\n\t\treturn ret;\n\t}", "public static int strToInt(String str) {\n\t\tint i = 0;\r\n\t\tint num = 0;\r\n\t\tboolean isNeg = false;\r\n\r\n\t\t//Check for negative sign; if it's there, set the isNeg flag \r\n\t\tif (str.charAt(0) == '-') {\r\n\t\t\tisNeg = true;\r\n\t\t\ti = 1;\r\n\t\t}\r\n\r\n\t\t//Process each character of the string; \r\n\t\twhile (i < str.length()) {\r\n\t\t\tnum *= 10;\r\n\t\t\tnum += str.charAt(i++) - '0'; //Minus the ASCII code of '0' to get the value of the charAt(i++).\r\n\t\t}\r\n\r\n\t\tif (isNeg) num = -num;\r\n\t\treturn num;\r\n\t}", "public static Integer tryParseToInt(String str) {\n\t\ttry {\n\t\treturn Integer.parseInt(str);\t\n\t\t}\t\n\t\tcatch(NumberFormatException e) {\n\t\t\treturn null;\n\t\t}\n\t\t}", "public static int findNumber(String s) {\r\n if (s==null) {\r\n return -1;\r\n }\r\n char[] str=s.toCharArray();\r\n int first=0;\r\n int last;\r\n while (first<str.length && !Character.isDigit(str[first])) {\r\n first++;\r\n }\r\n last=first;\r\n while (last<str.length && Character.isDigit(str[last])) {\r\n last++;\r\n }\r\n if (first<str.length) {\r\n String resStr=s.substring(first,last);\r\n return Integer.parseInt(resStr);\r\n }\r\n return -1;\r\n }", "public static int convert(String entry) throws InvalidInputException {\r\n\r\n\t\ttry {\r\n\t\t\tint x = Integer.parseInt(entry);\r\n\t\t\treturn x;\r\n\t\t}catch(NumberFormatException nf) {\r\n\t\t\tthrow new InvalidInputException(\"The input is not an integer\");\r\n\t\t}\r\n\t\t\r\n\t}", "public static int convertToInt(String number) {\n try {\n return Integer.parseInt(number);\n } catch (Exception e) {\n e.printStackTrace();\n return 0;\n }\n }", "protected static final int m2866a(XmlPullParser xmlPullParser, String str) {\n String attributeValue = xmlPullParser.getAttributeValue(null, str);\n if (attributeValue == null) {\n return -1;\n }\n try {\n return Integer.parseInt(attributeValue);\n } catch (NumberFormatException e) {\n throw new ako(e);\n }\n }", "public Integer toInt(String lex) {\r\n\t\tInteger i=-1;\r\n\t\ttry{\r\n\t\t\ti=Integer.parseInt(lex);\r\n\t\t}catch(NumberFormatException e){\r\n\t\t\tSystem.err.println(\"error, numero demasiado largo\");\r\n\t\t}\r\n\t\treturn i;\r\n\t}", "public static int parseInt(String value) throws ServiceException {\n OMUtil.nullCheck(value);\n\n try {\n return Integer.parseInt(value);\n } catch (NumberFormatException ex) {\n throw new ServiceException(ServiceStatus.MALFORMED_REQUEST);\n }\n }", "private int priorityStringToInt(String string) {\n // Convert the priority of the editText from letters to a single digit\n switch (string) {\n case \"High Priority\":\n return 0;\n case \"Medium Priority\":\n return 1;\n case \"Low Priority\":\n return 2;\n default:\n return -1;\n }\n }", "public static int getInt (String ask)\r\n {\r\n boolean badInput = false;\r\n String input = new String(\"\");\r\n int value = 0;\r\n do {\r\n badInput = false;\r\n input = getString(ask);\r\n try {\r\n value = Integer.parseInt(input);\r\n }\r\n catch(NumberFormatException e){\r\n badInput = true;\r\n }\r\n }while(badInput);\r\n return value;\r\n }", "static Integer parseInteger(String s) {\n try {\n return Integer.parseInt(s);\n } catch (NumberFormatException e) {\n return null;\n }\n }", "static int stringToNumber(String value)throws IllegalArgumentException{\r\n\t\tif (!isNumber(value))\r\n\t\t\tthrow new IllegalArgumentException(\"This is not a number!\");\r\n\t\tint number = 0;\r\n\t\tfor (int i = 0; i < value.length(); i++)\r\n\t\t\tnumber += (value.charAt(i)-48)* Math.pow(10, value.length()-1-i);\r\n\t\treturn number;\r\n\t}", "public int stringIntegerEncoding(String str) {\n if (!str.matches(\"[0-9-]+\"))\n return -1;\n\n char[] strArr = str.toCharArray();\n int number = (strArr[0] != '-') ? Character.getNumericValue(strArr[0]) : 0;\n for (int i =1; i < strArr.length; i++) {\n number = 10*number + Character.getNumericValue(strArr[i]);\n }\n return (strArr[0] == '-')? -number : number;\n }", "public int stringToInt(String bytesStr) {\r\n int result = 0;\r\n for(char b : bytesStr.toCharArray())\r\n result = (result << 8) + (int)b;\r\n return result;\r\n }", "public int parseInt()\r\n {\r\n String str = feed.findWithinHorizon( INTEGER_PATTERN, 0 );\r\n \r\n if( str == null )\r\n throw new NumberFormatException( \"[Line \" + lineNum + \"] Input did not match an integer\" );\r\n else if( str.length() == 0 )\r\n throw new NumberFormatException( \"Input did not match an integer\" );\r\n \r\n return Integer.parseInt( str );\r\n }", "private int getNumberFromString(String text){\n\t\t\n\t\tint result = 0;\n\t\t\n\t\tfor(int i=text.length() - 1, j=0; i >= 0 ; i--, j++){\n\t\t\t\n\t\t\tresult += (Character.getNumericValue(text.charAt(i))) * Math.pow(10, j);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static int iVal( String psNum ) {\n return iVal( psNum, 0 );\n }", "public static int readInt() {\n return Integer.parseInt(readString());\n }", "public static int parseInt(String val) {\n\n\t\tif (val == null) {\n\t\t\tval = \"0\";\n\t\t}\n\n\t\tint ret = 0;\n\n\t\ttry {\n\t\t\tret = Integer.parseInt(val);\n\t\t} catch (NumberFormatException e) {\n\t\t}\n\n\t\treturn ret;\n\t}", "public int Converter(String string)\r\n {\r\n if(string.equals(\"0\"))\r\n return 0;\r\n else\r\n if(string.equals(\"1\"))\r\n return 1;\r\n else if(string.equals(\"2\"))\r\n {\r\n return 2;\r\n }else if(string.equals(\"3\"))\r\n {\r\n return 3;\r\n }else if(string.equals(\"4\"))\r\n {\r\n return 4;\r\n }\r\n \r\n return 1;\r\n }", "@Override\n\tpublic int func1(String s) {\n\t\tfor(int i=0; i<=s.length()-1; i++) {\n\t\t\tif(s.charAt(i)>=48 && s.charAt(i)<=57) {\n\t\t\t\treturn Integer.parseInt(\"\"+s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "private int extractNumberFromText(String value) {\n\t\tif(!value.isEmpty()) {\n\t\t\tString[] token = value.split(\";\");\n\t\t\tString number = token[0].trim();\n\t\t\treturn Integer.valueOf(number);\n\t\t}\n\t\treturn 0;\n\t}", "public static int StringToInt(String s, int defaultValue) {\n\t\tboolean negative=false;\n\t\tif (s.length()==0){\n\t\t\treturn defaultValue;\n\t\t}\n\t\tif (s.substring(0,1).equals(\"-\")){\n\t\t\ts= s.substring(1);\n\t\t\tnegative=true;\n\t\t}\n\t\tif(Is.anInteger(s)){\n\t\t\tint num=0;\n\t\t\tfor(int i=0; i<s.length(); i++){\n\t\t\t\tString l=s.substring(i, i+1);\n\t\t\t\tint digit=Constants.DIGITS.indexOf(l);\n\t\t\t\tnum= num*10;\n\t\t\t\tnum=num+digit;\n\t\t\t}\n\t\t\tif (negative){\n\t\t\t\treturn -num;\n\t\t\t}\n\t\t\treturn num;\n\t\t} \n\t\treturn defaultValue;\n\t}", "private int toInt(String binary){\n if (bitToInt(binary.charAt(0)) == 0){\n return positiveBinToInt(binary);\n }\n else{\n return negativeBinaryToInt(binary);\n }\n }", "public static int readInt(){\n\t\tSystem.out.println();\n\t\tstringInput = readInput();\n\t\ttry{\n\t\t\tintInput = Integer.parseInt(stringInput);\n\t\t}\n\t\tcatch (NumberFormatException ex) {\n\t\t System.err.println(\"Not a valid number: \" + stringInput);\n\t\t}\n\t\treturn intInput; \t\t\n\t}", "public static int parseInt(String s){\r\n\t\tint a =0;\r\n\t\ttry {\r\n\t\t a = Integer.parseInt(s);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t System.out.println(\"To use this function you have to enter string that is a number, otherwise it will return 0.\");\r\n\t\t}\r\n\t\treturn a;\r\n\t}", "static Value<Integer> parseInteger(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Integer.parseInt(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }", "public static int getIntegerFromString(String value, int defaultValue) {\n Integer result = getIntegerFromString(value);\n return result == null ? defaultValue : result.intValue();\n }", "private int parseAccountOrNum(String name) {\n \tint rtn;\n if (name.charAt(0) >= '0' && name.charAt(0) <= '9') {\n rtn = new Integer(name).intValue();\n }\n else {\n \trtn = parseAccount(name).readCache();\n }\n return rtn;\n }", "public static int getInt(String key, int i) {\n\t\tString token = getSystemString(key);\n\t\tif (token == null) {\n\t\t\treturn i;\n\t\t}\n\t\treturn Integer.parseInt(token);\n\t}", "public GdbIntValue parseInteger() throws GdbParseError {\n\t\ttry {\n\t\t\tString match = match(INT_HEX, true, \"hex\");\n\t\t\treturn GdbIntValue.valueOf(new BigInteger(match, 16));\n\t\t}\n\t\tcatch (GdbParseError e) {\n\t\t\t// Just try next match\n\t\t}\n\t\ttry {\n\t\t\tString match = match(INT_OCT, true, \"oct\");\n\t\t\treturn GdbIntValue.valueOf(new BigInteger(match, 8));\n\t\t}\n\t\tcatch (GdbParseError e) {\n\t\t\t// Just try next match\n\t\t}\n\t\ttry {\n\t\t\tString match = match(INT_DEC, true, \"dec\");\n\t\t\treturn GdbIntValue.valueOf(new BigInteger(match, 10));\n\t\t}\n\t\tcatch (GdbParseError e) {\n\t\t\t// Fall through to error report\n\t\t}\n\n\t\tthrow new GdbParseError(\"0x[hex], 0[oct], or [dec]\", buf);\n\t}", "private int convertStringToInt(String stringToConvert) throws InvalidFileException {\r\n int convertedInteger = -1;\r\n\r\n try {\r\n convertedInteger = Integer.parseInt(stringToConvert);\r\n } catch (NumberFormatException e) {\r\n throw new InvalidFileException();\r\n }\r\n\r\n return convertedInteger;\r\n }", "int toInteger(String value) {\n value = value.trim();\n if (\"9999\".equals(value)) value = \"\";\n return (!\"\".equals(value)\n ? new Integer(value).intValue()\n : Tables.INTNULL);\n }", "private int safeStringToInt(String str) {\n\t\tif(stringIsNumeric(str)) {\n\t\t\tif(str.length() > 10) {\n\t\t\t\tstr = str.substring(0, 10);\n\t\t\t}\n\n\t\t\tif(Double.parseDouble(str) > Integer.MAX_VALUE) {\n\t\t\t\treturn Integer.MAX_VALUE - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Integer.parseInt(str);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int getInt(String str){\n int num=0;\n int count = 0;\n if (str.length() == 7)\n return 0;\n for (int i = str.length()-8; i >= 0; i --){\n if (str.charAt(i) == '1') {\n num += Math.pow(2, count);\n }\n count ++;\n }\n return num;\n }", "public int getInt(String name) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Integer value required, but not specified\");\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).intValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Integer.parseInt((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Integer value required, but found: \" + val);\n\t\t}\n\t}", "static int numberFrom(String s) throws NumberFormatException {\n return Integer.parseInt(s.replaceAll(\"[,+\\\\s+]\", EMPTY));\n }", "public static int validInt(String position) {\n try {\n return Integer.parseInt(position);\n } catch (NumberFormatException e) {\n return -1;\n }\n }", "public int convertToInt(String i) {\n\t\tswitch (i) {\n\t\t\tcase \".\": return 0;\n\t\t\tcase \"1\": return 1;\n\t\t\tcase \"2\": return 2;\n\t\t\tcase \"3\": return 3;\n\t\t\tcase \"4\": return 4;\n\t\t\tcase \"5\": return 5;\n\t\t\tcase \"6\": return 6;\n\t\t\tcase \"7\": return 7;\n\t\t\tcase \"8\": return 8;\n\t\t\tcase \"9\": return 9;\n\t\t\tcase \"A\": return 10;\n\t\t\tcase \"B\": return 11;\n\t\t\tcase \"C\": return 12;\n\t\t\tcase \"D\": return 13;\n\t\t\tcase \"E\": return 14;\n\t\t\tcase \"F\": return 15;\n\t\t\tcase \"G\": return 16;\n\t\t\tcase \"H\": return 17;\n\t\t\tcase \"I\": return 18;\n\t\t\tcase \"J\": return 19;\n\t\t\tcase \"K\": return 20;\n\t\t\tcase \"L\": return 21;\n\t\t\tcase \"M\": return 22;\n\t\t\tcase \"N\": return 23;\n\t\t\tcase \"O\": return 24;\n\t\t\tcase \"P\": return 25;\n\t\t\tcase \"Q\": return 26;\n\t\t\tcase \"R\": return 27;\n\t\t\tcase \"S\": return 28;\n\t\t\tcase \"T\": return 29;\n\t\t\tcase \"U\": return 30;\n\t\t\tcase \"V\": return 31;\n\t\t\tcase \"W\": return 32;\n\t\t\tcase \"X\": return 33;\n\t\t\tcase \"Y\": return 34;\n\t\t\tcase \"Z\": return 35;\n\t\t\tdefault: System.out.println(\"The number is too high.\");\n\t\t\t return 9000;\n\t\t}\n }", "protected static final int m2868b(XmlPullParser xmlPullParser, String str) {\n String attributeValue = xmlPullParser.getAttributeValue(null, str);\n if (attributeValue != null) {\n try {\n return Integer.parseInt(attributeValue);\n } catch (NumberFormatException e) {\n throw new ako(e);\n }\n } else {\n throw new bdc(str);\n }\n }", "public Number fromString(String s){\n\n return 0;\n }", "public int toInt(String entity) { return ent_2_i.get(entity); }" ]
[ "0.76485646", "0.7608392", "0.7583918", "0.74504346", "0.740773", "0.73990566", "0.73798066", "0.7364666", "0.73107964", "0.7302424", "0.7257764", "0.72256935", "0.7220696", "0.7203293", "0.72024745", "0.71874446", "0.7180335", "0.717682", "0.71567494", "0.71315444", "0.7124208", "0.71227646", "0.7112717", "0.7099919", "0.7080752", "0.7015592", "0.70151675", "0.69897586", "0.69787395", "0.69701993", "0.69621426", "0.69588083", "0.69561076", "0.6955068", "0.694631", "0.69372636", "0.69271165", "0.692192", "0.6906846", "0.6896791", "0.68838805", "0.68825006", "0.6867703", "0.686461", "0.686371", "0.6835376", "0.683307", "0.68235576", "0.6804227", "0.67908555", "0.6781827", "0.67788994", "0.6777698", "0.67573154", "0.67462105", "0.6744312", "0.6740822", "0.6731279", "0.6730093", "0.6717795", "0.66985965", "0.669716", "0.66752666", "0.66733825", "0.66669005", "0.6663522", "0.6662416", "0.6621111", "0.6618582", "0.6616195", "0.66132766", "0.6611749", "0.660468", "0.6603702", "0.6593579", "0.6592787", "0.65911853", "0.6590023", "0.65843856", "0.65788585", "0.6573869", "0.65717816", "0.65611774", "0.65556437", "0.655561", "0.655288", "0.6546283", "0.65433717", "0.65427715", "0.6539465", "0.6536754", "0.6532508", "0.6529695", "0.65200996", "0.6519657", "0.6507763", "0.6499615", "0.6498167", "0.64942074", "0.64835167" ]
0.7569263
3
a dummy constructor for configuaration use
public DeviceData() { this.rtAddress = 0; this.subAddress = 0; this.txRx = 0; this.data = new short[32]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Reproducible newInstance();", "defaultConstructor(){}", "private Instantiation(){}", "private Config() {\n }", "void DefaultConstructor(){}", "private OptimoveConfig() {\n }", "private Conf() {\n // empty hidden constructor\n }", "public Constructor(){\n\t\t\n\t}", "private OspfConfigUtil() {\n\n }", "Constructor() {\r\n\t\t \r\n\t }", "private ConfigHelper() {\n //does nothing\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public ConfigExample() {\n }", "public CyanSus() {\n\n }", "private MApi() {}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private Default()\n {}", "public SgaexpedbultoImpl()\n {\n }", "private Rekenhulp()\n\t{\n\t}", "public MecBasicsConfig()\n {\n\n }", "public Pitonyak_09_02() {\r\n }", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "protected Configuration() {\r\n }", "private void __sep__Constructors__() {}", "private Marinator() {\n }", "private Marinator() {\n }", "public PSRelation()\n {\n }", "public Clade() {}", "public Basic() {}", "private PerksFactory() {\n\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private StickFactory() {\n\t}", "public Spec__1() {\n }", "public ConfigParserHandler() {\n\t}", "protected abstract void construct();", "public Curso() {\r\n }", "public ObjectFactory() {\n\t}", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}", "private SingleObject()\r\n {\r\n }", "public Pasien() {\r\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "public ObjectFactory() {\r\n\t}", "private Settings() { }", "private Cat() {\n\t\t\n\t}", "private ConfigProperties() {\n\n }", "public Generic(){\n\t\tthis(null);\n\t}", "private GameConfig() {}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "public JsonFactory() { this(null); }", "private Settings()\n {}", "private TMCourse() {\n\t}", "private Settings() {}", "public CSSTidier() {\n\t}", "public Soil()\n\t{\n\n\t}", "private XMLUtil() {\n\t}", "private XMLUtils()\r\n\t{\r\n\t}", "public Factory() {\n\t\tsuper();\n\t}", "private UnitFactory() {\n\t}", "private Params()\n {\n }", "private FTConfigConstants() {\n }", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "private Utility() {\n\t}", "public OServerConfiguration() {}", "private GeoUtil()\n\t{\n\t}", "private WolUtil() {\n }", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "private NaturePackage() {}", "protected MoneyFactory() {\n\t}", "public lo() {}", "private SIModule(){}", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "public PanoramaConfig() {\n }", "private ApiConfig() {\n }", "public Chick() {\n\t}", "public Phl() {\n }", "private ObjectFactory() { }", "public SimulationConfig() {\r\n\t}", "private ConfigurationKeys() {\n // empty constructor.\n }", "public ConfigManager() {\n // Nobody here.\n }", "@Override\n public void init() {}", "public MockClass(String arg) {\n\t}", "private Utils() {\n\t}", "private Utils() {\n\t}", "private Driver() {\n\n }", "public Lanceur() {\n\t}", "public Aanbieder() {\r\n\t\t}", "private LOCFacade() {\r\n\r\n\t}", "public SourceTypeConfiguration() {\n\n\t}", "private SingleTon() {\n\t}", "private XmlStreamFactory()\n {\n /*\n * nothing to do\n */\n }", "private BeanUtils() {\n\t\t\n\t}", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public ModuleParams()\n\t{\n\t}", "public ConfigMetadataProcessor() {\n }", "public Demo() {\n\t\t\n\t}", "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "public Produto() {}", "public MonHoc() {\n }" ]
[ "0.7592201", "0.751782", "0.74553734", "0.72575706", "0.72025824", "0.71789783", "0.7173761", "0.71597433", "0.71195924", "0.7108765", "0.7096502", "0.702992", "0.70133317", "0.69791424", "0.6978204", "0.69400686", "0.6891181", "0.68635875", "0.68477637", "0.68471277", "0.68218946", "0.6806421", "0.680528", "0.6789737", "0.678789", "0.6781929", "0.6781929", "0.6772841", "0.6768279", "0.6750842", "0.6749088", "0.6736384", "0.67335254", "0.6733475", "0.672398", "0.6713808", "0.6712327", "0.67119783", "0.6709011", "0.6693927", "0.6684427", "0.6682994", "0.6679249", "0.66766804", "0.66752595", "0.66736925", "0.667164", "0.6666493", "0.66630024", "0.66611177", "0.6654452", "0.66498864", "0.6649803", "0.66477275", "0.6645303", "0.6628456", "0.66210616", "0.66134155", "0.6607757", "0.6605294", "0.66009355", "0.6600613", "0.6595229", "0.65942156", "0.6591393", "0.65890074", "0.658837", "0.6587901", "0.65874624", "0.65856683", "0.6584902", "0.6582004", "0.6579666", "0.65729326", "0.65723187", "0.6571179", "0.6569888", "0.6565467", "0.65645486", "0.65644556", "0.6563616", "0.65628356", "0.6562657", "0.6562137", "0.65605646", "0.65605646", "0.6560552", "0.6556424", "0.65469944", "0.65457284", "0.65427697", "0.65427256", "0.6537886", "0.65339047", "0.65302414", "0.65297", "0.65282285", "0.65235966", "0.652326", "0.65170014", "0.6513829" ]
0.0
-1
this method is used to encode the message/command to TADK API format
public byte[] encode(byte command,byte action) { byte[] encoded = new byte[82]; for (int i = 0; i < 82; ++i) { encoded[i] =(byte) 0; } encoded[0] = (byte)0xaa; //signature encoded[1] = (byte)0xaa; //signature 2nd byte encoded[2] = (byte)1; //index encoded[4] = (byte)command; //command encoded[6] = (byte)action; //action encoded[8] = (byte)this.rtAddress; //rt address encoded[10]= (byte)this.txRx; //txrx encoded[12]= (byte)this.subAddress;//subaddress encoded[14]= (byte)this.data.length;//count for (int i = 0, j = 0; i < this.data.length; i++,j+=2) { encoded[18+j] =(byte) this.data[i]; encoded[19+j] =(byte) (this.data[i] >> 8); } return encoded; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String encode(Command msg)\n\t{\n\t\tString type = msg.getType();\n\t\tString sender = msg.getSender();\n\t\tString recipient = msg.getReciever()!=null ? msg.getReciever() : \" \";\n\t\tString message = msg.getMessage()!=null? msg.getMessage() : \" \";\n\t\tSystem.out.println(type + \";\" + sender + \";\" + recipient + \";\" + message);\n\t\treturn (type + \";\" + sender + \";\" + recipient + \";\" + message);\n\t}", "@Override\n\tpublic byte[] encodeMsg() {\n\t\tIoBuffer buf = IoBuffer.allocate(2048).setAutoExpand(true);\n\t\t\n\t\tbuf.put(slaveId);\n\t\tbuf.put(code);\n\t\tbuf.putShort(offset);\n\t\tbuf.putShort(data);\n\t\tbuf.flip();\n\t\t\n \tbyte[] bytes = new byte[buf.remaining()];\n \tbuf.get(bytes);\n \t\n\t\treturn bytes;\n\t}", "@Override\n\tpublic void encode() {\n\t\tbyte[] messageData = encodeStarsMessage(message);\n\t\t\n\t\t// Allocate\n byte[] res = new byte[10 + messageData.length];\n\n // Write members\n Util.write16(res, 0, unknownWord0);\n Util.write16(res, 2, unknownWord2);\n Util.write16(res, 4, senderId);\n Util.write16(res, 6, receiverId);\n Util.write16(res, 8, unknownWord8);\n \n // Copy in message data\n System.arraycopy(messageData, 0, res, 10, messageData.length);\n \n // Save as decrypted data\n setDecryptedData(res, res.length);\n\t}", "public byte[] GetPayload_Generic(int cmd, String [] data){\n // Construct payload as series of delimited strings\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n if (data.length == 0) {\n payload.add((byte)0);\n } else {\n int cc = 0;\n for(int i =0; i != data.length; i++){\n String item = data[i];\n for(int j=0; j!= item.length(); j++){\n char c = item.charAt(j);\n byte b = (byte)c;\n payload.add(b);\n }\n if (cc < data.length - 1) {\n payload.add((byte)DELIMITER);\n }\n cc = cc+ 1;\n }\n payload.add((byte)0);\n }\n\n return makeTransportPacket_Generic(payload);\n }", "private void encode(){\r\n \r\n StringBuilder sb = new StringBuilder();\r\n \r\n /*\r\n *if a character code is >126 after adding the encryption key, subtract \r\n *95 to wrap\r\n */\r\n for(int i = 0; i < message.length(); i++){\r\n if(message.charAt(i) + key > 126){\r\n int wrappedKey = message.charAt(i) + key - 95;\r\n \r\n sb.append((char) wrappedKey);\r\n \r\n /*\r\n *if a character code ins't > 126 after adding the encryption key\r\n */\r\n } else{\r\n int wrappedKey = message.charAt(i) + key;\r\n sb.append( (char) wrappedKey);\r\n }\r\n }\r\n /*\r\n *case coded message to a string\r\n */\r\n codedMessage = sb.toString();\r\n }", "@Override\n public ByteBuffer buildRequestPacket() {\n\n ByteBuffer sendData = ByteBuffer.allocate(128);\n sendData.putLong(this.connectionId); // connection_id - can't change (64 bits)\n sendData.putInt(getActionNumber()); // action we want to perform - connecting with the server (32 bits)\n sendData.putInt(getTransactionId()); // transaction_id - random int we make (32 bits)\n\n return sendData;\n }", "public byte [] GetPayload_Generic(int cmd ) {\n // Construct payload as series of delimited strings\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n payload.add((byte)0);\n return makeTransportPacket_Generic(payload);\n }", "@Override\n public String toEncodedString() {\n int completeBinary = 0;\n if (this.isComplete) {\n completeBinary = 1;\n }\n return \"D\" + \" | \" + completeBinary + \" | \" + this.taskDetails + \" | \"\n + this.date.format(inputDateFormat);\n }", "@Override\n protected void encode(ChannelHandlerContext channelHandlerContext, RequestMessage msg, ByteBuf out) throws Exception {\n byte[] bytes = REQUEST_MESSAGE_CODEC.encode(msg);\n out.writeBytes(REQUEST_HEADER);\n out.writeBytes(Integer.toString(bytes.length).getBytes(StandardCharsets.US_ASCII));\n out.writeBytes(CRLF);\n out.writeBytes(bytes);\n }", "void encode(ByteBuffer buffer, Message message);", "public byte[] GetPayload(int cmd, String [] data){\n // Construct payload as series of delimited strings\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n if (data.length == 0) {\n payload.add((byte)0);\n } else {\n int cc = 0;\n for(int i =0; i != data.length; i++){\n String item = data[i];\n for(int j=0; j!= item.length(); j++){\n char c = item.charAt(j);\n byte b = (byte)c;\n payload.add(b);\n }\n if (cc < data.length - 1) {\n payload.add((byte)DELIMITER);\n }\n cc = cc+ 1;\n }\n payload.add((byte)0);\n }\n\n return makeTransportPacket(payload);\n }", "public final void a(int i, int i2, int i3, String str, q qVar, byte[] bArr) {\n AppMethodBeat.i(109251);\n ab.d(TAG, \"netId : \" + i + \" errType :\" + i2 + \" errCode: \" + i3 + \" errMsg :\" + str);\n f fVar;\n if (i2 == 0 && i3 == 0) {\n com.tencent.mm.bt.a acA = this.ehh.acA();\n v vVar;\n if (acA == null) {\n vVar = new v(\"null cannot be cast to non-null type com.tencent.mm.protocal.protobuf.StorySyncResponse\");\n AppMethodBeat.o(109251);\n throw vVar;\n }\n LinkedList linkedList;\n cfa cfa = (cfa) acA;\n tc tcVar = cfa.vTR;\n if (tcVar != null) {\n linkedList = tcVar.jBw;\n }\n linkedList = new LinkedList();\n if (linkedList.size() > 0) {\n b bVar = this.rUU;\n j.p(linkedList, \"cmdList\");\n bVar.mgm = linkedList;\n bVar.mgn.sendEmptyMessage(0);\n AppMethodBeat.o(109251);\n return;\n }\n if (cfa.vTO != null) {\n SKBuiltinBuffer_t sKBuiltinBuffer_t = cfa.vTO;\n j.o(sKBuiltinBuffer_t, \"resp.KeyBuf\");\n if (sKBuiltinBuffer_t.getBuffer() != null) {\n SKBuiltinBuffer_t sKBuiltinBuffer_t2 = cfa.vTO;\n j.o(sKBuiltinBuffer_t2, \"resp.KeyBuf\");\n byte[] toByteArray = sKBuiltinBuffer_t2.getBuffer().toByteArray();\n acA = this.ehh.acz();\n if (acA == null) {\n vVar = new v(\"null cannot be cast to non-null type com.tencent.mm.protocal.protobuf.StorySyncRequest\");\n AppMethodBeat.o(109251);\n throw vVar;\n }\n toByteArray = aa.j(((cez) acA).vTO.getBuffer().toByteArray(), toByteArray);\n if (toByteArray != null) {\n if (((toByteArray.length == 0 ? 1 : 0) == 0 ? 1 : 0) != 0) {\n e RP = g.RP();\n j.o(RP, \"MMKernel.storage()\");\n RP.Ry().set(8195, bo.cd(toByteArray));\n }\n }\n }\n }\n fVar = this.ehi;\n if (fVar == null) {\n j.avw(\"callback\");\n }\n fVar.onSceneEnd(i2, i3, str, this);\n AppMethodBeat.o(109251);\n return;\n }\n fVar = this.ehi;\n if (fVar == null) {\n j.avw(\"callback\");\n }\n fVar.onSceneEnd(i2, i3, str, this);\n AppMethodBeat.o(109251);\n }", "public byte [] GetPayload_Generic(byte cmd, byte [] data) {\n // Construct payload as series of delimited stringsƒsƒs\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n for (int i =0; i != data.length; i++)\n payload.add(data[i]);\n return makeTransportPacket_Generic(payload);\n }", "@Override\n\tprotected void encode(ChannelHandlerContext ctx, RPCResponse msg, ByteBuf out) throws Exception {\n\t\tbyte[] data = SerializationUtils.serialize(msg);\n\t\tout.writeInt(data.length);\n\t\tout.writeBytes( data );\n\t}", "public void sendHttp() {\n String url = \"https://openwhisk.ng.bluemix.net/api/v1/namespaces/1tamir198_tamirSpace/actions/testing_trigger\";\n //api key that i got from blumix EndPoins\n String apiKey = \"530f095a-675e-4e1c-afe0-4b421201e894:0HriiSRoYWohJ4LGOjc5sGAhHvAka1gwASMlhRN8kA5eHgNu8ouogt8BbmXtX21N\";\n try {\n //JSONObject jsonObject = new JSONObject().put(\"openwhisk.ng.bluemix.net\" ,\"c1165fd1-f4cf-4a62-8c64-67bf20733413:hdVl64YRzbHBK0n2SkBB928cy2DUO5XB3yDbuXhQ1uHq8Ir0dOEwT0L0bqMeWTTX\");\n String res = (new HttpRequest(url)).prepare(HttpRequest.Method.POST).withData(apiKey).sendAndReadString();\n //String res = new HttpRequest(url).prepare(HttpRequest.Method.POST).withData(jsonObject.toString()).sendAndReadString();\n System.out.println( res + \"***********\");\n\n } catch ( IOException exception) {\n exception.printStackTrace();\n System.out.println(exception + \" some some some\");\n System.out.println(\"catched error from response ***********\");\n }\n }", "public byte[] marshall() {\r\n if (marshall == null)\r\n marshall = Utilities.marshall(COMMAND, deviceToken, payload);\r\n return marshall.clone();\r\n }", "@Nonnull\n @Override\n public ByteBuf getCommandLineBytes() {\n final int len = command.length() + FROM.length() + sender.length() + CRLF_B.length + SmtpClientConstants.PADDING_LEN;\n final ByteBuf res = Unpooled.buffer(len)\n .writeBytes(command.getBytes(StandardCharsets.US_ASCII))\n .writeByte(SmtpClientConstants.SPACE)\n .writeBytes(FROM.getBytes(StandardCharsets.US_ASCII))\n .writeByte(SmtpClientConstants.COLON)\n .writeByte(SmtpClientConstants.L_ANGLE_BRACKET)\n .writeBytes(sender.getBytes(StandardCharsets.US_ASCII))\n .writeByte(SmtpClientConstants.R_ANGLE_BRACKET);\n\n if (mailParameters != null) { // adds the additional mail parameters if available\n for (final MailParameter mailParameter : mailParameters) {\n res.writeByte(SmtpClientConstants.SPACE)\n .writeBytes(mailParameter.keyword.getBytes(StandardCharsets.US_ASCII));\n if (mailParameter.value != null) {\n res.writeByte(SmtpClientConstants.EQUAL)\n .writeBytes(mailParameter.value.getBytes(StandardCharsets.US_ASCII));\n }\n }\n }\n return res.writeBytes(CRLF_B);\n }", "public byte [] GetPayload(int cmd ) {\n // Construct payload as series of delimited strings\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n payload.add((byte)0);\n return makeTransportPacket(payload);\n }", "void writeCommand(CommProtocolCommands command, Object ... params) throws IOException;", "private <T extends QMessage> void sendTestMsg(T msg) {\n\n\t\ttry {\n\t\t\tString token = KeycloakUtils.getAccessToken(\"http://keycloak.genny.life\", \"genny\", \"genny\",\n\t\t\t\t\t\"056b73c1-7078-411d-80ec-87d41c55c3b4\", \"user1\", \"password1\");\n\t\t\tmsg.setToken(token);\n\n\t\t\t/* get the bridge url to publish the message to webcmd channel */\n\t\t\tString bridgetUrl = ENV_GENNY_BRIDGE_URL + \"/api/service?channel=webdata\";\n\n\t\t\tQwandaUtils.apiPostEntity(bridgetUrl, JsonUtils.toJson(msg), token);\n\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}", "public void printProtocol()\n\t{\n\t\tString commands[] = {\"A\", \"UID\", \"S\", \"F\"};\n\t\t\n\t\tHashtable<String, String> commandDescription = new Hashtable<String, String>();\n\t\tHashtable<String, String> subStringCommands = new Hashtable<String, String>();\n\t\tcommandDescription.put(\"A\", \"Sends audio data using _ as a regex\");\n\t\tcommandDescription.put(\"UID\", \"Specifies the user's id so that the Network.Server may verify it\");\n\t\tcommandDescription.put(\"S\", \"Specifies server commands.\");\n\t\tcommandDescription.put(\"F\", \"Specifies audio format.\");\n\t\tsubStringCommands.put(\"A\", \"No commands\");\n\t\tsubStringCommands.put(\"UID\", \"No sub commands\");\n\t\tsubStringCommands.put(\"S\", \"Sub commands are: \\nclose - Closes the server.\\ndisconnect - Disconnects the client from the server.\\nclumpSize {int}\");\n\t\tsubStringCommands.put(\"F\", \"Split Audio specifications between spaces. The ordering is {float SampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate\");\n\t\t\n\t\tfor (String str: commands)\n\t\t{\n\t\t\tSystem.out.printf(\"Command format:\\n %s.xxxxxxx\\n\", str);\n\t\t\tSystem.out.printf(\"Command %s\\n Description: %s \\n sub commands %s\\n\", str, commandDescription.get(str),subStringCommands.get(str));\n\t\t\t\n\t\t}\n\t}", "public String toString()\n {\n /**\n * Set the format as [timestamp] account number : command\n */\n String transaction = \"[\" + timestamp + \"] \" + accountInfo.getAccountNumber() + \" : \" + command.name(); \n \n /**\n * Return the string.\n */\n return transaction;\n }", "public byte[] buildPacket() throws BeCommunicationEncodeException {\r\n\t\tif (apMac == null) {\r\n\t\t\tthrow new BeCommunicationEncodeException(\"ApMac is a necessary field!\");\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tbyte[] requestData = prepareRequestData();\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * AP identifier 's length = 6 + 1 + apSerialNum.length()<br>\r\n\t\t\t * query's length = 6 + 12\r\n\t\t\t */\r\n\t\t\tint apIdentifierLen = 7 + apMac.length();\r\n\t\t\tint queryLen = 12 + requestData.length;\r\n\t\t\tint bufLength = apIdentifierLen + queryLen;\r\n\t\t\tByteBuffer buf = ByteBuffer.allocate(bufLength);\r\n\t\t\t// set value\r\n\t\t\tbuf.putShort(BeCommunicationConstant.MESSAGEELEMENTTYPE_APIDENTIFIER);\r\n\t\t\tbuf.putInt(apIdentifierLen - 6);\r\n\t\t\tbuf.put((byte) apMac.length());\r\n\t\t\tbuf.put(apMac.getBytes());\r\n\t\t\tbuf.putShort(BeCommunicationConstant.MESSAGEELEMENTTYPE_INFORMATIONQUERY);\r\n\t\t\tbuf.putInt(6 + requestData.length);\r\n\t\t\tbuf.putShort(queryType);\r\n\t\t\tbuf.putInt(requestData.length); // data length\r\n\t\t\tbuf.put(requestData);\r\n\t\t\tsetPacket(buf.array());\r\n\t\t\treturn buf.array();\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new BeCommunicationEncodeException(\r\n\t\t\t\t\t\"BeTeacherViewStudentInfoEvent.buildPacket() catch exception\", e);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tHttpClient client = new HttpClient();\n\t\tPostMethod myPost = new PostMethod(string );\n\t\ttry{\n\t\t\t//��������ͷ������ \n\t\t\tmyPost.setRequestHeader(\"Content-Type\", \"text/xml\");\n\t\t\tmyPost.setRequestHeader(\"charset\", \"utf-8\");\n\t\t\tmyPost.setRequestHeader(\"x-app-key\", \"c85d54f1\");\n\t\t\tmyPost.setRequestHeader(\"x-sdk-version\", \"3.1\");\n\n\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\").format(new Date());\n\t\t\tmyPost.setRequestHeader(\"x-request-date\", date);\n\t\t\tString x_task_config = \"capkey=hwr.cloud.letter\";\n\t\t\tmyPost.setRequestHeader(\"x-task-config\", x_task_config);\n//\t\t\tString b = new String(g_sShortData);\n\t\t\tString str = \"712ddd892cf9163e6383aa169e0454e3\" + date + x_task_config ;\n//\t\t\tSystem.out.println(str);\n\t\t\tmyPost.setRequestHeader(\"x-auth\", MD5.getMD5((str + g_sShortData.toString()).getBytes()));\n//\t\t\tmyPost.setRequestHeader(\"x-udid\", \"101:123456789\");\n\t\t\tSystem.out.println(g_sShortData.length);\n\t\t\tbyte[] b = new byte[g_sShortData.length];\n\t\t\tfor(int i=0; i<g_sShortData.length; i++){\n\t\t\t\tb[i] = (byte) g_sShortData[i];\n\t\t\t}\n\t\t\t\n\t\t\tRequestEntity entity = new StringRequestEntity(new String(b, \"iso-8859-1\"), \"application/octet-stream\", \"iso-8859-1\");\n\t\t\tmyPost.setRequestEntity(entity);\n\t\t\tint statusCode = client.executeMethod(myPost);\n\t\t\tString.format(\"%d\", statusCode);\n\t\t\tSystem.out.println(statusCode);\n\t\t\t\n\t\t\tif (statusCode == HttpStatus.SC_OK) {\n\t\t\t\tInputStream txtis = myPost.getResponseBodyAsStream(); \n\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(txtis, \"utf-8\"));\n\t\t\t\t\n\t\t\t\tString tempbf;\n\t\t\t\tStringBuffer html = new StringBuffer(256);\n\t\t\t\twhile((tempbf = br.readLine()) != null){\n\t\t\t\t\thtml.append(tempbf);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(html.toString());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);", "@Override\r\n\tpublic byte[] encode(Operation message) {\n\t\treturn null;\r\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:55:06.831 -0500\", hash_original_method = \"E7A2FB4AC135D29D78CE09D5448C290F\", hash_generated_method = \"74B066602ECC20A74FD97E770D65E8BD\")\n \npublic String encodeBody() {\n return encodeBody(new StringBuffer()).toString();\n }", "@Override\n public String toTransmissionString() {\n return toHexString();\n }", "public void SendOrder(Order order){\r\n\r\n try {\r\n String orderString=Order.packageOrder(order);\r\n out.writeChars(orderString);\r\n out.flush();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@POST\n @Path(\"device/{deviceId}/message\")\n @ApiOperation(\n httpMethod = \"POST\",\n value = \"Send message to Picavi device\",\n notes = \"\",\n response = Response.class,\n tags = \"picavi\",\n extensions = {\n @Extension(properties = {\n @ExtensionProperty(name = PicaviConstants.SCOPE, value = \"perm:picavi:enroll\")\n })\n }\n )\n @ApiResponses(value = {\n @ApiResponse(\n code = 200,\n message = \"OK.\",\n response = Response.class,\n responseHeaders = {\n @ResponseHeader(\n name = \"Content-Type\",\n description = \"The content type of the body\"),\n @ResponseHeader(\n name = \"Last-Modified\",\n description = \"Date and time the resource was last modified.\\n\" +\n \"Used by caches, or in conditional requests.\"),\n }),\n @ApiResponse(\n code = 400,\n message = \"Bad Request. \\n Invalid Device Identifiers found.\",\n response = Response.class),\n @ApiResponse(\n code = 401,\n message = \"Unauthorized. \\n Unauthorized request.\"),\n @ApiResponse(\n code = 500,\n message = \"Internal Server Error. \\n Error occurred while executing command operation to\"\n + \" send threashold\",\n response = Response.class)\n })\n Response sendMessage(\n @ApiParam(\n name = \"deviceId\",\n value = \"The registered device Id.\",\n required = true)\n @PathParam(\"deviceId\") String deviceId,\n @ApiParam(\n name = \"message\",\n value = \"The message to be displayed.\",\n required = true)\n @QueryParam(\"message\") String message);", "public byte [] GetPayload(byte cmd, byte [] data) {\n // Construct payload as series of delimited stringsƒsƒs\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n for (int i =0; i != data.length; i++)\n payload.add(data[i]);\n return makeTransportPacket(payload);\n }", "public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void encode( ByteBuffer byteBuffer, DhcpMessage message )\n {\n byteBuffer.put( message.getOp() );\n\n HardwareAddress hardwareAddress = message.getHardwareAddress();\n\n byteBuffer.put( ( byte ) ( null != hardwareAddress ? hardwareAddress.getType() : 0 ) );\n byteBuffer.put( ( byte ) ( null != hardwareAddress ? hardwareAddress.getLength() : 0 ) );\n byteBuffer.put( ( byte ) message.getHopCount() );\n byteBuffer.putInt( message.getTransactionId() );\n byteBuffer.putShort( ( short ) message.getSeconds() );\n byteBuffer.putShort( message.getFlags() );\n\n writeAddress( byteBuffer, message.getCurrentClientAddress() );\n writeAddress( byteBuffer, message.getAssignedClientAddress() );\n writeAddress( byteBuffer, message.getNextServerAddress() );\n writeAddress( byteBuffer, message.getRelayAgentAddress() );\n\n writeBytes( byteBuffer, ( null != hardwareAddress ? hardwareAddress.getAddress() : new byte[]\n {} ), 16 );\n\n writeString( byteBuffer, message.getServerHostname(), 64 );\n writeString( byteBuffer, message.getBootFileName(), 128 );\n\n OptionsField options = message.getOptions();\n\n // update message type option (if set)\n if ( null != message.getMessageType() )\n {\n options.add( new DhcpMessageType( message.getMessageType() ) );\n }\n\n encodeOptions( options, byteBuffer );\n }", "public byte[] encode() throws IOException {\n byte[] buffer = new byte[12+193];\n LittleEndianDataOutputStream dos = new LittleEndianDataOutputStream(new ByteArrayOutputStream());\n dos.writeByte((byte)0xFD);\n dos.writeByte(payload_length & 0x00FF);\n dos.writeByte(incompat & 0x00FF);\n dos.writeByte(compat & 0x00FF);\n dos.writeByte(packet & 0x00FF);\n dos.writeByte(sysId & 0x00FF);\n dos.writeByte(componentId & 0x00FF);\n dos.writeByte(messageType & 0x00FF);\n dos.writeByte((messageType >> 8) & 0x00FF);\n dos.writeByte((messageType >> 16) & 0x00FF);\n dos.writeLong(tms);\n for (int i=0; i<40; i++) {\n dos.writeInt((int)(data[i]&0x00FFFFFFFF));\n }\n dos.writeFloat(cx);\n dos.writeFloat(cy);\n dos.writeFloat(cz);\n dos.writeFloat(resolution);\n dos.writeFloat(extension);\n dos.writeInt((int)(count&0x00FFFFFFFF));\n dos.writeByte(status&0x00FF);\n dos.flush();\n byte[] tmp = dos.toByteArray();\n for (int b=0; b<tmp.length; b++) buffer[b]=tmp[b];\n int crc = MAVLinkCRC.crc_calculate_encode(buffer, 193);\n crc = MAVLinkCRC.crc_accumulate((byte) IMAVLinkCRC.MAVLINK_MESSAGE_CRCS[messageType], crc);\n byte crcl = (byte) (crc & 0x00FF);\n byte crch = (byte) ((crc >> 8) & 0x00FF);\n buffer[203] = crcl;\n buffer[204] = crch;\n dos.close();\n return buffer;\n}", "@Override\n\t\tprotected String doInBackground(Void... params) {\n\t\t\tString orderResult = null;\n\t\t\ttry {\n\t\t\t\tdes_token =\n\t\t\t\t\t\t\t(String) DesCodeUtils.encode(\"11119688\",\n\t\t\t\t\t\t\t\t\t\t\"SubmitOrder|2471CB5496F2A8C8\");\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\tSystem.out.println(\"des_token ---> \" + des_token);\n\t\t\t\n\t\t\tOrderId = getOrderId();\n\t\t\tSystem.out.println(\"2.OrderId ---> \" + OrderId);\n\t\t\tif(OrderId !=null){\n\t\t\t\tOrderInfo = getOrderInfo();\n\t\t\t\tSystem.out.println(\"OrderInfo ---> \" + OrderInfo);\n\t\t\t\tString sign = Rsa.sign(OrderInfo, Keys.PRIVATE);\n\t\t\t\tSystem.out.println(\"sign before encode ---> \" + sign);\n\t\t\t\tsign = URLEncoder.encode(sign);\n\t\t\t\tOrderInfo +=\"&sign=\\\"\" + sign + \"\\\"\"+ \"&sign_type=\\\"RSA\\\"\";\n\t\t\t\tSystem.out.println(\"OrderInfo****** \" + OrderInfo);\n\t\t\t\t\n\t\t\t\t\t\tAliPay aliPay = new AliPay(OrderPnrMain.this, mhandler);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//支付宝支付后去的的返回值,orderResult\n\t\t\t\t\t\torderResult = aliPay.pay(OrderInfo);\n\t\t\t\t\t\tSystem.out.println(\"orderResult ---> \" + orderResult);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t//\thttpPostData();\n\t\t\t} else{\n\t\t\t\tSystem.out.println(\"null OrderId\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn orderResult;\n\t\t\t\n\t\t}", "private void printEncodedMessage() {\n System.out.print(\"\\nPrinting the encoded message\");\n System.out.print(\"\\n\" + encodedMessage + \"\\n\");\n System.out.println();\n }", "@Override\r\n\tprotected String requestText() {\n\t\tGuardarVtaCeroMotivoRequest guardarVtaCeroMotivoRequest = new GuardarVtaCeroMotivoRequest();\r\n\t\tguardarVtaCeroMotivoRequest.setAnio(Anio);\r\n\t\tguardarVtaCeroMotivoRequest.setCodCliente(codCliente);\r\n\t\tguardarVtaCeroMotivoRequest.setCodDeposito(codDeposito);\r\n\t\tguardarVtaCeroMotivoRequest.setMes(Mes);\r\n\t\tguardarVtaCeroMotivoRequest.setMotivo(Motivo);\r\n\t\tguardarVtaCeroMotivoRequest.setObservacion(observacion);\r\n\t\tguardarVtaCeroMotivoRequest.setSemana(Semana);\r\n\t\tguardarVtaCeroMotivoRequest.setUsuario(Usuario);\r\n\t\tString request = JSONHelper.serializar(guardarVtaCeroMotivoRequest);\r\n\t\treturn request;\r\n\t}", "protected void commandContinuationRequest() throws DecodingException {\n try {\n output.write('+');\n output.write('\\r');\n output.write('\\n');\n output.flush();\n } catch (IOException e) {\n throw new DecodingException(HumanReadableText.SOCKET_IO_FAILURE, \"Unexpected exception in sending command continuation request.\", e);\n }\n }", "private void sendHelpOperations()\n\t{\n\t\t/*** API Calls ***/\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Get most recent tweet by account name. Use the explicit command: !getrecenttweet <screen name/twitter handle>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Get most recent daily(Monday-Friday) stock data by symbol name(not case sensitive). Use the explicit command: !stockdata <stock symbol>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Weather data by zipcode or city name. Use the explicit command: !weathercity <city name> or just ask me something like: How's the weather in 75087?\");\n\t\tsendMessageAndAppend(this.channel, \"- Cryptocurrency price data: !cprice <crypto symbol (BTC, ETH, etc...)>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Exchange rates for any currency: !exchange <currency symbol (USD, JPY, MXN, etc...)>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- State/city government representatives by zipcode: !representatives <zipcode> or just ask me something like: Who are the representatives for 01002?\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Get distance between two zip codes in miles or kilometers: !distance <zipcode 1> <zipcode 2> <m or k>\");\n\t\tsendMessageAndAppend(this.channel, \"- Get current coordinates of the International Space Station: !iss\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Find the name of a pokemon by its ID number: !pokefind <pokemon ID number>\");\n\t\tsendMessageAndAppend(this.channel,\n\t\t\t\t\"- Translate English to Dothraki: !dothraki <English sentence to be translated>\");\n\t\t///\n\n\t\t/*** Math functions ***/\n\t\tsendMessageAndAppend(this.channel, \"- Multiply a list of numbers: !multiply <num1> <num2> <num3> ... <num N>\");\n\t\tsendMessageAndAppend(this.channel, \"- Apply factorial on a number: !factorial <number>\");\n\t\tsendMessageAndAppend(this.channel, \"- Calculate exponential: !ex <base> <exponent>\");\n\t\t///\n\n\t\t/*** Miscellaneous ***/\n\t\tsendMessageAndAppend(this.channel, \"- Change my nickname: !changenick <new nickname>\");\n\t\tsendMessageAndAppend(this.channel, \"- Get the current time: !time\");\n\t\tsendMessageAndAppend(this.channel, \"- Ping the bot: !ping\");\n\t\t///\n\t}", "@Override\n protected void encode(ChannelHandlerContext ctx, FoscamTextByteBufDTO msg, List<Object> out) {\n final ByteBuf buf = FoscamTextByteBufDTOEncoder.allocateBuf(ctx, msg);\n new FoscamTextByteBufDTOEncoder().encode(ctx, msg, buf);\n final DatagramPacket datagramPacket = new DatagramPacket(buf, new InetSocketAddress(BROADCAST_ADDRESS, BROADCAST_PORT));\n out.add(datagramPacket);\n }", "private String encodeMessage() {\n\t\tString encode = \"\";\n\t\tfor (int i = 0; i < message.length(); i++) {\n\t\t\tencode += map.get(message.charAt(i));\n\t\t}\n\t\tgenerateBack();\n\t\treturn encode;\n\t}", "com.google.protobuf.ByteString\n getCommandBytes();", "protected String getRequestMessage() {\n NbaTXRequestVO nbaTXRequest = new NbaTXRequestVO();\n nbaTXRequest.setTransType(NbaOliConstants.TC_TYPE_MIBFOLLOWUP);\n nbaTXRequest.setTransMode(NbaOliConstants.TC_MODE_ORIGINAL);\n nbaTXRequest.setBusinessProcess(NbaUtils.getBusinessProcessId(getUser()));\n //create txlife with default request fields\n NbaTXLife nbaTXLife = new NbaTXLife(nbaTXRequest);\n TXLife tXLife = nbaTXLife.getTXLife();\n UserAuthRequestAndTXLifeRequest userAuthRequestAndTXLifeRequest = tXLife.getUserAuthRequestAndTXLifeRequest();\n userAuthRequestAndTXLifeRequest.deleteUserAuthRequest();\n TXLifeRequest tXLifeRequest = userAuthRequestAndTXLifeRequest.getTXLifeRequestAt(0);\n \tnbaTXLife.getTXLife().setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n \tOLifE olife = nbaTXLife.getTXLife().getUserAuthRequestAndTXLifeRequest().getTXLifeRequestAt(0).getOLifE();\n \tolife.setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n\n tXLifeRequest.setPrimaryObjectID(CARRIER_PARTY_1);\n tXLifeRequest.setMaxRecords(getMibFollowUpMaxRecords());\n tXLifeRequest.setStartRecord(getStartRecord().intValue());\n tXLifeRequest.setStartDate(NbaUtils.addDaysToDate(getStartDate(),-1));\n tXLifeRequest.setEndDate(NbaUtils.addDaysToDate(getEndDate(),-1));\n tXLifeRequest.setTestIndicator(getTestIndicator());\n MIBRequest mIBRequest = new MIBRequest();\n tXLifeRequest.setMIBRequest(mIBRequest);\n MIBServiceDescriptor mIBServiceDescriptor = new MIBServiceDescriptor();\n MIBServiceDescriptorOrMIBServiceConfigurationID mIBServiceDescriptorOrMIBServiceConfigurationID = new MIBServiceDescriptorOrMIBServiceConfigurationID();\n mIBServiceDescriptorOrMIBServiceConfigurationID.addMIBServiceDescriptor(mIBServiceDescriptor);\n mIBRequest.setMIBServiceDescriptorOrMIBServiceConfigurationID(mIBServiceDescriptorOrMIBServiceConfigurationID);\n mIBServiceDescriptor.setMIBService(NbaOliConstants.TC_MIBSERVICE_CHECKING);\n OLifE oLifE = tXLifeRequest.getOLifE();\n Party party = new Party();\n oLifE.addParty(party);\n party.setId(CARRIER_PARTY_1);\n party.setPartyTypeCode(NbaOliConstants.OLIX_PARTYTYPE_CORPORATION);\n party.setPersonOrOrganization(new PersonOrOrganization());\n party.getPersonOrOrganization().setOrganization(new Organization());\n Carrier carrier = new Carrier();\n party.setCarrier(carrier);\n carrier.setCarrierCode(getCurrentCarrierCode());\n String responseMessage = nbaTXLife.toXmlString();\n if (getLogger().isDebugEnabled()) {\n getLogger().logDebug(\"TxLife 404 Request Message:\\n \" + responseMessage);\n }\n return responseMessage;\n }", "public void command(byte[] cmdMessage) throws SAPIException{\r\n\t\t\t\t//sends command to RBNB\r\n\t\t\t\t\r\n\t\t\t\tsrcMap.PutDataAsByteArray(srcMap.GetIndex(getParameterToStringById(\"sourceChannelCommandName\")), cmdMessage); //cmds channel\t \t\r\n\t \tsrc.Flush(srcMap); \t\r\n\t\t}", "void transmit(String protocol, String message);", "private void sendMessage() throws Exception {\n\t\tGetTimestamp(\"Sending Message: \");\n\t\tString inputMessage;\n\t\tinputMessage = input.nextLine();\n\t\tString tosend = encrypt(clientkey, inputMessage);\n\t\t\n\t\tJSONObject RESPONSE = new JSONObject();\n\t\tRESPONSE.put(\"payload\",tosend);\n\t\tSystem.out.println(RESPONSE);\n\t\t\n\t\tpw.println(tosend);\n\t\tpw.flush();\n\t\tSystem.out.println(\"Message sent to the client : \" + inputMessage);\n\t\tif (inputMessage.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"sending close command\");\n\t\t\tcloseConnection();\n\t\t} else {\n\t\t\tgetMessage();\n\t\t}\n\t}", "private String signature() {\n\t\t++this.nonce;\n\t\tString message = new String(this.nonce + this.username + this.apiKey);\n\t\tMac hmac = null;\n\n\t\ttry {\n\t\t\thmac = Mac.getInstance(\"HmacSHA256\");\n\t\t\tSecretKeySpec secret_key = new SecretKeySpec(\n\t\t\t\t\t((String) this.apiSecret).getBytes(\"UTF-8\"), \"HmacSHA256\");\n\t\t\thmac.init(secret_key);\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn String.format(\"%X\",\n\t\t\t\tnew BigInteger(1, hmac.doFinal(message.getBytes())));\n\t}", "@Override\n public String toJSONString()\n {\n return \"{\\\"packet\\\":{\\\"agentsName\\\":\\\"\\\",\\\"placesName\\\":\\\"\\\",\\\"placesX\\\":0,\\\"placesY\\\":0,\\\"numberOfPlaces\\\":0,\\\"numberOfAgents\\\":0,\\\"placeOverloadsSetDebugData\\\":false,\\\"placeOverloadsGetDebugData\\\":false,\\\"agentOverloadsSetDebugData\\\":false,\\\"agentOverloadsGetDebugData\\\":false,\\\"placeDataType\\\":\\\"\\\",\\\"agentDataType\\\":\\\"\\\"},\\\"request\\\":0}\";\n }", "public abstract EOutgoingSMSAcceptionStatus rawSendMessage(OutgoingSMSDto smsOut) throws IOException;", "public interface JSONKeys {\n String msgType = \"msgType\";// 消息类型\n String userId = \"userId\";// 发送者Id\n String friendId = \"friendId\";// 接收者Id\n String friendName = \"friendName\";// 好友名\n\n String sendTime = \"sendTime\";// 发送时间\n String msgCotent = \"msgCotent\";// 聊天信息-文本信息\n String voiceTime = \"voiceTime\";// 聊天信息-语音信息长度\n String voicePath = \"voicePath\";// 聊天信息-语音文件路径\n String imagePath = \"imagePath\";// 聊天信息-图片路径\n\n String userEmail = \"userEmail\";// 用户注册邮箱,登录时用邮箱登录\n String userName = \"userName\";// 用户名\n String userSex = \"userSex\";// 用户性别\n String userBirthday = \"userBirthday\";// 用户生日\n String userPasswd = \"userPasswd\";// 登录密码\n String personSignature = \"personSignature\";// 个性签名\n\n String userHeadPath = \"userHeadPath\";// 用户头像路径\n\n String loc_province = \"loc_province\";// 所处省份\n String loc_Longitude = \"loc_Longitude\";// 经度\n String loc_Latitude = \"loc_Latitude\";// 纬度\n\n String distRange = \"distRange\";// 多少公里之内的\n\n String strangerList = \"strangerList\";// 陌生人列表\n\n String friendIdList = \"friendIdList\";// 好友Id列表\n\n String groupId = \"groupId\";// 群组Id\n String groupName = \"groupName\";// 群组名\n String groupTopic = \"groupTopic\";// 群组主题\n String groupCreator = \"groupCreator\";//创建者\n\n String isGroupMsg = \"isGroupMsg\";\n\n}", "void submit(Token token, OMMMsg encmsg);", "private byte[] encode(byte[] msg) {\r\n\t\treturn Base64.encode(msg);\r\n\t}", "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 }", "byte[] encode(IMessage message) throws IOException;", "public String transformValueToOHCommand() {\n//\t\tSystem.out.println(\"COMMAND: \" + propType.transformPropValueToOHCommand(value.toString()));\n\t\treturn propType.transformPropValueToOHCommand(value.toString());\n\t}", "private byte[] buildBytes() {\n byte[] message = new byte[4 + 2 + 2 + 1 + data.getLength()];\n System.arraycopy(id.getBytes(), 0, message, 0, 4);\n System.arraycopy(sq.getBytes(), 0, message, 4, 2);\n System.arraycopy(ack.getBytes(), 0, message, 6, 2);\n message[8] = flag.getBytes();\n System.arraycopy(data.getBytes(), 0, message, 9, data.getBytes().length);\n return message;\n }", "private void sendACKPacket()\n{\n \n //the values are unpacked into bytes and stored in outBufScratch\n //outBufScrIndex is used to load the array, start at position 0\n \n outBufScrIndex = 0;\n \n outBufScratch[outBufScrIndex++] = Notcher.ACK_CMD;\n \n //the byte is placed right here in this method\n outBufScratch[outBufScrIndex++] = lastPacketTypeHandled;\n \n //send header, the data, and checksum\n sendByteArray(outBufScrIndex, outBufScratch);\n \n}", "public DataBuffer encode() {\n try {\n\n DataBuffer buffer = new DataBuffer();\n // length\n int length = Header.PROTOCOL_HEADER_LENGTH;\n if (mData != null) {\n length += mData.readableBytes();\n }\n buffer.writeInt(length);\n // header\n mHeader.setLength(length);\n buffer.writeDataBuffer(mHeader.encode(mHeader.getVersion()));\n // data\n buffer.writeDataBuffer(mData);\n\n return buffer;\n } catch (Exception e) {\n //logger.error(\"encode error!!!\", e);\n System.out.println(\"encode error!!\");\n throw new RuntimeException(\"encode error!!!\");\n }\n }", "@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}", "public void encode() {\r\n\t\tint len=4+4;//The four bytes of the header plus the reserved and Endpoint type\r\n\r\n\t\tswitch (generalizedendpointType){\r\n\t\tcase ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_P2P:\r\n\t\t\ttry {\r\n\t\t\t\tp2pEndpoints.encode();\r\n\t\t\t} catch (PCEPProtocolViolationException 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\tlen=len+p2pEndpoints.getLength();\r\n\t\t\tbreak;\r\n\t\tcase ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_P2MP_NEW_LEAVES:\r\n\t\t\ttry {\r\n\t\t\t\tp2mpEndpoints.encode();\r\n\t\t\t} catch (PCEPProtocolViolationException 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\tlen=len+p2mpEndpoints.getLength();\r\n\t\t\tbreak;\r\n\t\tcase ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_ASSISTED_UNICAST:\r\n\t\t\ttry {\r\n\t\t\t\tassistedUnicastEndpoints.encode();\r\n\t\t\t} catch (PCEPProtocolViolationException 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\tlen=len+assistedUnicastEndpoints.getLength();\r\n\t\t\tbreak;\r\n\t\tcase ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_FULL_ANYCAST:\r\n\t\t\ttry {\r\n\t\t\t\tfullAnycastEndpoints.encode();\r\n\t\t\t} catch (PCEPProtocolViolationException 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\tlen=len+fullAnycastEndpoints.getLength();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\r\n\r\n\t\tObjectLength=len;\r\n\t\tthis.object_bytes=new byte[ObjectLength];\r\n\t\tencode_header();\r\n\t\tthis.object_bytes[4]=0x00;\r\n\t\tthis.object_bytes[5]=0x00;\r\n\t\tthis.object_bytes[6]=(byte)((generalizedendpointType>>8)&0xFF);\r\n\t\tthis.object_bytes[7]=(byte)((generalizedendpointType)&0xFF);\r\n\t\t//log.warn(\"Generalized End Points TYPE:\"+generalizedendpointType);\r\n\t\t//log.warn(\"Generalized End Points LENGTH:\"+len);\r\n\t\t//System.arraycopy((byte)generalizedendpointType,0, this.object_bytes, 6, 2);\r\n\t\tint pos=8;\r\n\t\tif (generalizedendpointType==ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_P2P ){\r\n\t\t\tSystem.arraycopy(p2pEndpoints.getBytes(),0, this.object_bytes, pos, p2pEndpoints.getLength());\r\n\t\t\tpos=pos+p2pEndpoints.getLength();\r\n\t\t}\r\n\r\n\t\tif (generalizedendpointType==ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_P2MP_NEW_LEAVES){\r\n\t\t\tSystem.arraycopy(p2mpEndpoints.getBytes(),0, this.object_bytes, pos, p2mpEndpoints.getLength());\r\n\t\t\tpos=pos+p2mpEndpoints.getLength();\r\n\t\t}\r\n\r\n\t\tif (generalizedendpointType==ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_ASSISTED_UNICAST){\r\n\t\t\tSystem.arraycopy(assistedUnicastEndpoints.getBytes(),0, this.object_bytes, pos, assistedUnicastEndpoints.getLength());\r\n\t\t\tpos=pos+assistedUnicastEndpoints.getLength();\r\n\t\t}\r\n\r\n\t\tif (generalizedendpointType==ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_FULL_ANYCAST){\r\n\t\t\tSystem.arraycopy(fullAnycastEndpoints.getBytes(),0, this.object_bytes, pos, fullAnycastEndpoints.getLength());\r\n\t\t\tpos=pos+fullAnycastEndpoints.getLength();\r\n\t\t}\r\n\r\n\t}", "static @NonNull ByteBuffer getMsg(int typ, int len) {\n ByteBuffer res = ByteBuffer.wrap(new byte[len]); // Create Authentication Request template\n res.put((byte)((ATH_VER << 4) | typ)); // Set the Qi-Authentication version and the Request type\n return res; // Return the Authentication Request template\n }", "public void encodeMessage() {\n for (int i = message.length() - 1; i >= 0; i--) {\n message.insert(i, String.valueOf(message.charAt(i)).repeat(2));\n }\n }", "public static String encode(String inString, String type, String Key) throws Exception{\r\n\t\tStringBuilder encodedString = new StringBuilder();\r\n\t\tString thisString;\r\n\t\tencodedString.append(\"<encrypted type=\" + type + \" key=\");\r\n\t\tif(type==\"Caesar\"){\r\n\t\t\tencodedString.append(Integer.toHexString(Integer.parseInt(Key)) + \"> \");\r\n\t\t\tchar[] alphabet ={'a','b','c','d','e','f','g','h','i','j','k','l','m',\r\n\t\t\t\t\t'n','o','p','q','r','s','t','u','v','w','x','y','z','å','ä','ö','A','B',\r\n\t\t\t\t\t'C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U',\r\n\t\t\t\t\t'V','W','X','Y','Z','Å','Ä','Ö','0','1','2','3','4','5','6','7','8','9',\r\n\t\t\t\t\t'!','?',')','(','=','>','<','/','&','%','#','@','$','[',']'};\r\n\t\t\tfor(int i = 0; i < inString.length(); i++){\r\n\t\t\t\tchar a = inString.charAt(i);\r\n\t\t\t\tint used = 0;\r\n\t\t\t\tfor(char b: alphabet){\r\n\t\t\t\t\tif(b==a){\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tthisString = String.format(\"%02x\",(int)alphabet[(indexOf(alphabet,b)\r\n\t\t\t\t\t\t\t\t\t+Integer.parseInt(Key))%alphabet.length]);\r\n\t\t\t\t\t\t\tencodedString.append(thisString);\r\n\t\t\t\t\t\t\tused = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}catch(Exception c){\r\n\t\t\t\t\t\t\tSystem.out.print(c.getMessage());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(used==0){\r\n\t\t\t\t\tthisString = String.format(\"%02x\", (int)a);\r\n\t\t\t\t\tencodedString.append(thisString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(type==\"AES\"){\r\n\t\t\tfor(int i = 0; i<Key.length();i++){\r\n\t\t\t\tencodedString.append(String.format(\"%02x\", (int)Key.charAt(i)));\r\n\t\t\t}\r\n\t\t\tencodedString.append(\">\");\r\n\t\t\tencodedString.append(\" \");\r\n\t\t\tbyte[] keyContent = Base64.getDecoder().decode(Key);\r\n\t\t\tSecretKeySpec AESkey = new SecretKeySpec(keyContent,0,keyContent.length, \"AES\");\r\n\t\t\tSystem.out.println(keyContent);\r\n\t\t\t\r\n\t\t\tCipher AEScipher = Cipher.getInstance(\"AES\");\r\n\t\t\tAEScipher.init(Cipher.ENCRYPT_MODE, AESkey);\r\n\t\t\tbyte[] cipherData = AEScipher.doFinal(inString.getBytes());\r\n\t\t\tfor(byte b: cipherData){\r\n\t\t\t\tencodedString.append(String.format(\"%02x\", b));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Unknown encryption\");\r\n\t\t}\r\n\t\tencodedString.append(\" </encrypted> \");\r\n\t\treturn encodedString.toString();\r\n\t\t\r\n\t}", "private void putCommand(String cmd) {\n try {\n stream.write((cmd).getBytes(StandardCharsets.UTF_8));\n } catch (IOException | InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic boolean onSerialize(ByteBuffer buf) {\n\t\tif (buf.remaining() < 11)\n\t\t\treturn false;\n\t\t\n\t\t// message type goes here\n\t\t\n\t\t// [0] int : frameNum\n\t\tbuf.putInt(frameNum);\n\t\t// [4] short[3] : fX fY fZ\n\t\tbuf.putShort(fX);\n\t\tbuf.putShort(fY);\n\t\tbuf.putShort(fZ);\n\t\t// [10] byte : keyPress\n\t\tbuf.put(keyPress);\n\t\treturn true;\n\t}", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[26];\n }\n System.arraycopy(BytesUtil.getBytes(this.mLongtitue), 0, this._sendData, 0, 8);\n System.arraycopy(BytesUtil.getBytes(this.mLantitue), 0, this._sendData, 8, 8);\n System.arraycopy(BytesUtil.getBytes(this.mNorthSpeed), 0, this._sendData, 16, 4);\n System.arraycopy(BytesUtil.getBytes(this.mEastSpeed), 0, this._sendData, 20, 4);\n System.arraycopy(BytesUtil.getBytes(this.mAccuracy), 0, this._sendData, 24, 2);\n }", "@Override\r\n\tprotected String requestText() {\n\t\tActualizarCompromisoRequest actualizarCompromisoRequest = new ActualizarCompromisoRequest();\r\n\t\tactualizarCompromisoRequest.listaInventarioCompromiso = this.listaInventarioCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPosicionCompromiso = this.listaPosicionCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPresentacionCompromiso = this.listaPresentacionCompromiso;\r\n\t\tactualizarCompromisoRequest.updateInformacionAdicionalTO = this.updateInformacionAdicionalTO;\r\n\t\tactualizarCompromisoRequest.codigoCabecera = this.codigoCabecera;\r\n\t\tString request = JSONHelper.serializar(actualizarCompromisoRequest);\r\n\t\treturn request;\r\n\t}", "public static void main(String args[])\r\n\t{\n\t\ttry {\r\n\t\t\tString s = \"{\\\"wfycdwmc\\\":\\\"河西单位0712\\\",\\\"sfbj\\\":\\\"0\\\"}\";\r\n\t\t sun.misc.BASE64Encoder necoder = new sun.misc.BASE64Encoder(); \r\n\t\t String ss = necoder.encode(s.getBytes());\r\n\t\t System.out.println(ss);\r\n\t\t sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();\r\n\t\t byte[] bt = decoder.decodeBuffer(ss); \r\n\t\t ss = new String(bt, \"UTF-8\");\r\n\t\t System.out.println(ss);\r\n//\t\t\tClient client = new Client(new URL(url));\r\n////\t\t\tObject[] token = client.invoke(\"getToken\",new Object[] {tokenUser,tokenPwd});//获取token\r\n//\t\t\tObject[] zyjhbh = client.invoke(apiName,new Object[] {\"120000\"});\r\n//\t\t\tSystem.out.println(zyjhbh[0].toString());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@JavascriptInterface\n public void sendCommand(String array) {\n Log.d(TAG, \"sendCommand: \" + array);\n if (!connected) {\n Log.e(TAG, \"Attempting to send M2 a command while its not connected: \" + array);\n return;\n }\n try {\n JSONArray json = new JSONArray(array);\n byte[] data = new byte[json.length()];\n for (int i = 0; i < data.length; i++) {\n data[i] = (byte) json.getInt(i);\n }\n EventBus.getDefault().post(new M2Command(data));\n }\n catch (JSONException e) {\n Log.e(TAG, \"Invalid command: \" + array);\n }\n }", "java.lang.String getServiceCmd();", "@Override\n protected void onPostExecute(String result) {\n Log.d(TAG, \"GoPro command ret: \"+result);\n Message msg = Message.obtain();\n msg.what = m_command;\n //msg.setData((Bundle) result);\n _handler.sendMessage(msg);\n }", "org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();", "public String getIDKReply();", "public String encode() {\n return encodeToBase64(encKey.getEncoded()) + \":\" + encodeToBase64(macKey.getEncoded());\n }", "@Override\n\tpublic String encode(Message object) throws EncodeException {\n\t\treturn new Gson().toJson(object);\n\t}", "public net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse terminalReturnCard(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCard terminalReturnCard4)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalReturnCardRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalReturnCard4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "private static String getContactTracingSetAdvertisingParametersCommand( boolean useRandomAddr) {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tsb.append( String.format( \"%02x %04x \", HCI_Command.HCI_LE_Controller_OGF, HCI_Command.HCI_LE_Set_Advertising_Parameters_OCF));\n\t\t\n\t\tString advertisingInterval = getAdvertisingInterval( Beacon.ADVERTISING_INTERVAL_CONTACT_TRACING);\n\t\tsb.append( advertisingInterval); // Advertising_Interval_Min:\tSize: 2 octets\n\t\tsb.append( advertisingInterval); // Advertising_Interval_Max:\tSize: 2 octets\n\t\t\n\t\t// Advertising_Interval_Min:\tSize: 2 octets\n\t\t// sb.append( String.format( \"%02x %02x \", ((nbrIntervals >> 8) & 0xFF), (nbrIntervals & 0xFF)));\n\t\t\n\t\t// Advertising_Interval_Max:\tSize: 2 octets\n\t\t// sb.append( String.format( \"%02x %02x \", ((nbrIntervals >> 8) & 0xFF), (nbrIntervals & 0xFF)));\n\t\t\n\t\t// sb.append( \"a0 00 \"); // Advertising_Interval_Min:\tSize: 2 octets\n\t\t// sb.append( \"a0 00 \"); // Advertising_Interval_Max:\tSize: 2 octets\n\t\t\n\t\t// 0x03 Non connectable undirected advertising (ADV_NONCONN_IND)\n\t\tsb.append( String.format( \"%02x \", ADV_NONCONN_IND)); // Advertising_Type:\tSize: 1 octet\n\t\t\n\t\t\n\t\tfinal byte ownAddrType = useRandomAddr?Beacon.Own_Address_Type_Random_Device_Address:Own_Address_Type_Public_Device_Address;\n\t\t\n\t\tsb.append( String.format( \"%02x \", ownAddrType)); \t\t\t\t\t\t\t // Own_Address_Type:\tSize: 1 octet\n\t\tsb.append( String.format( \"%02x \", Own_Address_Type_Public_Device_Address)); // Peer_Address_Type: Size: 1 octet\n\t\t\n\t\tsb.append( \"00 00 00 00 00 00 \"); // Peer_Address: Size: 6 octets\n\t\t\n\t\t// Advertising_Channel_Map: Size: 1 octet\n\t\tsb.append( String.format( \"%02x \", Advertising_Channel_37 | Advertising_Channel_38 | Advertising_Channel_39));\n\t\t\n\t\tsb.append( \"00\"); // Advertising_Filter_Policy: Size: 1 octet\n\t\t\n\t\treturn sb.toString();\n\t}", "byte[] getStructuredData(String messageData);", "public void \n toGlue\n ( \n GlueEncoder encoder \n ) \n throws GlueException\n {\n encoder.encode(\"Command\", pCommand); \n encoder.encode(\"Environment\", pEnvironment); \n }", "@Override\n public String toString() {\n return new StringBuilder().append(\"key = \\\"\").append(key).append(\"\\\", values[] = \").append(valuesToStringBuilder()).append(\", message = \\\"\").append(message).append(\"\\\"\").toString();\n }", "public JSONObject sendChatCmdToJSON(SendChatCommand sendChatCmdObj) {\n\n stringResult = gsonConverter.toJson(sendChatCmdObj);\n\n jsonObjectResult = new JSONObject(stringResult);\n\n return jsonObjectResult;\n }", "public void sendAuthPackge() throws IOException {\n // 生成认证数据\n byte[] rand1 = RandomUtil.randomBytes(8);\n byte[] rand2 = RandomUtil.randomBytes(12);\n\n // 保存认证数据\n byte[] seed = new byte[rand1.length + rand2.length];\n System.arraycopy(rand1, 0, seed, 0, rand1.length);\n System.arraycopy(rand2, 0, seed, rand1.length, rand2.length);\n this.seed = seed;\n\n // 发送握手数据包\n HandshakePacket hs = new HandshakePacket();\n hs.packetId = 0;\n hs.protocolVersion = Versions.PROTOCOL_VERSION;\n hs.serverVersion = Versions.SERVER_VERSION;\n hs.threadId = id;\n hs.seed = rand1;\n hs.serverCapabilities = getServerCapabilities();\n // hs.serverCharsetIndex = (byte) (charsetIndex & 0xff);\n hs.serverStatus = 2;\n hs.restOfScrambleBuff = rand2;\n hs.write(this);\n\n // asynread response\n // 这里阻塞了不好\n this.asynRead();\n }", "public net.wit.webservice.TerminalServiceXmlServiceStub.QqChargeResponse qqCharge(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.QqCharge qqCharge8)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/qqChargeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n qqCharge8,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"qqCharge\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"qqCharge\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.QqChargeResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.QqChargeResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"qqCharge\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"qqCharge\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"qqCharge\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public String toString()\n {\n String str = \"\";\n str += \"topic: \" + label + \", at activation level \" + activation + \"\\n\";\n \n str += \"\\t\" + response1 +\"\\n\";\n str += \"\\t\" + response2 +\"\\n\";\n str += \"\\t\" + response3 +\"\\n\";\n \n return str;\n }", "private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }", "protected byte[] send(byte[] cmd) throws CommunicationException {\n return send(cmd, true);\n }", "protected String getJSON() {\n/*Generated! Do not modify!*/ return gson.toJson(replyDTO);\n/*Generated! Do not modify!*/ }", "@Override\r\n\tprotected String requestText() {\n\t\tActualizarClienteRequest actualizarClienteRequest = new ActualizarClienteRequest();\r\n\t\tactualizarClienteRequest.setCliente(codigo);\r\n\t\tactualizarClienteRequest.setFechaAniversario(fechAniv);\r\n\t\tactualizarClienteRequest.setObservaciones(observaciones);\r\n\t\tactualizarClienteRequest.setRazonComercial(razonComercial);\r\n\t\tactualizarClienteRequest.setReferencia(referencia);\r\n\t\tactualizarClienteRequest.setUsuario(usuario);\r\n\t\t\r\n\t\tString request = JSONHelper.serializar(actualizarClienteRequest);\r\n\t\treturn request;\r\n\t}", "@Override\n\tprotected void encode(ChannelHandlerContext ctx, Envelope env, ByteBuf out) throws Exception {\n\t\t// (1) header (48 bytes)\n\t\t// --------------------------------------------------------------------\n\t\tout.writeInt(MAGIC_NUMBER); // 4 bytes\n\n\t\tif (out.getInt(out.writerIndex()-4) != MAGIC_NUMBER) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\n\t\tout.writeInt(env.getSequenceNumber()); // 4 bytes\n\t\tenv.getJobID().writeTo(out); // 16 bytes\n\t\tenv.getSource().writeTo(out); // 16 bytes\n\t\tout.writeInt(env.getEventsSerialized() != null ? env.getEventsSerialized().remaining() : 0); // 4 bytes\n\t\tout.writeInt(env.getBuffer() != null ? env.getBuffer().size() : 0); // 4 bytes\n\t\t// --------------------------------------------------------------------\n\t\t// (2) events (var length)\n\t\t// --------------------------------------------------------------------\n\t\tif (env.getEventsSerialized() != null) {\n\t\t\tout.writeBytes(env.getEventsSerialized());\n\t\t}\n\n\t\t// --------------------------------------------------------------------\n\t\t// (3) buffer (var length)\n\t\t// --------------------------------------------------------------------\n\t\tif (env.getBuffer() != null) {\n\t\t\tBuffer buffer = env.getBuffer();\n\t\t\tout.writeBytes(buffer.getMemorySegment().wrap(0, buffer.size()));\n\n\t\t\t// Recycle the buffer from OUR buffer pool after everything has been\n\t\t\t// copied to Nettys buffer space.\n\t\t\tbuffer.recycleBuffer();\n\t\t}\n\t}", "private void encodeMessage() {\n encodedMessage = \"\";\n try(BufferedReader inputBuffer = Files.newBufferedReader(inputPath)) {\n String inputLine;\n while((inputLine = inputBuffer.readLine()) != null) {\n //walks the input message and builds the encode message\n for(int i = 0; i < inputLine.length(); i++) {\n encodedMessage = encodedMessage + codeTable[inputLine.charAt(i)];\n }\n encodedMessage = encodedMessage + codeTable[10];\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //writes to the output file\n try(BufferedWriter outputBuffer = Files.newBufferedWriter(outputPath)) {\n outputBuffer.write(encodedMessage, 0, encodedMessage.length());\n outputBuffer.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public void encode(BigEndianEncoder encoderV)\n {\n encoderV.encodeShort(this.id);\n // then encode the 16-bit flags\n encoderV.encodeShort(this.flag);\n // then encode QCOUNT\n encoderV.encodeShort(this.questionCount);\n // then encode ANCOUNT\n encoderV.encodeShort(this.answerCount);\n // then encode NSCOUNT\n encoderV.encodeShort(this.nameServerCount);\n // then encode ARCOUNT\n encoderV.encodeShort(this.additionalFullRRCount);\n\n\n }", "public CardCommandAPDU(byte[] commandAPDU) {\n\tSystem.arraycopy(commandAPDU, 0, header, 0, 4);\n\tsetBody(ByteUtils.copy(commandAPDU, 4, commandAPDU.length - 4));\n }", "public IO_Bundle sendCommandToMapWithOptionalText(String username, Key_Commands command, int width_from_center, int height_from_center, String text) {\n //System.out.println(\"Calling Map.sendCommandToMapWithOptionalText - No internet being used\");\n // Avatar to_recieve_command = this.avatar_list_.get(username);\n\n Entity to_recieve_command;\n if (this.entity_list_.containsKey(username)) {\n to_recieve_command = this.entity_list_.get(username);\n } else {\n to_recieve_command = null;\n System.err.println(\"The avatar of entity you are trying to reach does not exist.\");\n return make_dead_packet();\n }\n ArrayList<String> strings_for_IO_Bundle = null;\n if (to_recieve_command != null) {\n if (to_recieve_command.getMapRelation() == null) {\n System.err.println(to_recieve_command.name_ + \" has a null relation with this map. \");\n return null;\n }\n if (command != null) {\n if (command == Key_Commands.STANDING_STILL) {\n strings_for_IO_Bundle = null;\n } else if (to_recieve_command.hasLivesLeft() == true) {\n strings_for_IO_Bundle = to_recieve_command.acceptKeyCommand(command, text);\n } else {\n strings_for_IO_Bundle = null;\n }\n if (to_recieve_command.hasLivesLeft() == true) {\n char[][] view = makeView(to_recieve_command.getMapRelation().getMyXCoordinate(),\n to_recieve_command.getMapRelation().getMyYCoordinate(),\n width_from_center, height_from_center);\n int[][] colors = makeColors(to_recieve_command.getMapRelation().getMyXCoordinate(),\n to_recieve_command.getMapRelation().getMyYCoordinate(),\n width_from_center, height_from_center);\n if (!Key_Commands.DO_ABSOLUTELY_NOTHING.equals(command)) {\n System.out.println(items_list_);\n makeTakeTurns();//Make all the maptiles take a turn.\n }\n IO_Bundle return_package = new IO_Bundle(\n to_recieve_command.getObservationString(),\n view,\n colors,\n to_recieve_command.getInventory(),\n // Don't for get left and right hand items\n to_recieve_command.getStatsPack(), to_recieve_command.getOccupation(),\n to_recieve_command.getNum_skillpoints_(), to_recieve_command.getBind_wounds_(),\n to_recieve_command.getBargain_(), to_recieve_command.getObservation_(),\n to_recieve_command.getPrimaryEquipped(),\n to_recieve_command.getSecondaryEquipped(),\n strings_for_IO_Bundle,\n to_recieve_command.getNumGoldCoins(),\n to_recieve_command.hasLivesLeft()\n );\n return return_package;\n } else {\n char[][] view = null;\n int[][] colors = null;\n return make_dead_packet();\n }\n } else if (command == null) {\n IO_Bundle return_package = new IO_Bundle(to_recieve_command.getObservationString(),\n null, null, to_recieve_command.getInventory(),\n // Don't for get left and right hand items\n to_recieve_command.getStatsPack(), to_recieve_command.getOccupation(),\n to_recieve_command.getNum_skillpoints_(), to_recieve_command.getBind_wounds_(),\n to_recieve_command.getBargain_(), to_recieve_command.getObservation_(),\n to_recieve_command.getPrimaryEquipped(),\n to_recieve_command.getSecondaryEquipped(),\n strings_for_IO_Bundle,\n to_recieve_command.getNumGoldCoins(),\n to_recieve_command.hasLivesLeft()\n );\n return return_package;\n } else {\n System.err.println(\"avatar + \" + username + \" is invalid. \\n\"\n + \"Please check username and make sure he is on the map.\");\n return null;\n }\n } else {\n System.out.println(username + \" cannot be found on this map.\");\n return null;\n }\n }", "@Override\r\n\tpublic void send(JT808ProtocalPack message) throws Exception {\n\r\n\t}", "synchronized byte[] pack(String c, Map<String, ?> meta) throws IOException {\n byte[] cmdS = c.getBytes();\n int l = cmdS.length + 1;\n\n byte[] metaS = null;\n if (meta != null) {\n StringBuilder sb = new StringBuilder();\n for (String k : meta.keySet()) {\n sb.append(k).append(\":\").append(meta.get(k).toString()).append('\\n');\n }\n metaS = sb.toString().getBytes();\n l += metaS.length;\n }\n l++;\n\n byte[] out = new byte[l + 5];\n\n // TODO: fully convert to proto\n CodedOutputStreamMicro outb = CodedOutputStreamMicro.newInstance(out);\n\n outb.writeRawByte(0);\n outb.writeRawLittleEndian32(l);\n\n outb.writeRawBytes(cmdS);\n outb.writeRawByte('\\n');\n\n if (metaS != null) {\n outb.writeRawBytes(metaS);\n }\n outb.writeRawByte('\\n');\n\n return out;\n }", "public void sendCommands(String command) {\n try {\n printStream.print(command);\n }\n catch (Exception e){\n\n }\n\n\n }", "public void sendCommand(short[] commandBytes) {\n\t\tshort[] toSend = new short[commandBytes.length + 1];\n\t\ttoSend[0] = IAC;\n\t\tSystem.arraycopy(commandBytes, 0, toSend, 1, commandBytes.length);\n\t\toutWriter.write(toSend);\n\t}", "public String build() {\n this.message_string = \"{\";\n\n if (this.recipient_id != null) {\n this.message_string += \"\\\"recipient\\\": {\\\"id\\\": \\\"\" + this.recipient_id + \"\\\"},\";\n }\n\n if ((this.message_text != null)\n && !(this.message_text.equals(\"\"))\n && !(this.buttons.isEmpty())) {\n this.message_string += \"\\\"message\\\": {\";\n this.message_string += \"\\\"attachment\\\": {\";\n this.message_string += \"\\\"type\\\": \\\"template\\\",\";\n this.message_string += \"\\\"payload\\\": {\";\n this.message_string += \"\\\"template_type\\\": \\\"button\\\",\";\n this.message_string += \"\\\"text\\\": \\\"\" + this.message_text + \"\\\",\";\n this.message_string += \"\\\"buttons\\\":[\";\n for (int j = 0; j < this.buttons.size(); j++) {\n HashMap<String, String> button = this.buttons.get(j);\n this.message_string += \"{\";\n if (!button.get(\"type\").equals(\"\")) {\n this.message_string += \"\\\"type\\\":\\\"\" + button.get(\"type\") + \"\\\",\";\n }\n if (!button.get(\"title\").equals(\"\")) {\n this.message_string += \"\\\"title\\\":\\\"\" + button.get(\"title\") + \"\\\",\";\n }\n if (!button.get(\"url\").equals(\"\")) {\n this.message_string += \"\\\"url\\\":\\\"\" + button.get(\"url\") + \"\\\",\";\n }\n if (!button.get(\"payload\").equals(\"\")) {\n this.message_string += \"\\\"payload\\\":\\\"\" + button.get(\"payload\") + \"\\\",\";\n }\n if (!button.get(\"webview_height_ratio\").equals(\"\")) {\n this.message_string +=\n \"\\\"webview_height_ratio\\\":\\\"\"\n + button.get(\"webview_height_ratio\")\n + \"\\\",\";\n }\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n this.message_string += \"},\";\n }\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n this.message_string += \"]\";\n this.message_string += \"}\";\n this.message_string += \"}\";\n this.message_string += \"}\";\n }\n\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n\n this.message_string += \"}\";\n\n return this.message_string;\n }", "public String toJson()\n\t{\n\t\tJsonStringEncoder encoder = JsonStringEncoder.getInstance();\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append('{');\n\n\t\tboolean needComma = true;\n\t\tif (m_Message != null)\n\t\t{\n\t\t\tchar [] message = encoder.quoteAsString(m_Message.toString());\n\t\t\tbuilder.append(\"\\n \\\"message\\\" : \\\"\").append(message).append('\"').append(',');\n\t\t\tneedComma = false;\n\t\t}\n\n\t\tif (m_ErrorCode != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n \\\"errorCode\\\" : \").append(m_ErrorCode.getValueString());\n\t\t\tneedComma = true;\n\t\t}\n\n\t\tif (m_Cause != null)\n\t\t{\n\t\t\tif (needComma)\n\t\t\t{\n\t\t\t\tbuilder.append(',');\n\t\t\t}\n\t\t\tchar [] cause = encoder.quoteAsString(m_Cause.toString());\n\t\t\tbuilder.append(\"\\n \\\"cause\\\" : \\\"\").append(cause).append('\"');\n\t\t}\n\n\t\tbuilder.append(\"\\n}\\n\");\n\n\t\treturn builder.toString();\n\t}", "private void sendSyncCommand() throws IOException {\n System.out.print(addressPort);\n System.out.println(\"Send Synchronizatin Command\");\n DataOutputStream dos = new DataOutputStream(os);\n for (int i = 0; i < syncCmd.list.size(); i++) {\n System.out.print(\"CODE: \");\n System.out.println(syncCmd.list.get(i).code);\n System.out.print(\"PARENT1: \");\n System.out.println(syncCmd.list.get(i).parent1);\n System.out.print(\"PARENT2: \");\n System.out.println(syncCmd.list.get(i).parent2);\n System.out.print(\"NAME1: \");\n System.out.println(syncCmd.list.get(i).name1);\n System.out.print(\"NAME2: \");\n System.out.println(syncCmd.list.get(i).name2);\n System.out.print(\"ADDRESSPORT: \");\n System.out.println(syncCmd.list.get(i).addressPort);\n }\n\n for (int i = 0; i < syncCmd.list.size(); i++) {\n dos.writeByte(syncCmd.list.get(i).code);\n dos.writeUTF(syncCmd.list.get(i).parent1);\n dos.writeUTF(syncCmd.list.get(i).parent2);\n dos.writeUTF(syncCmd.list.get(i).name1);\n dos.writeUTF(syncCmd.list.get(i).name2);\n dos.writeUTF(syncCmd.list.get(i).addressPort);\n }\n dos.writeByte(Message.MSG_NEW_KEY);\n synchronized (GUITracker.onlinePeer) {\n dos.writeUTF(Util.convertBytesToBase64(GUITracker.RC4KeyByte));\n }\n }" ]
[ "0.5837356", "0.5701009", "0.55814457", "0.54308724", "0.54115665", "0.54000276", "0.53529465", "0.530534", "0.5285193", "0.52290434", "0.52139986", "0.5213213", "0.518951", "0.51878744", "0.51750416", "0.51733005", "0.51721543", "0.51498", "0.5143694", "0.5132213", "0.51224005", "0.512152", "0.5120079", "0.5083895", "0.5081918", "0.507663", "0.5061773", "0.5053044", "0.50523525", "0.50468403", "0.50398386", "0.50336635", "0.5021758", "0.50166035", "0.500368", "0.49985987", "0.49979544", "0.49669647", "0.49642876", "0.49638268", "0.49635813", "0.4958539", "0.49558726", "0.4952309", "0.4934739", "0.4932958", "0.49280652", "0.4927824", "0.49250722", "0.49221286", "0.4906781", "0.49058142", "0.4898906", "0.48971432", "0.4891978", "0.48914135", "0.48894563", "0.48796836", "0.48775023", "0.4863246", "0.48605925", "0.48501068", "0.48366138", "0.48328644", "0.4831331", "0.48312372", "0.4811846", "0.4809398", "0.48048443", "0.47937942", "0.47843653", "0.47769752", "0.47766796", "0.47748733", "0.4767711", "0.47576314", "0.4757199", "0.47522172", "0.47479483", "0.47432834", "0.47390133", "0.47386593", "0.4732012", "0.4729691", "0.4729456", "0.47292963", "0.47252846", "0.47246188", "0.47245342", "0.47227898", "0.47211996", "0.47207308", "0.47190833", "0.4718299", "0.4711362", "0.47111022", "0.4710951", "0.47109443", "0.4709204", "0.47068572" ]
0.61476433
0
This method is used to parse the TADK Response
public static DeviceData decode(byte[] rawData) throws FailedToDecode { int sync = (int)((rawData[1]&0xff)<<8 | (rawData[0]&0xff)); if(sync != 0xaaaa){ throw new FailedToDecode("in correct sync = "+sync); } //int messageIndex = rawData[2] + rawData[3] * 256; short response = (short)((rawData[5]&0xff)<<8 | (rawData[4]&0xff)); int channel = (short)((rawData[7]&0xff)<<8 | (rawData[6]&0xff)); int rta = (short)((rawData[9]&0xff)<<8 | (rawData[8]&0xff)); int txrx = (short)((rawData[11]&0xff)<<8 | (rawData[10]&0xff)); int subadd = (short)((rawData[13]&0xff)<<8 | (rawData[12]&0xff)); int count = (short)((rawData[15]&0xff)<<8 | (rawData[14]&0xff)); int status = (short)((rawData[17]&0xff)<<8 | (rawData[16]&0xff)); short[] data = new short[count]; for (int i = 0, j = 0; i < count; i++,j+=2) { data[i] = (short)((rawData[19+j]&0xff)<<8 | (rawData[18+j]&0xff)); } return new DeviceData(rta, subadd, txrx, data, status, channel,response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parseResponse();", "private Collection<TremorRecord> parseResponse(HttpResponse successResponse) \r\n\t\t\t\t\t\t\t\t\t\t\tthrows XmlPullParserException, IOException, NumberFormatException, ParseException {\r\n\t\tArrayList<TremorRecord> tremors = new ArrayList<TremorRecord>();\r\n\t\t\r\n\t\tXmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();\r\n\t\tparser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);\r\n\t\t\r\n\t\tparser.setInput(successResponse.getEntity().getContent(), null);\r\n\t\t\r\n\t\tint eventType = parser.getEventType();\r\n\t\t\r\n\t\tTremorRecord record = null;\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(TremorConstants.USGS_DATE_FORMAT);\r\n\t\t\r\n\t\twhile(eventType != XmlPullParser.END_DOCUMENT) {\r\n\t\t\tswitch(eventType) {\r\n\t\t\tcase XmlPullParser.START_TAG:\r\n\t\t\t\tString tagName = parser.getName();\r\n\t\t\t\tLog.v(TremorConstants.LOG_TAG, \"XML Parsing---> Start Tag [\" + tagName + \"]\");\r\n\t\t\t\t\r\n\t\t\t\tif(TremorConstants.XML_TAG_ITEM.equals(tagName)) {\r\n\t\t\t\t\trecord = new TremorRecord();\r\n\t\t\t\t} else if(record != null) {\r\n\t\t\t\t\tString val = parser.nextText();\r\n\t\t\t\t\t\r\n\t\t\t\t\tLog.v(TremorConstants.LOG_TAG, \"XML Parsing---> Value [\" + val + \"]\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TremorConstants.XML_TAG_TITLE.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setTitle(val);\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_DEPTH.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setDepthKm(Double.valueOf(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_DESC.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setDescriptionHtml(val);\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_LAT.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setLatitude(Double.valueOf(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_LONG.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setLongitude(Double.valueOf(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_PUBDATE.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setPubDate(sdf.parse(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_REGION.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setRegion(val);\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_SECONDS.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setEventDateUtc(new Date(Long.parseLong(val) * 1000));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_SUBJECT.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setFloorMag(Integer.valueOf(val));\r\n\t\t\t\t\t} else if(TremorConstants.XML_TAG_URL.equals(tagName)) {\r\n\t\t\t\t\t\trecord.setUrl(val);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase XmlPullParser.END_TAG:\r\n\t\t\t\ttagName = parser.getName();\r\n\t\t\t\tif(TremorConstants.XML_TAG_ITEM.equals(tagName)) {\r\n\t\t\t\t\tLog.v(TremorConstants.LOG_TAG, \"Finished parsing record, adding to collection. \" +\r\n\t\t\t\t\t\t\t\"Record [\" + record.toString() + \"].\");\r\n\t\t\t\t\t\r\n\t\t\t\t\ttremors.add(record);\r\n\t\t\t\t\trecord = null;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\teventType = parser.next();\r\n\t\t}\r\n\t\t\r\n\t\treturn tremors;\r\n\t}", "public static GetYYT_DTXYJCBGResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetYYT_DTXYJCBGResponse object = new GetYYT_DTXYJCBGResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetYYT_DTXYJCBGResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetYYT_DTXYJCBGResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetYYT_DTXYJCBGResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetYYT_DTXYJCBGResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetYYT_DTXYJCBGResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetYYT_DTXYJCBGResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static GetYYT_CTBGResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetYYT_CTBGResponse object = new GetYYT_CTBGResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetYYT_CTBGResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetYYT_CTBGResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetYYT_CTBGResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetYYT_CTBGResult\").equals(reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetYYT_CTBGResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetYYT_CTBGResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static HelloAuthenticatedResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedResponse object =\n new HelloAuthenticatedResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "protected CosServiceResponse<T> parseResponseMetadata(CosHttpResponse response) {\n CosServiceResponse<T> cosResponse = new CosServiceResponse<T>();\n String cosRequestId = response.getHeaders().get(Headers.REQUEST_ID);\n String cosTraceId = response.getHeaders().get(Headers.TRACE_ID);\n String ciRequestId = response.getHeaders().get(Headers.CI_REQUEST_ID);\n\n Map<String, String> metadataMap = new HashMap<String, String>();\n metadataMap.put(Headers.REQUEST_ID, cosRequestId);\n metadataMap.put(Headers.TRACE_ID, cosTraceId);\n metadataMap.put(Headers.CI_REQUEST_ID, ciRequestId);\n cosResponse.setResponseMetadata(new ResponseMetadata(metadataMap));\n\n return cosResponse;\n }", "public static HashMap<String, Object> getTKXValues(String Response) throws Exception {\n\t\tSystem.out.println(Response);\r\n\t\tObjectMapper objectMapper = new ObjectMapper();\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\t// convert JSON string to Map\r\n\t\tmap = objectMapper.readValue(Response, new TypeReference<Map<String, Object>>() {\r\n\t\t});\r\n\t\tHashMap<String, Object> returnValues = new HashMap<String, Object>();\r\n\t\tHashMap<String, Object> geoMap = null;\r\n\t\t// System.out.println(map.size());\r\n\t\tMap<String, String> dynamicValuesMap = new HashMap<String, String>();\r\n\t\t// System.out.println(map.size());\r\n\t\tHashMap<String, Object> data = (HashMap<String, Object>) map.get(\"user\");\r\n\t\tHashMap<String, Object> station = (HashMap<String, Object>) map.get(\"station\");\r\n\t\tSystem.out.println(\"======\" + station);\r\n\t\tMap<String, Object> attributes = (Map<String, Object>) data.get(\"geo-station\");\r\n\t\tSystem.out.println(attributes.get(\"callsign\"));\r\n\t\tSystem.out.println(data.get(\"geoZip\"));\r\n\t\tfor (String key : data.keySet()) {\r\n\t\t\tSystem.out.println(key + \"value\" + data.get(key));\r\n\t\t}\r\n\t\treturnValues.put(\"callsign\", attributes.get(\"callsign\"));\r\n\t\treturnValues.put(\"geoZip\", data.get(\"geoZip\"));\r\n\t\treturnValues.put(\"showDetails\", station);\r\n\t\treturn returnValues;\r\n\t}", "public Void parseResponse(String str) {\n return null;\n }", "public static GetYYT_YDBGResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetYYT_YDBGResponse object = new GetYYT_YDBGResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetYYT_YDBGResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetYYT_YDBGResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetYYT_YDBGResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetYYT_YDBGResult\").equals(reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetYYT_YDBGResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetYYT_YDBGResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static GetYYT_DTXDTBGResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetYYT_DTXDTBGResponse object = new GetYYT_DTXDTBGResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetYYT_DTXDTBGResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetYYT_DTXDTBGResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetYYT_DTXDTBGResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetYYT_DTXDTBGResult\").equals(reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetYYT_DTXDTBGResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetYYT_DTXDTBGResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static GetYYT_ZQGSZSYBGResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetYYT_ZQGSZSYBGResponse object = new GetYYT_ZQGSZSYBGResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetYYT_ZQGSZSYBGResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetYYT_ZQGSZSYBGResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetYYT_ZQGSZSYBGResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetYYT_ZQGSZSYBGResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetYYT_ZQGSZSYBGResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetYYT_ZQGSZSYBGResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static HelloAuthenticatedWithEntitlementPrecheckResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedWithEntitlementPrecheckResponse object =\n new HelloAuthenticatedWithEntitlementPrecheckResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedWithEntitlementPrecheckResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedWithEntitlementPrecheckResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetDictionaryPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDictionaryPageResponse object =\n new GetDictionaryPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDictionaryPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDictionaryPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "public static GetVehicleAlarmInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPageResponse object =\n new GetVehicleAlarmInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetBillDetailByAdResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetBillDetailByAdResponse object = new GetBillDetailByAdResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetBillDetailByAdResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetBillDetailByAdResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetBillDetailByAdResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetBillDetailByAdResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetBillDetailByAdResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetBillDetailByAdResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static HelloAuthenticatedWithEntitlementsResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedWithEntitlementsResponse object =\n new HelloAuthenticatedWithEntitlementsResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedWithEntitlementsResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedWithEntitlementsResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private AuthenticationResult processTokenResponse(HttpWebResponse webResponse, final HttpEvent httpEvent)\n throws AuthenticationException {\n final String methodName = \":processTokenResponse\";\n AuthenticationResult result;\n String correlationIdInHeader = null;\n String speRing = null;\n if (webResponse.getResponseHeaders() != null) {\n if (webResponse.getResponseHeaders().containsKey(\n AuthenticationConstants.AAD.CLIENT_REQUEST_ID)) {\n // headers are returning as a list\n List<String> listOfHeaders = webResponse.getResponseHeaders().get(\n AuthenticationConstants.AAD.CLIENT_REQUEST_ID);\n if (listOfHeaders != null && listOfHeaders.size() > 0) {\n correlationIdInHeader = listOfHeaders.get(0);\n }\n }\n\n if (webResponse.getResponseHeaders().containsKey(AuthenticationConstants.AAD.REQUEST_ID_HEADER)) {\n // headers are returning as a list\n List<String> listOfHeaders = webResponse.getResponseHeaders().get(\n AuthenticationConstants.AAD.REQUEST_ID_HEADER);\n if (listOfHeaders != null && listOfHeaders.size() > 0) {\n Logger.v(TAG + methodName, \"Set request id header. \" + \"x-ms-request-id: \" + listOfHeaders.get(0));\n httpEvent.setRequestIdHeader(listOfHeaders.get(0));\n }\n }\n\n if (null != webResponse.getResponseHeaders().get(X_MS_CLITELEM) && !webResponse.getResponseHeaders().get(X_MS_CLITELEM).isEmpty()) {\n final CliTelemInfo cliTelemInfo =\n TelemetryUtils.parseXMsCliTelemHeader(\n webResponse.getResponseHeaders()\n .get(X_MS_CLITELEM).get(0)\n );\n\n if (null != cliTelemInfo) {\n httpEvent.setXMsCliTelemData(cliTelemInfo);\n speRing = cliTelemInfo.getSpeRing();\n }\n }\n }\n\n final int statusCode = webResponse.getStatusCode();\n\n if (statusCode == HttpURLConnection.HTTP_OK\n || statusCode == HttpURLConnection.HTTP_BAD_REQUEST\n || statusCode == HttpURLConnection.HTTP_UNAUTHORIZED) {\n try {\n result = parseJsonResponse(webResponse.getBody());\n if (result != null) {\n if (null != result.getErrorCode()) {\n result.setHttpResponse(webResponse);\n }\n\n final CliTelemInfo cliTelemInfo = new CliTelemInfo();\n cliTelemInfo._setSpeRing(speRing);\n result.setCliTelemInfo(cliTelemInfo);\n httpEvent.setOauthErrorCode(result.getErrorCode());\n }\n } catch (final JSONException jsonException) {\n throw new AuthenticationException(ADALError.SERVER_INVALID_JSON_RESPONSE,\n \"Can't parse server response. \" + webResponse.getBody(),\n webResponse, jsonException);\n }\n } else if (statusCode >= HttpURLConnection.HTTP_INTERNAL_ERROR && statusCode <= MAX_RESILIENCY_ERROR_CODE) {\n throw new ServerRespondingWithRetryableException(\"Server Error \" + statusCode + \" \"\n + webResponse.getBody(), webResponse);\n } else {\n throw new AuthenticationException(ADALError.SERVER_ERROR,\n \"Unexpected server response \" + statusCode + \" \" + webResponse.getBody(),\n webResponse);\n }\n\n // Set correlationId in the result\n if (correlationIdInHeader != null && !correlationIdInHeader.isEmpty()) {\n try {\n UUID correlation = UUID.fromString(correlationIdInHeader);\n if (!correlation.equals(mRequest.getCorrelationId())) {\n Logger.w(TAG + methodName, \"CorrelationId is not matching\", \"\",\n ADALError.CORRELATION_ID_NOT_MATCHING_REQUEST_RESPONSE);\n }\n\n Logger.v(TAG + methodName, \"Response correlationId:\" + correlationIdInHeader);\n } catch (IllegalArgumentException ex) {\n Logger.e(TAG + methodName, \"Wrong format of the correlation ID:\" + correlationIdInHeader, \"\",\n ADALError.CORRELATION_ID_FORMAT, ex);\n }\n }\n\n if (null != webResponse.getResponseHeaders()) {\n final List<String> xMsCliTelemValues = webResponse.getResponseHeaders().get(X_MS_CLITELEM);\n if (null != xMsCliTelemValues && !xMsCliTelemValues.isEmpty()) {\n // Only one value is expected to be present, so we'll grab the first element...\n final String speValue = xMsCliTelemValues.get(0);\n final CliTelemInfo cliTelemInfo = TelemetryUtils.parseXMsCliTelemHeader(speValue);\n if (result != null) {\n result.setCliTelemInfo(cliTelemInfo);\n }\n }\n }\n\n return result;\n }", "public Map<String, Object> parseResponse(String response, String service, String version) throws TransformersException {\n\t\treturn parseResponse(response, service, getMethodName(service), version);\n\t}", "public static void parseResponse(byte[] response) {\n int qr = ((response[2] & 0b10000000) >> 7);\n int opcode = ((response[2] & 0b01111000) >> 3);\n int aa = ((response[2] & 0b00000100) >> 2);\n int tc = ((response[2] & 0b00000010) >> 1);\n int rd = (response[2] & 0b00000001);\n int ra = ((response[3] & 0b10000000) >> 7);\n int res1 = ((response[3] & 0b01000000) >> 6);\n int res2 = ((response[3] & 0b00100000) >> 5);\n int res3 = ((response[3] & 0b00010000) >> 4);\n int rcode = (response[3] & 0b00001111);\n int qdcount = (response[4] << 8 | response[5]);\n int ancount = (response[6] << 8 | response[7]);\n int nscount = (response[8] << 8 | response[9]);\n int arcount = (response[10] << 8 | response[11]);\n/*\n System.out.println(\"QR: \" + qr);\n System.out.println(\"OPCODE: \"+ opcode);\n System.out.println(\"AA: \" + aa);\n System.out.println(\"TC: \" + tc);\n System.out.println(\"RD: \" + rd);\n System.out.println(\"RA: \" + ra);\n System.out.println(\"RES1: \" + res1);\n System.out.println(\"RES2: \" + res2);\n System.out.println(\"RES3: \" + res3);\n System.out.println(\"RCODE: \" + rcode);\n System.out.println(\"QDCOUNT: \" + qdcount);\n System.out.println(\"ANCOUNT: \" + ancount);\n System.out.println(\"NSCOUNT: \" + nscount);\n System.out.println(\"ARCOUNT: \" + arcount);\n*/\n // WHO DESIGNED THE DNS PACKET FORMAT AND WHY DID THEY ADD POINTERS?!?\n HashMap<Integer, String> foundLabels = new HashMap<>();\n\n int curByte = 12;\n for(int i = 0; i < qdcount; i++) {\n ArrayList<Integer> currentLabels = new ArrayList<>();\n while(true) {\n if((response[curByte] & 0b11000000) != 0) {\n // Labels have a length value, the first two bits have to be 0.\n System.out.println(\"ERROR\\tInvalid label length in response.\");\n System.exit(1);\n }\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n currentLabels.add(pntr);\n for(Integer n : currentLabels) {\n if(foundLabels.containsKey(n)) {\n foundLabels.put(n, foundLabels.get(n) + \".\" + working.toString());\n } else {\n foundLabels.put(n, working.toString());\n }\n }\n }\n\n // Increment curByte every time we use it, meaning it always points to the byte we haven't used.\n short qtype = (short) ((response[curByte++] << 8) | response[curByte++]);\n short qclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n }\n\n // This for loop handles all the Answer section parts.\n for(int i = 0; i < ancount; i++) {\n StringBuilder recordName = new StringBuilder();\n while(true) {\n if((response[curByte] & 0b11000000) == 0b11000000) {\n recordName.append(foundLabels.get(((response[curByte++] & 0b00111111) << 8) | response[curByte++]));\n break;\n } else if ((response[curByte] & 0b11000000) == 0) {\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n recordName.append(working.toString());\n foundLabels.put(pntr, working.toString());\n } else {\n System.out.println(\"ERROR\\tInvalid label.\");\n System.exit(1);\n }\n }\n short type = (short) ((response[curByte++] << 8) | response[curByte++]);\n short dnsclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n int ttl = ((response[curByte++] << 24) | (response[curByte++] << 16) | (response[curByte++] << 8) | response[curByte++]);\n short rdlength = (short) ((response[curByte++] << 8) | response[curByte++]);\n\n // If it is an A record\n if(type == 1) {\n\n // If it is an invalid length\n if(rdlength != 4) {\n System.out.println(\"ERROR\\tA records should only have a 4 byte RDATA\");\n System.exit(1);\n }\n\n // Output the IP record\n System.out.println(\"IP\\t\" + (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \".\" +\n (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \"\\tnonauth\");\n }\n else if(type == 5){\n\n // Creates string to hold combined record\n String cnameRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte++] & 0xFF;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte] & 0xff;\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n cnameRecord += \".\";\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n cnameRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n cnameRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"CNAME\\t\" + cnameRecord + \"\\tnonauth\");\n }\n else if(type == 2){\n\n // Creates string to hold combined record\n String nsRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n nsRecord += \".\";\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n nsRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n nsRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"NS\\t\" + nsRecord + \"\\tnonauth\");\n }\n else if(type == 15){\n\n // Creates string to hold combined record\n String mxRecord = \"\";\n\n curByte ++;\n\n // Gets the preference number of the given mail server\n int preference = (int) response[curByte];\n\n curByte++;\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n mxRecord += \".\";\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n mxRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n mxRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"MX\\t\" + mxRecord + \"\\t\" + preference + \"\\tnonauth\");\n }\n }\n\n for(int i = 0; i < nscount; i++) {\n StringBuilder recordName = new StringBuilder();\n while(true) {\n if((response[curByte] & 0b11000000) == 0b11000000) {\n recordName.append(foundLabels.get(((response[curByte++] & 0b00111111) << 8) | response[curByte++]));\n break;\n } else if ((response[curByte] & 0b11000000) == 0) {\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n recordName.append(working.toString());\n foundLabels.put(pntr, working.toString());\n } else {\n System.out.println(\"ERROR\\tInvalid label.\");\n System.exit(1);\n }\n }\n short type = (short) ((response[curByte++] << 8) | response[curByte++]);\n short dnsclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n int ttl = ((response[curByte++] << 24) | (response[curByte++] << 16) | (response[curByte++] << 8) | response[curByte++]);\n short rdlength = (short) ((response[curByte++] << 8) | response[curByte++]);\n\n if(type == 1) {\n if(rdlength != 4) {\n System.out.println(\"ERROR\\tA records should only have a 4 byte RDATA\");\n System.exit(1);\n }\n System.out.println(\"IP\\t\" + (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \".\" +\n (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \"\\tauth\");\n }\n // If CNAME\n else if(type == 5){\n\n // Creates string to hold combined record\n String cnameRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n cnameRecord += \".\";\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n cnameRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n cnameRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"CNAME\\t\" + cnameRecord + \"\\tauth\");\n }\n else if(type == 2){\n\n // Creates string to hold combined record\n String nsRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n nsRecord += \".\";\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n nsRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n nsRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"NS\\t\" + nsRecord + \"\\tauth\");\n\n }\n else if(type == 15){\n\n // Creates string to hold combined record\n String mxRecord = \"\";\n\n curByte ++;\n\n // Gets the preference number of the given mail server\n int preference = (int) response[curByte];\n\n curByte++;\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n mxRecord += \".\";\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n mxRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n mxRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"MX\\t\" + mxRecord + \"\\t\" + preference + \"\\tauth\");\n }\n }\n }", "public static GetYYT_XDTBGResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetYYT_XDTBGResponse object = new GetYYT_XDTBGResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetYYT_XDTBGResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetYYT_XDTBGResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetYYT_XDTBGResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetYYT_XDTBGResult\").equals(reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetYYT_XDTBGResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetYYT_XDTBGResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public static GetVehicleRecordPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleRecordPageResponse object =\n new GetVehicleRecordPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleRecordPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleRecordPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetTerminalCardTypeResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetTerminalCardTypeResponse object =\n new GetTerminalCardTypeResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getTerminalCardTypeResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetTerminalCardTypeResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getTerminalCardTypeReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetTerminalCardTypeReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetTerminalCardTypeReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static TerminalReturnCardResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n TerminalReturnCardResponse object =\n new TerminalReturnCardResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"terminalReturnCardResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (TerminalReturnCardResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"terminalReturnCardReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setTerminalReturnCardReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setTerminalReturnCardReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public IMAPUntaggedResponse(String keyword, byte [] response) {\n super(response); \n this.keyword = keyword; \n }", "protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse r7) {\n /*\n r6 = this;\n r5 = 1;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"StatusCode=\";\n r0 = r0.append(r1);\n r1 = r7.statusCode;\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = \"infoss\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"code==\";\n r1 = r1.append(r2);\n r2 = r7.statusCode;\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r2 = \"\";\n r0 = r7.statusCode;\n r1 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r0 != r1) goto L_0x013e;\n L_0x003b:\n r0 = org.greenrobot.eventbus.c.a();\n r1 = 3;\n r3 = 0;\n r1 = com.jd.fridge.bean.Event.newEvent(r1, r3);\n r0.c(r1);\n r1 = new java.lang.String;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r7.data;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = r7.headers;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = com.android.volley.toolbox.HttpHeaderParser.parseCharset(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r1.<init>(r0, r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n if (r0 == 0) goto L_0x005e;\n L_0x0059:\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.a(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x005e:\n r0 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = \"jsonStr===\";\n r0 = r0.append(r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.k.a(r0);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"jsonStr==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"gson==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r4 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r3.fromJson(r1, r4);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.fromJson(r1, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders(r7);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = com.android.volley.Response.success(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x00bc:\n return r0;\n L_0x00bd:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=1111111=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n L_0x00e6:\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n r0 = com.android.volley.Response.error(r0);\n goto L_0x00bc;\n L_0x00f0:\n r0 = move-exception;\n r1 = r2;\n L_0x00f2:\n r2 = r6.c;\n if (r2 == 0) goto L_0x00fb;\n L_0x00f6:\n r2 = r6.c;\n r2.a(r1);\n L_0x00fb:\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"JsonSyntaxException=222=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x0114:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=333=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x013e:\n r0 = \"infos\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"response fail: \";\n r1 = r1.append(r2);\n r2 = r7.data;\n r2 = r2.toString();\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"result=\";\n r0 = r0.append(r1);\n r1 = r7.data;\n r1 = r1.toString();\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = r6.f;\n r0.a(r5);\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n com.android.volley.Response.error(r0);\n goto L_0x00e6;\n L_0x0187:\n r0 = move-exception;\n goto L_0x00f2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.jd.fridge.util.a.d.parseNetworkResponse(com.android.volley.NetworkResponse):com.android.volley.Response<T>\");\n }", "private static String parseResponse(HttpResponse response) throws Exception {\r\n \t\tString result = null;\r\n \t\tBufferedReader reader = null;\r\n \t\ttry {\r\n \t\t\tHeader contentEncoding = response\r\n \t\t\t\t\t.getFirstHeader(\"Content-Encoding\");\r\n \t\t\tif (contentEncoding != null\r\n \t\t\t\t\t&& contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(\r\n \t\t\t\t\t\tnew GZIPInputStream(response.getEntity().getContent())));\r\n \t\t\t} else {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(response\r\n \t\t\t\t\t\t.getEntity().getContent()));\r\n \t\t\t}\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tString line = null;\r\n \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\tresult = sb.toString();\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\treader.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn result;\r\n \t}", "public static GetVehicleInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPageResponse object =\n new GetVehicleInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static DoControlResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DoControlResponse object =\n new DoControlResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"doControlResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DoControlResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetYYT_XXBGResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetYYT_XXBGResponse object = new GetYYT_XXBGResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetYYT_XXBGResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetYYT_XXBGResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetYYT_XXBGResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetYYT_XXBGResult\").equals(reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetYYT_XXBGResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetYYT_XXBGResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "@Override\n protected Response<T> parseNetworkResponse(NetworkResponse networkResponse) {\n Response<T> response;\n try {\n String json = new String(networkResponse.data, HttpHeaderParser.parseCharset(networkResponse.headers));\n FRLogger.msg(\"Success Response : \" + json);\n FRLogger.msg(\"Response Code : \" + networkResponse.statusCode);\n\n if (httpResponseValidator.validateHttpResponseForApplicationErrors(json)) {\n T t = null;\n if (typeOfT instanceof Class<?>) {\n if (((Class<?>) typeOfT).getName().equals(String.class.getName())) {\n t = (T) json;\n } else {\n t = jsonParser.fromJson(json, (Class<T>) typeOfT);\n }\n } else {\n t = jsonParser.fromJson(json, typeOfT);\n }\n response = Response.success(t, HttpHeaderParser.parseCacheHeaders(networkResponse));\n } else {\n response = Response.error(new ApplicationError(networkResponse));\n }\n } catch (UnsupportedEncodingException e) {\n response = Response.error(new ParseError(e));\n } catch (JsonSyntaxException je) {\n response = Response.error(new ParseError(je));\n } catch (Exception exp) {\n response = Response.error(new VolleyError(exp));\n }\n return response;\n }", "KafkaResponseParam getResponse();", "public static GetDoctorDeResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetDoctorDeResponse object = new GetDoctorDeResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetDoctorDeResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetDoctorDeResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetDoctorDeResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetDoctorDeResult\").equals(reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetDoctorDeResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetDoctorDeResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static GetDirectSrvInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectSrvInfoResponse object =\n new GetDirectSrvInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectSrvInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectSrvInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectSrvInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectSrvInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectSrvInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static DirectQueryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectQueryResponse object =\n new DirectQueryResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directQueryResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectQueryResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directQueryReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectQueryReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectQueryReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetDirectAreaInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfoResponse object =\n new GetDirectAreaInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectAreaInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectAreaInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectAreaInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private void _parseResponse(String response) {\n if (response != null && response.equals(\"OK\")) {\n String message = getString(R.string.authentication_success_message, _getChallenge().getIdentity().getDisplayName(), _getChallenge().getIdentityProvider().getDisplayName());\n _showAlertWithMessage(getString(R.string.authentication_success_title), message, true, false);\n } else {\n String message = getString(R.string.error_auth_unknown_error);\n boolean retry = false;\n if (response.equals(\"INVALID_CHALLENGE\")) {\n message = getString(R.string.error_auth_invalid_challenge);\n } else if (response.equals(\"INVALID_REQUEST\")) {\n message = getString(R.string.error_auth_invalid_request);\n } else if (response.equals(\"INVALID_RESPONSE\")) {\n message = getString(R.string.error_auth_invalid_response);\n retry = true;\n } else if (response.equals(\"INVALID_USERID\")) {\n message = getString(R.string.error_auth_invalid_userid);\n }\n _showAlertWithMessage(getString(R.string.authentication_failure_title), message, false, retry);\n }\n\n }", "public static LinkIDAuthnResponse parse(final Response response) {\n\n String userId = null;\n Map<String, List<LinkIDAttribute<Serializable>>> attributes = Maps.newHashMap();\n if (!response.getAssertions().isEmpty()) {\n Assertion assertion = response.getAssertions().get( 0 );\n userId = assertion.getSubject().getNameID().getValue();\n attributes.putAll( LinkIDSaml2Utils.getAttributeValues( assertion ) );\n }\n\n LinkIDPaymentResponse paymentResponse = LinkIDSaml2Utils.findPaymentResponse( response );\n LinkIDExternalCodeResponse externalCodeResponse = LinkIDSaml2Utils.findExternalCodeResponse( response );\n\n return new LinkIDAuthnResponse( userId, attributes, paymentResponse, externalCodeResponse );\n }", "java.lang.String getResponse();", "@Override\n void parseOAuthResponse(String data) {\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic Map<String, Object> parseResponse(String response, String service, String method, String version) throws TransformersException {\n\t\tClass<Object> transformerClass;\n\t\tMap<String, Object> res;\n\n\t\tres = null;\n\t\tif (!GenericUtils.assertStringValue(response) || !GenericUtils.assertStringValue(service) || !GenericUtils.assertStringValue(version) || !GenericUtils.assertStringValue(method)) {\n\t\t\tString errorMsg = CaibEsbLanguage.getResIntegra(ILogConstantKeys.TF_LOG003);\n\t\t\tLOGGER.error(errorMsg);\n\t\t\tthrow new TransformersException(errorMsg);\n\t\t}\n\t\ttry {\n\t\t\t// Obtenemos la clase que creara la estructura que contiene una\n\t\t\t// respuesta generada\n\t\t\t// por la plataforma\n\t\t\ttransformerClass = ParseTransformersFactory.getParseTransformer(service, method, version);\n\t\t\tres = (Map) invokeParseTransf(response, transformerClass, service, method, version);\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(e);\n\t\t\tthrow new TransformersException(e);\n\t\t}\n\t\treturn res;\n\t}", "@Override\r\n\tpublic String parseResponses(String unfriendlyString) {\n\t\treturn null;\r\n\t}", "private static ArrayList<Map> formatResponse(String response) {\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t try {\r\n\t\t\tMap res1 = mapper.readValue(response, HashMap.class);\r\n\t\t\t\r\n\t\t\t return (ArrayList<Map>) res1.get(SESSION);\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\t \r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tString response = \"<AuditResultHospital xmlns=\\\"http://schemas.datacontract.org/2004/07/BMI.Engine.Common.Hospital\\\" xmlns:i=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\"\n\t\t\t\t+ \"<ClaimID>50b768e10c02b60f7c9343d9</ClaimID>\" + \"<Elapsed>0:0:0:324.324563</Elapsed>\"\n\t\t\t\t+ \"<Patient_IDStr>0057824702</Patient_IDStr>\" + \"<ViolationResult>\" + \"<RuleResultHospital>\"\n\t\t\t\t+ \"<DetailID>0</DetailID>\" + \"<FullTip/>\" + \"<GroupCode>{30E50964211259DAF0D7832C075574CF}</GroupCode>\"\n\t\t\t\t+ \"<ITEM_ID/>\" + \"<ITEM_NAME/>\" + \"<Reason>诊断信息不规范</Reason>\"\n\t\t\t\t+ \"<Related>50b768e10c02b60f7c9343d9</Related>\" + \"<ResultType>1</ResultType>\"\n\t\t\t\t+ \"<ResultTypeName>非医保支付</ResultTypeName>\" + \"<RuleName>就诊信息数据异常</RuleName>\" + \"<RuleNo>150001</RuleNo>\"\n\t\t\t\t+ \"<TipsCode4Hospital>N</TipsCode4Hospital>\" + \"</RuleResultHospital>\" + \"<RuleResultHospital>\"\n\t\t\t\t+ \"<DetailID>70b768e10c02b60f7c934428</DetailID>\" + \"<FullTip/>\"\n\t\t\t\t+ \"<GroupCode>{ABF47EFF6CDEED4FFF8684A5BD7832CA}</GroupCode>\" + \"<ITEM_ID>x090203004191001</ITEM_ID>\"\n\t\t\t\t+ \"<ITEM_NAME>重组人白介素-11[Ⅰ]</ITEM_NAME>\" + \"<Reason>限放化疗引起的血小板减少患者</Reason>\"\n\t\t\t\t+ \"<Related>50b768e10c02b60f7c9343d9|70b768e10c02b60f7c934428</Related>\" + \"<ResultType>2</ResultType>\"\n\t\t\t\t+ \"<ResultTypeName>待核实</ResultTypeName>\" + \"<RuleName>违反限定适应症(条件)用药</RuleName>\"\n\t\t\t\t+ \"<RuleNo>100301</RuleNo>\" + \"<TipsCode4Hospital>N</TipsCode4Hospital>\" + \"</RuleResultHospital>\"\n\t\t\t\t+ \"<RuleResultHospital>\" + \"<DetailID>70b768e10c02b60f7c934424</DetailID>\" + \"<FullTip/>\"\n\t\t\t\t+ \"<GroupCode>{D3A8CA51A1DB07AA23EF11D8D6295B40}</GroupCode>\" + \"<ITEM_ID>f12010001100</ITEM_ID>\"\n\t\t\t\t+ \"<ITEM_NAME>吸痰护理</ITEM_NAME>\"\n\t\t\t\t+ \"<Reason>重复收费</Reason><Related>50b768e10c02b60f7c9343d9|70b768e10c02b60f7c934422,50b768e10c02b60f7c9343d9|70b768e10c02b60f7c934424</Related>\"\n\t\t\t\t+ \"<ResultType>1</ResultType>\" + \"<ResultTypeName>非医保支付</ResultTypeName>\" + \"<RuleName>重复收费</RuleName>\"\n\t\t\t\t+ \"<RuleNo>130301</RuleNo>\"\n\t\t\t\t+ \"<TipsCode4Hospital>130301|{C81E728D9D4C2F636F067F89CC14862C}@0</TipsCode4Hospital>\"\n\t\t\t\t+ \"</RuleResultHospital>\" + \"</ViolationResult>\" + \"</AuditResultHospital>\";\n\t\tMap<String, Object> map = TransformUtil.xmlToMap(response);\n\t\tSystem.out.println(map);\n\t}", "public static GetVehicleBookPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleBookPageResponse object =\n new GetVehicleBookPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleBookPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleBookPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n distance = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"distance\").getString(\"text\");\n duration = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"duration\").getString(\"text\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static DirectOrderStateQueryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectOrderStateQueryResponse object =\n new DirectOrderStateQueryResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directOrderStateQueryResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectOrderStateQueryResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directOrderStateQueryReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectOrderStateQueryReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectOrderStateQueryReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "static void processResponse(CTPResponse response)\n {\n \tfor(int i=0;i<response.GetNumResponses();i++)\n \t{\n \t\tint type = response.getReponseType(i);\n \t\tswitch (type) {\n\t \t\tcase CTPResponse.ERROR_RSP:{\n\t \t\t\tif(response.getStatus(i)== -1)\n\t \t\t\tSystem.out.println(\"ERROR_RSP Invalid client request\");\t\n\t \t\t\telse\n\t \t\t\tSystem.out.println(\"ERROR_RSP \"+response.getErrorText(i));\t\n\t \t\t\tbreak;\n\t \t\t}\n\t \t\tcase CTPResponse.ACKCONNECT_RSP:{\n\t \t\t\tSystem.out.println(\"ACKCONNECT_RSP received\");\t\n\t \t\t\tbreak;\n\t \t\t}\n\t\t\t\tcase CTPResponse.ACKOPEN_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKOPEN_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKLOCK_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKLOCK_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKEDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKEDIT_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.SERVRELEASE_RSP:{\n\t\t\t\t\tSystem.out.println(\"SERVRELEASE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CONTENTS_RSP:{\n\t\t\t\t\tSystem.out.println(\"CONTENTS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.MOVE_RSP:{\n\t\t\t\t\tSystem.out.println(\"MOVE_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Cursor position in file= \"+response.getPosInfile(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.STATUS_RSP:{\n\t\t\t\t\tSystem.out.println(\"STATUS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Checksum = \"+response.getChecksum(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.EDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"EDIT_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"action = \"+response.getEditAction(i));\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CLOSE_RSP:{\n\t\t\t\t\tSystem.out.println(\"CLOSE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: \n\t\t\t\t\tSystem.out.println(\"Invalid Response type received\");\t\n \t\t}//end switch\n \t}//end for loop\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "public static GetVehicleAlarmInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPage object =\n new GetVehicleAlarmInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetChargetariffResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetChargetariffResponse object = new GetChargetariffResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetChargetariffResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetChargetariffResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetChargetariffResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetChargetariffResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetChargetariffResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetChargetariffResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static MessageResponseOfAnimalModelNuLtuh91 parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n MessageResponseOfAnimalModelNuLtuh91 object = new MessageResponseOfAnimalModelNuLtuh91();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n if (reader.getAttributeValue(\n \"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\") != null) {\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n\n if (fullTypeName != null) {\n java.lang.String nsPrefix = null;\n\n if (fullTypeName.indexOf(\":\") > -1) {\n nsPrefix = fullTypeName.substring(0,\n fullTypeName.indexOf(\":\"));\n }\n\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\n \":\") + 1);\n\n if (!\"MessageResponseOfAnimalModelNuLtuh91\".equals(\n type)) {\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext()\n .getNamespaceURI(nsPrefix);\n\n return (MessageResponseOfAnimalModelNuLtuh91) ExtensionMapper.getTypeObject(nsUri,\n type, reader);\n }\n }\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n reader.next();\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"Body\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setBody(null);\n reader.next();\n\n reader.next();\n } else {\n object.setBody(AnimalModel.Factory.parse(reader));\n\n reader.next();\n }\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"Error\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.setError(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\n content));\n } else {\n reader.getElementText(); // throw away text nodes if any.\n }\n\n reader.next();\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement()) {\n // 2 - A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" + reader.getName());\n }\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\r\n public void onSuccess(String t) {\n super.onSuccess(t);\r\n MyLog.i(\"YUY\", \"车辆违章信息 = \" + t);\r\n\r\n try {\r\n JSONObject jo = new JSONObject(t.toString());\r\n if (jo.getInt(\"result\") == 1) {\r\n mViolationDate = ViolationDate.parse(jo\r\n .getString(\"data\"));\r\n if (Integer.parseInt(mViolationDate.getCount()) == 0) {\r\n ToastUtil.toastShow(\r\n IllegalQueryActivity.this,\r\n \"暂未查到您的违章信息\");\r\n return;\r\n }\r\n if (mViolationDate != null\r\n && mViolationDate.getItem().size() > 0) {\r\n getScoreByIllegalDe();\r\n }\r\n\r\n }\r\n } catch (JSONException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n }", "private String parseSOAPResponse(SoapObject response) {\n\n\t\tString isSuccess =response.getPrimitivePropertySafelyAsString(\"UpdateStundentDetailsResult\");\n\t\t\n\t\treturn isSuccess;\n\t}", "public static GetParkPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetParkPageResponse object =\n new GetParkPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getParkPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetParkPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetEntrancePageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetEntrancePageResponse object =\n new GetEntrancePageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getEntrancePageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetEntrancePageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetDictionaryPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDictionaryPage object =\n new GetDictionaryPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDictionaryPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDictionaryPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetDownLoadCardResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDownLoadCardResponse object =\n new GetDownLoadCardResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDownLoadCardResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDownLoadCardResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDownLoadCardReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDownLoadCardReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDownLoadCardReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static DirectChargeResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectChargeResponse object =\n new DirectChargeResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directChargeResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectChargeResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directChargeReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectChargeReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectChargeReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "protected abstract RS deserializeTokenResponse(String body) throws JsonDeserializationException, OAuthException;", "private void parseAttack()\n\t{\n\n\t\tMatcher rankMatcher = Pattern.compile( \"Your current PvP Ranking is (\\\\d+)\" ).matcher( responseText );\n\t\tif ( rankMatcher.find() )\n\t\t\tKoLCharacter.setPvpRank( StaticEntity.parseInt( rankMatcher.group(1) ) );\n\n\t\t// Trim down the response text so it only includes\n\t\t// the information related to the fight.\n\n\t\tint index = responseText.indexOf( \"<p>Player to attack\" );\n\t\tresponseText = responseText.substring( 0, index == -1 ? responseText.length() : index );\n\t\tsuper.processResults();\n\t}", "@Override\n\tpublic PreviewTransformationActionResult extractResult(Response response) {\n\t\tJSONObject json = JSONParser.parseLenient(response.getText()).isObject();\n\t\tString phenotypeTable_str = json.get(\"transformationTable\").isString().stringValue();\n\t\tDouble spPval = json.get(\"sp_pval\").isNumber().doubleValue();\n\t\tDataTable transformationDataTable = DataTable.create(JSONParser.parseLenient(phenotypeTable_str).isObject().getJavaScriptObject());\n\t\treturn new PreviewTransformationActionResult(transformationDataTable,spPval);\n\t}", "public static GetAnimalResponse parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n GetAnimalResponse object = new GetAnimalResponse();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n if (reader.getAttributeValue(\n \"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\") != null) {\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n\n if (fullTypeName != null) {\n java.lang.String nsPrefix = null;\n\n if (fullTypeName.indexOf(\":\") > -1) {\n nsPrefix = fullTypeName.substring(0,\n fullTypeName.indexOf(\":\"));\n }\n\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\n \":\") + 1);\n\n if (!\"GetAnimalResponse\".equals(type)) {\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext()\n .getNamespaceURI(nsPrefix);\n\n return (GetAnimalResponse) ExtensionMapper.getTypeObject(nsUri,\n type, reader);\n }\n }\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n reader.next();\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://tempuri.org/\", \"GetAnimalResult\").equals(\n reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setGetAnimalResult(null);\n reader.next();\n\n reader.next();\n } else {\n object.setGetAnimalResult(MessageResponseOfAnimalModelNuLtuh91.Factory.parse(\n reader));\n\n reader.next();\n }\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement()) {\n // 2 - A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" + reader.getName());\n }\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n public Object parseNetworkResponse(Response response, int i) throws Exception {\n return response.body().string();\n }", "private String parseRDataAType(ByteBuffer response) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < 3; i++) {\n sb.append(Byte.toUnsignedInt(response.get()));\n sb.append('.');\n }\n sb.append(Byte.toUnsignedInt(response.get()));\n return sb.toString();\n }", "public static TerminalDownloadQueryForDayResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n TerminalDownloadQueryForDayResponse object =\n new TerminalDownloadQueryForDayResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"terminalDownloadQueryForDayResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (TerminalDownloadQueryForDayResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"terminalDownloadQueryForDayReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setTerminalDownloadQueryForDayReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setTerminalDownloadQueryForDayReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Test\n public void atrnTest() {\n assertEquals(\"atrn1\", authResponse.getAtrn());\n }", "public TOUReadResponse()\r\n\t{\r\n\t}", "@Override\n public T parseResponse(Request<T> request, NetworkResponse response) throws Exception {\n if(!SomePreferences.confirmLogin()){\n SomePreferences.clearAuthentication();\n throw new SessionError(\"Not Logged In\");\n }\n Document document = parseDocument(response);\n if(document.body().hasClass(\"database_error\")){\n throw new SomeError(\"SA Database Unavailable, try again later.\");\n }\n if(document.getElementsByClass(\"notregistered\").size() > 0){\n //Not logged in.\n SomePreferences.clearAuthentication();\n throw new SessionError(\"Not Logged In\");\n }\n Element stdErr = document.getElementsByClass(\"standarderror\").first();\n if(stdErr != null){\n //Generic SA error messages\n throw new SomeError(stdErr.getElementsByClass(\"standard\").first().getElementsByClass(\"inner\").first().ownText());\n }\n return parseHtmlResponse(request, response, document);\n }", "private void _parseResponse(JSONObject response) {\n // Parse JSON response\n try {\n int responseCode = response.getInt(\"responseCode\");\n if (responseCode == AuthenticationChallengeResponseCodeSuccess) {\n String message = getString(R.string.authentication_success_message, _getChallenge().getIdentity().getDisplayName(), _getChallenge().getIdentityProvider().getDisplayName());\n _showAlertWithMessage(getString(R.string.authentication_success_title), message, true, false);\n } else {\n boolean retry = false;\n String message = getString(R.string.error_auth_unknown_error);\n if (responseCode == AuthenticationChallengeResponseCodeInvalidChallenge) {\n message = getString(R.string.error_auth_invalid_challenge);\n } else if (responseCode == AuthenticationChallengeResponseCodeInvalidRequest) {\n message = getString(R.string.error_auth_invalid_request);\n } else if (responseCode == AuthenticationChallengeResponseCodeInvalidUsernamePasswordPin) {\n message = getString(R.string.error_auth_invalid_userid);\n }\n\n _showAlertWithMessage(getString(R.string.authentication_failure_title), message, false, retry);\n }\n } catch (JSONException e) {\n _showAlertWithMessage(getString(R.string.authentication_failure_title), getString(R.string.error_auth_invalid_challenge), false, false);\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}", "public static HelloResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloResponse object =\n new HelloResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private void parseResponse(String s)\n {\n s = s.trim();\n if (isNumeric(s))\n {\n int key = Integer.parseInt(s);\n doLookup(key);\n }\n else\n {\n char ch = s.charAt(0);\n if (ch == 'd')\n {\n displayAll();\n }\n else if (ch == 'q')\n {\n done = true;\n }\n else\n {\n System.out.println(\"Please enter 'd', 'q', or an id number\");\n }\n }\n }", "@Override\n\tpublic void parseResponse(String result) {\n\t\ttry {\n\t\t\tJSONTokener jsonParser = new JSONTokener(result);\n\t\t\t// 此时还未读取任何json文本,直接读取就是一个JSONObject对象。\n\t\t\t// 如果此时的读取位置在\"name\" : 了,那么nextValue就是\"yuanzhifei89\"(String)\n\t\t\tJSONObject _ResultObject = (JSONObject) jsonParser.nextValue();\n\t\t\tint _ResultId = _ResultObject.optInt(\"result\");\n\t\t\t\n\t\t\tif (_ResultId == 0) {\t\n\t\t\t\tString _TextString = _ResultObject.optString(\"result_text\");\n\t\t\t\tmActivity.callBack(mActivity.CallbackError,_TextString);\n\t\t\t} else if (_ResultId == 1) {\n\t\t\t\tmList = new ArrayList<JobDept>();\n\t\t\t\tJSONArray _Array= _ResultObject.optJSONArray(\"jobdept\");\n\t\t\t\tfor(int i=0;i<_Array.length();i++){\n\t\t\t\t\tJSONObject proObject = _Array.optJSONObject(i);\n\t\t\t\t\tJobDept _JobDept = new JobDept();\n\t\t\t\t\t_JobDept.setmId(proObject.optString(\"JobDeptID\"));\n\t\t\t\t\t_JobDept.setmName(proObject.optString(\"JobDept\"));\n\t\t\t\t\tmList.add(_JobDept);\n\t\t\t\t}\n\t\t\t\tmActivity.callBack(mActivity.CallbackSuccess,null);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\t// 异常处理代码\n\t\t\tmActivity.callBack(mActivity.CallbackError,MSGHANDLERESULTERROR_STRING);\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private Ticket[] parseList(String HttpResponse){\n if(HttpResponse == null){\n return null;\n }\n //Parse JSON to Object\n Gson g = new GsonBuilder()\n .setDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZ\")\n .create();\n JsonParser parser = new JsonParser();\n try{ // Try to parse the response\n JsonElement root = parser.parse(HttpResponse);\n if(root.isJsonObject()){\n JsonObject ob = root.getAsJsonObject();\n JsonArray ticketsArray = ob.get(\"tickets\").getAsJsonArray();\n Ticket[] tickets = g.fromJson(ticketsArray, Ticket[].class);\n prevPageURL = ob.getAsJsonObject(\"links\").get(\"prev\").getAsString();\n nextPageURL = ob.getAsJsonObject(\"links\").get(\"next\").getAsString();\n hasMore = ob.getAsJsonObject(\"meta\").get(\"has_more\").getAsBoolean();\n return tickets;\n }\n }\n catch(JsonSyntaxException jse){\n System.out.println(\"Not a valid Json String:\"+jse.getMessage());\n }\n return null;\n }", "public static GetDoctorListResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetDoctorListResponse object = new GetDoctorListResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetDoctorListResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetDoctorListResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetDoctorListResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetDoctorListResult\").equals(reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetDoctorListResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetDoctorListResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public VerificationResponse parseVerificationResponse(HashMap<String, Object> list) throws ParseException {\n HashMap<UUID, UUIDResponse> responses = new HashMap<UUID, UUIDResponse>();\n\n for(Map.Entry<String, Object> entry : list.entrySet()) {\n UUID mcUUID = m_minecraftUUIDParser.parseUUID(entry.getKey());\n UUIDResponse response = m_uuidRepsonseParser.parse(entry.getValue());\n\n responses.put(mcUUID, response);\n }\n\n return new VerificationResponse().setResponseMap(responses);\n }", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "public static MessageResponseOfAnimalModelNuLtuh91E parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n MessageResponseOfAnimalModelNuLtuh91E object = new MessageResponseOfAnimalModelNuLtuh91E();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"MessageResponseOfAnimalModelNuLtuh91\").equals(\n reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setMessageResponseOfAnimalModelNuLtuh91(null);\n reader.next();\n } else {\n object.setMessageResponseOfAnimalModelNuLtuh91(MessageResponseOfAnimalModelNuLtuh91.Factory.parse(\n reader));\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static String getValue( String str , Response [] previousJsonResponse){\n\t\tString temp = \"\";\n\t\tString ret_value = \"\";\nint ret_value_int = 0;\nint temp2 = 0 ;\n\t\tif(str.contains(Keywords.PREV_COOKIE)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp = (previousJsonResponse[(index-1)]).getCookie(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value = \" \" + temp;\n\t\t\telse ret_value = temp;\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}else if(str.contains(Keywords.PREV_HEADER)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp = (previousJsonResponse[(index-1)]).header(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value = \" \" + temp;\n\t\t\telse ret_value = temp;\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}else if(str.contains(Keywords.PREV_BODY)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp = (previousJsonResponse[(index-1)]).path(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value = \" \" + temp;\n\t\t\telse ret_value = temp;\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}\n\t\telse if(str.contains(Keywords.PREV_BODY_integer)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp2 = (previousJsonResponse[(index-1)]).path(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value_int = temp2;\n\t\t\telse ret_value_int = temp2;\n\t\t\tret_value = Integer.toString(ret_value_int);\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}\n\n\t\telse ret_value = str;\n\t\treturn ret_value;\n\t}", "private void parseData() {\n\t\t\r\n\t}", "public static GetVehicleRecordPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleRecordPage object =\n new GetVehicleRecordPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleRecordPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleRecordPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetRoadwayPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetRoadwayPageResponse object =\n new GetRoadwayPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getRoadwayPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetRoadwayPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static DeleteAnimalResponse parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n DeleteAnimalResponse object = new DeleteAnimalResponse();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n if (reader.getAttributeValue(\n \"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\") != null) {\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n\n if (fullTypeName != null) {\n java.lang.String nsPrefix = null;\n\n if (fullTypeName.indexOf(\":\") > -1) {\n nsPrefix = fullTypeName.substring(0,\n fullTypeName.indexOf(\":\"));\n }\n\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\n \":\") + 1);\n\n if (!\"DeleteAnimalResponse\".equals(type)) {\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext()\n .getNamespaceURI(nsPrefix);\n\n return (DeleteAnimalResponse) ExtensionMapper.getTypeObject(nsUri,\n type, reader);\n }\n }\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n reader.next();\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://tempuri.org/\", \"DeleteAnimalResult\").equals(\n reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setDeleteAnimalResult(null);\n reader.next();\n\n reader.next();\n } else {\n object.setDeleteAnimalResult(MessageResponseOfAnimalModelNuLtuh91.Factory.parse(\n reader));\n\n reader.next();\n }\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement()) {\n // 2 - A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" + reader.getName());\n }\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public XMXSEC1PakmanResponse() {\n\t\tthis.setResults(null);\n\t}", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n\tpublic void onParser(JSONArray response) {\n\n\t}", "teledon.network.protobuffprotocol.TeledonProtobufs.TeledonResponse.Type getType();", "@Override\n\t\t\tprotected Response<String> parseNetworkResponse(\n\t\t\t\t\tNetworkResponse response) {\n\n\t\t\t\treturn null;\n\t\t\t}", "void mo1927a(NLPResponseData nLPResponseData);", "public static GetVehicleInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPage object =\n new GetVehicleInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static DOCHBListResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n DOCHBListResponse object = new DOCHBListResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"DOCHBListResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (DOCHBListResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"DOCHBListResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"DOCHBListResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"DOCHBListResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setDOCHBListResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "private getParkingByAdResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "protected MusicBrainz deserializeResponse(String responseStr) {\n\t\tObjectMapper objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,\n\t\t\t\tfalse);\n\n\t\ttry {\n\t\t\treturn objectMapper.readValue(responseStr, MusicBrainz.class);\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"Error on deserializing response\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void parseMetadata(String resp, String downloadUUID) throws DocumentException{\n\t\tSAXReader reader = new SAXReader();\n\t\treader.setStripWhitespaceText(true);\n\t\treader.setMergeAdjacentText(true);\n\t\tDocument document = reader.read(new StringReader(resp));\n\t\t\n\t\tMap<String, String> namespaceURIs=null;\n\t\ttry {\n\t\t\tnamespaceURIs = Namespaces.getNamespaces(resp);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t \n\t\tlog.info(\"Parsing Metadata\");\n\t\t\n\t\tServiceElements serviceElements = new ServiceElements();\n\t\tList<DatasetElements> dataSetList=new ArrayList<DatasetElements>();\n\n\t\tserviceElements.setTitle(getElement(ServiceXPaths.getXPath(ServiceXPaths.TITEL,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setDesc(getElement(ServiceXPaths.getXPath(ServiceXPaths.DESC,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setDateStamp(getElement(ServiceXPaths.getXPath(ServiceXPaths.DATE_STAMP,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setRights(getElement(ServiceXPaths.getXPath(ServiceXPaths.RIGHTS,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setLanguage(getElement(ServiceXPaths.getXPath(ServiceXPaths.LANGUAGE,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setAuthorName(getElement(ServiceXPaths.getXPath(ServiceXPaths.AUTHOR_NAME,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setAuthorMail(getElement(ServiceXPaths.getXPath(ServiceXPaths.AUTHOR_MAIL,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setOrgName(getElement(ServiceXPaths.getXPath(ServiceXPaths.ORG_NAME,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setBrowseGraphic(getElement(ServiceXPaths.getXPath(ServiceXPaths.BROWSE_GRAPHIC,namespaceURIs), namespaceURIs, document));\n\n\t\t XPath xPathKW = DocumentHelper.createXPath(ServiceXPaths.getXPath(ServiceXPaths.KEYWORDS,namespaceURIs));\n\t\t xPathKW.setNamespaceURIs(namespaceURIs);\n\t\t List<Node> asResultsNodesKW = xPathKW.selectNodes(document.getRootElement());\n\t\t List<String> keywords =new ArrayList<String>();\n\t\t for(int j=0;j<asResultsNodesKW.size();j++){\n\t\t\t keywords.add(asResultsNodesKW.get(j).getStringValue().replace(\"&\", \"&amp;\"));\n\t\t }\n\t\t serviceElements.setKeywords(keywords);\t\n\t\t \n\t\t XPath xPath2 = DocumentHelper.createXPath(ServiceXPaths.getXPath(ServiceXPaths.OPERATES_ON,namespaceURIs));\n\t\t xPath2.setNamespaceURIs(namespaceURIs);\n\n\t\t List<Node> asResultsNodes2 = xPath2.selectNodes(document.getRootElement());\t\t\n\n\t\t for(int i=0;i<asResultsNodes2.size();i++){\n\t\t\t \n\t\t\t DatasetElements dataSet=new DatasetElements();\n\t\t\t \t\t \n\t\t\t String respDS=CSWUtil.executeRequest(cswURL, asResultsNodes2.get(i).getText(), proxyHost, proxyPort);\n\t\t\t Document document2 = reader.read(new StringReader(respDS));\n\t\t\t namespaceURIs = Namespaces.getNamespaces(respDS);\n\t\t\t dataSet.setCodeUUID(getElement(DatasetXPaths.getXPath(DatasetXPaths.UUID,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setId(getElement(DatasetXPaths.getXPath(DatasetXPaths.FILE_ID,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setTitle(getElement(DatasetXPaths.getXPath(DatasetXPaths.TITLE,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setDesc(getElement(DatasetXPaths.getXPath(DatasetXPaths.DESC,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setDateStamp(getElement(DatasetXPaths.getXPath(DatasetXPaths.DATE_STAMP,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setRights(getElement(DatasetXPaths.getXPath(DatasetXPaths.RIGHTS,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setAuthorName(getElement(DatasetXPaths.getXPath(DatasetXPaths.AUTHOR_NAME,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setAuthorMail(getElement(DatasetXPaths.getXPath(DatasetXPaths.AUTHOR_MAIL,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setOrganisationName(getElement(DatasetXPaths.getXPath(DatasetXPaths.ORG_NAME,namespaceURIs), namespaceURIs, document2)); \n\t\t\t dataSet.setBBOXwest(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_WEST,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBBOXeast(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_EAST,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBBOXsouth(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_SOUTH,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBBOXnorth(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_NORTH,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setType(getElement(DatasetXPaths.getXPath(DatasetXPaths.TYPE,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setLanguage(getElement(DatasetXPaths.getXPath(DatasetXPaths.LANGUAGE,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBrowseGraphic(getElement(DatasetXPaths.getXPath(DatasetXPaths.BROWSE_GRAPHIC,namespaceURIs), namespaceURIs, document2));\n\t\t\t \n\t\t\t List<String> dsURLList=new ArrayList<String>();\n\t\t\t List<String> dsDescriptionList=new ArrayList<String>();\n\t\t\t List<String> dsCodeListValueList=new ArrayList<String>();\n\t\t\t List<String> dsNameValueList=new ArrayList<String>();\n\t\t\t List<String> dsAppProfileValueList=new ArrayList<String>();\n\t\t\t \n\t\t\t \n\t\t\t XPath xPath8 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE,namespaceURIs));\n\t\t\t xPath8.setNamespaceURIs(namespaceURIs);\n\t\t\t List<Node> asResultsNodes8 = xPath8.selectNodes(document2.getRootElement());\n\t\t\t for(int j=0;j<asResultsNodes8.size();j++){\n\t\t\t\t XPath xPath9 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_DESC_SUB,namespaceURIs));\n\t\t\t\t XPath xPath10 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_URL_SUB,namespaceURIs));\n\t\t\t\t XPath xPath11 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_CODE_SUB,namespaceURIs));\n\t\t\t\t //XPath xPath12 = DocumentHelper.createXPath(DatasetXLinks.getXPath(DatasetXPaths.ONLINE_RESSOURCE_PROTOCOL_SUB,namespaceURIs));\n\t\t\t\t XPath xPath13 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_PROFILE_SUB,namespaceURIs));\n\t\t\t\t XPath xPath14 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_NAME_SUB,namespaceURIs));\t\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t xPath9.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath10.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath11.setNamespaceURIs(namespaceURIs);\n\t\t\t\t //xPath12.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath13.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath14.setNamespaceURIs(namespaceURIs);\n\t\t\t\t \n\t\t\t\t List<Node> asResultsNodes9 = xPath9.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes10 = xPath10.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes11 = xPath11.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t //List<Node> asResultsNodes12 = xPath12.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes13 = xPath13.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes14 = xPath14.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t \n\t\t\t\t String desc = \"\";\n\t\t\t\t String url =\"\";\n\t\t\t\t String code = \"\";\n\t\t\t\t //String protocol = \"\";\n\t\t\t\t String appProfile = \"\";\n\t\t\t\t String name = \"\";\n\t\t\t\t \n\t\t\t\t if(asResultsNodes9.size() > 0){\n\t\t\t\t\t desc =asResultsNodes9.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t if(asResultsNodes10.size() > 0){\n\t\t\t\t\t url = asResultsNodes10.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t if(asResultsNodes11.size() > 0){\n\t\t\t\t\t code =asResultsNodes11.get(0).getStringValue();\n\t\t\t\t }\n//\t\t\t\t\t if(asResultsNodes12.size() > 0l){\n//\t\t\t\t\t\t protocol =asResultsNodes12.get(0).getStringValue();\n//\t\t\t\t\t }\n\t\t\t\t if(asResultsNodes13.size() > 0){\n\t\t\t\t\t appProfile =asResultsNodes13.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t if(asResultsNodes14.size() > 0){\n\t\t\t\t\t name =asResultsNodes14.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t \t\t\t\t\t\t\t\t \n\t\t\t\t dsURLList.add(url.replaceAll(\"&\", \"&amp;\"));\n\t\t\t\t dsDescriptionList.add(desc.replaceAll(\"&\", \"&amp;\"));\n\t\t\t\t dsCodeListValueList.add(code.replaceAll(\"&\", \"&amp;\"));\n\t\t\t\t dsNameValueList.add(name.replaceAll(\"&\", \"&amp;\"));\n\t\t\t\t dsAppProfileValueList.add(appProfile.replaceAll(\"&\", \"&amp;\"));\n\n\t\t\t }\n\t\t\t dataSet.setURLList(dsURLList);\n\t\t\t dataSet.setDescriptionList(dsDescriptionList);\n\t\t\t dataSet.setCodeListValueList(dsCodeListValueList);\n\t\t\t dataSet.setNameList(dsNameValueList);\n\t\t\t dataSet.setAppProfileList(dsAppProfileValueList);\n\t\t\t \n\t\t\t dataSetList.add(dataSet);\n\t\t }\n\t\t \n\t\t writeFeed(serviceElements, dataSetList, downloadUUID);\n\t}", "public static GetAdmByCardNoResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetAdmByCardNoResponse object = new GetAdmByCardNoResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetAdmByCardNoResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetAdmByCardNoResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetAdmByCardNoResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetAdmByCardNoResult\").equals(reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetAdmByCardNoResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetAdmByCardNoResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "TruncatedResponseType getTruncatedResponse();", "private void parseResponse(String body) {\n Gson gson = new Gson();\n try {\n FactDataList factDataList = gson.fromJson(body, FactDataList.class);\n if (!factDataList.title.isEmpty() || (factDataList.factDataArrayList != null && factDataList.factDataArrayList.size() > 0)) {\n factDataView.UpdateListView(factDataList);\n } else {\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n } catch (Exception e) {\n e.printStackTrace();\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n }", "public static TerminalReturnCard parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n TerminalReturnCard object =\n new TerminalReturnCard();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"terminalReturnCard\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (TerminalReturnCard)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public PreapprovalDetailsResponse(String responseString){\n \t\n \tpreapprovalDetailsResponseParams = new HashMap<String, String>();\n \t// parse the string and load into the object\n \tString[] nmValPairs = responseString.split(\"&\");\n \tfor(String nmVal: nmValPairs){\n \t\tString[] field = nmVal.split(\"=\");\n \t\tpreapprovalDetailsResponseParams.put(field[0], (field.length > 1)?field[1].trim():\"\");\n \t}\n\n \tresponseEnvelope = new ResponseEnvelope(preapprovalDetailsResponseParams);\n \t\n \tpreapprovalDetails = new PreapprovalDetails(preapprovalDetailsResponseParams);\n \t\n \t// we will parse 10 errors for now\n \tfor(int i = 0; i < 10; i++){\n \t\tif(preapprovalDetailsResponseParams.containsKey(\"error(\" + i +\").errorId\")){\n \t\t\tPayError pErr = new PayError( preapprovalDetailsResponseParams, i);\n \t\t\tpayErrorList.add(pErr);\n \t\t} else {\n \t\t\tbreak;\n \t\t}\n \t}\n \t\n }" ]
[ "0.620532", "0.55804634", "0.55526525", "0.5489964", "0.5405427", "0.5400325", "0.53786", "0.5372825", "0.5346668", "0.532913", "0.52947783", "0.5274208", "0.52724046", "0.5265074", "0.52225053", "0.51681095", "0.514734", "0.51471955", "0.5129353", "0.5122926", "0.5119944", "0.50988054", "0.50908977", "0.50908065", "0.5079998", "0.5072564", "0.50709605", "0.50659496", "0.5061686", "0.5049991", "0.50242466", "0.5011591", "0.4987826", "0.49672472", "0.49649224", "0.49603915", "0.49585256", "0.4949082", "0.49465552", "0.4931487", "0.49312922", "0.49309024", "0.49214235", "0.49210146", "0.49171004", "0.49091512", "0.48894942", "0.48782215", "0.48662132", "0.48645636", "0.48643565", "0.4858056", "0.4854547", "0.48448253", "0.48412147", "0.4834135", "0.4831795", "0.48238978", "0.47946152", "0.47801688", "0.47791272", "0.4775152", "0.4770547", "0.47688305", "0.47677112", "0.47625962", "0.47546694", "0.4753206", "0.47529063", "0.4750449", "0.47391126", "0.47331464", "0.47331166", "0.47328776", "0.47116888", "0.4710572", "0.47066343", "0.46967047", "0.46914437", "0.46850094", "0.46780822", "0.46778828", "0.46614832", "0.46606526", "0.4654377", "0.46536535", "0.464746", "0.46443203", "0.4642161", "0.46210772", "0.46198183", "0.46151015", "0.46109822", "0.46096674", "0.46083814", "0.46069", "0.4600815", "0.45866948", "0.45788896", "0.45754728", "0.45702413" ]
0.0
-1
/ access modifiers changed from: protected
@Override // com.amap.api.col.stln3.nc public final /* synthetic */ Object a(String str) throws AMapException { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "private PropertyAccess() {\n\t\tsuper();\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 gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "private TMCourse() {\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "@Override\n public void get() {}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "private Get() {}", "private Get() {}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public abstract String mo118046b();" ]
[ "0.7374581", "0.704046", "0.6921078", "0.6907657", "0.68447137", "0.68278503", "0.68051183", "0.6581499", "0.65379775", "0.65013164", "0.64906055", "0.64906055", "0.6471428", "0.64376146", "0.64308655", "0.64308655", "0.6427683", "0.6424486", "0.64190304", "0.640871", "0.64053404", "0.6400181", "0.63988847", "0.6397776", "0.6377783", "0.6372898", "0.63703156", "0.6366763", "0.63532007", "0.6333713", "0.6325645", "0.63249475", "0.63249475", "0.6305955", "0.62785715", "0.6270012", "0.6250164", "0.62232584", "0.62212026", "0.6211955", "0.6203344", "0.61942434", "0.6181467", "0.6174815", "0.61573285", "0.61370647", "0.6121865", "0.61183035", "0.6117989", "0.6099771", "0.60917133", "0.60917133", "0.6085753", "0.60845906", "0.60690045", "0.60688764", "0.6064975", "0.60543966", "0.60454184", "0.6045176", "0.60337836", "0.60292566", "0.60245013", "0.6018325", "0.60145676", "0.6013568", "0.6010313", "0.5994281", "0.5994048", "0.59938633", "0.59918624", "0.5990596", "0.5983826", "0.59835196", "0.596629", "0.5964607", "0.5964607", "0.5964553", "0.5964553", "0.5964553", "0.5964553", "0.5964553", "0.5964553", "0.59601754", "0.5955775", "0.5953048", "0.5947975", "0.5944416", "0.59391934", "0.59318924", "0.59317297", "0.5931352", "0.59298736", "0.59288", "0.5924899", "0.5924048", "0.5923699", "0.5922455", "0.5919852", "0.59191453", "0.5918418" ]
0.0
-1
/ access modifiers changed from: protected
@Override // com.amap.api.col.stln3.nd public final String d() { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("key="); stringBuffer.append(qy.f(this.i)); stringBuffer.append("&userid="); stringBuffer.append(this.j); return stringBuffer.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
what happens if we insert at root and use heapify
void insert(int ele){ if(heapLen>=A.length) { System.out.println("Heap is full"); } else { A[heapLen] = 1<< 31; heapLen++; increaseKey(heapLen, ele); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void heapifyAdd() {\n // TODO. The general idea of this method is that we are checking whether the \n // most recently added item, which has been put at the end of the array, \n //needs to be swapped with its parent. We do this in a loop, until a swap isn’t needed or we reach the root. This is not recursive.\n\n // Pseudocode:\n // assign newly added item to a temp var.\n // use an index variable to keep track of the index where that value was added\n // while the index isn’t pointing at the root, and while the node at this index is greater than the node at its parent:\n // copy the parent node to the index location (move parent node down the heap)\n // set the index to the parent index\n // when we are at the root, or the parent of current index isn’t bigger, we are done\n // copy the temp variable to the location of the current index. \n T temp;\n int next = count - 1;\n\n temp = heap[next];\n\n while ((next != 0) && (((Comparable) temp).compareTo(heap[(next - 1) / 2]) > 0)) {\n heap[next] = heap[(next - 1) / 2];\n next = (next - 1) / 2;\n }\n heap[next] = temp;\n }", "private void heapify(int idx) {\r\n // TODO\r\n }", "public static void heapify() {\n //배열을 heap 자료형으로 만든다.\n // 1d 2d 2d 3d 3d 3d 3d 4d\n// int[] numbers = {9, 12, 1, 3, 6, 2, 8, 4};\n // 1depth의 자식노드 numbers[2i], numbers[2i+1]\n int[] numbers = {4, 1, 3, 2, 16, 9, 10, 14, 8, 7};\n int i = 1;\n while (true) {\n int target = numbers[i-1];\n int left = numbers[2*i-1];\n\n if (2*i == numbers.length) {\n if (left > target){\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n print(numbers);\n break;\n }\n int right =numbers[2*i];\n\n if (left > right) {\n if(left > target) {\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n }else if (right > left) {\n if (right > target) {\n numbers[i-1] = right;\n numbers[2*i] = target;\n }\n }\n i++;\n\n print(numbers);\n }\n\n }", "protected void heapify(int i) {\n \tE temp;\n\t\tE left = null;\n\t\tE right = null;\n\t\tE current = internal[i];\n\n\t\tif(left(i) < heapSize) left = internal[left(i)];\n\t\tif(right(i) < heapSize ) right = internal[right(i)];\n\n\t\tif(left != null && right != null){\n\t\t\tif(compy.compare(current, right) < 0 && compy.compare(current, left) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tif(compy.compare(right, left) < 0){\n\t\t\t\t\tinternal[i] = left;\n\t\t\t\t\tinternal[left(i)] = temp;\n\t\t\t\t\theapify(left(i));\n\t\t\t\t}else{\n\t\t\t\t\tinternal[i] = right;\n\t\t\t\t\tinternal[right(i)] = temp;\n\t\t\t\t\theapify(right(i));\n\t\t\t\t}\n\t\t\t}else if(compy.compare(current, left) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[left(i)];\n\t\t\t\tinternal[left(i)] = temp;\n\t\t\t\theapify(left(i));\n\t\t\t}else if(compy.compare(current, right) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[right(i)];\n\t\t\t\tinternal[right(i)] = temp;\n\t\t\t\theapify(right(i));\n\t\t\t}\n\t\t}else if(left != null){\n\t\t\tif(compy.compare(current, left) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[left(i)];\n\t\t\t\tinternal[left(i)] = temp;\n\t\t\t\theapify(left(i));\n\t\t\t}\n\t\t}else if(right != null){\n\t\t\tif(compy.compare(current, right) < 0){\n\t\t\t\ttemp = current;\n\t\t\t\tinternal[i] = internal[right(i)];\n\t\t\t\tinternal[right(i)] = temp;\n\t\t\t\theapify(right(i));\n\t\t\t}\n\t\t}\n }", "public void insert(int key)\n\t{\n\t\tTreeHeapNode newNode = new TreeHeapNode();\n\t\tnewNode.setKey(key);\n\t\tif(numNodes == 0) root = newNode;\n\t\telse\n\t\t{\n\t\t\t//find place to put newNode\n\t\t\tTreeHeapNode current = root;\n\t\t\tint n = numNodes+1;\n\t\t\tint k;\n\t\t\tint[] path = new int[n];\n\t\t\tint j = 0;\n\t\t\twhile(n >= 1)\n\t\t\t{\n\t\t\t\tpath[j] = n % 2;\n\t\t\t\tn /= 2;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t//find parent of new child\n\t\t\tfor(k = j-2; k > 0; k--)\n\t\t\t{\n\t\t\t\tif(path[k] == 1)\n\t\t\t\t\tcurrent = current.rightChild;\n\t\t\t\telse\n\t\t\t\t\tcurrent = current.leftChild;\n\t\t\t}\n\t\t\t//find which child new node should go into\n\t\t\t\n\t\t\tif(current.leftChild != null)\n\t\t\t{\n\t\t\t\tcurrent.rightChild = newNode;\n\t\t\t\tnewNode.isLeftChild = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcurrent.leftChild = newNode;\n\t\t\t\tnewNode.isLeftChild = true;\n\t\t\t}\n\t\t\tnewNode.parent = current;\n\t\t\t\n\t\t\ttrickleUp(newNode);\n\t\t}\n\t\tnumNodes++;\n\t}", "private void heapify() {\n\t\tint currIndex = 0;\n\t\twhile (currIndex < heapSize) {\n\t\t\tT val = lstEle.get(currIndex);\n\t\t\tint leftSubtreeIndex = getLeftSubtree(currIndex);\n\t\t\tint rightSubtreeIndex = getRightSubtree(currIndex);\n\t\t\tT leftChildVal = leftSubtreeIndex < heapSize ? lstEle.get(leftSubtreeIndex) : null;\n\t\t\tT rightChildVal = rightSubtreeIndex < heapSize ? lstEle.get(rightSubtreeIndex) : null;\n\t\t\t\n\t\t\tT minVal = null;\n\t\t\tint minValIndex = -1;\n\t\t\tif(leftChildVal != null && rightChildVal != null){\n\t\t\t\tint compVal = leftChildVal.compareTo(rightChildVal); \n\t\t\t\tif(compVal < 0){\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t}else {\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(leftChildVal != null && leftChildVal.compareTo(val) < 0){\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t}else if (rightChildVal != null && rightChildVal.compareTo(val) < 0 ){\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\tMin Val : \" +minVal +\" --> \" +minValIndex);\n\t\t\t\n\t\t\tlstEle.set(currIndex, minVal);\n\t\t\tcurrIndex = minValIndex;\n\t\t\tlstEle.set(minValIndex, val);\n\t\t\t\n\t\t}\n\n\t}", "public LeftistHeap() {\n root = null;\n }", "@Override\r\n\tpublic boolean insert(E object)\r\n\t{\r\n\t\t//Add the item to the heap.\r\n\t\ttheData.add(object);\r\n\t\t\r\n\t\t//Child is newly inserted item.\r\n\t\tint child = theData.size() - 1;\r\n\t\t//Find the child's parent.\r\n\t\tint parent = (child - 1) / 2;\r\n\t\t\r\n\t\t//Sort the Heap\r\n\t\twhile(parent >= 0 && compare(theData.get(parent), theData.get(child)) > 0)\r\n\t\t{\r\n\t\t\tswap(theData.get(parent), theData.get(child));\r\n\t\t\tchild = parent;\r\n\t\t\tparent = (child - 1) / 2;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\n\tpublic void testInsert() {\n\t\tHeap heap = new Heap(testArrayList.length + 1);\n\t\tdouble[] expected = new double[] { 1, 3, 24, 5, 15, 48, 32, 7, 36, 27, 38, 70, 53, 33, 93, 47 };\n\t\theap.build(testArrayList);\n\t\theap.insert(1);\n\t\tassertEquals(16, heap.getSize());\n\t\tassertArrayEquals(expected, heap.getKeyArray());\n\t}", "private void minHeapify(int position) {\n // if root, nothing to do\n if (position == 0) {\n return;\n }\n int parent = (int) Math.floor((position - 1) / 2);\n // if child is smaller than parent, swap them and call the method\n // again on the new parent\n if (((Comparable<E>) array[position]).compareTo(array[parent]) < 0) {\n swap(position, parent);\n minHeapify(parent);\n }\n }", "private void heapify(final int i) {\n assert(valid(i));\n if (leaf(i)) return;\n final int v = H[i];\n final int left_child = ls(i);\n final int right_child = rs(i);\n int largest = (v >= H[left_child]) ? i : left_child;\n if (right_child != n && H[largest] < H[right_child])\n largest = right_child;\n assert(valid(largest));\n if (largest != i) {\n H[i] = H[largest]; H[largest] = v;\n heapify(largest);\n }\n }", "private void setMinHeap() {\n // parentIndex is the last leaf node parentIndex\n int parentIndex = (array.length - 2) / 2;\n // from last parentIndex down on the depth path to the root\n // convert to minHeap\n while (parentIndex >= 0) { // when parentIndex = 0, the root\n minHeapify(parentIndex, array.length);\n // go to next index(parentIndex) on that level\n parentIndex--;\n }\n }", "private void heapifyRemove() {\n // this is called after the item at the bottom-left has been put at the root\n // we need to see if this item should swap down\n int node = 0;\n int left = 1;\n int right = 2;\n int next;\n\n // store the item at the root in temp\n T temp = heap[node];\n\n // find out where we might want to swap root \n if ((heap[left] == null) && (heap[right] == null)) {\n next = count; // no children, so no swapping\n return;\n } else if (heap[right] == null) {\n next = left; // we will check left child\n } else if (((Comparable) heap[left]).compareTo(heap[right]) > 0) { // figure out which is the biggest of the two children\n next = left; // left is bigger than right, so check left child\n } else {\n next = right; // check right child\n }\n\n // compare heap[next] to item temp, if bigger, swap, and then repeat process\n while ((next < count) && (((Comparable) heap[next]).compareTo(temp) > 0)) {\n heap[node] = heap[next];\n node = next;\n left = 2 * node + 1; // left child of current node\n right = 2 * (node + 1); // right child of current node\n if ((heap[left] == null) && (heap[right] == null)) {\n next = count;\n } else if (heap[right] == null) {\n next = left;\n } else if (((Comparable) heap[left]).compareTo(heap[right]) > 0) {\n next = left;\n } else {\n next = right;\n }\n }\n heap[node] = temp;\n\n }", "public void insert(int k) {\n int i = 0;\n\n heapsize = heapsize + 1;\n i = heapsize;\n i = i - 1;\n\n if (heapsize == 1) {\n array[0] = k;\n } else {\n while ((i > 0) && ((array[parent(i)]) > k)) {\n array[i] = array[parent(i)];\n i = parent(i);\n }\n array[i] = k;\n }\n }", "public void insert(E obj) {\n // insert it as last\n array[lastPosition] = obj;\n // go down on the depth path to the root as long proprieties are not balanced\n minHeapify(lastPosition);\n lastPosition++;\n // if the array is 50% full, double the size\n if (lastPosition == array.length / 2) {\n array = Arrays.copyOf(array, array.length * 2);\n }\n }", "protected void pushDownRoot(int root){\n int heapSize = data.size();\n Bloque value = (Bloque)data.get(root);\n while (root < heapSize) {\n int childpos = left(root);\n if (childpos < heapSize)\n {\n if ((right(root) < heapSize) && (((Bloque)data.get(childpos+1)).compareTo((Bloque)data.get(childpos)) > 0)){\n childpos++;\n }\n // Assert: childpos indexes smaller of two children\n if (((Bloque)data.get(childpos)).compareTo(value) > 0){\n data.set(root,data.get(childpos));\n root = childpos; // keep moving down\n } else { // found right location\n data.set(root,value);\n return;\n }\n } else { // at a leaf! insert and halt\n data.set(root,value);\n return;\n }\n }\n }", "private void heapify(T[] array) \n\t{\n\t\tfor (int i=0; i < array.length; i++)\n\t\t{\n\t\t\tinsert(array[i], i);\n\t\t}\n\t}", "public void heapify(int parent) { \t\n \tint largest = parent;\n \tint lchild = 2*parent;\n int rchild = 2*parent + 1;\n if (lchild <= this.size && this.heap[lchild] > this.heap[largest]) \n largest = lchild; \n \n if (rchild <= this.size && this.heap[rchild] > this.heap[largest]) \n largest = rchild; \n \n if (largest != parent) \n { \n int temp = this.heap[parent]; \n this.heap[parent] = this.heap[largest]; \n this.heap[largest] = temp;\n this.heapify(largest);\n } \n }", "public void binomialHeapInsert(Node x) {\n\t\tBinomialHeap h = new BinomialHeap();\n\t\th.head = x;\n\t\tBinomialHeap hPrime = this.binomialHeapUnion(h);\n\t\tthis.head = hPrime.head;\t\t\n\t}", "public void minHeapInsert(node_data node){\n\t\tresize(1);\n\t\t_a[_size-1] = new NodeData((NodeData) node);\n\t\t_a[_size-1].setWeight(_positiveInfinity);\n\t\theapDecreaseKey(node);\n\t}", "public void heapInsert(int key) throws Exception{\n\t\tn = n+1;\n\t\tint[] newArray = new int[n];\n\t\tfor(int i = 0; i< a.length; i++){\n\t\t\tnewArray[i] = a[i];\n\t\t}\n\t\tnewArray[n-1] = Integer.MIN_VALUE;\n\t\tthis.a = newArray;\n\t\theapIncreaseKey(n-1,key);\n\t}", "public void insert(E element) {\n\t\theap.add(element); // Put new value at end;\n\t\tint loc = heap.size()-1; // and get its location\n\n\t\t// Swap with parent until parent not larger\n\t\twhile (loc > 0 && heap.get(loc).compareTo(heap.get(parent(loc))) < 0) {\n\t\t\tswap(heap, loc, parent(loc));\n\t\t\tloc = parent(loc);\n\t\t}\n\t}", "public void insert(T val) {\n\t\tlstEle.add(val);\n\t\theapSize++;\n\t\t// Need to move up the tree and satisfy the heap property\n\t\tint currIndex = heapSize - 1;\n\t\tint parentIndex = getParent(currIndex);\n\t\tif (parentIndex >= 0) {\n\t\t\tdo {\n\t\t\t\tT parentVal = lstEle.get(parentIndex);\n\t\t\t\tif (parentVal.compareTo(val) > 0) {\n\t\t\t\t\tlstEle.set(parentIndex, val);\n\t\t\t\t\tlstEle.set(currIndex, parentVal);\n\t\t\t\t\tcurrIndex = parentIndex;\n\t\t\t\t\tparentIndex = getParent(currIndex);\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (parentIndex >= 0);\n\t\t}else{\n\t\t\t//do nothing\n\t\t}\n\t\t\n\t}", "public void insert(E element) {\n\t\theap.add(element); // Put new value at end;\n\t\tint loc = heap.size() - 1; // and get its location\n\n\t\t// Swap with parent until parent not larger\n\t\twhile (loc > 0 && heap.get(loc).compareTo(heap.get(parent(loc))) < 0) {\n\t\t\tswap(heap, loc, parent(loc));\n\t\t\tloc = parent(loc);\n\t\t}\n\t}", "public void insertKey(int k)\n\t{\n\t if (size == maxsize)\n\t {\n\t System.out.println(\"Overflow: Could not insertKey\");\n\t return;\n\t }\n\t \n\t // First insert the new key at the end\n\t size++;\n\t int i = size - 1;\n\t Heap[i] = k;\n\t \n\t // Fix the min heap property if it is violated\n\t while (i != 0 && Heap[parent(i)] < Heap[i])\n\t {\n\t swap(i, parent(i));\n\t i = parent(i);\n\t }\n\t}", "private void heapify(int[] arr, int i, int end){\n \n int largest = i;\n int left = 2 * i + 1;\n int right = 2 * i + 2;\n \n if(left < end && arr[left] > arr[largest]){ // check bounds and compare values\n largest = left;\n }\n \n if(right < end && arr[right] > arr[largest]){\n largest = right;\n }\n \n if(largest != i){\n // perform swap arr[i] and arr[largest]\n swap(arr,largest,i);\n //recursively fix the tree using heapify()\n heapify(arr,largest,end);\n }\n \n }", "public void insert(int val) {\r\n heap.add(val);\r\n int curr = heap.size() - 1;\r\n\r\n while (val < heap.get(getParent(curr))) {\r\n swap(curr, getParent(curr));\r\n curr = getParent(curr);\r\n }\r\n }", "public void testInsert01() {\r\n\t\tBTree<String, Integer> bt = new BTree<String, Integer>(4);\r\n\r\n\t\t// Growing the leaf\r\n\t\tbt.set(\"010\", 1);\r\n\t\tbt.set(\"020\", 2);\r\n\t\tbt.set(\"030\", 3);\r\n\t\tbt.set(\"040\", 4);\r\n\t\tassertEquals(bt.root.dump(), \"[010=1, 020=2, 030=3, 040=4]\");\r\n\r\n\t\t// Leaf split (middle) and new root created\r\n\t\tbt.set(\"025\", 5);\r\n\t\tassertEquals(bt.root.dump(), \"[[010=1, 020=2], [025=5, 030=3, 040=4]]\");\r\n\r\n\t\t// Growing the right of the right side of the tree\r\n\t\t// Leaf split (last) and new child added to root\r\n\t\tbt.set(\"050\", 6);\r\n\t\tbt.set(\"060\", 7);\r\n\t\tassertEquals(bt.root.dump(), \"[[010=1, 020=2], [025=5, 030=3], [040=4, 050=6, 060=7]]\");\r\n\r\n\t\t// Growing the left of the right side of the tree\r\n\t\t// Leaf split (first) and new child added to root\r\n\t\tbt.set(\"035\", 8);\r\n\t\tbt.set(\"034\", 9);\r\n\t\tassertEquals(bt.root.dump(),\r\n\t\t\t\t\"[[010=1, 020=2], [025=5, 030=3], [034=9, 035=8, 040=4], [050=6, 060=7]]\");\r\n\r\n\t\t// Growing the right of the right side of the tree\r\n\t\t// Node split (last) and new root created\r\n\t\tbt.set(\"070\", 10);\r\n\t\tassertEquals(bt.root.dump(),\r\n\t\t\t\t\"[[[010=1, 020=2], [025=5, 030=3]], [[034=9, 035=8, 040=4], [050=6, 060=7, 070=10]]]\");\r\n\r\n\t\t// Testing key update\r\n\t\tbt.set(\"010\", -1);\r\n\r\n\t\tassertEquals(bt.get(\"010\"), Integer.valueOf(-1));\r\n\t\tassertEquals(bt.get(\"020\"), Integer.valueOf(2));\r\n\t\tassertEquals(bt.get(\"030\"), Integer.valueOf(3));\r\n\t\tassertEquals(bt.get(\"040\"), Integer.valueOf(4));\r\n\t\tassertEquals(bt.get(\"025\"), Integer.valueOf(5));\r\n\t\tassertEquals(bt.get(\"050\"), Integer.valueOf(6));\r\n\t\tassertEquals(bt.get(\"060\"), Integer.valueOf(7));\r\n\t\tassertEquals(bt.get(\"035\"), Integer.valueOf(8));\r\n\t\tassertEquals(bt.get(\"034\"), Integer.valueOf(9));\r\n\t\tassertEquals(bt.get(\"070\"), Integer.valueOf(10));\r\n\t\tassertEquals(bt.get(\"xyz\"), null);\r\n\t}", "void replaceMin(Node root) {\n\t\tarr[0] = root;\n\t\tminHeapify(0);\n\t}", "private void heapifyUp(int index) {\r\n\t\tint parentIndex = (index - 1) / 2;\r\n\t\t\r\n\t\tif (index == 0)\r\n\t\t\treturn;\r\n\t\telse if (heap.get(index).compareTo(heap.get(parentIndex)) > 0) { // if parent is smaller, swap with parent\r\n\t\t\tE temp = heap.get(parentIndex);\r\n\t\t\theap.set(parentIndex, heap.get(index));\r\n\t\t\theap.set(index, temp);\r\n\t\t\t\r\n\t\t\theapifyUp(parentIndex); // check next level up\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testInsert4() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\tT.insert(new Long(55), \"Fifty-Five\");\n\t\tT.insert(new Long(65), \"Sixty-Five\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(1, root.keys.size());\n\t\tassertEquals(60, (long) root.keys.get(0));\n\t\tassertEquals(2, root.children.size());\n\t\t\n\t\tInnerNode<Long,String> left = (InnerNode<Long,String>) root.children.get(0);\n\t\tInnerNode<Long,String> right = (InnerNode<Long,String>) root.children.get(1);\n\t\t\n\t\tassertEquals(30, (long) left.keys.get(0));\n\t\tassertEquals(50, (long) left.keys.get(1));\n\t\t\n\t\tassertEquals(70, (long) right.keys.get(0));\n\t\t\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) left.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) left.children.get(1);\n\t\t\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) left.children.get(2);\n\t\t\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) right.children.get(0);\n\t\tLeafNode<Long, String> child4 = (LeafNode<Long, String>) right.children.get(1);\n\t\t\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\t\t\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\t\t\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(55, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(60, (long) child3.children.get(0).key);\n\t\tassertEquals(65, (long) child3.children.get(1).key);\n\t\t\n\t\tassertEquals(70, (long) child4.children.get(0).key);\n\t\tassertEquals(80, (long) child4.children.get(1).key);\n\t\t\n\t}", "private static void Heapify(int[] A , int i , int size){\r\n\t\t\r\n\t\tint left = LEFT(i);\r\n\t\tint right = RIGHT(i);\r\n\t\tint smallest =i;\r\n\t\t\r\n\t\t// get left and right child of node at index i \r\n\t\t//& compare A[i] with its left and right child\r\n\t\t\r\n\t\tif(left<size && A[left] < A[i]){\r\n\t\t\tsmallest = left;\r\n\t\t}\r\n\t\tif(right<size && A[right] < A[smallest]){\r\n\t\t\tsmallest = right;\r\n\t\t}\r\n\t\t// swap with child having lesser value and\r\n\t\t// call heapify-down on the child\r\n\t\tif(smallest !=i){\r\n\t\t\tswap(A,i,smallest);\r\n\t\t\tHeapify(A,smallest,size);\r\n\t\t}\r\n\t\t\r\n\t}", "private static void Heapify(int[] A, int i, int size)\n {\n // get left and right child of node at index i\n int left = LEFT(i);\n int right = RIGHT(i);\n\n int smallest = i;\n\n // compare A[i] with its left and right child\n // and find smallest value\n if (left < size && A[left] < A[i]) {\n smallest = left;\n }\n\n if (right < size && A[right] < A[smallest]) {\n smallest = right;\n }\n\n // swap with child having lesser value and\n // call heapify-down on the child\n if (smallest != i) {\n swap(A, i, smallest);\n Heapify(A, smallest, size);\n }\n }", "void MaxInsert(int x)\n {\n if (size == capacity) {\n return;\n }\n size++;\n arr[size - 1] = x;\n for (int i = size - 1; i != 0 && arr[MyHeap.parent(i)] < arr[i]; )\n {\n swap(i,MyHeap.parent(i));\n i = MyHeap.parent(i);\n }\n }", "@Test\n\tpublic void testHeap() {\n\t\t// merely a suggestion \n\t}", "public static void heapify(int array[], int heapSize, int i) {\n int largest = i; // Initialize largest as root\n int left = 2 * i + 1;\n int right = 2 * i + 2; \n\n // If left child is larger than root\n if (left < heapSize && array[left] > array[largest])\n largest = left;\n\n // If right child is larger than largest\n if (right < heapSize && array[right] > array[largest])\n largest = right;\n\n // If largest is not root\n if (largest != i) {\n int swap = array[i];\n array[i] = array[largest];\n array[largest] = swap;\n\n // Recursively heapify tree\n heapify(array, heapSize, largest);\n }\n }", "public static TreapNode insert(TreapNode root, int key)\n {\n // If root is null, create a new node and return it\n if (root == null)\n return newNode(key);\n\n // If key is smaller than root\n if (key <= root.key)\n {\n // Insert in left subtree\n root.left = insert(root.left, key);\n\n // Fix Heap property if it is violated\n if (root.left.priority > root.priority)\n root = rightRotate(root);\n }\n else // If key is greater\n {\n // Insert in right subtree\n root.right = insert(root.right, key);\n\n // Fix Heap property if it is violated\n if (root.right.priority > root.priority)\n root = leftRotate(root);\n }\n return root;\n }", "public void insert(E element)\n {\n this.size++;\n //Create new node with the given element \n Node toInsert = new Node(element);\n //Insert that element to the tail end of the filled elements\n heap.add(toInsert);\n int currentIndex = size-1;\n //Check to make sure the heap is still a valid max heap \n if (this.size > 1)\n {\n while (heap.get(currentIndex).element.compareTo(heap.get(getParent(currentIndex)).element) > 0)\n { switchPosition(currentIndex, getParent(currentIndex));\n currentIndex = getParent(currentIndex);\n }\n }\n \n \n }", "@Override\n public void insert(int element) {\n if (isFull()) {\n throw new IllegalStateException(\"Heap is full.\");\n }\n\n // Percolate up\n usedSize++;\n heap[heapSize++] = element; // insert element\n heapifyUp(heapSize - 1);\n\n // Percolate down (doesn't work)\n //usedSize++;\n //heap[heapSize++] = element;\n //heapifyDown(heapSize - 1);\n }", "public void trickleUp(TreeHeapNode newNode)\n\t{\n\t\tint bottom = newNode.getKey();\n\t\tTreeHeapNode current = newNode;\n\t\twhile( current.parent != null && current.parent.getKey() < bottom )\n\t\t{\n\t\t\tcurrent.setKey(current.parent.getKey());\n\t\t\tcurrent = current.parent;\n\t\t}\n\t\tcurrent.setKey(bottom);\n\t}", "public void insertKey(int key) {\n\t\t\tif (heap_size == capacity) {\n\t\t\t\tSystem.out.println(\"Overflow : couldn't insert key!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// First insert the new key at the end\n\t\t\theap_size++;\n\t\t\tint i = heap_size - 1;\n\t\t\tharr[i] = key;\n\n\t\t\t// Fix the min heap property if it is violated\n\t\t\twhile (i != 0 && harr[parent(i)] > harr[i]) {\n\t\t\t\tswap(i, parent(i));\n\t\t\t\ti = parent(i);\n\t\t\t}\n\t\t}", "private void heapify(int i) {\n if (!hasLeft(i))\n return;\n int max = i;\n if (this.heap.get(max).compareTo(this.heap.get(leftIndex(i))) < 0)\n max = leftIndex(i);\n if (hasRight(i) && this.heap.get(max)\n .compareTo(this.heap.get(rightIndex(i))) < 0)\n max = rightIndex(i);\n if (max == i)\n return; // ho finito\n // scambio i con max e richiamo la funzione ricorsivamente sull'indice\n // del nodo figlio uguale a max\n E app = this.heap.get(i);\n this.heap.set(i, this.heap.get(max));\n this.heap.set(max, app);\n heapify(max);\n }", "void MinInsert(int x)\n {\n if (size == capacity) {\n return;\n }\n size++;\n arr[size - 1] = x;\n for (int i = size - 1; i != 0 && arr[MyHeap.parent(i)] > arr[i]; )\n {\n swap(i,MyHeap.parent(i));\n i = MyHeap.parent(i);\n }\n }", "private boolean isHeap(Node root) {\n\n\t\tif (root == null)\n\t\t\treturn true;\n\t\tint countnodes = countNodes(root);\n\t\tif (isCompleteTree(root, 0, countnodes) == true && isHeapUtil(root) == true)\n\t\t\treturn true;\n\t\treturn false;\n\n\t}", "public void addMinHeap(E[] arr) {\n //copy input\n System.arraycopy(arr, 0, array, 0, arr.length);\n // from last parent down, check/ establish minHeap\n setMinHeap();\n lastPosition = arr.length;\n array = Arrays.copyOf(array, array.length * 5 / 2); // give space for null leaves to be used in traversals\n }", "public static void insertHeap(int x)\n {\n if(s.isEmpty()){\n s.add(x);\n }\n else if(x>s.peek()){\n g.add(x);\n }\n else if(g.isEmpty()){\n g.add(s.poll());\n s.add(x);\n }\n else {\n s.add(x);\n }\n balanceHeaps();\n \n }", "void buildHeap() {\n\tfor(int i=parent(size-1); i>=0; i--) {\n\t percolateDown(i);\n\t}\n }", "private boolean buildHeap(int numPerRun){ \n\t\tTuple temp;\n\t\tint i = 0;\n\t\twhile(i < numPerRun && (temp = child.getNextTuple()) != null) {\n\t\t\tinternal.offer(temp);\n\t\t\ti++;\n\t\t}\n//\t\tSystem.out.println(\"internal heap has: \" + i + \"tuples\");\n\t\tif(i != numPerRun || i == 0) { // i == 0, heap is empty!\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static TreapNode insertNode(TreapNode root, int data)\n {\n // base case\n if (root == null) {\n return new TreapNode(data);\n }\n\n // if data is less than the root node, insert in the left subtree;\n // otherwise, insert in the right subtree\n if (data < root.data)\n {\n root.left = insertNode(root.left, data);\n\n // rotate right if heap property is violated\n if (root.left != null && root.left.priority > root.priority) {\n root = rotateRight(root);\n }\n }\n else {\n root.right = insertNode(root.right, data);\n\n // rotate left if heap property is violated\n if (root.right != null && root.right.priority > root.priority) {\n root = rotateLeft(root);\n }\n }\n\n return root;\n }", "public void insert(int n) {\n\n\t\tif (pos == size)\n\t\t\tresize();\n\n\t\theap[pos] = n;\n\t\tpos++;\n\t\tcurrentSize++;\n\n\t\tint child = pos - 1;\n\t\tint parent = child / 2;\n\n\t\twhile (heap[parent] < heap[child] && parent > 0) {\n\t\t\tint temp = heap[parent];\n\t\t\theap[parent] = heap[child];\n\t\t\theap[child] = temp;\n\n\t\t\tchild = parent;\n\t\t\tparent = child / 2;\n\t\t}\n\n\t}", "@Test\n\tpublic void testInsert3() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(3, root.keys.size());\n\t\tassertEquals(30, (long) root.keys.get(0));\n\t\tassertEquals(50, (long) root.keys.get(1));\n\t\tassertEquals(70, (long) root.keys.get(2));\n\t\t\n\t\tassertEquals(4, root.children.size( ));\n\t\tassertTrue( root.children.get(0) instanceof LeafNode );\n\t\tassertTrue( root.children.get(1) instanceof LeafNode );\n\t\tassertTrue( root.children.get(2) instanceof LeafNode );\n\t\tassertTrue( root.children.get(3) instanceof LeafNode );\n\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) root.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) root.children.get(1);\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) root.children.get(2);\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) root.children.get(3);\n\t\t\n\t\tassertEquals(2, child0.children.size());\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\n\t\tassertEquals(2, child1.children.size());\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\n\t\tassertEquals(2, child2.children.size());\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(60, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(2, child3.children.size());\n\t\tassertEquals(70, (long) child3.children.get(0).key);\n\t\tassertEquals(80, (long) child3.children.get(1).key);\n\t}", "public void insert(int data) {\n if (this.size < this.maxsize) {\n // Insert\n Heap[++size] = data;\n\n // Heap properties can get violated\n int current = this.size;\n while (Heap[current] > Heap[parent(current)]) {\n swap(current, parent(current));\n current = parent(current);\n }\n }\n }", "public void insert(Point2D p) { // add the point to the set (if it is not already in the set)\n // \"write a simplified version of insert() which does everything except set up the RectHV for each node\"\n if (p == null) throw new IllegalArgumentException();\n\n\n if (root == null) {\n Node node = new Node();\n node.p = p;\n node.horizontal = false;\n node.rect = new RectHV(0.0, 0.0, 1.0, 1.0);\n root = node;\n size = 1;\n return;\n }\n\n if (!contains(p)) {\n size++;\n insertNextFreeSubTree(p, root);\n }\n\n }", "private void heapInsert(int[] arr, int index) {\n while (arr[index] > arr[(index - 1) / 2]) {\n swap(arr, index, (index - 1) / 2);\n index = (index - 1) / 2;\n }\n }", "public void insert(int value) {\r\n\t\tif (this.empty) {\r\n\t\t\tthis.empty = false;\r\n\t\t\tthis.size++;\r\n\t\t\tHeapTreesArray[0] = new HeapNode(value);\r\n\t\t\tthis.min = HeapTreesArray[0];\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tHeapNode hN = new HeapNode(value);\r\n\t\tBinomialHeap bH = new BinomialHeap();\r\n\t\tbH.insert(value);\r\n\t\tthis.meld(bH);\r\n\t\tif (this.min.value > value) {\r\n\t\t\tthis.min = hN;\r\n\t\t}\r\n\t}", "private <E extends Comparable<E>> void heapify(E[] array){\n\t\tif(array.length > 0){\n\t\t\tint n = 1;\n\t\t\twhile( n < array.length){\t//for each value in the array\n\t\t\t\tn++;\n\t\t\t\t\n\t\t\t\tint child = n-1;\n\t\t\t\tint parent = (child-1)/2;\n\t\t\t\twhile(parent >= 0 && array[parent].compareTo(array[child]) < 0){\t//if the heap property isn't observed between the parent and child, swap them and readjust parent/child values until it is\n\t\t\t\t\tabstractSorter.swap(array, parent, child);\n\t\t\t\t\tchild = parent;\n\t\t\t\t\tparent = (child-1)/2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static <T> void siftUp (HeapSet<T> heap, int start) {\r\n\t\tint child = start;\r\n\t\twhile (child > 0) {\r\n\t\t\tint remainder = (child - 1) % 2;\r\n\t\t\tint root = ((child - 1) - remainder) / 2;\r\n\t\t\tif (((Comparable<? super T>) heap._list.get (root)).compareTo (heap._list.get (child)) < 0) {\r\n\t\t\t\tCollections.swap (heap._list, root, child);\r\n\t\t\t\tHeapSet.fireEvent (heap, root, child);\r\n\t\t\t\tchild = root;\r\n\t\t\t} else {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static <T> void heapify (HeapSet<T> heap) {\r\n\t\tfor (int i = heap.size () - 1; i >= 0; --i) {\r\n\t\t\tsiftDown (heap, i, heap.size ());\r\n\t\t}\r\n\t}", "@Test\n\tvoid tesPreorder() {\n\t\tHeap<Integer, Integer> treap = createTreeHeap();\n\t\t//root, left, right\n\t\tassertEquals(\"[5, 4, 2, 1, 3]\", treap.preOrder());\n\t}", "private static <T extends Comparable<T>> void buildHeap(T[] table)\n {\n int n = 1;\n while (n < table.length)\n {\n n++;\n int child = n-1;\n int parent = (child - 1) / 2;\n while (parent >=0 && table[parent].compareTo(table[child]) < 0)\n {\n swap (table, parent, child);\n child = parent;\n parent = (child - 1) / 2;\n }//end while\n }//end while\n }", "public void maxHeapifyUp(int index) {\n while( (index != 0) && (heap.get(index).compareTo(heap.get(parentIndex(index)))) > 0 ) {\n swap(heap, index, parentIndex(index));\n index = parentIndex(index);\n }\n }", "public int insert(int k, String i) {\r\n\t\t WAVLNode parentToInsert;\r\n\t\t if(this.root == null)\r\n\t\t {\r\n\t\t\t this.root = new WAVLNode (k,i,this.getExternalNode());\r\n\t\t\t return 0;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\t parentToInsert = this.root.placeToInsert(k);\r\n\t\t\t //System.out.println(parentToInsert.getKey());\r\n\t\t\t WAVLNode nodeToInsert = new WAVLNode(k,i,this.getExternalNode());\r\n\t\t\t if(parentToInsert == null)\r\n\t\t\t {\r\n\t\t\t\t return -1;\r\n\t\t\t }\r\n\t\t\t if(this.min == null || k < this.min.getKey())\r\n\t\t\t {\r\n\t\t\t\t this.min = nodeToInsert;\r\n\t\t\t }\r\n\t\t\t if(this.max == null || k > this.max.getKey())\r\n\t\t\t {\r\n\t\t\t\t this.max = nodeToInsert;\r\n\t\t\t }\r\n\t\t\t if(parentToInsert.getKey() > k)\r\n\t\t\t {\r\n\t\t\t\t parentToInsert.setLeft(nodeToInsert);\r\n\t\t\t\t nodeToInsert.setParent(parentToInsert);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t parentToInsert.setRight(nodeToInsert);\r\n\t\t\t\t nodeToInsert.setParent(parentToInsert);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t WAVLNode currentNode = nodeToInsert;\r\n\t\t\t while(currentNode.getParent() != null)\r\n\t\t\t {\r\n\t\t\t\t currentNode = currentNode.getParent();\r\n\t\t\t\t currentNode.setSubTreeSize(currentNode.getSubTreeSize()+1);\r\n\t\t\t\t //System.out.println(\"Changed \" +currentNode.getKey()+ \" To \" + (currentNode.getSubTreeSize()));\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t int numRebalance = parentToInsert.rebalanceInsert();\r\n\t\t\t while(this.root.getParent() != null)\r\n\t\t\t {\r\n\t\t\t\t //System.out.println(this.root.getKey());\r\n\t\t\t\t this.setRoot(this.root.getParent());\r\n\t\t\t }\r\n\t\t\t return numRebalance;\r\n\t\t }\r\n\t }", "private Node insert(Node root, T element) {\n\t\tif (root == null)\n\t\t\troot = new Node(element);\n\t\t// left side\n\t\telse if (element.compareTo(root.element) < 0) {\n\t\t\troot.left = insert(root.left, element);\n\t\t\troot.left.parent = root;\n\t\t\t// right side\n\t\t} else if (element.compareTo(root.element) >= 0) {\n\t\t\troot.right = insert(root.right, element);\n\t\t\troot.right.parent = root;\n\t\t}\n\n\t\treturn root;\n\t}", "protected void siftUp() {\r\n\t\tint child = theHeap.size() - 1, parent;\r\n\r\n\t\twhile (child > 0) {\r\n\t\t\tparent = (child - 1) >> 1;\t// >> 1 is slightly faster than / 2\r\n\t\t\t\t\t\t\t\t\t\t// => parent = (child - 1) / 2\r\n\t\t\tif (compare(theHeap.get(child), theHeap.get(parent)) >= 0)\r\n\t\t\t\tbreak;\r\n\t\t\tswap(parent, child);\r\n\t\t\tchild = parent;\r\n\t\t}\r\n\t}", "private int deleteMax() {\n int ret = heap[0];\n heap[0] = heap[--size];\n\n // Move root back down\n int pos = 0;\n while (pos < size / 2) {\n int left = getLeftIdx(pos), right = getRightIdx(pos);\n\n // Compare left and right child elements and swap accordingly\n if (heap[pos] < heap[left] || heap[pos] < heap[right]) {\n if (heap[left] > heap[right]) {\n swap(pos, left);\n pos = left;\n } else {\n swap(pos, right);\n pos = right;\n }\n } else {\n break;\n }\n }\n\n return ret;\n }", "public static void main(String[] args) {\n// heap.replace(5);\n// heap.printHeap();\n\t \n\t int[] numbers = {5, 3, 50, 2, 16, 1};\n\t BinaryTreeNode binaryTreeHead = BuildBinarySearchTree.buildBinarySearchTree(numbers);\n\t BinaryTreeTraversals.printLevelOrder(binaryTreeHead);\n\t System.out.println(\"\\n\\n\");\n\t BinaryTreeTraversals.printInorderNonRecursive(binaryTreeHead);\n }", "private void minHeapPercolateUp(int index) {\r\n while (index > 0) {\r\n int parent = (int) Math.floor((index - 1) / 2); // parent index\r\n int compareResult = data[index].compareTo(data[parent]); // integer value of the comparison of\r\n // process at `index` to process at\r\n // index `parent`\r\n if (compareResult >= 0) { // order of heap \"heapified\" for min heap\r\n break;\r\n } else {\r\n swap(index, parent);\r\n index = parent;\r\n }\r\n }\r\n }", "@Override\n protected void rebalanceInsert(Position<Entry<K, V>> p) {\n if (!isRoot(p)) {\n makeRed(p);\n resolveRed(p); // The inserted red node may cause a double-red problem\n }\n }", "void buildHeap() {\n for (int i = parent(size - 1); i >= 0; i--) {\n percolateDown(i);\n }\n }", "void fhInsert(Nodefh in)\n\t{\n\t\tin.ChildCut = false;\n\t\tif(isEmpty()){\n\t\t\tmin=in;\n\t\t\tmin.Left = min;\n\t\t\tmin.Right = min;\n\t\t\tminindex = min.index;\n\t\t\tcurrent = min;\n\t\t\tlast = min;\n\t\t}\t\n\t\telse\n\t\t\tif(in.dist < min.dist){\n\t\t\t\tin.Right = min;\n\t\t\t\tin.Left = min.Left;\n\t\t\t\tmin.Left.Right = in;\n\t\t\t\tmin.Left = in;\n\t\t\t\tmin = in;\n\t\t\t\tminindex = in.index;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tin.Right = min;\n\t\t\t\tin.Left = min.Left;\n\t\t\t\tmin.Left.Right = in;\n\t\t\t\tmin.Left = in;\n\t\t\t}\n\t\tlast = min.Left;\n\t}", "private void fixHeap(int indexItem){\r\n int child = indexItem;\r\n int parent = get_parent(child);\r\n // Fixing heap for upperbounds\r\n while (parent >= 0 && compare(theData.get(parent).data, theData.get(child).data) < 0) {\r\n swap(parent, child);\r\n child = parent;\r\n parent = get_parent(child);\r\n }\r\n\r\n parent = indexItem;\r\n\r\n // Fixing heap for lowerbounds\r\n while (true) {\r\n int leftChild = get_left_child(parent);\r\n if (leftChild >= theData.size()) {\r\n break;\r\n }\r\n int rightChild = leftChild + 1;\r\n int maxChild = leftChild;\r\n\r\n if (rightChild < theData.size() && compare(theData.get(leftChild).data, theData.get(rightChild).data) < 0) {\r\n maxChild = rightChild;\r\n }\r\n\r\n if (compare(theData.get(parent).data, theData.get(maxChild).data) < 0) {\r\n swap(parent, maxChild);\r\n parent = maxChild;\r\n } else {\r\n break;\r\n }\r\n }\r\n }", "public int insert(int newKey){\n int i=n-1;\n int x =0;\n if (isLeaf){\n while ((i>=0)&& (newKey<=key[i])) {\n if(newKey==key[i]) \n return -1;//duplicate return withoiut doinganything\n key[i+1] = key[i];\n i--;\n \n }\n if(x>=0){\n n++;\n key[i+1]=newKey;\n }\n }\n else{\n while ((i>=0)&& (newKey<=key[i])) {\n if(newKey==key[i])\n return -1;// find duplictte return without doing anithing \n \n else\n i--;\n }\n if(x>=0){\n \n int insertChild = i+1; // Subtree where new key must be inserted\n if (c[insertChild].isFull()){\n x++;// one more node.\n // The root of the subtree where new key will be inserted has to be split\n // We promote the mediand of that root to the current node and\n // update keys and references accordingly\n \n //System.out.println(\"This is the full node we're going to break \");// Debugging code\n //c[insertChild].printNodes();\n //System.out.println(\"going to promote \" + c[insertChild].key[T-1]);\n n++;\n c[n]=c[n-1];\n for(int j = n-1;j>insertChild;j--){\n c[j] =c[j-1];\n key[j] = key[j-1];\n }\n key[insertChild]= c[insertChild].key[T-1];\n c[insertChild].n = T-1;\n \n BTreeNode newNode = new BTreeNode(T);\n for(int k=0;k<T-1;k++){\n newNode.c[k] = c[insertChild].c[k+T];\n newNode.key[k] = c[insertChild].key[k+T];\n }\n \n newNode.c[T-1] = c[insertChild].c[2*T-1];\n newNode.n=T-1;\n newNode.isLeaf = c[insertChild].isLeaf;\n c[insertChild+1]=newNode;\n \n //System.out.println(\"This is the left side \");\n //c[insertChild].printNodes(); \n //System.out.println(\"This is the right side \");\n //c[insertChild+1].printNodes();\n //c[insertChild+1].printNodes();\n \n if (newKey <key[insertChild]){\n c[insertChild].insert(newKey); }\n else{\n c[insertChild+1].insert(newKey); }\n }\n else\n c[insertChild].insert(newKey);\n }\n \n \n }\n return x ;\n }", "void insert(K key, V value) {\r\n\r\n\r\n Node child = getChild(key);\r\n child.insert(key, value);\r\n // to check if the child is overloaded\r\n if (child.isOverflow()) {\r\n Node sibling = child.split();\r\n insertChild(sibling.getFirstLeafKey(), sibling);\r\n }\r\n\r\n // if the node is full then it requires to split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n\r\n }", "@Test\n public void testInsertAndSize() {\n this.iPQ.insert(1);\n assertEquals(\"Integer PQHeap size is: \",\n 1, this.iPQ.size());\n }", "private void heapify(int arr[], Node parent, int parentPosition) {\n if (parentPosition > arr.length) {\n return;\n }\n try {\n parent.leftChild = new Node(arr[2 * parentPosition - 1]);\n heapify(arr, parent.leftChild, 2 * parentPosition);\n parent.rightChild = new Node(arr[2 * parentPosition]);\n heapify(arr, parent.rightChild, 2 * parentPosition + 1);\n } catch (Exception e) {\n e.getMessage();\n }\n }", "private void heapify(int[] array, int n, int i) {\r\n\t\tint largest = i; // initialize largest as root\r\n\t\tint leftNode = 2 * i + 1; // left node\r\n\t\tint rightNode = 2 * i + 2; // right node\r\n\t\t// if left node is larger than root node\r\n\t\tif (leftNode < n && array[leftNode] > array[largest])\r\n\t\t\tlargest = leftNode;\r\n\r\n\t\t// if left node is larger than root node\r\n\t\tif (rightNode < n && array[rightNode] > array[largest])\r\n\t\t\tlargest = rightNode;\r\n\r\n\t\t// if largest is not the root\r\n\t\tif (largest != i) {\r\n\t\t\tint swap = array[i];\r\n\t\t\tarray[i] = array[largest];\r\n\t\t\tarray[largest] = swap;\r\n\t\t\t// Recursively call to heapify\r\n\t\t\theapify(array, n, largest);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic int insert(T element) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tthis.size++;\r\n\t\tBSTNode<T> z = new BSTNode();\r\n\t\tz.data = element;\r\n\t\tz.parent = null;\r\n\t\tz.left = null;\r\n\t\tz.right = null;\r\n\t\t\r\n\t\t\r\n\t\tBSTNode<T> x = this.root;\r\n\t\tBSTNode<T> y = null;//trailing\r\n\t\t\r\n\t\tint traversals = 0;\r\n\t\twhile(x!= null) {\r\n\t\t\ttraversals++;\r\n\t\t\ty=x;\r\n\t\t\tif(z.data.compareTo(x.data)<0) {\r\n\t\t\t\tx = x.left;\r\n\t\t\t}else {\r\n\t\t\t\tx = x.right;\r\n\t\t\t}\r\n\t\t}\r\n\t\tz.parent = y;\r\n\t\tif(y==null) {\r\n\t\t\tthis.root=z;\r\n\t\t}else if(z.data.compareTo(y.data)<0) {\r\n\t\t\ty.left=z;\r\n\t\t}else {\r\n\t\t\ty.right=z;\r\n\t\t}\r\n\t\t\r\n\t\treturn traversals;\r\n\t}", "public TreeNode insert(TreeNode root, int key) {\n if (root == null) {\n root = new TreeNode(key);\n return root;\n }\n TreeNode cur = root, par = root;\n while (cur != null) {\n par = cur;\n if (cur.key == key) {\n return root;\n }\n if (key < cur.key) {\n cur = cur.left;\n } else {\n cur = cur.right;\n }\n }\n // this is when cur is null (out of the while)\n if (key < par.key) {\n par.left = new TreeNode(key);\n } else {\n par.right = new TreeNode(key);\n }\n \n return root;\n }", "private void heapify(int left, int right) {\r\n\t\tint k = 2 * left;\r\n\r\n\t\tif (k > right)\r\n\t\t\treturn;\r\n\r\n\t\tif ((k + 1) > right) {\r\n\t\t\tif (c[k - 1].compareTo(c[left - 1]) > 0)\r\n\t\t\t\tswitchElements(left - 1, k - 1);\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (c[k - 1].compareTo(c[k]) < 0)\r\n\t\t\tk++;\r\n\r\n\t\tif (c[left - 1].compareTo(c[k - 1]) < 0) {\r\n\t\t\tswitchElements(left - 1, k - 1);\r\n\t\t\theapify(k, right);\r\n\t\t}\r\n\t}", "private void heapifyDown(int index) {\r\n\t\tint leftChildIndex = index * 2 + 1;\r\n\t\tint rightChildIndex = index * 2 + 2;\r\n\t\tint swapIndex = index;\r\n\t\t\r\n\t\t// if left child exists and greater than current node\r\n\t\tif (leftChildIndex < currentIndex) {\r\n\t\t\tif (heap.get(leftChildIndex).compareTo(heap.get(swapIndex)) > 0)\r\n\t\t\t\tswapIndex = leftChildIndex;\r\n\r\n\t\t\t// if right child exists and greater than current node and left child\r\n\t\t\tif (rightChildIndex < currentIndex) {\r\n\t\t\t\tif (heap.get(rightChildIndex).compareTo(heap.get(swapIndex)) > 0)\r\n\t\t\t\t\tswapIndex = rightChildIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (swapIndex != index) { // swap if necessary\r\n\t\t\tE temp = heap.get(index);\r\n\t\t\theap.set(index, heap.get(swapIndex));\r\n\t\t\theap.set(swapIndex, temp);\r\n\r\n\t\t\theapifyDown(swapIndex); // check next level down\r\n\t\t}\r\n\t}", "private void maxHeapifyDown(int index) {\n assert index >= 0 && index < heap.size();\n\n while (!isLeaf(index)) {\n int j = leftChildIndex(index);\n\n if ( (j < heap.size() - 1) && (heap.get(j).compareTo(heap.get(j + 1)) < 0) ) {\n j++;\n }\n\n if (heap.get(index).compareTo(heap.get(j)) >= 0) {\n return;\n }\n \n swap(heap, index, j);\n index = j;\n }\n }", "public void insert(int n) {\n if (size == capacity) {\n Integer[] grow = new Integer[capacity *= 2];\n System.arraycopy(heap, 0, grow, 0, heap.length);\n heap = grow;\n }\n\n // Insert new element\n heap[size] = n;\n\n // Move element to correct spot\n int currPos = size++, parentPos;\n while (heap[currPos] > heap[parentPos = getParentIdx(currPos)]) {\n swap(currPos, parentPos);\n currPos = parentPos;\n }\n }", "private void minHeapify(int i) {\n int l, r, smallest, temp;\n\n l = leftchild(i);\n r = rightchild(i);\n\n if (r <= heapsize) {\n if (array[l] < array[r]) {\n smallest = l;\n } else {\n smallest = r;\n }\n if (array[i] > array[smallest]) {\n temp = array[i];\n array[i] = array[smallest];\n array[smallest] = temp;\n\n minHeapify(smallest);\n }\n else if ((l == heapsize) && (array[i] > array[l])) {\n temp = array[i];\n array[i] = array[l];\n array[l] = temp;\n\n }\n }\n }", "private void shiftUp() {\n int index = this.size;\n\n while (hasParent(index) && (parent(index).compareTo(heap[index]) > 0)) {\n swap(index, parentIndex(index));\n index = parentIndex(index);\n }\n }", "void insert(int value){\r\n\t\tNode node = new Node(value);\r\n\t\t \r\n\t\tif( this.root == null ) {\r\n\t\t\tthis.root = node ;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t \r\n\t\tNode tempNode = this.root , parent = this.root;\r\n\t\t\r\n\t\twhile( tempNode != null ) {\r\n\t\t\tparent = tempNode;\r\n\t\t\tif( node.value >= tempNode.value ) {\r\n\t\t\t\ttempNode = tempNode.right;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttempNode = tempNode.left ;\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t\tif( node.value < parent.value ) {\r\n\t\t\tparent.left = node ;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tparent.right = node ;\r\n\t\t}\r\n\t}", "public void insert(String input)\n\t{\n\t\tint parent = (pointer - 1) / 2;\n\t\tint child = pointer;\n\n\t\tif (pointer < data.length)\n\t\t{\n\t\t\tdata[pointer] = input;\n\t\t\tpointer++;\n\t\t}\n\n\t\twhile (child != 0 && smallerThan(child, parent))\n\t\t{\n\t\t\t//upheap\n\t\t\tswap(child, parent);\n\t\t\tchild = parent;\n\t\t\tparent = (child - 1) / 2;\n\t\t}\n\n\t}", "public void insert(Point2D p) {\n if (this.n ==0) {\n this.root = new Node(p, true, new RectHV(0,0,1,1));\n this.n++;\n } else {\n if (insert1(root, p)) this.n++;\n }\n }", "private void insertNodeIntoTree(Node node) {\n\t\troot = insert(root,node);\t\n\t}", "private static void restoreHeapProperties(Node newNode, HeapNode heap) {\r\n\t\tVector<Edge> edges = newNode.edges;\r\n\t\t\r\n\t\t//I need to analize all nodes that share an edge with newNode and only them. \r\n\t\tfor(Edge e : edges){\r\n\t\t\tNode otherNode = (e.n1 == newNode) ? e.n2 : e.n1;\r\n\t\t\t\r\n\t\t\tif(!belongsToX[otherNode.number]){ //newNode in X and otherNode in V-X. \r\n\t\t\t\tif(heap.getNodeInfo(otherNode) == -1){ //node didn't exist on heap. Add it.\r\n\t\t\t\t\theap.setNodeMinEdge(otherNode, e);\r\n\t\t\t\t\theap.add(otherNode);\r\n\t\t\t\t}else{ \t\t\t\t\t\t\t\t\t\t\t\t //node already exists on heap\r\n\t\t\t\t\tif(heap.getNodeMinEdge(otherNode).cost > e.cost){ //new edge costs less then previous. Delete and re-add the node.\r\n\t\t\t\t\t\theap.delete(otherNode);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\theap.setNodeMinEdge(otherNode, e);\r\n\t\t\t\t\t\theap.add(otherNode);\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}", "@Override\n public boolean insert(E e) {\n \tif(size() == 0) {\n \t\troot = new TreeNode<E>(e);\n \t\tsize++;\n \t\treturn true;\n \t}\n \tTreeNode<E> parent = findInsertPoint(e, root, null);\n \tif(e.compareTo(parent.element) < 0) {\n \t\tparent.left = new TreeNode<E>(e);\n \t\tsize++;\n \t\treturn true;\n \t} else if(e.compareTo(parent.element) > 0){\n \t\tparent.right = new TreeNode<E>(e);\n \t\tsize++;\n \t\treturn true;\n \t}\n \tthrow new IllegalArgumentException(\"Invalid Entry\");\n \n }", "public static void heapSort(int arr[]) {\n int n = arr.length;\n\n //Creating heap\n for (int i = n / 2 - 1; i >= 0; i--)\n heapify(arr, n, i);\n\n //Taking elements from heap one by one\n for (int i = n - 1; i > 0; i--) {\n //Place current root to end\n int temp = arr[0];\n arr[0] = arr[i];\n arr[i] = temp;\n\n //Call max heapify\n heapify(arr, i, 0);\n }\n }", "void reheap (int a[], int length, int i) throws Exception {\n boolean done = false;\n int T = a[i];\n int parent = i;\n int child = 2*(i+1)-1;\n while ((child < length) && (!done)) {\n compex(parent, child);\n pause();\n if (child < length - 1) {\n if (a[child] < a[child + 1]) {\n child += 1;\n }\n }\n if (T >= a[child]) {\n done = true;\n }\n else {\n a[parent] = a[child];\n parent = child;\n child = 2*(parent+1)-1;\n }\n }\n a[parent] = T;\n }", "private void fixHeap(){\r\n int i = 1;\r\n int v = array[i].value.getYear();\r\n while(hasChildren(i)){\r\n Node left = array[getLeftChildIndex(i)];\r\n Node right = array[getRightChildIndex(i)];\r\n if(left != null){\r\n if(right != null){\r\n if(left.value.getYear() < right.value.getYear()){\r\n if(v > left.value.getYear()){\r\n swap(array[i], left);\r\n i = getLeftChildIndex(i);\r\n continue;\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n else{\r\n if(v > right.value.getYear()){\r\n swap(array[i], right);\r\n i = getRightChildIndex(i);\r\n continue;\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n if(v > left.value.getYear()){\r\n swap(array[i], left);\r\n i = getLeftChildIndex(i);\r\n continue;\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n break;\r\n }\r\n }\r\n\r\n }", "public void minHeapify(int rootIndex) {\n final int leftChildIndex = getLeftIndex(rootIndex);\n final int rightChildIndex = getRightIndex(rootIndex);\n int smallestIndex = rootIndex;\n if (leftChildIndex < size && arr[leftChildIndex] < arr[rootIndex]) {\n smallestIndex = leftChildIndex;\n }\n if (rightChildIndex < size && arr[rightChildIndex] < arr[rootIndex]) {\n smallestIndex = leftChildIndex;\n }\n if (smallestIndex != rootIndex) {\n MathUtil.swap(arr, rootIndex, smallestIndex);\n minHeapify(smallestIndex);\n }\n }", "public void insertIntoHeap(HuffmanTreeNode node) {\n\n\t\tHuffmanTreeNode[] heap = this.getHuffmanHeap();\n\t\tHuffmanTreeNode[] newHeap = new HuffmanTreeNode[heap.length + 1];\n\t\t\n\t\tfor (int i = 0; i < heap.length; i++)\n\t\t{\n\t\t\tnewHeap[i] = heap[i];\n\t\t}\n\t\t\n\t\tnewHeap[heap.length] = node;\n\t\tnewHeap = heapSort(newHeap);\n\t\tthis.setHuffmanHeap(newHeap);\n\t}", "public void makeHeap() {\r\n\t\t//for (int i = (theHeap.size() >> 1) - 1; i >= 0; i--) {\r\n\t\tfor (int i = (theHeap.size() - 1) >> 1; i >= 0; i--) {\r\n\t\t\tsiftDown(i);\r\n\t\t}\r\n\t}", "public void insert(Integer key){\r\n\t\tint start=this.root;\r\n\t\tint currentPos=avail;\r\n\t\tint temp=-1;\r\n\t\twhile(increaseCompares() && start!=-1) {\r\n\t\t\ttemp=start;\r\n\t\t\tcompares++;\r\n\t\t\tif(increaseCompares() && key<getKey(start)) {\r\n\t\t\t\tstart=getLeft(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstart=getRight(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Tree is empty. New Node is now root of tree\r\n\t\tif(increaseCompares() && temp==-1) {\r\n\t\t\tsetRoot(0);\r\n\t\t\tcompares++;\r\n\t\t\tsetKey(avail, key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\t//Compare values and place newNode either left or right of previous Node\r\n\t\telse if(increaseCompares() && key<getKey(temp)) {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetLeft(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetRight(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t}", "public static Object PQ_insert(Object... arg) {\nUNSUPPORTED(\"etrjsq5w49uo9jq5pzifohkqw\"); // int\nUNSUPPORTED(\"5eeaexrm7pigm7t9d73aqaaht\"); // PQ_insert(snode* np)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"7d2tojz8u1bqjo7uhe2jqz8ks\"); // if (PQcnt == PQsize) {\nUNSUPPORTED(\"1fnwaiyzr5fvurskinr46kklp\"); // agerr (AGERR, \"Heap overflow\\n\");\nUNSUPPORTED(\"bur99ge8gwr5q0vyjwjyk8z3b\"); // return (1);\nUNSUPPORTED(\"7ijd6pszsxnoopppf6xwo8wdl\"); // }\nUNSUPPORTED(\"d8u0aq1g7mc9qslpfsw3o3ezz\"); // PQcnt++;\nUNSUPPORTED(\"8f54fbv0205j58hpu3uq3i2ow\"); // pq[PQcnt] = np;\nUNSUPPORTED(\"f4e1yfpgiak6lx72g6gk4nyi0\"); // PQupheap (PQcnt);\nUNSUPPORTED(\"a7h72yd6f22ezx8o0izfoyyzl\"); // PQcheck();\nUNSUPPORTED(\"bid671dovx1rdiquw5vm3fttj\"); // return 0;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}", "void Minheap()\n {\n for(int i= (size-2)/2;i>=0;i--)\n {\n minHeapify(i);\n }\n }", "private void minHeapify(int v, int heapSize){\n\t\tint smallest;\n\t\tint left = leftChild(v);\n\t\tint right = rightChild(v);\n\t\tif (left<heapSize && _a[left].getWeight()<_a[v].getWeight()){\n\t\t\tsmallest = left;\n\t\t}\n\t\telse{\n\t\t\tsmallest = v;\n\t\t}\n\t\tif (right<heapSize && _a[right].getWeight()<_a[smallest].getWeight()){\n\t\t\tsmallest = right;\n\t\t}\n\t\tif (smallest!=v){\n\t\t\texchange(v, smallest);\n\t\t\tminHeapify(smallest, heapSize);\n\t\t}\t\t\n\t}" ]
[ "0.735675", "0.66659456", "0.665962", "0.66560465", "0.66254354", "0.65980554", "0.65854996", "0.65486604", "0.6528446", "0.6510174", "0.65007734", "0.6500221", "0.6486846", "0.6484214", "0.64820564", "0.6470616", "0.6442083", "0.6438696", "0.6410268", "0.63791335", "0.6370074", "0.63401777", "0.6334073", "0.6332407", "0.6324862", "0.6301507", "0.62939507", "0.6271918", "0.62661225", "0.6266011", "0.6264433", "0.6261349", "0.6257212", "0.6252295", "0.6251113", "0.6242661", "0.6241792", "0.62184674", "0.62109715", "0.62012506", "0.61902106", "0.618687", "0.6185145", "0.61809963", "0.61726314", "0.6169947", "0.6169867", "0.61502427", "0.6135768", "0.61295974", "0.612479", "0.61227083", "0.61214745", "0.6117649", "0.6116138", "0.6102246", "0.6100824", "0.6097016", "0.6091754", "0.6085146", "0.6076343", "0.6071309", "0.6069417", "0.60616237", "0.60582954", "0.60580087", "0.60544765", "0.6044988", "0.604246", "0.6031705", "0.60206443", "0.6011492", "0.60100746", "0.5996301", "0.59936094", "0.59867704", "0.5983274", "0.5966769", "0.5963391", "0.59607786", "0.5960765", "0.5943708", "0.59282774", "0.5925425", "0.59160864", "0.59151125", "0.5913353", "0.5907018", "0.58985955", "0.5897637", "0.5889188", "0.58789635", "0.58536017", "0.58508843", "0.58508015", "0.5848272", "0.5840119", "0.58388364", "0.58300817", "0.5823612" ]
0.63017493
25
Get complete image name from service spec
public static String getImage(ServiceSpec serviceSpec) throws HyscaleException { if (serviceSpec == null) { return null; } return getImage(serviceSpec.get(HyscaleSpecFields.image, Image.class)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String extractImageNameFromIdentifier(String image) {\n String[] tokens = image.split(\"/\");\n\n String imageName = tokens[tokens.length-1];\n if(imageName.contains(\":\")) {\n return imageName.split(\":\")[0];\n } else {\n return imageName;\n }\n }", "private String getImageName() {\n if (options.containsKey(\"image\")) {\n String imageName = (String)options.get(\"image\");\n if (StringUtils.hasText(imageName)) {\n return imageName;\n }\n }\n\n return \"\";\n /*\n func (s *executor) getImageName() (string, error) {\n\tif s.options.Image != \"\" {\n\t\timage := s.Build.GetAllVariables().ExpandValue(s.options.Image)\n\t\terr := s.verifyAllowedImage(s.options.Image, \"images\", s.Config.Docker.AllowedImages, []string{s.Config.Docker.Image})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn image, nil\n\t}\n\n\tif s.Config.Docker.Image == \"\" {\n\t\treturn \"\", errors.New(\"No Docker image specified to run the build in\")\n\t}\n\n\treturn s.Config.Docker.Image, nil\n}\n */\n }", "private String getNameImage(String imagePath) {\n\t\treturn imagePath != null ? imagePath.replace(pathFileBase, \"\") : \"\";\n\t}", "public final String getImageName() {\n return this.imageName;\n }", "public abstract String getImageSuffix();", "java.lang.String getImage();", "public String getImageName() {\r\n\t\treturn _imageName;\r\n\t}", "public static String getImageName( final BioModule module ) throws ConfigNotFoundException {\n\t\tfinal String className = module.getClass().getName();\n\t\tfinal String simpleName = getDockerClassName( module );\n\t\tString imageName = simpleName.substring( 0, 1 ).toLowerCase();\n\t\tif( useBasicBashImg( module ) ) imageName = BLJ_BASH;\n\t\telse if (module instanceof JavaModule ) imageName = \"biolockj_controller\"; //TODO: this whole process should be replaced with Config and Module methods.\n\t\telse if( module instanceof GenMod ) imageName = Config.requireString( module, Constants.DOCKER_CONTAINER_NAME );\n\t\telse {\n\t\t\tfor( int i = 2; i < simpleName.length() + 1; i++ ) {\n\t\t\t\tfinal int len = imageName.toString().length();\n\t\t\t\tfinal String prevChar = imageName.toString().substring( len - 1, len );\n\t\t\t\tfinal String val = simpleName.substring( i - 1, i );\n\t\t\t\tif( !prevChar.equals( IMAGE_NAME_DELIM ) && !val.equals( IMAGE_NAME_DELIM ) &&\n\t\t\t\t\tval.equals( val.toUpperCase() ) && !NumberUtils.isNumber( val ) )\n\t\t\t\t\timageName += IMAGE_NAME_DELIM + val.toLowerCase();\n\t\t\t\telse if( !prevChar.equals( IMAGE_NAME_DELIM ) ||\n\t\t\t\t\tprevChar.equals( IMAGE_NAME_DELIM ) && !val.equals( IMAGE_NAME_DELIM ) ) imageName += val.toLowerCase();\n\t\t\t}\n\n\t\t\tif( hasCustomDockerDB( module ) && ( className.toLowerCase().contains( \"knead_data\" ) ||\n\t\t\t\tclassName.toLowerCase().contains( \"kraken\" ) ) ) imageName += DB_FREE;\n\t\t}\n\t\t\n\t\tLog.info( DockerUtil.class, \"Map: Class [\" + className + \"] <--> Docker Image [ \" + imageName + \" ]\" );\n\t\treturn imageName;\n\t}", "public String getImageNameSrc(String srcStringXpath) {\r\n\r\n\t\tString srcString = webAppDriver.findElementByXpath(srcStringXpath).getAttribute(\"src\");\r\n\t\tString temp[] = srcString.split(\"/\");\r\n\t\tint len = temp.length;\r\n\t\tString imageName = temp[len - 1];\r\n\t\t// System.out.println(\"^^^name from method \"+imageName);\r\n\t\timageName = imageName.substring(0, imageName.length());\r\n\t\t// System.out.println(\"Image name from method \"+imageName);\r\n\t\treturn imageName;\r\n\t}", "@Override\n\tpublic String getImageName() {\n\t\treturn \"\";\n\t}", "public static String getImageWithDigest(ServiceSpec serviceSpec, String digest) throws HyscaleException {\n if (serviceSpec == null) {\n return null;\n }\n Image image = serviceSpec.get(HyscaleSpecFields.image, Image.class);\n if (image == null) {\n return null;\n }\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(getImageWithoutTag(image));\n if (StringUtils.isNotBlank(digest)) {\n stringBuilder.append(ToolConstants.AT_SIGN).append(digest);\n }\n return stringBuilder.toString();\n }", "public java.lang.String getImage() {\n java.lang.Object ref = image_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n image_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private String getTipoImage(String nameImage) {\n\t\tString retorno = \"\";\n\t\tString[] textoSeparado = nameImage.split(\"\\\\.\");\n\n\t\tif (textoSeparado != null && textoSeparado.length != 0)\n\t\t\tswitch (textoSeparado[textoSeparado.length - 1]) {\n\t\t\tcase \"jpg\":\n\t\t\t\tretorno = \"image/jpeg\";\n\t\t\t\tbreak;\n\t\t\tcase \"png\":\n\t\t\t\tretorno = \"image/png\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tretorno = \"image/\" + textoSeparado[textoSeparado.length - 1];\n\t\t\t}\n\n\t\treturn retorno;\n\t}", "public static String getEventImage(String image) {\n return EVENT_IMAGE_URL + image;\n }", "public static String getImagePathname(Bundle data) {\n // Extract the path to the image file from the Bundle, which\n // should be stored using the IMAGE_PATHNAME key.\n return data.getString(IMAGE_PATHNAME);\n }", "protected String getDockerImageName() {\n\t\treturn CodeExecutorDockerBase.DEFAULT_DOCKER_IMAGE_NAME;\n\t}", "public java.lang.String getImage() {\n java.lang.Object ref = image_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n image_ = s;\n return s;\n }\n }", "private String getLocalImageFileName(String url) {\n String name = URLUtil.guessFileName(url, null, null);\n return name;\n }", "java.lang.String getPackageImageURL();", "public String getFilename() throws ImageException {\r\n\tif (!bValid){\r\n\t\tthrow new ImageException(\"image not valid\");\r\n\t}\t\r\n\treturn imageName;\r\n}", "public String getImageName(String srcStringXpath) {\r\n\r\n\t\tString srcString = webAppDriver.findElementByXpath(srcStringXpath).getAttribute(\"src\");\r\n\t\tString imageName = srcString.substring(srcString.lastIndexOf(\"/\") + 1, srcString.length());\r\n\t\treturn imageName;\r\n\t}", "@ApiModelProperty(example = \"functions/nodeinfo:latest\", required = true, value = \"The fully qualified docker image name of the function\")\n public String getImage() {\n return image;\n }", "public String getImgName() {\n return imgName;\n }", "static String getMascotImageFilename() {\n Path filePath = Paths.get(badgeResourcePath, \"kumoricon_2017-mascot_chibi.png\");\n return filePath.toAbsolutePath().toString();\n }", "public String getThumbnailImageName(String srcStringXpath) {\r\n\r\n\t\tString srcString = webAppDriver.findElementByXpath(srcStringXpath).getAttribute(\"style\");\r\n\t\tString temp[] = srcString.split(\"/\");\r\n\t\tint len = temp.length;\r\n\t\tString imageName = temp[len - 1];\r\n\t\timageName = imageName.substring(0, imageName.indexOf(\"\\\"\"));\r\n\t\tSystem.out.println(\"^^^name from method \" + imageName);\r\n\t\treturn imageName;\r\n\t}", "@Override\n\tpublic String getName()\n\t{\n\t\tString result = \"Adjust Image (Simple)\";\n\t\treturn result;\n\t}", "String getImage();", "public String getPhotoFileName() {\n return \"IMG_\" + getId().toString() + \".jpg\";\n }", "java.lang.String getProfileImage();", "java.lang.String getImagePath();", "String getDockerRepositoryName();", "public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}", "public static String getExtension(String img) {\n String[] arr = img.split(\"\\\\.\");\n return arr[arr.length - 1];\n }", "private String getUniquePhotoName() {\n\t\tTime now = new Time();\n\t\tnow.setToNow();\n\t\treturn now.format2445();\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Image> readImage(\n @Path(\"name\") String name);", "public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }", "public java.lang.String getImagePath() {\n java.lang.Object ref = imagePath_;\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 imagePath_ = s;\n }\n return s;\n }\n }", "SMFTypeRef getSrcName();", "public String createImageName(File imageFile)\n\t{\n\t\tString name = imageFile.getAbsolutePath();\n\t\t\n\t\t// remove the initial part of the path that is common among all images so that only the relative path within the image folder remains\n\t\t// also remove the file's extension\n\t\tname = name.substring(imageFolder.getAbsolutePath().length() + 1, name.lastIndexOf('.'));\t\t\n\t\treturn name;\n\t}", "public String getImageResource() {\n \t\t// if (isWindows)\n \t\t// return \"/\" + new File(imageResource).getPath();\n \t\t// else\n \t\treturn imageResource;\n \t}", "public final String getPrefix() {\n/* 70 */ return \"jpegImage\";\n/* */ }", "@Override\n public String getServiceFileName(Interface service, String packageName) {\n String[] names = packageName.split(\"::\");\n List<String> newNames = new ArrayList<>();\n for (String name : names) {\n newNames.add(packageFilePathPiece(Name.upperCamel(name)));\n }\n newNames.add(classFileNameBase(Name.upperCamel(getApiWrapperClassName(service))));\n return Joiner.on(\"/\").join(newNames.toArray());\n }", "public String getName(Representation representation);", "public static String getUserImage(String image) {\n return EVENT_IMAGE_URL + image;\n }", "private byte[] getFileNameBytes(File photo) {\r\n return photo.getName().getBytes();\r\n }", "public String getImageString() {\n return getString(POST_IMAGE_STRING);\n }", "public native String getFileName() throws MagickException;", "private String getServiceName(Descriptors.ServiceDescriptor descriptor ) {\r\n return descriptor.getFullName();\r\n }", "public String getSourceImageName() {\n return this.sourceImageName;\n }", "String getItemImage();", "public java.lang.String getImagePath() {\n java.lang.Object ref = imagePath_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n imagePath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "java.lang.String getServiceName();", "java.lang.String getServiceName();", "public java.lang.String getImage() {\n\t\treturn _imageCompanyAg.getImage();\n\t}", "private String beautiplyFileNameReferer() {\r\n\r\n\t\tif (checkBeautiplyImagesExixtence()) {\r\n\t\t\ttry {\r\n\t\t\t\tString fname = beautiplyFileNameGenerator();\r\n\t\t\t\tFileInputStream fis = context.openFileInput(fname);\r\n\t\t\t\treturn fname;\r\n\t\t\t} catch (FileNotFoundException e4) {\r\n\t\t\t\treturn beautiplyFileNameReferer();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t}", "@Nullable private String getLogoFromUIInfo() {\n if (getRelyingPartyUIContext() == null) {\n return null;\n }\n return getRelyingPartyUIContext().getLogo(minWidth, minHeight, maxWidth, maxHeight);\n \n }", "String getTextureName();", "public final String getSuffix() {\n/* 62 */ return \".jpg\";\n/* */ }", "@Test\r\n\tpublic void getFileName() {\n\t\tString test = \"form-data; name=\\\"uploadFile\\\"; filename=\\\"james.png\\\"\";\r\n\r\n\t\t/***When***/\r\n\t\tString result = futil.getFileName(test);\r\n\t\t/***Then***/\r\n\t\t//assertEquals(\"sally.png\", result);\r\n\t\tassertEquals(\"james.png\", result);\r\n\r\n\t}", "String getImagePath();", "String getImagePath();", "public String getBaseImageName() {\n return this.getPokemonInfo().getBaseImageName();\n }", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Returns product image.\";\n\t}", "public String getOutputImageName(final String imageParamName) {\r\n if (imageParamName.equals(AlgorithmParameters.RESULT_IMAGE)) {\r\n if (getResultImage() != null) {\r\n // algo produced a new result image\r\n return getResultImage().getImageName();\r\n } else {\r\n // algo was done in place\r\n return image.getImageName();\r\n }\r\n }\r\n\r\n Preferences.debug(\"Unrecognized output image parameter: \" + imageParamName + \"\\n\", Preferences.DEBUG_SCRIPTING);\r\n\r\n return null;\r\n }", "public String getOutputImageName(final String imageParamName) {\r\n if (imageParamName.equals(AlgorithmParameters.RESULT_IMAGE)) {\r\n if (getResultImage() != null) {\r\n // algo produced a new result image\r\n return getResultImage().getImageName();\r\n } else {\r\n // algo was done in place\r\n return image.getImageName();\r\n }\r\n }\r\n\r\n Preferences.debug(\"Unrecognized output image parameter: \" + imageParamName + \"\\n\", Preferences.DEBUG_SCRIPTING);\r\n\r\n return null;\r\n }", "public final String getLogoImageName() {\n\t\treturn logoImageName;\n\t}", "public String getImage() { return image; }", "public String resolveThumbnailUrl(ImageDTO imageDto) {\n\t\t\treturn \"foo\";\n\t\t}", "String avatarImage();", "private static String getName(PathOrUrl location) {\n\t\t\tthrow new UnsupportedOperationException(\"Not implemented yet.\");\r\n\t\t}", "String getDockerFilelocation();", "public static String getDockerImage( final BioModule module ) throws ConfigNotFoundException {\n\t\treturn \" \" + getDockerUser( module ) + \"/\" + getImageName( module ) + \":\" +\n\t\t\tConfig.requireString( module, DockerUtil.DOCKER_IMG_VERSION );\n\t}", "static String getStaffImageFilename(Attendee attendee) {\n if (attendee.getStaffImageFilename() != null) {\n Path filePath = Paths.get(badgeResourcePath, \"/badgeImage/\", attendee.getStaffImageFilename());\n return filePath.toAbsolutePath().toString();\n }\n return null;\n }", "private String getFilename() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String filename = getExternalStoragePublicDirectory(DIRECTORY_PICTURES).getPath().toString() + \"/\" + timeStamp + \".jpg\";\n\n return filename;\n }", "String getOutputName();", "public abstract String getImageFormat();", "public String getDescriptiveServiceName() {\n if (serviceAbbreviation != null) {\n return serviceAbbreviation;\n }\n return serviceFullName;\n }", "public final String getOldImageName() {\n\t\treturn oldImageName;\n\t}", "public String getIconFileName() {\n\tif (this.isSuccess()) {\n\t return this.icon;\n\t} else {\n\t return null;\n\t}\n }", "public String createImageName(String empName) {\n StringBuilder iN = new StringBuilder();\n\n String[] fnLn = empName.split(\" \");\n iN.append(fnLn[0]);\n iN.append(fnLn[fnLn.length-1].substring(0, 1));\n return iN.toString().trim();\n }", "java.lang.String getInstanceName();", "public byte[] getName();", "private String makeImageUri(String name) {\n\t\tString image = name;\n\t\t// remove all white spaces\n\t\tString in = image.replaceAll(\"\\\\s+\", \"\");\n\t\t// turn to lower case\n\t\tString iname = in.toLowerCase();\n\t\tSystem.out.println(\"iName is: \" + iname);\n\t\tString mDrawableName = iname;\n\t\t// get the resId of the image\n\t\tint resID = getResources().getIdentifier(mDrawableName, \"drawable\",\n\t\t\t\tgetPackageName());\n\n\t\t// resID is notfound show default image\n\t\tif (resID == 0) {\n\t\t\tresID = getResources().getIdentifier(\"default_place\", \"drawable\",\n\t\t\t\t\tgetPackageName());\n\t\t}\n\n\t\t// make the uri\n\t\tUri imageURI = Uri.parse(\"android.resource://\" + getPackageName() + \"/\"\n\t\t\t\t+ resID);\n\t\timage = imageURI.toString();\n\t\treturn image;\n\t}", "@Test\n public void testSearchImages() {\n System.out.println(\"searchImages\");\n String image = \"saqhuss\";\n Docker instance = new Docker();\n String expResult = \"NAME\";\n String[] result = instance.searchImages(image).split(\"\\n\");;\n String[] res = result[0].split(\" \");\n assertEquals(expResult, res[0].trim());\n }", "public String getImage() {\n return image;\n }", "String getFinderName();", "String getServiceName();", "String getServiceName();", "String getAnnotationFile() {\n File imgFile = photos[fileIndex];\n String parentDir = imgFile.getParent();\n String fileName = imgFile.getName();\n String annotationName = fileName.replace(fileName.substring(fileName.lastIndexOf('.') + 1), \"xml\");\n File annotationDir = new File(parentDir.replace(\"images\", \"annotations\"));\n if (!annotationDir.exists()) {\n annotationDir.mkdirs();//create dir if none\n }\n return annotationDir.getAbsolutePath() + File.separator + annotationName;\n }", "java.lang.String getProductImageUrl();", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Image> readImageStatus(\n @Path(\"name\") String name);", "Picture identifyComponentImage() throws Exception;", "@ApiOperation(value = \"Endpoint Summary Description goes here\",\n notes = \"Endpoint Complete Description goes here\",\n response = Response.class)\n @RequestMapping(value = \"/dosomething\", method = RequestMethod.GET, produces = \"application/json\")\n public ResponseEntity<Response> doSomething() throws Exception {\n MediaTagResponse response = imageTaggingService.tagImage(\"http://www.spain.info/export/sites/spaininfo/comun/carrusel-recursos/madrid/dp_madrid_dg_im_03.jpg_369272544.jpg\");\n //\n //\n\n // return response\n return ResponseEntity.ok(new Response(true, response.getLabel().stream().map(TagDTO::getName).collect(Collectors.joining(\",\"))));\n }", "public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}", "public void setImageName(String name) {\n imageToInsert = name;\n}", "public java.lang.String getOSGiServiceIdentifier();", "protected String getName( String key ){\n\n return ( key.indexOf( '.' ) == -1 )?\n //if there is no instance of . then the key is the name\n key:\n //else get the substring to first dot\n key.substring( 0, key.indexOf( '.' ));\n }", "public String getImage() {\n\t\treturn null;\n\t}", "@Override\n public String getEISProductName() throws ResourceException {\n return repository.getDescriptor(Repository.REP_NAME_DESC);\n }", "private String describeImage(String url, byte[] imageBytes) {\n Bitmap bitmap = BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length);\n\n return describeImage(url, bitmap);\n }" ]
[ "0.69139713", "0.6865215", "0.65727013", "0.61806625", "0.6176276", "0.61534756", "0.6109909", "0.60291815", "0.5979337", "0.5947119", "0.5944212", "0.5914768", "0.58946085", "0.5881405", "0.5876228", "0.58425426", "0.5837305", "0.5828022", "0.5808979", "0.57971877", "0.579339", "0.5781507", "0.5774955", "0.57737243", "0.5755621", "0.5728109", "0.5669997", "0.56482744", "0.5647528", "0.560618", "0.55944204", "0.5585886", "0.5557283", "0.5547688", "0.55452543", "0.5543143", "0.55413467", "0.5537469", "0.55107963", "0.5497483", "0.54848707", "0.54842675", "0.5482888", "0.54814374", "0.5473983", "0.54668844", "0.546184", "0.5452429", "0.5448828", "0.5439133", "0.5434844", "0.54127353", "0.54127353", "0.54113334", "0.5410409", "0.5406504", "0.53887486", "0.5385263", "0.5373679", "0.53719753", "0.53719753", "0.53713465", "0.5371286", "0.5369559", "0.5369559", "0.5354648", "0.5348774", "0.5328627", "0.5288364", "0.52801687", "0.5275598", "0.52717906", "0.5271283", "0.52695304", "0.52665156", "0.5258268", "0.5246468", "0.52373916", "0.52260983", "0.5222722", "0.521198", "0.51848286", "0.5182239", "0.51816726", "0.5174572", "0.5171702", "0.5167038", "0.5167038", "0.51569045", "0.51492786", "0.51459336", "0.51411784", "0.51410055", "0.5128537", "0.5127202", "0.512459", "0.5123293", "0.5121249", "0.51211476", "0.5116946" ]
0.6059205
7
Gets complete image name which includes registry url, image name and digest.
public static String getImageWithDigest(ServiceSpec serviceSpec, String digest) throws HyscaleException { if (serviceSpec == null) { return null; } Image image = serviceSpec.get(HyscaleSpecFields.image, Image.class); if (image == null) { return null; } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(getImageWithoutTag(image)); if (StringUtils.isNotBlank(digest)) { stringBuilder.append(ToolConstants.AT_SIGN).append(digest); } return stringBuilder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getImageName() {\n if (options.containsKey(\"image\")) {\n String imageName = (String)options.get(\"image\");\n if (StringUtils.hasText(imageName)) {\n return imageName;\n }\n }\n\n return \"\";\n /*\n func (s *executor) getImageName() (string, error) {\n\tif s.options.Image != \"\" {\n\t\timage := s.Build.GetAllVariables().ExpandValue(s.options.Image)\n\t\terr := s.verifyAllowedImage(s.options.Image, \"images\", s.Config.Docker.AllowedImages, []string{s.Config.Docker.Image})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn image, nil\n\t}\n\n\tif s.Config.Docker.Image == \"\" {\n\t\treturn \"\", errors.New(\"No Docker image specified to run the build in\")\n\t}\n\n\treturn s.Config.Docker.Image, nil\n}\n */\n }", "public final String getImageName() {\n return this.imageName;\n }", "public String getImageName() {\r\n\t\treturn _imageName;\r\n\t}", "public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}", "private String getNameImage(String imagePath) {\n\t\treturn imagePath != null ? imagePath.replace(pathFileBase, \"\") : \"\";\n\t}", "private String extractImageNameFromIdentifier(String image) {\n String[] tokens = image.split(\"/\");\n\n String imageName = tokens[tokens.length-1];\n if(imageName.contains(\":\")) {\n return imageName.split(\":\")[0];\n } else {\n return imageName;\n }\n }", "java.lang.String getImage();", "protected String getDockerImageName() {\n\t\treturn CodeExecutorDockerBase.DEFAULT_DOCKER_IMAGE_NAME;\n\t}", "public java.lang.String getImage() {\n java.lang.Object ref = image_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n image_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getBaseImageName() {\n return this.getPokemonInfo().getBaseImageName();\n }", "public java.lang.String getImage() {\n java.lang.Object ref = image_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n image_ = s;\n return s;\n }\n }", "@Override\n\tpublic String getImageName() {\n\t\treturn \"\";\n\t}", "public static String getImageName( final BioModule module ) throws ConfigNotFoundException {\n\t\tfinal String className = module.getClass().getName();\n\t\tfinal String simpleName = getDockerClassName( module );\n\t\tString imageName = simpleName.substring( 0, 1 ).toLowerCase();\n\t\tif( useBasicBashImg( module ) ) imageName = BLJ_BASH;\n\t\telse if (module instanceof JavaModule ) imageName = \"biolockj_controller\"; //TODO: this whole process should be replaced with Config and Module methods.\n\t\telse if( module instanceof GenMod ) imageName = Config.requireString( module, Constants.DOCKER_CONTAINER_NAME );\n\t\telse {\n\t\t\tfor( int i = 2; i < simpleName.length() + 1; i++ ) {\n\t\t\t\tfinal int len = imageName.toString().length();\n\t\t\t\tfinal String prevChar = imageName.toString().substring( len - 1, len );\n\t\t\t\tfinal String val = simpleName.substring( i - 1, i );\n\t\t\t\tif( !prevChar.equals( IMAGE_NAME_DELIM ) && !val.equals( IMAGE_NAME_DELIM ) &&\n\t\t\t\t\tval.equals( val.toUpperCase() ) && !NumberUtils.isNumber( val ) )\n\t\t\t\t\timageName += IMAGE_NAME_DELIM + val.toLowerCase();\n\t\t\t\telse if( !prevChar.equals( IMAGE_NAME_DELIM ) ||\n\t\t\t\t\tprevChar.equals( IMAGE_NAME_DELIM ) && !val.equals( IMAGE_NAME_DELIM ) ) imageName += val.toLowerCase();\n\t\t\t}\n\n\t\t\tif( hasCustomDockerDB( module ) && ( className.toLowerCase().contains( \"knead_data\" ) ||\n\t\t\t\tclassName.toLowerCase().contains( \"kraken\" ) ) ) imageName += DB_FREE;\n\t\t}\n\t\t\n\t\tLog.info( DockerUtil.class, \"Map: Class [\" + className + \"] <--> Docker Image [ \" + imageName + \" ]\" );\n\t\treturn imageName;\n\t}", "public String getFilename() throws ImageException {\r\n\tif (!bValid){\r\n\t\tthrow new ImageException(\"image not valid\");\r\n\t}\t\r\n\treturn imageName;\r\n}", "private String getLocalImageFileName(String url) {\n String name = URLUtil.guessFileName(url, null, null);\n return name;\n }", "public static String getImagePathname(Bundle data) {\n // Extract the path to the image file from the Bundle, which\n // should be stored using the IMAGE_PATHNAME key.\n return data.getString(IMAGE_PATHNAME);\n }", "java.lang.String getPackageImageURL();", "public String getImgName() {\n return imgName;\n }", "public String getImageString() {\n return getString(POST_IMAGE_STRING);\n }", "public String getImageResource() {\n \t\t// if (isWindows)\n \t\t// return \"/\" + new File(imageResource).getPath();\n \t\t// else\n \t\treturn imageResource;\n \t}", "static String getMascotImageFilename() {\n Path filePath = Paths.get(badgeResourcePath, \"kumoricon_2017-mascot_chibi.png\");\n return filePath.toAbsolutePath().toString();\n }", "public java.lang.String getImage() {\n\t\treturn _imageCompanyAg.getImage();\n\t}", "public final String getOldImageName() {\n\t\treturn oldImageName;\n\t}", "String getImage();", "public native String getFileName() throws MagickException;", "public String getIconFileName() {\n\tif (this.isSuccess()) {\n\t return this.icon;\n\t} else {\n\t return null;\n\t}\n }", "public static String getDockerImage( final BioModule module ) throws ConfigNotFoundException {\n\t\treturn \" \" + getDockerUser( module ) + \"/\" + getImageName( module ) + \":\" +\n\t\t\tConfig.requireString( module, DockerUtil.DOCKER_IMG_VERSION );\n\t}", "public static String getUserImage(String image) {\n return EVENT_IMAGE_URL + image;\n }", "private String getUniquePhotoName() {\n\t\tTime now = new Time();\n\t\tnow.setToNow();\n\t\treturn now.format2445();\n\t}", "public String getSourceImageName() {\n return this.sourceImageName;\n }", "java.lang.String getProfileImage();", "private String getFilename() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String filename = getExternalStoragePublicDirectory(DIRECTORY_PICTURES).getPath().toString() + \"/\" + timeStamp + \".jpg\";\n\n return filename;\n }", "public Image getImage(String key)\n {\n return imageRegistry.get(key);\n }", "public final String getLogoImageName() {\n\t\treturn logoImageName;\n\t}", "@ApiModelProperty(example = \"functions/nodeinfo:latest\", required = true, value = \"The fully qualified docker image name of the function\")\n public String getImage() {\n return image;\n }", "public String getImageName(String srcStringXpath) {\r\n\r\n\t\tString srcString = webAppDriver.findElementByXpath(srcStringXpath).getAttribute(\"src\");\r\n\t\tString imageName = srcString.substring(srcString.lastIndexOf(\"/\") + 1, srcString.length());\r\n\t\treturn imageName;\r\n\t}", "public static String getEventImage(String image) {\n return EVENT_IMAGE_URL + image;\n }", "public String getPhotoFileName() {\n return \"IMG_\" + getId().toString() + \".jpg\";\n }", "public abstract String getImageSuffix();", "public com.google.protobuf.ByteString\n getImageBytes() {\n java.lang.Object ref = image_;\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 image_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getImageBytes() {\n java.lang.Object ref = image_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n image_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String getDockerRepositoryName();", "public java.lang.String getWeatherImage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(WEATHERIMAGE$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "String get_name() {\n File file = new File(url);\n return file.getName();\n }", "public String getImage() {\n\t\treturn image;\n\t}", "public String getImage() {\n\t\treturn image;\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getImageIdentifier() != null)\n sb.append(\"ImageIdentifier: \").append(getImageIdentifier()).append(\",\");\n if (getImageConfiguration() != null)\n sb.append(\"ImageConfiguration: \").append(getImageConfiguration()).append(\",\");\n if (getImageRepositoryType() != null)\n sb.append(\"ImageRepositoryType: \").append(getImageRepositoryType());\n sb.append(\"}\");\n return sb.toString();\n }", "public String getImageNameSrc(String srcStringXpath) {\r\n\r\n\t\tString srcString = webAppDriver.findElementByXpath(srcStringXpath).getAttribute(\"src\");\r\n\t\tString temp[] = srcString.split(\"/\");\r\n\t\tint len = temp.length;\r\n\t\tString imageName = temp[len - 1];\r\n\t\t// System.out.println(\"^^^name from method \"+imageName);\r\n\t\timageName = imageName.substring(0, imageName.length());\r\n\t\t// System.out.println(\"Image name from method \"+imageName);\r\n\t\treturn imageName;\r\n\t}", "public java.lang.String getPackageImageURL() {\n java.lang.Object ref = packageImageURL_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n packageImageURL_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static Image getImageFromRegistry(String key){\r\n\t\treturn getDefault().getImageRegistry().get(key);\r\n\t}", "private String getTipoImage(String nameImage) {\n\t\tString retorno = \"\";\n\t\tString[] textoSeparado = nameImage.split(\"\\\\.\");\n\n\t\tif (textoSeparado != null && textoSeparado.length != 0)\n\t\t\tswitch (textoSeparado[textoSeparado.length - 1]) {\n\t\t\tcase \"jpg\":\n\t\t\t\tretorno = \"image/jpeg\";\n\t\t\t\tbreak;\n\t\t\tcase \"png\":\n\t\t\t\tretorno = \"image/png\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tretorno = \"image/\" + textoSeparado[textoSeparado.length - 1];\n\t\t\t}\n\n\t\treturn retorno;\n\t}", "public static String getImageBase64String(BufferedImage image) {\n String result = null;\n try {\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n OutputStream b64 = new Base64OutputStream(os);\n ImageIO.write(image, \"png\", b64);\n result = os.toString(\"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e.getMessage(), e);\n } catch (IOException e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n return result;\n }", "public String getSnapImage()\r\n\t\t{\r\n\t\tif(this.snapImage != null && this.fximage != null) {\t\r\n\t\t\treturn this.snapImage;\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttry {\r\n\t\t\t\tgetFXImage();\r\n \t\t\tBufferedImage bImage = SwingFXUtils.fromFXImage(this.fximage, null);\r\n \t\t\tByteArrayOutputStream s = new ByteArrayOutputStream();\r\n \t\t\ttry {\r\n\t\t\t\t\tImageIO.write(bImage, \"png\", s);\r\n\t\t\t\t\t} \r\n \t\t\tcatch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n \t\t\tthis.snapImage = Base64.encode(s.toByteArray());\r\n\t\t\t}\r\n\t\t\tcatch (NullPointerException n) {\r\n\t\t\t\tSystem.out.println(\"The asset for \" + iconId + \" was not found.\" );\r\n\t\t\t}\r\n\t\t\treturn this.snapImage;\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic String getName()\n\t{\n\t\tString result = \"Adjust Image (Simple)\";\n\t\treturn result;\n\t}", "public String createImageName(File imageFile)\n\t{\n\t\tString name = imageFile.getAbsolutePath();\n\t\t\n\t\t// remove the initial part of the path that is common among all images so that only the relative path within the image folder remains\n\t\t// also remove the file's extension\n\t\tname = name.substring(imageFolder.getAbsolutePath().length() + 1, name.lastIndexOf('.'));\t\t\n\t\treturn name;\n\t}", "public java.lang.String getProfileImage() {\n java.lang.Object ref = profileImage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n profileImage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getImageIdentifier() {\n return this.imageIdentifier;\n }", "@Override\n default ResourceLocation getRegistryName() {\n return getBlock().getRegistryName();\n }", "public final String getSmallOldImageName() {\n\t\treturn smallOldImageName;\n\t}", "public java.lang.String getImagePath() {\n java.lang.Object ref = imagePath_;\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 imagePath_ = s;\n }\n return s;\n }\n }", "public java.lang.String getPackageImageURL() {\n java.lang.Object ref = packageImageURL_;\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 packageImageURL_ = s;\n return s;\n }\n }", "public java.lang.String getProfileImage() {\n java.lang.Object ref = profileImage_;\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 profileImage_ = s;\n return s;\n }\n }", "public java.lang.String getImagePath() {\n java.lang.Object ref = imagePath_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n imagePath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static Image getImage(Images img)\n {\n return plugin.getImageRegistry().get(img.getKey());\n }", "protected String getWeatherIconName()\n\t{\n\t\tString\ticonName = ForecastMainActivity.weatherData.getHeadlineIcon().replaceAll(\"-\", \"_\");\n\t\treturn iconName;\n\t}", "public String getStringImage() {\n if (bitmap != null) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] imageBytes = baos.toByteArray();\n String encodedImage = Base64.encodeToString(imageBytes, Base64.DEFAULT);\n return encodedImage;\n } else {\n return null;\n }\n }", "private String beautiplyFileNameReferer() {\r\n\r\n\t\tif (checkBeautiplyImagesExixtence()) {\r\n\t\t\ttry {\r\n\t\t\t\tString fname = beautiplyFileNameGenerator();\r\n\t\t\t\tFileInputStream fis = context.openFileInput(fname);\r\n\t\t\t\treturn fname;\r\n\t\t\t} catch (FileNotFoundException e4) {\r\n\t\t\t\treturn beautiplyFileNameReferer();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t}", "public String getThumbnailImageName(String srcStringXpath) {\r\n\r\n\t\tString srcString = webAppDriver.findElementByXpath(srcStringXpath).getAttribute(\"style\");\r\n\t\tString temp[] = srcString.split(\"/\");\r\n\t\tint len = temp.length;\r\n\t\tString imageName = temp[len - 1];\r\n\t\timageName = imageName.substring(0, imageName.indexOf(\"\\\"\"));\r\n\t\tSystem.out.println(\"^^^name from method \" + imageName);\r\n\t\treturn imageName;\r\n\t}", "public String getImage() {\n return image;\n }", "public byte[] getName();", "String getTextureName();", "public String Name() {\t\t\r\n\t\treturn BrickFinder.getDefault().getName();\r\n\t}", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "java.lang.String getImagePath();", "com.google.protobuf.ByteString\n getPackageImageURLBytes();", "public String getImage() { return image; }", "@Override\n\tpublic File getImage(String name) {\n\n\t\tFile returnValue = new File(RestService.imageDirectory + name + \".png\");\n\t\t\n\t\tif(returnValue.exists() && !returnValue.isDirectory()) \n\t\t{ \n\t\t return returnValue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturnValue = new File(RestService.imageDirectory + name + \".jpg\");\n\t\t\t\n\t\t\tif(returnValue.exists() && !returnValue.isDirectory()) \n\t\t\t{ \n\t\t\t return returnValue;\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}\n\t}", "String convertImageToBase64String(final BufferedImage img) {\n final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", byteArrayOutputStream);\n return Base64.getEncoder().encodeToString(byteArrayOutputStream.toByteArray());\n } catch (IOException e) {\n logger.error(\"cannot convert image to base 64\", e);\n }\n return null;\n }", "public String getImageBase64() {\n return this.imageBase64;\n }", "public Image getImage() {\r\n\t\treturn GDAssemblerUI.getImage(GDAssemblerUI.IMAGE_GD);\r\n\t}", "String getRepositoryName(URL repositoryUrl);", "String getItemImage();", "public java.lang.String getSignatureimage () {\n\t\treturn signatureimage;\n\t}", "public String getNewImage() {\r\n\t\treturn newImage;\r\n\t}", "public String getImage()\n {\n return image;\n }", "public org.apache.xmlbeans.XmlString xgetWeatherImage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(WEATHERIMAGE$2, 0);\n return target;\n }\n }", "public String getImage() {\n return this.Image;\n }", "public String toString() {\n return path + RegistryConstants.URL_SEPARATOR + \"version:\" + version;\n }", "public String getNiceName()\n {\n String name = getBuildFile().getName();\n\n return Utility.replaceBadChars(name);\n }", "public String getImageFile() {\n\t\treturn imagefile;\n\t}", "@Nullable private String getLogoFromUIInfo() {\n if (getRelyingPartyUIContext() == null) {\n return null;\n }\n return getRelyingPartyUIContext().getLogo(minWidth, minHeight, maxWidth, maxHeight);\n \n }", "String avatarImage();", "public com.google.protobuf.ByteString\n getPackageImageURLBytes() {\n java.lang.Object ref = packageImageURL_;\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 packageImageURL_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getIcon();", "java.lang.String getIcon();", "public final String getPrefix() {\n/* 70 */ return \"jpegImage\";\n/* */ }", "public String getImage() {\n\t\treturn null;\n\t}" ]
[ "0.70702463", "0.70341295", "0.69202393", "0.66075987", "0.6483", "0.6407", "0.63800174", "0.6343854", "0.6332949", "0.6261012", "0.6232827", "0.6179262", "0.615382", "0.61394763", "0.61393887", "0.6122147", "0.60995346", "0.6083974", "0.60839605", "0.6054078", "0.60318923", "0.60181797", "0.6001479", "0.591694", "0.58575773", "0.5849614", "0.58330995", "0.5823023", "0.58159", "0.5814478", "0.58036983", "0.5777185", "0.57707214", "0.5763081", "0.5743109", "0.5734196", "0.5727526", "0.5718112", "0.57066506", "0.5705435", "0.569369", "0.5689487", "0.5677588", "0.56732315", "0.5672352", "0.5672352", "0.5670564", "0.5662757", "0.5657351", "0.56416345", "0.5640761", "0.56362426", "0.56340635", "0.56145465", "0.56028587", "0.5590009", "0.55810887", "0.55773455", "0.556715", "0.5566687", "0.5543482", "0.55411", "0.5538853", "0.55348146", "0.55205894", "0.5516994", "0.5516375", "0.5498577", "0.5494613", "0.547603", "0.54714555", "0.5460968", "0.54604", "0.54604", "0.54604", "0.54604", "0.54564756", "0.54539245", "0.54507715", "0.54453254", "0.54445875", "0.54393405", "0.5425467", "0.5423349", "0.54217297", "0.54215425", "0.54214555", "0.5408577", "0.540335", "0.53995043", "0.5398614", "0.5397537", "0.539546", "0.5391673", "0.5377962", "0.53711665", "0.53587794", "0.53587794", "0.5354448", "0.5354425" ]
0.55849
56
Checks if service spec requires image build or push operation Build or push required if service spec contains build spec or dockerfile filed in image
public static boolean isImageBuildPushRequired(ServiceSpec serviceSpec) { if (serviceSpec == null) { return false; } Image image = null; try { image = serviceSpec.get(HyscaleSpecFields.image, Image.class); } catch (HyscaleException e) { logger.info("Error while fetching buildSpec and registryUrl from serviceSpec "); } if (image == null) { return false; } return image instanceof BuildSpecImage || image instanceof DockerBuildImage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void checkHasSomethingToBuild(ImageModule image)\n\t\t\tthrows ValidationException {\n\t\tif (image.isVirtual()) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"This image doesn't need to be built since it doesn't contain a package list nor a pre-recipe or a recipe.\");\n\t\t}\n\t}", "public void validateDockerfile() {\n File dockerFile = DOCKER_TARGET_PATH.resolve(\"Dockerfile\").toFile();\n Assert.assertTrue(dockerFile.exists());\n }", "private static void checkNotAlreadyBuilt(ImageModule image,\n\t\t\tString cloudServiceName) throws ValidationException {\n\t\tif (image.getCloudImageIdentifier(cloudServiceName) != null) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"This image was already built for cloud: \"\n\t\t\t\t\t\t\t+ cloudServiceName);\n\t\t}\n\t}", "private boolean shouldBuild(IResource resource) {\n \t\treturn resource.getType() == IResource.FILE && resource.getFileExtension().equals(\"gf\");\n \t}", "private boolean hostHasImage(String imageName, Host host) throws Exception {\n\t\tWebTarget dockerTarget = this.createDockerTarget(host);\n\t\tJsonNode response = null;\n\t\ttry {\n\t\t\tresponse = dockerTarget.path(\"images\").path(imageName).path(\"json\").request().buildGet().submit(JsonNode.class).get();\n\t\t} catch (Throwable t) {\n\t\t\t// 'Hacky' workaround...\n\t\t\tif (!t.getMessage().contains(\"404\")) {\n\t\t\t\tThrowables.propagate(t);\n\t\t\t}\n\t\t}\n\t\tif (response != null && response.size() > 0 && response.get(\"Container\") != null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasBuild();", "private static boolean isNewDriverSupported(DockerImageName dockerImageName) {\n return new ComparableVersion(dockerImageName.getVersionPart()).isGreaterThanOrEqualTo(\"20.7\");\n }", "@Test\n\t@Ignore\n\tpublic void createRoboconfImage() throws Exception {\n\t\tfinal String tag = \"roboconf-test-by-hand\";\n\t\tBuilder config = DefaultDockerClientConfig.createDefaultConfigBuilder();\n\t\tconfig.withDockerHost( \"tcp://localhost:\" + DockerTestUtils.DOCKER_TCP_PORT );\n\n\t\tDockerClient docker = DockerClientBuilder.getInstance( config.build()).build();\n\t\tImage img = DockerUtils.findImageByIdOrByTag( tag, docker );\n\t\tif( img != null ) {\n\t\t\tdocker.removeImageCmd( tag ).exec();\n\t\t\timg = DockerUtils.findImageByIdOrByTag( tag, docker );\n\t\t}\n\n\t\tAssert.assertNull( img );\n\n\t\t// Prepare the parameters\n\t\tFile baseDir = new File( Thread.currentThread().getContextClassLoader().getResource( \"./image/roboconf\" ).getFile());\n\t\tAssert.assertTrue( baseDir.exists());\n\n\t\tMap<String,String> targetProperties = new HashMap<> ();\n\t\ttargetProperties.put( DockerHandler.IMAGE_ID, tag );\n\t\ttargetProperties.put( DockerHandler.GENERATE_IMAGE_FROM, \".\" );\n\n\t\tTargetHandlerParameters parameters= new TargetHandlerParameters();\n\t\tparameters.setTargetProperties( targetProperties );\n\t\tparameters.setMessagingProperties( new HashMap<String,String>( 0 ));\n\t\tparameters.setApplicationName( \"applicationName\" );\n\t\tparameters.setScopedInstancePath( \"/vm\" );\n\t\tparameters.setScopedInstance( new Instance());\n\t\tparameters.setTargetPropertiesDirectory( baseDir );\n\n\t\tFile tmpFolder = this.folder.newFolder();\n\t\tMap<String,File> containerIdToVolume = new HashMap<> ();\n\t\tDockerMachineConfigurator configurator = new DockerMachineConfigurator(\n\t\t\t\tparameters,\n\t\t\t\t\"machineId\",\n\t\t\t\ttmpFolder,\n\t\t\t\tcontainerIdToVolume );\n\n\t\t// Test the creation\n\t\tContainer container = null;\n\t\ttry {\n\t\t\tconfigurator.configure();\n\t\t\timg = DockerUtils.findImageByIdOrByTag( tag, docker );\n\t\t\tAssert.assertNotNull( img );\n\n\t\t\tString containerName = DockerUtils.buildContainerNameFrom(\n\t\t\t\t\tparameters.getScopedInstancePath(),\n\t\t\t\t\tparameters.getApplicationName());\n\n\t\t\tcontainer = DockerUtils.findContainerByIdOrByName( containerName, docker );\n\t\t\tAssert.assertNotNull( container );\n\n\t\t} finally {\n\t\t\tif( img != null )\n\t\t\t\tdocker.removeImageCmd( tag ).exec();\n\n\t\t\timg = DockerUtils.findImageByIdOrByTag( tag, docker );\n\t\t\tAssert.assertNull( img );\n\n\t\t\tif( container != null ) {\n\t\t\t\tdocker.removeContainerCmd( container.getId()).withForce( true ).exec();\n\t\t\t\tcontainer = DockerUtils.findContainerByIdOrByName( container.getId(), docker );\n\t\t\t\tAssert.assertNull( container );\n\t\t\t}\n\n\t\t\tconfigurator.close();\n\t\t}\n\t}", "@Test\n public void testBuildDockerfile() throws Exception {\n System.out.println(\"buildDockerfile\");\n //Create temp file to copy\n Path path = Paths.get(\"/tmp/dockerfiletest.txt\");\n Files.createDirectories(path.getParent());\n try {\n Files.createFile(path);\n } catch (FileAlreadyExistsException e) {\n System.err.println(\"already exists: \" + e.getMessage());\n }\n //Create list of files to add to constructor\n File file = new File(path.toString());\n ArrayList<File> files = new ArrayList<File>();\n files.add(file);\n //Create object\n Docker instance = new Docker(\"ubuntu\", \"git\", files, \"sh6791\", \"matrix\", \"v1\", \"saqhuss\", \"dockersh6791\", \"[email protected]\");\n instance.buildDockerfile();\n\n //Check if file was copied\n file = new File(\"dockerfiletest.txt\");\n assertTrue(file.exists());\n //Check if ssh-keys were generated\n file = new File(\"id_rsa\");\n assertTrue(file.exists());\n file = new File(\"id_rsa.pub\");\n assertTrue(file.exists());\n file = new File(\"authorized_keys\");\n assertTrue(file.exists());\n //Expected result of dockerfile\n String result = \"FROM ubuntu\\n\"\n + \"MAINTAINER saqhuss\\n\"\n + \"RUN apt-get update \\n\"\n + \"RUN apt-get install -y git\\n\"\n + \"RUN useradd -m -p password mpiuser\\n\"\n + \"RUN mkdir /home/mpiuser/.ssh\\n\"\n + \"ADD id_rsa /home/mpiuser/.ssh/id_rsa\\n\"\n + \"ADD id_rsa.pub /home/mpiuser/.ssh/id_rsa.pub\\n\"\n + \"ADD authorized_keys /home/mpiuser/.ssh/authorized_keys\\n\"\n + \"ADD hosts /home/mpiuser/hosts\\n\"\n + \"ADD dockerfiletest.txt /home/mpiuser/dockerfiletest.txt\\n\"\n + \"RUN sudo chown -R mpiuser:mpiuser /home/mpiuser/.ssh\\n\"\n + \"RUN echo 'mpiuser:password' | chpasswd\\n\"\n + \"RUN echo '/usr/sbin/sshd' >> /etc/bash.bashrc\";\n\n BufferedReader reader = new BufferedReader(new FileReader(\"Dockerfile\"));\n String line = null;\n StringBuilder sb = new StringBuilder();\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n //Check result and read in of Dockerfile are equal\n assertEquals(sb.toString().trim(), result);\n\n //Delete all created temp files\n Files.delete(path);\n Files.delete(Paths.get(\"dockerfiletest.txt\"));\n Files.delete(Paths.get(\"id_rsa\"));\n Files.delete(Paths.get(\"id_rsa.pub\"));\n Files.delete(Paths.get(\"authorized_keys\"));\n }", "boolean hasCreateTaskPack();", "public void validateDockerImage() throws DockerTestException, InterruptedException {\n List<String> ports = getExposedPorts(DOCKER_IMAGE);\n Assert.assertEquals(ports.size(), 1);\n Assert.assertEquals(ports.get(0), \"9099/tcp\");\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/images/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Image> patchImageStatus(\n @Path(\"name\") String name, \n @Body Image body);", "protected final boolean willUseDocker() {\n\t\treturn this.shouldUseDocker() && CodeExecutorDockerBase.DOCKER_CONTAINER_ID.get() != null;\n\t}", "public boolean hasProductPicture(){\r\n\t\t\t\t\r\n\t\treturn\tMcsElement.isElementPresent(driver, PRODUCT_PIC_CONTAINER+\"//img\");\r\n\t\t\t\r\n\t\t}", "private String getImageName() {\n if (options.containsKey(\"image\")) {\n String imageName = (String)options.get(\"image\");\n if (StringUtils.hasText(imageName)) {\n return imageName;\n }\n }\n\n return \"\";\n /*\n func (s *executor) getImageName() (string, error) {\n\tif s.options.Image != \"\" {\n\t\timage := s.Build.GetAllVariables().ExpandValue(s.options.Image)\n\t\terr := s.verifyAllowedImage(s.options.Image, \"images\", s.Config.Docker.AllowedImages, []string{s.Config.Docker.Image})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn image, nil\n\t}\n\n\tif s.Config.Docker.Image == \"\" {\n\t\treturn \"\", errors.New(\"No Docker image specified to run the build in\")\n\t}\n\n\treturn s.Config.Docker.Image, nil\n}\n */\n }", "public boolean checkImageComponent(String filename) {\n if (componentMap.containsKey(filename))\n return true;\n else\n return false;\n }", "public boolean hasBeenBinaryPatched() {\n //boolean ret = !buildID.startsWith(\"av3pVck1gb4eR\");\n MD5Digest digest = new MD5Digest();\n digest.update(instanceKeys.getBuildID());\n byte[] calculated = digest.getDigest();\n boolean ret = !Arrays.equals(calculated, buildDigest);\n //#ifdef FAKECONF\n ret = true;\n //#endif\n\n return ret;\n }", "private boolean shouldAppendPackagingData(StackTraceElementProxy step, StackTraceElementProxy previousStep) {\n if (step == null || step.getClassPackagingData() == null) {\n return false;\n }\n if (previousStep == null || previousStep.getClassPackagingData() == null) {\n return true;\n }\n return !step.getClassPackagingData().equals(previousStep.getClassPackagingData());\n }", "public boolean hasImage(){\n //return true or false\n return mImageResource != NO_IMAGE_PROVIDED;\n }", "public void isImagePresent() {\r\n\t\t\t\r\n\t\t}", "public static boolean inDockerEnv() {\n\t\treturn DOCKER_ENV_FLAG_FILE.isFile();\n\t}", "private static void deployOperatorPre73Way() {\n log.info(\"Deploying operator using pre-7.3 way\");\n OpenShiftBinaryClient.getInstance().executeCommandAndConsumeOutput(\n \"Unable to create operator resource \" + TestConfiguration.syndesisOperatorUrl(),\n istream -> log.info(IOUtils.toString(istream, \"UTF-8\")),\n \"create\",\n \"-n\", TestConfiguration.openShiftNamespace(),\n \"-f\", TestConfiguration.syndesisOperatorUrl()\n );\n\n importProdImage(\"operator\");\n\n log.info(\"Waiting for syndesis-operator to be ready\");\n OpenShiftUtils.xtf().waiters()\n .areExactlyNPodsReady(1, \"syndesis.io/component\", \"syndesis-operator\")\n .interval(TimeUnit.SECONDS, 20)\n .timeout(TimeUnit.MINUTES, 10)\n .assertEventually();\n }", "public static boolean hasCustomDockerDB( final BioModule module ) {\n\t\ttry {\n\t\t\tLog.info( DockerUtil.class, Constants.LOG_SPACER );\n\t\t\tLog.info( DockerUtil.class, \"Check for Custom Docker DB\" );\n\t\t\tLog.info( DockerUtil.class, Constants.LOG_SPACER );\n\t\t\tif( inDockerEnv() ) \n\t\t\t\tLog.info( DockerUtil.class, \"Verified BLJ is running INSIDE the Docker biolockj_controller Container\" );\n\t\t\telse {\n\t\t\t\tLog.info( DockerUtil.class, \"LOOKS LIKE BLJ is <<< NOT >>> running INSIDE the Docker biolockj_controller Container - run extra tests!\" );\n\t\t\t\tfinal File testFile = new File( \"/.dockerenv\" );\n\t\t\t\tif( testFile.isFile() )\n\t\t\t\t\tLog.info( DockerUtil.class, \"testFile.isFile() == TRUE! --> WHY FAIL ON INIT ATTEMPT? BLJ is running INSIDE the Docker biolockj_controller Container\" );\n\t\t\t\telse if( testFile.exists() )\n\t\t\t\t\tLog.info( DockerUtil.class, \"testFile.exists() == TRUE! --> WHY FAIL ON INIT ATTEMPT? BLJ is running INSIDE the Docker biolockj_controller Container\" );\n\t\t\t}\n\t\t\t\n\t\t\tif( module instanceof DatabaseModule )\n\t\t\t\tLog.info( DockerUtil.class, module.getClass().getSimpleName() + \" is a DB Module!\" );\n\t\t\telse\n\t\t\t\tLog.info( DockerUtil.class, module.getClass().getSimpleName() + \" is NOT DB Module!\" );\n\t\t\t\n\t\t\tLog.info( DockerUtil.class, Constants.LOG_SPACER );\n\t\t\t\t\n\t\t\tif( inDockerEnv() && module instanceof DatabaseModule ) {\n\t\t\t\tfinal File db = ( (DatabaseModule) module ).getDB();\n\t\t\t\tif( db == null ) Log.info( DockerUtil.class, module.getClass().getSimpleName() + \" db ==> NULL \" );\n\t\t\t\tif( db != null ) Log.info( DockerUtil.class, module.getClass().getSimpleName() + \" db ==> \" + db.getAbsolutePath() );\n\t\t\t\tif( db != null ) return !db.getAbsolutePath().startsWith( DOCKER_DEFAULT_DB_DIR );\n\t\t\t}\n\t\t} catch( ConfigPathException | ConfigNotFoundException | DockerVolCreationException ex ) {\n\t\t\tLog.error( DockerUtil.class,\n\t\t\t\t\"Error occurred checking database path of module: \" + module.getClass().getName(), ex );\n\t\t} \n\t\treturn false;\n\t}", "public boolean hasImage() { return ImageResource != NO_IMAGE_PROVIDED; }", "@Test(enabled = false)\n public void testAddLaunchPermissionsToImage() {\n }", "private boolean CheckCallDefinitions()\n {\n if(apiCallDefinitions==null || apiCallDefinitions.size()==0)\n return false;\n\n if(defaultAPIVersionPath==null)\n return false;\n\n return true;\n }", "public static void VerifyCommonComponent_ImageShape(int ImageShape){\n\t\t\tString actualCommonComponentDataImage=\"\";\n\t\t\ttry{\n\t\t\t\tactualCommonComponentDataImage=sitecoreObj.commonComponentImageShape.getAttribute(\"class\");\n\t\t\t\tAssert.assertEquals(actualCommonComponentDataImage, \"common--component \" + expectedData.getProperty(\"FourItemsWithInset_InsetImageShape\"+ImageShape));\n\t\t\t\tlog.info(\"The Actual AboutUs CommonComponent Data Image- \"+actualCommonComponentDataImage);\n\t\t\t\tlog.info(\"The Expected AboutUs CommonComponent Data Image- \"+ \"common--component \" + expectedData.getProperty(\"FourItemsWithInset_InsetImageShape\"+ImageShape));\n\t\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs CommonComponent Inset Images are Same\");\n\t\t\t}catch(AssertionError e){\n\t\t\t\tlog.error(\"The Actual AboutUs CommonComponent Data Image- \"+actualCommonComponentDataImage);\n\t\t\t\tlog.error(\"The Expected AboutUs CommonComponent Data Image- \"+ \"common--component \" + expectedData.getProperty(\"FourItemsWithInset_InsetImageShape\"+ImageShape)); \n\t\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs CommonComponent Inset Images are NOT same\");\n\t\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\t\tlog.error(\"TEST FAILED: There is No Inset Images and On CommonComponent Container\");\n\t\t\t}\n\t\t}", "ConditionalDependency createConditionalDependency();", "private boolean validateEventMainImage(){\n if(imageUri == null){\n Toasty.error(CreateEventActivity.this, \"Please set the main image for the event\", Toast.LENGTH_SHORT, true).show();\n return false;\n }\n else{\n return true;\n }\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/builds/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Build> patchBuildStatus(\n @Path(\"name\") String name, \n @Body Build body);", "private static boolean checkFlowDependencies(RegisgerName_Value<String, Integer> src, String stage)\n\t{\n\t\tboolean isDependent = true;\n\n\t\ttry\n\t\t{\n\t\t\tisDependent = stages.containsKey(stage) && stages.get(stage).getOperation() != null\n\t\t\t// If instruction is not STORE\n\t\t\t\t\t&& !stages.get(stage).getOperation().equals(TypesOfOperations.STORE)\n\t\t\t\t\t// If destination of instruction is not NULL\n\t\t\t\t\t&& stages.get(stage).getDestination() != null\n\t\t\t\t\t// If there is same Register in both instruction\n\t\t\t\t\t&& stages.get(stage).getDestination().getKey().equals(src.getKey());\n\t\t\t// TODO what if the branch is dependent\n\n\t\t\treturn !(isDependent);\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"Error while checking the flow dependancies\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void testDescSuportedContext() throws Throwable\n {\n testDescDeployment(\"supported\");\n }", "public boolean createBuild(Build build);", "@Override\n\tpublic boolean isWorking(Role role, RoleBuild build) {\n\t\treturn false;\n\t}", "String handleAdditionalDeployments( File dockerFileLocation ) throws IOException, URISyntaxException {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\t// Run through the list...\n\t\tfor( final String deployUrl : this.deployList ) {\n\n\t\t\t// Local, Maven or remote URL?\n\t\t\t// \"ADD\" supports remotes URLs. So, we must copy other kinds.\n\t\t\tFile fileToCopy = null;\n\t\t\tif( deployUrl.toLowerCase().startsWith( \"file:/\" )) {\n\t\t\t\tfileToCopy = new File( UriUtils.urlToUri( deployUrl ));\n\n\t\t\t} else if( deployUrl.toLowerCase().startsWith( \"mvn:\" )) {\n\t\t\t\tthis.logger.fine( \"Resolving a Maven URL: \" + deployUrl );\n\t\t\t\tfileToCopy = this.mavenResolver.resolve( deployUrl );\n\t\t\t}\n\n\t\t\t// Where to place the file in the image?\n\t\t\t// JAR file? We will generate a feature.xml file, so put it in \"backup\".\n\t\t\t// Otherwise, directly put it in Karaf's deploy directory\n\t\t\tboolean isJar = fileToCopy != null && fileToCopy.getName().toLowerCase().endsWith( \".jar\" );\n\t\t\tisJar |= deployUrl.toLowerCase().endsWith( \".jar\" );\n\n\t\t\tString dir = RBCF_DIR + (isJar ? BACKUP : DEPLOY);\n\n\t\t\t// Add whatever is necessary in the dockerfile\n\t\t\tString name;\n\t\t\tif( fileToCopy != null ) {\n\t\t\t\tthis.logger.fine( \"Copying \" + deployUrl + \"...\" );\n\t\t\t\tUtils.copyStream( fileToCopy, new File( dockerFileLocation, fileToCopy.getName()));\n\t\t\t\tsb.append( \"ADD \" + fileToCopy.getName() + \" \" + dir );\n\t\t\t\tname = fileToCopy.getName();\n\n\t\t\t} else {\n\t\t\t\tsb.append( \"ADD \" + deployUrl + \" \" + dir );\n\t\t\t\tname = getFileNameFromFileUrl( deployUrl );\n\t\t\t}\n\n\t\t\t// What should be added to the generated feature?\n\t\t\t// Well, we keep the JAR files.\n\t\t\tif( isJar ) {\n\t\t\t\tif( fileToCopy != null )\n\t\t\t\t\tthis.bundleUrls.add( \"file://\" + dir + name );\n\t\t\t\telse\n\t\t\t\t\tthis.bundleUrls.add( deployUrl );\n\t\t\t}\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "private boolean hasRequirements() {\n \t\tif (checkHasRequirements) {\n \t\t\thasRequirements = pullRequired(requiredInput, false);\n \t\t\tcheckHasRequirements = false;\n \t\t}\n \t\treturn hasRequirements;\n \t}", "@Test //Associated with Confirm image icon exists (Scenario 2)\n public void confirmImageIconExistsTest() throws Exception {\n onView(withId(R.id.contact_new)).perform(click());\n\n //types in the name \"Shane\" into the name field for the Contact\n onView(withId(R.id.info_name)).perform(typeText(\"Shane\"), closeSoftKeyboard());\n\n //performs a click operation on the \"Submit Changes\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //performs a scroll action within the activity to take you to the necessary spot where\n //the newly created contact will be located\n onView(withId(R.id.contacts_list)).perform(RecyclerViewActions.scrollToPosition(0));\n\n //performs a click operation on the newly created Contact that is within the field\n //of view for the RecyclerView\n onView(withText(\"Shane\")).perform(click());\n\n //performs a click operation on the \"Edit Contact Info\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //confirms that the button on the Edit Contact screen associated with the id info_delete_button\n //has a string associated with it that reads \"Delete Contact\". This string and id is unique in the\n //app and only exists in this singular activity.\n onView(withId(R.id.info_delete_button)).check(matches(withText(R.string.info_delete)));\n\n onView(withId(R.id.info_pic)).check(matches(withContentDescription(R.string.image_contact)));\n\n //clicks the Delete Contact button\n onView(withId(R.id.info_delete_button)).perform(click());\n }", "public boolean hasImage() {\n\t\treturn false;\n\t}", "public static void VerifyCommonComponent_ImageShapeWithImageSize(String renderControl, int imageShape, int imageSize){\n\t\t\tString actualCommonComponentImage = \"\";\n\t\t\tString expectedCommonComponentImage = \"common--component\" \n\t\t\t\t\t+ \" \" + expectedData.getProperty(\"CommonComponent_ImageShape\" + imageShape) \n\t\t\t\t\t+ \" \" + expectedData.getProperty(\"CommonComponent_ImageSize\" + imageSize);\n\t\t\ttry{\n\t\t\t\tactualCommonComponentImage = sitecoreObj.commonComponentImageShape.getAttribute(\"class\");\t\t\t\t\n\t\t\t\tAssert.assertEquals(actualCommonComponentImage, expectedCommonComponentImage);\n\t\t\t\t\n\t\t\t\tlog.info(\"The Actual AboutUs OneItem/\"+ renderControl + \" Image Shape and Size - \" + actualCommonComponentImage);\n\t\t\t\tlog.info(\"The Expected AboutUs OneItem/\"+ renderControl + \" Image Shape and Size - \" + expectedCommonComponentImage);\n\t\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs OneItem/\"+ renderControl + \" Image Shape and Size are Same\");\n\t\t\t}catch(AssertionError e){\n\t\t\t\tlog.error(\"The Actual AboutUs OneItem/\"+ renderControl + \" Image Shape and Size - \" + actualCommonComponentImage);\n\t\t\t\tlog.error(\"The Expected AboutUs OneItem/\"+ renderControl + \" Image Shape and Size - \" + expectedCommonComponentImage);\n\t\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs OneItem/\"+ renderControl + \" Image Shape and Size are NOT Same\");\n\t\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\t\tlog.error(\"TEST FAILED: There is NO Image Shape and Size on AboutUs OneItem/\"+ renderControl + \" Container\");\n\t\t\t}\n\t\t}", "public boolean isRunOnDocker() {\n return Mode.DOCKER == mode;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Image> readImageStatus(\n @Path(\"name\") String name);", "@Test\r\n public void testServiceInIfElseCantFindService() throws Exception {\n ServiceUniqueIdPreprocessor preprocessor = new ServiceUniqueIdPreprocessor(\"channel\", \"workflow\", Arrays.asList(\"log-else\"));\r\n PreprocessorException exception = assertThrows(PreprocessorException.class,\r\n () -> preprocessor.execute(ADAPTER_XML_WITH_IF_THEN, new ServiceTestConfig()));\r\n assertEquals(\r\n \"Failed to find service: channel: [channel] workflow: [workflow] services: [[log-else]] xpath [//channel-list/*[unique-id = 'channel']/workflow-list/*[unique-id = 'workflow']/service-collection/services/*[unique-id = 'log-else']]\",\r\n exception.getMessage());\r\n }", "public boolean shouldImageProcess() {\r\n\t\treturn table.getBoolean(SHOULD_IMAGE_PROCESS_KEY, false);\r\n\t}", "boolean isUseAllLatestPacks();", "ValidationResult isPackageConfigurationValid(PackageConfiguration packageConfiguration, RepositoryConfiguration repositoryConfiguration);", "@Test\n @Deployment(resources = ApprovalProcess.RESOURCE)\n public void should_deploy() {\n }", "private void isImage(MultipartFile file) {\n if(!Arrays.asList(IMAGE_JPEG.getMimeType(), IMAGE_PNG.getMimeType(), IMAGE_GIF.getMimeType(), IMAGE_BMP.getMimeType(), IMAGE_SVG.getMimeType()).contains(file.getContentType()))\n throw new IllegalStateException(\"File must be an image [\"+ file.getContentType()+\"]\\nExpected Types: [\"+IMAGE_JPEG+\" \"+IMAGE_PNG+\" \"+IMAGE_GIF+\" \"+IMAGE_BMP+\" \"+IMAGE_SVG+\"]\");\n }", "private boolean isImageGiven(){\n return captureImage.getDrawable() != null;\n }", "public interface ValidationServiceInterface {\n /**\n * Check all changes for added or modified yaml files and validate them\n *\n * @param changes The changes to check\n * @param repository The repository to check in\n * @param currentHash The current hash of the repository to fetch the yaml files\n * @throws InvalidYamlFileException One YAML file had an invalid content\n */\n void areChangesValid(\n final Iterable<Change> changes,\n final Repository repository,\n final String currentHash\n ) throws InvalidYamlFileException;\n}", "void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;", "public boolean iskContainerBeingBuilt(FamilyDTO familyDTO) {\n String familyCode = familyDTO.getFamilyCode();\n log.debug(\"Checking to see if we are already building for family[\" + familyCode + \"] and engine:[\" + engineName + \"]\");\n EngineDTO EngineDTO = familyDTO.getEngineDTO(engineName);\n if (EngineDTO != null) {\n String groupId = EngineDTO.getGroupId();\n String artifactId = EngineDTO.getArtifactId();\n String version = EngineDTO.getVersion();\n return kContainerFactory.isKieContainerBeingBuilt(groupId, artifactId, version);\n } else {\n Map<String, EngineDTO> EngineDTOs = familyDTO.getEngineDTOs();\n log.debug(\"Family [\" + familyCode + \"] does not have configuration for \" + \"engine[\" + engineName\n + \"]; no maven settings to load. \" + \"Valid engines are [\" + EngineDTOs.keySet() + \"]\");\n return false;\n }\n }", "@Test\n public void testGetDockerfile() throws Exception {\n System.out.println(\"getDockerfile\");\n Path path = Paths.get(\"/tmp/test.txt\");\n Files.createDirectories(path.getParent());\n try {\n Files.createFile(path);\n } catch (FileAlreadyExistsException e) {\n System.err.println(\"already exists: \" + e.getMessage());\n }\n Docker instance = new Docker();\n instance.getDockerfile(\"TestFile\");\n File file = new File(path.toString());\n assertTrue(file.exists());\n Files.delete(path);\n }", "boolean hasServiceCmd();", "public Either<Either<ArtifactDefinition, Operation>, ResponseFormat> handleArtifactRequest(String componentId, String userId, ComponentTypeEnum componentType, ArtifactOperation operation, String artifactId, ArtifactDefinition artifactInfo,\n\t\t\tString origMd5, String originData, String interfaceName, String operationName, String parentId, String containerComponentType, boolean shouldLock, boolean inTransaction) {\n\t\tAuditingActionEnum auditingAction = detectAuditingType(operation, origMd5);\n\t\tWrapper<ResponseFormat> errorWrapper = new Wrapper<>();\n\t\t// step 2\n\t\t// check header\n\t\tif (userId == null) {\n\t\t\tResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.MISSING_INFORMATION);\n\t\t\tlog.debug(\"handleArtifactRequest - no HTTP_CSP_HEADER , component id {}\", componentId);\n\t\t\thandleAuditing(auditingAction, null, componentId, null, null, null, artifactId, responseFormat, componentType, null);\n\t\t\treturn Either.right(responseFormat);\n\t\t}\n\t\t// step 3\n\t\t// check user existence\n\t\t// step 4\n\t\t// check user's role\n\t\tEither<User, ResponseFormat> userResult = validateUserExists(userId, auditingAction, componentId, artifactId, componentType, inTransaction);\n\t\tif (userResult.isRight()) {\n\t\t\treturn Either.right(userResult.right().value());\n\t\t}\n\n\t\tUser user = userResult.left().value();\n\t\tEither<Boolean, ResponseFormat> validateUserRole = validateUserRole(user, auditingAction, componentId, artifactId, componentType, operation);\n\t\tif (validateUserRole.isRight()) {\n\t\t\treturn Either.right(validateUserRole.right().value());\n\t\t}\n\n\t\t// steps 5 - 6 - 7\n\t\t// 5. check service/resource existence\n\t\t// 6. check service/resource check out\n\t\t// 7. user is owner of checkout state\n\t\torg.openecomp.sdc.be.model.Component component = null;\n\t\t// ComponentInstance resourceInstance = null;\n\t\tString realComponentId = componentType == ComponentTypeEnum.RESOURCE_INSTANCE ? parentId : componentId;\n\t\tEither<? extends org.openecomp.sdc.be.model.Component, ResponseFormat> validateComponent = validateComponentExists(realComponentId, userId, auditingAction, user, artifactId, componentType, containerComponentType, inTransaction);\n\t\tif (validateComponent.isRight()) {\n\t\t\treturn Either.right(validateComponent.right().value());\n\t\t}\n\t\tcomponent = validateComponent.left().value();\n\t\tEither<Boolean, ResponseFormat> validateWorkOnResource = validateWorkOnComponent(component, userId, auditingAction, user, artifactId, operation, componentType);\n\t\tif (validateWorkOnResource.isRight()) {\n\t\t\treturn Either.right(validateWorkOnResource.right().value());\n\t\t}\n\t\t// step 8\n\t\tEither<Either<ArtifactDefinition, Operation>, ResponseFormat> result = validateAndHandleArtifact(componentId, componentType, operation, artifactId, artifactInfo, origMd5, originData, interfaceName, operationName, parentId, user, component,\n\t\t\t\tshouldLock, inTransaction);\n\n\t\treturn result;\n\t}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/images/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Image> patchImageStatus(\n @Path(\"name\") String name, \n @Body Image body, \n @QueryMap PatchImageStatus queryParameters);", "public boolean verifyEmptyToDoImage() {\n if (validateAttributeContain(imageEmptyToDo, \"src\", \"images/icons/clipboard.png\", \"Image Empty ToDo\")) {\n return true;\n }\n return false;\n }", "public boolean hasImageCaptureBug() {\n // list of known devices that have the bug\n ArrayList<String> devices = new ArrayList<String>();\n devices.add(\"android-devphone1/dream_devphone/dream\");\n devices.add(\"generic/sdk/generic\");\n devices.add(\"vodafone/vfpioneer/sapphire\");\n devices.add(\"tmobile/kila/dream\");\n devices.add(\"verizon/voles/sholes\");\n devices.add(\"google_ion/google_ion/sapphire\");\n\n return devices.contains(android.os.Build.BRAND + \"/\" + android.os.Build.PRODUCT + \"/\"\n + android.os.Build.DEVICE);\n }", "private boolean isImage(File file) throws IOException {\n if (!file.isFile()) {\n return false;\n } else if (ImageIO.read(file) == null) // if cannot be read by imageIO, then not image\n {\n return false;\n }\n return true;\n }", "public boolean hasImage(){\n return imageResourceID != NO_IMAGE_PROVIED;\n\n }", "private boolean validateAttributes(ScanningContext context) {\n // We only need to check if it's a non-framework file (and an XML file; skip .png's)\n if (!isFramework() && SdkUtils.endsWith(getFile().getName(), DOT_XML)) {\n ValidatingResourceParser parser = new ValidatingResourceParser(context, false);\n try {\n IAbstractFile file = getFile();\n return parser.parse(file.getOsLocation(), file.getContents());\n } catch (Exception e) {\n context.needsFullAapt();\n }\n\n return false;\n }\n\n return true;\n }", "@Test\n public void testBuildContainer() throws Exception {\n System.out.println(\"buildContainer\");\n JTextArea ta = new JTextArea();\n //Create temp host file\n try {\n //\"False\" in file writer for no append\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"hosts\", false)));\n out.println(\"[email protected]\");\n out.flush();\n } catch (Exception e) {\n\n }\n ArrayList<File> files = new ArrayList<File>();\n Docker instance = new Docker(\"ubuntu\", \"git\", files, \"sh6791\", \"matrix\", \"v1\", \"saqhuss\", \"dockersh6791\", \"[email protected]\");\n instance.buildDockerfile();\n instance.buildContainer(ta);\n Process p;\n String line = null;\n StringBuilder sb = new StringBuilder();\n try {\n p = Runtime.getRuntime().exec(new String[]{\"docker\", \"images\"});\n BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n } catch (Exception e) {\n\n }\n assertEquals(sb.toString().split(\"\\n\")[1].split(\" \")[0].trim(), \"saqhuss/matrix\");\n Files.delete(Paths.get(\"Dockerfile\"));\n Files.delete(Paths.get(\"hosts\"));\n Files.delete(Paths.get(\"id_rsa\"));\n Files.delete(Paths.get(\"id_rsa.pub\"));\n Files.delete(Paths.get(\"authorized_keys\"));\n }", "private static int needToPack(){\n File atlasFile = new File(\"src/main/resources/img/packed/main.atlas\");\n if (!atlasFile.exists()) return -1;\n long atlasFileModifiedDate = atlasFile.lastModified();\n\n File packableFolder = new File(\"src/main/resources/img/packable\");\n if (!packableFolder.exists()) return 0;\n long mostRecentLastModifiedDateInPacked = recursiveFileLastModified(packableFolder);\n\n return mostRecentLastModifiedDateInPacked > atlasFileModifiedDate ? 1 : 0;\n }", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\tpublic boolean perform( AbstractBuild build, Launcher launcher, BuildListener listener ) throws InterruptedException, IOException {\n\t\tenv = build.getEnvironment( listener ); \t\n\t\t\n\t\t// deployment only, if build is successfully \n\t\tif ( build.getResult().isWorseOrEqualTo( Result.FAILURE) ) {\n\t\t\tlistener.getLogger().println( \"[WSO2 CAR Deployer] WSO2 CAR upload: STOP, due to worse build result!\" );\n\t\t\treturn true; // nothing to do\n\t\t}\n\t\tlistener.getLogger().println( \"[WSO2 CAR Deployer] WSO2 CAR upload initiated (baseDir=\"+build.getArtifactsDir().getPath()+\")\" );\n\n\t\ttry {\n\t\t\t// validate input and get variable values\n\t\t\tString xCarSource = checkParam( carSource, \"AAR source\", listener );\n\t\t\tString xCarTargetFileName = checkParam( carTargetFileName, \"AAR target file name\", listener );\n\t\t\tString xWso2URL = checkParam( wso2URL, \"WSO2 Server URL\", listener );\n\t\t\tString xWso2AdminUser = checkParam( wso2AdminUser, \"WSO2 admin user\", listener );\n\t\t\tString xWso2AdminPwd = checkParam( wso2AdminPwd, \"WSO2 admin password\", listener );\n\t\t\t\n\t\t\tif ( ! xWso2URL.endsWith(\"/\") ) {\n\t\t\t\txWso2URL += \"/\";\n\t\t\t}\n\n\t\t\tboolean result = true;\n\t\n\t\t\tFilePath[] aarList = build.getWorkspace().list( xCarSource );\n\t\t\tif ( aarList.length == 0 ) {\n\t\t\t\tlistener.error( \"[WSO2 CAR Deployer] No CAR file found for '\"+xCarSource+\"'\" ); \n\t\t\t\treturn false;\n\t\t\t} else if ( aarList.length != 1 ) {\n\t\t\t\tlistener.error( \"[WSO2 CAR Deployer] Multiple CAR files found for '\"+xCarSource+\"'\" ); \n\t\t\t\tfor ( FilePath aarFile : aarList ) {\n\t\t\t\t\tlistener.getLogger().println( \"AAR is n=\"+aarFile.toURI() );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tfor ( FilePath aarFile : aarList ) {\n\t\t\t\t\tlistener.getLogger().println( \"[WSO2 CAR Deployer] CAR file is = \"+ aarFile.toURI() );\n\t\t\t\t\tlistener.getLogger().println( \"[WSO2 CAR Deployer] CAR file size = \"+ aarFile.length() );\n\t\t\t\t\tlistener.getLogger().println( \"[WSO2 CAR Deployer] CAR target is = \"+xCarTargetFileName );\n\t\n\t\t\t\t\tInputStream fileIs = aarFile.read();\n\t\n\t\t\t\t\tWso2CarDeployClient deployer = new Wso2CarDeployClient( xWso2URL, xWso2AdminUser, xWso2AdminPwd, listener );\n\t\t\t\t\tresult = deployer.uploadCAR( fileIs, xCarTargetFileName, appType );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t\t\n\t\t} catch ( Exception e ) {\n\t\t\treturn false;\n\t\t}\n\n\t}", "@Test\n public void testBuildingContainerWithBadFields() throws Exception {\n // test when required fields are null\n String name = refContainerNames.get(0);\n ContainerStatus status = refContainerStatuses.get(0);\n buildContainerWithBadFieldsAndFail(null, status, false, false, IllegalStateException.class);\n buildContainerWithBadFieldsAndFail(name, null, false, false, IllegalStateException.class);\n buildContainerWithBadFieldsAndFail(name, status, true, false, IllegalStateException.class);\n }", "public boolean pullRequired(IRecipeInput[] requiredInput, boolean doPull) {\n \t\tItemStack[] contents = (doPull ? this.contents : this.contents.clone());\n \t\tItemStack[] crafting = (doPull ? this.crafting : this.crafting.clone());\n \t\tboolean success = true;\n \t\tcraftingLoop:\n \t\tfor (int i = 0; i < crafting.length; i++) {\n \t\t\tItemStack stack = crafting[i];\n \t\t\tIRecipeInput required = requiredInput[i];\n \t\t\tif (required != null) {\n \t\t\t\tif ((stack != null) && !required.matches(stack)) return false;\n \t\t\t\tint currentAmount = ((stack != null) ? stack.stackSize : 0);\n \t\t\t\tint requiredAmount = (required.getAmount() - currentAmount);\n \t\t\t\tif (!doPull) requiredAmount += required.getAmount();\n \t\t\t\tif (requiredAmount < 0) continue;\n \t\t\t\tfor (int j = 0; j < contents.length; j++) {\n \t\t\t\t\tItemStack contentsStack = contents[j];\n \t\t\t\t\tif (contentsStack == null) continue;\n \t\t\t\t\tif ((stack == null) ? required.matches(contentsStack)\n \t\t\t\t\t : StackUtils.matches(stack, contentsStack)) {\n \t\t\t\t\t\tint amount = Math.min(contentsStack.stackSize, requiredAmount);\n \t\t\t\t\t\tcrafting[i] = stack = StackUtils.copyStack(contentsStack, (currentAmount += amount));\n \t\t\t\t\t\tcontents[j] = StackUtils.copyStack(contentsStack, contentsStack.stackSize - amount);\n \t\t\t\t\t\tif ((requiredAmount -= amount) <= 0)\n \t\t\t\t\t\t\tcontinue craftingLoop;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tsuccess = false;\n \t\t\t\tif (!doPull) break;\n \t\t\t} else if (stack != null) {\n \t\t\t\tsuccess = false;\n \t\t\t\tif (!doPull) break;\n \t\t\t}\n \t\t}\n \t\treturn success;\n \t}", "public boolean hasCreateTaskPack() {\n return packCase_ == 3;\n }", "boolean isBareRepository() throws GitException, InterruptedException;", "public interface GitService extends Service {\n\n /**\n * Checks that project has selected branches\n *\n * @param project project for checking\n * @param branches branches that need to be checked\n * @param isCommon if true - checking will occur for all selected branches, if false - for at least one of them.\n * @return true if project contains selected branches, false if does not contains\n */\n boolean containsBranches(Project project, List<Branch> branches, boolean isCommon);\n\n /**\n * Checkouts projects to selected branch\n *\n * @param projects projects that need to be checked out\n * @param branch selected branch\n * @param progress the listener for obtaining data on the process of performing the operation\n *\n * @return map with projects and theirs checkout statuses\n */\n Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);\n\n /**\n * Checkouts projects to selected branch\n *\n * @param projects projects that need to be checked out\n * @param branchName name of the branch\n * @param isRemote <code>true</code> if the branch has {@link BranchType#REMOTE}\n * @param progress the listener for obtaining data on the process of performing the operation\n * @return map with projects and theirs checkout statuses\n */\n Map<Project, JGitStatus> checkoutBranch(List<Project> projects, String branchName, boolean isRemote, ProgressListener progress);\n\n /**\n * Gets projects that have uncommited changes\n *\n * @param projects projects that need to be checked\n * @return list of projects that has uncommited changes\n */\n List<Project> getProjectsWithChanges(List<Project> projects);\n\n /**\n * Reverts uncommited changes\n *\n * @param projects projects that need to be resets\n * @return list of projects that and their discard statuses\n */\n Map<Project, JGitStatus> revertChanges(List<Project> projects);\n\n /**\n * Commit changes to selectedProjects\n *\n * @param projects projects that contains changes\n * @param commitMessage message for commit\n * @param isPushImmediately if true - make push operation after commiting, if false - make commit without pushing\n * @param progressListener Listener for obtaining data on the process of performing the operation.\n */\n Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,\n ProgressListener progressListener);\n\n /**\n * Creates new branch\n *\n * @param projects the projects that needs new branch\n * @param branchName new branch name\n * @param startPoint corresponds to the start-point option; if <code>null</code>, the current HEAD will be used\n * @param force if <code>true</code> and the branch with the given name\n * already exists, the start-point of an existing branch will be\n * set to a new start-point; if false, the existing branch will\n * not be changed\n * @return map with projects and theirs statuses of branch creating\n */\n Map<Project, JGitStatus> createBranch(List<Project> projects, String branchName, String startPoint, boolean force);\n\n /**\n * Returns the set of selected type of branches\n *\n * @param projects projects list\n * @param branchType selected {@link BranchType}\n * @param isOnlyCommon if <code>true</code> returns only common branches for all projects and otherwise if <code>false</code>\n * @return set of the branches or empty set if such type of branches does not exist for this projects\n */\n Set<Branch> getBranches(List<Project> projects, BranchType branchType, boolean isOnlyCommon);\n\n /**\n * Returns current branch name for selected project\n *\n * @param project - selected project\n * @return current branch name for selected project or <code>null</code> if project has no branches (unreachable state)\n */\n String getCurrentBranchName(Project project);\n\n /**\n * Pushed selected projects to upstream\n *\n * @param projects - list of projects\n * @param progressListener - listener for obtaining data on the process of performing the operation\n * @return map of operation statuses\n */\n Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);\n\n /**\n * Pulls changes in selected projects from upstream\n *\n * @param projects - selected projects\n * @param progressListener - instance of {@link OperationProgressListener}\n * @return <code>true</code> if pull operation works well and <code>false</code> otherwise\n */\n boolean pull(List<Project> projects, OperationProgressListener progressListener);\n\n /**\n * Checks that project has any references.\n *\n * @param project the cloned project\n * @return <code>true</code> if project has any references, <code>false</code> if project does not have references.\n */\n public boolean hasAtLeastOneReference(Project project);\n\n /**\n * Returns count of commits ahead and behind index\n *\n * @param project - project to show status\n * @param branchName - the name of branch\n * @return array of ahead and behind commits counts<br>\n * Array consists of two parameters:\n * first is the count of commits ahead Index, <br>\n * second is the count of commits behind Index\n */\n public int[] getAheadBehindIndexCounts(Project project, String branchName);\n\n /**\n * Checks whether the project has conflicts and uncommitted changes.\n *\n * @param project the project\n * @return array of values. Array consists of two parameters:\n * - has conflicts: <true> is has, otherwise <false>.\n * - has changes: <true> is has, otherwise <false>.\n */\n public boolean[] hasConflictsAndChanges(Project project);\n\n /**\n * Starts canceling process for cloning. This may take some time.\n */\n void cancelClone();\n\n /** This method return tracking branch.\n *\n * @param project\n * @return tracking branch.\n */\n public String getTrackingBranch(Project project);\n\n /**\n * This method return all commits for currently selected project\n *\n * @param project the project\n * @param branchName the branch\n * @return list of all commits for currently selected project\n */\n public List<Commit> getAllCommits(Project project, String branchName);\n\n /**\n * Gets ChangedFiles for project.\n *\n * @param project the project\n * @return a ChangedFiles list\n */\n List<ChangedFile> getChangedFiles(Project project);\n\n /**\n * Adds untracked files to index.\n *\n * @param files the map of projects and changed files\n * @return the list of added files\n */\n List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);\n\n /**\n * Resets changed files to head\n *\n * @param files the map which has projects and their changed files\n * @return a list of changed files\n */\n List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);\n\n /**\n * Gets ProjectStatus for project.\n * We use {@link Status} for getting info about conflicting, untracked files etc.\n * Also, use it for checking the presence of uncommitted changes.\n * Gets current branch name, ahead and behind indexes using {@link Git}.\n *\n * @param project the project\n * @return ProjectStatus for the project.\n */\n ProjectStatus getProjectStatus(Project project);\n\n /**\n * Gets branches of project\n *\n * @param projects cloned project\n * @param brType type branch\n * @param onlyCommon if value is <code>true</code> return only common branches of projects,\n * if <code>false</code> return all branches.\n * @return a list of branches\n */\n Set<Branch> getBranches(Collection<Project> projects, BranchType brType, boolean onlyCommon);\n\n /**\n * Replaces changed files with HEAD revision\n *\n * @param changedFiles the files for replacing\n */\n void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);\n\n /**\n * Creates stash for projects\n *\n * @param projects the cloned projects\n * @param stashMessage the stash message\n * @param includeUntracked <code>true</code> if need to include untracked file to stash, otherwise <code>false</code>\n * @return a map of operation statuses\n */\n Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);\n\n /**\n * Gets list of stashes for projects\n *\n * @param projects the cloned projects\n * @return a list of projects' stashes\n */\n List<Stash> getStashList(List<Project> projects);\n\n /**\n * Applies stash for the project\n *\n * @param stash the stash for applying\n * @param progressListener the listener for obtaining data on the process of performing the operation\n */\n void applyStashes(Stash stash, ProgressListener progressListener);\n\n /**\n * Drops stash from the project\n *\n * @param stash the stash which need to drop\n * @return a map of operation statuses\n */\n Map<Project, Boolean> stashDrop(Stash stash);\n\n /**\n * Deletes branch from projects\n *\n * @param projects the cloned projects\n * @param deletedBranch the branch which will be deleted\n * @param progressListener the listener for obtaining data on the process of performing the operation\n * @return a map of operation statuses by each project.\n * <code>true</code> if a branch was successfully deleted from a project, otherwise <code>false</code>.\n */\n Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener);\n}", "@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);", "@Test\n public void shouldMakeCoffeeWhenShotsAreNotAvailable(){\n given(supplyService.isCoffeeShotAvailable(EXPRESSO)).willReturn(false);\n //When coffee is order\n Boolean orderStatus=kitchenService.makeCoffee(EXPRESSO);\n //Then Kitchen should make coffee\n assertThat(orderStatus, is(false));\n\n }", "boolean hasImagePath();", "@Override\n protected Result check()\n {\n return this.gitLabModeInfos.isEmpty() ? Result.unhealthy(\"No GitLab modes available\") : Result.healthy();\n }", "public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}", "public void VerifyShiptoStoreImagein_Cart_incheckout(){\r\n\t\tString countriess = \"Germany,Norway,Netherland,UK\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ship to Cart image should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"imgShiptoStoreinCartinCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"Ship to Store image is present\");\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Ship to Store image is present\");\r\n\t\t\t\t}else {\r\n\t\t\t\t\tSystem.out.println(\"Ship to Store image is not present for the country -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Exception(\"Ship to Store image is not present for the country -\"+countries.get(countrycount));\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Ship to Store image will not be present for country -\"+countries.get(countrycount));\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ship to Store image is not present for country -\"+countries.get(countrycount));\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public interface BuildFilterService {\n\n /**\n * Gets the default filter to use when none is defined.\n */\n BuildFilter defaultFilter();\n\n /**\n * Builds a standard build filter\n */\n StandardFilterBuilder standardFilter(int count);\n\n /**\n * Gets the list of all existing filters.\n *\n * @param branchId Branch to get the filters for\n * @return List of filters\n */\n Collection<BuildFilterResource<?>> getBuildFilters(ID branchId);\n\n /**\n * Gets the list of forms to create new filters\n *\n * @param branchId Branch to get the forms for\n * @return List of forms\n */\n Collection<BuildFilterForm> getBuildFilterForms(ID branchId);\n\n /**\n * Basic method to compute an actual filter from a type and a list of parameters.\n *\n * @param branchId Branch to apply the filter on\n * @param type Qualified type for the filter\n * @param parameters Parameters for the filter\n * @return Actual filter to use, or the {@linkplain #defaultFilter() default filter} if\n * the <code>type</code> cannot be resolved or if the filter cannot be instantiated using\n * the given parameters.\n */\n BuildFilter computeFilter(ID branchId, String type, JsonNode parameters);\n\n /**\n * Gets the form to edit an existing filter.\n *\n * @param branchId Branch to get the form on\n * @param name name of the filter on the branch\n * @return An edition form\n * @throws BuildFilterNotFoundException If the filter is not defined\n * @throws BuildFilterNotLoggedException If the user is not logged\n */\n BuildFilterForm getEditionForm(ID branchId, String name) throws BuildFilterNotFoundException, BuildFilterNotLoggedException;\n\n /**\n * Saves a filter for a branch. This method does nothing if the user is not logged,\n * or if the filter type is not found, or if the parameters are not valid.\n *\n * @param branchId Branch to save the filter for\n * @param shared If the filter must be shared in the branch (needs specific authorisation)\n * @param name Name of the filter\n * @param type Type of the filter\n * @param parameters Parameters for the filter\n */\n Ack saveFilter(ID branchId, boolean shared, String name, String type, JsonNode parameters);\n\n /**\n * Deletes a filter for a branch. This method does nothing if the user is not logged,\n * or if the filter is not found.\n *\n * @param branchId Branch to save the filter for\n * @param name Name of the filter\n */\n Ack deleteFilter(ID branchId, String name);\n\n /**\n * Copies all the filters from one branch to another\n */\n void copyToBranch(ID sourceBranchId, ID targetBranchId);\n}", "@Test\n public void testSupports() {\n assertTrue(instance.supports(SpringRestService.class));\n // JAX-RS RestService class\n assertFalse(instance.supports(StandardRestService.class));\n // Default RestService class\n assertFalse(instance.supports(DefaultRestService.class));\n // No annotated RestService class\n assertFalse(instance.supports(RestService.class));\n // null\n assertFalse(instance.supports(null));\n }", "@Override\n protected void before() throws Throwable {\n log.info(\"Starting docker container\");\n executeCommand(getDockerInstallCommand(false));\n do {\n Thread.sleep(5000);\n } while (!new SystemApiClient(getServiceUrl()).isHealthy().isSuccessful());\n }", "@Ignore\n\t@Test\n\tpublic void testGetDockerClient(){\n\t\tList<Container> shinyContainers = dockerService.getShinyContainers();\n\t\tAssert.assertEquals(1, shinyContainers.size());\n\t}", "public boolean hasCreateTaskPack() {\n return packCase_ == 3;\n }", "@Path(\"/api/repo/create\")\n\t@POST\n\t@ApiOperation(value = \"Create the docker repository\", notes = \"User can create docker repository.User with role Customer Admin only allowed.\", response = ApiResponseDTO.class)\n\t@ApiResponses({ @ApiResponse(code = 200, message = \"The docker repository has been created successfully\") })\n\t@Transactional(rollbackFor = { NotAuthorizeException.class, JsonProcessingException.class, ValidationException.class,BaseException.class })\n\t@RequestMapping(value = \"/api/repo/create\", method = RequestMethod.POST)\n\t@PreAuthorize(\"hasAuthority('Customer Admin')\")\n\tpublic ApiResponseDTO createRepository(\n\t\t\t@ApiParam(name = \"Docker respository object\", value = \"Docker respository object that needs to be created\", required = true) @Valid @RequestBody DockerRepositoryDTO dockerRepositoryDTO,\n\t\t\tHttpServletRequest request) throws NotAuthorizeException, JsonProcessingException, ValidationException, BaseException {\n\t\tString message = null;\n\t\tString statusCode = HttpStatus.OK.toString();\n\t\tString loggedInEmail = getLoggedInUserEmail(SecurityContextHolder.getContext().getAuthentication());\n\t\tString roleName = getLoggedInUserRoleName(SecurityContextHolder.getContext().getAuthentication());\n\t\tlogger.debug(\"RoleName and loggedinemail are {}, {}\", roleName, loggedInEmail);\n\t\tUser loggedInUser = userService.findUserByEmail(loggedInEmail);\n\t\tString userQAuthToken = loggedInUser.getqAuthToken();\n\t\tif (userQAuthToken == null) {\n\t\t\tthrow new NotAuthorizeException(environment.getProperty(\"job.notauthorized\"));\n\t\t}\n\t\tif(StringUtils.containsWhitespace(dockerRepositoryDTO.getRepository()) == true){\n\t\t\tthrow new ValidationException(environment.getProperty(\"repository.name.notallow.space\"));\n\t\t}\n\t\ttry {\n\t\t\tString custName = customerService.findCustomer(loggedInUser).getName();\n\t\t\tString url = environment.getProperty(\"quay.url\");\n\n\t\t\tlogger.debug(\"Crreate Docker Repository with fallowing parmes url {} CustomerName {}\", url, custName);\n\n\t\t\tdockerRepositoryDTO.setNamespace(custName);\n\n\t\t\tDockerRepoResponseDTO dockerRepoResponse = JobsClient.createDockerRepository(url, BEARER + userQAuthToken,\n\t\t\t\t\tdockerRepositoryDTO);\n\t\t\tif (dockerRepoResponse != null) {\n\t\t\t\tmessage = dockerRepoResponse.getMessage();\n\t\t\t\tstatusCode = String.valueOf(dockerRepoResponse.getStatusCode());\n\t\t\t}\n\t\t\tlogger.info(environment.getProperty(\"job.repository.create.sucess\"),loggedInUser.getUserName(),custName,environment.getProperty(\"quay.url\"));\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\tlogger.info(environment.getProperty(\"job.tomcat.failed\"),environment.getProperty(\"nvidia.host\"),environment.getProperty(\"quay.url\"));\n\t\t\tthrow new BaseException(\"error while creating docker repositories\" + e.getMessage());\n\t\t}\n\t\t\n\t\tApiResponseDTO response = new ApiResponseDTO(message, Integer.parseInt(statusCode));\n\t\treturn response;\n\t}", "public boolean validateAxis2ClientRepo(String input) throws AxisFault {\n try {\n ConfigurationContextFactory.createConfigurationContextFromFileSystem(input,\n DEFAULT_AXIS2_XML);\n return true;\n } catch (AxisFault e) {\n handleException(log, \"Error while validating the Axis2 Client Repository\", e);\n return false;\n }\n }", "boolean hasImageByHandler();", "public boolean isContractImageExist(String sContract){\n\t\treturn hmContractImage.containsKey(sContract);\n\t}", "private boolean shouldAddDockerDaemon(String queue) {\n return true;\n }", "public boolean isSupported(String[] builds) {\n if (builds==null || builds.length==0) return false;\n for (String build:builds) {\n if (!isSupported(build)) return false;\n }\n return true;\n }", "public boolean isBuildingNeeded(org.eclipse.emf.common.util.URI uri) {\n\t\treturn false;\n\t}", "public boolean isBuildingNeeded(org.eclipse.emf.common.util.URI uri) {\n\t\treturn false;\n\t}", "private static AnalysisResults analyzeImage(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = retrieveText(imageBytes);\n\n // Generate categories and parse date and price if text was extracted.\n if (analysisBuilder.getRawText().isPresent()) {\n ImmutableSet<String> categories = categorizeText(analysisBuilder.getRawText().get());\n analysisBuilder.setCategories(categories);\n\n checkForParsableDate(analysisBuilder);\n checkForParsablePrices(analysisBuilder);\n }\n\n return analysisBuilder.build();\n }", "@Test(enabled = false)\n public void testAddProductCodesToImage() {\n }", "boolean checkSubProcessDefinitionValid(ProcessDefinition processDefinition);", "public boolean isServiceConfigurationValid(String config) {\n try {\n LayoutProject layoutProj = new LayoutProject();\n Environment environment = new Environment();\n PageLayout layout = new PageLayout();\n\n layoutProj.setRegisteredEnvironment(environment);\n layoutProj.setRegisteredLayout(layout);\n loadLayersWithLayoutProject(config, layoutProj);\n } catch (Exception ex) {\n ex.printStackTrace();\n return false;\n }\n return true;\n }", "Builder useBuildDistribution();", "@Test\n public void testNotRegenerateImage() throws Exception {\n assertFalse(\n \"This flag should not be committed as true\", ImageSimilarity.REGENERATE_EXPECTED_IMAGES);\n }", "private static boolean hasFile(Artifact artifact) {\n\t\treturn artifact != null && artifact.getFile() != null && artifact.getFile().isFile();\n\t}", "@Test\n public void addPicture_ReturnsTrue(){\n Bitmap image = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n assertEquals(\"addPicture - Returns True Upon Valid Pic\", true, testRecipe.setImage(image, appContext));\n assertNotEquals(\"addPicture - Not Null Upon Valid Pic\", null, testRecipe.getImage(appContext));\n }", "@Test\n public void getPicture_Exists(){\n Bitmap image = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(image, appContext);\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }", "public boolean hasOperation() {\n return operationBuilder_ != null || operation_ != null;\n }", "public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}", "boolean isBareRepository(String GIT_DIR) throws GitException, InterruptedException;", "public boolean hasImage() {\n return mImageResourceId != NO_IMAGE_PROVIDED;\n }" ]
[ "0.62785256", "0.57139874", "0.5622987", "0.5566309", "0.5167263", "0.501958", "0.49995205", "0.49636015", "0.49510565", "0.47680402", "0.47653857", "0.47588456", "0.47502035", "0.47438195", "0.47356752", "0.47261944", "0.4694035", "0.4624445", "0.46242037", "0.46113864", "0.45268807", "0.45240057", "0.45165464", "0.45035917", "0.45009807", "0.44973147", "0.44925368", "0.44900218", "0.44760194", "0.44750997", "0.44692844", "0.44510776", "0.44420466", "0.44322458", "0.44155887", "0.4412736", "0.44119027", "0.44090286", "0.44084513", "0.4405989", "0.44018346", "0.43799496", "0.43741426", "0.43668056", "0.43666345", "0.43626142", "0.4359195", "0.43570837", "0.43516347", "0.43506938", "0.43413505", "0.43352562", "0.43296614", "0.4325005", "0.4320325", "0.4319768", "0.43178886", "0.43155032", "0.4313991", "0.430756", "0.42987788", "0.42945483", "0.42881164", "0.42876846", "0.42852595", "0.4281436", "0.42762047", "0.4269391", "0.42674917", "0.42587382", "0.42574352", "0.42571047", "0.42486593", "0.42402753", "0.4237243", "0.42338765", "0.42318407", "0.42316657", "0.42302004", "0.42226556", "0.42102867", "0.42079028", "0.4207898", "0.42075145", "0.42024758", "0.42006043", "0.42006043", "0.42005184", "0.41882116", "0.41869617", "0.41866475", "0.4182145", "0.41786763", "0.41778067", "0.41775924", "0.41766313", "0.41753304", "0.41578382", "0.41566423", "0.415045" ]
0.7993774
0
It defines the maximum number of transactions that can be executed.
public void setMaxTransactions(long maxTrans) { if (maxTrans > 0) this.maxTrans = maxTrans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMaxTransactions(int maxTransactions) {\n\t\tthis.maxTransactions = maxTransactions;\n\t}", "public long getMaxTransactions() {\n\t\treturn (maxTrans);\n\t}", "@Value.Default\n public int maxTraceEntriesPerTransaction() {\n return 2000;\n }", "public int getTransactionMaxSize() {\r\n return transactionMaxSize;\r\n }", "@Value.Default\n public int maxTransactionAggregates() {\n return ConfigDefaults.ADVANCED_MAX_TRANSACTION_AGGREGATES;\n }", "protected int maxPktsOut() { return Integer.MAX_VALUE; }", "int getTransactionLogMaxSize() {\n\t\treturn transactionLog.getMaxSize();\n\t}", "@Override\n\tpublic void noOfTransactions() {\n\t\t\n\t}", "int maxNumberOfPutRows();", "@Override\n public int getMaxCapacity() {\n return 156250000;\n }", "public int getMaxCloseStatements()\n {\n return _maxCloseStatements;\n }", "public void setMaxCloseStatements(int max)\n {\n _maxCloseStatements = max;\n }", "@Override\n\tpublic int getMaxThreads() {\n\t\treturn 10;\n\t}", "public void setMaxConnections(int maxConnections)\n {\n _maxConnections = maxConnections;\n }", "public void decMaxTransactions() {\n\t\tmaxTrans--;\n\t}", "public static int getMaxThreadCount(){\n return Integer.parseInt(properties.getProperty(\"maxThreadCount\"));\n }", "protected int maxTimeout() { return 15*1000*1000; }", "public void setMaxRows(int max) throws SQLException {\n\r\n }", "public void setMaxCalls(int max);", "protected short maxRetries() { return 15; }", "@Override\n public int getMaxJobsPerAcquisition() {\n return myMaxJobsPerAcquisition;\n }", "@Value.Default\n public int maxProfileSamplesPerTransaction() {\n return 50000;\n }", "void setTransactionLogMaxSize(int maxSize) {\n\t\ttransactionLog.setMaxSize(maxSize);\n\t\t\n\t\tif (maxSize == 0) {\n\t\t\ttransactionMonitor = null;\n\t\t} else {\n\t\t\ttransactionMonitor = new TransactionMonitor(transactionLog);\n\t\t}\n\t}", "public int getMaxConnections()\n {\n return _maxConnections;\n }", "public int getConnectionMaxTokens() {\n return zks.connThrottle().getMaxTokens();\n }", "public int getMaxConnections() {\n return maxConnections;\n }", "public void setMaxAmount(int max) {\n _max = max;\n }", "public int getMaxCount() {\n return maxCount_;\n }", "public int getNumTransactionsInBlock() {\r\n return numTransactionsInBlock;\r\n }", "@Override\n\tpublic int getMaxIterations() {\n\t\treturn maxIterations;\n\t}", "public int getMaxCalls();", "public static int getMaxSessionCount() {\n\t\treturn (maxSessionCount);\n\t}", "int getMaxConcurrent();", "public int getMaxOverflowConnections()\n {\n return _maxOverflowConnections;\n }", "int getTransactionsCount();", "public void setMAX_EXECUCOES(int MAX_EXECUCOES)\r\n {\r\n if(MAX_EXECUCOES > 0)\r\n this.MAX_EXECUCOES = MAX_EXECUCOES;\r\n }", "public String getDatabaseConnectionPoolMaxNumberConnections(){\n \t\treturn getProperty(\"org.sagebionetworks.pool.max.number.connections\");\n \t}", "int getMaxCount();", "int getMaxCount();", "static public int getMaxMigrationAsyncPollingRetries() {\n return maxMigrationAsyncPollingRetries;\n }", "int getMaximalIterationCount();", "public Long maxNumberOfRecordSets() {\n return this.maxNumberOfRecordSets;\n }", "@Override\n public int getMaxConnections() throws ResourceException {\n return Integer.MAX_VALUE;\n }", "static public int getMaxAsyncPollingRetries() {\n return maxAsyncPollingRetries;\n }", "public int getMaximumOrder() {\n\t\treturn 999;\n\t}", "public int getMaxPoolSize(Env env) {\n return client.getMaxPoolSize();\n }", "public int getMaxAttemptCount() {\n return maxAttemptCount;\n }", "int getMaxPoolSize();", "public int getMaxChainLength(){\r\n return maxChainLength;\r\n }", "public int getMaxCount() {\n return maxCount_;\n }", "public int getBatchSize() {\n\t\treturn 0;\n\t}", "public void setMaxRecords(Integer maxRecords) {\n this.maxRecords = maxRecords;\n }", "public void setMaxRecords(Integer maxRecords) {\n this.maxRecords = maxRecords;\n }", "private void setConfigNumMaxTotalJobs(int value) {\n this.bitField0_ |= 1;\n this.configNumMaxTotalJobs_ = value;\n }", "public void setMaxConcurrentConnection(Long MaxConcurrentConnection) {\n this.MaxConcurrentConnection = MaxConcurrentConnection;\n }", "int getMaxNumberOfRows();", "public void setMaxConnections(int maxConnections) {\n this.maxConnections = maxConnections;\n saveProperties();\n }", "@Override\n public void setMaxRows( int max ) throws SQLException {\n max_rows = max;\n }", "public int getMaxRetries() {\n return maxRetries;\n }", "public void setMaxConcurrentAccessCount(String newValue);", "public final int getMaxIterations()\r\n\t{\r\n\t\treturn maxIterations;\r\n\t}", "private int getMaxReconsumeTimes() {\n if (this.defaultMQPushConsumer.getMaxReconsumeTimes() == -1) {\n return Integer.MAX_VALUE;\n } else {\n return this.defaultMQPushConsumer.getMaxReconsumeTimes();\n }\n }", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public int getMaxRecords() {\n return maxRecords;\n }", "int getMaximumPoolSize();", "public void setMaxThreads(int maxThreads)\r\n {\r\n this.maxThreads = maxThreads;\r\n }", "int getLimit();", "int getLimit();", "public int getMaxPoolSize() {\n return maxPoolSize;\n }", "default int getMaximumCount(int slot) {\n\t\treturn 64;\n\t}", "public void setMaxConns(int value) {\n this.maxConns = value;\n }", "public int getLimit() {\n return limit;\n }", "private int getIdBatchSize() {\n return ApiProperties.getPropertyAsInt(\n \"api.bigr.library.\" + ApiFunctions.shortClassName(getClass().getName()) + \".batch.size\",\n 500);\n }", "public int getBatchSize();", "public void setMaxRecords(int maxRecords) {\n this.maxRecords = maxRecords;\n }", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public void setMaxAthletes(int inMaxAthletes)\n {\n\tmaxAthletes = inMaxAthletes;\n }", "public int getBatchSize()\r\n/* 23: */ {\r\n/* 24:42 */ return BatchUpdateUtils.this.size();\r\n/* 25: */ }", "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "@Override\n\tpublic void setMaxRows(final int max) throws SQLException {\n\t\tmaxRows = max;\n\t}", "public int getTransSize(){\n return TxPool_new.size(); \n }" ]
[ "0.7529378", "0.74262625", "0.7332911", "0.7096345", "0.6839778", "0.66877884", "0.66605264", "0.66522634", "0.65341425", "0.6532154", "0.6490337", "0.64705706", "0.6467868", "0.64367396", "0.6415223", "0.6374225", "0.6368178", "0.6332708", "0.6327983", "0.6318786", "0.63075614", "0.63036054", "0.6238579", "0.62327677", "0.62114435", "0.61921155", "0.61896765", "0.6183999", "0.6182332", "0.61700255", "0.6159311", "0.61570644", "0.61566204", "0.6150864", "0.6136659", "0.6134178", "0.6124003", "0.6119306", "0.6119306", "0.61070114", "0.6105325", "0.6105212", "0.6104755", "0.60921824", "0.6090595", "0.6090519", "0.60864013", "0.60849136", "0.60838395", "0.60801655", "0.60782367", "0.6076941", "0.6076941", "0.605679", "0.6051352", "0.60387015", "0.6033612", "0.6015271", "0.6007571", "0.60018754", "0.59942144", "0.59830797", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59830153", "0.59826976", "0.5981018", "0.59792346", "0.59617513", "0.59617513", "0.595871", "0.59519255", "0.5938401", "0.59320664", "0.59279704", "0.59272796", "0.5920518", "0.59154344", "0.59154344", "0.59144944", "0.591344", "0.5911432", "0.5911432", "0.59099656", "0.5899085" ]
0.7379665
2
It returns the maximum number of transactions that can be executed.
public long getMaxTransactions() { return (maxTrans); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTransactionsCount();", "int getMaxCount();", "int getMaxCount();", "public int getTransactionMaxSize() {\r\n return transactionMaxSize;\r\n }", "int getMaximalIterationCount();", "public int getMaxCount() {\n return maxCount_;\n }", "int getMaxConcurrent();", "public int getMaxCount() {\n return maxCount_;\n }", "public static int getMaxSessionCount() {\n\t\treturn (maxSessionCount);\n\t}", "public int getMaxAttemptCount() {\n return maxAttemptCount;\n }", "public int getMaxCalls();", "int getTransactionLogMaxSize() {\n\t\treturn transactionLog.getMaxSize();\n\t}", "public int getNumTransactionsInBlock() {\r\n return numTransactionsInBlock;\r\n }", "int getMaxNumberOfRows();", "public int getMaxCloseStatements()\n {\n return _maxCloseStatements;\n }", "default int getMaximumCount(int slot) {\n\t\treturn 64;\n\t}", "public void setMaxTransactions(int maxTransactions) {\n\t\tthis.maxTransactions = maxTransactions;\n\t}", "@Value.Default\n public int maxTransactionAggregates() {\n return ConfigDefaults.ADVANCED_MAX_TRANSACTION_AGGREGATES;\n }", "public int getMaxConnections() {\n return maxConnections;\n }", "public int getMaxConns() {\n return maxConns;\n }", "public static int getMaxThreadCount(){\n return Integer.parseInt(properties.getProperty(\"maxThreadCount\"));\n }", "public void setMaxTransactions(long maxTrans) {\n\t\tif (maxTrans > 0)\n\t\t\tthis.maxTrans = maxTrans;\n\t}", "protected int maxPktsOut() { return Integer.MAX_VALUE; }", "public int getMaxRetries() {\n\t return maxRetries.get();\n\t}", "public final int getMaxIterations()\r\n\t{\r\n\t\treturn maxIterations;\r\n\t}", "public long getAllTransactionsCount(){\n\t\tString sql = \"SELECT COUNT(*) FROM \" + TransactionEntry.TABLE_NAME;\n\t\tSQLiteStatement statement = mDb.compileStatement(sql);\n return statement.simpleQueryForLong();\n\t}", "public int getMaxConnections()\n {\n return _maxConnections;\n }", "public int getAttemptCount() {\n return maxAttemptCount;\n }", "public int getMaxAmount() {\n return _max;\n }", "public int getMaxRetries() {\n return maxRetries;\n }", "int getMaxRecords();", "@Value.Default\n public int maxTraceEntriesPerTransaction() {\n return 2000;\n }", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public Long maxNumberOfRecordSets() {\n return this.maxNumberOfRecordSets;\n }", "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "Integer getMaximumResults();", "public int getMaxRecords() {\n return maxRecords;\n }", "public int getMaxRows() {\n\t\treturn maxRows;\n\t}", "public int getMaxRows() {\n\t\treturn maxRows;\n\t}", "public int getMaxRows() throws SQLException {\n return 0;\r\n }", "public int getNumOfMaxActions() {\n return numOfMaxActions;\n }", "int maxNumberOfPutRows();", "public Long getMaxConcurrentConnection() {\n return this.MaxConcurrentConnection;\n }", "public int getConnectionMaxTokens() {\n return zks.connThrottle().getMaxTokens();\n }", "public int getMaxAttempts(AsyncOperation op);", "public int getMaxAmount() {\n return maxAmount;\n }", "@java.lang.Override\n public int getTransactionsCount() {\n return instance.getTransactionsCount();\n }", "public int getMaxIterations() {\n return mMaxIterations;\n }", "public int getMaxIterations() {\n return mMaxIterations;\n }", "@java.lang.Override\n public int getTransactionsCount() {\n return transactions_.size();\n }", "public int getTransSize(){\n return TxPool_new.size(); \n }", "@Override\n\tpublic void noOfTransactions() {\n\t\t\n\t}", "private int calculateMaxCount(XYDataset dataset) {\n int max = 0;\n for (int i = 0; i < dataset.getSeriesCount(); ++i) {\n int count = dataset.getItemCount(i);\n if (count > max) {\n max = count;\n }\n }\n return max;\n }", "public Integer getMaxLoginTrialCnt() {\r\n return maxLoginTrialCnt;\r\n }", "public Integer getMaxRecords() {\n return maxRecords;\n }", "public Integer getMaxRecords() {\n return maxRecords;\n }", "public int getMaxAthletes()\n {\n\treturn maxAthletes;\n }", "public final int getMaxLinkCount() {\n\t\tint r = 0;\n\t\tlockMe(this);\n\t\tr = maxLinkCount;\n\t\tunlockMe(this);\n\t\treturn r;\n\t}", "@Override\n\tpublic int getMaxIterations() {\n\t\treturn maxIterations;\n\t}", "public int getTotalTransactionsCount(){\n String queryCount = \"SELECT COUNT(*) FROM \" + TransactionEntry.TABLE_NAME +\n \" WHERE \" + TransactionEntry.COLUMN_RECURRENCE_PERIOD + \" =0\";\n Cursor cursor = mDb.rawQuery(queryCount, null);\n int count = 0;\n if (cursor != null){\n cursor.moveToFirst();\n count = cursor.getInt(0);\n cursor.close();\n }\n return count;\n }", "public Integer getResultLimit()\n {\n if (resultLimit == null)\n {\n return HPCCWsWorkUnitsClient.defaultResultLimit;\n }\n return resultLimit;\n }", "public int getMaxItems()\n {\n return maxItems;\n }", "public int getMaxOverflowConnections()\n {\n return _maxOverflowConnections;\n }", "protected int getMaxResults() {\n\t\treturn maxResults;\n\t}", "public int getMaxValue() throws Exception {\n\t\treturn RemoteServer.instance().executeAndGetId(\"getmaxvalue\",\n\t\t\t\tgetRefId());\n\t}", "public int max() {\n\t\treturn 0;\n\t}", "public int getMaximum() {\r\n return max;\r\n }", "int maxReturnEventsForQuery();", "private int getMaxConfiguredReplicaCount() {\n if (maxConfiguredReplicaCount > 0) {\n return maxConfiguredReplicaCount;\n } else {\n ClientMessage request = PNCounterGetConfiguredReplicaCountCodec.encodeRequest(name);\n ClientMessage response = invoke(request);\n maxConfiguredReplicaCount = PNCounterGetConfiguredReplicaCountCodec.decodeResponse(response);\n }\n return maxConfiguredReplicaCount;\n }", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "@Override\n\tpublic Integer findMaxCount() {\n\t\tString maxCountSql = \"select count(noticeid) from notice where status=1\";\n\t\treturn (Integer) this.jdbcTemplate.queryForObject(maxCountSql, Integer.class);\n\t}", "public int getNuevoNumTransaccion() throws BaseDeDatosExcepcion, ConexionExcepcion {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNuevoNumTransaccion() - start\");\n\t\t}\n\t\t\n\t\tint result = 0;\n\t\t\n\t\tif (Sesion.impresoraFiscal) {\n\t\t\tif (!numTrBloqueado) {\n\t\t\t\tresult = numTransaccion + 1;\n\t\t\t\tnumTrBloqueado = true;\n\t\t\t} else {\n\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\tlogger\n\t\t\t\t\t\t\t.error(\"getNuevoNumTransaccion() - Estado ilegal - Un número de transacción se encuentra bloqueado en este momento\");\n\t\t\t\t}\n\n\t\t\t\tthrow new IllegalStateException(\"Ya se ha bloqueado un numero \" +\n\t\t\t\t\t\t\"de transacción\");\n\t\t\t}\n\t\t} else {\n\t\t\tincrementarNumTrans();\n\t\t\tresult = numTransaccion;\n\t\t}\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNuevoNumTransaccion() - end\");\n\t\t}\n\t\treturn result;\n\t}", "public void decMaxTransactions() {\n\t\tmaxTrans--;\n\t}", "public int getNumGlobalTransactions()\n {\n return gtx2ContextMap.size();\n }", "public int getMaximumPlayers() {\n return getOption(ArenaOption.MAXIMUM_PLAYERS);\n }", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "long getExecutedStatementsCount();", "long getMaxItemFindings();", "String getMaximumRedeliveries();" ]
[ "0.7262783", "0.71447355", "0.71447355", "0.7009202", "0.69503736", "0.69469947", "0.6933872", "0.68890494", "0.6828238", "0.68271303", "0.681472", "0.6786894", "0.67648077", "0.667916", "0.6674295", "0.6669375", "0.66441816", "0.66187197", "0.6598045", "0.65892476", "0.6559453", "0.65523136", "0.6514397", "0.6505186", "0.6490198", "0.6466855", "0.64623857", "0.64551026", "0.64519715", "0.644914", "0.6446646", "0.6445072", "0.6444235", "0.6444235", "0.64420795", "0.6430192", "0.6430192", "0.6418525", "0.6409957", "0.6406682", "0.6406682", "0.63978153", "0.6388011", "0.6377452", "0.63690937", "0.6352936", "0.6348979", "0.63460267", "0.6342259", "0.6342068", "0.6342068", "0.62986386", "0.6294823", "0.6292796", "0.6269374", "0.6248664", "0.6245721", "0.6245721", "0.6245315", "0.6231387", "0.6229511", "0.62101877", "0.6199991", "0.6194253", "0.6188889", "0.6186952", "0.61801887", "0.61714995", "0.61687356", "0.61667687", "0.61661893", "0.6163164", "0.6163164", "0.61628485", "0.61620325", "0.6148864", "0.61481076", "0.61452186", "0.6141201", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6135013", "0.6134879", "0.6132241", "0.6131363" ]
0.81592137
0
It controls the remain number of transactions that can be executed.
public void decMaxTransactions() { maxTrans--; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void noOfTransactions() {\n\t\t\n\t}", "public int getNumTransactionsInBlock() {\r\n return numTransactionsInBlock;\r\n }", "int getTransactionsCount();", "@java.lang.Override\n public int getTransactionsCount() {\n return transactions_.size();\n }", "public void rollbackNumTransaccion() {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"rollbackNumTransaccion() - start\");\n\t\t}\n\n\t\tnumTrBloqueado = false;\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"rollbackNumTransaccion() - end\");\n\t\t}\n\t}", "@NonNull\n @Override\n public Transaction.Result doTransaction(@NonNull MutableData mutableData) {\n String count = mutableData.getValue(String.class);\n mutableData.setValue(Integer.parseInt(count) - 1 + \"\");\n return Transaction.success(mutableData);\n }", "@java.lang.Override\n public int getTransactionsCount() {\n return instance.getTransactionsCount();\n }", "public void setMaxTransactions(long maxTrans) {\n\t\tif (maxTrans > 0)\n\t\t\tthis.maxTrans = maxTrans;\n\t}", "public int getTransSize(){\n return TxPool_new.size(); \n }", "public void setMaxTransactions(int maxTransactions) {\n\t\tthis.maxTransactions = maxTransactions;\n\t}", "public int getRemaining(){\n\t\treturn count+1;\n\t}", "public long getMaxTransactions() {\n\t\treturn (maxTrans);\n\t}", "public void markUnsold(){\n\n myMaxRejectCountCount--;\n }", "public void honourDesiredCount() {\n int totalDeploymentCount = getDeployments().size();\n// log.info(\"[Total count] \" + totalDeploymentCount + \" [Desired Count] \" + desiredCount);\n\n while (totalDeploymentCount < desiredCount) {\n log.info(\"Scaling UP: REASON -> [Total Count] \" + totalDeploymentCount + \" < [Desired Count] \" +\n desiredCount);\n\n scaleUp(\"honourDesiredCount\");\n totalDeploymentCount = getDeployments().size();\n }\n }", "private int incrementarNumTrans() throws BaseDeDatosExcepcion, ConexionExcepcion {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"incrementarNumTrans() - start\");\n\t\t}\n\n\t\tnumTransaccion++;\n\t\tMediadorBD.actualizarTransaccionCaja(numTransaccion);\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"incrementarNumTrans() - end\");\n\t\t}\n\t\treturn numTransaccion;\n\t}", "int remains();", "public long remainingTime() throws IgniteTxTimeoutCheckedException;", "public boolean commit() {\n\t\tif (blocks.size() <= 1) return false;\n\n\t\tHashMap<String, Integer> pairMap = new HashMap<String, Integer>();\n\t\tHashMap<Integer, Integer> countMap = new HashMap<Integer, Integer>();\n\n\t\tListIterator<Transaction> iterator = blocks.listIterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tTransaction block = iterator.next();\n\t\t\tpairMap.putAll((Map<? extends String, ? extends Integer>) block.getNameValue());\n\t\t}\n\n\t\tfor (Entry<String, Integer> entry : pairMap.entrySet()) {\n\t\t\tInteger value = entry.getValue();\n\t\t\tif(countMap.get(value) == null){\n\t\t\t\tcountMap.put(value, new Integer(1));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcountMap.put(value, new Integer(countMap.get(value) + 1));\n\t\t\t}\n\t\t\tpairMap.put(entry.getKey(),entry.getValue());\n\t\t}\t\t\n\n\t\tblocks = new LinkedList<Transaction>();\n\t\tblocks.add(new Transaction(pairMap, countMap));\n\n\t\treturn true;\n\t}", "public void commitNumTransaccion() throws BaseDeDatosExcepcion, ConexionExcepcion {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"commitNumTransaccion() - start\");\n\t\t}\n\n\t\tif (Sesion.impresoraFiscal && numTrBloqueado) {\n\t\t\tincrementarNumTrans();\n\t\t\tnumTrBloqueado = false;\n\t\t} else {\n\t\t\tif (Sesion.impresoraFiscal) {\n\t\t\t\tlogger\n\t\t\t\t\t\t.error(\n\t\t\t\t\t\t\t\t\"commitNumTransaccion() - Estado ilegal - No se ha bloqueado previamente un número de transacción\",\n\t\t\t\t\t\t\t\tnull);\n\t\t\tthrow new IllegalStateException(\"No se ha bloquedo un número de \" +\n\t\t\t\t\t\t\"transacción\");\n\t\t\t} else {\n\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\tlogger\n\t\t\t\t\t\t\t.error(\"commitNumTransaccion() - Estado ilegal - No hay impresora fiscal en uso\");\n\t\t\t\t}\n\n\t\t\t\tthrow new IllegalStateException(\"Método sólo usado para esquema \" +\n\t\t\t\t\t\t\"de impresora fiscal\");\n\t\t\t}\n\t\t}\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"commitNumTransaccion() - end\");\n\t\t}\n\t}", "public int getAmountDone();", "public void checkTransactions() {\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"Checking {} transaction threads\", registeredThreads.size());\n\t\t}\n\t\tList<Thread> toInterrupt = registeredThreads.entrySet()\n\t\t\t.stream().filter(entry -> {\n\t\t\t\tlong now = System.currentTimeMillis();\n\t\t\t\tlong dur = now - entry.getValue();\n\t\t\t\tlong limit = storageOptions.getTxCommitTimeout();\n\t\t\t\tboolean exceedsLimit = dur > limit;\n\t\t\t\tif (exceedsLimit) {\n\t\t\t\t\tlog.warn(\"Thread {} exceeds time limit of {} with duration {}.\", entry.getKey(), limit, dur);\n\t\t\t\t}\n\t\t\t\treturn exceedsLimit;\n\t\t\t}).map(Map.Entry::getKey)\n\t\t\t.collect(Collectors.toList());\n\n\t\tinterrupt(toInterrupt);\n\t}", "protected short maxRetries() { return 15; }", "public long countAllReserveTransactions() throws MiddlewareQueryException;", "public int getTransactionMaxSize() {\r\n return transactionMaxSize;\r\n }", "int numOfRemainingBlocks() {\n return blocks.size();\n }", "@java.lang.Override\n public int getTransactionStateCount() {\n return transactionState_.size();\n }", "@Override\n\tpublic int deletePendingTransactions(String transactionType) {\n\t\treturn 0;\n\t}", "private void doneUpdate(long transaction) throws RequestIsOutException {\n\t\t\tassert this.lastSentTransaction == null || transaction > this.lastSentTransaction;\n\t\t\t\n\t\t\tthis.sendLock.readLock().unlock();\n\t\t}", "protected abstract boolean reachedContractLimit(int size);", "public void resetTxnCount() {\n txnCount.set(0);\n snapLog.setTotalLogSize(0);\n }", "public void resetNumOfWithdraws() {\n\t\tnumWithdraws = 0;\n\t}", "private void incUsage(int amount) {\n if (amount < 0 && !destroyed) {\n Assert.assertTrue(usageCount - amount >= 0,\n amount + \" cannot be subtracted from usageCount \" + usageCount);\n }\n usageCount += amount;\n }", "public TransactionConcurrency concurrency();", "public int getTransactionStateCount() {\n return transactionState_.size();\n }", "void setTransactionTimeout(int seconds) throws SystemException;", "void ensure(int count);", "@Override\n\tprotected void executeTransaction(int cents) {\n\t}", "private void checkLimit (Connection connection) throws SQLException {\n int checkValeu2 = 2;\n //int checkValeu3 = 3;\n try(ResultSet nrOfInstrumentsRented = checkLimitStmt.executeQuery()){\n while(nrOfInstrumentsRented.next()) {\n System.out.println(\"Count: \" + nrOfInstrumentsRented.getInt(1));\n\n /* //Endast Tester\n if (nrOfInstrumentsRented.getInt(1) == checkValeu2) {\n\n System.out.println(\"Test 1\");\n } else if (nrOfInstrumentsRented.getInt(1) <= checkValeu) {\n System.out.println(\"Test 2\");\n }\n\n */\n\n if(nrOfInstrumentsRented.getInt(1) < checkValeu2){\n System.out.println(\"You have rented \" +\n nrOfInstrumentsRented.getInt(1) + \" instrument(s)\");\n\n rentInstrumentStmt.executeUpdate();\n updateLeaseStmt.executeUpdate();\n System.out.println(\"Instrument has been rented\");\n connection.commit();\n\n } else{\n System.out.println(\"You have already rented 2 instruments\");\n }\n }\n }catch(SQLException e){\n e.printStackTrace();\n connection.rollback();\n }\n }", "@Override\r\n\tpublic int increase() throws Exception {\n\t\treturn 0;\r\n\t}", "public void incrementNumAbandonRequests() {\n this.numAbandonRequests.incrementAndGet();\n }", "@Override\r\n\tpublic void setTransactionTimeout(int seconds) throws SystemException {\r\n\t\trequireTransaction(\"timeout\");\r\n\t}", "private void executeTransaction(ArrayList<Request> transaction) {\n // create a new TransactionMessage\n TransactionMessage tm = new TransactionMessage(transaction);\n //if(tm.getStatementCode(0)!=8&&tm.getStatementCode(0)!=14)\n // return;\n try {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bos);\n oos.writeObject(tm);\n oos.flush();\n\n byte[] data = bos.toByteArray();\n\n byte[] buffer = null;\n long startTime = System.currentTimeMillis();\n buffer = clientShim.execute(data);\n long endTime = System.currentTimeMillis();\n if (reqIndex < maxNoOfRequests && id > 0) {\n System.out.println(\"#req\" + reqIndex + \" \" + startTime + \" \" + endTime + \" \" + id);\n }\n reqIndex++;\n\n father.addTransaction();\n\n // IN THE MEAN TIME THE INTERACTION IS BEING EXECUTED\n\n\t\t\t\t/*\n\t\t\t\t * possible values of r: 0: commit 1: rollback 2: error\n\t\t\t\t */\n int r = ByteBuffer.wrap(buffer).getInt();\n //System.out.println(\"r = \"+r);\n if (r == 0) {\n father.addCommit();\n } else if (r == 1) {\n father.addRollback();\n } else {\n father.addError();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public long countAllWithdrawalTransactions() throws MiddlewareQueryException;", "private void deleteTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n boolean isDebtValid = true;\n if(mDbHelper.getCategory(mTransaction.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n List<Debt> debts = mDbHelper.getAllDebts();\n\n Double repayment = 0.0, borrow = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) { // Repayment\n repayment += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n borrow += debt.getAmount();\n }\n }\n\n if(borrow - mTransaction.getAmount() < repayment) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_delete_invalid));\n }\n }\n\n if(isDebtValid) {\n mDbHelper.deleteTransaction(mTransaction.getId());\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n\n cleanup();\n\n // Return to FragmentListTransaction\n getFragmentManager().popBackStackImmediate();\n LogUtils.logLeaveFunction(Tag);\n }\n }", "@Override\n public void doAfterTransaction(int result) {\n\n }", "@Override\n\tpublic void takeNewOrder() {\n\t\tif(customersInLine.size()>0&&wait==0){\n\t\t\tint customerSelectedIndex = 0;\n\t\t\tfor(int i=0; i<customersInLine.size(); i++){\n\t\t\t\tif(customersInLine.get(i).getTimeToPrepare()<customersInLine.get(customerSelectedIndex).getTimeToPrepare()){\n\t\t\t\t\tcustomerSelectedIndex = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetWait(customersInLine.get(customerSelectedIndex).getTimeToPrepare());\n\t\t\taddToProfit(customersInLine.get(customerSelectedIndex).getCostOfOrder());\n\t\t\tcustomersInLine.remove(customerSelectedIndex);\n\t\t\tcustomersInRestaurant--;\n\t\t}\n\t}", "int remaining();", "Integer backlogCapacity();", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "private int checkItemQuantity() {\n\n int desiredQuantity = initialQuantity;\n MenusItem tempItem = null;\n tempItem = ItemCart.getInstance().checkItem(menusItem);\n\n if(tempItem != null){\n desiredQuantity = tempItem.getDesiredQuantity();\n }\n\n\n return desiredQuantity;\n }", "@Nonnegative\n @CheckReturnValue\n public abstract int getRemainingRequests();", "void processTransaction(String[] transaction) {\n\t\titemsetSets.get(itemsetSets.size() - 1).processTransaction(transaction);\n\t}", "public void executePendingTransactions()\n\t{\n\t\twhile(!transactionQueue.isEmpty())\n\t\t\ttransactionQueue.poll().doTransaction();\n\t}", "public void incrementNumDeleteRequests() {\n this.numDeleteRequests.incrementAndGet();\n }", "public void incDistributedTx() {\n statistics().incInt(numDistributedTx, 1);\n }", "public long getRemainingEstimate() {\n return addedFrontWork.size() + addedBackWork.size();\n }", "public void newTransaction(){\n System.out.println(\"-----new transaction -----\");\n System.out.println(\"--no null value--\");\n List<Integer> idList =new LinkedList<>();\n List<Integer> cntList =new LinkedList<>();\n List<Double> discountList = new LinkedList<>();\n List<Double> actualPrice = new LinkedList<>();\n double totalPrice=0.0;\n System.out.print(\"cashier id: \");\n int cashierid=scanner.nextInt();\n System.out.print(\"store id: \");\n int storeid=scanner.nextInt();\n System.out.print(\"customer id: \");\n int customerid=scanner.nextInt();\n while(true){\n System.out.print(\"product id: \");\n idList.add(scanner.nextInt());\n System.out.print(\"count: \");\n cntList.add(scanner.nextInt());\n\n //support multiple product\n System.out.print(\"type y to continue(others would end): \");\n if(!scanner.next().equals('y')){\n break;\n }\n }\n\n try {\n //begin transaction\n connection.setSavepoint();\n connection.setAutoCommit(false);\n for(int i=0;i<idList.size();i++){\n //Step 1 load discount information\n String sql0=\"select * from onsaleproductions where ProductID=\"+idList.get(i)+\" and ValidDate > now()\";\n try {\n //first insert clubmemer\n result = statement.executeQuery(sql0);\n if(result.next()){\n discountList.add(result.getDouble(\"Discount\"));\n }else{\n discountList.add(1.0);\n }\n } catch (SQLException e) {\n //rollback when failed\n System.out.println(e.getMessage());\n connection.rollback();\n return;\n }\n\n // Step 2 reduce stock & judge whether the product expired or not\n String sql1=\"update merchandise set Quantity=Quantity-\"+cntList.get(i)+\" where ProductID=\"+idList.get(i)+\" and ExpirationDate > now()\";\n try {\n //first insert clubmemer\n int res = statement.executeUpdate(sql1);\n if(res==0){\n System.out.println(\"Transaction failed! No valid product found (may expired)\");\n connection.rollback();\n return;\n }\n } catch (SQLException e) {\n //rollback when failed\n System.out.println(\"Transaction failed! check product stock!\");\n connection.rollback();\n return;\n }\n\n String sql2=\"select * from merchandise where ProductID=\"+idList.get(i);\n try {\n //first insert clubmemer\n result = statement.executeQuery(sql2);\n double mprice=0.0;\n if(result.next()){\n mprice=result.getDouble(\"MarketPrice\");\n }\n actualPrice.add(mprice*discountList.get(i));\n totalPrice+=(cntList.get(i)*actualPrice.get(i));\n } catch (SQLException e) {\n //rollback when failed\n System.out.println(e.getMessage());\n connection.rollback();\n return;\n }\n }\n\n // Step 3 insert transaction record which include general information\n String sql3=\"insert into transactionrecords(cashierid,storeid,totalprice,date,customerid) values(\"+cashierid+\",\"+storeid+\",\"+totalPrice+\",now(), \"+customerid+\")\";\n int tid=0;\n try {\n //first insert clubmemer\n int res = statement.executeUpdate(sql3, Statement.RETURN_GENERATED_KEYS);\n ResultSet generatedKeys = statement.getGeneratedKeys();\n\n if (generatedKeys.next()) {\n //get generatedKeys for insert registration record\n tid=generatedKeys.getInt(\"GENERATED_KEY\");\n }\n } catch (SQLException e) {\n //rollback when failed\n System.out.println(e.getMessage());\n connection.rollback();\n return;\n }\n\n // Step 4 insert transaction contains which include product list\n for(int i=0;i<idList.size();i++){\n String sql4=\"insert into transactionContains(transactionid,productid,count,actualprice) values(\";\n sql4+=tid;\n sql4+=\", \";\n sql4+=idList.get(i);\n sql4+=\", \";\n sql4+=cntList.get(i);\n sql4+=\", \";\n sql4+=actualPrice.get(i);\n sql4+=\")\";\n try {\n //System.out.println(sql);\n int res = statement.executeUpdate(sql4);\n } catch (SQLException e) {\n //rollback when failed\n System.out.println(e.getMessage());\n connection.rollback();\n }\n\n }\n System.out.println(\"Success\");\n connection.commit();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }finally {\n try {\n connection.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }", "public static int count() {\n return postEncryptedPaymentRequestCount;\n }", "long getPersistenceCount();", "public int remaining() {\r\n\t\treturn limit - cursor;\r\n\t}", "public void spendAllMoney() {\n\t\tcurrentBalance = 0;\n\t}", "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 setMaxConcurrentAccessCount(String newValue);", "public boolean checkNewTrans(JsonObject block){\n \tJsonArray transactions = block.get(\"Transactions\").getAsJsonArray();\n \tint N = transactions.size();\n \tfor (int i=0; i<N; i++) {\n \t\tJsonObject Tx = transactions.get(i).getAsJsonObject();\n \t\tif (TxPool_used.contains(Tx))\n \t\t\treturn false;\n }\n return true;\n }", "public int getTxnCount() {\n return txnCount.get();\n }", "public void restoreToCount(int restoreCount) {\n\t\t\n\t}", "@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }", "public boolean remain();", "public int startTransaction();", "public static long waitForConcurrentTransactions(Txn maximum, TxnView userTxn,long tableConglomId) throws IOException {\n byte[] conglomBytes = Bytes.toBytes(Long.toString(tableConglomId));\n\n ActiveTransactionReader transactionReader = new ActiveTransactionReader(0l,maximum.getTxnId(),conglomBytes);\n SConfiguration config = SIDriver.driver().getConfiguration();\n Clock clock = SIDriver.driver().getClock();\n long waitTime = config.getDdlRefreshInterval(); //the initial time to wait\n long maxWait = config.getMaxDdlWait(); // the maximum time to wait\n long scale = 2; //the scale factor for the exponential backoff\n long timeAvailable = maxWait;\n long activeTxnId = -1l;\n do{\n try(Stream<TxnView> activeTxns = transactionReader.getActiveTransactions()){\n TxnView txn;\n while((txn = activeTxns.next())!=null){\n if(!txn.descendsFrom(userTxn)){\n activeTxnId = txn.getTxnId();\n }\n }\n } catch (StreamException e) {\n throw new IOException(e.getCause());\n }\n if(activeTxnId<0) return activeTxnId;\n /*\n * It is possible for a sleep to pick up before the\n * waitTime is expired. Therefore, we measure that actual\n * time spent and use that for our time remaining period\n * instead.\n */\n long start = clock.currentTimeMillis();\n try {\n clock.sleep(waitTime,TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n throw new IOException(e);\n }\n long stop = clock.currentTimeMillis();\n timeAvailable-=(stop-start);\n /*\n * We want to exponentially back off, but only to the limit imposed on us. Once\n * our backoff exceeds that limit, we want to just defer to that limit directly.\n */\n waitTime = Math.min(timeAvailable,scale*waitTime);\n } while(timeAvailable>0);\n\n if (activeTxnId>=0) {\n LOG.warn(String.format(\"Running DDL statement %s. There are transaction still active: %d\", \"operation Running\", activeTxnId));\n }\n return activeTxnId;\n }", "public void HowMuchTimeLeft() {\n\t\tTimeLeft = Count.HowMuchTimeLeft();\n\t}", "int getReaultCount();", "public void testAutoBalanceTransactions(){\n\t\tsetDoubleEntryEnabled(false);\n\t\tmTransactionsDbAdapter.deleteAllRecords();\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(0);\n\t\tString imbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNull();\n\n\t\tvalidateTransactionListDisplayed();\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\t\tonView(withId(R.id.fragment_transaction_form)).check(matches(isDisplayed()));\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Autobalance\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"499\"));\n\n\t\t//no double entry so no split editor\n\t\t//TODO: check that the split drawable is not displayed\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(1);\n\t\tTransaction transaction = mTransactionsDbAdapter.getAllTransactions().get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\t\timbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNotNull();\n\t\tassertThat(imbalanceAcctUID).isNotEmpty();\n\t\tassertTrue(mAccountsDbAdapter.isHiddenAccount(imbalanceAcctUID)); //imbalance account should be hidden in single entry mode\n\n\t\tassertThat(transaction.getSplits()).extracting(\"mAccountUID\").contains(imbalanceAcctUID);\n\n\t}", "public void addNumOfActionTaken() {\n this.numOfActionTaken++;\n }", "@Override\n public int getMaxItemUseDuration(ItemStack par1ItemStack) {\n return 10;\n }", "protected int numberRemainingTickets()\n\t{\n\t\treturn tickets.size();\n\t}", "public void changeQuantity(int difference) {\n\t\tquantity += difference;\n\t\t\n\t\tif (quantity < 0)\n\t\t\tquantity = 0;\n\t}", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "public void changeCostumeLeft(){\n if(costume == 0){\n costume = 3;\n }\n else{\n costume--;\n }\n Locker.updateCostume(costume);\n if (PrefLoader.level3()){\n PrefLoader.updateFile(true,true);\n\n }\n else if (PrefLoader.level2()){\n PrefLoader.updateFile(true,false);\n }\n else{\n PrefLoader.updateFile();\n }\n }", "@Override\n\tpublic int numberOfAccounts() {\n\t\treturn counter;\n\t}", "@Override\n public int cancelTransaction() {\n System.out.println(\"Please make a selection first\");\n return 0;\n }", "@Override\n\tpublic void execute() {\n\t\tboolean cashDispensed=false;\n\t\tdouble availableBalance;\n\t\tBankDatabase bankDatabase=getBankDatabase();\n\t\tScreen screen=getScreen();\n\t\tdo{\n\t\t\tamount=displayMenuOfAmounts();\n\t\t\tif(amount!=CANCELED){\n\t\t\t\tavailableBalance=bankDatabase.getAvailableBalance(getAccountNumber());\n\t\t\t\tif(amount<=availableBalance){\n\t\t\t\t\tif(cashDispenser.issufficientCashAvailable(amount)){\n\t\t\t\t\t\tbankDatabase.debit(getAccountNumber(), amount);\n\t\t\t\t\t\tcashDispenser.dispenseCash(amount);\n\t\t\t\t\t\tcashDispensed=true;\n\t\t\t\t\t\tscreen.displayMessageLine(\"\\nYour cash has been\" + \" dispensed. Please take your cash now.\");\n\t\t\t\t\t}\n\t\t\t\t\telse{//cash dispenser does not have enough cash\n\t\t\t\t\t\tscreen.displayMessageLine(\"\\nInsuffcient cash available in the ATM.\" + \"\\n\\nPlease choose a smaller amount.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{//not enough money available in user's account\n\t\t\t\t\tscreen.displayMessageLine(\"\\n insufficient funds in your account.\" + \"]n\\nPlease choose a smaller amount.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tscreen.displayMessageLine(\"\\nCancelling transaction...\");\n\t\t\t\treturn;//return to main menu, because user cancelled\n\t\t\t}\n\t\t} while(!cashDispensed);\n\t}", "public long countAllUncommittedTransactions() throws MiddlewareQueryException;", "public void setRemainNum(Long remainNum) {\n this.remainNum = remainNum;\n }", "public void setTransactionUIShowMore(boolean flag) {\n SharedPreferences preference=m_context.getSharedPreferences(AppSectionsConstant.Storage.PREFERENCE_CONF_SETTING, Context.MODE_PRIVATE);\n preference.edit().putBoolean(KEY_TRANSACTIONUISHOWMORE, flag).commit();\n refresh();\n }", "public int spend(int amount, boolean destroy) {\n int tvalue = tget();\n if (tvalue >= amount) {\n tvalue -= amount;\n tset(tvalue);\n if (destroy && tvalue == 0) {\n destroy_object(this); // does not inform client.\n }\n return TRUE;\n }\n return FALSE;\n }", "public void setOneNewWanted () {\r\n numWanted ++;\r\n }", "public int getNumLocalTransactions()\n {\n return tx2gtxMap.size();\n }", "public void incrementActiveRequests() \n {\n ++requests;\n }", "public boolean process() {\n\t\t// waits 5 milliseconds(simulates a slow task, such as accessing a remote system)\n\t\ttry {\n\t\t\tThread.sleep(5);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// error every 10 transactions\n\t\tboolean success = id % 10 != 0;\n\t\tlogger.debug(\"Transaction processed: \" + id + \"; Result: \" + success);\n\t\treturn success;\n\t}", "public long getAmountRequested();", "public void setDesiredCount(Integer desiredCount) {\n this.desiredCount = desiredCount;\n }", "int getNewlyAvailableQuestsCount();", "public int increaseDefense () {\n return 3;\n }", "public int getObjectPendingFinalizationCount();", "@Override\n\tpublic void allocateorder(Block block) {\n\t\tint executedQty=(int) block.getQtyExecuted();\n\t\tList<Order> list = new ArrayList<Order>();\n\t\tQuery query = em.createQuery(\"from Order where blockId = :id order by orderDate\");\n\t\tquery.setParameter(\"id\", block.getBlockId());\n\t\tlist = query.getResultList();\n\t\tfor (Order order1 : list) {\n\t\tint q=order1.getQtyPlaced();\n\t\tStatus status = null;\n\t\t\tif((q<= executedQty) && (executedQty>0))\n\t\t\t{\n\t\t\t\tSystem.out.println(em);\n\t\t\t\tSystem.out.println(\"Inside first loop\");\n\t\t\t\tSystem.out.println(q);\n\t\t\t\texecutedQty=executedQty-q;\n\t\t\t\t\n\t\t\t\tQuery query1 = em.createQuery(\"Update Order set qtyExecuted=:qty1, status=:status1 where orderId=:oid\");\n\t\t\t\tquery1.setParameter(\"qty1\",q);\n\t\t\t\tquery1.setParameter(\"status1\",status.Completed.toString());\n\t\t\t\tquery1.setParameter(\"oid\",order1.getOrderId());\n\t\t\t\tSystem.out.println(query1.executeUpdate());\n\t\t\t\tSystem.out.println(executedQty + q);\n\t\t\t\t//query1.executeUpdate();\n\n\t\t\t}\n\t\t\telse if(q>=executedQty && executedQty>0){\n\t\t\t\texecutedQty=q-executedQty;\n\t\t\t\tSystem.out.println(\"Inside second loop\");\n\t\t\t\tQuery query1 = em.createQuery(\"Update Order set qtyExecuted=:qty2, status=:status2 where orderId=:oid\");\n\t\t\t\tquery1.setParameter(\"qty2\",executedQty);\n\t\t\t\tquery1.setParameter(\"status2\", status.PartiallyAllocated.toString());\n\t\t\t\tquery1.setParameter(\"oid\",order1.getOrderId());\n\t\t\t\tSystem.out.println(query1.executeUpdate());\n\t\t\t\t//query1.executeUpdate();\n\t\t\t\texecutedQty=0;\n\t\t\t\tSystem.out.println(executedQty);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tQuery query2 = em.createQuery(\"update Order set status=:status3 where orderId=:oid\");\n\t\t\t\tquery2.setParameter(\"status3\", status.Open.toString());\n\t\t\t\tquery2.setParameter(\"oid\",order1.getOrderId());\n\t\t\t\tSystem.out.println(query2.executeUpdate());\n\t\t\t\t//query2.executeUpdate();\n\t\t\t}}\n\t\tSystem.out.println(\"Inside OrderDAO\");\n\n\t\t\n\t}", "public void commitTransaction() {\n\r\n\t}", "@Override\n public boolean setTransactionTimeout(final int _seconds)\n {\n if (VFSStoreResource.LOG.isDebugEnabled()) {\n VFSStoreResource.LOG.debug(\"setTransactionTimeout (seconds = \" + _seconds + \")\");\n }\n return true;\n }", "Integer getTransactionsPending() {\n\t\tif (transactionMonitor != null) {\n\t\t\treturn transactionMonitor.getPendingTransactions();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "private int adjustAvailability(Uri itemUri, int newCount){\n if(newCount < 0) return 0;\n\n ContentValues values = new ContentValues();\n values.put(ItemEntry.COLUMN_ITEM_QUANTITY, newCount);\n int numRowsUpdated = getContentResolver().update(itemUri,values, null, null);\n\n return numRowsUpdated;\n }" ]
[ "0.7004876", "0.61090535", "0.59448266", "0.5911356", "0.58815545", "0.58524424", "0.57960165", "0.57673115", "0.57622975", "0.5724047", "0.5695612", "0.5625484", "0.5568851", "0.55503196", "0.55117744", "0.55031013", "0.5493455", "0.5473688", "0.54411703", "0.54292434", "0.5417027", "0.5410567", "0.5367629", "0.53437024", "0.532216", "0.5302111", "0.5272813", "0.52692807", "0.5263319", "0.526211", "0.526207", "0.5251394", "0.52323157", "0.52085584", "0.5206301", "0.5201676", "0.51947683", "0.5190503", "0.5190403", "0.5188884", "0.5183883", "0.5161704", "0.51612645", "0.5156435", "0.51474565", "0.51427096", "0.5140449", "0.5132519", "0.51305914", "0.5124434", "0.51238966", "0.5119085", "0.51183933", "0.5114441", "0.5112245", "0.51069564", "0.51034635", "0.5098845", "0.5090026", "0.50899696", "0.50839317", "0.50836676", "0.5082801", "0.5081897", "0.5080672", "0.5067825", "0.50669664", "0.5065005", "0.5057868", "0.5049478", "0.5046582", "0.5041005", "0.503999", "0.50383306", "0.50362724", "0.50343376", "0.5029329", "0.5026505", "0.5022433", "0.50200176", "0.501887", "0.5018036", "0.5016262", "0.501439", "0.50033265", "0.49873933", "0.49685913", "0.49676707", "0.49663213", "0.49633297", "0.4963", "0.4957802", "0.49554634", "0.49544817", "0.49528548", "0.49512753", "0.49505726", "0.4949589", "0.49469262", "0.49466023" ]
0.60032564
2
It returns if the emulation was finished or not.
public boolean isFinished() { return (finished); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean isFinished() {\n //return controller.onTarget();\n return true;\n }", "protected boolean isFinished()\n\t{\n\t\treturn true;\n\t}", "protected boolean isFinished() {\r\n if (state == STATE_SUCCESS) {\r\n // Success\r\n return true;\r\n }\r\n if (state == STATE_FAILURE) {\r\n // Failure\r\n return true;\r\n }\r\n return false;\r\n }", "protected boolean isFinished() {\n return Robot.m_elevator.onTarget();\n }", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn pid.onTarget();\n\t}", "protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}", "protected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn isFinished;\n\t}", "protected boolean isFinished() {\n \t// wait for a time out\n return false;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }", "public boolean isFinished();", "public boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n if (waitForMovement) return (timeSinceInitialized() > Robot.intake.HOPPER_DELAY);\n return true;\n }", "public boolean isFinished(){\n return true;\n }", "protected boolean isFinished() {\r\n\t \treturn (timeSinceInitialized() > .25) && (Math.abs(RobotMap.armarm_talon.getClosedLoopError()) < ARM_END_COMMAND_DIFFERENCE_VALUE); //TODO:\r\n\t }", "protected boolean isFinished() {\n return finished;\n }", "protected boolean isFinished() {\n\t\treturn Robot.oi.ds.isAutonomous();\n\t}", "protected boolean isFinished() {\n return isFinished;\n }", "@Override\n\tpublic boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\r\n\t}", "protected boolean isFinished(){\r\n return true;\r\n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn done; \n\t}", "protected boolean isFinished() {\n \t//ends \n \treturn isTimedOut();\n }", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isFinished() {\n\t\treturn finished;\n\t}", "protected boolean isFinished() {\n\t\treturn Robot.elevator.isInPosition(newPosition, direction);\n\t}", "protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }", "@Override\n\tpublic boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "public final boolean isDone() {\n\t\tboolean result = true;\n\t\tfor (String mdl : executors.keySet()) {\n\t\t\tSubstructureExecutorI exe = executors.get(mdl);\n\t\t\tresult = result && exe.stepIsDone();\n\t\t}\n\t\t// final int matlabWait = 200;\n\t\t// try {\n\t\t// log.debug(\"Waiting to return\");\n\t\t// Thread.sleep(matlabWait);\n\t\t// } catch (InterruptedException e) {\n\t\t// log.debug(\"HEY who woke me up?\");\n\t\t// }\n\t\treturn result;\n\t}", "@Override\r\n\tpublic boolean isFinished() {\n\t\treturn finish;\r\n\t}", "protected boolean isFinished() {\n\treturn this.isDone;\n }", "protected boolean isFinished() {\n //return !RobotMap.TOTE_SWITCH.get();\n \treturn false;\n }", "protected boolean isFinished() {\n return Robot.claw.isRetracted();\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Override\r\n protected boolean isFinished() {\n if (super.isFinished()) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "protected boolean isFinished()\n\t{\n\t\treturn !Robot.oi.respoolWinch.get();\n\t}", "public abstract boolean isFinished ();", "public boolean finished() {\n \t\treturn isFinished;\n \t}", "protected boolean isFinished() {\r\n\treturn false;\r\n }", "@Override\n protected boolean isFinished() {\n return isFinished;\n }", "public boolean wasFinished()\n {\n return this.isFinished;\n }", "public boolean isFinished() {\n return isFinished;\n }", "@Override\n\t\tpublic boolean isFinished() {\n\t\t\treturn false;\n\t\t}", "Boolean isFinished();", "public boolean isFinished() {\n\t\tif (gameSituation == UNFINISHED) {\n\t\t\treturn false;\n\t\t} // Of if\n\n\t\treturn true;\n\t}", "public boolean isFinished() {\n\t\t\n\t\treturn drivetrain.angleReachedTarget();\n\n\t}", "public boolean isFinished () {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return finished;\n }", "@Override\n public boolean isFinished() {\n return true;\n }", "@Override\n\tpublic boolean isFinished() {\n\t\treturn (this.timeRemaining == 0);\n\t}", "protected boolean isFinished() {\n return false;\n \n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "boolean isFinished();", "@Override\n public boolean isFinished() {\n return complete;\n }", "boolean hasFinished();", "@Override\n public boolean isFinished() {\n return isDone;\n }" ]
[ "0.7535193", "0.7477734", "0.74198204", "0.74107337", "0.7404407", "0.7404407", "0.7404407", "0.7397193", "0.73969036", "0.7374253", "0.73593056", "0.7352558", "0.73456484", "0.73456484", "0.73456484", "0.73456484", "0.73456484", "0.73456484", "0.73440915", "0.73192304", "0.731394", "0.73121506", "0.72947544", "0.7279363", "0.7278937", "0.72775656", "0.7263527", "0.724582", "0.72329533", "0.7232648", "0.72314525", "0.7228252", "0.72278327", "0.72278327", "0.72278327", "0.72278327", "0.72278327", "0.72278327", "0.72194934", "0.72175807", "0.72134346", "0.72036713", "0.72012216", "0.720118", "0.7169658", "0.71683747", "0.7166274", "0.7139524", "0.7139524", "0.71354455", "0.7129225", "0.7127416", "0.7112066", "0.70947444", "0.7092021", "0.7091255", "0.70865357", "0.7085707", "0.7084849", "0.7079078", "0.7078578", "0.70700073", "0.7066363", "0.70633686", "0.70612365", "0.705813", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.7057594", "0.70525885", "0.7045976", "0.70440686", "0.7032811" ]
0.704148
99
It defines the status of the emulation as finished or unfinished, otherwise the name of the method is called setFinished. It is used to stop the emulation.
public void setFinished(boolean fin) { finished = fin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDone(){\n this.status = \"Done\";\n }", "public void setFinished(Boolean finished) {\n this.finished = finished;\n }", "protected void setFinished(boolean finished) {\n this.finished = finished;\n }", "public abstract boolean isFinished ();", "protected boolean isFinished(){\r\n return true;\r\n }", "@Override\n\t\tpublic boolean isFinished() {\n\t\t\treturn false;\n\t\t}", "protected boolean isFinished() {\n \tif(Robot.oi.btnIdle.get()) {\n \t\treturn CommandUtils.stateChange(this, new Idle());\n \t}\n\n \tif( Robot.oi.btnShoot.get()) {\n \t\treturn CommandUtils.stateChange(this, new Shooting()); \n \t}\n \t\n \tif(Robot.oi.btnUnjam.get()){\n \t\treturn CommandUtils.stateChange(this, new Unjam());\n \t}\n return false;\n }", "@Override\n protected boolean isFinished() {\n return Robot.m_elevator.isDone();\n }", "@Override\n protected boolean isFinished() {\n return isFinished;\n }", "@Override\n\tpublic boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void eventFinished() {\n\t\tstatus=EventCompleted;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\t\t\n\t}", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n\tpublic void isFinish() {\n\n\t}", "@Override\n\tpublic boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "public void handleSimStatusCompleted() {\n }", "@Override\r\n protected boolean isFinished() {\n return false;\r\n }", "public boolean isFinished () {\n return false;\n }", "public boolean isFinished();", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n boolean isFinished() {\n return false;\n }", "boolean getFinished();", "@Override\n\tprotected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "public boolean isFinished(){\n return true;\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "public void completed(final Status status);", "@Override\n public boolean isFinished() {\n return true;\n }", "@Override\n\tpublic boolean isFinished() {\n\t\treturn true;\n\t}", "@Override\n public boolean isFinished() {\n return controller.atSetpoint();\n }", "@Override\n protected boolean isFinished() {\n return finished;\n }", "@Override\n public void finish() {\n ((MotorController)master).stopMotor();\n }", "@Override\n public boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n //return controller.onTarget();\n return true;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "@Override\n protected boolean isFinished()\n {\n return false;\n }", "@Override\n protected boolean isFinished() \n {\n return false;\n }", "protected boolean isFinished() {\n return false;\n \n }", "protected boolean isFinished() {\r\n\treturn false;\r\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }" ]
[ "0.6624651", "0.64922357", "0.6380831", "0.63795", "0.634028", "0.6311733", "0.63071185", "0.62682736", "0.62667066", "0.62421805", "0.6232335", "0.6226389", "0.62188697", "0.6211576", "0.6211576", "0.6211576", "0.6211576", "0.6211576", "0.6211576", "0.6211576", "0.6211576", "0.6211576", "0.620537", "0.620537", "0.61999667", "0.61999667", "0.61999667", "0.61999667", "0.61999667", "0.61979896", "0.6191035", "0.61910254", "0.61771625", "0.61733794", "0.6169931", "0.6168127", "0.6168127", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6158158", "0.6157625", "0.615374", "0.6152414", "0.61512554", "0.6144509", "0.6144509", "0.6130898", "0.61128956", "0.6110913", "0.61015993", "0.6095538", "0.60924315", "0.6084011", "0.60788727", "0.6074454", "0.6074454", "0.60716796", "0.60716796", "0.6066513", "0.6059595", "0.60378885", "0.60367984", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6034824", "0.6030859", "0.6015125", "0.6015125", "0.6015125", "0.6015125", "0.6015125", "0.6015125", "0.6015125" ]
0.0
-1
It defines the object used as a state transition, which determines the possible steps of the simulation.
public void setStateTransition(StateTransition sb) { this.sb = sb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void step(SimState state) {\r\n\r\n\t}", "public abstract Etat transition();", "public MealyStepByStateSimulator(Automaton automaton) \n {\n super(automaton);\n }", "@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}", "public NewTransitionRecord(){\r\n fromstate = 0;\r\n tostate = 0;\r\n rate = 0.0;\r\n }", "public State() {\n resetTransitions();\n id = next_id++;\n }", "public void setStateOfMovement(int movementState){stateOfMovement = movementState; }", "public interface ScramState {\r\n\t/** Return the Node corresponding to McDiver's location in the graph. */\r\n\tNode currentNode();\r\n\r\n\t/** Return the Node associated with the exit from the sewer system.<br>\r\n\t * McDiver has to move to this Node in order to get out. */\r\n\tNode exit();\r\n\r\n\t/** Return a collection containing all the nodes in the graph.<br>\r\n\t * They are in no particular order. */\r\n\tCollection<Node> allNodes();\r\n\r\n\t/** Change McDiver's location to n.<br>\r\n\t * Throw an IllegalArgumentException if n is not directly connected to<br>\r\n\t * McDiver's location. */\r\n\tvoid moveTo(Node n);\r\n\r\n\t/** Return the steps remaining to get out of the sewer system.<br>\r\n\t * This value will change with every call to moveTo(Node),<br>\r\n\t * and if it reaches 0 before you get out, you have failed to get out. */\r\n\tint stepsToGo();\r\n}", "void nextState();", "void addObjectFlowState(ObjectFlowState objectFlowState);", "public interface IState {\n\n /**\n * Click on button to load a new map from file.\n */\n void btnLoadMap();\n\n /**\n * Click on button to load a new planning from file.\n */\n void btnLoadPlanning();\n\n /**\n * Click on button to compute the best route to make deliveries.\n */\n void btnGenerateRoute();\n\n /**\n * Click on button to cancel a loading action.\n */\n void btnCancel();\n\n /**\n * Click on button to load file.\n *\n * @param file File to load as a map or a planning depending on the state.\n */\n void btnValidateFile(File file);\n\n /**\n * Left click pressed on a delivery.\n */\n void leftClickPressedOnDelivery();\n\n /**\n * Left click released on another delivery.\n *\n * @param sourceDelivery Delivery to switch with target delivery.\n * @param targetDelivery Delivery to switch with sourceDelivery.\n */\n void leftClickReleased(Delivery sourceDelivery, Delivery targetDelivery);\n\n /**\n * Simple click on a delivery.\n *\n * @param delivery The delivery clicked.\n */\n void clickOnDelivery(Delivery delivery);\n\n /**\n * Simple click somewhere else (not a interactive point).\n */\n void clickSomewhereElse();\n\n /**\n * Click on an empty node (not a delivery or warehouse node).\n *\n * @param node The empty node clicked.\n */\n void clickOnEmptyNode(Node node);\n\n /**\n * Click on button to add a new delivery.\n *\n * @param node The node to deliver.\n * @param previousDeliveryNode The node with the previous delivery.\n * @param timeSlot The time slot of the new delivery.\n */\n void btnAddDelivery(Node node, Node previousDeliveryNode, TimeSlot timeSlot);\n\n /**\n * Click on button to remove a delivery.\n *\n * @param delivery The delivery to remove.\n */\n void btnRemoveDelivery(Delivery delivery);\n\n /**\n * Click on a specific node : the warehouse.\n *\n * @param warehouse The warehouse node clicked.\n */\n void clickOnWarehouse(Node warehouse);\n\n /**\n * Click on button to close the current map already loaded.\n */\n void btnCloseMap();\n\n /**\n * Click on button to clear the current planning already loaded.\n */\n void btnClearPlanning();\n\n /**\n * Set the default view for this state (enable/disable buttons ...).\n */\n void initView();\n}", "void setState(SimulationState state) {\n\t\tthis.state = state;\n\t}", "public Agent(StateObservation so, ElapsedCpuTimer elapsedTimer)\n {\n actions = new ArrayList<> ();\n states = new ArrayList<> ();\n success = false;\n step = 0;\n }", "public FSM() {\r\n \t\tstates = new HashMap<String, State>();\r\n \t\ttransitions = new LinkedHashMap<String, Transition>();\r\n \t}", "private Transition(State sourceState) {\r\n \t\t\tthis.sourceState = sourceState;\r\n \t\t\tthis.nextStateInfo = new ArrayList<NextStateInfo>();\r\n \t\t}", "public State (){\n for ( int i = 0 ; i < 5; i ++){\n philosopherNum[i] = i;\n currentState[i] = \"thinking\";\n conditions[i] = mutex.newCondition();\n }\n }", "@Override\n\t\tprotected void doTransition() {\n\t\t\t\n\t\t}", "protected void sequence_Transition(ISerializationContext context, Transition semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public void getState();", "public abstract MachineState getInitialState();", "public interface MonsterStateTransitions {\n //state transitions\n void toVulnerableState();\n void toProtectedState();\n\n //actions\n void init();\n\n}", "public void transitionStates () {\n myCurrentState = myNextState;\n myNextState = null;\n }", "@Override\n protected void incrementStates() {\n\n }", "public void runStateMachine() {\n switch(m_currentState) {\n case PoweringUpState:\n if (this.doPowerUpStuff()) {\n this.setRobotState(RobotState.InitializingDataState);\n }\n break;\n case InitializingDataState:\n\n if (this.initializeData()) {\n // Load some commands for our robot.\n // We could definitely load these from a different file.\n System.out.println(\"-------- Populating Command Queue --------\");\n m_robotQueue.addCommand(new MoveToLocationXY(1.0, 2.0, 2.0));\n m_robotQueue.addCommand(new MoveToLocationXY(-1.0, -2.0, 1.0));\n m_robotQueue.addCommand(new RotateDegrees(180.0, 22.5));\n\n System.out.println(\"\\n-------- Entering Main Robot State --------\");\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n break;\n case IdleWaitingForCommandState:\n if (m_robotQueue.isCommandPending()) {\n\n m_currentCommand = m_robotQueue.getNextCommand();\n\n // m_currentCommand is a generic Object. Let's see what it actually is...\n String commandName = m_currentCommand.getClass().toString();\n System.out.println(\"* Got new command. Processing: \" + commandName);\n\n // Change robot state depending on the type of command we found.\n switch (commandName) {\n // NOTE: This \"class xyz\" text compare is kind of weird,\n // We could probably find a better way.\n case \"class commands.MoveToLocationXY\":\n this.setRobotState(RobotState.MovingToLocationState);\n break;\n case \"class commands.RotateDegrees\":\n this.setRobotState(RobotState.RotatingState);\n break;\n default:\n System.out.println(\"Unrecognized command \" + commandName);\n }\n System.out.println();\n\n } else if (m_currentCommand != null) {\n m_currentCommand = null; // Doing nothing. Clear current command.\n }\n break;\n case MovingToLocationState:\n MoveToLocationXY moveCmd = (MoveToLocationXY) m_currentCommand;\n try {\n if (moveCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case RotatingState:\n RotateDegrees rotateCmd = (RotateDegrees) m_currentCommand; // Cast to correct type.\n try {\n if (rotateCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case SearchingForTargetsState:\n // TODO - implement SearchTarget demo behavior\n break;\n }\n }", "protected void sequence_StateMachine(ISerializationContext context, StateMachine semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public State state();", "public abstract MoveTransition makeMove(Move move);", "StateMachineFactory getStateMachineFactory();", "ControllerState getNewObjectState();", "public CurrentRobotState() {\r\n currentPos = new RobotCoordinates();\r\n motorState = new Motor();\r\n reInitialize();\r\n }", "protected void sequence_StateDep(ISerializationContext context, StateDep semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public int getStateOfMovement(){ return stateOfMovement; }", "public State(){}", "private interface SimulationObserver\n {\n void onChange(SimulationState state);\n }", "public SimpleSateMachine(final @NotNull S initialState)\n {\n super(initialState);\n }", "@Override\n public void init() {\n robot = new MecanumBotHardware(true,true,true,true);\n robot.init(hardwareMap);\n int deg180=845;\n // Create the state machine and configure states.\n smDrive = new StateMachine(this, 16);\n smDrive.addStartState(new WaitState(\"wait\",0.1,\"MainDriveTeleop\"));\n smDrive.addState(new GigabyteTeleopDriveState(\"MainDriveTeleop\", robot));\n smDrive.addState(new SpinPose(\"90DegSpin\",(int)(deg180*0.5),robot,0.1f));\n smDrive.addState(new SpinPose(\"180DegSpin\",deg180,robot,0.1f));\n smDrive.addState(new SpinPose(\"270DegSpin\",(int)(deg180*1.5),robot,0.1f));\n\n smArm = new StateMachine(this, 16);\n smArm.addStartState(new WaitState(\"wait\",0.1,\"MainArmTeleop\"));\n smArm.addState(new GigabyteTeleopArmState(\"MainArmTeleop\", robot));\n smArm.addState(new ShoulderPose(\"Pose1\", robot,0, \"MainArmTeleop\"));//0.12\n smArm.addState(new ShoulderPose(\"Pose2\", robot,1079, \"MainArmTeleop\"));//0.05\n smArm.addState(new ShoulderPose(\"Pose3\", robot,2602, \"MainArmTeleop\"));//-0.17\n smArm.addState(new ShoulderPose(\"Pose4\", robot,3698, \"MainArmTeleop\" ));//-0.35\n // Init the state machine\n smDrive.init();\n smArm.init();\n }", "protected void sequence_State(ISerializationContext context, State semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, TP1_EMPackage.Literals.STATE__NAME) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TP1_EMPackage.Literals.STATE__NAME));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getStateAccess().getNameEStringParserRuleCall_2_0(), semanticObject.getName());\r\n\t\tfeeder.finish();\r\n\t}", "protected SceneGraphObjectState createState( SceneGraphObject obj, Controller control ) {\n\n return control.createState( obj );\n }", "State getTarget();", "public void changeState(int transition) {\n lastState = currentState;\n currentState = nextState[currentState][transition];\n // System.out.println(\" = \" + currentState);\n if (currentState == -2) {\n System.out.println(\"Error [\" + currentState + \"] has occured\");\n terminate();\n }\n else if (currentState == -1) {\n terminate();\n }\n states[currentState].run();\n }", "public IFsm transitionTo(Class<? extends IState> p_newState) throws Exception;", "public void setState(State state) { model.setState(state); }", "public Simulation(SimDescriptor descriptor) {\n this.size = descriptor.getNodes().size();\n ArrayList<ArrayList<Integer>> connections = descriptor.getConnects();\n this.currentStep = 0;\n transition = new double[size][size];\n state = new double[size][size];\n if (size == 0) { \n return;\n }\n for (int i = 0; i < size; i++) {\n ArrayList<Integer> current = connections.get(i);\n if (current.isEmpty()) {\n transition[i][i] = 1.0; //if the node has no out-going connections, it is allowed to transition to itself.\n continue; //this keeps all of the paths inside the network and also avoids a division by zero.\n }\n for (int j : current) {\n transition[j][i] = 1.0 / ((double) current.size());\n }\n }\n state = transition;\n }", "public interface FSM\n{\n /**\n * Get the current state of this FSM.\n */\n public State getState();\n\n /**\n * Perform the action and transition to the next state based on the current state of the FSM and the input.\n */\n public void doIt(Input in);\n}", "Object getState();", "void overrideState(int object_state);", "public State(Machine machine, String name) {\n this.machine = machine;\n this.name = name;\n }", "StepFSM(StepDetector detector) {\n super(\"StepStateful FSM\", new MemoryPersisterImpl<>(getStates(), s0));\n initTransitions();\n this.detector = detector;\n }", "@Override\n\tpublic void step() {\n\t\t\n\t}", "@Override\n\tpublic void step() {\n\t\t\n\t}", "State(int[][] startBoardState, int [][] goalBoardState){\n this.currentBoardState = startBoardState;\n this.goalBoardState = goalBoardState;\n this.g_cost = 0;\n this.parentState = null;\n }", "public NewTransitionRecord(int from, int to, double r) {\r\n fromstate = from;\r\n tostate = to;\r\n rate = r;\r\n }", "@Override\n\tpublic void setState(STATE state) {\n\n\t}", "private void changeState() {\n if (jobs.contains(this.currentFloor)){\n throw new AssertionError(\"Changing state of elevator no \" + ElevatorID + \" on destination floor\");\n }\n\n // empty job set -> going to IDLE state\n if (jobs.size() == 0) {\n this.currentState = IDLE;\n return;\n }\n\n Integer closestFloorDownwards = jobs.floor(this.currentFloor);\n Integer closestFloorUpwards = jobs.ceiling(this.currentFloor);\n\n switch (this.currentState) {\n // if elevator is in idle state then we need to go to the closest job possible\n case IDLE -> {\n Integer closestFloor =\n findClosestFloor(this.currentFloor, closestFloorUpwards, closestFloorDownwards);\n\n if (closestFloor < this.currentFloor) {\n this.currentState = DOWN;\n } else {\n this.currentState = UP;\n }\n }\n case DOWN -> {\n if (closestFloorDownwards != null) { // if there exists a predecessor in `jobs`\n this.currentState = DOWN; // let's continue going down\n } else {\n this.currentState = UP; // otherwise we need to go up\n }\n }\n case UP -> {\n if (closestFloorUpwards != null) { // if there exists a successor in `jobs`\n this.currentState = UP; // let's continue going up\n } else {\n this.currentState = DOWN; // otherwise we need to go down\n }\n }\n }\n }", "@Override\n public Map<String, Object> currentState() {\n\n return new HashMap<>();\n }", "public Transition(State initialState, State finalState, Event event){\n\t\t\tthis.initialState = initialState;\n\t\t\tthis.finalState = finalState;\n\t\t\tthis.event = event;\n\t\t}", "public static POMDPState sampleInitialStates(Domain d) {\n\t\tPOMDPState s = new POMDPState();\n\n\t\t//Retrieve object classes from the domain.\n\t\tObjectClass containerClass = d.getObjectClass(Names.CLASS_CONTAINER);\n\t\tObjectClass babyClass = d.getObjectClass(Names.CLASS_BABY);\n\t\tObjectClass contentClass = d.getObjectClass(Names.CLASS_CONTENT);\n\t\tObjectClass humanClass = d.getObjectClass(Names.CLASS_HUMAN);\n\n\t\t//Create all the objects \n\t\tObjectInstance caregiver = new ObjectInstance(humanClass, Names.OBJ_CAREGIVER);\n\t\tObjectInstance baby = new ObjectInstance(babyClass, Names.OBJ_BABY);\n\t\tObjectInstance ointment = new ObjectInstance(contentClass, Names.OBJ_OINTMENT);\n\t\tObjectInstance oldClothes = new ObjectInstance(contentClass, Names.OBJ_OLD_CLOTHES);\n\t\tObjectInstance newClothes = new ObjectInstance(contentClass, Names.OBJ_NEW_CLOTHES);\n\t\tObjectInstance changingTable = new ObjectInstance(containerClass, Names.OBJ_CHANGING_TABLE);\n\t ObjectInstance hamper = new ObjectInstance(containerClass, Names.OBJ_HAMPER);\n\t\tObjectInstance sideTable = new ObjectInstance(containerClass, Names.OBJ_SIDE_TABLE);\n\t ObjectInstance dresser = new ObjectInstance(containerClass, Names.OBJ_DRESSER);\n\n\t\t//Set the \tproper values for objects' attributes\n\t\tchangingTable.setValue(Names.ATTR_OPEN, 1);\n\t hamper.setValue(Names.ATTR_OPEN, 1);\n\t\tsideTable.setValue(Names.ATTR_OPEN, 1);\n\t\tdresser.setValue(Names.ATTR_OPEN, 0);\n\t\tbaby.setValue(Names.ATTR_RASH, new java.util.Random().nextBoolean() ? 1 : 0);\n\n\t\t//Place contents in the proper initial container\n\t\tplaceObject(newClothes, dresser);\n\t\tplaceObject(oldClothes, changingTable);\n\t\tplaceObject(ointment, sideTable);\n\n\t\t//Add objects to the state, and have the caregiver decide on its mental state\n\t\taddObjects(s, caregiver, baby, oldClothes, newClothes, changingTable, hamper, sideTable, dresser, ointment);\n\t\tcaregiverThink(d, s);\n\n\t\t//Et voila\n\t\treturn s;\n\t}", "void start() {\n \tm_e.step(); // 1, 3\n }", "public interface AbstractState {\r\n abstract void toNextState(ChessBoard chessBoard,AbstractState state);\r\n}", "public abstract ExplicitMachineState convertToExplicitMachineState(MachineState state);", "@Test\n public void testStateTransitions1()\n { \n assertTrue(theEngine.inStartingState());\n \n //Starting -> Halted\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inStartingState());\n\n //Starting -> Player died\n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inStartingState());\n \n //Starting -> Player won\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inStartingState());\n \n theEngine.start();\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n \n //Halted -> Starting\n //impossible through code\n\n //Halted -> Player died\n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n\n //Halted -> Player won\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n\n theEngine.start();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inPlayingState());\n \n //Playing -> Starting\n //impossible by code\n \n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inDiedState());\n \n //Player died -> Halted\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inDiedState());\n \n //Player died -> Player won\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inDiedState());\n \n //Undo from player died state\n theEngine.undoLastMove();\n //this didn't throw assertion error, so this is fine\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n }", "@Override\n\tpublic void onTransition(final TransitionTarget fromState, final TransitionTarget toState, final Transition aTransition) {\n\t\t\n\t\tList<Action> actionList = aTransition.getActions();\n\t\tArrayList<Assign> assignList = new ArrayList<Assign>();\n\t\tfor (Action a : actionList){\n\t\t\tif(a.getClass().toString().equals(\"class org.apache.commons.scxml.model.Assign\")){\n\t\t\t\tassignList.add((Assign)a);\n\t\t\t}\n\t\t}\n\t\tfor (Assign anAssign : assignList) {\n\t\t\tString aVariableName = anAssign.getName();\n\t\t\t// at run time the value returned from the engine is a Long (which cannot be cast to String)\n\t\t\t// but at compile time it is just an Object, hence the need of declaring a cast to Long and using conversion\n\t\t\tString aVariableValue;\n\t\t\tif(myASM.getEngine().getRootContext().get(aVariableName).getClass().toString().equals(\"class java.lang.String\")){\n\t\t\t\taVariableValue = (String)myASM.getEngine().getRootContext().get(aVariableName);\n\t\t\t}else{\n\t\t\t\taVariableValue = Long.toString((Long)myASM.getEngine().getRootContext().get(aVariableName));\n\t\t\t}\n\t\t\tvariableFields.get(aVariableName).setText(aVariableValue);\n\t\t}\n\t\tstatechartTraceAppend(\"Transition from state: \" + fromState.getId() + \" to state: \" + toState.getId() + \"\\n\");\n\t\t/* enable JButtons for all transitions in those states in the current configuration without the fromStates and plus the toStates\n\t\t * TODO: implement explicit cast from Set to Set<TransitionTarget>\n\t\tSet<TransitionTarget> relevantStates = myASM.getEngine().getCurrentStatus().getAllStates();\n\t\trelevantStates.remove(fromState);\n\t\trelevantStates.add(toState);\n\t\tfor (TransitionTarget aState : relevantStates) {\n\t\t\tenableButtonsForTransitionsOf(aState);\n\t\t} */\n\t}", "public interface State {\n void enter(Unit unit, InputHandler input);\n State handleInput(Unit unit, InputHandler input);\n void update(Unit unit, float delta);\n void exit(Unit unit, InputHandler input);\n}", "public void setJumpState(int n)\n{\n jumpState=n;\n}", "@Override\n\tpublic void step() {\n\t}", "@Override\n\tpublic void step() {\n\t}", "public NewTransitionRecord(int from, int to, double r, int t) {\r\n fromstate = from;\r\n tostate = to;\r\n rate = r;\r\n transition = t;\r\n }", "void mo15871a(StateT statet);", "Transition createTransition();", "Transition createTransition();", "public FSMTransition(String name, String className)\n\t{\n\t\tsuper(name, className);\n\t}", "private void generateSteps() {\n for (GlobalState g : this.globalStates) {\n List<String> faults = g.getPendingFaults(); \n if(faults.isEmpty()) {\n // Identifying all available operation transitions (when there \n // are no faults), and adding them as steps\n List<String> gSatisfiableReqs = g.getSatisfiableReqs();\n \n for(Node n : nodes) {\n String nName = n.getName();\n String nState = g.getStateOf(nName);\n List<Transition> nTau = n.getProtocol().getTau().get(nState);\n for(Transition t : nTau) {\n boolean firable = true;\n for(String req : t.getRequirements()) {\n if(!(gSatisfiableReqs.contains(n.getName() + \"/\" + req)))\n firable = false;\n }\n if(firable) {\n // Creating a new mapping for the actual state of n\n Map<String,String> nextMapping = new HashMap();\n nextMapping.putAll(g.getMapping());\n nextMapping.put(nName, t.getTargetState());\n // Searching the ref to the corresponding global \n // state in the list globalStates\n GlobalState next = search(nextMapping);\n // Adding the step to list of steps in g\n g.addStep(new Step(nName,t.getOperation(),next));\n }\n }\n }\n } else {\n // Identifying all settling handlers for handling the faults\n // pending in this global state\n for(Node n: nodes) {\n // Computing the \"targetState\" of the settling handler for n\n String targetState = null;\n \n String nName = n.getName();\n String nState = g.getStateOf(nName);\n Map<String,List<String>> nRho = n.getProtocol().getRho();\n \n List<String> nFaults = new ArrayList();\n for(String req : nRho.get(nState)) {\n if(faults.contains(nName + \"/\" + req)) \n nFaults.add(req);\n }\n\n // TODO : Assuming handlers to be complete \n\n if(nFaults.size() > 0) {\n Map<String,List<String>> nPhi = n.getProtocol().getPhi();\n for(String handlingState : nPhi.get(nState)) {\n // Check if handling state is handling all faults\n boolean handles = true;\n for(String req : nRho.get(handlingState)) {\n if(nFaults.contains(req))\n handles = false;\n }\n\n // TODO : Assuming handlers to be race-free\n\n // Updating targetState (if the handlingState is \n // assuming a bigger set of requirements)\n if(handles) {\n if(targetState == null || nRho.get(handlingState).size() > nRho.get(targetState).size())\n targetState = handlingState;\n }\n }\n // Creating a new mapping for the actual state of n\n Map<String,String> nextMapping = new HashMap();\n nextMapping.putAll(g.getMapping());\n nextMapping.put(nName, targetState);\n // Searching the ref to the corresponding global \n // state in the list globalStates\n GlobalState next = search(nextMapping);\n // Adding the step to list of steps in g\n g.addStep(new Step(nName,next));\n }\n }\n }\n }\n }", "@Override\n\tpublic void \t\t\t\t\t\tuserDefinedInternalTransition (\n\t\t\t\t\t\t\t\tDuration elapsedTime)\n\t{\n\t\tDuration d1 = new Duration (\n\t\t\t\tthis.interDayDelay , \n\t\t\t\tthis.getSimulatedTimeUnit()\n\t\t\t) ; \n\t\t\n\t\tassert d1 != null ;\n\t\t\n\t\tTime t = this.getCurrentStateTime().add(d1) ; \n\t\tdouble dur = 2.0 * this.meanRunDuration * this.rg.nextBeta(1.75, 1.75) ; \n\t\tdouble temp = 2.0 * this.meanTemperature * this.rg.nextBeta(1.75, 1.75) ; \n\t\t// impossible to set temperature more than MAX_TEMPERATURE\n\t\ttemp = (temp > OvenModel.MAX_TEMPERATURE)?OvenModel.MAX_TEMPERATURE:temp ;\n\t\tthis.scheduleEvent(new RunOven(t, dur , temp));\n\t}", "public void step();", "public void step();", "public interface RoboticState {\r\n\t\r\n\tpublic void walk();\r\n\tpublic void cook();\r\n\tpublic void off();\r\n\r\n}", "InternalState(final IObjectiveState s) {\r\n super();\r\n this.m_state = s;\r\n }", "private ModalityState(int value) { this.value = value; }", "private void enterSequence_mainRegion_State1_default() {\n\t\tnextStateIndex = 0;\n\t\tstateVector[0] = State.mainRegion_State1;\n\t}", "public abstract void nextAnimationStep();", "LabState state();", "void setState(Object state);", "private static List<State<StepStateful>> getStates() {\n List<State<StepStateful>> states = new LinkedList<>();\n states.add(s0);\n states.add(s1);\n states.add(s2);\n states.add(s3);\n states.add(s4);\n states.add(s5);\n states.add(s6);\n return states;\n }", "protected abstract int newState();", "public abstract State getSourceState ();", "public interface State {\r\n\r\n}", "@Override public void setTime(UpodWorld w)\n{\n StateRepr sr = getState(w);\n sr.checkAgain(0);\n}", "public void enterHatchingState() {\n\n\t}", "public Simulator() {\n\t\t// create event chain\n\t\tec = new SortableQueue();\n\t\tsims = new SimulationStudy(this);\n\t\tstate = new SimulationState(sims);\n\t\t// push the first customer arrival at t = 0\n\t\tpushNewEvent(new CustomerArrivalEvent(state, 0));\n\t\t// push the termination event at the simulationTime (max duration of simulation)\n\t\tpushNewEvent(new SimulationTerminationEvent(sims.simulationTime));\n\t}", "@Override\n protected void initialize() {\n System.out.println(\"initializing claw state machine\");\n }", "public WorldState ()\n\t{\n\t\tproperties = new HashMap<String, WorldStateProperty>();\n\t}", "public InstructionsState(int stateID){\r\n\t\tthis.stateID = stateID;\r\n\t}", "public boolean transition() {\n current = new State(ts++, hopper); \n if (terminus.isTerminus(current)) {\n return false;\n } else {\n hopper.sendBall(oneMinute);\n return true;\n }\n }", "@Test\n public void stateTransitionsTest() throws ApiException {\n Long loanId = null;\n PostSelfLoansLoanIdRequest body = null;\n String command = null;\n PostSelfLoansLoanIdResponse response = api.stateTransitions(loanId, body, command);\n\n // TODO: test validations\n }", "private void initTransitions() {\n s0.addTransition(htThr, s1, startStep);\n\n s1.addTransition(htPosPeekThr, s2, null);\n s1.addTransition(ltThr, s4, null);\n\n s2.addTransition(ltNegPeekThr, s3, null);\n\n s3.addTransition(htNegPeekThr, s5, null);\n\n s4.addTransition(ltThr, s0, null);\n s4.addTransition(htThr, s1, null);\n\n s5.addTransition(ltNegPeekThr, s3, null);\n s5.addTransition(htNegThr, s6, endStep);\n\n s6.addTransition(ltThr, s0, null);\n }", "void create( State state );", "public void advanceSimulation () {\n\t\tstep_++;\n\t}", "public interface ActionStateClass extends javax.jmi.reflect.RefClass {\n /**\n * The default factory operation used to create an instance object.\n * @return The created instance object.\n */\n public ActionState createActionState();\n /**\n * Creates an instance object having attributes initialized by the passed \n * values.\n * @param name \n * @param visibility \n * @param isSpecification \n * @param isDynamic \n * @param dynamicArguments \n * @param dynamicMultiplicity \n * @return The created instance object.\n */\n public ActionState createActionState(java.lang.String name, org.omg.uml.foundation.datatypes.VisibilityKind visibility, boolean isSpecification, boolean isDynamic, org.omg.uml.foundation.datatypes.ArgListsExpression dynamicArguments, org.omg.uml.foundation.datatypes.Multiplicity dynamicMultiplicity);\n}", "public State(GameStateManager gameStateManager){ //constructor\n this.gameStateManager = gameStateManager;\n camera = new OrthographicCamera();\n mouse = new Vector3();\n }", "public interface IState \n{\n\t/**\n\t * Gets the state\n\t * \n\t * @pre none\n\t * @post returns the state as defined in the shared definitions\n\t */\n\tpublic shared.definitions.TurnStatus getState();\n\t\n\t/**\n\t * Advances to the next state in the turn \n\t * \n\t * @pre the player is finished with all required actions in this state\n\t * @post the state is advanced to the next state\n\t * \n\t */\n\tpublic void finishPhase(TurnTracker turn_tracker_pointer, int player_index);\n\t\n\t/**\n\t * Forces this player into the Discarding State\n\t * @throws Exception \n\t * \n\t * @pre the player is in the Waiting or Rolling State\n\t * @post the player is in the Discarding state\n\t */\n\tpublic void forceDiscard(TurnTracker turn_tracker_pointer, int player_index) throws Exception;\n}", "@Override\r\n public IObjectiveState createState(final Serializable staticState) {\r\n return new InternalState(this.m_func.createState(staticState));\r\n }" ]
[ "0.6939668", "0.67329204", "0.66956973", "0.6490462", "0.6487662", "0.6464844", "0.6396462", "0.63816416", "0.6303002", "0.6287097", "0.6263465", "0.6182693", "0.61738646", "0.6173711", "0.61698383", "0.6158739", "0.6155588", "0.6134071", "0.60982066", "0.6090418", "0.60670954", "0.6053404", "0.6046027", "0.604217", "0.6040007", "0.60262954", "0.5978775", "0.59761196", "0.59567916", "0.59377366", "0.5929213", "0.5927195", "0.59123147", "0.5910641", "0.5894632", "0.58901316", "0.5874419", "0.5874304", "0.58618873", "0.5853978", "0.5850671", "0.5850003", "0.5838759", "0.5837595", "0.58361155", "0.58229625", "0.5818114", "0.58178043", "0.5815031", "0.5815031", "0.5800761", "0.57928723", "0.57601047", "0.5757874", "0.5757183", "0.57558227", "0.5738768", "0.5735961", "0.57304883", "0.57303953", "0.5730053", "0.5724964", "0.5714006", "0.57106537", "0.5709309", "0.5709309", "0.5706138", "0.57060623", "0.57014126", "0.57014126", "0.56971025", "0.5695493", "0.56940967", "0.5687666", "0.5687666", "0.5679342", "0.5661126", "0.5660835", "0.5660344", "0.56376535", "0.56364965", "0.56303954", "0.56271756", "0.56240535", "0.56235194", "0.56234765", "0.5613597", "0.56127274", "0.5599156", "0.55984163", "0.5590151", "0.5588179", "0.55869806", "0.5576857", "0.5574855", "0.5574548", "0.5571422", "0.5569668", "0.5568974", "0.55659705", "0.5564931" ]
0.0
-1
It returns the object used as a state transition, which determines the possible steps of the simulation.
public StateTransition getStateTransition() { return (sb); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Etat transition();", "StateMachineFactory getStateMachineFactory();", "public SimulationState getState() {\n\t\treturn state;\n\t}", "public abstract MachineState getInitialState();", "public interface ScramState {\r\n\t/** Return the Node corresponding to McDiver's location in the graph. */\r\n\tNode currentNode();\r\n\r\n\t/** Return the Node associated with the exit from the sewer system.<br>\r\n\t * McDiver has to move to this Node in order to get out. */\r\n\tNode exit();\r\n\r\n\t/** Return a collection containing all the nodes in the graph.<br>\r\n\t * They are in no particular order. */\r\n\tCollection<Node> allNodes();\r\n\r\n\t/** Change McDiver's location to n.<br>\r\n\t * Throw an IllegalArgumentException if n is not directly connected to<br>\r\n\t * McDiver's location. */\r\n\tvoid moveTo(Node n);\r\n\r\n\t/** Return the steps remaining to get out of the sewer system.<br>\r\n\t * This value will change with every call to moveTo(Node),<br>\r\n\t * and if it reaches 0 before you get out, you have failed to get out. */\r\n\tint stepsToGo();\r\n}", "public State state();", "Object getState();", "void nextState();", "private static List<State<StepStateful>> getStates() {\n List<State<StepStateful>> states = new LinkedList<>();\n states.add(s0);\n states.add(s1);\n states.add(s2);\n states.add(s3);\n states.add(s4);\n states.add(s5);\n states.add(s6);\n return states;\n }", "public int getStateOfMovement(){ return stateOfMovement; }", "public abstract MoveTransition makeMove(Move move);", "@Override\r\n\tpublic void step(SimState state) {\r\n\r\n\t}", "State getTarget();", "State getState();", "State getState();", "State getState();", "State getState();", "public State getState(Action action) { \n\t\tState newstate = new State(getTractor(), getK(), getMax(), getRows(), getColumns());\n\t\tfor (int i = 0; i < getRows(); i++) {\n\t\t\tfor (int j = 0; j < getColumns(); j++) {\n\t\t\t\tnewstate.cells[i][j] = new Square(i, j, cells[i][j].getSand()); \n\t\t\t}\n\t\t} \n\t\tnewstate.getSquare(newstate.getTractor()).setSand(newstate.getSquare(newstate.getTractor()).getSand()-action.distributedAmount());\n\t\tnewstate.tractor=(Square) action.getMovement();\n\t\tSquare[] adjacents = action.getAdjacents();\n\t\tint[] values = action.getValues();\n\n\t\tfor (int i = 0; i < adjacents.length; i++) {\n\t\t\tnewstate.getSquare(adjacents[i]).setSand(newstate.getSquare(adjacents[i]).getSand()+values[i]);\n\t\t}\n\t\treturn newstate;\n\t}", "public abstract State getSourceState ();", "public Sim sim()\n { if(!this.isEmptyStepList()) //non-empty StepList the weight is not 0\n { double lwb=increase()/weight();\n double upb=1-decrease()/weight();\n //System.out.println(\"weight()=\"+weight());\n //System.out.println(\"[\"+lwb+\",\"+upb+\"]\");\n return new Sim(lwb, upb);\n }\n else return new Sim(0.0,0.0);\n }", "public S getState() {\n return currentState;\n }", "public IFsm transitionTo(Class<? extends IState> p_newState) throws Exception;", "public State getState();", "public State getState();", "public double getTransition(){\n\t\treturn transition;\n\t}", "@Override\n public Map<String, Object> currentState() {\n\n return new HashMap<>();\n }", "public State next () { return nextState(); }", "public TaskState getNewTaskState(){\n\n TaskState newState = new TaskState();\n\n newState.graph = new DescGraph();\n newState.moveStack = new Stack<>();\n newState.hasSolution = false;\n newState.isNew = true;\n\n newState.moveStack.push(\n new HorseMove(newState.graph.getFirst())\n );\n\n return newState;\n\n }", "public abstract State getDestinationState ();", "public abstract ExplicitMachineState convertToExplicitMachineState(MachineState state);", "public State() {\n resetTransitions();\n id = next_id++;\n }", "@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}", "public native final Transition transition()/*-{\n\t\treturn this.transition();\n\t}-*/;", "public FiniteStateMachine getFiniteStateMachine() {\n return stateMachine;\n }", "StateT getState();", "public IRStateMachine getStateMachine()\n\t\tthrows OculusException;", "public IState getState();", "ControllerState getNewObjectState();", "public State getState(){return this.state;}", "ESMFState getState();", "default State<Problem> getGoalState() {\n throw new UnsupportedOperationException(\"getGoalState is not supported in: \" + this.getClass());\n }", "Object GetMove (Object game_state);", "@Nullable\n @Override\n public MealyTransition<State<I, S>, O> getTransition(@Nonnull State<I, S> currentState, @Nullable I input) {\n if (input == null) {\n return null;\n }\n if (!this.isValidSPMM()) {\n return initialProcedure.globalErrorTransition;\n\n } else if (initialProcedure.containsState(currentState)) {\n if (initialProcedure.initialState.equals(currentState)) {\n if (initialProcedure.callSymbol.equals(input)) {\n final MealyMachine<S, I, ?, O> calledMM = this.procedures.get(input);\n\n final S nextState = calledMM.getInitialState();\n final Stack<State<I, S>> stack = new Stack<>();\n stack.add(initialProcedure.initialState);\n\n return new MealyTransition<>(\n new State<>(initialProcedure.callSymbol, nextState, stack),\n outputAlphabet.getProcedureStart());\n }\n }\n return initialProcedure.globalErrorTransition;\n\n\n // current state is NOT a state of initial procedure\n } else {\n if (inputAlphabet.isInternalSymbol(input)) {\n return getTransitionInsideProcedure(currentState, input);\n\n } else if (inputAlphabet.isCallSymbol(input)) {\n return getTransitionProcedureCall(currentState, input);\n\n } else if (inputAlphabet.isReturnSymbol(input)) {\n return getTransitionProcedureReturn(currentState, input);\n }\n }\n\n //return initialProcedure.globalErrorTransition;\n throw new IllegalStateException(\"could not find transition for given state and input\");\n }", "public State getState() { return model.getState(); }", "State getInitialState( int nIdWorkflow );", "public MealyStepByStateSimulator(Automaton automaton) \n {\n super(automaton);\n }", "public States transition(Alphabet sym) {\n return transitions.get(new Pair<>(currentState, sym));\n }", "public TurnState step() {\n ReadOnlyHistory history = board.viewHistory();\n \n if (!isGameOver) {\n Player next = nextPlayer();\n Move move = null;\n \n try {\n final long startTime = System.currentTimeMillis();\n move = next.play(history);\n next.addTime(System.currentTimeMillis() - startTime);\n \n if (next.getTime() >= timeLimit || !board.isValid(move)){\n isGameOver = true;\n }\n else {\n board.set(move);\n }\n }\n catch (IllegalArgumentException ex) {\n System.err.println(\"Player \" + next.getName() + \": \" + ex.getMessage());\n isGameOver = true;\n }\n catch (ArrayIndexOutOfBoundsException ex) {\n System.err.println(\"Player \" + next.getName() + \": \" + ex.getMessage());\n isGameOver = true;\n }\n \n return new TurnState(next, move, isGameOver);\n }\n else {\n return new TurnState(null, null, true);\n }\n }", "private State getState()\n {\n return state;\n }", "public NewTransitionRecord(){\r\n fromstate = 0;\r\n tostate = 0;\r\n rate = 0.0;\r\n }", "private MealyTransition<State<I, S>, O> getTransitionInsideProcedure(State<I, S> currentState, I input) {\n\n // get proper MM by known call symbol as identifier outputAlphabet.getInitError());\n final I identifier = currentState.getFirst();\n final MealyMachine<S, I, ?, O> currentMM = this.procedures.get(identifier);\n\n // in the model of current MM find proper next state\n final O output = currentMM.getOutput(currentState.getSecond(), input);\n final S nextState = currentMM.getSuccessor(currentState.getSecond(), input);\n\n // same stack because no procedure call\n return new MealyTransition<>(new State<>(identifier, nextState, currentState.getStack()),\n output);\n\n }", "public S getRandomState();", "T transformToAndValidateInitialState(VendingMachine vendingMachine);", "protected S state() {\n return state;\n }", "@Override\n public Object getSimulationState()\n {\n if (outputStateVariables == null)\n {\n System.out.println(\"Output State vars is null!!\");\n\n return null;\n }\n\n double[] ret = new double[outputStateVariables.length];\n\n for (int i = 0; i < ret.length; i++)\n {\n YoVariable var = outputStateVariables[i];\n if (var != null)\n ret[i] = outputStateVariables[i].getValueAsDouble();\n else\n ret[i] = 0.0;\n }\n\n return ret;\n }", "public List<String> getSequentialPlan() {\n // ==========================================\n // Computing the (cheapest) sequence of steps\n // ==========================================\n \n // Maps of steps and cost from the global state s to the others\n Map<GlobalState,List<Step>> steps = new HashMap();\n steps.put(current,new ArrayList());\n Map<GlobalState,Integer> costs = new HashMap();\n costs.put(current,0);\n // List of visited states\n List<GlobalState> visited = new ArrayList();\n visited.add(current);\n\n // List of global states still to be visited\n List<GlobalState> toBeVisited = new ArrayList();\n \n // Adding the states reachable from start to \"toBeVisited\"\n for(Step step : current.getSteps()) {\n GlobalState next = step.getNextGlobalState();\n // Adding the sequence of operations towards \"next\" \n List<Step> stepSeq = new ArrayList();\n stepSeq.add(step);\n steps.put(next,stepSeq);\n // Adding the cost of the sequence of operation towards \"next\"\n costs.put(next,step.getCost());\n toBeVisited.add(next);\n }\n \n // Exploring the graph of global states by exploiting \"toBeVisited\"\n while(toBeVisited.size() > 0) {\n // Removing the first global state to be visited and marking it\n // as visited\n GlobalState current = toBeVisited.remove(0);\n visited.add(current);\n \n for(Step step : current.getSteps()) {\n GlobalState next = step.getNextGlobalState();\n // Adding the sequence of operations from \"start\" to \"next\"\n // (if more convenient)\n int nextCost = costs.get(current) + step.getCost();\n if(visited.contains(next)) {\n // If current path is cheaper, updates \"steps\" and \"costs\"\n if(costs.get(next) > nextCost) {\n List<Step> stepSeq = new ArrayList();\n stepSeq.addAll(steps.get(current));\n stepSeq.add(step);\n steps.put(next,stepSeq);\n costs.put(next,nextCost);\n }\n } else {\n List<Step> stepSeq = new ArrayList();\n stepSeq.addAll(steps.get(current));\n stepSeq.add(step);\n steps.put(next,stepSeq);\n costs.put(next, nextCost);\n if(!(toBeVisited.contains(next))) toBeVisited.add(next);\n }\n }\n }\n \n // ====================================================\n // Computing the sequence of operations from \"s\" to \"t\"\n // ====================================================\n // If no plan is available, return null\n if(steps.get(target) == null) \n return null;\n // Otherwise, return the corresponding sequence of operations\n List<String> opSequence = new ArrayList();\n for(Step step : steps.get(target)) {\n if(!(step.getReason().contains(Step.handling))) {\n opSequence.add(step.getReason());\n }\n }\n return opSequence;\n }", "public interface FSM\n{\n /**\n * Get the current state of this FSM.\n */\n public State getState();\n\n /**\n * Perform the action and transition to the next state based on the current state of the FSM and the input.\n */\n public void doIt(Input in);\n}", "public double[] getState(){\n if (AgentType.Abstraction == SimpleExperiment.activeAgentType) {\n // Abstraction agent type\n return this.getCustomState();\n }\n else {\n // System.out.println(\"E[\" + marioEgoPos[0] + \",\" + marioEgoPos[1] + \"] F[\" + marioFloatPos[0] + \",\" + marioFloatPos[1] + \"]\");\n\n // other agent type\n double[] state = new double[10];\n\n // CLOSEST TWO ENEMIES\n state[0] = isMarioAbleToJump ? 1 : 0;\n state[1] = isMarioOnGround ? 1 : 0;\n state[2] = isMarioAbleToShoot ? 1 : 0;//marioMode;//\n float xdiff = marioFloatPos[0] - prevMarioPos[0];\n float ydiff = marioFloatPos[1] - prevMarioPos[1];\n state[3] = xdiff < 0 ? 0 : (xdiff == 0 ? 1 : 2);\n state[3] += 3*(ydiff < 0 ? 0 : (ydiff == 0 ? 1 : 2));\n\n state[4] = enemies(1, 0);\n state[5] = enemies(3, 1);\n state[6] = 0;//enemies(5, 3);\n\n state[7] = obstacle();\n\n int[] enemy = closestEnemy();\n if(Math.abs(enemy[0]) < 11 && Math.abs(enemy[1]) < 11){\n state[8] = enemy[0]+10;\n state[9] = enemy[1]+10;\n } else {\n state[8] = 21;\n state[9] = 21;\n }\n\n //state[10] = marioFloatPos[0];\n //state[11] = marioFloatPos[1];\n\n return state;\n }\n }", "public interface SimulationInspector extends SimulationRunner<SimulationInspector> {\n /**\n * Checks if the simulation has terminated.\n *\n * @return <code>true</code> if the simulation has terminated\n */\n boolean isTerminated();\n\n /**\n * Perform some assertion over current game state or perform some state transformations.\n *\n * @param expectation assertions over expected outcome or some desired state transformation\n *\n * @return self for chaining\n */\n SimulationInspector expect(Consumer<GameState> expectation);\n\n /**\n * Alias for {@link #expect(Consumer)}\n *\n * @param expectation assertions over expected outcome or some desired state transformation\n *\n * @return self for chaining\n */\n default SimulationInspector then(final Consumer<GameState> expectation) {\n return expect(expectation);\n }\n\n /**\n * Gets the current game state for the simulation. This is the state that would be passed to {@link\n * #expect(Consumer) expect}.\n *\n * @return the current game state\n */\n GameState state();\n\n /**\n * Gets the current game mode for the simulation. This is the latest game mode the simulation was in when ticking.\n *\n * @return the current game mode\n */\n GameMode mode();\n\n Queue<InputEvent> inputQueue();\n}", "public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}", "int getStep();", "int getStep();", "int getStep();", "public State GetState()\n {\n return this.state;\n }", "abstract int steps();", "public static States getState() {\r\n\t\treturn currentState;\r\n\t}", "SimplStateMachineFactory getSimplStateMachineFactory();", "public State getMoving() {\n\t\treturn moving;\n\t}", "Transition createTransition();", "Transition createTransition();", "public S getState() {\r\n\t\treturn state;\r\n\t}", "public String nextStep();", "public ActionState createActionState();", "PowerState getState();", "protected TransitionFunction transitionFunction() {\n\t\treturn (TransitionFunction) this.transitions;\n\t}", "@Override\n\tpublic StateMachine getInitialStateMachine() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tstateMachines.clear();\n\t\tStateMachine firstMachine = new FirstPropNetStateMachine();\n\t\tlong stopTime = System.currentTimeMillis();\n\t\tpropNetCreationTime = stopTime - startTime;\n\t\tSystem.out.println(\"PropNetCreationTime: \" + propNetCreationTime);\n\t\tstateMachines.add(firstMachine);\n\t\treturn firstMachine;\n\t}", "public void getState();", "public interface MonsterStateTransitions {\n //state transitions\n void toVulnerableState();\n void toProtectedState();\n\n //actions\n void init();\n\n}", "public E startState() {\r\n\t\treturn this.values[0];\r\n\t}", "@Override\n\tpublic MoveState transitionTowards() {\n\t\treturn new MoveTowardsState();\n\t}", "private Transition(State sourceState) {\r\n \t\t\tthis.sourceState = sourceState;\r\n \t\t\tthis.nextStateInfo = new ArrayList<NextStateInfo>();\r\n \t\t}", "public interface IState {\n\n /**\n * Click on button to load a new map from file.\n */\n void btnLoadMap();\n\n /**\n * Click on button to load a new planning from file.\n */\n void btnLoadPlanning();\n\n /**\n * Click on button to compute the best route to make deliveries.\n */\n void btnGenerateRoute();\n\n /**\n * Click on button to cancel a loading action.\n */\n void btnCancel();\n\n /**\n * Click on button to load file.\n *\n * @param file File to load as a map or a planning depending on the state.\n */\n void btnValidateFile(File file);\n\n /**\n * Left click pressed on a delivery.\n */\n void leftClickPressedOnDelivery();\n\n /**\n * Left click released on another delivery.\n *\n * @param sourceDelivery Delivery to switch with target delivery.\n * @param targetDelivery Delivery to switch with sourceDelivery.\n */\n void leftClickReleased(Delivery sourceDelivery, Delivery targetDelivery);\n\n /**\n * Simple click on a delivery.\n *\n * @param delivery The delivery clicked.\n */\n void clickOnDelivery(Delivery delivery);\n\n /**\n * Simple click somewhere else (not a interactive point).\n */\n void clickSomewhereElse();\n\n /**\n * Click on an empty node (not a delivery or warehouse node).\n *\n * @param node The empty node clicked.\n */\n void clickOnEmptyNode(Node node);\n\n /**\n * Click on button to add a new delivery.\n *\n * @param node The node to deliver.\n * @param previousDeliveryNode The node with the previous delivery.\n * @param timeSlot The time slot of the new delivery.\n */\n void btnAddDelivery(Node node, Node previousDeliveryNode, TimeSlot timeSlot);\n\n /**\n * Click on button to remove a delivery.\n *\n * @param delivery The delivery to remove.\n */\n void btnRemoveDelivery(Delivery delivery);\n\n /**\n * Click on a specific node : the warehouse.\n *\n * @param warehouse The warehouse node clicked.\n */\n void clickOnWarehouse(Node warehouse);\n\n /**\n * Click on button to close the current map already loaded.\n */\n void btnCloseMap();\n\n /**\n * Click on button to clear the current planning already loaded.\n */\n void btnClearPlanning();\n\n /**\n * Set the default view for this state (enable/disable buttons ...).\n */\n void initView();\n}", "public void runStateMachine() {\n switch(m_currentState) {\n case PoweringUpState:\n if (this.doPowerUpStuff()) {\n this.setRobotState(RobotState.InitializingDataState);\n }\n break;\n case InitializingDataState:\n\n if (this.initializeData()) {\n // Load some commands for our robot.\n // We could definitely load these from a different file.\n System.out.println(\"-------- Populating Command Queue --------\");\n m_robotQueue.addCommand(new MoveToLocationXY(1.0, 2.0, 2.0));\n m_robotQueue.addCommand(new MoveToLocationXY(-1.0, -2.0, 1.0));\n m_robotQueue.addCommand(new RotateDegrees(180.0, 22.5));\n\n System.out.println(\"\\n-------- Entering Main Robot State --------\");\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n break;\n case IdleWaitingForCommandState:\n if (m_robotQueue.isCommandPending()) {\n\n m_currentCommand = m_robotQueue.getNextCommand();\n\n // m_currentCommand is a generic Object. Let's see what it actually is...\n String commandName = m_currentCommand.getClass().toString();\n System.out.println(\"* Got new command. Processing: \" + commandName);\n\n // Change robot state depending on the type of command we found.\n switch (commandName) {\n // NOTE: This \"class xyz\" text compare is kind of weird,\n // We could probably find a better way.\n case \"class commands.MoveToLocationXY\":\n this.setRobotState(RobotState.MovingToLocationState);\n break;\n case \"class commands.RotateDegrees\":\n this.setRobotState(RobotState.RotatingState);\n break;\n default:\n System.out.println(\"Unrecognized command \" + commandName);\n }\n System.out.println();\n\n } else if (m_currentCommand != null) {\n m_currentCommand = null; // Doing nothing. Clear current command.\n }\n break;\n case MovingToLocationState:\n MoveToLocationXY moveCmd = (MoveToLocationXY) m_currentCommand;\n try {\n if (moveCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case RotatingState:\n RotateDegrees rotateCmd = (RotateDegrees) m_currentCommand; // Cast to correct type.\n try {\n if (rotateCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case SearchingForTargetsState:\n // TODO - implement SearchTarget demo behavior\n break;\n }\n }", "public Simulation(SimDescriptor descriptor) {\n this.size = descriptor.getNodes().size();\n ArrayList<ArrayList<Integer>> connections = descriptor.getConnects();\n this.currentStep = 0;\n transition = new double[size][size];\n state = new double[size][size];\n if (size == 0) { \n return;\n }\n for (int i = 0; i < size; i++) {\n ArrayList<Integer> current = connections.get(i);\n if (current.isEmpty()) {\n transition[i][i] = 1.0; //if the node has no out-going connections, it is allowed to transition to itself.\n continue; //this keeps all of the paths inside the network and also avoids a division by zero.\n }\n for (int j : current) {\n transition[j][i] = 1.0 / ((double) current.size());\n }\n }\n state = transition;\n }", "@Override\n\tpublic Automaton clone() {\n\t\tAutomaton a;\n\t\t// Try to create a new object.\n\t\ttry {\n\t\t\ta = getClass().newInstance();\n\t\t} catch (final Throwable e) {\n\t\t\t// Well golly, we're sure screwed now!\n\t\t\tlogger.error(\"Warning: clone of automaton failed: {}\", e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\ta.setEnvironmentFrame(getEnvironmentFrame());\n\n\t\t// Copy over the states.\n\t\tfinal HashMap<State, State> map = new HashMap<>(); // Old states to new\n\t\t// states.\n\t\tstates.forEach(state -> {\n\t\t\tfinal State newState = new State(state.getID(), new Point(state.getPoint()), a);\n\t\t\tnewState.setLabel(state.getLabel());\n\t\t\tnewState.setName(state.getName());\n\t\t\tmap.put(state, newState);\n\t\t\ta.addState(newState);\n\t\t\tif (this instanceof MooreMachine) {\n\t\t\t\t((MooreMachine) a).setOutput(newState, ((MooreMachine) this).getOutput(state));\n\t\t\t}\n\t\t});\n\n\t\tfinalStates.forEach(state -> {\n\t\t\ta.addFinalState(map.get(state));\n\t\t});\n\n\t\ta.setInitialState(map.get(getInitialState()));\n\n\t\t// Copy over the transitions.\n\n\t\tstates.forEach(state -> {\n\t\t\tfinal State from = map.get(state);\n\t\t\tgetTransitionsFromState(state).forEach(transition -> {\n\t\t\t\tfinal State to = map.get(transition.getToState());\n\t\t\t\tSystem.err.println(\"Transition name: \" + transition.toString());\n\t\t\t\tfinal Transition toBeAdded = transition.clone();\n\t\t\t\ttoBeAdded.setFromState(from);\n\t\t\t\ttoBeAdded.setToState(to);\n\t\t\t\tSystem.err.println(\"toBeAdded is null: \" + (toBeAdded == null));\n\t\t\t\tSystem.err.println(\"toBeAdded.from is null: \" + (toBeAdded.getFromState() == null));\n\t\t\t\tSystem.err.println(\"toBeAdded.to is null: \" + (toBeAdded.getToState() == null));\n\t\t\t\ta.addTransition(toBeAdded);\n\t\t\t});\n\t\t});\n\n\t\tfinal List<Note> notes = getNotes();\n\t\tfinal List<Note> copyNotes = a.getNotes();\n\t\tcheckArgument(notes.size() == copyNotes.size());\n\n\t\tIntStream.range(0, notes.size()).forEach(i -> {\n\t\t\ta.addNote(new Note(notes.get(i).getAutoPoint(), notes.get(i).getText()));\n\t\t\tcopyNotes.get(i).setView(notes.get(i).getView());\n\t\t});\n\t\t// Should be done now!\n\t\treturn a;\n\t}", "protected abstract int newState();", "public S getCurrentState();", "public interface PuzzleState {\r\n\t/**\r\n\t * The puzzle allows for four moves whose names are fixed with an enum type\r\n\t * Operation. Note that MOVERIGHT means that a tile moves to the right and the\r\n\t * slot to its right need to be empty for this to be possible.\r\n\t */\r\n\tpublic enum Operation {\r\n\t\tMOVERIGHT, MOVELEFT, MOVEUP, MOVEDOWN\r\n\t};\r\n\r\n\t/**\r\n\t * Sets or resets PuzzleState object to the initial (final) state of a game with\r\n\t * the given dimension and number of empty slots. The initial state is the same\r\n\t * as the final state. All tiles are ordered from top-left to bottom-right,\r\n\t * empty slots are at the bottom-right. Parent and operation are set to null.\r\n\t * \r\n\t * @param dimension\r\n\t * is the number of tiles per row (or column)\r\n\t * @param numberOfEmptySlots\r\n\t * is a number between 1 and 3\r\n\t */\r\n\tpublic void setToInitialState(int dimension, int numberOfEmptySlots);\r\n\r\n\t/**\r\n\t * Get the value of the tile at the given row and column position. An empty slot\r\n\t * is represented as 0. The row, column index starts at 0. The top-left position\r\n\t * is (0,0).\r\n\t * \r\n\t * @param row\r\n\t * is the row index, range 0,1,..., dimension-1\r\n\t * @param column\r\n\t * is the column index, range 0,1,..., dimension-1\r\n\t * @return value for the tile at the given position, range 0,1,...,dimension^2-1\r\n\t */\r\n\tpublic int getValue(int row, int column);\r\n\r\n\t/**\r\n\t * Get the parent state which is the state from which the current state was\r\n\t * reached. The parent state is useful if one wants to represent that a puzzle\r\n\t * state A moves to puzzle state B with a particular move operation. For this\r\n\t * example B.getParent() returns A. Obtaining A is useful to navigate back on a\r\n\t * path from a current state to a initial state where all tiles are sorted. The\r\n\t * initial state does not have a parent.\r\n\t * \r\n\t * @return a previously stored parent state or null if the state is the initial\r\n\t * state.\r\n\t */\r\n\tpublic PuzzleState getParent();\r\n\r\n\t/**\r\n\t * Retrieves the operation by which this state is reached. The operation is set\r\n\t * when applying move or drag operations. The initial state has no operation.\r\n\t * \r\n\t * @return previously stored Operation or null if there is none.\r\n\t */\r\n\tpublic Operation getOperation();\r\n\r\n\t/**\r\n\t * Get length of the path from initial state to the current state. A path is a\r\n\t * sequence of states that result from a series of move operations that are\r\n\t * sequentially applied to the initial state to get to the current state. The\r\n\t * initial state has a path length of 0, states that are reached with one move\r\n\t * have path length of one and so forth. A drag operation is a GUI short cut and\r\n\t * is internally represented with an equivalent sequence of move operations.\r\n\t * Note that any move operation increases the path length even if the player\r\n\t * gets closer to the solution. So the path length is not the distance between\r\n\t * initial state and current state but the number of puzzle states that are\r\n\t * linked together in a sequence with the getParent() function.\r\n\t * \r\n\t * @return the number of move operations from initial state to this state, the\r\n\t * returned value is greater or equal 0\r\n\t */\r\n\tpublic int getPathLength();\r\n\r\n\t/**\r\n\t * Checks if it is possible to move a tile from the given position in the given\r\n\t * direction. If it is, the method returns a new instance of PuzzleState where\r\n\t * the parent state is set to this object, i.e. the current state before the\r\n\t * move, the operation is set to op and the state is set to the state that\r\n\t * results from the move operation. The operation also sets length of the path\r\n\t * from the initial state to the new state. Note that this length only increases\r\n\t * with move operations regardless of the distance to the initial state. If the\r\n\t * move is not possible, the method returns null.\r\n\t * \r\n\t * @param row\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param column\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param op\r\n\t * gives an operation such as move left or move up.\r\n\t * @return new PuzzleState for legal move. For illegal move operation it returns\r\n\t * null.\r\n\t */\r\n\tpublic PuzzleState move(int row, int column, Operation op);\r\n\r\n\t/**\r\n\t * A drag is a short cut for a possible series of move operations. In the GUI,\r\n\t * it results from a drag operations across multiple empty slots. Check if it is\r\n\t * possible to move a tile from the start position to the end position. If start\r\n\t * and end are not adjacent, there must be empty positions in between to make a\r\n\t * sequence of moves possible from start to end. If this is possible, the method\r\n\t * returns a new instance of PuzzleState where the state is set to the state\r\n\t * that results from the sequence of move operations. A number of intermediate\r\n\t * PuzzleStates is created as needed to represent the sequence of move\r\n\t * operations such that one can work backwards from the resulting state towards\r\n\t * the starting state with the getParent() operation. If the move is not\r\n\t * possible, the method returns null. Starting position has coordinates\r\n\t * (startRow,startColumn). Ending position has coordinates (endRow,endColumn).\r\n\t * \r\n\t * @param startRow\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param startColumn\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param endRow\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param endColumn\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @return new PuzzleState for legal sequence of moves, otherwise null.\r\n\t */\r\n\tpublic PuzzleState drag(int startRow, int startColumn, int endRow, int endColumn);\r\n\r\n\t/**\r\n\t * Creates a random path from this state to the newly generated returned state\r\n\t * that has the given length. The states are connected with a number of\r\n\t * intermediate PuzzleStates to represent the path such that one can reverse\r\n\t * from the resulting state backwards to the initial state in a step-by-step\r\n\t * manner with the help of the getParent() method. For state on the sequence,\r\n\t * the getPathLength() method gives the number of steps away from the initial\r\n\t * state. A path that contains cycles should be avoided as this is boring for\r\n\t * the game. The path is generated with the help of a random number generator to\r\n\t * make it irregular and non-deterministic.\r\n\t * \r\n\t * @param pathLength\r\n\t * is a value greater or equal 0, denotes the number of steps from\r\n\t * this state to the returned state\r\n\t * @return state that is reachable with the given number of moves\r\n\t */\r\n\tpublic PuzzleState shuffleBoard(int pathLength);\r\n\r\n\t/**\r\n\t * Tells if the current state has an empty slot at the given position with\r\n\t * coordinates (row, column).\r\n\t * \r\n\t * @param row\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param column\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @return true if this is an empty slot, false otherwise\r\n\t */\r\n\tpublic boolean isEmpty(int row, int column);\r\n\r\n\t/**\r\n\t * Provides a puzzle state with same settings of tiles as the current state but\r\n\t * where the sequence of parent states is not representing the history how the\r\n\t * game got to the current state but the shortest possible sequence to the\r\n\t * solution (initial) state. The returned puzzle state can be operated just as\r\n\t * any puzzle state and its getParent() method leads to the initial state.\r\n\t * \r\n\t * @return new state object that can substitute the current state and has\r\n\t * shortest possible path to solution (initial) state.\r\n\t */\r\n\tpublic PuzzleState getStateWithShortestPath();\r\n}", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public int getState() {return state;}", "public int getState() {return state;}", "public FSM() {\r\n \t\tstates = new HashMap<String, State>();\r\n \t\ttransitions = new LinkedHashMap<String, Transition>();\r\n \t}", "@Override\n public int getState() {\n return myState;\n }", "BehaviorStateMachinesFactory getBehaviorStateMachinesFactory();", "StateMachineType createStateMachineType();" ]
[ "0.67091036", "0.650436", "0.6454005", "0.6453738", "0.64264005", "0.6361979", "0.6323473", "0.62260246", "0.62031424", "0.61952716", "0.6162405", "0.61069834", "0.60958266", "0.6078375", "0.6078375", "0.6078375", "0.6078375", "0.60640514", "0.6060611", "0.6053841", "0.6048974", "0.60428536", "0.60356134", "0.60356134", "0.60271144", "0.6021634", "0.6017738", "0.60126734", "0.60012066", "0.5977516", "0.5952769", "0.59485185", "0.5939565", "0.5911872", "0.5907751", "0.5907688", "0.58963674", "0.5889803", "0.58846134", "0.5878792", "0.5876856", "0.58686984", "0.58623576", "0.5849237", "0.58458763", "0.58426154", "0.58308136", "0.5828924", "0.5817007", "0.58138984", "0.579968", "0.57969517", "0.5794555", "0.5791349", "0.57887113", "0.57782894", "0.5775685", "0.5771699", "0.5771237", "0.5764005", "0.5762185", "0.5762185", "0.5762185", "0.57523453", "0.5749429", "0.574895", "0.5739326", "0.5730952", "0.5719835", "0.5719835", "0.571889", "0.570858", "0.570508", "0.56958604", "0.56899345", "0.56880105", "0.567883", "0.5657063", "0.5653997", "0.5647031", "0.5638178", "0.5635752", "0.563333", "0.56332487", "0.56303555", "0.5630221", "0.5628349", "0.5623493", "0.5622243", "0.5622243", "0.5622243", "0.5622243", "0.5622243", "0.5622243", "0.56188256", "0.56188256", "0.56156546", "0.5611018", "0.55939674", "0.55872434" ]
0.59619915
30
It defines the emulator's id.
public void setEmulationId(int id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getEmulationId() {\n\t\treturn (id);\n\t}", "private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }", "java.lang.String getMachineId();", "String getProgramId();", "public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }", "public String generatePhoneId() {\n String device = Build.DEVICE.equals(\"generic\") ? \"emulator\" : Build.DEVICE;\n String network = getNetwork();\n String carrier = (network == NETWORK_WIFI) ?\n getWifiCarrierName() : getTelephonyCarrierName();\n\n StringBuilder stringBuilder = new StringBuilder(ANDROID_STRING);\n stringBuilder.append('-').append(device).append('_')\n .append(Build.VERSION.RELEASE).append('_').append(network)\n .append('_').append(carrier).append('_').append(getTelephonyPhoneType())\n .append('_').append(isLandscape() ? \"Landscape\" : \"Portrait\");\n\n return stringBuilder.toString();\n }", "public static FlexID testDeviceID() {\n byte[] identity = {\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0\n };\n\n return new FlexID(identity, FlexIDType.DEVICE, new AttrValuePairs(), null);\n }", "public String getSystemId();", "public abstract String getMachineID();", "@NonNull\n public static String getDeviceID(@NonNull Context ctx) {\n String duid = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n return (duid == null || duid.length() == 0) ? \"emulator\" : duid;\n }", "public abstract String getApplicationId();", "public String id() {\n return definition.getString(ID);\n }", "public String getApplicationId();", "@Nullable\n @SuppressLint(\"HardwareIds\")\n private String createId(Context context) {\n String id = Settings.Secure.getString(\n context.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String device = Build.DEVICE;\n id += device;\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n return HexCoder.toHex(md.digest(id.getBytes(\"UTF-8\")));\n } catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {\n Log.e(TAG, \"createId: \"+e.toString());\n }\n return null;\n }", "String experimentId();", "public int getMakerId();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "public static void setFlutterEngineId(String id) {\n flutterEngineId = id;\n }", "Identifier getId();", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "@Override\n public int getDeviceId() {\n return 0;\n }", "ExperimenterId getExperimenterId();", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "public static String id()\n {\n return _id;\n }", "private static String pseudoUniqueId() {\n\t\t// decimal\n\t\tfinal Integer DECIMAL = 10;\n\n\t\t// return the android device some common info(board, brand, CPU type +\n\t\t// ABI convention, device, display, host, id, manufacturer, model,\n\t\t// product, tags, type and user) combined string\n\t\treturn new StringBuilder().append(Build.BOARD.length() % DECIMAL)\n\t\t\t\t.append(Build.BRAND.length() % DECIMAL)\n\t\t\t\t.append(Build.CPU_ABI.length() % DECIMAL)\n\t\t\t\t.append(Build.DEVICE.length() % DECIMAL)\n\t\t\t\t.append(Build.DISPLAY.length() % DECIMAL)\n\t\t\t\t.append(Build.HOST.length() % DECIMAL)\n\t\t\t\t.append(Build.ID.length() % DECIMAL)\n\t\t\t\t.append(Build.MANUFACTURER.length() % DECIMAL)\n\t\t\t\t.append(Build.MODEL.length() % DECIMAL)\n\t\t\t\t.append(Build.PRODUCT.length() % DECIMAL)\n\t\t\t\t.append(Build.TAGS.length() % DECIMAL)\n\t\t\t\t.append(Build.TYPE.length() % DECIMAL)\n\t\t\t\t.append(Build.USER.length() % DECIMAL).toString();\n\t}", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String nodeId = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n return nodeId;\n }", "public String getMachineId()\n\t{\n\t\treturn machineId;\n\t}", "java.lang.String getDatabaseId();", "public void setId(String id) {\n this.ide = id;\n //System.out.println(\"linkyhandler setid \" + ide);\n }", "UUID getDeviceId();", "String idProvider();", "public void setIdManager(IdMgr idMgr);", "public Builder setMachineId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n machineId_ = value;\n onChanged();\n return this;\n }", "public void setID() {\n\t\tthis.ID = UUID.randomUUID().toString();\n\t}", "private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }", "Integer getDeviceId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();" ]
[ "0.69023824", "0.6528559", "0.64482623", "0.6273388", "0.6110693", "0.60221696", "0.5977706", "0.5977477", "0.5954374", "0.5942987", "0.5922561", "0.5911365", "0.590338", "0.5887512", "0.5875086", "0.58715594", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5865387", "0.5860147", "0.5853604", "0.58492285", "0.58475345", "0.5840891", "0.5830957", "0.5830435", "0.583021", "0.5829782", "0.5827434", "0.58193904", "0.5805944", "0.58056045", "0.5805189", "0.57935196", "0.57924336", "0.5791834", "0.5786556", "0.5785461", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632", "0.5749632" ]
0.6930137
0
It returns the emulator's id.
public int getEmulationId() { return (id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }", "java.lang.String getMachineId();", "@NonNull\n public static String getDeviceID(@NonNull Context ctx) {\n String duid = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n return (duid == null || duid.length() == 0) ? \"emulator\" : duid;\n }", "public static String deviceId() {\n\t\t// return device id\n\t\treturn getTelephonyManager().getDeviceId();\n\t}", "private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }", "String getProgramId();", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "public String imei() {\n\t\t TelephonyManager telephonyManager = (TelephonyManager) activity\n\t\t .getSystemService(Context.TELEPHONY_SERVICE);\n\t\t return telephonyManager.getDeviceId();\n\t\t}", "public String getApplicationId();", "public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }", "DeviceId deviceId();", "DeviceId deviceId();", "public String getSystemId();", "private String getAdmobDeviceId()\n\t{\n\t\tString android_id = Settings.Secure.getString(activity.getContentResolver(), Settings.Secure.ANDROID_ID);\n\t\tString deviceId = md5(android_id).toUpperCase(Locale.US);\n\t\treturn deviceId;\n\t}", "public String getDeviceUDID() {\r\n\t\tTelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\treturn telephonyManager.getDeviceId();\r\n\t}", "Integer getDeviceId();", "@NonNull\n private String getDeviceId() {\n String ANDROID_ID = Settings.Secure.getString(cordova.getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);\n return md5(ANDROID_ID).toUpperCase();\n }", "public String getDeviceId() {\n String deviceId = ((TelephonyManager) LoginActivity.this.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();\n if (deviceId != null && !deviceId.equalsIgnoreCase(\"null\")) {\n // System.out.println(\"imei number :: \" + deviceId);\n return deviceId;\n }\n\n deviceId = android.os.Build.SERIAL;\n // System.out.println(\"serial id :: \" + deviceId);\n return deviceId;\n\n }", "public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }", "UUID getDeviceId();", "java.lang.String getDatabaseId();", "@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "String experimentId();", "public abstract String getApplicationId();", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String nodeId = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n return nodeId;\n }", "public abstract String getMachineID();", "public int getId() throws android.os.RemoteException;", "String getExecId();", "public AppID getIdentifier () ;", "ExperimenterId getExperimenterId();", "public String getMachineId()\n\t{\n\t\treturn machineId;\n\t}", "private String getDeviceId(Context context){\n TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n //\n ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);\n String tmDevice = tm.getDeviceId();\n\n String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n String serial = null;\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) serial = Build.SERIAL;\n\n if(tmDevice != null) return \"01\" + tmDevice;\n if(androidId != null) return \"02\" + androidId;\n if(serial != null) return \"03\" + serial;\n\n return null;\n }", "public static String id()\n {\n return _id;\n }", "public int getMakerId();", "java.lang.String getDeviceId();", "public static String getDeviceId(Context context) {\n return getDevice(context).getId();\n }", "public int getMachineID() {\n return machineID;\n }", "String getGeneralID() throws ApplicationException;", "public String getUniqueID(Context ctx)\n {\n String m_szDevIDShort = \"\";\n String m_szAndroidID = \"\";\n String m_szWLANMAC = \"\";\n\n try {\n m_szDevIDShort = \"35\" + // we make this look like a valid IMEI\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n m_szAndroidID = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n WifiManager wm = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);\n m_szWLANMAC = wm.getConnectionInfo().getMacAddress();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n String m_szLongID = m_szWLANMAC + m_szDevIDShort + m_szAndroidID;\n\n MessageDigest m = null;\n try {\n m = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n m.update(m_szLongID.getBytes(), 0, m_szLongID.length());\n byte p_md5Data[] = m.digest();\n\n //noinspection RedundantStringConstructorCall\n String m_szUniqueID = new String();\n for (int i = 0; i < p_md5Data.length; i++) {\n int b = (0xFF & p_md5Data[i]);\n // if it is a single digit, make sure it have 0 in front (proper\n // padding)\n if (b <= 0xF)\n m_szUniqueID += \"0\";\n // add number to string\n m_szUniqueID += Integer.toHexString(b);\n }\n\n return m_szUniqueID;\n }", "String getInstanceID();", "public int getGameManagerID() {\n return ID;\n }", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "public String getMaternalID();", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "public String getDeviceId() {\n\t\tString id;\n\t\tid = options.getProperty(\"id\");\n\t\tif(id == null) {\n\t\t\tid = options.getProperty(\"Device-ID\");\n\t\t}\n\t\treturn trimedValue(id);\n\t}", "public String getSystemId() {\n return agentConfig.getSystemId();\n }", "String getGameId();", "public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "private String getCurrentInstanceId() throws IOException {\n String macAddress = CommonUtils.toHexString(RuntimeUtils.getLocalMacAddress());\n // 16 chars - workspace ID\n String workspaceId = DBWorkbench.getPlatform().getWorkspace().getWorkspaceId();\n if (workspaceId.length() > 16) {\n workspaceId = workspaceId.substring(0, 16);\n }\n\n StringBuilder id = new StringBuilder(36);\n id.append(macAddress);\n id.append(\":\").append(workspaceId).append(\":\");\n while (id.length() < 36) {\n id.append(\"X\");\n }\n return id.toString();\n }", "public final String getIdentifier() {\n return ServerUtils.getIdentifier(name, ip, port);\n }", "public java.lang.String getMachineId() {\n java.lang.Object ref = machineId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n machineId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static String getDeviceID(Context context) {\n return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "public Integer getProgramId();", "public String uuid(){\n\t\t String device_unique_id = Secure.getString(activity.getContentResolver(),\n\t\t Secure.ANDROID_ID);\n\t\t return device_unique_id;\n\t\t}", "public String generatePhoneId() {\n String device = Build.DEVICE.equals(\"generic\") ? \"emulator\" : Build.DEVICE;\n String network = getNetwork();\n String carrier = (network == NETWORK_WIFI) ?\n getWifiCarrierName() : getTelephonyCarrierName();\n\n StringBuilder stringBuilder = new StringBuilder(ANDROID_STRING);\n stringBuilder.append('-').append(device).append('_')\n .append(Build.VERSION.RELEASE).append('_').append(network)\n .append('_').append(carrier).append('_').append(getTelephonyPhoneType())\n .append('_').append(isLandscape() ? \"Landscape\" : \"Portrait\");\n\n return stringBuilder.toString();\n }", "public final int getDeviceID() {\n return device.getDeviceID();\n }", "public int getApplicationId() {\r\n\t\tif (applicationId != null) {\r\n\t\t\treturn applicationId;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tJSONObject response = getJSonResponse(Unirest.get(url + NAMED_APPLICATION_API_URL)\r\n\t\t\t\t\t.queryString(\"name\", SeleniumTestsContextManager.getApplicationName()));\r\n\t\t\tapplicationId = response.getInt(\"id\");\r\n\t\t\treturn applicationId;\r\n\t\t} catch (UnirestException e) {\r\n\t\t\tthrow new ConfigurationException(String.format(\"Application %s does not exist in variable server, please create it\", SeleniumTestsContextManager.getApplicationName()));\r\n\t\t}\r\n\t}", "Identification getManagerIdentification();", "public static String getUniqueDeviceID(Context context) {\n\t\tString identifier = null;\n\t\tTelephonyManager tm = (TelephonyManager) context\n\t\t\t\t.getSystemService(Context.TELEPHONY_SERVICE);\n\t\tif (tm != null)\n\t\t\tidentifier = tm.getDeviceId();\n\t\tif (identifier == null || identifier.length() == 0)\n\t\t\tidentifier = Secure.getString(context.getContentResolver(),\n\t\t\t\t\tSecure.ANDROID_ID);\n\t\t// identifier = identifier + new Random().nextInt(1000);\n\t\treturn identifier;\n\t}", "public String mo10115a(Context context) {\n try {\n return (String) C2342q.m9000a(\"getId\", context);\n } catch (Exception e) {\n Log.e(\"AdvertisingInfo\", \"Error getting advertising id: \" + e.getMessage());\n return null;\n }\n }", "public void setEmulationId(int id) {\n\t\tthis.id = id;\n\t}", "public int getID() {\n\t\treturn manager_id;\n\t}", "private String getEmulatorFriendlyName() {\n return mEmulatorFriendlyName;\n }", "public String deviceId() {\n return this.deviceId;\n }", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "ApplicationId appId();", "int getServerId();", "public static FlexID testDeviceID() {\n byte[] identity = {\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0\n };\n\n return new FlexID(identity, FlexIDType.DEVICE, new AttrValuePairs(), null);\n }", "String getContextId();", "int getInstanceId();", "int getInstanceId();", "int getInstanceId();", "long getInstanceID();", "public java.lang.String getMachineId() {\n java.lang.Object ref = machineId_;\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 machineId_ = s;\n }\n return s;\n }\n }" ]
[ "0.74487793", "0.69439363", "0.69079053", "0.68237907", "0.67539686", "0.67230725", "0.6674987", "0.6591572", "0.6585368", "0.6560527", "0.65111125", "0.65111125", "0.644979", "0.6442849", "0.64324546", "0.6388515", "0.6379602", "0.6354396", "0.635014", "0.63217795", "0.63149697", "0.6311447", "0.6311021", "0.6306479", "0.629687", "0.62868243", "0.6257113", "0.62449354", "0.62292635", "0.6221018", "0.62179756", "0.6207853", "0.6192011", "0.6191889", "0.61740667", "0.616371", "0.6153986", "0.61521584", "0.6143583", "0.6135131", "0.6122085", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.61057323", "0.6085095", "0.6078802", "0.60609037", "0.6055345", "0.60546386", "0.6053205", "0.6048018", "0.60451305", "0.6017263", "0.60148877", "0.6013691", "0.6012408", "0.6012257", "0.60114473", "0.6008212", "0.600754", "0.60049844", "0.6004876", "0.6002679", "0.59946585", "0.59912", "0.59888893", "0.59814155", "0.59814155", "0.59814155", "0.59814155", "0.5977884", "0.5973948", "0.5973849", "0.59646493", "0.5964155", "0.5964155", "0.5964155", "0.59576815", "0.5943619" ]
0.73098963
1
It defines the emulator's name.
public void setEmulationName(String name) { this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getEmulatorFriendlyName() {\n return mEmulatorFriendlyName;\n }", "public String getEmulationName() {\n\t\treturn (name);\n\t}", "public void setName() {\r\n\t\tapplianceName = \"ElectricShower\";\r\n\t}", "static void giveName() {\n System.out.println(name);\n }", "public void setName(String name) {\n setUserProperty(\"ant.project.name\", name);\n this.name = name;\n }", "public void showNAME() {\r\n\t\tSystem.out.println(getName().toUpperCase());\r\n\t}", "public static String specifyApplicationName() {\n return holder.format(\"specifyApplicationName\");\n }", "private String getName()\r\n {\r\n return JOptionPane.showInputDialog(frame, \"Choose a screen name:\", \"Screen name selection\",\r\n JOptionPane.PLAIN_MESSAGE);\r\n }", "public void setName(String nm){\n\t\tname = nm;\n\t}", "public void setMainName (String name){\n this.name = name;\n }", "@Override\n\tpublic void name() {\n\t\tSystem.out.println(\"I am Master\");\n\t}", "public void setName() {\r\n\t\tapplianceName = \"Refrigerator\";\r\n\t}", "@Override\n public void setName(String name) {\n \n }", "public String showName(){\r\n\t\tSystem.out.println(\"This is a \" + name);\r\n\t\treturn name;}", "private void setName() {\n\t\t//MAKE SURE NOT TO GET ACCIDENTAL RECURSION HERE\n\t\t//DO NOT JUST MAKE A NEW TRIAD AND COMPARE TO CURRENT TRIAD\n\t\t//UNLESS ??? MAYBEDON\"T PUT SET NAME IN THE CONSTRUCTOR?\n\t\t//SIMILAR PROBLEM TO SETINVERSION\n\t\t\n\t\t//major, minor, diminished, augmented\n\t\t//this.name = name;\n\t}", "private void setName(java.lang.String name) {\n System.out.println(\"setting name \"+name);\n this.name = name;\n }", "@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return \"Display \" + this.mDisplayId + \" name=\\\"\" + this.mDisplayInfo.name + \"\\\"\";\n }", "public String getName() {\r\n\t\treturn GDAssemblerUI.getText(UI_TEXT);\r\n\t}", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public String getName()\r\n {\n return \"tan\";\r\n }", "public void setName (String n) {\n name = n;\n }", "public void setName (String name) {\n this.name = name;\n NameRegistrar.register (\"server.\"+name, this);\n }", "@Override\n\tpublic String getName() {\n\t\treturn portmodifytesting.class.getSimpleName();\n\t}", "void setName(String name_);", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName(String name) {\n\t\tthis.nome = name;\n\t}", "public void setName(String n) {\r\n name = n;\r\n }", "void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name) \n {\n this.name = name;\n }", "void setName(String name) {\r\n this.name = name;\r\n }", "public String getName()\r\n {\r\n return screenName;\r\n }", "public void setName(String name) {\n this.name = name;\n }", "public final void setName(String name) {_name = name;}", "@Override\r\n public void setName(String name) {\n }", "public void setName( String name ) {\n this.name = name;\n }", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "void setName(String name) {\n this.name = name;\n }", "@Override\n\tpublic void setName(String name) {\n\t\t\n\t}", "@Override\n\tpublic void getName() {\n\t\tSystem.out.println(\"TESLA\");\n\t}", "public void setName(String name){\n \t\tthis.name = name;\n \t}", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "@Override\r\n\tprotected String getName() {\n\t\treturn NAME;\r\n\t}", "public void setName(String name)\n {\n this.name = name;\n }", "String getManagerName();", "public String name() {\n this.use();\n\n return name;\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "@Override\n public void setName(String name) {\n\n }", "public void setName(String arg0) {\n\t\t\n\t}", "public void setName(String name) {\n\t\tName = name;\n\t}", "public void setName(String name)\n {\n CreatureName = name;\n }" ]
[ "0.712791", "0.6799179", "0.6576698", "0.6376104", "0.62353784", "0.62241", "0.621308", "0.609525", "0.60475457", "0.603969", "0.6025538", "0.6018744", "0.6015939", "0.60139424", "0.59986556", "0.598071", "0.59786934", "0.5962827", "0.5948359", "0.5948359", "0.5948359", "0.5948359", "0.5938102", "0.593015", "0.5920226", "0.59003377", "0.58901477", "0.58864963", "0.58864963", "0.58864963", "0.58864963", "0.58864963", "0.58864963", "0.58864963", "0.58860296", "0.58860296", "0.58860296", "0.58860296", "0.58860296", "0.58860296", "0.58860296", "0.58860296", "0.58860296", "0.58860296", "0.58860296", "0.588183", "0.588183", "0.588183", "0.5881506", "0.58813", "0.58769065", "0.5876383", "0.58756775", "0.58756775", "0.58756775", "0.58754224", "0.58754224", "0.58754224", "0.5869145", "0.5868957", "0.58674157", "0.5865629", "0.5864217", "0.58629924", "0.5861137", "0.5861013", "0.5861013", "0.5861013", "0.5859482", "0.58540565", "0.58511406", "0.58511287", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.5850825", "0.58503973", "0.5846028", "0.5845027", "0.58421695", "0.5841528", "0.58377826", "0.5835562", "0.58349586", "0.5834585" ]
0.70961076
1
It returns the emulator's name.
public String getEmulationName() { return (name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getEmulatorFriendlyName() {\n return mEmulatorFriendlyName;\n }", "String getManagerName();", "String getIntegApplicationName();", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n }\n return capitalize(manufacturer) + \" \" + model;\n }", "String getSdkName();", "public String getName()\r\n {\r\n return screenName;\r\n }", "public static String getDeviceName() {\n\t\t\tString manufacturer = Build.MANUFACTURER;\n\t\t\tString model = Build.MODEL;\n\t\t\tif (model.startsWith(manufacturer)) {\n\t\t\t\treturn capitalize(model);\n\t\t\t}\n\t\t\treturn capitalize(manufacturer) + \" \" + model;\n\t\t}", "public String getDeviceName() {\r\n return name_;\r\n }", "public String deviceName() {\n\t\t String manufacturer = Build.MANUFACTURER;\n\t\t String model = Build.MODEL;\n\t\t if (model.startsWith(manufacturer)) {\n\t\t return capitalize(model);\n\t\t } else {\n\t\t return capitalize(manufacturer) + \" \" + model;\n\t\t }\n\t\t}", "public void setEmulationName(String name) {\n\t\tthis.name = name;\n\t}", "public String getName() {\n return Utility.getInstance().getPackageName();\n }", "private String getName()\r\n {\r\n return JOptionPane.showInputDialog(frame, \"Choose a screen name:\", \"Screen name selection\",\r\n JOptionPane.PLAIN_MESSAGE);\r\n }", "public String getName() {\r\n\t\treturn GDAssemblerUI.getText(UI_TEXT);\r\n\t}", "public String showName(){\r\n\t\tSystem.out.println(\"This is a \" + name);\r\n\t\treturn name;}", "public String getName() {\n\t\treturn \"Device\";\r\n\t}", "abstract public String getApplicationName();", "public static String getDeviceName(){\n BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\r\n if (bluetoothAdapter == null){\r\n return \"\";\r\n }else{\r\n String deviceName = bluetoothAdapter.getName();\r\n return deviceName;\r\n }\r\n }", "String getDeviceName();", "@Override\n\tpublic final String getName() {\n\t\treturn getClass().getSimpleName().replaceAll(\"Application$\", \"\").toLowerCase();\n\t}", "public String getName() {\n return (NAME_PREFIX + _applicationId + DELIM + _endpointId);\n }", "private String getUserConfiguredDeviceName() {\n\t\tString nameFromSystemDevice = Settings.Secure.getString(getContentResolver(), \"device_name\");\n\t\tif (!isEmpty(nameFromSystemDevice)) return nameFromSystemDevice;\n\t\treturn null;\n\t}", "public String getDisplayName () throws java.io.IOException, com.linar.jintegra.AutomationException;", "public String getFriendlyName() {\n return this.bluetoothStack.getLocalDeviceName();\n }", "String getPlatformName();", "public String getName() {\n\t return this.device.getName() + \".\" + this.getType() + \".\"\n\t + this.getId();\n\t}", "public String getEngineName() {\n return engineName;\n }", "public String getSystemName();", "@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return \"Display \" + this.mDisplayId + \" name=\\\"\" + this.mDisplayInfo.name + \"\\\"\";\n }", "java.lang.String getGameName();", "java.lang.String getGameName();", "public String getAPP_NAME() {\r\n return APP_NAME;\r\n }", "public String getAPP_NAME() {\r\n return APP_NAME;\r\n }", "public String getScreenName()\n {\n return SCREEN_NAME;\n }", "public String getDatabaseName() {\n return txtDatabaseName().getText();\n }", "java.lang.String getInstanceName();", "public String getProgramName()\r\n \t{\r\n \t\treturn m_program.m_csSimpleName;\r\n \t}", "public String name() {\n this.use();\n\n return name;\n }", "private String getDeviceName() {\n String permission = \"android.permission.BLUETOOTH\";\n int res = context.checkCallingOrSelfPermission(permission);\n if (res == PackageManager.PERMISSION_GRANTED) {\n try {\n BluetoothAdapter myDevice = BluetoothAdapter.getDefaultAdapter();\n if (myDevice != null) {\n return myDevice.getName();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return \"Unknown\";\n }", "public String getName() {\n return aao.getName();\n }", "public String name() {\n return aliases.get(0);\n }", "public String getManagerName() {\n return \"r\";\n }", "public String getName() {\n return getActivityInfo().name;\n }", "java.lang.String getAgentName();", "@Override\n\tpublic java.lang.String getName() {\n\t\treturn _scienceApp.getName();\n\t}", "@AutoEscape\n public String getGeneralManagerName();", "public static String getName() {\n\t\treturn ProjectMain._name;\n\t}", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();" ]
[ "0.79149544", "0.6820963", "0.64099485", "0.6403891", "0.6403891", "0.638432", "0.63674456", "0.63447046", "0.634075", "0.6326776", "0.6316168", "0.62720734", "0.6258406", "0.62277615", "0.62173176", "0.62077695", "0.61899084", "0.6189228", "0.6177093", "0.61673325", "0.61136764", "0.610567", "0.6063131", "0.605235", "0.60499585", "0.60494447", "0.6039922", "0.60338867", "0.6010841", "0.60051936", "0.5996996", "0.5996996", "0.5979295", "0.5979295", "0.59703475", "0.5946934", "0.5944448", "0.59383446", "0.5935552", "0.59349155", "0.59318864", "0.5918669", "0.5901583", "0.5898381", "0.5896455", "0.5875555", "0.5866364", "0.58598953", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256", "0.58528256" ]
0.7230161
1
It returns the last thinktime used by the emulator, which means the time used by the operator to take a decision. It is important to notice that we consider this value the thinktime as specified in the TPCC plus the keyingtime to calculate this value.
public long getThinkTime() { return (thinkTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getLastAttackTime() {\r\n\t\treturn lastAttackTime;\r\n\t}", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public double getWorkTime()\n {\n if (cFixedServiceTimed)\n {\n return (mServerConfig.mServiceTime);\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n return (cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n return (tBase + cRandom.negexp(tDelta));\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n return (tBase + cRandom.poisson(tDelta));\n\n case cHoldUniform:\n return (cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n }\n return 0.0;\n }", "private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }", "public Float getUsedtime() {\n return usedtime;\n }", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public Integer getGameUseTime() {\n return gameUseTime;\n }", "@Override\n\tpublic String getUsedWalltime() {\n\t\treturn model.getUsedWalltime();\n\t}", "public long getTimeElapsed() {\r\n\t long now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pTrialTime + timePassedSinceLastUpdate;\r\n\t}", "public Double getBestTime() {\n return bestTime;\n }", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public long getLastUse() {\n\t\treturn _lastused;\n\t}", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "public int getLastTimetable() {\n return lastTimetable;\n }", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "@Override\n\tpublic String getUsedCpuTime() {\n\t\treturn model.getUsedCpuTime();\n\t}", "private long getUserTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : 0L;\n }", "public int getIdleTime() {\n int[] processorFinishTimes = new int[AlgorithmConfig.getNumOfProcessors()];\n int[] processorWeights = new int[AlgorithmConfig.getNumOfProcessors()];\n int processor;\n // Find the end time and weight of each processor\n for (ScheduledTask task : this) {\n processor = task.getProcessorNum() - 1;\n if (task.getFinishTime() > processorFinishTimes[processor]) {\n processorFinishTimes[processor] = task.getFinishTime();\n }\n processorWeights[processor] += task.getNode().getWeight();\n }\n // Calculate the idle time\n int idleTime = 0;\n for (int i = 0; i < AlgorithmConfig.getNumOfProcessors(); i++) {\n idleTime += processorFinishTimes[i] - processorWeights[i];\n }\n\n return idleTime;\n }", "public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }", "public long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n}", "int getEvalTm();", "public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}", "public static long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n\n }", "public long getTimeTaken();", "private long timeNow()\n {\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return (System.currentTimeMillis() * 1000L) + DUTC.get() * 1000000L + 3506716800000000L;\n }", "public static long getSystemTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()): 0L;\n }", "long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "public long getLastUsed() {\n \t\treturn this.lastUsed;\n \t}", "public long getSimTime() {\n\t return now;\n\t}", "@Override\n public long getTimeNeeded() {\n return timeNeeded;\n }", "public double getHoldTime();", "@DISPID(17)\r\n\t// = 0x11. The runtime will prefer the VTID if present\r\n\t@VTID(23)\r\n\tjava.lang.String lastInstanceElapsedRunTime();", "public int getWorkRequired() {\n return time;\n }", "public long getKeyingTime() {\n\t\treturn (keyTime);\n\t}", "public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public long getBestSolutionTime();", "public int getHardwareTimeout();", "int time()\n\t{\n\t\treturn totalTick;\n\t}", "public Time getBestTime()\n\t{\n\t\treturn bestTime;\n\t}", "public int getWarmupTime() {\n return warmupTime;\n }", "public long getCurrentThreadKernelTime() {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime() : -1L;\n\t}", "public double readClock()\n {\n return (System.currentTimeMillis() - startingTime) / 1000.0;\n }", "public int getScopeTime()\n{\n // If scope time not explicitly set, get time prior to given time\n if(_scopeTime==null) {\n List <Integer> keyFrames = getKeyFrameTimes();\n int index = Collections.binarySearch(keyFrames, getTime());\n if(index<0) index = -index - 2; else index--;\n return index>=0? keyFrames.get(index) : 0;\n }\n \n // Return scope time\n return _scopeTime;\n}", "private int timeToNextAttack() {\n return ATTACK_SPEED - mAttacker.getSpeed();\n }", "final public long getSysUpTime() {\n return sysUpTime ;\n }", "public double getCBRTime();", "public static long getUserTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadUserTime(): 0L;\n }", "public int getThunderTime()\n {\n return thunderTime;\n }", "public long getCurrentSystemTime() {\n return getSystemTime() - startSystemTimeNano;\n }", "public static long now() {\n return System.nanoTime();\n }", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "public long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n}", "public int getSystemTime() {\n\t\treturn this.systemTime;\n\t}", "long getCurrentClockNs() {\n return System.nanoTime();\n }", "long getCurrentTimeMs() {\n return System.currentTimeMillis();\n }", "public Long getChecktime() {\n return checktime;\n }", "public long lastWriteThroughput()\r\n/* 194: */ {\r\n/* 195:377 */ return this.lastWriteThroughput;\r\n/* 196: */ }", "public static long tock() {\n if (tickTime == 0L) {\n System.err.println(\"Must call tick before tock\");\n System.exit(1);\n }\n\n long ret = System.currentTimeMillis() - tickTime;\n tickTime = 0L;\n return ret;\n\n }", "public static long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n }", "public long lastCumulativeTime()\r\n/* 234: */ {\r\n/* 235:434 */ return this.lastCumulativeTime;\r\n/* 236: */ }", "public static long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public int getExtraTimeGiven()\r\n {\r\n return extraTimeGiven;\r\n }", "public long getNextTime() {\r\n if (super.getNextTime() == 0) {\r\n return 0;\r\n }\r\n Object obj = this._queue;\r\n if (obj != null) {\r\n if (obj instanceof LockFreeTaskQueueCore) {\r\n if (!((LockFreeTaskQueueCore) obj).isEmpty()) {\r\n return 0;\r\n }\r\n } else if (obj == EventLoop_commonKt.CLOSED_EMPTY) {\r\n return LongCompanionObject.MAX_VALUE;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue != null) {\r\n DelayedTask delayedTask = (DelayedTask) delayedTaskQueue.peek();\r\n if (delayedTask != null) {\r\n long j = delayedTask.nanoTime;\r\n TimeSource timeSource = TimeSourceKt.getTimeSource();\r\n return RangesKt.coerceAtLeast(j - (timeSource != null ? timeSource.nanoTime() : System.nanoTime()), 0);\r\n }\r\n }\r\n return LongCompanionObject.MAX_VALUE;\r\n }", "protected long getLastMsTime() {\r\n return lastMsTime;\r\n }", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }", "private long getCpuTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() : 0L;\n }", "public long getSysUpTime() {\n return sysUpTime;\n }", "public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}", "public long getElapsedTime() {\n\t\treturn this.getTime();\n\t}", "long getCurrentTimeMs();", "int getCPU_time();", "public int getEat_time()\n\t{\n\t\treturn eat_time;\n\t}", "public static long getLastResetTime() {\n return p().lastReset;\n }", "protected long getCurrentTime() {\n return System.currentTimeMillis();\n }", "public double getTime()\n {\n long l = System.currentTimeMillis()-base;\n return l/1000.0;\n }", "public String elapsedTime() {\n return totalWatch.toString();\n }", "long getExecutionTime();", "public static float getCurrentTime(){\n return (float)(System.currentTimeMillis()-t0)/1000.0f;\r\n }", "public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() != null) return timeoutSet.peek().getTime();\n\t\treturn eventSet.peek().getTime();\n\t}", "public double getSetupTime() {\n //SCT: 219 If LGS is in use, the setup is 10 minutes more than when the NGS is in use.\n //The setup overhead is instrument specific, so we just return the extra overhead for\n //using LGS here. Instrument code should call this method to take into account the cost\n //of using Altair\n if (getGuideStarType() == GuideStarType.LGS) {\n return 10.0 * 60;\n }\n return 0.0;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }", "public long getLastTouchMillis()\n {\n return m_dtLastUse;\n }", "public int getSimulationTime() {\n return clock.getTimeCount();\n }", "public Long getFastestTime()\r\n {\r\n return this.fastestTime;\r\n }", "long getElapsedTime();", "private long getSleepTime()\n {\n return sleepTime;\n }", "public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}", "public long getCurrentWallClockTime() {\n return System.currentTimeMillis() - startWallClockTime;\n }", "private int micRecTime(long freeSpace) {\n\n return (int) (freeSpace / 5898240);\n }", "public long getLastCheckTimeMillis() {\n return this.lastCheckTimeMillis;\n }", "private long calculatePostTime() {\n return System.currentTimeMillis();\n }", "public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}", "long elapsedTime();", "com.google.protobuf.Timestamp getCurrentStateTime();", "public double getReadyTime()\n {\n if (scheduledOPs.isEmpty())\n {\n return 0;\n\n }else{\n\n \t//Get latest scheduled op's completion time as ready time\n return scheduledOPs.get(scheduledOPs.size() - 1).getCompletionTime();\n }\n }", "public double CPUServiceTime()\r\n\t{\r\n\t\treturn Math.random()* (30.0 - 10.0) + 10.0;\r\n\t}" ]
[ "0.6620968", "0.65307534", "0.65272456", "0.650083", "0.64838195", "0.64603865", "0.6455522", "0.6423747", "0.64162713", "0.6381466", "0.63689965", "0.6338559", "0.6313878", "0.6294641", "0.62833464", "0.62833464", "0.6283203", "0.6256622", "0.6251618", "0.6242261", "0.62309796", "0.6222835", "0.619922", "0.61920255", "0.61913776", "0.6184608", "0.6182161", "0.61813474", "0.6179583", "0.616924", "0.61641186", "0.6157029", "0.6147152", "0.6125401", "0.6124584", "0.6116837", "0.611315", "0.6112991", "0.61120224", "0.61077464", "0.60880613", "0.60850674", "0.607551", "0.6074802", "0.6065998", "0.6065025", "0.60496116", "0.6043701", "0.60375345", "0.6035018", "0.6023649", "0.6022252", "0.60213286", "0.60180295", "0.60144377", "0.60137695", "0.6012512", "0.60007167", "0.59881914", "0.59849054", "0.5977984", "0.5975823", "0.5974137", "0.5973107", "0.59728396", "0.59666973", "0.59659356", "0.59647745", "0.596367", "0.5961466", "0.595969", "0.59492195", "0.5948537", "0.5943377", "0.59333783", "0.59322417", "0.5929824", "0.5923734", "0.59236723", "0.592272", "0.5922309", "0.5914391", "0.5914028", "0.5913911", "0.5912675", "0.5910572", "0.59084576", "0.59027886", "0.58994406", "0.5898887", "0.58979213", "0.5897048", "0.5896343", "0.58944744", "0.5894281", "0.58941835", "0.58839494", "0.58807665", "0.5878346", "0.58755726" ]
0.7265646
0
It returns the last keyingtime time used by the emulator, which means the time used by the operator to fill a form.
public long getKeyingTime() { return (keyTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "public int getScopeTime()\n{\n // If scope time not explicitly set, get time prior to given time\n if(_scopeTime==null) {\n List <Integer> keyFrames = getKeyFrameTimes();\n int index = Collections.binarySearch(keyFrames, getTime());\n if(index<0) index = -index - 2; else index--;\n return index>=0? keyFrames.get(index) : 0;\n }\n \n // Return scope time\n return _scopeTime;\n}", "public long getTime() {\r\n \treturn time;\r\n }", "public static long getLastResetTime() {\n return p().lastReset;\n }", "long getCurrentTimeMs();", "public int getLastTimetable() {\n return lastTimetable;\n }", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public long getTimeOfLastValuesChanged();", "public static int getTime() {\n\t\treturn time;\n\t}", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "public int getTime() {\r\n return time;\r\n }", "public long getTime() {\n return time;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n\t\treturn time;\n\t}", "public int getTime() {\n\t\treturn time;\n\t}", "public int getTime() { return _time; }", "public static long getTime() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "com.google.protobuf.Timestamp getCurrentStateTime();", "public long getEventTime();", "double getClientTime();", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "long getCurrentTime() {\n if (dm == null) {\n return -1;\n }\n return DLockService.getLockTimeStamp(dm);\n }", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public int getEnter_time()\n\t{\n\t\treturn enter_time;\n\t}", "public static long getNowFullTime() {\n\t\tTime time = new Time();\n\t\ttime.setToNow();\n\t\tString fullTime = time.format2445();\n\t\treturn Long.parseLong(fullTime.substring(0, 8) + fullTime.substring(9));\n\t}", "public Long getTime() {\n return time;\n }", "long getCurrentTimeMs() {\n return System.currentTimeMillis();\n }", "public long getTime() {\n return _time;\n }", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "public Integer getGameUseTime() {\n return gameUseTime;\n }", "public synchronized static int getTime() {\n\t\treturn time;\n\t}", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "@Override\n public long getTimeNeeded() {\n return timeNeeded;\n }", "public static TimeKeeper getTimeKeeper() {\n\t\treturn TIME_KEEPER;\n\t}", "long getRetrievedTime();", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public synchronized String getTime() {\n\t\treturn time;\n\t}", "public static long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public int getMainMemoryAccessTime() { return Integer.parseInt(mainMemoryAccessTime.getText()); }", "public int getTime() {\n\n\t\treturn time;\n\t}", "public synchronized long getTime() {\n return -1L;\n }", "public void newTimeKey() {\r\n\t\ttimeKeyA = System.nanoTime();\r\n\t}", "public double getTime() { return time; }", "private static long getCurrentTime() {\n return (new Date()).getTime();\n }", "public int getTimeToAtk() {\r\n return timeToAtk;\r\n }", "public double getTime() {return _time;}", "private long timeNow()\n {\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return (System.currentTimeMillis() * 1000L) + DUTC.get() * 1000000L + 3506716800000000L;\n }", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public static long time() {\n return date().getTime();\n }", "@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}", "public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }", "public Long getChecktime() {\n return checktime;\n }", "public final long getTime () {\n return time;\n }", "@Override\n public long getTime() {\n return time;\n }", "public static long getTime() \r\n {\r\n return System.nanoTime(); \r\n }", "public static int getNowTime() {\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HHmmss\");\n\t\treturn Integer.parseInt(timeFormat.format(new Date()));\n\t}", "public Float getUsedtime() {\n return usedtime;\n }", "public String getTime() {\r\n\t\treturn time;\r\n\t}", "public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}", "public double getHoldTime();", "public String getTime() {\n\t\treturn time;\n\t}", "public long getTime(){\n return this.time;\n }", "int getTime();", "int getTime();", "long getLastAccessedTime();", "public static long now() {\n return System.nanoTime();\n }", "private long getUserTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : 0L;\n }", "public long getTime();", "int getIO_time();", "private long now() {\n\treturn System.currentTimeMillis();\n }", "public long getSimTime() {\n\t return now;\n\t}", "private long getCurrentTimeSetting() {\n String\n dateString = mTextDate.getText().toString(),\n timeString = mTextClock.getText().toString();\n return DatetimeUtils.parseEpochTime(dateString, timeString);\n }", "private long baseTime() {\n return Bytes.getUnsignedInt(row, tsdb.metrics.width());\n }" ]
[ "0.71597624", "0.70427054", "0.67308635", "0.66679525", "0.664312", "0.6598873", "0.6574712", "0.6572016", "0.656378", "0.65418494", "0.65418494", "0.65275455", "0.65154046", "0.6509836", "0.6509662", "0.65066844", "0.64985585", "0.64985585", "0.64985585", "0.6479624", "0.6479624", "0.6479624", "0.6476814", "0.6476814", "0.64740044", "0.64623916", "0.645025", "0.64501816", "0.64441127", "0.6441455", "0.6441455", "0.64382046", "0.64368236", "0.64324397", "0.6432051", "0.64283264", "0.6425682", "0.6418275", "0.6417032", "0.6417032", "0.6417032", "0.6417032", "0.6417032", "0.6417032", "0.6417032", "0.6417032", "0.6417032", "0.6417032", "0.6417032", "0.6417032", "0.6412457", "0.64073694", "0.6403704", "0.63999665", "0.63989204", "0.6396595", "0.63957113", "0.63957113", "0.63957113", "0.63957113", "0.63957113", "0.63957113", "0.6381541", "0.63791865", "0.63757133", "0.6368348", "0.6366793", "0.63665587", "0.6361657", "0.6350336", "0.63227075", "0.63206005", "0.6315189", "0.6302416", "0.6295655", "0.62886333", "0.6285216", "0.6280965", "0.6279637", "0.62743163", "0.62716454", "0.62626076", "0.6257751", "0.6251077", "0.62509876", "0.62483865", "0.62449473", "0.62447935", "0.62409127", "0.62392783", "0.62392783", "0.6236106", "0.6236099", "0.62346256", "0.623245", "0.6217741", "0.62168074", "0.62122935", "0.62109655", "0.62102795" ]
0.7599076
0
It stores the last thinktime used by the emulator, which means the time used by the operator to take a decision. It is important to notice that we consider this value the thinktime as specified in the TPCC plus the keyingtime to calculate this value.
public void setThinkTime(long thinkTime) { this.thinkTime = thinkTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getThinkTime() {\n\t\treturn (thinkTime);\n\t}", "public long getLastAttackTime() {\r\n\t\treturn lastAttackTime;\r\n\t}", "public Float getUsedtime() {\n return usedtime;\n }", "@Override\n public long getTimeNeeded() {\n return timeNeeded;\n }", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public void setLastUse() {\n\t\t_lastused = System.currentTimeMillis();\n\t}", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public Integer getGameUseTime() {\n return gameUseTime;\n }", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public long getLastUse() {\n\t\treturn _lastused;\n\t}", "public int getLastTimetable() {\n return lastTimetable;\n }", "public long getTimeOfLastValuesChanged();", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public int getTimeAllocated(){\n\t\treturn timeAllocated;\n\t}", "public long getSimTime() {\n\t return now;\n\t}", "public long getKeyingTime() {\n\t\treturn (keyTime);\n\t}", "public double getHoldTime();", "public double getWorkTime()\n {\n if (cFixedServiceTimed)\n {\n return (mServerConfig.mServiceTime);\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n return (cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n return (tBase + cRandom.negexp(tDelta));\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n return (tBase + cRandom.poisson(tDelta));\n\n case cHoldUniform:\n return (cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n }\n return 0.0;\n }", "private static void saveThreadLastRunTime() {\n\t\tif (mContext != null) {\n\t\t\tEditor edit = mContext.getSharedPreferences(Defines.SHARED_PREF_NAME, Context.MODE_PRIVATE).edit();\n\t\t\tedit.putLong(Defines.SHARED_PREF_THREAD_LAST_RUN_TIME, DataStore.mThreadLastRunSystemTime);\n\n\t\t\tedit.commit();\n\t\t}\n\t}", "private long calculatePostTime() {\n return System.currentTimeMillis();\n }", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "public Long getChecktime() {\n return checktime;\n }", "public long getTime() {\r\n \treturn time;\r\n }", "public long getTimeElapsed() {\r\n\t long now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pTrialTime + timePassedSinceLastUpdate;\r\n\t}", "public int getTime() { return _time; }", "float getEstimatedTime() {\n return estimated_time;\n }", "long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "@Override\n\tpublic String getUsedWalltime() {\n\t\treturn model.getUsedWalltime();\n\t}", "public int getExtraTimeGiven()\r\n {\r\n return extraTimeGiven;\r\n }", "protected long getLastMsTime() {\r\n return lastMsTime;\r\n }", "public long getLastUsed() {\n \t\treturn this.lastUsed;\n \t}", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "com.google.protobuf.Timestamp getCurrentStateTime();", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public Double getBestTime() {\n return bestTime;\n }", "public synchronized long getCurrentVirtualTime(){\r\n\r\n\t\treturn this.currentVirtualTime;\r\n\t}", "public int getTime() {\r\n return time;\r\n }", "public double getTime() {return _time;}", "public double getTime() { return time; }", "@Override\n\tpublic String getUsedCpuTime() {\n\t\treturn model.getUsedCpuTime();\n\t}", "public int getWorkRequired() {\n return time;\n }", "public int getTime() {\n\t\treturn time;\n\t}", "public int getTime() {\n\t\treturn time;\n\t}", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "@Override\n public long getTime() {\n return time;\n }", "public Integer getCusTime() {\r\n return cusTime;\r\n }", "public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}", "public double getCurrentTime() {\n\t\treturn currentTime;\n\t}", "public long lastWriteThroughput()\r\n/* 194: */ {\r\n/* 195:377 */ return this.lastWriteThroughput;\r\n/* 196: */ }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "static void setTiming(){\n killTime=(Pars.txType!=0) ? Pars.txSt+Pars.txDur+60 : Pars.collectTimesB[2]+Pars.dataTime[1]+60;//time to kill simulation\n tracksTime=(Pars.tracks && Pars.txType==0) ? Pars.collectTimesI[1]:(Pars.tracks)? Pars.collectTimesBTx[1]:100*24*60;//time to record tracks\n }", "private long timeNow()\n {\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return (System.currentTimeMillis() * 1000L) + DUTC.get() * 1000000L + 3506716800000000L;\n }", "public long getLastTouchMillis()\n {\n return m_dtLastUse;\n }", "public long getTime() {\n return time;\n }", "public int getTimeToAtk() {\r\n return timeToAtk;\r\n }", "public long getLastAliveTime() {\n\t\treturn this.aliveTime;\n\t}", "final public long getSysUpTime() {\n return sysUpTime ;\n }", "protected long getCurrentTime() {\n return System.currentTimeMillis();\n }", "public Date getLastUsed() {\r\n\t\treturn lastUsed;\r\n\t}", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public String getEstimatedTime() {\n return estimatedTime;\n }", "public long getTime() {\n return _time;\n }", "public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }", "private long getSleepTime()\n {\n return sleepTime;\n }", "int time()\n\t{\n\t\treturn totalTick;\n\t}", "public double getTimeOffset() {\r\n return lastTimeOutput;\r\n }", "public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}", "private long now() {\n\treturn System.currentTimeMillis();\n }", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "long getCurrentTimeMs() {\n return System.currentTimeMillis();\n }", "@java.lang.Override\n public long getTime() {\n return time_;\n }", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }", "public int getET()\n {\n return exTime;\n }", "public int getEnter_time()\n\t{\n\t\treturn enter_time;\n\t}", "int getEvalTm();", "public long getLastTimePlayed()\n {\n return lastTimePlayed;\n }", "public int getTime() {\n\n\t\treturn time;\n\t}", "public int getLTime() {\n return lTime;\n }", "public int getTravelTime() {\r\n return travelTime;\r\n }", "@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}", "public int getThunderTime()\n {\n return thunderTime;\n }", "public static int getTempSampleTime() {\n return tempSampleTime;\n }", "public int getTT()\n {\n return toTime;\n }", "public Date getTimeNow() {\r\n return timeNow;\r\n }", "private int micRecTime(long freeSpace) {\n\n return (int) (freeSpace / 5898240);\n }", "public Long getTime() {\n return time;\n }", "@Override\n public long curtime() {\n\n long result = -1;\n String response = \"\";\n\n try {\n request = new HttpRequest(HTTP_URL_CURTIME);\n request.configPostType(HttpRequest.MineType.VALUES);\n httpCode = request.post();\n\n if( httpCode == HttpURLConnection.HTTP_OK ) { // 정상.\n response = request.getStringResponse();\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n result = Long.valueOf( response );\n\n return result;\n }" ]
[ "0.6897211", "0.6473878", "0.64182144", "0.63783437", "0.6343831", "0.63233614", "0.63105434", "0.6310054", "0.63044786", "0.6296206", "0.61719185", "0.6150466", "0.6147983", "0.6147983", "0.61416376", "0.6123911", "0.6111973", "0.6102345", "0.61011577", "0.60959125", "0.6089086", "0.60667694", "0.6061728", "0.60484594", "0.6046691", "0.6040114", "0.6033473", "0.60194683", "0.6012386", "0.60114086", "0.6008745", "0.60081095", "0.6006153", "0.5985161", "0.5985161", "0.5985161", "0.5971133", "0.59643054", "0.59622306", "0.59537446", "0.5949563", "0.5949479", "0.5943369", "0.59271914", "0.59238875", "0.59019953", "0.5892012", "0.5892012", "0.5882039", "0.5882039", "0.58809996", "0.5880117", "0.5880104", "0.5879734", "0.58785266", "0.58685976", "0.58685976", "0.58685976", "0.58682376", "0.58649117", "0.58599824", "0.5859659", "0.58596385", "0.5849292", "0.5848453", "0.5845964", "0.5838672", "0.5838067", "0.5838067", "0.5838067", "0.5838067", "0.5838067", "0.5838067", "0.58378255", "0.5832661", "0.5822068", "0.5821962", "0.5818828", "0.5816419", "0.5812199", "0.5811615", "0.5807725", "0.5802338", "0.58004034", "0.57982695", "0.5795093", "0.5793096", "0.5787182", "0.5785207", "0.57843757", "0.5781175", "0.5781035", "0.5777274", "0.57725525", "0.5770105", "0.5766423", "0.57655424", "0.5763101", "0.5762782", "0.57585764", "0.5755457" ]
0.0
-1
It stores the last keyingtime time used by the emulator, which means the time used by the operator to fill a form.
public void setKeyingTime(long keyTime) { this.keyTime = keyTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void newTimeKey() {\r\n\t\ttimeKeyA = System.nanoTime();\r\n\t}", "public long getKeyingTime() {\n\t\treturn (keyTime);\n\t}", "public int getTime() { return _time; }", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\r\n \treturn time;\r\n }", "public long getTimeOfLastValuesChanged();", "public double getTime() {return _time;}", "@Override\n public long getTime() {\n return time;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime(){\n return this.time;\n }", "public void mo23018c() {\n this.f26122b.edit().putLong(\"last.last.show.attend\", System.currentTimeMillis()).apply();\n }", "public int getEnter_time()\n\t{\n\t\treturn enter_time;\n\t}", "@Override\n public long getTimeNeeded() {\n return timeNeeded;\n }", "public double getTime() { return time; }", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public int getTime() {\r\n return time;\r\n }", "public long getTime() {\n return _time;\n }", "public long getTime() {\n return time;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public Long getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "private static void saveThreadLastRunTime() {\n\t\tif (mContext != null) {\n\t\t\tEditor edit = mContext.getSharedPreferences(Defines.SHARED_PREF_NAME, Context.MODE_PRIVATE).edit();\n\t\t\tedit.putLong(Defines.SHARED_PREF_THREAD_LAST_RUN_TIME, DataStore.mThreadLastRunSystemTime);\n\n\t\t\tedit.commit();\n\t\t}\n\t}", "public int getTime() {\n\t\treturn time;\n\t}", "public int getTime() {\n\t\treturn time;\n\t}", "public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }", "@java.lang.Override\n public long getTime() {\n return time_;\n }", "long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "public synchronized String getTime() {\n\t\treturn time;\n\t}", "public static int getTime() {\n\t\treturn time;\n\t}", "public int getMainMemoryAccessTime() { return Integer.parseInt(mainMemoryAccessTime.getText()); }", "com.google.protobuf.Timestamp getCurrentStateTime();", "private long now() {\n\treturn System.currentTimeMillis();\n }", "public synchronized static int getTime() {\n\t\treturn time;\n\t}", "@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}", "@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}", "public String getTime() {\r\n\t\treturn time;\r\n\t}", "public Date getTimeNow() {\r\n return timeNow;\r\n }", "public int getTime() {\n\n\t\treturn time;\n\t}", "public void setTime(){\n Date currentDate = new Date();\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putLong(\"WAIT_TIME\", currentDate.getTime() + 1800000); //30 min\n editor.commit();\n }", "public String getTime() {\n\t\treturn time;\n\t}", "public int getLastTimetable() {\n return lastTimetable;\n }", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "@Override\n\tpublic Map<String, Object> getCurrentTime() {\n\t\treturn null;\n\t}", "public Date getInputTime() {\n return inputTime;\n }", "public Date getInputTime() {\n return inputTime;\n }", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public Long getChecktime() {\n return checktime;\n }", "public static TimeKeeper getTimeKeeper() {\n\t\treturn TIME_KEEPER;\n\t}", "public Date time() {\n return _time;\n }", "@Array({9}) \n\t@Field(24) \n\tpublic Pointer<Byte > InsertTime() {\n\t\treturn this.io.getPointerField(this, 24);\n\t}", "public BigInteger getTime() {\n\t\treturn time;\n\t}", "double getClientTime();", "public Date time() {\n return _time;\n }", "public Date time() {\n return _time;\n }", "private static long getCurrentTime() {\n return (new Date()).getTime();\n }", "public double getTime() {\n return this.time;\n }", "public String getTime() {\n return time;\n }", "public final long getTime () {\n return time;\n }", "public int getTimeToAtk() {\r\n return timeToAtk;\r\n }", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "public Date getTime() {\r\n\t\treturn time;\r\n\t}", "public static long getLastResetTime() {\n return p().lastReset;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n\t\treturn time;\n\t}", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public Integer getGameUseTime() {\n return gameUseTime;\n }", "public void setcurrent_time() {\n\t\tthis.current_time = LocalTime.now();\n\t}", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public Date getLastTime() {\n return lastTime;\n }", "@Override\n\tpublic long getCurrentTime() {\n\t\treturn 0;\n\t}", "public int getLTime() {\n return lTime;\n }", "public String getTime() {\n return this.time;\n }", "public String getTime(){\n return time;\n }", "public void mo23021d() {\n this.f26122b.edit().putLong(\"last.refresh.otherapp\", System.currentTimeMillis()).apply();\n }", "long getCurrentTimeMs() {\n return System.currentTimeMillis();\n }" ]
[ "0.709578", "0.7034085", "0.65763694", "0.64179975", "0.6390942", "0.6390942", "0.6390942", "0.637632", "0.6357209", "0.6346035", "0.62764865", "0.6262143", "0.6262143", "0.6256038", "0.6240984", "0.6232016", "0.62232107", "0.62112075", "0.621014", "0.62029785", "0.6200196", "0.6195605", "0.61842847", "0.61842847", "0.61842847", "0.61842847", "0.61842847", "0.61842847", "0.61703694", "0.61613744", "0.61496097", "0.61496097", "0.61496097", "0.6136374", "0.6120559", "0.6120559", "0.6120255", "0.61130023", "0.60997766", "0.60976887", "0.60737723", "0.6065589", "0.60579705", "0.6035011", "0.60200286", "0.6009611", "0.5994786", "0.5969886", "0.5967898", "0.5961862", "0.59602493", "0.59472185", "0.5942293", "0.59418803", "0.59418803", "0.59418803", "0.59418803", "0.5937544", "0.5937544", "0.5937544", "0.593462", "0.59339696", "0.59339696", "0.59333396", "0.59333396", "0.592657", "0.59229606", "0.5916006", "0.59081244", "0.5906627", "0.5899314", "0.5891823", "0.5891823", "0.5883489", "0.58791924", "0.58788234", "0.58744234", "0.58730745", "0.587271", "0.5868937", "0.5865271", "0.5864767", "0.5864767", "0.5864767", "0.5864767", "0.58612573", "0.5860206", "0.5860206", "0.5860206", "0.58394283", "0.58392984", "0.58357143", "0.5833669", "0.5818618", "0.58180594", "0.58127874", "0.58121467", "0.5811363", "0.5804463", "0.5802836" ]
0.6209963
19
It defines the trace file used to log information.
public void setTraceInformation(String trace) { traceInformation = trace; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTraceFile(String fileName)\r\n {\r\n this.filename = fileName;\r\n }", "public TraceLogger(File baseDir) {\n\t\n\tthis(null, baseDir);\n }", "public abstract void logTraceTime(File file, String description);", "void setLogFile(File log);", "void setupFileLogging();", "abstract protected String getLogFileName();", "LogFile(File file)\n {\n this.file = file;\n }", "public static String getLogFilesPath() {\r\n return new File(TRACELOG).getAbsolutePath();\r\n }", "private void logToFile() {\n }", "public void setLogFile(String logFile) {\n this.logFile = logFile;\n }", "public void setLogFile(String logFile)\r\n\t{\r\n\t\tm_logFile = logFile;\r\n\t}", "@DISPID(19)\r\n\t// = 0x13. The runtime will prefer the VTID if present\r\n\t@VTID(21)\r\n\tjava.lang.String logFilename();", "public void setLogFile(String logFile) {\n agentConfig.setLogFile(logFile);\n logConfigChanged();\n }", "void setLoggerConfigFileName(String fileName);", "Path getLogFilePath();", "public void setLogFile(String filename) throws IOException {\n\t\tlogger.setLogfilePrefix(filename);\n\t}", "public String genLogFilePath() {\n\n\t\tString logFileName = generateFileName();\n\t\tString logFilePath = FileIoUtils.getLogFilePathPrefix(logFileName)\n\t\t\t\t+ \"/\" + logFileName;\n\t\treturn logFilePath;\n\n\t}", "public Log(String fp)\n {\n this.filePath = fp;\n\n open();\n }", "public void dumpLog(String filename){\n }", "private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }", "public void setCallLogsDatabaseFile(String path);", "@Override\n\tpublic String getLogFileName() {\n\t\treturn model.getLogFileName();\n\t}", "public void recordLog(){\r\n\t\tthis.finishLog(resourceFiles.getString(\"PathHepparIITestDirectory\") + \"/\" + TEST_FILE_NAME); \r\n\t}", "public void set_log_prefixes(String file, int line) {\r\n if(GlobalOptions.showLogOrigin) {\r\n String adjFile = file;\r\n newline_prefix = adjFile + \"::\"+line+\": \";\r\n }\r\n else\r\n newline_prefix = \"\";\r\n wrap_prefix = newline_prefix+ WRAP_INDENT;\r\n }", "static void trace(final String method, final String fileName, final Object o) {\n\n if (SysProperties.TRACE_IO) {\n System.out.println(\"FileUtils.\" + method + \" \" + fileName + \" \" + o);\n }\n }", "public String getLogFile() {\n return logFile;\n }", "private void dbgTrace(String trace) {\n GenUtils.logCat(tag, trace);\n GenUtils.logMessageToFile(\"SessionV2.log\", trace);\n }", "private static void appendToTraceFile(Integer runId, String traceString ) throws java.io.FileNotFoundException,UnsupportedEncodingException{\n\n\t\t// writing the trace report\n\t\t// <inputFilename>_<method>_<cutoff>_<runID>*.sol\n\t\tString fileName = String.format(\"%s_%s_%.0f\",Project.name,Project.method,Project.cutoffTimeSeconds);\n\t\t\t\n\t\tif ( runId != -1 ){\n\t\t\tfileName = fileName +\"_\"+runId+\".trace\";\n\t\t} else {\n\t\t\tfileName = fileName +\".trace\";\n\t\t}\n\n\t\tPrintWriter repWriter = new PrintWriter(new FileOutputStream(fileName,true));\n\n\t\trepWriter.printf(\"%s\\n\",traceString);\n\n\t repWriter.close();\n\n\t}", "private String setFileName() {\n Calendar c = Calendar.getInstance();\n\n String LOG = \"\";\n\n LOG += c.get(Calendar.YEAR);\n\n if (c.get(Calendar.MONTH) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MONTH) + 1;\n\n if (c.get(Calendar.DATE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.DATE);\n\n if (c.get(Calendar.HOUR_OF_DAY) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.HOUR_OF_DAY);\n\n if (c.get(Calendar.MINUTE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MINUTE);\n\n LOG += \".csv\";\n\n return LOG;\n }", "public void setTraceId(String traceId) {\n\n this.traceId = traceId;\n\n }", "@Override\n public String getTrace() {\n return trace;\n }", "public static LogType TRACE()\n {\n if (g_oTrace == null)\n {\n try\n {\n g_oTrace = new LogType(\"TRACE\", 40);\n }\n catch (Goliath.Exceptions.InvalidParameterException ex)\n {}\n }\n return g_oTrace;\n }", "public void setLoggingToFile(boolean loggingToFile) {\n loggingToFileChecked = true;\n this.loggingToFile = loggingToFile;\n }", "public FileLogger(String fileName){\r\n\t\tthis(fileName, false);\r\n\t}", "private void writeTrace()\r\n {\r\n TGCreator creator = new TGCreator();\r\n TGTrace trace = creator.createTrace(JVM.getVM(), this.stateGraph);\r\n TraceGraphWriter tgWriter = new TraceGraphWriter(trace);\r\n\r\n if (this.traceCompressed)\r\n {\r\n this.filename += ITraceConstants.ZIP_FILE_SUFFIX;\r\n tgWriter.saveCompressed(new File(this.filename));\r\n }\r\n else\r\n {\r\n this.filename += ITraceConstants.XML_FILE_SUFFIX;\r\n tgWriter.save(new File(this.filename));\r\n }\r\n\r\n SymbolicExecutionTracerPlugin.log(Status.INFO,\r\n \"Symbolic Execution Tracer wrote \" + this.numEndStates\r\n + \" traces to \" + this.filename);\r\n }", "public String getTrace() {\n return trace;\n }", "private static void printTrace(Integer runId, String traceString ) throws java.io.FileNotFoundException,UnsupportedEncodingException{\n\n\t\t// writing the trace report\n\t\t// <inputFilename>_<method>_<cutoff>_<runID>*.sol\n\t\tString fileName = String.format(\"%s_%s_%.0f\",Project.name,Project.method,Project.cutoffTimeSeconds);\n\n\t\tif ( runId != -1 ){\n\t\t\tfileName = fileName +\"_\"+runId+\".trace\";\n\t\t} else {\n\t\t\tfileName = fileName +\".trace\";\n\t\t}\n\n\t\tPrintWriter repWriter = new PrintWriter(fileName, \"UTF-8\");\n\n\t\trepWriter.printf(\"%s\\n\",traceString);\n\n\t repWriter.close();\n\n\t}", "void write(TraceList traceList,File file) throws IOException;", "@Test\n public void testSetFilePath() {\n YConnectLogger.setFilePath(getResourcePath(\"/log4j.xml\"));\n YConnectLogger.debug(\"Some Object\",\n \"should put a message with the class name.\");\n }", "public void setRecordFile(String file);", "private static void createLogFile() {\n try {\n String date = new Date().toString().replaceAll(\":\", \"-\");\n logFile = new FileWriter(\"bio-formats-test-\" + date + \".log\");\n TestLogger log = new TestLogger(logFile);\n LogTools.setLog(log);\n }\n catch (IOException e) { }\n }", "public traceProperties() { \n //setProperty(\"WorkingDirectory\",\"null\");\n //setProperty(\"situated\",\"false\"); \n \n }", "@Override\n protected void startup() throws Throwable {\n\n\tsetTraceBase(baseDir);\n\n }", "Logger loggerArrangement(String logName, String filePath, LogeLevel logLevel);", "boolean k2h_set_debug_file(String filepath);", "public AgreementFileLog()\n {\n m_fileLog = new AlternateFileLogger(AGREEMENT_LOG, 10000000, 2);\n m_fileLog.setLogLevel(DynamicConfiguration.getInstance().getAgreementLogLevel());\n m_fileLog.setLogType(LogType.AGREEMENT);\n }", "private void openLogFile()\r\n {\n try\r\n {\r\n GregorianCalendar gc = new GregorianCalendar();\r\n runTS = su.reformatDate(\"now\", null, DTFMT);\r\n logFile = new File(logDir + File.separator + runTS + \"_identifyFTPRequests_log.txt\");\r\n logWriter = new BufferedWriter(new FileWriter(logFile));\r\n String now = su.DateToString(gc.getTime(), DTFMT);\r\n writeToLogFile(\"identifyFTPRequests processing started at \" +\r\n now.substring(8, 10) + \":\" + now.substring(10, 12) + \".\" +\r\n now.substring(12, 14) + \" on \" + now.substring(6, 8) + \"/\" +\r\n now.substring(4, 6) + \"/\" + now.substring(0, 4));\r\n }\r\n catch (Exception ex)\r\n {\r\n System.out.println(\"Error opening log file: \" + ex.getMessage());\r\n System.exit(1);\r\n }\r\n }", "public void setFileId (String fileId) {\n this.fileId = fileId;\n logData.setSourceId (fileId);\n }", "public void testTraceFile02() {\n \n \t\tfinal File traceFile = OSGiTestsActivator.getContext().getDataFile(getName() + \".trace\"); //$NON-NLS-1$\n \t\tTestDebugTrace debugTrace = this.createDebugTrace(traceFile);\n \t\tTraceEntry[] traceOutput = null;\n \t\tfinal String exceptionMessage1 = \"An error 1\"; //$NON-NLS-1$\n \t\tfinal String exceptionMessage2 = \"An error 2\"; //$NON-NLS-1$\n \t\tfinal String exceptionMessage3 = \"An error 3\"; //$NON-NLS-1$\n \t\ttry {\n \t\t\tdebugTrace.trace(\"/debug\", \"testing 1\", new Exception(exceptionMessage1)); //$NON-NLS-1$ //$NON-NLS-2$ \n \t\t\tdebugTrace.trace(\"/notset\", \"testing 2\", new Exception(exceptionMessage2)); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\tdebugTrace.trace(\"/debug\", \"testing 3\", new Exception(exceptionMessage3)); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\ttraceOutput = readTraceFile(traceFile); // Note: this call will also delete the trace file\n \t\t} catch (InvalidTraceEntry invalidEx) {\n \t\t\tfail(\"Failed 'DebugTrace.trace(option, message, Throwable)' test as an invalid trace entry was found. Actual Value: '\" + invalidEx.getActualValue() + \"'.\", invalidEx); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t}\n \n \t\tfinal StringBuffer expectedThrowableText1 = new StringBuffer(\"java.lang.Exception: \"); //$NON-NLS-1$\n \t\texpectedThrowableText1.append(exceptionMessage1);\n \t\texpectedThrowableText1.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\texpectedThrowableText1.append(DebugOptionsTestCase.TAB_CHARACTER);\n \t\texpectedThrowableText1.append(\"at org.eclipse.osgi.tests.debugoptions.DebugOptionsTestCase.testTraceFile02(DebugOptionsTestCase.java:\"); //$NON-NLS-1$\t\t\n \n \t\tassertEquals(\"Wrong number of trace entries\", 2, traceOutput.length); //$NON-NLS-1$\n \t\tassertEquals(\"Thread name is incorrect\", Thread.currentThread().getName(), traceOutput[0].getThreadName()); //$NON-NLS-1$\n \t\tassertEquals(\"Bundle name is incorrect\", getName(), traceOutput[0].getBundleSymbolicName()); //$NON-NLS-1$\n \t\tassertEquals(\"option-path value is incorrect\", \"/debug\", traceOutput[0].getOptionPath()); //$NON-NLS-1$//$NON-NLS-2$\n \t\tassertEquals(\"class name value is incorrect\", DebugOptionsTestCase.class.getName(), traceOutput[0].getClassName()); //$NON-NLS-1$\n \t\tassertEquals(\"method name value is incorrect\", \"testTraceFile02\", traceOutput[0].getMethodName()); //$NON-NLS-1$ //$NON-NLS-2$\n \t\tassertEquals(\"trace message is incorrect\", \"testing 1\", traceOutput[0].getMessage()); //$NON-NLS-1$ //$NON-NLS-2$\n \t\tassertNotNull(\"throwable text should not be null\", traceOutput[0].getThrowableText()); //$NON-NLS-1$\n \t\tif (!traceOutput[0].getThrowableText().startsWith(expectedThrowableText1.toString())) {\n \t\t\tfinal StringBuffer errorMessage = new StringBuffer(\"The expected throwable text does not start with the actual throwable text.\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(\"Expected\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(\"--------\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(expectedThrowableText1.toString());\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(\"Actual\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(\"--------\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(traceOutput[0].getThrowableText());\n \t\t\tfail(errorMessage.toString());\n \t\t}\n \t\tassertNotNull(\"throwable should not be null\", traceOutput[0].getThrowableText()); //$NON-NLS-1$\n \t\tassertEquals(\"Wrong number of trace entries for trace without an exception\", 2, traceOutput.length); //$NON-NLS-1$\n \n \t\tfinal StringBuffer expectedThrowableText2 = new StringBuffer(\"java.lang.Exception: \"); //$NON-NLS-1$\n \t\texpectedThrowableText2.append(exceptionMessage3);\n \t\texpectedThrowableText2.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\texpectedThrowableText2.append(DebugOptionsTestCase.TAB_CHARACTER);\n \t\texpectedThrowableText2.append(\"at org.eclipse.osgi.tests.debugoptions.DebugOptionsTestCase.testTraceFile02(DebugOptionsTestCase.java:\"); //$NON-NLS-1$\t\t\n \n \t\tassertEquals(\"Thread name is incorrect\", Thread.currentThread().getName(), traceOutput[1].getThreadName()); //$NON-NLS-1$\n \t\tassertEquals(\"Bundle name is incorrect\", getName(), traceOutput[1].getBundleSymbolicName()); //$NON-NLS-1$\n \t\tassertEquals(\"option-path value is incorrect\", \"/debug\", traceOutput[1].getOptionPath()); //$NON-NLS-1$//$NON-NLS-2$\n \t\tassertEquals(\"class name value is incorrect\", DebugOptionsTestCase.class.getName(), traceOutput[1].getClassName()); //$NON-NLS-1$\n \t\tassertEquals(\"method name value is incorrect\", \"testTraceFile02\", traceOutput[1].getMethodName()); //$NON-NLS-1$ //$NON-NLS-2$\n \t\tassertEquals(\"trace message is incorrect\", \"testing 3\", traceOutput[1].getMessage()); //$NON-NLS-1$ //$NON-NLS-2$\n \t\tassertNotNull(\"throwable text should not be null\", traceOutput[1].getThrowableText()); //$NON-NLS-1$\n \t\tif (!traceOutput[1].getThrowableText().startsWith(expectedThrowableText2.toString())) {\n \t\t\tfinal StringBuffer errorMessage = new StringBuffer(\"The expected throwable text does not start with the actual throwable text.\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(\"Expected\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(\"--------\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(expectedThrowableText2.toString());\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(\"Actual\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(\"--------\"); //$NON-NLS-1$\n \t\t\terrorMessage.append(DebugOptionsTestCase.LINE_SEPARATOR);\n \t\t\terrorMessage.append(traceOutput[1].getThrowableText());\n \t\t\tfail(errorMessage.toString());\n \t\t}\n \t\tassertNotNull(\"throwable should not be null\", traceOutput[1].getThrowableText()); //$NON-NLS-1$\n \t\t// delete the trace file\n \t\ttraceFile.delete();\n \t}", "public void SetRingbackFile(String filename){\n FunctionLogger logger=new FunctionLogger(\"SetRingbackFile\",this,myLogger);\n logger.args(filename);\n \n RingbackFile = filename;\n }", "public String getTraceId() {\n return traceId;\n }", "public Auditor () {\n\n\t\t// Create a new log file without deleting existing logs. Use the current time. \n\t\ttry {\n\t\t\tlog = new File( \"log: \" + Double.toString( new Date().getTime()) + \".txt\" );\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public String getLogFile() {\n return agentConfig.getLogFile();\n }", "public void configLog()\n\t{\n\t\tlogConfigurator.setFileName(Environment.getExternalStorageDirectory() + File.separator + dataFileName);\n\t\t// Set the root log level\n\t\t//writerConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\t///writerConfigurator.setMaxFileSize(1024 * 1024 * 500);\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 1024);\n\t\t// Set log level of a specific logger\n\t\t//writerConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setImmediateFlush(true);\n\t\t//writerConfigurator.configure();\n\t\tlogConfigurator.configure();\n\n\t\t//gLogger = Logger.getLogger(this.getClass());\n\t\t//gWriter = \n\t\tgLogger = Logger.getLogger(\"vdian\");\n\t}", "public void detailTestPath() {\n // Get test run file\n File report_path = new File(System.getProperty(PATH) + TESTNG);\n // Check if the path exists\n if (!report_path.exists()) {\n System.out.println(SEE_THE_DETAIL_TEST__REPORT_ + System.getProperty(PATH) + LOGXML);\n // Get error log file\n File path = new File(System.getProperty(PATH) + ERROR_LOGLOGTXT);\n // If file exists then display error log file path\n if (path.exists()) {\n System.out.println(SEE_THE_DETAIL_ERROR__REPORT_ + System.getProperty(PATH) + ERROR_LOGLOGTXT);\n }\n }\n }", "public Logger2 (String logFileName) {\n this.logFileName = logFileName;\n }", "public void testTraceFile09() {\n \n \t\tfinal File traceFile = OSGiTestsActivator.getContext().getDataFile(getName() + \".trace\"); //$NON-NLS-1$\n \t\tTestDebugTrace debugTrace = this.createDebugTrace(traceFile);\n \t\tdebugOptions.setOption(getName() + \"/debug|path\", \"true\");\n \t\tTraceEntry[] traceOutput = null;\n \t\ttry {\n \t\t\tdebugTrace.trace(\"/debug|path\", \"A message with a | character.\");\n \t\t\tdebugTrace.trace(\"/debug|path\", \"|A message with | multiple || characters.|\");\n \t\t\ttraceOutput = readTraceFile(traceFile); // Note: this call will also delete the trace file\n \t\t} catch (InvalidTraceEntry invalidEx) {\n \t\t\tfail(\"Failed 'DebugTrace.trace(option, message)' test as an invalid trace entry was found. Actual Value: '\" + invalidEx.getActualValue() + \"'.\", invalidEx); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t}\n \t\tassertEquals(\"Wrong number of entries\", 2, traceOutput.length);\n\t\tString optionPath = decodeString(traceOutput[0].getOptionPath());\n\t\tString message = decodeString(traceOutput[0].getMessage());\n \t\tassertEquals(\"option-path value is incorrect\", \"/debug|path\", optionPath); //$NON-NLS-1$ //$NON-NLS-2$\n \t\tassertEquals(\"Trace message is not correct\", \"A message with a | character.\", message); //$NON-NLS-1$ //$NON-NLS-2$\n\t\toptionPath = decodeString(traceOutput[1].getOptionPath());\n\t\tmessage = decodeString(traceOutput[1].getMessage());\n \t\tassertEquals(\"option-path value is incorrect\", \"/debug|path\", optionPath); //$NON-NLS-1$ //$NON-NLS-2$\n \t\tassertEquals(\"Trace message is not correct\", \"|A message with | multiple || characters.|\", message); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t// delete the trace file\n \t\ttraceFile.delete();\n \t}", "public void setDebugFile(String fileName) {\r\n DEBUG_FILE = new File(fileName);\r\n }", "public String logFileType() {\n return this.logFileType;\n }", "private void setFile() {\n\t}", "IFileLogger log();", "@Override\n public void setLogTracer(LogTracer log) {\n\n }", "public String getLog4jFilePath(){\r\n\t\t return rb.getProperty(\"log4jFilepath\");\r\n\t}", "public static File getFileByTarget(String target) {\r\n return new File(TraceloggerConfig.getLogFilesPath() + \"\\\\\" + target + \".csv\");\r\n }", "public Trace() {\n\t}", "public static void setVTKLogFile(String fileName)\n { \n vtkFileOutputWindow output = new vtkFileOutputWindow();\n output.SetFileName(fileName);\n new vtkOutputWindow().SetInstance(output);\n }", "public SecurityLog()\n {\n String fileName = \"Log.txt\";\n File output = new File(fileName);\n if(output.exists())\n readFile(fileName);\n }", "public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public TraceLogger(Set<DataSource<E>> producers, File baseDir) {\n super(producers);\n \n setTraceBase(baseDir);\n }", "public static void loadLogFile() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"accuracytests\" + File.separator + \"Logging.xml\");\n cm.add(\"Config.xml\");\n }", "public Log()\n {\n filePath = String.format(\"log-%d.sl\", System.currentTimeMillis());\n\n open();\n }", "public static void setTrace(boolean traceOn) {\r\n\t\ttrace = traceOn;\r\n\t}", "private void configureLogging() throws FileNotFoundException, IOException {\n\t\tConfigurationSource source = new ConfigurationSource(new FileInputStream(CONFIG_LOG_LOCATION));\r\n\t\tConfigurator.initialize(null, source);\r\n\t\tlog = LogManager.getLogger(SekaiClient.class);\r\n\t}", "@Override\n\tpublic void trace(String message, Throwable t) {\n\n\t}", "public String getInputLogFilename() {\n return inputLogFilename;\n }", "public void setConfigLocation(String filename, int line)\n {\n _filename = filename;\n _line = line;\n }", "public abstract void logTraceTime();", "public Sim_reportfile (String filename) {\n this.filename = filename;\n }", "public void trace(String msg) {\n\t\tif (this.logLevel <= BackupLogger.TRACE) {\n\t\t\twrite(\"TRCE \" + msg);\n\t\t\tSystem.out.println(\"TRCE \" + msg);\n\t\t}\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void log(String msg, int level, Date date, StackTraceElement trace) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public static void setFileLoggerFormatter(Formatter formatter){\n fileLoggerFormatter = formatter;\n }", "public void setLoggerLevel(TraceLevel level) {\n\t\t//Topology.STREAMS_LOGGER.setLevel(level);\t\t\n\t\t//Topology.TOPOLOGY_LOGGER.setLevel(level); \n\t\tgetConfig().put(ContextProperties.TRACING_LEVEL, java.util.logging.Level.FINE);\t\t\n\t\tSystem.out.println(\"Streams topology logger level: \" + Topology.TOPOLOGY_LOGGER.getLevel());\n\t\t\n\t}", "public void setLogfile( String logfilename )\n {\n // guard\n {\n if( this.isopen() )\n {\n log.warn( \"Changing logfilename while logfile has already been opened.\" );\n }\n }\n\n this.logfilename = logfilename;\n }", "public String getLogfileLocation() {\n return logfileLocation;\n }", "@Override\n\tpublic File getDefaultLogFile() {\n\t\tif (SystemUtils.IS_OS_WINDOWS) {\n\t\t\tfinal File[] foundFiles = getLogDirInternal().listFiles(new FilenameFilter() {\n\t\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\t\treturn name.startsWith(\"catalina.\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tArrays.sort(foundFiles, NameFileComparator.NAME_COMPARATOR);\n\t\t\tif (foundFiles.length > 0) {\n\t\t\t\treturn foundFiles[foundFiles.length - 1];\n\t\t\t}\n\t\t}\n\t\treturn super.getDefaultLogFile();\n\t}", "public void setRecordFile(String recordFile) {\n this.recordFile = recordFile;\n }", "public void setTimeStampedLogPath(String logPath) {\n\t\tm_timeStampedLogPath = logPath;\n\t}", "private String generateFileName() {\n\t\t\n\t\treturn \"/tmp/logger.java_log\" + new Random().nextInt();\n\t}", "public void activateFileMode() {\n try {\n mFileHandler = new FileHandler(\"messagesLog/\" + System.currentTimeMillis() + \".log\");\n } catch (IOException pE) {\n pE.printStackTrace();\n }\n logger.addHandler(mFileHandler);\n }", "public void setCallLogsDatabasePath(String path);", "protected String logFile(AggregatedJob job) {\n StringBuffer sb = new StringBuffer(32);\n if (mGlobalLog) {\n // the basename of the log file is derived from the dag name\n sb.append(this.mClusteredADag.getLabel());\n } else {\n // per seqexec job name\n sb.append(job.getName());\n }\n sb.append(this.SEQEXEC_PROGRESS_REPORT_SUFFIX);\n return sb.toString();\n }", "public static void traceOn() {\r\n\t\ttraceOn = true;\r\n\t}", "private Logger configureLogging() {\r\n\t Logger rootLogger = Logger.getLogger(\"\");\r\n\t rootLogger.setLevel(Level.FINEST);\r\n\r\n\t // By default there is one handler: the console\r\n\t Handler[] defaultHandlers = Logger.getLogger(\"\").getHandlers();\r\n\t defaultHandlers[0].setLevel(Level.CONFIG);\r\n\r\n\t // Add our logger\r\n\t Logger ourLogger = Logger.getLogger(serviceLocator.getAPP_NAME());\r\n\t ourLogger.setLevel(Level.FINEST);\r\n\t \r\n\t // Add a file handler, putting the rotating files in the tmp directory \r\n\t // \"%u\" a unique number to resolve conflicts, \"%g\" the generation number to distinguish rotated logs \r\n\t try {\r\n\t Handler logHandler = new FileHandler(\"/%h\"+serviceLocator.getAPP_NAME() + \"_%u\" + \"_%g\" + \".log\",\r\n\t 1000000, 3);\r\n\t logHandler.setLevel(Level.FINEST);\r\n\t ourLogger.addHandler(logHandler);\r\n\t logHandler.setFormatter(new Formatter() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String format(LogRecord record) {\r\n\t\t\t\t\t\tString result=\"\";\r\n\t\t\t\t\t\tif(record.getLevel().intValue() >= Level.WARNING.intValue()){\r\n\t\t\t\t\t\t\tresult += \"ATTENTION!: \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd-MMM-yyyy HH:mm:ss\");\r\n\t\t\t\t\t\tDate d = new Date(record.getMillis());\r\n\t\t\t\t\t\tresult += df.format(d)+\" \";\r\n\t\t\t\t\t\tresult += \"[\"+record.getLevel()+\"] \";\r\n\t\t\t\t\t\tresult += this.formatMessage(record);\r\n\t\t\t\t\t\tresult += \"\\r\\n\";\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t } catch (Exception e) { // If we are unable to create log files\r\n\t throw new RuntimeException(\"Unable to initialize log files: \"\r\n\t + e.toString());\r\n\t }\r\n\r\n\t return ourLogger;\r\n\t }", "@Override\n\tpublic void setLogFileName(String logFileName) {\n\t\tmodel.setLogFileName(logFileName);\n\t}", "public /* synthetic */ CallLogFileProvider(File file, String str, int i, j jVar) {\n this(file, (i & 2) != 0 ? \"logs/calls\" : str);\n }", "static public void setup() throws IOException {\n Logger logger = Logger.getLogger(\"\");\n\n logger.setLevel(Level.INFO);\n Calendar cal = Calendar.getInstance();\n //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String dateStr = sdf.format(cal.getTime());\n fileTxt = new FileHandler(\"log_\" + dateStr + \".txt\");\n fileHTML = new FileHandler(\"log_\" + dateStr + \".html\");\n\n // Create txt Formatter\n formatterTxt = new SimpleFormatter();\n fileTxt.setFormatter(formatterTxt);\n logger.addHandler(fileTxt);\n\n // Create HTML Formatter\n formatterHTML = new LogHTMLFormatter();\n fileHTML.setFormatter(formatterHTML);\n logger.addHandler(fileHTML);\n }", "@Override\n public void create() throws IOException {\n BufferedReader idreader = new BufferedReader(new FileReader(trace.getAbsolutePath() + \"/id\"));\n String idline;\n //The ID file contains all signatures instrumented\n HashMap<Integer, String> idSignatures = new HashMap<>();\n while ((idline = idreader.readLine()) != null) {\n String[] k = idline.split(\" \");\n idSignatures.put(Integer.parseInt(k[0]), k[1] + \" \" + k[2]);\n }\n\n //Read the method id's from the trace\n Pattern methodPattern = Pattern.compile(\"M(\\\\d+);(\\\\d+)\\\\$\\\\$\\\\$\");\n File[] files = trace.listFiles();\n for (File file : files) {\n if (file.isFile() && file.getName().startsWith(\"log\")) {\n BufferedReader reader = new BufferedReader(new FileReader(file));\n String line;\n while ((line = reader.readLine()) != null) {\n Matcher m = methodPattern.matcher(line);\n if ( m.matches() ) {\n int id = Integer.parseInt(m.group(2));\n String signature = idSignatures.get(id);\n if ( !methodSignatures.contains(signature) ) {\n methodSignatures.add(idSignatures.get(id));\n }\n }\n }\n }\n }\n }", "public String getCallLogsDatabasePath();", "public void generateLogFile() {\n\t\tFileOperations operator = new FileOperations(path);\n\t\toperator.writeFile(buildLogContent());\n\t}", "public void trace(String msg) {\n LOGGER_BASE.trace(msg);\n }" ]
[ "0.75572014", "0.6595801", "0.6543273", "0.6456186", "0.64506984", "0.6312898", "0.62948334", "0.6206322", "0.6195825", "0.6159991", "0.6094105", "0.6068628", "0.59260505", "0.59242386", "0.5817958", "0.5811353", "0.57682794", "0.5762724", "0.575306", "0.5719888", "0.5715391", "0.5694741", "0.5680005", "0.56715775", "0.5642171", "0.5633233", "0.56277686", "0.56215745", "0.5619939", "0.5607188", "0.5602253", "0.55914533", "0.5568647", "0.5566252", "0.5554226", "0.5550729", "0.5544425", "0.5539999", "0.5527623", "0.5526433", "0.55195385", "0.55147904", "0.5495826", "0.5447614", "0.5415382", "0.54069406", "0.54017174", "0.54000306", "0.5386968", "0.5380441", "0.5374385", "0.535433", "0.53483826", "0.53341234", "0.5326441", "0.53233576", "0.53117937", "0.53025943", "0.5301086", "0.52970755", "0.52941805", "0.5292121", "0.52758557", "0.5274763", "0.5268293", "0.52637124", "0.525701", "0.52560186", "0.524131", "0.52400315", "0.52285194", "0.5219178", "0.52100134", "0.5206119", "0.5191035", "0.51898366", "0.5189422", "0.5164361", "0.5153393", "0.51515263", "0.5150132", "0.51387113", "0.5137976", "0.5135233", "0.51320785", "0.5131801", "0.5126239", "0.5119375", "0.51135397", "0.5111043", "0.5107689", "0.5101029", "0.51000077", "0.50951076", "0.5087635", "0.5085395", "0.5061343", "0.50594044", "0.50528026", "0.50301725" ]
0.58302355
14
It returns the name of the trace file used to log information.
public String getTraceInformation() { return (traceInformation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getLogFilesPath() {\r\n return new File(TRACELOG).getAbsolutePath();\r\n }", "public void setTraceFile(String fileName)\r\n {\r\n this.filename = fileName;\r\n }", "@DISPID(19)\r\n\t// = 0x13. The runtime will prefer the VTID if present\r\n\t@VTID(21)\r\n\tjava.lang.String logFilename();", "@Override\n\tpublic String getLogFileName() {\n\t\treturn model.getLogFileName();\n\t}", "public String genLogFilePath() {\n\n\t\tString logFileName = generateFileName();\n\t\tString logFilePath = FileIoUtils.getLogFilePathPrefix(logFileName)\n\t\t\t\t+ \"/\" + logFileName;\n\t\treturn logFilePath;\n\n\t}", "abstract protected String getLogFileName();", "public String getTrace() {\n return trace;\n }", "private String generateFileName() {\n\t\t\n\t\treturn \"/tmp/logger.java_log\" + new Random().nextInt();\n\t}", "@Override\n public String getTrace() {\n return trace;\n }", "public String getName() {\n return _file.getAbsolutePath();\n }", "public String getName()\n {\n return( file );\n }", "protected String logFile(AggregatedJob job) {\n StringBuffer sb = new StringBuffer(32);\n if (mGlobalLog) {\n // the basename of the log file is derived from the dag name\n sb.append(this.mClusteredADag.getLabel());\n } else {\n // per seqexec job name\n sb.append(job.getName());\n }\n sb.append(this.SEQEXEC_PROGRESS_REPORT_SUFFIX);\n return sb.toString();\n }", "public String getTraceId() {\n return traceId;\n }", "public static String fileName(File file)\n {\n if (file == Configuration.STD_OUT)\n {\n return \"standard output\";\n }\n else\n {\n try\n {\n return file.getCanonicalPath();\n }\n catch (IOException ex)\n {\n return file.getPath();\n }\n }\n }", "Path getLogFilePath();", "String getLogStackTrace();", "public String getName() {\n return dtedDir + \"/\" + filename;\n }", "public String getLogFile() {\n return logFile;\n }", "public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}", "private String getLoggerName(LoggingEvent event) {\n int index = event.getLoggerName().lastIndexOf('.');\n\n return (index > -1) ?\n event.getLoggerName().substring(index + 1) :\n event.getLoggerName();\n }", "public String getLogName() {\n return logName;\n }", "public String getLogFile() {\n return agentConfig.getLogFile();\n }", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "private String getFunctionName() {\n StackTraceElement[] sts = Thread.currentThread().getStackTrace();\n if (sts == null) {\n return null;\n }\n for (StackTraceElement st : sts) {\n if (st.isNativeMethod()) {\n continue;\n }\n if (st.getClassName().equals(Thread.class.getName())) {\n continue;\n }\n if (st.getClassName().equals(LogUtils.this.getClass().getName())) {\n continue;\n }\n return \"[ \" + Thread.currentThread().getName() + \": \"\n + st.getFileName() + \":\" + st.getLineNumber() + \" \"\n + st.getMethodName() + \" ]\";\n }\n return null;\n }", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "public abstract void logTraceTime(File file, String description);", "@Nullable public String getFileName() {\n return getSourceLocation().getFileName();\n }", "@Override\n\tpublic String getName() {\n\t\treturn new File(relativePath).getName();\n\t}", "protected String getMethodSpecificTestDataFileName() {\r\n StringBuffer result = new StringBuffer()\r\n .append(TESTDATA+\"/\")\r\n .append(getClassNameWithoutPackage())\r\n .append(\"_\")\r\n .append(getName())\r\n .append(\".xml\");\r\n return result.toString();\r\n }", "public static String getCurrentMethodName() {\n Exception e = new Exception();\n StackTraceElement trace = e.fillInStackTrace().getStackTrace()[1];\n String name = trace.getMethodName();\n String className = trace.getClassName();\n int line = trace.getLineNumber();\n return \"[CLASS:\" + className + \" - METHOD:\" + name + \" LINE:\" + line + \"]\";\n }", "public String getNameForFileSystem() {\r\n\t\treturn filename;\r\n\t}", "private String getReportName( IReportContext context, IAction action )\n \t{\n \t\tassert context != null;\n \t\tassert action != null;\n \t\tString reportName = action.getReportName( );\n \t\tIReportRunnable runnable = context.getReportRunnable( );\n \n \t\t// if WORKING_FOLDER_ACCESS_ONLY is false, return absolute path.\n \t\t// else, return relative path.\n \t\tif ( runnable != null && !ParameterAccessor.isWorkingFolderAccessOnly( ) )\n \t\t{\n \t\t\tModuleHandle moduleHandle = runnable.getDesignHandle( )\n \t\t\t\t\t.getModuleHandle( );\n \t\t\tURL url = moduleHandle.findResource( reportName, -1 );\n \t\t\tif ( url != null )\n \t\t\t{\n \t\t\t\tif ( \"file\".equals( url.getProtocol( ) ) ) //$NON-NLS-1$\n \t\t\t\t\treportName = url.getFile( );\n \t\t\t\telse\n \t\t\t\t\treportName = url.toExternalForm( );\n \t\t\t}\n \t\t}\n \t\treturn reportName;\n \t}", "public String getFileName() {\n return ScreenRecordService.getFileName();\n }", "public String getInputLogFilename() {\n return inputLogFilename;\n }", "public String getNameFile(){\n\t\t\treturn this.nameFile;\n\t\t}", "private static String getEntryName(File source, File file) throws IOException {\n\t\tint index = source.getAbsolutePath().length() + 1;\n\t\tString path = file.getCanonicalPath();\n\n\t\treturn path.substring(index);\n\t}", "public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}", "public String getFileNamingDetails();", "public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}", "protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }", "public static File getFileByTarget(String target) {\r\n return new File(TraceloggerConfig.getLogFilesPath() + \"\\\\\" + target + \".csv\");\r\n }", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "protected String logInstanceName() {\n\t\treturn getClass().getName();\n\t}", "public static String getLoggerFileName(Logger aInLogger) {\n\n org.apache.logging.log4j.core.Logger loggerImpl = (org.apache.logging.log4j.core.Logger) aInLogger;\n Appender appender = loggerImpl.getAppenders().get(\"fileLogger\");\n // Unfortunately, File is no longer an option to return, here.\n return new File(((RollingFileAppender) appender).getFileName()).getAbsolutePath();\n\n }", "String getCaller();", "protected String getLogFile(@Nullable final String descriptor) {\n final StringBuffer directory = getLogDirectory();\n final StringBuffer file = new StringBuffer();\n final String md5String;\n if (descriptor == null) {\n file.append(\"null.log\");\n md5String = \"\";\n } else {\n file.append(sanitise(descriptor.toLowerCase()));\n md5String = descriptor;\n }\n return getPath(directory, file, md5String);\n }", "public String getMethodName() {\n return LOG_TAG + \":\" + this.getClass().getSimpleName() + \".\" + new Throwable().getStackTrace()[1].getMethodName();\n }", "public String getOutputLogFilename() {\n return outputLogFilename;\n }", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }", "public String getFQN(){\n\t\treturn this.tsApp.getFQN()+\"_\"+this.tsName;\n\t}", "private String getFileName()\r\n {\r\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd__HH_mm\");\r\n \r\n String ret = new String();\r\n ret += preferences.getPreference(UserPreferences.SAVE_LOCATION_PROP);\r\n ret += format.format(new Date());\r\n \r\n String notationStr = notation.getText().trim();\r\n if (!notationStr.isEmpty()) \r\n {\r\n ret += \"__\" + notationStr.replaceAll(\" \\t/\\\\:\", \"_\");\r\n }\r\n \r\n ret += \".csv\";\r\n \r\n return ret;\r\n }", "public static LogType TRACE()\n {\n if (g_oTrace == null)\n {\n try\n {\n g_oTrace = new LogType(\"TRACE\", 40);\n }\n catch (Goliath.Exceptions.InvalidParameterException ex)\n {}\n }\n return g_oTrace;\n }", "public String getSimpleName() { return FilePathUtils.getFileName(_name); }", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}", "public String getFileName() {\n\t\treturn file.getFileName();\n\t}", "public static String getName() {\n\t\treturn _asmFileStr;\n\t}", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "public String getSecondFilename() {\n\t\tTreeMap<Double,File> tm = new TreeMap<Double,File>();\n\t\tFile file=new File(\"C:\\\\temp\");\n\t\tFile subFile[] = file.listFiles();\n\t\tint fileNum = subFile.length;\n\t\tfor (int i = 0; i < fileNum; i++) {\n\t\t Double tempDouble = new Double(subFile[i].lastModified());\n\t\t tm.put(tempDouble, subFile[i]);\n\t\t }\t \n\t\t System.out.println(\"第二个log的文件名称-->\"+tm.get(tm.lastKey()).getName());\n\t\t return tm.get(tm.lastKey()).getName();\n\t}", "public long getTraceId() {\n\t\treturn this.traceInformation.getTraceId();\n\t}", "private String getCallerInfo() {\n Optional<StackWalker.StackFrame> frame = new CallerFinder().get();\n if (frame.isPresent()) {\n return frame.get().getClassName() + \" \" + frame.get().getMethodName();\n } else {\n return name;\n }\n }", "private String fileName(ModuleReference mref) {\n URI uri = mref.location().orElse(null);\n if (uri != null) {\n if (uri.getScheme().equalsIgnoreCase(\"file\")) {\n Path file = Path.of(uri);\n return file.getFileName().toString();\n } else {\n return uri.toString();\n }\n } else {\n return \"<unknown>\";\n }\n }", "Object getTrace();", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "public String getMeasurementsFilename() throws Exception {\n\n\t// Check to make sure the directory exist. Create it if it doesn't.\n\tFile fDir = new File(sUSAGE_FILE_DIR);\n\tif (!fDir.exists()) {\n\t fDir.mkdirs();\n\t}\n\n\treturn sUSAGE_FILE + \"-\" + cqUtil.getDate(cqUtil.sUSAGE_FILE_SUFFIX);\n }", "public String getScriptName() {\n if (scriptName != null) {\n return scriptName;\n }\n\n String contextPath = getContextPath();\n if (contextPath == null) contextPath = \"\";\n return scriptName = contextPath.equals(\"/\") ? \"\" : contextPath;\n }", "public String getName() {\r\n return mFile.getName();\r\n }", "@Override\n\tpublic File getDefaultLogFile() {\n\t\tif (SystemUtils.IS_OS_WINDOWS) {\n\t\t\tfinal File[] foundFiles = getLogDirInternal().listFiles(new FilenameFilter() {\n\t\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\t\treturn name.startsWith(\"catalina.\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tArrays.sort(foundFiles, NameFileComparator.NAME_COMPARATOR);\n\t\t\tif (foundFiles.length > 0) {\n\t\t\t\treturn foundFiles[foundFiles.length - 1];\n\t\t\t}\n\t\t}\n\t\treturn super.getDefaultLogFile();\n\t}", "public String getLoggerName() {\n return \"test\";\n }", "public static String getFileName()\r\n\t{\r\n\t\tString name = \"d3_\";\r\n\t\tjava.util.Date tNow = new java.util.Date();\r\n\r\n\t\tjava.text.SimpleDateFormat df = new java.text.SimpleDateFormat(\"mm_ss\");\r\n\r\n\t\tname = name + \"_\" + df.format(tNow) + \".wmf\";\r\n\r\n\t\treturn name;\r\n\t}", "@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}", "private String setFileName() {\n Calendar c = Calendar.getInstance();\n\n String LOG = \"\";\n\n LOG += c.get(Calendar.YEAR);\n\n if (c.get(Calendar.MONTH) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MONTH) + 1;\n\n if (c.get(Calendar.DATE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.DATE);\n\n if (c.get(Calendar.HOUR_OF_DAY) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.HOUR_OF_DAY);\n\n if (c.get(Calendar.MINUTE) < 10)\n LOG += \"0\";\n LOG += c.get(Calendar.MINUTE);\n\n LOG += \".csv\";\n\n return LOG;\n }", "public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }", "public long getTraceTag() {\n return traceTag_;\n }", "public String getAuditTrailName()\n {\n return this.auditTrailName;\n }", "public String getName() {\n return _loggerName;\n }", "public String getName()\n\t{\n\t\treturn _fileName;\n\t}", "public String getLog4jFilePath(){\r\n\t\t return rb.getProperty(\"log4jFilepath\");\r\n\t}", "public String getFilename() {\n\treturn file.getFilename();\n }", "public static String getCurrentMethodName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getMethodName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=getStackTrace s1=getCurrentMethodName s2=run\n\t\treturn s2;\n\t}", "public static String getCurrentClassName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getClassName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=java.lang.Thread s1=g1.tool.Tool s2=g1.TRocketmq1Application\n\t\treturn s2;\n\t}", "public String logFileType() {\n return this.logFileType;\n }", "public long getTraceTag() {\n return traceTag_;\n }", "public static String getFilename()\n\t{\n\t\tString s = \"scene \"\n//\t\t\t\t+(LORENTZ_WINDOW?\"through Lorentz Window \":\"\")\n\t\t\t\t+\"with camera with \" + APERTURE_SIZE + \" aperture size \"\n\t\t\t\t+\"focussed at z=\"+FOCUSSING_DISTANCE + \" \"\n\t\t\t\t+\"and focus-surface fixed shutter model \"\n\t\t\t\t+(BETA_0?\"at rest\":(\"moving with beta=\"+beta))\n\t\t\t\t+(TEST?\" (test)\":\"\");\n//\t\tif(!PINHOLE_CAMERA)\n//\t\t{\n//\t\t\ts = s+(FOCUSSED_ON_IMAGE?\"image\":\"object\");\n//\t\t}\n\t\treturn s+\".bmp\";\n\t}", "String getFullWorkfileName();", "public String getFileName();" ]
[ "0.6725532", "0.6542316", "0.63966215", "0.6385986", "0.63673574", "0.6344606", "0.62174845", "0.6035005", "0.60218906", "0.601141", "0.5954496", "0.59390306", "0.59219474", "0.59132445", "0.5900622", "0.58935416", "0.5874874", "0.5873678", "0.58616096", "0.58460855", "0.5840373", "0.58273256", "0.5813266", "0.5813266", "0.5813266", "0.5813266", "0.5813266", "0.5813266", "0.5813266", "0.5813266", "0.5813266", "0.57931674", "0.578763", "0.5741455", "0.57010615", "0.5695289", "0.56933206", "0.5693229", "0.5680622", "0.56703013", "0.5651409", "0.56432956", "0.5641571", "0.56409806", "0.5636594", "0.5627887", "0.56199074", "0.56148076", "0.56077385", "0.56014884", "0.56014884", "0.56014884", "0.56014884", "0.56014884", "0.5592828", "0.5591421", "0.5575608", "0.5570426", "0.5550161", "0.5549346", "0.55478084", "0.55393565", "0.55364853", "0.55274016", "0.5519955", "0.55199146", "0.5514498", "0.5514498", "0.5511676", "0.5493763", "0.5490988", "0.5490542", "0.5487244", "0.548309", "0.5481561", "0.5469413", "0.54636055", "0.54386103", "0.5438468", "0.5431155", "0.5430105", "0.54296523", "0.542249", "0.54222596", "0.5420517", "0.54081035", "0.5407549", "0.54054105", "0.5401218", "0.5400207", "0.5395407", "0.5391455", "0.5390442", "0.53811896", "0.53802896", "0.5378476", "0.5375099", "0.53742534", "0.5373452", "0.5366215" ]
0.5418233
85
It defines the number of concurrent emulators.
public void setNumberConcurrentEmulators(int emu) { numberConcurrentEmulators = emu; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumberConcurrentEmulators() {\n\t\treturn (numberConcurrentEmulators);\n\t}", "public void InitializeMaxNumInstances(int num) {\n }", "@Override\r\n public int getMaxConcurrentProcessingInstances() {\r\n return 1;\r\n }", "public void setNumberOfActiveRunners(Integer numberOfActiveRunners){\n this.numberOfActiveRunners = numberOfActiveRunners;\n }", "public Integer getNumberOfActiveRunners(){\n return numberOfActiveRunners;\n }", "@Override\n\tpublic int getMaxThreads() {\n\t\treturn 10;\n\t}", "private int getPoolSize() {\n\t\tint numberOfTasks = SpectralDescriptionType.values().length;\n\t\tint procs = Runtime.getRuntime().availableProcessors();\n\t\treturn numberOfTasks < procs ? numberOfTasks : procs > 1 ? procs - 1\n\t\t\t\t: 1;\n\t}", "int getMaxInstances();", "int getExecutorActiveCount();", "public int getExecutors() {\r\n return executors;\r\n }", "public Object getNumExecutors() {\n return this.numExecutors;\n }", "public int getNumberOfThreads(){\n return numberOfThreads;\n }", "public int getNumberOfThreads() { return numberOfThreads; }", "public int getMaxInstances() {\n return maxInstances;\n }", "public int getRunningDevicesCount();", "public int workers() {\n return workers_;\n }", "@DefaultValue(\"20\")\n int getApiClientThreadPoolSize();", "public int getWorkersPerServer() {\n return Integer.parseInt(getOptional(\"kylin.server.sequence-sql.workers-per-server\", \"1\"));\n }", "public int getNumThreads() {\n return numThreads;\n }", "public static @Range(from = 2, to = Integer.MAX_VALUE) int threadAmount(@NonNull DriverEnvironment environment) {\n return environment.equals(DriverEnvironment.NODE) ? Math.max(8, Runtime.getRuntime().availableProcessors() * 2) : 4;\n }", "public String getNumberOfInstances() {\n return numberOfInstances;\n }", "private void setSockets()\n {\n String s = (String) JOptionPane.showInputDialog(null,\n \"Select Number of Sockets:\", \"Sockets\",\n JOptionPane.PLAIN_MESSAGE, null, socketSelect, \"1\");\n\n if ((s != null) && (s.length() > 0))\n {\n totalNumThreads = Integer.parseInt(s);\n }\n else\n {\n totalNumThreads = 1;\n }\n\n recoveryQueue.setMaxSize(totalNumThreads * 10);\n }", "int getExperimentsCount();", "public int getWorkers() {\r\n return workers;\r\n }", "public static int availableProcessors() {\n/* 98 */ return holder.availableProcessors();\n/* */ }", "public int getNumOfThreads() {\n return numOfThreads;\n }", "int getMaxConcurrentStartup(ClusterSpec clusterSpec);", "public Integer getMaxTimerDrivenThreads() {\n return maxTimerDrivenThreads;\n }", "int getMaxConcurrent();", "public void setKillCount(){\n killCount = killCount + 1;\n System.out.println(\"Kill count: \"+ killCount);\n }", "public int getNumberOfConnectors() { return numberOfConnectors; }", "public static int getMaxSenderThreads() {\n\t\tassert MAX_SENDER_THREADS > 0;\n\t\treturn MAX_SENDER_THREADS;\n\t}", "@Test\n public void test4(){\n System.out.println(Runtime.getRuntime().availableProcessors());\n }", "int getGuestAcceleratorsCount();", "public int getNumberOfInstances() {\n\t\treturn numberOfInstances;\n\t}", "public void setNumberOfThreads(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(NUMBEROFTHREADS_PROP.get(), value);\n }", "@Override\r\n\t\tpublic int getStandbyCap() {\n\t\t\treturn 2 * Runtime.getRuntime().availableProcessors();\r\n\t\t}", "public void setNumOfConnections(int num) {\r\n\t\tnumOfConnections = num;\r\n\t}", "protected synchronized void increaseThreadsNumber() {\r\n threadNumber++;\r\n }", "public static int getScreenCount()\n\t{\n\t\treturn startScreens.length;\n\t}", "public void setNumberOfThreads(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(NUMBEROFTHREADS_PROP.get(), value);\n }", "@SuppressForbidden(reason = \"to obtain default number of available processors\")\n/* */ synchronized int availableProcessors() {\n/* 65 */ if (this.availableProcessors == 0) {\n/* */ \n/* 67 */ int availableProcessors = SystemPropertyUtil.getInt(\"io.netty.availableProcessors\", \n/* */ \n/* 69 */ Runtime.getRuntime().availableProcessors());\n/* 70 */ setAvailableProcessors(availableProcessors);\n/* */ } \n/* 72 */ return this.availableProcessors;\n/* */ }", "void setMonitors(int monitors);", "public int getPortCount() {\n return 4;\n }", "public long getThreads() { return threads; }", "public void setDevices(Integer devices) {\r\n this.devices = devices;\r\n }", "private void setConfigNumMaxBgJobs(int value) {\n this.bitField0_ |= 2;\n this.configNumMaxBgJobs_ = value;\n }", "Integer getConnectorCount();", "public void setMAX_EXECUCOES(int MAX_EXECUCOES)\r\n {\r\n if(MAX_EXECUCOES > 0)\r\n this.MAX_EXECUCOES = MAX_EXECUCOES;\r\n }", "public void setNumConnections(int connections) {\n\t\tnumConnects = connections;\n\t}", "public static void setAvailableProcessors(int availableProcessors) {\n/* 87 */ holder.setAvailableProcessors(availableProcessors);\n/* */ }", "public abstract void countLaunchingActivities(int num);", "public int getActivePoolSize(){return activePoolSize;}", "static int setProducersNum(String producersNum){\n int num = Integer.parseInt(producersNum);\n if ((num % 2) !=0) throw new RuntimeException\n (\"Number of Producers must be even, beacuse the #Consumers is half\");\n if ( num<2 || num >1000) throw new RuntimeException\n (\"Invalid number of Producers, must be between 2 to 1000\");\n if (_defaultCon==1){\n _littleP=num;\n _littleC=num/2;\n }\n else if (_defaultCon==2){\n _averageP=num;\n _averageC=num/2;\n }\n else if (_defaultCon==3){\n _lotP=num;\n _lotC=num/2;\n }\n System.out.println(\"Using manual number of threads configuration.\");\n return _defaultCon;\n }", "private SchedulerThreadCounter()\n\t{\n\t\tii_counter = 100;\n\t}", "boolean setMultiRun(int runs);", "private void incWaiters()\r\n/* 443: */ {\r\n/* 444:530 */ if (this.waiters == 32767) {\r\n/* 445:531 */ throw new IllegalStateException(\"too many waiters: \" + this);\r\n/* 446: */ }\r\n/* 447:533 */ this.waiters = ((short)(this.waiters + 1));\r\n/* 448: */ }", "@Override public long getSimulatedSize() {\n return 1;\n }", "public void setConcurrentThreadSize(int aConcurrentThreadSize) {\n concurrentThreadCount = aConcurrentThreadSize;\n }", "public int getNumOfServers() {\n return numOfServers;\n }", "int getApplicationsCount();", "@VisibleForTesting\n static int getInstanceThreadPoolSize() {\n return instanceThreadPoolSize;\n }", "public void setApplications(int applications) {\r\n this.applications = applications;\r\n }", "public int getIoThreads() {\n return ioThreads;\n }", "int numberOfWorkers();", "public static int getMaxThreadCount(){\n return Integer.parseInt(properties.getProperty(\"maxThreadCount\"));\n }", "int getPoolSize();", "public static void setNumThreads(int newNumThreads) throws Exception \n { \n /** In case of incorrect input */\n if(newNumThreads < 0)\n throw new Exception(\"attepmt to create negative count of threads\");\n numThreads = newNumThreads; \n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "public Integer getMaxEventDrivenThreads() {\n return maxEventDrivenThreads;\n }", "private static int getSimSlotCount(Context context) {\n int simCount = SimInfoManager.getAllSimCount(context);\n Logger.d(TAG, \"getSimSlotCount() simCount is \" + simCount);\n return simCount;\n }", "@Test\n public void orgApacheFelixEventadminThreadPoolSizeTest() {\n // TODO: test orgApacheFelixEventadminThreadPoolSize\n }", "int getMonitors();", "public void setInitialThreadCount(int threads)\n { _threadPool.setInitialSize(threads);\n }", "public int getNumApplications()\n {\n return _apps.size();\n }", "public int getApplications() {\r\n return applications;\r\n }", "public void setNumberOfControllers(int value) {\n this.numberOfControllers = value;\n }", "public int getChildThreads() {\n\t\tfinal String key = ConfigNames.CHILD_THREADS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn getJson().getInt(key);\n\t}", "public final void setNbThread(final int nbThread) {\n this.nbThread = nbThread;\n }", "public int getActorsSize() {\r\n\t\treturn actors.size();\r\n\t}", "private synchronized static void incrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets++;\r\n\t}", "int numberOfWorkingWorkers();", "public int getNumScenes() {\n return moduleCSM.getNumScenes();\n }", "public void setNumComps(int numComps){\n this.mFarm.setNumComps(numComps);\n }", "public int getInstancesPerType()\n {\n return instancesPerType;\n }", "private int getRunningNum() {\n\t\treturn am.getRunningAppProcesses().size();\r\n\t}", "public void setMaxConcurrentAccessCount(String newValue);", "public int getEngines() {\n return engines;\n }", "public int getExperimentsCount() {\n if (experimentsBuilder_ == null) {\n return experiments_.size();\n } else {\n return experimentsBuilder_.getCount();\n }\n }", "@Override\n public int getMaxJobsPerAcquisition() {\n return myMaxJobsPerAcquisition;\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public void setNumberOfInstances(int numberOfInstances) {\n\t\tthis.numberOfInstances = numberOfInstances;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "@java.lang.Override\n public int getExperimentsCount() {\n return experiments_.size();\n }", "long getExecutorTaskCount();", "protected short maxRetries() { return 15; }", "@Override\n\tpublic int getMaxNumMonitors() {\n\t\treturn getMaxNumMonitors(this.rootMonitor);\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 4;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Starting with \" + ContadorDeInstancias.getCount());\n\t\tfor (int i = 0;i<300;i++) {\n\t\t\tnew ContadorDeInstancias();\n\t\t\tSystem.out.println(\"Created \"+ ContadorDeInstancias.getCount());\n\t\t}\n\n\t}" ]
[ "0.67918503", "0.6200803", "0.60894656", "0.6085325", "0.6037713", "0.5987223", "0.5906135", "0.58874506", "0.5869343", "0.576005", "0.55667317", "0.55598146", "0.5555497", "0.5548582", "0.55192703", "0.55074936", "0.5491659", "0.54748064", "0.54525274", "0.5452027", "0.5449756", "0.544662", "0.5434585", "0.5419196", "0.5400166", "0.5397395", "0.539415", "0.53785074", "0.5333708", "0.53279936", "0.53119", "0.5306449", "0.528202", "0.5268056", "0.52654845", "0.52370864", "0.52347094", "0.5224093", "0.5192532", "0.51916873", "0.51901066", "0.5180033", "0.5176375", "0.5175942", "0.51712686", "0.5168091", "0.51649284", "0.51582897", "0.5125019", "0.5119066", "0.51176256", "0.511695", "0.5104963", "0.5097265", "0.50957006", "0.509142", "0.5087051", "0.5086119", "0.5085061", "0.50850165", "0.5084376", "0.5080688", "0.50793093", "0.50741565", "0.50552154", "0.50528866", "0.50450444", "0.5039455", "0.5035641", "0.5027521", "0.50244856", "0.50182647", "0.5013945", "0.5011757", "0.5010304", "0.5008707", "0.50003016", "0.499551", "0.49940267", "0.4992522", "0.4988651", "0.49871972", "0.49866077", "0.49855557", "0.49772102", "0.49766955", "0.49596557", "0.4959549", "0.4954648", "0.49528956", "0.49505392", "0.49505392", "0.49495912", "0.49461067", "0.49444413", "0.49426", "0.49380282", "0.4938024", "0.4936372", "0.49259552" ]
0.68154997
0
It returns the number of concurrent emulators.
public int getNumberConcurrentEmulators() { return (numberConcurrentEmulators); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getExecutorActiveCount();", "public int getRunningDevicesCount();", "public Integer getNumberOfActiveRunners(){\n return numberOfActiveRunners;\n }", "Integer getConnectorCount();", "int getExperimentsCount();", "public int getNumThreads() {\n return numThreads;\n }", "public int getNumOfThreads() {\n return numOfThreads;\n }", "int getApplicationsCount();", "public Object getNumExecutors() {\n return this.numExecutors;\n }", "int getGuestAcceleratorsCount();", "private static int getSimSlotCount(Context context) {\n int simCount = SimInfoManager.getAllSimCount(context);\n Logger.d(TAG, \"getSimSlotCount() simCount is \" + simCount);\n return simCount;\n }", "public int getNumberOfThreads(){\n return numberOfThreads;\n }", "long getExecutorTaskCount();", "private int getRunningNum() {\n\t\treturn am.getRunningAppProcesses().size();\r\n\t}", "int getMaxConcurrent();", "public int getNumberOfThreads() { return numberOfThreads; }", "public static int getScreenCount()\n\t{\n\t\treturn startScreens.length;\n\t}", "public static int getThreadCount() {\r\n\t\treturn THREAD_MX_BEAN.getThreadCount();\r\n\t}", "public static int getCurrentSessionCount() {\n\t\treturn (currentSessionCount);\n\t}", "public int getExperimentsCount() {\n if (experimentsBuilder_ == null) {\n return experiments_.size();\n } else {\n return experimentsBuilder_.getCount();\n }\n }", "public int getAcceleratorsCount() {\n if (acceleratorsBuilder_ == null) {\n return accelerators_.size();\n } else {\n return acceleratorsBuilder_.getCount();\n }\n }", "public int getNumApplications()\n {\n return _apps.size();\n }", "public int workers() {\n return workers_;\n }", "int numberOfWorkers();", "public void setNumberConcurrentEmulators(int emu) {\n\t\tnumberConcurrentEmulators = emu;\n\t}", "int numberOfWorkingWorkers();", "int getInstanceCount();", "public int getExecutors() {\r\n return executors;\r\n }", "private int getPoolSize() {\n\t\tint numberOfTasks = SpectralDescriptionType.values().length;\n\t\tint procs = Runtime.getRuntime().availableProcessors();\n\t\treturn numberOfTasks < procs ? numberOfTasks : procs > 1 ? procs - 1\n\t\t\t\t: 1;\n\t}", "public int getNumberOfConnectors() { return numberOfConnectors; }", "public int getWorkers() {\r\n return workers;\r\n }", "int getConnectionsCount();", "int getProcessorCount();", "public int numConnections(){\n return connections.size();\n }", "public int getNumComps(){\n return this.mFarm.getNumComps();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "public String getNumberOfInstances() {\n return numberOfInstances;\n }", "public long getThreads() { return threads; }", "long getExcutorTasksInWorkQueueCount();", "int getMaxInstances();", "int getMaxConcurrentStartup(ClusterSpec clusterSpec);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "int getSystemCount();", "@Exported\n public int getNumberOfOnlineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOnline()) {\n count++;\n }\n }\n return count;\n }", "int countInstances();", "public int getDesktopCount() {\n\t\treturn desktops.size();\n\t}", "public int getInstanceCount() {\n return instanceCount;\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public int cameraCount() \n {\n int device_counts = 0; \n while (true) \n {\n if (capture.open(device_counts)) {\n device_counts++;\n } else {\n break;\n }\n }\n return device_counts;\n }", "int getResumesCount();", "public int getApplications() {\r\n return applications;\r\n }", "int getConnectionCount();", "public int getNumIdle();", "public static int findNumberOfCreatedComputers() {\n return objCounter;\n }", "public static int availableProcessors() {\n/* 98 */ return holder.availableProcessors();\n/* */ }", "public int getCountOfFreeDevices() {\n int count = 0;\n for (TestDevice td : mDevices) {\n if (td.getStatus() == TestDevice.STATUS_IDLE) {\n count++;\n }\n }\n return count;\n }", "public Integer getInSyncStackInstancesCount() {\n return this.inSyncStackInstancesCount;\n }", "public int getNumOfServers() {\n return numOfServers;\n }", "public static long getConnections() {\n return connections;\n }", "public int getNumConnects() {\n\t\treturn numConnects;\n\t}", "public int getThreadCount() throws ResourceConfigurationException {\n return cpeFactory.getProcessingUnitThreadCount();\n }", "public int getNumberOfInstances() {\n\t\treturn numberOfInstances;\n\t}", "int getEnvCount();", "public int getScreenCount() {\n return screenCount;\n }", "public int getNumActive();", "public int getActiveSessions();", "public synchronized int getThreads()\n/* */ {\n/* 181 */ return this.threads;\n/* */ }", "public int getActorsSize() {\r\n\t\treturn actors.size();\r\n\t}", "public int getMaxInstances() {\n return maxInstances;\n }", "public long count() {\n return getDevStudioRepository().count();\n }", "public int getNumberOfCores();", "int getJobsCount();", "int getJobsCount();", "int getJobsCount();", "public Long getExec_count() {\n return exec_count;\n }", "public int getWorkersPerServer() {\n return Integer.parseInt(getOptional(\"kylin.server.sequence-sql.workers-per-server\", \"1\"));\n }", "public final int getNbThread() {\n return nbThread;\n }", "public Integer getNumCompetitions() {\r\n return numCompetitions;\r\n }", "synchronized public int getNumVisibleClusters() {\n return numVisibleClusters;\n }", "public synchronized int activeStreams() {\n return streams.size();\n\n }", "public int getAvailableCount();", "public Integer getMaxTimerDrivenThreads() {\n return maxTimerDrivenThreads;\n }", "public int getConnectedDeviceCount() {\n return getConnectedDevices().size();\n }", "public Long getConcurrentExecutions() {\n return this.ConcurrentExecutions;\n }", "@Exported\n public int getNumberOfSlaves() {\n if (this.slaves == null) {\n return 0;\n }\n return this.slaves.size();\n }", "public int getWorkerThreads() {\n return workerThreads;\n }", "public int getAvailNumComps(){\n return this.mFarm.getAvailNumComps();\n }", "int getMonitors();", "public int countList() {\n return tasks.size();\n }", "int getSessionCount();", "public int getIoThreads() {\n return ioThreads;\n }", "public static long getNumberOfOpenConnections() {\n return openConnections.size();\n }", "public int getNumTasks() {\n return tasks.size();\n }", "public int getNumIncludedApplications()\n {\n return getIncludedApplications().size();\n }", "public int numActors() { return ActorSet.size(); }", "public static int getAvailableProcessors() {\r\n\t\treturn availableProcessors;\r\n\t}", "public int getThreadCount() {\n\t\treturn this.threadCalls.size();\n\t}", "public static native int getConcurrency();", "int getActiveSessions();", "long getTotalServerSocketsCount();" ]
[ "0.696694", "0.67313945", "0.66673654", "0.63436073", "0.6338272", "0.63046587", "0.6294908", "0.62792885", "0.6235484", "0.6135882", "0.61267143", "0.6105168", "0.60326964", "0.60291576", "0.60252374", "0.6004849", "0.59924483", "0.59772104", "0.59482694", "0.5936384", "0.59096795", "0.5905056", "0.58913", "0.5885471", "0.5873257", "0.5872281", "0.5861951", "0.58591187", "0.58571047", "0.5854099", "0.58528256", "0.58526814", "0.58155227", "0.58136934", "0.5798037", "0.57921445", "0.57861084", "0.5783994", "0.5778454", "0.57718843", "0.5770613", "0.5763921", "0.57627463", "0.57595736", "0.57573265", "0.57542706", "0.57531756", "0.57531756", "0.5749173", "0.57433015", "0.5738576", "0.5729317", "0.5721693", "0.5714938", "0.5697993", "0.56955075", "0.56923705", "0.56834286", "0.56782335", "0.5671074", "0.5669394", "0.56662077", "0.56537455", "0.5649062", "0.56378263", "0.56370944", "0.56363404", "0.56358707", "0.5629514", "0.56276184", "0.5601525", "0.5596504", "0.5596504", "0.5596504", "0.5596039", "0.5593227", "0.55903035", "0.55900127", "0.55866134", "0.5582968", "0.55742854", "0.5574026", "0.5572718", "0.5571511", "0.55549026", "0.5553748", "0.5548241", "0.5545335", "0.5542896", "0.55378073", "0.5536584", "0.55357945", "0.5528224", "0.5523714", "0.5519618", "0.551442", "0.5512462", "0.5512167", "0.55035895", "0.5499816" ]
0.7518289
0
It returns the random object.
public Random getRandom() { return (rand); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "public synchronized Random getRandom() {\n\n if (_random == null) {\n synchronized (this) {\n if (_random == null) {\n // Calculate the new random number generator seed\n long seed = System.currentTimeMillis();\n long t1 = seed;\n char entropy[] = getEntropy().toCharArray();\n for (int i = 0; i < entropy.length; i++) {\n long update = ((byte) entropy[i]) << ((i % 8) * 8);\n seed ^= update;\n }\n try {\n // Construct and seed a new random number generator\n Class clazz = Class.forName(_randomClass);\n _random = (Random) clazz.newInstance();\n _random.setSeed(seed);\n } catch (Exception e) {\n // Can't instantiate random class, fall back to the simple case\n logger.error(\"Can't use random class : \" + _randomClass + \", fall back to the simple case.\", e);\n _random = new java.util.Random();\n _random.setSeed(seed);\n }\n // Log a debug msg if this is taking too long ...\n long t2 = System.currentTimeMillis();\n if ((t2 - t1) > 100)\n logger.debug(\"Delay getting Random with class : \" + _randomClass + \" [getRandom()] \" + (t2 - t1) + \" ms.\");\n }\n }\n }\n\n return (_random);\n\n }", "protected Random get_rand_value()\n {\n return rand;\n }", "private Random getRandom()\n\t{\n\t\tif (this.random == null)\n\t\t{\n\t\t\t// Calculate the new random number generator seed\n\t\t\tlong seed = System.currentTimeMillis();\n\t\t\tlong t1 = seed;\n\t\t\tchar entropy[] = getEntropy().toCharArray();\n\t\t\tfor (int i = 0; i < entropy.length; i++)\n\t\t\t{\n\t\t\t\tlong update = ((byte) entropy[i]) << ((i % 8) * 8);\n\t\t\t\tseed ^= update;\n\t\t\t}\n\t\t\tthis.random = new java.util.Random();\n\t\t\tthis.random.setSeed(seed);\n\t\t}\n\n\t\treturn (this.random);\n\n\t}", "public Random getRandomGenerator() {\n return randomGenerator;\n }", "protected Random rng() {\r\n\t\tif (entity == null || entity.world == null) {\r\n\t\t\treturn rand;\r\n\t\t}\r\n\t\treturn entity.world.rand;\r\n\t}", "Randomizer getRandomizer();", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "public double getRandom(){\n\t\treturn random.nextDouble();\n\t}", "public Random getRandomNumberGenerator() { return randomNumberGenerator; }", "private void random() {\n\n\t}", "public T getRandom()\n\t{\n\t\tDLLNode<T> newNode = head;\n\t\tint randomNum = (int)(Math.random()*size);\n\t\tfor(int i =0; i<randomNum; i++){\n\t\t\tnewNode= newNode.getNext();\n\t\t}\n\t\treturn newNode.getData();\n\t}", "public Random() {\n real = new UniversalGenerator();\n twister = new MersenneTwister();\n }", "public Class<? extends Random> getRandomClass() {\n\t\treturn this.rng.getClass();\n\t}", "public T getRandomElement() {\n\t\treturn this.itemList.get(this.getRandomIndex());\n\t}", "public static double random() {\r\n return uniform();\r\n }", "public static Person getARandonCustomer(){\n Person person = RandomPerson.get().next();\n return person;\n }", "public static int randomNext() { return 0; }", "public static ExtendedRandom getRandomGenerator()\n {\n lastGeneratorUsed = ( lastGeneratorUsed + 1 ) % instances.length;\n return instances[lastGeneratorUsed];\n }", "public RNGRandomImpl() {\n\t\tsetRand(new Random());\n\t}", "private int rand() {\n return (int)(Math.random()*(RAND_MAX + 1));\n }", "@Override\r\n\t\tpublic Double get() {\n\t\t\treturn Math.random();\r\n\t\t}", "public static int getRandom() \n\t{\n\t\treturn rGenerator.nextInt();\n\t}", "public int getRandom() {\n return _list.get( rand.nextInt(_list.size()) );\n }", "public Person getRandomPerson() {\n //Randomize all characteristics of a person\n int age = (int) (rd.nextDouble() * 100); //within 100y old\n int gd = (int) Math.round(rd.nextDouble() * (Person.Gender.values().length - 1));\n int bt = (int) Math.round(rd.nextDouble() * (Person.BodyType.values().length - 1));\n int pf = (int) Math.round(rd.nextDouble() * (Person.Profession.values().length - 1));\n boolean isPreg = rd.nextBoolean();\n\n //Construct a person with random characteristic\n //Person(int age, Profession profession, Gender gender, BodyType bodytype, boolean isPregnant)\n P = new Person(age, Person.Profession.values()[pf], Person.Gender.values()[gd], Person.BodyType.values()[bt], isPreg);\n return P;\n }", "public User getRandom () {\n\t\treturn User.find(\n\t\t \"user_id != ? and online = ? order by rand()\", this.user_id, true\n\t\t).first();\n\t}", "public Item generateItem()\n {\n Random rand = new Random();\n int item = rand.nextInt(itemList.size());\n return itemList.get(item);\n }", "RocketInterface getRandomRocket();", "@Override\n\t\t\tpublic double getAsDouble() {\n\t\t\t\treturn Math.random();\n\t\t\t}", "public static double rand() {\n return (new Random()).nextDouble();\n }", "public Item getRandomItem() {\n int index = 0;\n int i = (int) (Math.random() * getItems().size()) ;\n for (Item item : getItems()) {\n if (index == i) {\n return item;\n }\n index++;\n }\n return null;\n }", "public double getRandom() {\n return 20*Math.random() - 10;\n }", "private double getRandomNumber(){\n double rand = Math.random();//produce a number between 0 and 1\n rand = rand - 0.5;\n return rand;\n }", "public int getRandom() {\n Set<Integer> keys = map.keySet();\n Object[] objects = keys.toArray();\n Random rand = new Random();\n int key = rand.nextInt(keys.size());\n return map.get(objects[key]);\n }", "public java.lang.String getRnd () {\r\n\t\treturn rnd;\r\n\t}", "public RandomIA() {\n\t\trandom = new Random();\n\t}", "protected NNode getRandomNode() {\n\t\tArrayList<NNode> nodearr = new ArrayList<NNode>();\n\t\tnodearr.addAll(nodes.values());\n\t\treturn nodearr.get(Braincraft.randomInteger(nodearr.size()));\n\t}", "public T next(final Random random) {\n return elements[selection.applyAsInt(random)];\n }", "public Clue getRandomClue()\n {\n HashMap<String, Clue> usableClues = getUseableClues();\n ArrayList<Clue> list = new ArrayList<>(usableClues.values());\n int i = rand.nextInt(usableClues.size());\n return list.get(i);\n }", "public int getRandom() {\n return sub.get(rand.nextInt(sub.size()));\n }", "public int getRandom() {\n int i = random.nextInt(list.size());\n return list.get(i);\n }", "public Random getAIRandom() {\n return freeColServer.getServerRandom();\n }", "public static Object getRandomValue(final Class type) {\n\n /*\n * String and Character types\n */\n if (type.equals(String.class)) {\n return RandomStringUtils.randomAlphabetic(10);\n }\n if (type.equals(Character.TYPE) || type.equals(Character.class)) {\n return RandomStringUtils.randomAlphabetic(1).charAt(0);\n }\n\n /*\n * Boolean type\n */\n if (type.equals(Boolean.TYPE) || type.equals(Boolean.class)) {\n return RANDOM.nextBoolean();\n }\n\n /*\n * Numeric types\n */\n if (type.equals(Byte.TYPE) || type.equals(Byte.class)) {\n return (byte) (RANDOM.nextInt());\n }\n if (type.equals(Short.TYPE) || type.equals(Short.class)) {\n return (short) (RANDOM.nextInt());\n }\n if (type.equals(Integer.TYPE) || type.equals(Integer.class)) {\n return RANDOM.nextInt();\n }\n if (type.equals(Long.TYPE) || type.equals(Long.class)) {\n return RANDOM.nextLong();\n }\n if (type.equals(Double.TYPE) || type.equals(Double.class)) {\n return RANDOM.nextDouble();\n }\n if (type.equals(Float.TYPE) || type.equals(Float.class)) {\n return RANDOM.nextFloat();\n }\n if (type.equals(BigInteger.class)) {\n return new BigInteger(Math.abs(RANDOM.nextInt(100)), RANDOM);\n }\n if (type.equals(BigDecimal.class)) {\n return new BigDecimal(RANDOM.nextDouble());\n }\n if (type.equals(AtomicLong.class)) {\n return new AtomicLong(RANDOM.nextLong());\n }\n if (type.equals(AtomicInteger.class)) {\n return new AtomicInteger(RANDOM.nextInt());\n }\n\n /*\n * Date and time types\n */\n if (type.equals(java.util.Date.class)) {\n return new java.util.Date(RANDOM.nextLong());\n }\n if (type.equals(java.sql.Date.class)) {\n return new java.sql.Date(RANDOM.nextLong());\n }\n if (type.equals(java.sql.Time.class)) {\n return new java.sql.Time(RANDOM.nextLong());\n }\n if (type.equals(java.sql.Timestamp.class)) {\n return new java.sql.Timestamp(RANDOM.nextLong());\n }\n if (type.equals(Calendar.class)) {\n return Calendar.getInstance();\n }\n\n /*\n * Enum type\n */\n if (type.isEnum() && type.getEnumConstants().length > 0) {\n Object[] enumConstants = type.getEnumConstants();\n return enumConstants[RANDOM.nextInt(enumConstants.length)];\n }\n\n /*\n * Return null for any unsupported type\n */\n return null;\n\n }", "public abstract void randomize();", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "@Override\r\n\tpublic Item sample() {\r\n\t\tint index = StdRandom.uniform(count);\r\n\t\tItem item = arr[index];\r\n\t\treturn item;\r\n\t}", "public int getRandom() {\n int index = (int) Math.round(Math.random()*(list.size()-1));\n return list.get(index);\n }", "public static int randomGet() { return 0; }", "public int getRandom() {\n int index = rnd.nextInt(list.size());\n return list.get(index).val;\n }", "public static Ally getRandomRep () {\n return republican[(int) (Math.random() * republican.length)];\n }", "private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}", "private Shirt getRandomShirt() {\n String selectQuery = \"SELECT * FROM \" + ShirtEntry.TABLE_NAME + \" ORDER BY RANDOM() LIMIT 1\";\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // Extract shirt details\n if (c.moveToFirst()) {\n int shirtId = c.getInt((c.getColumnIndex(ShirtEntry._ID)));\n String shirtPath = c.getString(c.getColumnIndex(ShirtEntry.IMG_PATH));\n\n c.close();\n return new Shirt(shirtId, shirtPath);\n } else {\n return null;\n }\n }", "@Override\n\t\tTruerandomness newInstance() {\n\t\t\treturn null;\n\t\t}", "private IUnit getRandomCacheUnit(){\n\t\tcache = new UnitCache();\n\t\treturn cache.getUnit(rnd.nextInt(cache.getSize()));\n\t}", "private static ItemType random() {\n return ITEM_TYPES.get(RANDOM.nextInt(SIZE));\n }", "public int getRandom() {\n int x=rand.nextInt(li.size());\n return li.get(x);\n }", "public int getRandom() {\n return A.get(r.nextInt(A.size()));\n }", "public int getRandom() {\r\n\r\n\t\tListNode temp = this.head;\r\n\t\tListNode random = this.head;\r\n\r\n\t\tint c = 1;\r\n\r\n\t\tfor (; temp != null; temp = temp.next) {\r\n\r\n\t\t\tint r = new Random().nextInt(c) + 1;\r\n\r\n\t\t\tc++;\r\n\t\t\tif (r == 1) {\r\n\t\t\t\trandom = temp;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn random.val;\r\n\r\n\t}", "private Node pickRandomNode(){\r\n\t\tNode node = null;\r\n\r\n\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t//Find a random node from the database, using the unique id attribute\r\n\t\t\tint nodeId = random.nextInt(totalGraphNodes);\r\n\t\t\t//node = graphDb.findNode(LabelEnum.Person, \"id\" , nodeId);\r\n\t\t\tnode = graphDb.getNodeById(nodeId);\r\n\t\t\ttx.success();\r\n\t\t}\r\n\t\treturn node;\r\n\t}", "protected Agent(){\n\t\trand = SeededRandom.getGenerator();\n\t}", "public T sample() {\r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n int rValue = r.nextInt(size);\r\n return elements[rValue];\r\n }", "public int getRandom() {\n Random random = new Random();\n int i = random.nextInt(list.size());\n return list.get(i);\n }", "public int getRandom() {\n return lst.get(rand.nextInt(lst.size()));\n }", "public Room getRandomRoom(){\n return (Room)rooms.get(random.nextInt(rooms.size()));\n }", "public int getRandom() {\n return arr.get(r.nextInt(arr.size()))[0];\n }", "protected Gene getRandomGene() {\n\t\tArrayList<Gene> genearr = new ArrayList<Gene>();\n\t\tgenearr.addAll(genes.values());\n\t\treturn genearr.get(Braincraft.randomInteger(genearr.size()));\n\t}", "public int getRandom() {\n Random random = new Random();\n return list.get(random.nextInt(list.size()));\n }", "private Monster getRandomMonster() {\r\n Random gen = new Random();\r\n int num = gen.nextInt(monsters.size());\r\n return (Monster) monsters.get(num).clone();\r\n }", "private Trouser getRandomTrouser() {\n String selectQuery = \"SELECT * FROM \" + TrouserEntry.TABLE_NAME + \" ORDER BY RANDOM() LIMIT 1\";\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // Extract shirt details\n if (c.moveToFirst()) {\n int trouserId = c.getInt((c.getColumnIndex(TrouserEntry._ID)));\n String trouserPath = c.getString(c.getColumnIndex(TrouserEntry.IMG_PATH));\n\n c.close();\n return new Trouser(trouserId, trouserPath);\n } else {\n return null;\n }\n }", "public T sample() {\r\n if (size == 0) {\r\n return null;\r\n }\r\n int r = new Random().nextInt(size());\r\n return elements[r];\r\n }", "public static double random()\n {\n return _prng2.nextDouble();\n }", "public T removeRandom ();", "public int getRandomNumber() {\n int Random;\n Random randomize = new Random();\n Random = randomize.nextInt(3);\n return new Integer(Random);\n }", "private static int get() { \r\n Random r = new Random();\r\n return (r.nextInt(9));\r\n }", "public int getRandom() {\n int idx;\n Random rand;\n \n rand = new Random();\n idx = rand.nextInt(set.size());\n return set.get(idx);\n }", "public static Student getRandomStudentObject() {\n return new Student(\"Abc\", \"99\", \"10th\");\n }", "private PRNG() {\n java.util.Random r = new java.util.Random();\n seed = r.nextInt();\n mersenne = new MersenneTwister(seed);\n }", "public static Dog getSomeRandomDog() {\r\n\t\treturn dogsList.get(random.nextInt(dogsList.size()));\r\n\t}", "Chromosome getRandom();", "public int getRandom() {\n Random rand = new Random();\n return list.get(rand.nextInt(linklist.size()));\n }", "public T removeRandom();", "static Tour rndTour() {\r\n\t\tTour tr = Tour.sequence();\r\n\t\ttr.randomize();\r\n\t\ttr.distance = tr.distance();\r\n\t\treturn tr;\r\n\t}", "public interface Random {\n /**\n * @return positive random value below q\n */\n BigInteger nextRandom(BigInteger q);\n }", "public int getRandom() {\n \n return this.nums.get(this.rand.nextInt(this.nums.size()));\n \n }", "public Item sample() {\n\t\t\n\t\tif(isEmpty()) throw new NoSuchElementException();\n\t\t\n\t\tint index = StdRandom.uniform(N);\n\t\t\t\n\t\t\t/*while(items[index] == null) {\n\t\t\t\tindex = StdRandom.uniform(length());\n\t\t\t}*/\n\n\t\treturn items[index];\n\t}", "public Hazard selectRandom() {\r\n\t\tRandom gen = new Random();\r\n\t\treturn hazards.get(gen.nextInt(hazards.size()));\r\n\t}", "private Complex nextRandomComplex() {\n return new Complex(rand.nextDouble() - 0.5, rand.nextDouble() - 0.5);\n }", "public Position randposition()\r\n\t{\n\t\tRandom random = new Random();\r\n\t\tPosition position = new Position(random.nextInt(7680), random.nextInt(4320), random.nextDouble());\r\n\t\treturn position;\r\n\t}", "public <T> T of(List<T> list) {\n return list.get(random.nextInt(list.size() - 1));\n }", "public int getRandom() {\n return elementsList.get(rand.nextInt(elementsList.size()));\n }", "public int getRandom() {\n return data.get(random.nextInt(data.size()));\n }", "public int getRandom() {\n int randomIdx = random.nextInt(valueList.size());\n return valueList.get(randomIdx);\n }", "public int getRandom() {\n ListNode pick = null;\n ListNode p = head;\n int count = 1;\n while (p != null) {\n if (rand.nextInt(count) == 0) {\n pick = p;\n }\n p = p.next;\n count++;\n }\n return pick.val;\n }", "public DataSetMember<t> getRandomMember()\n\t{\n\t\tRandom R = new Random();\n\t\tint i = R.nextInt(_data.size());\n\t\treturn _data.get(i);\n\t}", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "public int getRandom() {\n int n = l.size();\n Random rand = new Random();\n return l.get(rand.nextInt(n));\n }", "public int getRandom() {\n Random random = new Random();\n int val = list.get( random.nextInt(list.size()));\n return val;\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public Item sample(){\n if(size == 0){\n throw new NoSuchElementException();\n }\n int ri = StdRandom.uniform(size);\n \n Iterator<Item> it = this.iterator();\n \n for(int i = 0; i < ri; i++){\n it.next();\n }\n \n return it.next();\n }", "public int getRandom() {\n // get a random integer from [0, n) where n is the size of the value list\n return values.get(random.nextInt(values.size()));\n }" ]
[ "0.8064523", "0.7842129", "0.77325153", "0.7614269", "0.72684705", "0.71909773", "0.7185105", "0.7116264", "0.7100671", "0.70750964", "0.70658666", "0.69380057", "0.6897884", "0.6829188", "0.68281627", "0.6825259", "0.6793442", "0.6761365", "0.6731815", "0.67133856", "0.67130315", "0.6706033", "0.66719645", "0.66632146", "0.66622126", "0.66547406", "0.66484106", "0.6624278", "0.6619292", "0.66003275", "0.6593065", "0.6588493", "0.6580172", "0.6577947", "0.65646213", "0.6549662", "0.6544395", "0.6543048", "0.6518221", "0.6503078", "0.6498123", "0.6496812", "0.6495731", "0.6493204", "0.6482746", "0.6475423", "0.6475321", "0.6463336", "0.6458181", "0.64476514", "0.6447348", "0.6444818", "0.6441245", "0.6440564", "0.6440225", "0.64370453", "0.6433679", "0.6428183", "0.64276403", "0.64214385", "0.6420628", "0.6418467", "0.6418401", "0.6408361", "0.64048827", "0.638935", "0.6387168", "0.63683033", "0.6363205", "0.6360929", "0.6359779", "0.6357821", "0.6332506", "0.63285875", "0.6325776", "0.6317562", "0.6310293", "0.63091743", "0.6304867", "0.63023573", "0.6298707", "0.62858784", "0.6281413", "0.62673956", "0.62636626", "0.62574697", "0.6257259", "0.62526625", "0.6247763", "0.62469405", "0.6245678", "0.6241476", "0.62413985", "0.6238001", "0.6237477", "0.62341475", "0.623111", "0.6229837", "0.6225102", "0.62202805" ]
0.8210305
0
It defines the host to which it the emulator belongs to.
public void setHostId(String hid) { this.hid = hid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHost(HostAgent host){\n\tthis.host = host;\n }", "public void SetHost(GUI host) {\n\t\tm_Host = host;\n\t}", "Host getHost();", "public void setHost(String host);", "public void setHost(String host) {\n this.host = host;\n }", "public void setHost(String host) {\n this.host = host;\n }", "public void setHost(String host) {\n this.host = host;\n }", "public void setHost(String host) {\n this.host = host;\n }", "public void setHost(String host) {\n this.host = host;\n }", "public void setHost(String host) {\n this.host = host;\n }", "public String getHost(){\n\t\treturn this.host;\n\t}", "public String getHost() {\n \t\treturn host;\n \t}", "final public void setHost(String host) {\n this.host = host;\n }", "public String getHost() {\r\n return host;\r\n }", "public String getHost() {\n\t\treturn host;\n\t}", "public String getHost() {\n\t\treturn host;\n\t}", "public void setHost(Player roomHost) {\r\n this.roomHost = roomHost;\r\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() { return host; }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "String getPreferredHost() {\n return preferredHost;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public void setHost(String hostName)\n {\n this.hostName = hostName;\n }", "void host(String host);", "void host(String host);", "public String getHost() {\n return host.getText();\n }", "String getHost()\n {\n return host;\n }", "public GUI GetHost() {\n\t\treturn m_Host;\n\t}", "String getIntegHost();", "default String getHost()\n {\n return getString( \"host\", \"localhost:80\");\n }", "public String getHost( ) {\n\t\treturn host;\n\t}", "public String getHost() {\r\n \t\treturn properties.getProperty(KEY_HOST);\r\n \t}", "public void setDefaultHost() {\r\n\t\tsetHost(DEFAULT_HOST);\r\n\t}", "@Override\n\t\tpublic String getHost() {\n\t\t\treturn null;\n\t\t}", "java.lang.String getHost();", "java.lang.String getHost();", "public Builder setHost(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n host_ = value;\n onChanged();\n return this;\n }", "public void testSetHost() {\n }", "public String getHost();", "public String getHost();", "@Override\n\tpublic Player getHost() {\n\t\treturn host;\n\t}", "public String host() {\n return host;\n }", "public String getHost( ) {\n return props.getProperty(HOST, \"localhost\");\n }", "default String getHost() {\n return \"localhost\";\n }", "@Override\n\t\tpublic String getRemoteHost() {\n\t\t\treturn null;\n\t\t}", "HostingMode hostingMode();", "public String getHost() {\n return m_host;\n }", "String getHost();", "public void setHost(String host) {\n this.host = host == null ? null : host.trim();\n }", "public void newHost(Host aHost);", "public String getHostID() { return hostID; }", "public String getHostName (){\n return hostName;\n }", "synchronized public void setHost(String host) {\n this.host = host;\n if (checkClient()) {\n prefs.put(\"AEUnicastOutput.host\", host);\n }\n }", "public void setHost(com.vmware.converter.DistributedVirtualSwitchHostMemberConfigSpec[] host) {\r\n this.host = host;\r\n }", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "public void byeHost(Host aHost);", "public boolean isRunOnHost() {\n return Mode.HOST == mode;\n }", "private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }", "Switch getHostSwitch();", "Target(String host) {\n try {\n address = new InetSocketAddress(InetAddress.getByName(host), 80);\n } catch (UnknownHostException e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n failure = e;\n }\n }", "public void setHostAddress(int value) {\n this.hostAddress = value;\n }", "public DatabaseConfig setHost(String host) {\n this.host = host;\n return this;\n }", "public void setHost(final String remoteHost) {\n this.host = remoteHost;\n }", "String host();", "public final void setRemoteSocketAddress(String host){\r\n remoteSocketHost = host;\r\n }", "public String getDatabaseHost() {\n return this.databaseHost;\n }", "@Override\n public void setPluginHost(WhiteboxPluginHost host) {\n myHost = host;\n }", "@Override\n public void setPluginHost(WhiteboxPluginHost host) {\n myHost = host;\n }", "protected void setHostname(final String host) {\n this.host = host;\n }", "public Builder host(String newHost) {\n host = newHost;\n return this;\n }", "String getQueueManagerHost();", "Builder hostName(String hostName);", "public void setHost(final String remoteHost) {\n this.host = remoteHost;\n }", "public void setDatabaseHost(String databaseHost) {\n this.databaseHost = databaseHost;\n }", "private String getHostName()\n\t{\n\t\treturn hostName;\n\t}", "public void setHostName(String hostName) {\n this.hostName = hostName;\n }", "public String getFullHost() {\n return \"http://\" + get(HOSTNAME_KEY) + \":\" + get(PORT_KEY) + \"/\" + get(CONTEXT_ROOT_KEY) + \"/\";\n }", "public String getHostURL() {\n return getHostURL(PAActiveObject.getActiveObjectNodeUrl(PAActiveObject.getStubOnThis()));\n }", "public IDiogenAgent getHostAgent() {\n return this.hostAgent;\n }", "public void setAgentHost(String value) {\n setAttributeInternal(AGENTHOST, value);\n }", "public String getHostName() {\n return hostName;\n }", "public String getHostName() {\n return hostName;\n }", "public static void setHost(String host) {\n\t\tif (adHocAccount == null)\n\t\t\tadHocAccount = new Account();\n\t\tadHocAccount.host = host;\n\t}", "public String getBoxNetHost();", "public RequestBuilder host(String host) {\n this.host = host;\n return this;\n }", "public void useEmulator(@NonNull String host, int port) {\n Preconditions.checkArgument(port >= 0, \"Port must be >= 0\");\n Preconditions.checkArgument(port <= 65535, \"Port must be <= 65535\");\n mEmulatorHost = host;\n mEmulatorPort = port;\n\n mAuth.useEmulator(host, port);\n }", "public String getRelayHost() {\n\t\treturn relayHost;\n\t}", "public String getHost() {\n\t\treturn this.sipStack.getHostAddress();\n\t}", "public void setHostId(Integer hostId) {\n this.hostId = hostId;\n }", "public String getHostName()\n\t{\n\t\treturn hostName;\n\t}", "private void setupHostFromArquillianConfig(final URL arquillianXml) {\n\n final String arquillianLaunch = System.getProperty(\"arquillian.launch\");\n\n if (arquillianLaunch == null) {\n LOG.warn(\"No launch configuration specified, using default\");\n\n } else {\n final String arquillianHost = getActiveArquillianHost(arquillianXml, arquillianLaunch);\n if (arquillianHost != null) {\n remoteHost = arquillianHost;\n }\n }\n\n }", "public void setHostName(String hostName) {\n this.hostName = hostName;\n }", "public Integer getHostId() {\n return hostId;\n }" ]
[ "0.7070917", "0.70603603", "0.6975566", "0.69585556", "0.68557274", "0.68557274", "0.68557274", "0.68557274", "0.68557274", "0.6817544", "0.67544526", "0.67377263", "0.67055774", "0.66902894", "0.6653567", "0.6653567", "0.6640518", "0.6617331", "0.6617331", "0.661724", "0.66102505", "0.66102505", "0.658891", "0.65842754", "0.65842754", "0.65842754", "0.65842754", "0.65842754", "0.65842754", "0.65761244", "0.65597504", "0.65597504", "0.654508", "0.6537929", "0.65136975", "0.6508758", "0.6486462", "0.64737445", "0.6464196", "0.64269364", "0.6413257", "0.6405276", "0.6405276", "0.64032304", "0.63999605", "0.6399078", "0.6399078", "0.63566655", "0.6355529", "0.6338709", "0.630346", "0.62208945", "0.61887956", "0.6186318", "0.61804587", "0.6179097", "0.61513233", "0.61399966", "0.6131278", "0.6123327", "0.612269", "0.6116418", "0.6116418", "0.6115699", "0.6111125", "0.6091973", "0.6084076", "0.6064322", "0.6059097", "0.60469955", "0.59920084", "0.5988025", "0.5987941", "0.59875864", "0.59760576", "0.59760576", "0.59737045", "0.59578365", "0.595377", "0.5952601", "0.5952203", "0.59480506", "0.59477687", "0.5943091", "0.5942855", "0.59341633", "0.59283715", "0.5918971", "0.59102196", "0.59102196", "0.59097856", "0.5907976", "0.5905429", "0.5905206", "0.5883874", "0.5876055", "0.58717847", "0.5860653", "0.58538234", "0.5851757", "0.5831073" ]
0.0
-1
It returns the host to which it the emulator belongs to.
public String getHostId() { return (hid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Host getHost();", "public String getHost() {\n return host.getText();\n }", "public String getHost() {\n\t\ttry {\n\t\t\treturn InetAddress.getLocalHost().getHostName();\n\t\t} catch (UnknownHostException e) {\n\t\t\treturn \"unknown\";\n\t\t}\n\t}", "String getIntegHost();", "java.lang.String getHost();", "java.lang.String getHost();", "public String getHost() {\n\t\treturn this.sipStack.getHostAddress();\n\t}", "public String getHost() {\r\n \t\treturn properties.getProperty(KEY_HOST);\r\n \t}", "public Host getCurrentHost() {\n\t\tif (current == null) {\n\t\t\tString id = SystemHelper.os.getSystemUUID();\n\t\t\tfor (Host host : config.getHosts()) {\n\t\t\t\tif (id.equals(host.getId())) {\n\t\t\t\t\tcurrent = host;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn current;\n\t}", "public GUI GetHost() {\n\t\treturn m_Host;\n\t}", "public String getHost() {\n return messageProcessor.getIpAddress().getHostAddress();\n }", "String getHost();", "public String getHost();", "public String getHost();", "public String getHost() {\n \t\treturn host;\n \t}", "String host();", "public String getHost() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getHost()\");\n Via via=(Via)sipHeader;\n return via.getHost();\n }", "private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }", "public String getHost( ) {\n\t\treturn host;\n\t}", "public String getHost() {\n\t\treturn host;\n\t}", "public String getHost() {\n\t\treturn host;\n\t}", "public String getHost() {\r\n return host;\r\n }", "public String getHost(){\n\t\treturn this.host;\n\t}", "public String getHost() {\n return stack.stackAddress;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "java.lang.String getRemoteHost();", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost( ) {\n return props.getProperty(HOST, \"localhost\");\n }", "public InetAddress getHost();", "public String getHost(Env env) {\n return client.getHost();\n }", "public String host() {\n return host;\n }", "String getPreferredHost() {\n return preferredHost;\n }", "default String getHost()\n {\n return getString( \"host\", \"localhost:80\");\n }", "public String getHostURL() {\n return getHostURL(PAActiveObject.getActiveObjectNodeUrl(PAActiveObject.getStubOnThis()));\n }", "public String getHost()\n\t{\n\t\treturn m_strHostname;\n\t}", "public static String getEventHost() {\r\n return eventHost.getValue();\r\n }", "String getHost()\n {\n return host;\n }", "public String getHostName() {\n return this.hostContext.getHostName();\n }", "@Override\n\tpublic Player getHost() {\n\t\treturn host;\n\t}", "public String getHost() { return host; }", "public String getHost() {\n\t\treturn url.getHost();\n }", "public String connectedHost()\n {\n return connectedHost;\n }", "private String GetHostAddress() throws UnknownHostException {\n return Inet4Address.getLocalHost().getHostAddress();\n }", "public String getRnidsHostAddress() {\n\t\tString address = getProperties().getProperty(\"rnids.host.address\").trim();\n\t\treturn address;\n\t}", "String getQueueManagerHost();", "public String getFullHost() {\n return \"http://\" + get(HOSTNAME_KEY) + \":\" + get(PORT_KEY) + \"/\" + get(CONTEXT_ROOT_KEY) + \"/\";\n }", "public String getAgentHost() {\n return (String)getAttributeInternal(AGENTHOST);\n }", "public String getHost() {\n return m_host;\n }", "static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return \"unknown\";\n }\n }", "public String getHostName() {\n return FxSharedUtils.getHostName();\n }", "public String getUserHost() {\n return userHost;\n }", "public java.lang.String getHost() {\n java.lang.Object ref = host_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n host_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getApplicationDomain()\n {\n ASPManager mgr = getASPManager();\n String curr_host = mgr.getCurrentHost();\n if(mgr.isDifferentApplicationPath())\n {\n int host_no = mgr.getCurrentHostIndex()+1;\n String[] data =Str.split((String)configfile.hosts.get(host_no+\"\"),\",\");\n \n if(!\"NONE\".equals(data[1]))\n curr_host = data[1];\n }\n\n return curr_host;\n }", "public String getBoxNetHost();", "public String getSimulatorHostname() {\n return simSpec.getHostAddr();\n }", "@Override\n\tpublic java.lang.String getRemoteHost() {\n\t\treturn _userTracker.getRemoteHost();\n\t}", "private String GetHostName() throws UnknownHostException{\n return Inet4Address.getLocalHost().getHostName();\n }", "public String getHostName()\n\t{\n\t\treturn hostName;\n\t}", "String getRemoteHostName();", "public String getHostName() {\n return hostName;\n }", "public String getHostName() {\n return hostName;\n }", "public String getHostName (){\n return hostName;\n }", "@Override\n\t\tpublic String getRemoteHost() {\n\t\t\treturn null;\n\t\t}", "public String getHostName() throws UnknownHostException\n\t{\n\t\t\n\t\treturn InetAddress.getLocalHost().getHostAddress();\n\t\t\n\t}", "io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Host getHost();", "public XServerDisplayActivity getHost() {\n return (XServerDisplayActivity) getContext();\n }", "@Override\n\t\tpublic String getHost() {\n\t\t\treturn null;\n\t\t}", "public String getDatabaseHost() {\n return this.databaseHost;\n }", "protected static String getDUnitLocatorAddress() {\n return Host.getHost(0).getHostName();\n }", "private String getHostName()\n\t{\n\t\treturn hostName;\n\t}", "public static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return LOCALHOST;\n }\n }", "public static String getLocalHostId() {\r\n\t\treturn localHostId;\r\n\t}", "@java.lang.Override\n public java.lang.String getHost() {\n java.lang.Object ref = host_;\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 host_ = s;\n return s;\n }\n }", "public String getHostAddress() {\n\t\treturn javaNetAddress.getHostAddress();\n\t}", "public static String getBaseHost() {\r\n if (baseHost == null) {\r\n baseHost = PropertiesProvider.getInstance().getProperty(\"server.name\", \"localhost\");\r\n }\r\n return baseHost;\r\n }", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}", "public String getHostName();", "public static Host getLocalHostAddresAndIP() {\n try {\n for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {\n NetworkInterface intf = en.nextElement();\n for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {\n InetAddress inetAddress = enumIpAddr.nextElement();\n // IPv4 only\n if (inetAddress instanceof Inet6Address)\n continue;\n if (!inetAddress.isLoopbackAddress()) {\n Host thisHost = new Host(inetAddress.getHostAddress().toString(), true);\n return thisHost;\n }\n }\n }\n } catch (SocketException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public String hostname() {\n return this.hostname;\n }", "public String getHostName() {\n\t\treturn hostName;\n\t}", "public String getHostName() {\n\t\treturn hostName;\n\t}", "public Player getHost() {\r\n return roomHost;\r\n }", "private static String getHostNameImpl() {\n String bindAddr = System.getProperty(\"jboss.bind.address\");\n if (bindAddr != null && !bindAddr.trim().equals(\"0.0.0.0\")) {\n return bindAddr;\n }\n\n // Fallback to qualified name\n String qualifiedHostName = System.getProperty(\"jboss.qualified.host.name\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // If not on jboss env, let's try other possible fallbacks\n // POSIX-like OSes including Mac should have this set\n qualifiedHostName = System.getenv(\"HOSTNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // Certain versions of Windows\n qualifiedHostName = System.getenv(\"COMPUTERNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n try {\n return NetworkUtils.canonize(getLocalHost().getHostName());\n } catch (UnknownHostException uhe) {\n uhe.printStackTrace();\n return \"unknown-host.unknown-domain\";\n }\n }", "public Collector getHost() {\n\t\treturn this.host;\n\t}", "public String getRelayHost() {\n\t\treturn relayHost;\n\t}", "public String getHostID() { return hostID; }", "public String getHostUuid() {\n return hostUuid;\n }", "public java.lang.String getRemoteHost() {\n java.lang.Object ref = remoteHost_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n remoteHost_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int getHostAddress() {\n return hostAddress;\n }", "public java.lang.String getRemoteHost() {\n java.lang.Object ref = remoteHost_;\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 remoteHost_ = s;\n }\n return s;\n }\n }", "HostInfo getHostInfo();" ]
[ "0.7669645", "0.76037896", "0.73563963", "0.7343836", "0.73037994", "0.73037994", "0.7279657", "0.7216653", "0.71996", "0.717417", "0.7138591", "0.712097", "0.7117588", "0.7117588", "0.70870245", "0.7067182", "0.7062411", "0.7059406", "0.7055746", "0.7048158", "0.7048158", "0.70235103", "0.69996995", "0.69951403", "0.6993746", "0.6993746", "0.6993746", "0.6993746", "0.6993746", "0.6993746", "0.6980975", "0.6980975", "0.6955893", "0.69521207", "0.69521207", "0.6937902", "0.692239", "0.69195354", "0.6904952", "0.6899648", "0.6879603", "0.6812529", "0.6796896", "0.6780881", "0.67765146", "0.6747455", "0.6746556", "0.6731304", "0.6706223", "0.66761076", "0.6674418", "0.66681117", "0.6644912", "0.66204137", "0.6587416", "0.65872234", "0.65832216", "0.6570882", "0.6569471", "0.65673995", "0.6555167", "0.6544963", "0.65431327", "0.6542179", "0.6508465", "0.6504969", "0.6498677", "0.6485066", "0.6485066", "0.6474718", "0.64712846", "0.6469756", "0.64662695", "0.645412", "0.6452282", "0.64497554", "0.6447984", "0.6432023", "0.64252627", "0.64203906", "0.6399509", "0.63961047", "0.6377945", "0.6377549", "0.6377549", "0.63740003", "0.6368371", "0.63619494", "0.63543844", "0.63543844", "0.63508", "0.6336058", "0.63302326", "0.63100284", "0.62958395", "0.6295293", "0.62898463", "0.628749", "0.62785345", "0.627647" ]
0.62766
99
It returns the database used by the emulator in order to handle the transaction requests.
public DatabaseManager getDatabase() { return (db); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDatabase();", "Database getDataBase() {\n return database;\n }", "public static String getDatabase() {\r\n return database;\r\n }", "String getDatabase();", "public Database getDatabase() {\n return dbHandle;\n }", "public String getDatabase()\n {\n return m_database; \n }", "private void getDatabase(){\n\n }", "public String getDatabase() {\n return this.database;\n }", "public DB getDatabase(){\n\t\treturn database;\n\t}", "public String getDatabase() {\r\n return Database;\r\n }", "public Database getDatabase() {\n\t\treturn this.database;\n\t}", "public String getDB() {\n return database;\n }", "public String getDb() {\n return db;\n }", "public String getDb() {\n return db;\n }", "public ODatabaseInternal<?> db() {\n return ODatabaseRecordThreadLocal.INSTANCE.get().getDatabaseOwner();\n }", "public DB getDB() {\n return database;\n }", "@Override\n public Database getDatabase() {\n return m_database;\n }", "public String getDatabase() {\r\n \t\treturn properties.getProperty(KEY_DATABASE);\r\n \t}", "static AppDatabase getDatabase(final Context context) {\n if (INSTANCE == null) { //only a single thread can run this block at once\n //we only want this because we don't want to run too many databases\n synchronized (AppDatabase.class) {\n if(INSTANCE == null) {\n INSTANCE = Room.databaseBuilder(context.getApplicationContext(), AppDatabase.class, \"saved_locations_db\").build(); //build a database object\n }\n\n }\n }\n return INSTANCE;\n }", "private DB getDB() {\n\t\tServletContext context = this.getServletContext();\n\t\tsynchronized (context) {\n\t\t\tDB db = (DB)context.getAttribute(\"DB\");\n\t\t\tif(db == null) {\n\t\t\t\tdb = DBMaker.newFileDB(new File(\"db\")).closeOnJvmShutdown().make();\n\t\t\t\tcontext.setAttribute(\"DB\", db);\n\t\t\t}\n\t\t\tcheckAdminInDB(db);\n\t\t\tcheckCategoriaInDB(db);\n\t\t\treturn db;\n\t\t}\n\t}", "Object getDB();", "public GraphDatabaseService GetDatabaseInstance() {\r\n\t\treturn _db;\r\n\t}", "public String getDB() {\n\t\treturn db;\r\n\t}", "public static Area28Database getDatabase(final Context context) {\n if (INSTANCE == null) {\n synchronized (Area28Database.class) {\n if (INSTANCE == null) {\n INSTANCE = Room.databaseBuilder(context.getApplicationContext(),\n Area28Database.class, database_name)\n .build();\n\n // Copy pre-created database to application runtime memory space\n try {\n copyDatabase(context, database_name);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n return INSTANCE;\n }", "public static MHWDatabase getDatabase(Application app) {\n return getDatabase(app.getApplicationContext());\n }", "public SQLiteDatabase getDatabase(){\n\t\treturn db;\n\t}", "private static IOseeDatabaseService getDatabase() throws OseeDataStoreException {\n return ServiceUtil.getDatabaseService();\n }", "Database getDatabase(Properties properties, ApplicationContext applicationContext);", "public SQLiteDatabase getDatabaseInstance() {\n return db;\n }", "public Driving getDB() {\n\t\treturn this.db;\n\t}", "public Database<T> getDatabase();", "public DatabaseClient getDb() {\n return db;\n }", "public messages.Databaseinterface.DatabaseInterface getDatabase() {\n return database_;\n }", "public SQLiteDatabase getDatabase() {\r\n if (sqliteDatabase == null) {\r\n databaseHelper = new DatabaseHelper(this.context);\r\n sqliteDatabase = databaseHelper.getWritableDatabase();\r\n }\r\n return sqliteDatabase;\r\n }", "public DB getDB() {\n\treturn _db;\n }", "public messages.Databaseinterface.DatabaseInterface getDatabase() {\n if (databaseBuilder_ == null) {\n return database_;\n } else {\n return databaseBuilder_.getMessage();\n }\n }", "public DBDef getCurrentDBDef() { return DBCurrent.getInstance().currentDBDef(); }", "public static MyDatabase getDatabase() {\n if (instance == null) {\n synchronized (MyDatabase.class) {\n if (instance == null) {\n instance = Room.databaseBuilder(Constants.context.getApplicationContext(),\n MyDatabase.class, Constants.DATABASE_NAME)\n .build();\n }\n }\n }\n return instance;\n }", "public SpokaneValleyDatabaseHelper getDatabase() {\n\t\treturn helper;\n\t}", "@Override\r\n\tpublic Database getDefaultDatabase() {\r\n\t\treturn databases.getDatabase( \"default\" );\r\n\t}", "public static DatabaseConnection getDb() {\n return db;\n }", "public Database getDatabase() {\n\t\tDatabase database = null;\n\t\t//TODO fail when more than one provider was found?\n\t\ttry {\n\t\t\tIterator<Database> databaseProviders = loader.iterator();\n\t\t\twhile (database == null && databaseProviders.hasNext()) {\n\t\t\t\tdatabase = databaseProviders.next();\n\t\t\t\tlog.debug(\"Found database service provider {\" + database.getClass() + \"}\");\n\t\t\t}\n\t\t} catch (ServiceConfigurationError serviceError) {\n\t\t\tserviceError.printStackTrace();\n\t\t}\n\t\tif (database == null) {\n\t\t\tthrow new RuntimeException(\"Could not find database provider.\");\n\t\t}\n\t\treturn database;\n\t}", "public DatabaseConnection getDatabaseConnection() {\n return query.getDatabaseConnection();\n }", "public abstract String getDatabaseName();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "ODatabaseInternal<?> getDatabaseOwner();", "protected String getDatabaseName() {\n\t\treturn database;\n\t}", "public static MHWDatabase getDatabase(Context ctx) {\n // NOTE on implementation\n // We use a custom SQLiteAssetHelperFactor that copies over the database\n // on Room migration attempts. Make sure that the version\n if (instance == null) {\n instance = Room.databaseBuilder(ctx, MHWDatabase.class, \"mhw.db\")\n .openHelperFactory(new SQLiteAssetHelperFactory(true))\n .allowMainThreadQueries()\n .build();\n }\n return instance;\n }", "public DatabaseMeta getSharedDatabase( String name ) {\n return (DatabaseMeta) getSharedObject( DatabaseMeta.class.getName(), name );\n }", "public SQLiteDatabase getZabbixLocalDB() {\n\t\treturn zabbixLocalDB;\n\t}", "Database createDatabase();", "public static Database getInstance() {\n\t\treturn OfflineDatabase.getInstance();\n\t}", "public static DatabaseManager getDatabaseManager() {\r\n return dbManager;\r\n }", "public String getDatabaseEngine() {\n return this.databaseEngine;\n }", "private SQLiteDatabase openConnection() {\n\n sqlLiteHelper = new SQLLiteHelper(DatabaeServiceContext);\n return sqlLiteHelper.getWritableDatabase();\n\n }", "public static String getDatabaseURL(){\n return databaseURL;\n }", "public String getDatabaseName () {\n return databaseName;\n }", "public String getContainerDb() {\n return containerDb;\n }", "public abstract ODatabaseInternal<?> openDatabase();", "public String getDatabaseName()\n {\n return \"assetdr\";\n }", "boolean hasDatabase();", "@Override\n public String getDatabaseName() {\n return mappings.getDatabaseName();\n }", "public String databaseName();", "public static FirebaseDatabase getDatabase() {\n //Start Work here\n if (mFirebaseDatabase != null) {\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n } else if (mFirebaseDatabase == null) {\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n// mFirebaseDatabase.setPersistenceEnabled(true);\n }\n return mFirebaseDatabase;\n }", "public ResultSet getDatabase(){\n\t\tString join = \"select* from responses natural join projects\";\n\t\tPreparedStatement database = null;\n\t\ttry{\n\t\t\tdatabase = conn.prepareStatement(join);\n\t\t\tResultSet rs = database.executeQuery();\n\t\t\treturn rs;\n\t\t}catch (SQLException e){\n\t\t\treturn null;\n\t\t}\n\t}", "public static Database getInstance() {\n if (database == null) database = new Database();\n return database;\n }", "public SQLiteDatabase openDatabase() {\n synchronized (mLock) {\n Log.d(\"Opening database.\");\n File path = mContext.getDatabasePath(DatabaseOpenHelper.NAME);\n //Check if database exists and if not copy from assests folder\n if (!path.exists()) {\n try {\n mOpenHelper = new DatabaseOpenHelper(mContext);\n mOpenHelper.getWritableDatabase();\n\n copyDataBase();\n }\n catch (IOException e) {\n Log.e(\"Could not copy dictionary.\", e);\n }\n }\n if (mOpenHelper == null) {\n mOpenHelper = new DatabaseOpenHelper(mContext);\n }\n return mOpenHelper.getWritableDatabase();\n }\n }", "private static MongoDatabase getDatabase(){\n\t\tint port_number = 27017;\n\t\tString host = \"localhost\";\n\n\t\tMongoClient mongoClient = new MongoClient(host, port_number);\n\t\treturn mongoClient.getDatabase(\"myDb\");\n\t}", "public synchronized static DatabaseStorage query(Context context)\n {\n if (instance == null)\n {\n instance = new DatabaseStorage(context);\n }\n\n return instance;\n }", "public static synchronized AppDatabase getInstance(Context context){\n if(instance == null){\n //TODO: Remove allowMainThreadQueries, because it can freeze UI on big queries (but normally not on this project). Better to call queries outside of the UI thread.\n instance = Room.databaseBuilder(context.getApplicationContext(), AppDatabase.class, \"app_db\").fallbackToDestructiveMigration().allowMainThreadQueries().build();\n }\n return instance;\n }", "public String getDatabaseName() {\n return databaseName;\n }", "public static AppDataBase getAppDatabase(final Context context) {\n if (instance == null) {\n instance = Room.databaseBuilder(context.getApplicationContext(),\n AppDataBase.class, APP_DATABASE_NAME)\n .allowMainThreadQueries()\n .build();\n }\n return instance;\n }", "@Override\r\n public Db_db currentDb(){return curDb_;}", "public static synchronized TasksDatabase getInstance(Context context){\n if (instance == null){\n instance = Room.databaseBuilder(context.getApplicationContext(),TasksDatabase.class,\n \"tasks_database\")\n .fallbackToDestructiveMigration() //deletes database and recreates it when there's a version update\n .build();\n }\n return instance ;\n }", "public static AudioDatabase getDatabase(final Context context) {\n if (INSTANCE == null) {\n synchronized (AudioDatabase.class) {\n if (INSTANCE == null) {\n INSTANCE = Room.databaseBuilder(context.getApplicationContext(),\n AudioDatabase.class, \"audio_database\")\n .build();\n }\n }\n }\n return INSTANCE;\n }", "public Connection getDatabaseConnection() {\n return con;\n }", "DataBase createDataBase();", "public static VisitedLocationsDatabase getDatabase(final Context context) {\n\n if (INSTANCE == null) {\n synchronized (VisitedLocations.class) {\n if (INSTANCE == null) {\n INSTANCE = Room.databaseBuilder(context.getApplicationContext(),\n VisitedLocationsDatabase.class, \"word_database\")\n .build();\n }\n }\n }\n return INSTANCE;\n }", "yandex.cloud.api.mdb.mongodb.v1.DatabaseOuterClass.DatabaseSpec getDatabaseSpec();", "public DBManager getDBManager() {\n\t\treturn dbManager;\n\t}", "public String[] getDatabaseNames() {\n return context.databaseList();\n }", "public void leerDB(){\n sqlDB = bdHelper.getReadableDatabase();\n\n }", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "private DatabaseProvider getDatabaseProvider() {\n return new DatabaseProvider(\n System.getProperty(\"url\"),\n System.getProperty(\"user\"),\n System.getProperty(\"password\")\n );\n }", "public static String getShowDatabaseStatement() {\n return SHOW_DATABASES;\n }", "long getDbCount();", "public int getDatabaseType()\n {\n return Constants.LOCAL | Constants.SHARED_DATA | Constants.LOCALIZABLE;\n }", "DatabaseConnector getConnector() {return db;}", "java.lang.String getDatabaseId();", "private File getAppDatabaseFile() {\n Log.i(\"getAppDatabase\", \"Getting app database\");\n try {\n File file = new File(this.context.getFilesDir(), SecretConstants.DATABASE_NAME);\n Log.i(\"getAppDatabase\", \"File name: \" + file.getName());\n FileOutputStream outputStream = new FileOutputStream(file);\n DropboxAPI.DropboxFileInfo info =\n MainActivity.mDBApi.getFile(file.getName(), null, outputStream, null);\n Log.i(\"getAppDatabase\", \"The file's rev is: \" + info.getMetadata().rev);\n return file;\n } catch (Exception e) {\n Log.e(\"getAppDatabase\", e.toString(), e);\n }\n return null;\n }", "public DB returnDB(String database) {\r\n return mongo.getDB(database);\r\n }", "public String getDatabaseName()\n {\n return \"product\";\n }", "public String getDbTable() {return dbTable;}", "public Connection getTransactionConnection(){\n try {\n return rawDataSource.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }", "@GET\n @Path( \"/databaseMetadata\" )\n @Produces( { APPLICATION_XML, APPLICATION_JSON } )\n public IDatabaseConnection getDatabaseMetadata() {\n return stagingDatabase.getDatbaseMetadata();\n }", "public List<String> getAllDatabase() throws Exception {\n\t\treturn null;\n\t}", "public static BookingDatabase getDbInstance(final Context context) {\n // If a database instance hasn't been created already\n if (dbInstance == null) {\n synchronized (BookingDatabase.class) {\n if (dbInstance == null) {\n dbInstance = Room.databaseBuilder(context.getApplicationContext(),\n BookingDatabase.class, \"booking_db\")\n .fallbackToDestructiveMigration()\n .addCallback(insertCallback)\n .build();\n }\n }\n }\n return dbInstance;\n }" ]
[ "0.7450945", "0.7447515", "0.7337331", "0.7294402", "0.7172069", "0.70734584", "0.7073341", "0.70494324", "0.70384693", "0.7019184", "0.69799083", "0.6950911", "0.69238514", "0.69238514", "0.6916993", "0.6906811", "0.68850416", "0.6841341", "0.67984104", "0.6707356", "0.66939145", "0.66318077", "0.66139096", "0.6589783", "0.65836084", "0.65606153", "0.65601444", "0.6545694", "0.6526796", "0.65240437", "0.65219605", "0.6520497", "0.65203834", "0.6510517", "0.64953053", "0.64840424", "0.644892", "0.64402115", "0.6414559", "0.6405501", "0.6401213", "0.63672936", "0.63251954", "0.63175327", "0.630339", "0.630339", "0.630339", "0.630339", "0.62382996", "0.6230739", "0.62276053", "0.6222951", "0.6201397", "0.6186511", "0.61823124", "0.61775154", "0.6174194", "0.6138313", "0.6119012", "0.61021155", "0.6088049", "0.60713655", "0.60624444", "0.6058813", "0.6053391", "0.6042946", "0.6030248", "0.60174656", "0.60126305", "0.60052806", "0.6005109", "0.5998089", "0.5996344", "0.59935135", "0.599294", "0.5978837", "0.59772706", "0.59758264", "0.59668463", "0.5965925", "0.5954193", "0.595394", "0.5952803", "0.59254277", "0.59039724", "0.5903487", "0.59023017", "0.5893002", "0.58820885", "0.5875526", "0.58727723", "0.58659476", "0.5864033", "0.58569074", "0.5855581", "0.5853506", "0.58498055", "0.5830491", "0.581909", "0.581429" ]
0.6984976
10
It defines the database used by the emulator in order to handle the transaction requests.
public void setDatabase(DatabaseManager db) { this.db = db; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDatabase();", "private void getDatabase(){\n\n }", "public void setDatabase(Connection _db);", "Database createDatabase();", "Database getDataBase() {\n return database;\n }", "private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}", "String getDatabase();", "public Database(){\n ItemBox.getLogger().info(\"[Database] protocol version \" + net.mckitsu.itembox.protocol.ItemBoxProtocol.getVersion());\n }", "public void setDatabase(String db) {\n\t\tthis.database = db;\n\t}", "public String getDatabase() {\n return this.database;\n }", "public String getDatabase() {\r\n return Database;\r\n }", "public static String getDatabase() {\r\n return database;\r\n }", "public String getDatabase() {\r\n \t\treturn properties.getProperty(KEY_DATABASE);\r\n \t}", "private void configureDB() {\n\t\tmDb = mDbHelper.getWritableDatabase();\n\t}", "@Override\r\n\tpublic Database getDefaultDatabase() {\r\n\t\treturn databases.getDatabase( \"default\" );\r\n\t}", "public String getDatabaseName()\n {\n return \"assetdr\";\n }", "public String getDB() {\n return database;\n }", "DataBase createDataBase();", "public abstract String getDatabaseName();", "protected abstract ODatabaseInternal<?> newDatabase();", "public DB getDatabase(){\n\t\treturn database;\n\t}", "public String getDatabase()\n {\n return m_database; \n }", "public DatabaseHandler(Context context){\n super(context, \"tienda.db\", null, 1);\n }", "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}", "protected abstract void createDatabaseData(EntityManager entityManager);", "private void setupDatabase() throws SQLException {\n\t\tdb.open(\"localhost\", 3306, \"wow\", \"greeneconomyapple\");\n\t\tdb.use(\"auctionscan\");\n\t}", "public Database(Context context) { \n\t\tsuper( context, database_MEF, null, 2); \n\t}", "public String getDb() {\n return db;\n }", "public String getDb() {\n return db;\n }", "public String getDatabaseName()\n {\n return \"product\";\n }", "Database getDatabase(Properties properties, ApplicationContext applicationContext);", "public MyBudgetDatabase(String databaseName) throws SQLException {\n this.dbName = databaseName;\n }", "@Override\n public Database getDatabase() {\n return m_database;\n }", "public void setDatabaseEngine(String databaseEngine) {\n this.databaseEngine = databaseEngine;\n }", "public void setDbTable(String v) {this.dbTable = v;}", "public DBMS(Context context) {\n super(context, DBName, null, DBVersion);\n Log.e(\"DBMS=>\", \"yes Db bna d ha\");\n }", "protected String getDatabaseName() {\n\t\treturn database;\n\t}", "public int getDatabaseType()\n {\n return Constants.LOCAL | Constants.SHARED_DATA | Constants.LOCALIZABLE;\n }", "@Override\n\tpublic Database createDatabase(Type type) throws FSException {\n\t\treturn new DummyDatabase();\n\t}", "public interface LocalDatabase {\n void start();\n void stop();\n boolean isAvailable();\n\n String getUrl();\n String getDriver();\n String getUsername();\n String getPassword();\n String getDialect();\n}", "public String getDatabaseEngine() {\n return this.databaseEngine;\n }", "public static void setUseTestDatabase(boolean useTestDatabase) {\n }", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "private void connectDatabase(){\n }", "public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\n\t}", "public static void useTempFileDatabase() {\n\t\tsetDatabaseMap(TempFileDatabaseMap.class);\n\t}", "public Database() {\n if (init) {\n\n //creating Transaction data\n Transaction transactionOne\n = new Transaction(1, \"Debit\", \"Spar Grocery\", 54.68,1);\n\n transactionDB.add(transactionOne);\n\n // Creating an Account data\n Account accountOne = new Account(1, 445, 111111111, \"Savings\",\n 1250.24, transactionDB);\n\n accountDB.add(accountOne);\n\n //creating withdrawal data\n Withdrawal withdrawalOne = new Withdrawal(1, 64422545, 600.89);\n withdrawalDB.add(withdrawalOne);\n\n //creating transfer data\n Transfer transferOne = new Transfer(1, 25252525, 521.23);\n transferDB.add(transferOne);\n\n //creating lodgement data\n Lodgement lodgementOne = new Lodgement(1, 67766666, 521.23);\n lodgementDB.add(lodgementOne);\n\n //add Customer data \n Customer customerOne\n = new Customer(1, \"Darth Vader\", \"[email protected]\",\n \"Level 5, Suit Dark\", \"darkSideIsGoodStuff\",\n accountDB, withdrawalDB, transferDB, lodgementDB);\n\n customerDB.add(customerOne);\n\n init = false;\n }\n }", "public Database(String dbName) {\n this.dbName = dbName;\n }", "public abstract ODatabaseInternal<?> openDatabase();", "public void creatDataBase(String dbName);", "private DatabaseManager() {}", "static AppDatabase getDatabase(final Context context) {\n if (INSTANCE == null) { //only a single thread can run this block at once\n //we only want this because we don't want to run too many databases\n synchronized (AppDatabase.class) {\n if(INSTANCE == null) {\n INSTANCE = Room.databaseBuilder(context.getApplicationContext(), AppDatabase.class, \"saved_locations_db\").build(); //build a database object\n }\n\n }\n }\n return INSTANCE;\n }", "public String getType() \t\t\t\t{ return DATABASE_NAME; }", "public Database getDatabase() {\n return dbHandle;\n }", "public DatabaseBackend(Context context) {\n super(context, Db_name, null, Db_version);\n }", "public Database(Context context) {\n super(context, nome_db, null, versao_db);\n }", "private DatabaseCustomAccess(Context context) {\n\t\thelper = new SpokaneValleyDatabaseHelper(context);\n\n\t\tsaveInitialPoolLocation(); // save initial pools into database\n\t\tsaveInitialTotalScore(); // create total score in database\n\t\tsaveInitialGameLocation(); // create game location for GPS checking\n\t\tLoadingDatabaseTotalScore();\n\t\tLoadingDatabaseScores();\n\t\tLoadingDatabaseGameLocation();\n\t}", "private void setupDatabase()\n {\n try\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n }\n catch (ClassNotFoundException e)\n {\n simpleEconomy.getLogger().severe(\"Could not load database driver.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n\n try\n {\n connection = DriverManager\n .getConnection(String.format(\"jdbc:mysql://%s/%s?user=%s&password=%s\",\n simpleEconomy.getConfig().getString(\"db.host\"),\n simpleEconomy.getConfig().getString(\"db.database\"),\n simpleEconomy.getConfig().getString(\"db.username\"),\n simpleEconomy.getConfig().getString(\"db.password\")\n ));\n\n // Loads the ddl from the jar and commits it to the database.\n InputStream input = getClass().getResourceAsStream(\"/ddl.sql\");\n try\n {\n String s = IOUtils.toString(input);\n connection.createStatement().execute(s);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n input.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n catch (SQLException e)\n {\n simpleEconomy.getLogger().severe(\"Could not connect to database.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n }", "public String getDB() {\n\t\treturn db;\r\n\t}", "public DBManager(Context context){ \n\t\thelper = new DBHelper(context); \n\t\tdb = helper.getWritableDatabase(); \n\t}", "private Db() {\n super(Ke.getDatabase(), null);\n }", "public Database(Context context)\n\t{\n\t\t/* Instanciation de l'openHelper */\n\t\tDBOpenHelper helper = new DBOpenHelper(context);\n\t\t\n\t\t/* Load de la database */\n\t\t//TODO passer en asynchrone pour les perfs\n\t\tmainDatabase = helper.getWritableDatabase();\n\t\t\n\t\t/* DEBUG PRINT */\n\t\tLog.i(\"info\", \"Database Loading Suceeded\");\n\t}", "public void setDbMysql(String database) {\n this.dbMysql = database;\n }", "public DataHandlerDBMS() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tDBMS = DriverManager.getConnection(url);\n\t\t\tSystem.out.println(\"DBSM inizializzato\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Errore apertura DBMS\");\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Assenza driver mySQL\");\n\t\t}\n\t}", "@Before\n public void initDb() {\n mDatabase = Room.inMemoryDatabaseBuilder(InstrumentationRegistry.getContext(),\n ToDoDatabase.class).build();\n }", "public GosplPopulationInDatabase() {\n\t\ttry {\n\t\t\tthis.connection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:hsqldb:mem:\"+mySqlDBname+\";shutdown=true\", \"SA\", \"\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"error while trying to initialize the HDSQL database engine in memory: \"+e.getMessage(), e);\n\t\t}\n\t}", "Object getDB();", "public String getDbTable() {return dbTable;}", "@Override\n public String getDatabaseName() {\n return mappings.getDatabaseName();\n }", "private Database() throws SQLException {\n con = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:MusicAlbums\", \"c##dba\", \"sql\");\n }", "long createDatabase(long actor, String nameToDisplay, long proteinDBType, long sizeInBytes, boolean bPublic, boolean bReversed, ExperimentCategory category);", "public Database getDatabase() {\n\t\treturn this.database;\n\t}", "public String databaseName();", "public DB getDB() {\n return database;\n }", "public DataBaseManager(Context context) {\n helper = new DataBaseHelper(context);\n db = helper.getWritableDatabase();\n }", "public DatabaseStorage(Context context)\n {\n this.database = new DatabaseStorageHelper(context);\n }", "public DatabaseManager(Context context) {\n super(context, DATABASE_NAME, null, DATABASE_VERSION);\n }", "public DatabaseManager() {\n try {\n con = DriverManager.getConnection(DB_URL, \"root\", \"marko\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private void ini_SelectDB()\r\n\t{\r\n\r\n\t}", "public Database(Context context) {\n super(context, DB_NAME, null, DB_VER);\n }", "public sqlDatabase() {\n }", "public static void setDatabaseOperation(DatabaseOperation db) {\n\t\tdatabaseOperation = db;\n\t}", "private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }", "public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}", "public String getDatabaseName () {\n return databaseName;\n }", "public DatabaseParameter() {\n super(\"database\", \"Database\");\n }", "private void initConfig() throws DatabaseAccessException {\n\t\tStatement stmt = null;\n\n\t\ttry {\n\t\t\tstmt = this.connection.createStatement();\n\n\t\t\t// With synchronous OFF, SQLite continues without syncing\n\t\t\t// as soon as it has handed data off to the operating system.\n\t\t\tstmt.execute(\"PRAGMA synchronous = OFF;\");\n\n\t\t\t// The MEMORY journaling mode stores the rollback journal in volatile RAM.\n\t\t\t// This saves disk I/O but at the expense of database safety and integrity.\n\t\t\tstmt.execute(\"PRAGMA journal_mode = MEMORY;\");\n\n\t\t\t// The journal_size_limit pragma may be used to limit the size of rollback-journal.\n\t\t\t// -1 means no limit.\n\t\t\tstmt.execute(\"PRAGMA journal_size_limit = -1;\");\n\n\t\t\t// If the argument N is negative, then the number of cache pages\n\t\t\t// is adjusted to use approximately N*1024 bytes of memory.\n\t\t\tstmt.execute(\"PRAGMA cache_size = -50000;\");\n\n\t\t\t// Once an encoding has been set for a database, it cannot be changed.\n\t\t\tstmt.execute(\"PRAGMA encoding = \\\"UTF-8\\\";\");\n\n\t\t\t// When temp_store is MEMORY temporary tables and indices are kept\n\t\t\t// in as if they were pure in-memory databases memory.\n\t\t\tstmt.execute(\"PRAGMA temp_store = MEMORY;\");\n\n\t\t\tstmt.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DatabaseAccessException(Failure.CONFIG);\n\t\t}\n\t}", "public Database() {\n\t\tconn = null;\n\t}", "private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }", "public LocalDatabase(String DBName) {\n\t\tname = DBName;\n\t\texternal = new RS_LastFMInterface();\t\t\n\t}", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void start() {\n\t\tinitLogger();\n\n\t\tif (!databaseEnabled) {\n\t\t\tlog.info(\"DB not enabled.\");\n\t\t\treturn;\n\t\t}\n\n\t\tlog.info(\"DB start ----------\");\n\n\t\tfinal PetiteContainer petiteContainer = joyPetiteSupplier.get().getPetiteContainer();\n\n\t\t// connection pool\n\t\tconnectionProvider = createConnectionProviderIfNotSupplied();\n\n\t\tpetiteContainer.addBean(beanNamePrefix() + \"pool\", connectionProvider);\n\n\t\tif (connectionProvider instanceof CoreConnectionPool) {\n\t\t\tfinal CoreConnectionPool pool = (CoreConnectionPool) connectionProvider;\n\t\t\tif (pool.getDriver() == null) {\n\t\t\t\tdatabaseEnabled = false;\n\t\t\t\tlog.warn(\"DB configuration not set (\" + beanNamePrefix() + \"pool.*). DB will be disabled.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconnectionProvider.init();\n\n\t\tcheckConnectionProvider();\n\n\t\t// transactions manager\n\t\tjtxManager = createJtxTransactionManager(connectionProvider);\n\t\tjtxManager.setValidateExistingTransaction(true);\n\n\t\tfinal AnnotationTxAdviceManager annTxAdviceManager = new AnnotationTxAdviceManager(new LeanJtxWorker(jtxManager), jtxScopePattern);\n\t\tAnnotationTxAdviceSupport.manager = annTxAdviceManager;\n\n\t\t// create proxy\n\t\tjoyProxettaSupplier.get().getProxetta().withAspect(createTxProxyAspects(annTxAdviceManager.getAnnotations()));\n\n\t\tfinal DbSessionProvider sessionProvider = new DbJtxSessionProvider(jtxManager);\n\n\t\t// querymap\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal QueryMap queryMap = new DbPropsQueryMap();\n\n\t\tlog.debug(\"Queries loaded in \" + (System.currentTimeMillis() - startTime) + \"ms.\");\n\t\tlog.debug(\"Total queries: \" + queryMap.size());\n\n\t\t// dboom\n\t\tdbOom = DbOom.create()\n\t\t\t.withConnectionProvider(connectionProvider)\n\t\t\t.withSessionProvider(sessionProvider)\n\t\t\t.withQueryMap(queryMap)\n\t\t\t.get();\n\n\t\tdbOom.connect();\n\n\t\tfinal DbEntityManager dbEntityManager = dbOom.entityManager();\n\t\tdbEntityManager.reset();\n\n\t\tpetiteContainer.addBean(beanNamePrefix() + \"query\", dbOom.queryConfig());\n\t\tpetiteContainer.addBean(beanNamePrefix() + \"oom\", dbOom.config());\n\n\t\t// automatic configuration\n\t\tif (autoConfiguration) {\n\t\t\tfinal AutomagicDbOomConfigurator automagicDbOomConfigurator =\n\t\t\t\tnew AutomagicDbOomConfigurator(dbEntityManager, true);\n\n\t\t\tautomagicDbOomConfigurator.configure();\n\t\t}\n\n\t\tdbEntityManagerConsumers.accept(dbEntityManager);\n\n\t\tlog.info(\"DB OK!\");\n\t}", "public ODatabaseInternal<?> db() {\n return ODatabaseRecordThreadLocal.INSTANCE.get().getDatabaseOwner();\n }", "public interface DatabaseOperations {\n\n public static final String DATABASE_NAME = \"ghost_database\";\n\n public static final String TABLE_SIGHTINGS = \"SIGHTINGS\";\n\n public static final String ROW_ID = \"_id\";\n\n public static final String TITLE = \"title\";\n public static final String DESCRIPTION = \"DESCRIPTION\";\n public static final String LATITUDE = \"lat\";\n public static final String LONGITUDE = \"lon\";\n public static final String RATING = \"rating\";\n}", "private void setupDBs()\n {\n\t mSetupDBTask = new SetupDBTask(this);\n\t\tmSetupDBTask.execute((Void[])null);\n }", "public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }", "@Override\r\n\tpublic boolean supportsDb(String type) {\r\n \treturn true;\r\n }", "private void createDB() {\n try {\n Statement stat = conn.createStatement();\n stat.execute(\"CREATE TABLE settings (name TEXT, state);\");\n stat.execute(\"CREATE TABLE expressions (id INTEGER PRIMARY KEY ASC AUTOINCREMENT, expression TEXT);\");\n stat.execute(\"CREATE TABLE summaries (id INTEGER PRIMARY KEY ASC, expression_id INTEGER, title TEXT, abstract TEXT);\");\n stat.execute(\"CREATE TABLE history (id INTEGER PRIMARY KEY ASC AUTOINCREMENT, expression TEXT);\");\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n }\n }" ]
[ "0.68714786", "0.6771366", "0.6741194", "0.67081124", "0.6694574", "0.6668282", "0.6583996", "0.65664536", "0.6564936", "0.6563292", "0.6514668", "0.64954394", "0.64025146", "0.6401199", "0.6363365", "0.63628596", "0.6352884", "0.6344699", "0.6326875", "0.6306458", "0.63057554", "0.6279396", "0.6272198", "0.62504226", "0.62443566", "0.6221328", "0.62166375", "0.6214606", "0.6214606", "0.61969995", "0.6183292", "0.6167487", "0.6165725", "0.61518097", "0.6141872", "0.61363924", "0.6128925", "0.6112888", "0.61027116", "0.6096409", "0.6081419", "0.6066795", "0.6066261", "0.6066261", "0.6066261", "0.6066261", "0.60537714", "0.6050104", "0.6046235", "0.6035247", "0.60339993", "0.6021614", "0.6011159", "0.6007949", "0.60076356", "0.6003607", "0.60026956", "0.5999753", "0.59989154", "0.5997318", "0.59943575", "0.59928274", "0.59826887", "0.5982099", "0.59782636", "0.597624", "0.59587187", "0.5955824", "0.5954172", "0.5953601", "0.5949669", "0.59484506", "0.5946915", "0.5946371", "0.59444755", "0.59174246", "0.59167635", "0.5914791", "0.591269", "0.59117454", "0.5897839", "0.58883226", "0.5887223", "0.58830965", "0.5863681", "0.58619994", "0.58590853", "0.5858548", "0.5857563", "0.58562154", "0.5850507", "0.58489114", "0.5831584", "0.5828197", "0.58278155", "0.5827058", "0.58246577", "0.5824066", "0.5823963", "0.5819511" ]
0.63153356
19
Give the menus a common interface for Waitress.
public interface Menu { public Iterator createIterator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface MainMenuExecutor {\n\tpublic void clickExit();\n\t\n\tpublic void clickSetup();\n\t\n\tpublic void clickStart();\n\t\n\tpublic void clickStop();\n\t\n\tpublic void clickShow();\n}", "void askMenu();", "public Menu createToolsMenu();", "protected abstract void addMenuOptions();", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }", "private void makeUtilitiesMenu() {\r\n\t\tJMenu utilitiesMnu = new JMenu(\"Utilidades\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Reportes\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Reportes\",\r\n\t\t\t\t\timageLoader.getImage(\"reports.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'r',\r\n\t\t\t\t\t\"Ver los reportes del sistema\", null,\r\n\t\t\t\t\tReports.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"ConsultarPrecios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Consultar Precios\",\r\n\t\t\t\t\timageLoader.getImage(\"money.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'p',\r\n\t\t\t\t\t\"Consultar los precios de los productos\", null,\r\n\t\t\t\t\tPriceRead.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Calculadora\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Calculadora Impuesto\",\r\n\t\t\t\t\timageLoader.getImage(\"pc.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Calculadora de impuesto\", null, Calculator.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tutilitiesMnu.addSeparator();\r\n\t\tif (StoreCore.getAccess(\"Categorias\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Categorias Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"group.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'i',\r\n\t\t\t\t\t\"Manejar las categorias del inventario\", null, Groups.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Impuestos\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Impuestos\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Manejar el listado de impuestos\", null, Tax.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Ciudades\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ciudades\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'u',\r\n\t\t\t\t\t\"Manejar el listado de ciudades\", null, City.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tutilitiesMnu.setMnemonic('u');\r\n\t\t\tadd(utilitiesMnu);\r\n\t\t}\r\n\t}", "private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }", "public void initMenu(){\n\t}", "public abstract void displayMenu();", "public abstract Menu mo2158c();", "private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\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 }", "MenuTransmitter getMenuTransmitter();", "private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\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}", "@Override\n\tpublic void setUpMenu() {\n\t\t\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}", "public static void mainMenu() throws InterruptedException {\n\n // Calling the delay method to slow down the speed of the menu presentation\n delay();\n\n //Displaying the menu options by using the system out method\n System.out.println(\"Menu Main: \\n\");\n System.out.println(\"1 - Create a project\");\n System.out.println(\"2 - View projects\");\n System.out.println(\"3 - Completed projects\");\n System.out.println(\"4 - Customer information\");\n System.out.println(\"5 - Architect information\");\n System.out.println(\"6 - Project Manager Information\");\n System.out.println(\"7 - Structural Engineer Information\");\n System.out.println(\"8 - Past Due projects\\n\");\n System.out.println(\"0 - Exit\\n\");\n }", "IMenu getMainMenu();", "void Menu();", "private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }", "private static void returnMenu() {\n\t\t\r\n\t}", "public void readTheMenu();", "C getMenu();", "private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\n\t}", "void clickAmFromMenu();", "public interface MenuItem {\n\n\n public String getTitle();\n\n public String getLogoUrl();\n\n public void onClick(BaseActivity baseActivity);\n\n public boolean isChecked();\n\n public boolean isCheckable();\n\n public Fragment getFragment();\n}", "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 createMenus()\n {\n EventQueueUtilities.runOnEDT(this::createMenusNow);\n }", "private void setupMenu() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tJMenuItem conn = new JMenuItem(connectAction);\n\t\tJMenuItem exit = new JMenuItem(\"退出\");\n\t\texit.addActionListener(new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\texit();\n\t\t\t}\n\t\t});\n\t\tJMenu file = new JMenu(\"客户端\");\n\t\tfile.add(conn);\n\t\tmenuBar.add(file);\n\t\tsetJMenuBar(menuBar);\n\t}", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "public interface Menu {\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item (which will be interpreted as plain text and\n * HTML-escaped if necessary)\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(String title, Command callback);\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item, as a {@link SafeHtml}\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(SafeHtml title, Command callback);\n}", "private void makeThirdPartyMenu() {\r\n\t\tJMenu thirdPartyMnu = new JMenu(\"Terceros\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Clientes\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenu customerMnu = new JMenu(\"Clientes\");\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarClientes\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Cliente\");\r\n\t\t\t\taddItem.setMnemonic('c');\r\n\t\t\t\taddItem.setToolTipText(\"Agregar rapidamente un nuevo cliente\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddCustomer(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tcustomerMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Clientes\",\r\n\t\t\t\t\timageLoader.getImage(\"customer.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'l',\r\n\t\t\t\t\t\"Ver el listado de clientes\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F8, 0), Customer.class);\r\n\t\t\tcustomerMnu.add(menuItem);\r\n\r\n\t\t\tcustomerMnu.setMnemonic('c');\r\n\t\t\tthirdPartyMnu.add(customerMnu);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Proveedores\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenu customerMnu = new JMenu(\"Proveedores\");\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarProveedores\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Proveedor\");\r\n\t\t\t\taddItem.setMnemonic('p');\r\n\t\t\t\taddItem\r\n\t\t\t\t\t\t.setToolTipText(\"Agregar rapidamente un nuevo proveedor\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddProvider(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tcustomerMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Proveedores\",\r\n\t\t\t\t\timageLoader.getImage(\"provider.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'l',\r\n\t\t\t\t\t\"Ver el listado de proveedores\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F9, 0), Provider.class);\r\n\t\t\tcustomerMnu.add(menuItem);\r\n\r\n\t\t\tcustomerMnu.setMnemonic('p');\r\n\t\t\tthirdPartyMnu.add(customerMnu);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tthirdPartyMnu.setMnemonic('t');\r\n\t\t\tadd(thirdPartyMnu);\r\n\t\t}\r\n\t}", "public interface EventPressMenu {\r\n public void OnClickMenu(String name);\r\n}", "Menu getMenuHelp();", "private static void createAndShowGUI() {\n if (!SystemTray.isSupported()) {\n log.error(\"SystemTray is not supported\");\n return;\n }\n\n SystemTray tray = SystemTray.getSystemTray();\n\n Image icon = createImage(\"/images/b2b.gif\", \"tray icon\");\n trayIcon = new TrayIcon(icon);\n trayIcon.setImageAutoSize(true);\n trayIcon.setToolTip(\"back2back\");\n\n PopupMenu popupMenu = new PopupMenu();\n {\n openWebUIMenuItem = new MenuItem(\"Open back2back web interface\");\n openWebUIMenuItem.addActionListener(B2BTrayIcon::openWebUI);\n popupMenu.add(openWebUIMenuItem);\n }\n popupMenu.addSeparator();\n {\n startAutomaticallyMenuItem = new CheckboxMenuItem(\"Start automatically with system\");\n startAutomaticallyMenuItem.addItemListener(e -> {\n int newState = e.getStateChange();\n setAutoStart(newState == ItemEvent.SELECTED);\n });\n startAutomaticallyMenuItem.setEnabled(serviceController != null);\n popupMenu.add(startAutomaticallyMenuItem);\n }\n popupMenu.addSeparator();\n {\n startMenuItem = new MenuItem(\"Start back2back engine\");\n startMenuItem.setEnabled(false);\n startMenuItem.addActionListener(evt -> {\n try {\n startEngine();\n } catch (ControlException e) {\n log.error(\"Failed to start engine\", e);\n trayIcon.displayMessage(\"back2back\", \"Failed to start engine: \" + e.toString(), TrayIcon.MessageType.ERROR);\n }\n });\n popupMenu.add(startMenuItem);\n }\n {\n stopMenuItem = new MenuItem(\"Stop back2back engine\");\n stopMenuItem.setEnabled(false);\n stopMenuItem.addActionListener(evt -> {\n try {\n stopEngine();\n } catch (ControlException e) {\n trayIcon.displayMessage(\"back2back\", \"Failed to stop engine: \" + e.toString(), TrayIcon.MessageType.ERROR);\n }\n });\n popupMenu.add(stopMenuItem);\n }\n popupMenu.addSeparator();\n {\n MenuItem item = new MenuItem(\"About\");\n item.addActionListener(B2BTrayIcon::about);\n popupMenu.add(item);\n }\n {\n MenuItem item = new MenuItem(\"Check for update\");\n item.setEnabled(updateManager != null);\n item.addActionListener(B2BTrayIcon::checkForUpdate);\n popupMenu.add(item);\n }\n {\n MenuItem item = new MenuItem(\"Close tray icon\");\n item.addActionListener(e -> {\n tray.remove(trayIcon);\n System.exit(0);\n });\n popupMenu.add(item);\n }\n\n// popupMenu.addActionListener(e -> log.debug(\"POPUP ACTION\"));\n trayIcon.setPopupMenu(popupMenu);\n\n trayIcon.addActionListener(e -> log.debug(\"TRAY ACTION\"));\n\n try {\n tray.add(trayIcon);\n } catch (AWTException e) {\n log.error(\"TrayIcon could not be added.\", e);\n return;\n }\n\n //trayIcon.displayMessage(\"back2back\", \"Tray icon ready\", TrayIcon.MessageType.INFO);\n\n // start status update on background thread\n Thread thread = new Thread(B2BTrayIcon::pollStatus);\n thread.setDaemon(true);\n thread.start();\n\n log.info(\"Tray icon ready.\");\n }", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "public interface MenuOption {\n int menuItemId();\n void menuItemInfo(ConsoleInput cIn, Tracker tracker);\n\n\n}", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "public interface DisplayMenu {\n\tpublic void DisplayMenu(); //Display Menu\n}", "abstract void menu(User theUser);", "private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}", "private void constructMenus()\n\t{\n\t\tthis.fileMenu = new JMenu(\"File\");\n\t\tthis.editMenu = new JMenu(\"Edit\");\n\t\tthis.caseMenu = new JMenu(\"Case\");\n\t\tthis.imageMenu = new JMenu(\"Image\");\n\t\tthis.fileMenu.add(this.saveImageMenuItem);\n\t\tthis.fileMenu.addSeparator();\n\t\tthis.fileMenu.add(this.quitMenuItem);\n\t\tthis.editMenu.add(this.undoMenuItem);\n\t\tthis.editMenu.add(this.redoMenuItem);\n\t\tthis.caseMenu.add(this.removeImageMenuItem);\n\t\tthis.imageMenu.add(this.antiAliasMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.brightenMenuItem);\n\t\tthis.imageMenu.add(this.darkenMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.grayscaleMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.resizeMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.cropMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.rotate90MenuItem);\n\t\tthis.imageMenu.add(this.rotate180MenuItem);\n\t\tthis.imageMenu.add(this.rotate270MenuItem);\n\t}", "public interface IMenu {\r\n public class MenuItem {\r\n \r\n public static final MenuItem SEPARATOR = new MenuItem(\"SEPARATOR\", \"Separator\");\r\n \r\n private String menuId;\r\n private String menuText;\r\n private boolean checked;\r\n \r\n public MenuItem(String menuId, String menuText) {\r\n this.menuId = menuId;\r\n this.menuText = menuText;\r\n }\r\n\r\n public MenuItem(String menuText, boolean checked) {\r\n this.menuText = menuText; \r\n this.checked = checked;\r\n }\r\n\r\n public String getMenuId() {\r\n return menuId;\r\n }\r\n\r\n public void setMenuId(String menuId) {\r\n this.menuId = menuId;\r\n }\r\n\r\n public String getMenuText() {\r\n return menuText;\r\n }\r\n\r\n public void setMenuText(String menuText) {\r\n this.menuText = menuText;\r\n }\r\n\r\n public boolean isChecked() {\r\n return checked;\r\n }\r\n\r\n public void setChecked(boolean checked) {\r\n this.checked = checked;\r\n }\r\n }\r\n \r\n /**\r\n * Callback function for Caller when the MenuItem is clicked\r\n * \r\n * @param menuItemSelected The selected MenuItem\r\n */\r\n public void menuClicked(MenuItem menuItemSelected);\r\n}", "protected AccessibleAWTMenuComponent() {\n }", "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 }", "public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public interface Menu {\n\n void draw(Graphics2D g2d);\n void update(float elapsedTime, boolean[][] keyboardstate);\n void setActive(boolean bool);\n boolean isActive();\n\n}", "IMenuFactory getMenuFactory();", "public AdminMenu(JDealsController sysCtrl) {\n super(\"Select Menu\", sysCtrl);\n\n this.addItem(\"Admin Panel\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new AdminCommandList(getSysCtrl()).runMenu();\n return true;\n }\n });\n\n this.addItem(\"Default Menu\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new UserMenu(getSysCtrl()).runMenu();\n return true;\n }\n });\n }", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "public static void main(String[]args)\n\t{\n\t\tchoiceMenu();\n\t}", "public interface MenuNames {\n public static final String FILE = I18N.get(\"ui.MenuNames.FILE\");\n public static final String FILE_NEW = I18N.get(\"ui.MenuNames.FILE.NEW\");\n public static final String FILE_SAVEVIEW = I18N.get(\"ui.MenuNames.FILE.SAVEVIEW\");\n public static final String EDIT = I18N.get(\"ui.MenuNames.EDIT\");\n public static final String TOOLS_EDIT_ATTRIBUTES = I18N.get(\"ui.MenuNames.EDIT\") + \" \" + I18N.get(\"ui.MenuNames.ATTRIBUTS\");\n public static final String TOOLS_EDIT_GEOMETRY = I18N.get(\"ui.MenuNames.EDIT\") + \" \" + I18N.get(\"ui.MenuNames.GEOMETRY\");\n public static final String VIEW = I18N.get(\"ui.MenuNames.VIEW\");\n public static final String MAP_DECORATIONS = I18N.get(\"ui.MenuNames.VIEW.MAP_DECORATIONS\");\n public static final String LAYER = I18N.get(\"ui.MenuNames.LAYER\");\n public static final String TOOLS = I18N.get(\"ui.MenuNames.TOOLS\");\n //public static final String TOOLS_ADVANCED = I18N.get(\"ui.MenuNames.TOOLS.ADVANCED\"); // not used, not translated\n public static final String TOOLS_ANALYSIS = I18N.get(\"ui.MenuNames.TOOLS.ANALYSIS\");\n public static final String TOOLS_GENERALIZATION = I18N.get(\"ui.MenuNames.TOOLS.GENERALIZATION\");\n public static final String TOOLS_GENERATE = I18N.get(\"ui.MenuNames.TOOLS.GENERATE\");\n public static final String TOOLS_JOIN = I18N.get(\"ui.MenuNames.TOOLS.JOIN\");\n public static final String TOOLS_QA = I18N.get(\"ui.MenuNames.TOOLS.QA\");\n public static final String TOOLS_WARP = I18N.get(\"ui.MenuNames.TOOLS.WARP\");\n //public static final String TOOLS_PROGRAMMING =I18N.get(\"ui.MenuNames.TOOLS.PROGRAMMING\");\n public static final String TOOLS_QUERIES =I18N.get(\"org.openjump.core.ui.plugin.queries.SimpleQuery.menu\");\n public static final String WINDOW = I18N.get(\"ui.MenuNames.WINDOW\");\n public static final String RASTERTOOLS = I18N.get(\"ui.MenuNames.RASTER\");\n // Michael Michaud 2008-04-06\n // New menu for synchronization\n public static final String WINDOW_SYNCHRONIZATION = I18N.get(\"ui.MenuNames.WINDOW.SYNCHRONIZATION\");\n public static final String HELP = I18N.get(\"ui.MenuNames.HELP\");\n public static final String PLUGINS = I18N.get(\"ui.MenuNames.PLUGINS\");\n \n // Michael Michaud 2007-03-23\n // New menu for plugin manager, beanshell console, scripts\n public static final String CUSTOMIZE = I18N.get(\"ui.MenuNames.CUSTOMIZE\");\n \n //erwan begin 2005-12-01 --- SIGLE\t\n //Menu\n public static final String ATTRIBUTS = I18N.get(\"ui.MenuNames.ATTRIBUTS\");\n public static final String SELECTION = I18N.get(\"ui.MenuNames.SELECTION\");\n public static final String RASTER = I18N.get(\"ui.MenuNames.RASTER\");\n public static final String STATISTICS = I18N.get(\"ui.MenuNames.STATISTICS\");\n public static final String GEOPROCESSING = \"SIGLE-\" + I18N.get(\"ui.MenuNames.GEOPROCESSING\");\n \n //Submenu\n //public static final String ONELAYER = I18N.get(\"ui.MenuNames.ONELAYER\");\n //public static final String TWOLAYERS = I18N.get(\"ui.MenuNames.TWOLAYERS\");\n \n public static final String CONVERT = I18N.get(\"ui.MenuNames.CONVERT\");\n public static final String EXTRACT = I18N.get(\"ui.MenuNames.EXTRACT\");\n public static final String MERGE = I18N.get(\"ui.MenuNames.MERGE\");\n public static final String GENERALIZATION = I18N.get(\"ui.MenuNames.GENERALIZATION\");\n public static final String TOPOLOGY = I18N.get(\"ui.MenuNames.TOPOLOGY\");\n //public static final String QA = I18N.get(\"ui.MenuNames.QA\"); // see MenuNames.TOOLS_QA\n public static final String DELETE = I18N.get(\"ui.MenuNames.DELETE\");\n public static final String DETECT = I18N.get(\"ui.MenuNames.DETECT\");\n public static final String PLOT = I18N.get(\"ui.MenuNames.PLOT\");\n \t\n //\terwan end 2005-12-01\n // Submenus for LayerName PopupMenu\n public static final String STYLE = I18N.get(\"ui.MenuNames.STYLE\");\n public static final String DATASTORE = I18N.get(\"ui.MenuNames.DATASTORE\");\n public static final String SCHEMA = I18N.get(\"ui.MenuNames.SCHEMA\");\n \n public static final String LAYERVIEWPANEL_POPUP = I18N.get(\"ui.MenuNames.LAYERVIEWPANEL_POPUP\");\n public static final String ATTRIBUTEPANEL_POPUP = I18N.get(\"ui.MenuNames.ATTRIBUTEPANEL_POPUP\");\n public static final String LAYERNAMEPANEL_LAYER_POPUP = I18N.get(\"ui.MenuNames.LAYERNAMEPANEL_LAYER_POPUP\");\n public static final String LAYERNAMEPANEL_CATEGORY_POPUP = I18N.get(\"ui.MenuNames.LAYERNAMEPANEL_CATEGORY_POPUP\");\n}", "private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}", "protected void setupUI() {\n\n }", "public static void main(String[] args) {\n\t\tnew menu().InitUI();\r\n\t}", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "public String getActivationMenu();", "public MenuBar lobbyMenu() {\n MenuBar menubar = new MenuBar();\n\n Menu accountMenu = new Menu(\"Account\");\n\n MenuItem preferences = new MenuItem(\"Preferences\");\n preferences.setOnAction(e -> new AccountGUI().start(stage, this, loginGUI, socket));\n\n MenuItem signOut = new MenuItem(\"Sign Out\");\n signOut.setOnAction(e -> {\n loginGUI.disconnect();\n loginGUI.start(stage);\n });\n\n accountMenu.getItems().addAll(preferences, signOut);\n\n menubar.getMenus().add(accountMenu);\n\n return menubar;\n }", "public void menu(){\n super.goToMenuScreen();\n }", "public static void menu() {\n\n\t\tSystem.out.println(\"\\n*** MENU ***: \");\n\t\tSystem.out.print(\"\\n1. Host current Date and Time\\n\" + \"2. Host uptime\\n\" + \"3. Host memory use\\n\"\n\t\t\t\t+ \"4. Host IPV4 socket connections\\n\" + \"5. Host current users\\n\" + \"6. Host running processes\\n\"\n\t\t\t\t+ \"7. Quit\\n\" + \"\\nSelect option: \");\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tmenuSelect = sc.nextInt();\n\t\t\tif (menuSelect < 1 || menuSelect > 7) {\n\t\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tswitch (menuSelect) {\n\t\tcase 1:\n\t\t\tSystem.out.println(\"Date Request from Client\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"Uptime Request from Client\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"Memory Use Request from Client\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"IPV4 Socket Connections Request from Client\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"Current Users Request from Client\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"Current OS Version Request from Client\");\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Quit\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tsc.close(); // close the Scanner object\n\t}", "public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayList<String>();\n \tgladiatorLore.add(\"FIGHT TO THE DEATH AND WIN YOUR FREEDOM\");\n \tgladiatorLore.add(\"GOOD LUCK WARRIOR!\");\n \tInventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, \"GLADIATOR\", gladiatorLore, 1, true, 1);\n \tinventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);\n \t\n \tchooseGameUI = new GUIInventory(plugin, \"MINIGAMES\", inventoryStuff, 3);\n }", "public ItemMenu(JDealsController sysCtrl) {\n super(\"Item Menu\", sysCtrl);\n\n this.addItem(\"Add general good\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.GOODS);\n }\n });\n this.addItem(\"Restourant Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.RESTOURANT);\n }\n });\n this.addItem(\"Travel Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.TRAVEL);\n }\n });\n }", "public interface MenuItem {\n\tpublic int getBasePrice();\n\tpublic int getAddOnPrice();\n\tpublic int getTotalGuestPrice(int additionalGuestTotal);\n\tpublic String getName();\n\tpublic String getDetails();\n}", "public static void initMenuBars()\n\t{\n\t\tmenuBar = new JMenuBar();\n\n\t\t//Build the first menu.\n\t\tmenu = new JMenu(\"Options\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(menu);\n\n\t\t//a group of JMenuItems\n\t\tmenuItem = new JMenuItem(\"Quit\",\n\t\t KeyEvent.VK_T);\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmenuItem.getAccessibleContext().setAccessibleDescription(\n\t\t \"This doesn't really do anything\");\n\t\tmenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Both text and icon\",\n\t\t new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_B);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_D);\n\t\tmenu.add(menuItem);\n\n\t\t//a group of radio button menu items\n\t\tmenu.addSeparator();\n\t\tButtonGroup group = new ButtonGroup();\n\t\trbMenuItem = new JRadioButtonMenuItem(\"A radio button menu item\");\n\t\trbMenuItem.setSelected(true);\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_R);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\trbMenuItem = new JRadioButtonMenuItem(\"Another one\");\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_O);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\t//a group of check box menu items\n\t\tmenu.addSeparator();\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"A check box menu item\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_C);\n\t\tmenu.add(cbMenuItem);\n\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"Another one\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_H);\n\t\tmenu.add(cbMenuItem);\n\n\t\t//a submenu\n\t\tmenu.addSeparator();\n\t\tsubmenu = new JMenu(\"A submenu\");\n\t\tsubmenu.setMnemonic(KeyEvent.VK_S);\n\n\t\tmenuItem = new JMenuItem(\"An item in the submenu\");\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_2, ActionEvent.ALT_MASK));\n\t\tsubmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Another item\");\n\t\tsubmenu.add(menuItem);\n\t\tmenu.add(submenu);\n\n\t\t//Build second menu in the menu bar.\n\t\tmenu = new JMenu(\"Another Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_N);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"This menu does nothing\");\n\t\tmenuBar.add(menu);\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\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "MenuItem getMenuItemAbout();", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "public Menu createViewMenu();", "@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}", "private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\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}", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}", "private void searchMenu(){\n\t\t\n\t}", "public static void main(String[] args){\n\n main_menu();\n\n }", "public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }", "private void initMenuOptions(IUserAccount user, JPanel optionPanel) {\n\n String startNewTransactionButtonText = languageRB.getString(\"startNewTransactionButtonText\");\n String myItemsButtonText = languageRB.getString(\"myItemsButtonText\");\n String myTradesButtonText = languageRB.getString(\"myTradesButtonText\");\n String myAccountButtonText = languageRB.getString(\"myAccountButtonText\");\n String manageUserButtonText = languageRB.getString(\"manageUserButtonText\");\n String newMessagesButtonText = languageRB.getString(\"newMessagesButtonText\");\n String logOutButtonText = languageRB.getString(\"logOutButtonText\");\n\n JButton startNewTrans = new JButton(startNewTransactionButtonText);\n JButton myItems = new JButton(myItemsButtonText);\n JButton myTrades = new JButton(myTradesButtonText);\n JButton myAccount = new JButton(myAccountButtonText);\n JButton manageUser = new JButton(manageUserButtonText);\n JButton newMessages = new JButton(newMessagesButtonText);\n JButton logOut = new JButton(logOutButtonText);\n\n startNewTrans.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n SelectTradeType.MenuScreen(user, languageRB);\n menuFrame.setVisible(false);\n }\n });\n myItems.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n MyItemsMenu.MenuScreen(user, languageRB);\n menuFrame.setVisible(false);\n }\n });\n myTrades.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n MyTradesMenu.MenuScreen(user, languageRB);\n menuFrame.setVisible(false);\n }\n });\n myAccount.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n MyAccountMenu.MenuScreen(user, languageRB);\n menuFrame.setVisible(false);\n }\n });\n manageUser.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n ManageUserMenu.MenuScreen(user, languageRB);\n menuFrame.setVisible(false);\n }\n });\n newMessages.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n NewMessagesInterface.MenuScreen(user, languageRB);\n menuFrame.setVisible(false);\n }\n });\n logOut.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n new LoginMenu(languageRB);\n menuFrame.setVisible(false);\n }\n });\n\n if (!user.getStatus().equals(\"Guest\")) {\n uiNavigator.formatButtonSize(startNewTrans, optionPanel);\n uiNavigator.formatButtonSize(myTrades, optionPanel);\n uiNavigator.formatButtonSize(newMessages, optionPanel);\n }\n uiNavigator.formatButtonSize(myItems, optionPanel);\n uiNavigator.formatButtonSize(myAccount, optionPanel);\n if (user.getStatus().equals(\"Admin\")){\n uiNavigator.formatButtonSize(manageUser, optionPanel);\n }\n uiNavigator.formatButtonSize(logOut, optionPanel);\n }", "public static void main(String[] args) {\n\n UIController.getInstance().setMain(new SelectionMenuUI());\n UIController.getInstance().startUI();\n\n }", "@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}", "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 }", "private void createMenu()\n\t{\n\t\tfileMenu = new JMenu(\"File\");\n\t\thelpMenu = new JMenu(\"Help\");\n\t\ttoolsMenu = new JMenu(\"Tools\");\n\t\t\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\texit = new JMenuItem(\"Exit\");\t\t\n\t\treadme = new JMenuItem(\"Readme\");\n\t\tabout = new JMenuItem(\"About\");\n\t\tsettings = new JMenuItem(\"Settings\");\n\t\t\t\t\n\t\tfileMenu.add (exit);\n\t\t\n\t\thelpMenu.add (readme);\n\t\thelpMenu.add (about);\t\n\t\t\n\t\ttoolsMenu.add (settings);\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(helpMenu);\t\t\n\t\t\t\t\n\t\tdefaultMenuBackground = menuBar.getBackground();\n\t\tdefaultMenuForeground = fileMenu.getForeground();\n\t\t\n\t}", "@Override\r\n public void run() {\n opsi_menu();\r\n\r\n }", "public ArrayList<String> menuComBox();", "void setMenuItem(MenuItem menuItem);", "private void bind() \r\n\t{\r\n\t\tsuper.menuPut(\"list\", newJMenu(\"List\", 'L'));\r\n\t\tsuper.menuPut(\"list/new\", newJMenuItem(\"New\", 'N', KeyEvent.VK_1, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionNew(x));\r\n\t\tsuper.menuPut(\"list/open\", newJMenuItem(\"Open\", 'O', KeyEvent.VK_2, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionLoad(x));\r\n\t\tsuper.menuPut(\"list/save\", newJMenuItem(\"Save\", 'S', KeyEvent.VK_3, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionSave(x));\r\n\t\tsuper.menuPut(\"list/***1\", \"\");\r\n\t\tsuper.menuPut(\"list/add\", newJMenuItem(\"Add\", 'A', KeyEvent.VK_4, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionAdd(x));\r\n\t\tsuper.menuPut(\"list/remove\", newJMenuItem(\"Remove\", 'R', KeyEvent.VK_5, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionRemove(x));\r\n\t\t\r\n\t\tsuper.menuPut(\"tree\", newJMenu(\"Tree\", 'T'));\r\n\t\tsuper.menuPut(\"tree/new\", newJMenuItem(\"New\", 'N', KeyEvent.VK_1, ActionEvent.SHIFT_MASK), x -> menuEdit.actionNew(x));\r\n\t\tsuper.menuPut(\"tree/open\", newJMenuItem(\"Open\", 'O', KeyEvent.VK_2, ActionEvent.SHIFT_MASK), x -> menuEdit.actionLoad(x));\r\n\t\tsuper.menuPut(\"tree/save\", newJMenuItem(\"Save\", 'S', KeyEvent.VK_3, ActionEvent.SHIFT_MASK), x -> menuEdit.actionSave(x));\r\n\t\tsuper.menuPut(\"tree/***1\", \"\");\r\n\t\tsuper.menuPut(\"tree/add\", newJMenuItem(\"Add\", 'A', KeyEvent.VK_4, ActionEvent.SHIFT_MASK), x -> menuEdit.actionAdd(x));\r\n\t\tsuper.menuPut(\"tree/remove\", newJMenuItem(\"Remove\", 'R', KeyEvent.VK_5, ActionEvent.SHIFT_MASK), x -> menuEdit.actionRemove(x));\r\n\t\tsuper.menuPut(\"tree/move\", newJMenuItem(\"Move\", 'V', KeyEvent.VK_6, ActionEvent.SHIFT_MASK), x -> menuEdit.actionMove(x));\r\n\t\t\r\n\t\tsuper.menuPut(\"graph\", newJMenu(\"Graph\", 'G'));\r\n\t\tsuper.menuPut(\"graph/new\", newJMenuItem(\"New\", 'N', KeyEvent.VK_1, ActionEvent.CTRL_MASK), x -> menuHelp.actionNew(x));\r\n\t\tsuper.menuPut(\"graph/open\", newJMenuItem(\"Open\", 'O', KeyEvent.VK_2, ActionEvent.CTRL_MASK), x -> menuHelp.actionOpen(x));\r\n\t\tsuper.menuPut(\"graph/save\", newJMenuItem(\"Save\", 'S', KeyEvent.VK_3, ActionEvent.CTRL_MASK), x -> menuHelp.actionSave(x));\r\n\t\tsuper.menuPut(\"graph/***1\", \"\");\r\n\t\tsuper.menuPut(\"graph/add-node\", newJMenuItem(\"Add node\", 'A', KeyEvent.VK_4, ActionEvent.CTRL_MASK), x -> menuHelp.actionAddNode(x));\r\n\t\tsuper.menuPut(\"graph/remove-node\", newJMenuItem(\"Remove node\", 'R', KeyEvent.VK_5, ActionEvent.CTRL_MASK), x -> menuHelp.actionRemoveNode(x));\r\n\t\tsuper.menuPut(\"graph/move-node\", newJMenuItem(\"Move node\", 'V', KeyEvent.VK_6, ActionEvent.CTRL_MASK), x -> menuHelp.actionMoveNode(x));\r\n\t\tsuper.menuPut(\"graph/***2\", \"\");\r\n\t\tsuper.menuPut(\"graph/add-link\", newJMenuItem(\"Add link\", 'D', KeyEvent.VK_7, ActionEvent.CTRL_MASK), x -> menuHelp.actionAddLink(x));\r\n\t\tsuper.menuPut(\"graph/remove-link\", newJMenuItem(\"Remove link\", 'L', KeyEvent.VK_8, ActionEvent.CTRL_MASK), x -> menuHelp.actionRemoveLink(x));\r\n\t\t\r\n\t\tsuper.menuDump();\t\t\r\n\t}", "private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }", "public void menuOptions(String type) {\n System.out.println(\"\\n\" + \"To select an option, type what's inside the parenthesis.\");\n System.out.println(\"While in a sub-menu -> (0) Back out of a sub-menu. \\n\");\n System.out.println(\"Main Menu\");\n if (type.equals(\"Attendee\") || type.equals(\"VIP\")) {\n System.out.println(\"(1a) Message, (2a) Contacts, (3a) Signup, (4a) See Attendee Schedule\");\n System.out.println(\"(5a) Get Event Details, (6a) View Conference Schedule, \"+\n \" (p) Export the conference schedule to a PDF\");\n } else if (type.equals(\"Organizer\")) {\n System.out.println(\"(1o) Message, (2o) Contacts, (3o) View Conference Schedule\");\n System.out.println(\"(4o) Modify Events, (5o) Add room, (6o) Create a User account\"+\n \" (p) Export the conference schedule to a PDF\");\n System.out.println(\"(7o) View Current Rooms, (8o) Get Event Details\");\n } else if (type.equals(\"Speaker\")) {\n System.out.println(\"(1s) Message, (2s) Contacts, (3s) See Speaker Schedule\");\n System.out.println(\"(4s) Get Event Details, (5s) View Conference Schedule\"+\n \" (p) Export the conference schedule to a PDF\");\n }\n System.out.println(\"Type Quit to logout\");\n }", "@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "public void init() {\n\t\tsuper.init();\n\n\t\tsetName(NAME);\n\n\t\tmoveUpMenuItem = new JMenuItem(MENU_ITEM_MOVE_UP);\n\t\tmoveUpMenuItem.setName(NAME_MENU_ITEM_MOVE_UP);\n\t\tmoveUpMenuItem.setEnabled(true);\n\t\tmoveUpMenuItem.addActionListener(moveUpAction);\n\t\tmoveUpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_UP,\n\t\t\t\tActionEvent.ALT_MASK));\n\n\t\tmoveDownMenuItem = new JMenuItem(MENU_ITEM_MOVE_DOWN);\n\t\tmoveDownMenuItem.setName(NAME_MENU_ITEM_MOVE_DOWN);\n\t\tmoveDownMenuItem.setEnabled(true);\n\t\tmoveDownMenuItem.addActionListener(moveDownAction);\n\t\tmoveDownMenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t\t\tKeyEvent.VK_DOWN, ActionEvent.ALT_MASK));\n\n\t\tdeleteMenuItem = new JMenuItem(MENU_ITEM_DELETE);\n\t\tdeleteMenuItem.setName(NAME_MENU_ITEM_DELETE);\n\t\tdeleteMenuItem.setEnabled(true);\n\t\tdeleteMenuItem.addActionListener(deleteAction);\n\t\tdeleteMenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t\t\tKeyEvent.VK_DELETE, 0));\n\n\t\taddMenuItem = new JMenuItem(MENU_ITEM_ADD);\n\t\taddMenuItem.setName(NAME_MENU_ITEM_ADD);\n\t\taddMenuItem.setEnabled(true);\n\t\taddMenuItem.addActionListener(addAction);\n\t\taddMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\n\t\t\t\tActionEvent.ALT_MASK));\n\n\t\teditMenuItem = new JMenuItem(MENU_ITEM_EDIT);\n\t\teditMenuItem.setName(NAME_MENU_ITEM_EDIT);\n\t\teditMenuItem.setEnabled(true);\n\t\teditMenuItem.addActionListener(editAction);\n\t\teditMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E,\n\t\t\t\tActionEvent.ALT_MASK));\n\n\t\tsendMidiMenuItem = new JMenuItem(MENU_ITEM_SEND_MIDI);\n\t\tsendMidiMenuItem.setName(NAME_MENU_ITEM_SEND_MIDI);\n\t\tsendMidiMenuItem.setEnabled(false);\n\t\tsendMidiMenuItem.addActionListener(sendMidiAction);\n\t\tsendMidiMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M,\n\t\t\t\tActionEvent.ALT_MASK));\n\t}", "public void \n updateMenus()\n {\n UIMaster master = UIMaster.getInstance();\n UICache cache = master.getUICache(pChannel);\n try {\n String tname = cache.getCachedDefaultToolsetName();\n master.updateEditorPluginField(pChannel, tname, pField);\n }\n catch(PipelineException ex) {\n master.showErrorDialog(ex);\n }\n }", "private void popupMenuAbout() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAboutDialog aboutDialog = new AboutDialog(parent.getShell(), SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\n\t\taboutDialog.open();\n\t}", "public abstract void initUiAndListener();", "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}", "private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}", "interface MenuHelper {\n void dismiss();\n\n void setPresenterCallback(MenuPresenter.Callback callback);\n}" ]
[ "0.68618816", "0.66485184", "0.64565015", "0.6418888", "0.64046675", "0.63366145", "0.63282025", "0.63274413", "0.6325838", "0.62965", "0.6290263", "0.6267795", "0.621258", "0.62022734", "0.6192968", "0.61880404", "0.6160873", "0.61574477", "0.61559325", "0.61555624", "0.6148407", "0.6145004", "0.6133958", "0.6128171", "0.6108195", "0.61040616", "0.609952", "0.60987216", "0.6090091", "0.60864466", "0.6074769", "0.6044574", "0.60416526", "0.6040872", "0.60356045", "0.60196096", "0.6010367", "0.6003662", "0.5997277", "0.59911525", "0.5989285", "0.59806746", "0.5972653", "0.59687763", "0.5964984", "0.5964785", "0.5939343", "0.59369826", "0.5930869", "0.5923072", "0.5917301", "0.5909478", "0.5909059", "0.5907347", "0.5903766", "0.5884006", "0.588279", "0.5882586", "0.58795416", "0.58686393", "0.5865272", "0.5858625", "0.5856371", "0.58556676", "0.5854179", "0.58440244", "0.5843457", "0.58392394", "0.58388823", "0.5831874", "0.5827782", "0.5826515", "0.58242184", "0.582397", "0.582021", "0.58143264", "0.58106536", "0.581017", "0.58092636", "0.58082134", "0.58065647", "0.580634", "0.5800633", "0.5795631", "0.5790704", "0.5790474", "0.57904196", "0.57893133", "0.57882446", "0.577994", "0.5778256", "0.57757163", "0.5773862", "0.57736903", "0.5768495", "0.57682234", "0.57679904", "0.57647896", "0.576337", "0.5762164", "0.5760296" ]
0.0
-1
total amount of played games Refills player's chips to a certain number
public void refill(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getFaintedPokemonCount();", "@Override\n public int howManyCoins() {\n return 7;\n }", "int getNewlyAvailableQuestsCount();", "int getReservePokemonCount();", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "public int adjustForCrowding() {\n int deadGuppyCount = 0;\n\n Collections.sort(this.guppiesInPool, new Comparator<Guppy>() {\n @Override\n public int compare(Guppy g1, Guppy g2) {\n return Double.compare(g1.getHealthCoefficient(), g2.getHealthCoefficient());\n }\n });\n\n Guppy weakestGuppy;\n Iterator<Guppy> it = guppiesInPool.iterator();\n double volumeNeeded = this.getGuppyVolumeRequirementInLitres();\n\n while (it.hasNext() && volumeNeeded > this.getVolumeLitres()) {\n weakestGuppy = it.next();\n volumeNeeded -= (weakestGuppy.getVolumeNeeded() / ML_TO_L_CONVERSION);\n\n weakestGuppy.setIsAlive(false);\n\n\n deadGuppyCount++;\n\n }\n return deadGuppyCount;\n }", "private int getNumberOfFreeChairs() {\n return this.numberOfChairs - waitingStudents.size();\n }", "public int getTotalRegularCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getCardsByWins());\n }", "int getQuestCount();", "int getCount(Side player) {\n return player == BLACK ? _countBlack : _countWhite;\n }", "public int checkNoOfRapelPlayerHolds () { return noOfRapels; }", "int getNumCards();", "public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }", "int getMarbles(int remainingMarbles) ;", "@Test\n public void getNumDraw() {\n this.reset();\n assertEquals(-1, this.bps.getNumDraw());\n // max # of visible cards in the draw pile\n this.reset();\n this.bps.startGame(this.fullDeck, false, 7, 1);\n assertEquals(1, this.bps.getNumDraw());\n }", "int getCardsRemaining(int player) {\n return players[player].getHand().size();\n }", "public void incGamesPlayed() {\n gamesPlayed++;\n }", "public void increaseCount()\n {\n minesLeft++;\n repaint();\n if (minesLeft == 0 && minesFound == numMines)\n {\n endGame(true); //This could only trigger if the player had flagged too many squares,\n }\t\t\t\t\t\t//then went back and removed the erroneous ones.\n }", "int fillCount();", "public void itemsSold() {\n quanitySnacks--;\n }", "@java.lang.Override\n public int getFaintedPokemonCount() {\n return faintedPokemon_.size();\n }", "public void incrementNumAttacked( ){\n this.numAttacked++;\n }", "public int getNumDevCards() {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < cards.length; i++)\n \t\t\tcount += cards[i];\n \n \t\treturn count + newCards.size();\n \t}", "public int getFaintedPokemonCount() {\n if (faintedPokemonBuilder_ == null) {\n return faintedPokemon_.size();\n } else {\n return faintedPokemonBuilder_.getCount();\n }\n }", "public void reduceCount()\n {\n minesLeft--;\n repaint();\n if (minesLeft == 0 && minesFound == numMines)\n {\n endGame(true);\n }\n }", "public int getPlayerCount() {\n return 0;\n }", "public abstract int numOfFoodCellToReproduce();", "int getPickupsCount();", "@Override\r\n\tpublic void sendShakeGame(Player player)// csf\r\n\t{\r\n\t\tbyte sameCount = 0;\r\n\t\tbyte[] diceNumbers = DicePointFactory.getDiceNumber(5);\r\n\r\n\t\tdicePoints.put(player.getPlayerID(), diceNumbers);\r\n\t\tplayer.setDiceNumbers(diceNumbers);\r\n\t\tplayer.setSameCount(sameCount);\r\n\t\tplayer.setDiceNumber(0);\r\n\t\tplayer.setDicePoint(0);\r\n\t\tplayer.setIsCallOne(false);// csf\r\n\r\n\t\tPacket packet = new Packet(UserCmdOutType.GAME_START_BOUT);\r\n\t\tpacket.putByte(diceNumbers);\r\n\t\tpacket.putByte(sameCount);\r\n\t\tsendToPlayer(packet, player);\r\n\r\n\t\tif (gameState != GameState.Prepared)\r\n\t\t\tgameState = GameState.Prepared;\r\n\r\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\tint point = diceNumbers[i - 1];\r\n\t\t\tif (dicePointsCount.containsKey(point))\r\n\t\t\t\tdicePointsCount.put(point, dicePointsCount.get(point) + 1);\r\n\t\t\telse\r\n\t\t\t\tdicePointsCount.put(point, 1);\r\n\t\t}\r\n\t}", "@Test\n public void getDeckTest2() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n for (int i = 2; i < 15; i++) {\n int counter = 0;\n for (Card c : deck) {\n if (c.getValue() == i) {\n counter++;\n }\n }\n assertEquals(counter, 4);\n }\n }", "@Test\n public void getNumRows() {\n this.reset();\n assertEquals(-1, this.bps.getNumRows());\n // # of rows originally in pyramid\n this.reset();\n this.bps.startGame(this.fullDeck, false, 3, 1);\n assertEquals(3, this.bps.getNumRows());\n // # of rows after game has been played\n this.bps.removeUsingDraw(0, 2, 2);\n this.bps.removeUsingDraw(0, 2, 1);\n this.bps.removeUsingDraw(0, 2, 0);\n assertEquals(2, this.bps.getNumRows());\n assertNotEquals(3, this.bps.getNumRows());\n\n\n }", "public List<Integer> askPlayerCardsToUse();", "public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }", "@Override\n public int howManyActivated(){\n return (gameboardPanel.howManyActivated() + leaderCardsPanel.howManyActivated());\n }", "public int getShipPartsNeededCount() {\n return (maxDays * 2) / 3;\n }", "public int totalGames() {\n return wins + losses + draws;\n }", "public int countHandShakes(){\n\t\tif (this.getNCouples() < 1) {\n\t\t\treturn 0;\n\t\t}else if (this.getNCouples() == 1) {\n\t\t\treturn 1;\n\t\t}else{\n\t\t\tthis.setNCouples(this.getNCouples() - 1);\n\t\t\treturn (this.getNCouples() + 1) * 3 - 2 + countHandShakes();\n\t\t}\n\t}", "public int countPlayers(){\n return players.size();\n }", "public int run() {\n\t\t// start game\n\t\t// dealers shuffle cards\n\t\tview.displayIntro();\n\t\tview.printLine();\n\t\t\n\t\tdealer.shuffleCards();\n\t\tview.printLine();\n\t\t\n\t\tint numOfCards = 0;\n\t\tint numOfRounds = 1;\n\t\t\n\t\twhile(numOfRounds < 5){\n\t\t\t// Dealer dealing cards to players\n\t\t\tview.displayRound(numOfRounds);\n\t\t\tview.printLine();\n\t\t\tnumOfRounds++;\n\t\t\t// First round --> face down for each player\n\t\t\tif(numOfCards == 0){\n\t\t\t\tfor (GamePlayerInterface player : players) {\n\t\t\t\t\t// take out card from dealer and give it to player\n\t\t\t\t\tCard card = dealer.dealCard();\n\t\t\t\t\tplayer.addCard(card);\n\t\t\t\t\tnumOfCards++;\n\t\t\t\t\t// NEED to add total and both players for current record\n\t\t\t\t\tview.updateTable(players,player);\n\t\t\t\t\tview.printLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint currentPDvalue[] = new int[2];\n\t\t\tString currentPDname[] = new String[2];\n\t\t\tString currentPDsuit[] = new String[2];\n\t\t\tint x = 0;\n\t\t\t// Second card onwards\n\t\t\t\tfor (GamePlayerInterface player : players) {\n\t\t\t\t\t// take out card from dealer and give it to player\n\t\t\t\t\tCard card = dealer.dealCard();\n\t\t\t\t\tplayer.addCard(card);\n\t\t\t\t\t\n\t\t\t\t\tcurrentPDvalue[x] = card.getValue();\n\t\t\t\t\tcurrentPDname[x] = card.getName();\n\t\t\t\t\tcurrentPDsuit[x] = card.getSuit();\n\t\t\t\t\tx++;\n\t\t\t\t\t\n\t\t\t\t\tnumOfCards++;\n\t\t\t\t\t\n\t\t\t\t\tview.updateTable(players,player);\n\t\t\t\t\tview.printLine();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Check which card is higher\n\t\t\t\t\n\t\t\t\tint PDbig = 0;\n\t\t\t\tPDbig = compareBigger(currentPDvalue[0], currentPDvalue[1], currentPDsuit[0], \n\t\t\t\t\t\t\t\t\t\tcurrentPDsuit[1], currentPDname[0],currentPDname[1]);\n\t\t\t\t\n\t\t\t\t// Do any betting by either Player or Dealer\n\t\t\t\tboolean ifContinue = true;\n\t\t\t\tifContinue = displayBet(PDbig, players);\n\t\t\t\tif(!ifContinue){\n\t\t\t\t\tresult = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tview.printLine();\n\t\t}\n\t\t\n\t\t//show all player's cards (include hidden cards\n\t\tview.updateTableShowAllCards(players);\n\t\t//assume human player is always the first in the arraylist\n\t\tGamePlayerInterface player = players.get(0);\n\t\t\n\t\t//determine if human player has win\n\t\tview.printLine();\n\t\tview.print(\"Determine winning\");\n\t\t\n\t\tresult = determineWinning(player, dealer);\n\t\tint totalChips = players.get(0).getChips();\n\t\t\n\t\tswitch(result){\n\t\tcase 0: totalChips = (players.get(0).getChips()) + (betOnTable/2);\n\t\t\t\tplayers.get(0).setChips(totalChips);\n\t\t\t\treturn totalChips;\n\t\tcase 1: break;\n\t\tcase 2:\ttotalChips = (players.get(0).getChips()) + betOnTable;\n\t\t\t\tplayers.get(0).setChips(totalChips);\n\t\t\t\treturn totalChips;\n\t\tdefault: view.print(\"Only 3 possibilities. Contact admin for assistance!\");\n\t\t}\n\t\tview.printChips(totalChips);\n\t\tview.print(\"End of Game\");\n\t\t//end of one game\n\t\t\n\t\t// Remove cards from previous arrays and re-add to original deck\n\t\tfor(GamePlayerInterface p : players){\n\t\t\trecreateDeck(p);\n\t\t}\n\t\t\n\t\t// initially, return result\n\t\treturn totalChips;\n\t}", "private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}", "private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }", "public int getTotalGoldenCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getGoldCardsByWins());\n }", "private int getNumberOfBoxesOfAllShips() {\r\n int count = 30;\r\n return count;\r\n }", "public static int minimumNumberOfGames() {\n\t\treturn 0;\n\t}", "Pinochle(){\n createDeck();\n createDeck();\n this.originalSizeOfDeck = this.deckOfCards.size();\n }", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "private void communityChest(Player currentPlayer){\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n int nextPlayer;\n if(m_currentTurn >= m_numPlayers){\n nextPlayer = 0;\n } else {\n nextPlayer = m_currentTurn+1;\n }\n\n if(randomNum == 1){\n convertTextToSpeech(\"Your new business takes off, collect 200\");\n if(m_manageFunds) {\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(200);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Your friend hires your villa for a week, \" +\n \"collect 100 off the next player\");\n if(m_manageFunds) {\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(100);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n players.get(nextPlayer).subtractMoney(100);\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n }\n }\n if(randomNum == 3){\n convertTextToSpeech(\"You receive a tax rebate, collect 300\");\n if(m_manageFunds) {\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n }", "public int remaining() {\r\n\t\treturn cards.size();\r\n\t}", "public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}", "@Test\r\n\tpublic void TestDeckSuitCount() {\n\t\ttry {\r\n\t\t\tDeck AKDeck = new Deck();\r\n\t\t\tfor (int i = 13; i >= 0; i--) {\r\n\t\t\t\tassertEquals(i, AKDeck.Count(eSuit.HEARTS));\r\n\t\t\t\tAKDeck.Draw(eSuit.HEARTS);\r\n\t\t\t}\r\n\t\t} catch (DeckException ex) {\r\n\t\t\tSystem.out.println(\"The deck is empty. No more cards can be drawn.\");\r\n\t\t}\r\n\t}", "public int rollDice(){\r\n\t\tString playerResponse;\r\n\t\tplayerResponse=JOptionPane.showInputDialog(name+\". \"+\"Type anything to roll\");\r\n\t\t//System.out.println(name+\"'s response: \"+playerResponse);\r\n\t\tdice1=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdice2=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdicetotal=dice1+dice2;\r\n\t\tnumTurns++;\r\n\t\treturn dicetotal;\r\n\t}", "public int addWinningGame() {\n\t\tgamesWon++;\n\t\treturn gamesWon;\n\t}", "public void incPieceCount () {\n m_PieceCount++;\n\t}", "final void letMerchantGo(final Player player) {\n for (Map.Entry<Integer, Integer> it : player.getBag().entrySet()) {\n int cardId = (Integer) ((Map.Entry) it).getKey();\n int freq = (Integer) ((Map.Entry) it).getValue();\n\n if (player.getShop().containsKey(cardId)) {\n player.getShop().put(cardId, player.getShop().get(cardId) + freq);\n } else {\n player.getShop().put(cardId, freq);\n }\n }\n }", "public ReadOnlyIntegerProperty numberofTickets(PlayerId playerId) {\n return numberOfTicketsMap.get(playerId);\n }", "int getRepeatCount();", "public int getCoinsNum();", "private static void calculateTotalHitsRequired()\n {\n totalHitsRequired = 0;\n \n // add all the ship lengths together to get\n // the total number of hits required\n for (int length : SHIP_LENGTHS)\n {\n totalHitsRequired += length;\n }\n }", "public static void hitCorrect()\n\t{\n\t\tplayersCards.add(deck.deal());\n\t\tcurrentValue();\n\t\tuserCardImg[playersCards.size()-1].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(playersCards.get(playersCards.size()-1)))));\n\t\tresume();\n\t\tif(calculateHand(playersCards)>21 || playersCards.size()==4 || calculateHand(playersCards)==0)\n\t\t{\n\t\t\troundEnd();\n\t\t}\n\t\t\n\t}", "int getKills(UUID player);", "public int leaderDeckSize(){\n return deckLeaderCard.size();\n }", "public int getAddItems(int totalCollected, int totalItemInGame);", "int getAcksCount();", "int getAcksCount();", "private void onePlayerLeft() throws InterruptedException { \n for(Map.Entry<Integer, PlayerData> player : dat.getPlayerAndIndex().entrySet()) {\n if(player.getValue().isInHand()) {\n sendCommandToAll(\"game:winner:\"+player.getKey()+\":\"+dat.getPot());\n player.getValue().chipCount += dat.getPot();\n break;\n }\n } \n \n Thread.sleep(2000);\n sendCommandToAll(\"game:end\");\n }", "private void updateExpectedTotalOffices() {\n mExpectedTotalOffices++;\n }", "private static int experienceTally(int playerExperience, int monsterExperience){\r\n int totalExperience;\r\n totalExperience = playerExperience + monsterExperience;\r\n return totalExperience;\r\n }", "public boolean gameIsOver() {return revealedShips >= 4;}", "public int calculateRounds(int numberOfPlayers) {\n //logarithm to find how many 2s to multiply to get numberOfPlayers 32 players (2 x 2 x 2 x 2 x 2 = 32) = 5 Rounds\n return (int) (Math.log(numberOfPlayers) / Math.log(2));\n }", "public void fishingByHour(){\n int totaltHoursFishing = 0;\n int hoursAllowedFishing =4;\n\n for (int i =0; i<25; i++){\n totaltHoursFishing = ++totaltHoursFishing;\n if (totaltHoursFishing>hoursAllowedFishing){\n break;\n }\n\n System.out.println(\"Total of hours allowed \"+ totaltHoursFishing);\n }\n\n }", "private Integer[] getNumberOfCards() {\n Integer[] numberOfCards = new Integer[players.length];\n\n for (int i = 0; i < players.length; i++) {\n numberOfCards[i] = players[i].getHand().length;\n }\n\n return numberOfCards;\n }", "public void win(int player)\r\n\t{\r\n\t\taccountValue[player]+=pool;\r\n\t\tendRund();\r\n\t}", "private int numberOfIllegals(final HashMap<String, Integer> association) {\n int count = 0;\n for (int i = 0; i < getInventory().getNumberOfCards(); ++i) {\n if (getInventory().getAssets()[i] >= association.get(\"Silk\")) {\n count++;\n }\n }\n return count;\n }", "public void count() {\n\t\talgae = -1;\n\t\tcrab = -1;\n\t\tbigFish = -1;\n\t\tfor(GameObjects o: objects) {\n\t\t\tswitch(o.toString()) {\n\t\t\tcase \"algae\":\n\t\t\t\talgae +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"crab\":\n\t\t\t\tcrab +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"big fish\":\n\t\t\t\tbigFish +=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }", "public int countAvailablePowers (Power p) {\n return countPowers(p, 1);\n }", "private Map<Card, Integer> tally() {\n Map<Card, Integer> result = new HashMap<Card, Integer>();\n for (Card card: this.cards) {\n Integer value = result.get(card);\n if (value == null) {\n result.put(card, 1);\n } else {\n result.put(card, value + 1);\n }\n }\n return result;\n }", "void raiseNumberOfStonesOnBoard();", "public void repair(){\n if(health < 9) {\n this.health++;\n }\n }", "public void checkEndGame() {\n\t\t\n\t\tboolean gameFinished = false;\n\t\t//boolean playerOne = false;\n\t\t//boolean playerTwo = false;\n\t\t\n\t\t\n\t\tif (bucket[13].getnumOfRocks() == 0 && bucket[12].getnumOfRocks() == 0 && bucket[11].getnumOfRocks() == 0\n\t\t\t\t&& bucket[10].getnumOfRocks() == 0 && bucket[9].getnumOfRocks() == 0\n\t\t\t\t&& bucket[8].getnumOfRocks() == 0) {\n\n\t\t\tint left = bucket[6].getnumOfRocks() + bucket[5].getnumOfRocks() + bucket[4].getnumOfRocks()\n\t\t\t\t\t+ bucket[3].getnumOfRocks() + bucket[2].getnumOfRocks() + bucket[1].getnumOfRocks()\n\t\t\t\t\t+ bucket[0].getnumOfRocks();\n\n\t\t\tbucket[0].setnumOfRocks(left, c);\n\t\t\tbucket[6].setnumOfRocks(0, c);\n\t\t\tbucket[5].setnumOfRocks(0, c);\n\t\t\tbucket[4].setnumOfRocks(0, c);\n\t\t\tbucket[3].setnumOfRocks(0, c);\n\t\t\tbucket[2].setnumOfRocks(0, c);\n\t\t\tbucket[1].setnumOfRocks(0, c);\n\t\t\t\n\t\t\tgameFinished = true;\n\t\t}\n\n\t\tif (bucket[1].getnumOfRocks() == 0 && bucket[2].getnumOfRocks() == 0 && bucket[3].getnumOfRocks() == 0\n\t\t\t\t&& bucket[4].getnumOfRocks() == 0 && bucket[5].getnumOfRocks() == 0 && bucket[6].getnumOfRocks() == 0) {\n\n\t\t\tint right = bucket[13].getnumOfRocks() + bucket[12].getnumOfRocks() + bucket[11].getnumOfRocks();\n\t\t\tright = right + bucket[10].getnumOfRocks() + bucket[9].getnumOfRocks() + bucket[8].getnumOfRocks()\n\t\t\t\t\t+ bucket[7].getnumOfRocks();\n\n\t\t\tbucket[7].setnumOfRocks(right, c);\n\t\t\tbucket[13].setnumOfRocks(0, c);\n\t\t\tbucket[12].setnumOfRocks(0, c);\n\t\t\tbucket[11].setnumOfRocks(0, c);\n\t\t\tbucket[10].setnumOfRocks(0, c);\n\t\t\tbucket[9].setnumOfRocks(0, c);\n\t\t\tbucket[8].setnumOfRocks(0, c);\n\n\t\t\tgameFinished = true;\n\t\t}\n\t\t\n\t\t\n\t\tif(gameFinished==true){\n\t\t\tif(bucket[7].getnumOfRocks()<bucket[0].getnumOfRocks()){\n\t\t\t\tplayerOne=true;\n\t\t\t}else{\n\t\t\t\tplayerTwo=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*if(playerOne==true){\n\t\t\tSystem.out.println(\"Player A won\");\n\t\t}\n\t\tif(playerTwo == true){\n\t\t\tSystem.out.println(\"Player B won\");\n\t\t}\n\t\t */\n\t\t\n\t}", "public int remaining(String team) {\n\n return 0;\n }", "public int getGoalTally(Player player){\r\n return player.getGoal();\r\n }", "int getTries();", "public void incrementNumberOfDefeats(TypeOfGames type) {\n statistics.get(type).incrementNumberOfDefeats();\n }", "public float numRemainingPlays(List<Player> players) {\n\t\tfloat f = 0;\n\t\tfor (Player p: players) {\n\t\t\tf += (float)p.getHandCount();\n\t\t}\n\t\tf += (float)getDeckSize();\n\t\t\n\t\treturn f;\n\t}", "@Override\r\n public Integer getDesiredDiceCountFromPlayer(String player, String country, String action) {\r\n return null;\r\n }", "public int getNumCards()\r\n {\r\n return numCards;\r\n }", "public int updateBoard() {\n clearTemporaryData();\n setUsedValuesbyRow();\n setUsedValuesByColumns();\n setUsedValueInBoxes();\n findUniqueInBoxes();\n updateValues();\n\n return numbers.stream()\n .filter(n -> n.getValue() == 0)\n .collect(Collectors.toList()).size();\n }", "public void calcTroops() {\r\n\t\t//Based on how many troops the player owns this will add to their spendage with a minimum of 2\r\n\t\ttroopSpendage = (players.get(turnCounter).getCountries().size()) / 3;\r\n\t\tif (troopSpendage < 3) {\r\n\t\t\ttroopSpendage = 3;\r\n\t\t}\r\n\t\t//If a player owns an entire continent, they will get a continent bonus to their spendage\r\n\t\t//these counters record how much of a continent the player owns\r\n\t\tint Kjersia = 0;\r\n\t\tint Estoveria = 0;\r\n\t\tint Moa = 0;\r\n\t\tint Shilov = 0;\r\n\t\tint Tormudd = 0;\r\n\t\tint Eschilles = 0;\r\n\t\t\r\n\t\t//increment the corresponding continent counter based on the continent value stored in the country objects the player owns\r\n\t\tfor (Country c:players.get(turnCounter).getCountries()) {\r\n\t\t\tswitch (c.getContinent()) {\r\n\t\t\tcase \"Kjersia\": Kjersia++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Estoveria\": Estoveria++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Moa\": Moa++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Shilov\": Shilov ++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Tormudd\": Tormudd++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Eschilles\": Eschilles++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//If the player owns all countries in a continent (each continent has different numbers of countries), give them a corresponding troop bonus as decided by the rules of the game\r\n\t\tif (Kjersia == 4) {\r\n\t\t\ttroopSpendage += 2;\r\n\t\t}\r\n\t\tif (Estoveria == 8) {\r\n\t\t\ttroopSpendage += 5;\r\n\t\t}\r\n\t\tif (Moa == 9) {\r\n\t\t\ttroopSpendage += 6;\r\n\t\t}\r\n\t\tif (Shilov == 4) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Tormudd == 5) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Eschilles == 12) {\r\n\t\t\ttroopSpendage += 7;\r\n\t\t}\r\n\r\n\t\t//If a player owns the card and owns the coresponding country on that card they get one extra troop\r\n\t\tfor(Card C: players.get(turnCounter).getCards()) \r\n\t\t\tfor(Country co: players.get(turnCounter).getCountries())\r\n\t\t\t\tif (C.getCountry().equals(co.getName()))\r\n\t\t\t\t\ttroopSpendage++;\t\t\r\n\t\t\r\n\t\t//Updates the display of how many troops the player has to deploy\r\n\t\ttroopsToDeploy.setText(\"Troops to Deploy: \" + troopSpendage);\r\n\t}", "public void assignPlayerPieces(Map<Player, Integer> playerHash) {\n List<Integer> nums = new ArrayList<>(playerHash.values());// get all the numbers from playerHash\n List<Player> players = new ArrayList<>(playerHash.keySet()); // get all the players from the hash map\n Collections.sort(nums); // sort the list of numbers\n Collections.reverse(nums);// reverse the list so the highest numbers are first\n int pieceIndex = 0; // variable used to represent the index for the playerPiece\n List<Integer> usedNums = new ArrayList<Integer>();// Empty list that will be used to know what numbers have been used.\n for (Integer num : nums) { // go through each number in numbers\n if (!usedNums.contains(num)) {// if the usedNums list doesn't contain num\n for (Player player : players) { // for each player\n if (playerHash.get(player).equals(num)) {// if the num is the number they got from their dice roll\n player.setPiece(this.playerPieces.get(pieceIndex)); // give them the playerPiece at index pieceIndex\n pieceIndex++;// increment pieceIndex\n usedNums.add(num);//add the used number into usedNums list\n }\n }\n }\n }\n }", "private void updatePlayersWorth(){\n for (Player e : playerList) {\n e.setPlayerWorth(getTotalShareValue(e) + e.getFunds());\n }\n }", "public static int ratePieceAvailability(){\n\t\tint rating=0, bishopCount=0;\n for (int i=0;i<64;i++) {\n switch (AlphaBeta.chessBoard[i/8][i%8]) {\n case \"P\": rating+=100;\n break;\n case \"R\": rating+=500;\n break;\n case \"K\": rating+=300;\n break;\n case \"B\": bishopCount++;\n break;\n case \"Q\": rating+=900;\n break;\n }\n }\n if (bishopCount>=2) {\n \trating+=300*bishopCount;\n } else {\n if (bishopCount==1) {rating+=250;}\n }\n return rating;\n\t}", "public int getNbPawns(Player player) {\n Pawn aPawn;\n int Size, nbPawn;\n Size = getSize();\n nbPawn = 0;\n\n for (int numLine = 0; numLine < Size; numLine++) {\n for (int numCol = 0; numCol < Size; numCol++) {\n\n aPawn = field[numLine][numCol];\n if (aPawn != null) {\n if (aPawn.getPlayer() == player) nbPawn++; //if the pawn belong to player\n }\n\n }\n }\n\n return nbPawn;\n }", "public void countCoins() {\r\n\t\tthis.coinCount = 0;\r\n\t\tfor (int x = 0; x < WIDTH; x++) {\r\n\t\t\tfor (int y = 0; y < HEIGHT; y++) {\r\n\t\t\t\tif (this.accessType(x, y) == 'C')\r\n\t\t\t\t\tthis.coinCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int getAchievementsCount();", "public int incrementPower(int count);", "private void SevenResourceCheck() {\n\t\tint randomResourceNumber = 0;\n\t\tint resourceCounter = 0;\n\t\tfor (int i = 0; i < robberPlayers.size(); i++) // for loop runs once for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// every player\n\t\t{\n\t\t\tif (robberPlayers.get(i).countResources() >= 7) // If the current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// than 7 resource\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// cards...\n\t\t\t\tresourceCounter = robberPlayers.get(i).countResources() / 2;\n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\n\" + robberPlayers.get(i).getNickname() + \" lost:\");\n\t\t\t\tfor (int j = 0; j < resourceCounter; j++) {\n\t\t\t\t\trandomResourceNumber = RandomResourceValue(i);\n\t\t\t\t\trobberPlayers.get(i).resources[randomResourceNumber]--;\n\t\t\t\t\tresourceBank.bankReturnResource(randomResourceNumber, 1);\n\t\t\t\t\tSystem.out.print(\" one \" + resourceBank.getResourceName(randomResourceNumber));\n\t\t\t\t} // end of inner for loop\n\t\t\t} // end of inner if statment\n\t\t} // end of for loop\n\t\tSystem.out.println(Arrays.toString(resourceBank.resources));\n\t\t//checkHex(this.getCurrentHex());\n\t}", "private int countWinnerScore(LinkedList<Integer> cards){\n int size = cards.size();\n return IntStream.range(0, size)\n .map(i -> cards.get(i) * (size - i))\n .sum();\n }", "private int countWinnerScore(LinkedList<Integer> cards){\n int size = cards.size();\n return IntStream.range(0, size)\n .map(i -> cards.get(i) * (size - i))\n .sum();\n }", "public void CountWhiteDisks(){\n int counter =0;\n for (int i=0; i<8; i++){\n for (int j=0; j<8; j++){\n if (gameboard[i][j]==W){\n counter++;\n }\n }\n }\n whitedisks = counter;\n }", "public int numOfCards() {\n return cards.size();\n }" ]
[ "0.6777223", "0.65440214", "0.6531965", "0.64201325", "0.6319059", "0.63104725", "0.6253798", "0.6225703", "0.6171616", "0.61666626", "0.6155691", "0.6107077", "0.60821944", "0.60762376", "0.6064685", "0.6037863", "0.60215324", "0.6001056", "0.5983848", "0.5966904", "0.5966733", "0.5935506", "0.5915012", "0.58996266", "0.5896531", "0.5887166", "0.58825284", "0.5880595", "0.58802366", "0.5870607", "0.5857693", "0.5855766", "0.5839953", "0.5832784", "0.58226895", "0.5819726", "0.58196574", "0.58090955", "0.58083516", "0.5796878", "0.57959056", "0.5793277", "0.5786894", "0.577068", "0.5763434", "0.5762189", "0.5745047", "0.5739415", "0.5721643", "0.571752", "0.5717119", "0.5716429", "0.571503", "0.5705603", "0.5700566", "0.56994647", "0.5686952", "0.5681297", "0.56780964", "0.5677336", "0.56732017", "0.5672877", "0.56702256", "0.56702256", "0.5666646", "0.5660944", "0.5655305", "0.5651953", "0.56508315", "0.56507117", "0.56506276", "0.5638371", "0.563463", "0.5631921", "0.56314385", "0.56305116", "0.5624373", "0.56240743", "0.561778", "0.5617489", "0.5614311", "0.5613465", "0.56097037", "0.56093097", "0.5608921", "0.5607318", "0.56072426", "0.5605515", "0.5603753", "0.5599589", "0.55993724", "0.5598424", "0.5594756", "0.55889976", "0.55882424", "0.55863", "0.558459", "0.55837846", "0.55837846", "0.5583608", "0.55824697" ]
0.0
-1
create training data for this fold
public void createTrainingData(String dirName, String processName, int fold, ArrayList<FoldInstance> instances) throws FileNotFoundException { PrintWriter writer = new PrintWriter(dirName + "/" + processName + ".jointtrain.cv." + fold); for (int i = 0; i < instances.size(); i++) { FoldInstance inst = instances.get(i); if (inst.getName().equalsIgnoreCase(processName)) { if (inst.getFold() == fold) { writer.println(inst.getSentences()); writer.flush(); } } else { writer.println(inst.getSentences()); writer.flush(); } } writer.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void trainData() throws IOException {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttestingFold = i;\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Training Tree-Augmented Naive Bayes for writing Fold\");\n\t\t\t}\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Calculating Class Priors across Data set.\\n\");\n\t\t\t}\n\t\t\tbuildPriors();\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Priors built.\\n Discretizing data into Naive Bin Estimator...\\n\" +\n\t\t\t\t\t\t\"Generating Completed Graph...\\nWeighting Edges...\\n\");\n\t\t\t}\n\t\t\tdiscretizeData();\n\t\t\ttest();\n\t\t}\n\n\t}", "void pretrain(DataSetIterator iterator);", "private void setTrainingData() throws IOException {\r\n\t\ttrainIdBodyMap = readInIdBodiesMap(new File(TRAIN_BODIES_CSV_LOCATION));\r\n\t\ttrainStances = readStances(new File(TRAIN_STANCES_CSV_LOCATION));\r\n\r\n\t}", "public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }", "void setTrainData(DataModel trainData);", "public void fit(ArrayList trainData) {\n this.trainingData = trainData;\n }", "public void build() throws ClusException, IOException {\n m_List = getRun().getDataSet(ClusRun.TRAINSET).getData(); // m_Data;\n }", "public abstract void fit(BinaryData trainingData);", "private static List<List<CSVAttribute[]>> getTrainData(List<CSVAttribute[]> dataset, int numFolds, int labelAttribute){\n\n float partitionRatio = (numFolds - 1) / (float) numFolds;\n int nTrainExamples = (int) (dataset.size() * partitionRatio);\n\n // Shuffle the dataset\n Random random = new Random();\n Collections.shuffle(dataset, random);\n\n List<CSVAttribute[]> trainData = new ArrayList<>();\n List<CSVAttribute[]> ulTestData = new ArrayList<>();\n List<CSVAttribute[]> lTestData = new ArrayList<>();\n\n // add to train data set\n for (int i = 0; i <= nTrainExamples; i++) {\n trainData.add(dataset.get(i));\n }\n\n // add to test data set\n for (int j = nTrainExamples + 1; j < dataset.size(); j++) {\n\n // defensive copy\n CSVAttribute[] row = dataset.get(j);\n CSVAttribute[] newRow = new CSVAttribute[row.length];\n for (int k = 0; k < newRow.length; k++) {\n newRow[k] = (CSVAttribute) row[k].clone();\n }\n\n // remove labels\n newRow[labelAttribute].setValue(\"null\");\n\n lTestData.add(row);\n ulTestData.add(newRow);\n }\n\n List<List<CSVAttribute[]>> combined = new ArrayList<>();\n combined.add(trainData);\n combined.add(ulTestData);\n combined.add(lTestData);\n\n return combined;\n }", "public void TrainDataset(){\n\t\ttry{\n\t\t\t//Testing delegate method\n\t\t\tMessageController.logToConsole(\"Hey, I'm from train button\");\n\t\t\t\n\t\t\t//Pass in the real training dataset\n\t\t\tfindSuitableK(new String[]{\"Hello\", \"World\"});\n\t\t\t\n\t\t\t//Pass in the 'k' and 'query string'\n\t\t\tfindKNN(2, \"anything\");\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t}", "public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void train() {\n\t\tfor (int i = 0; i < numberOfIterations; i++) {\n\t\t\t// for each training record\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\t// calculate inputs and outputs\n\t\t\t\tforwardCalculation(records.get(j).input);\n\t\t\t\t// compute errors, update weights and thetas\n\t\t\t\tbackwardCalculation(records.get(j).output);\n\t\t\t}\n//\t\t\tpostprocessOutputs();\n\t\t}\n\t}", "void storeTraining(Training training);", "private void loadDataTraining(String location) throws IOException {\r\n\r\n File parentDir = new ClassPathResource(location).getFile();\r\n \ttrainWriter.write(\"Data folder found.\");\r\n\r\n // Divide all data to training and testing datasets\r\n FileSplit filesInDir = new FileSplit(parentDir, allowedExtensions, randNumGen);\r\n \r\n // Create ParentPathLabelGenerator, that will parse the parent dir and use the name of the subdirectories as label/class names\r\n ParentPathLabelGenerator labelMaker = new ParentPathLabelGenerator();\r\n BalancedPathFilter pathFilter = new BalancedPathFilter(randNumGen, allowedExtensions, labelMaker);\r\n trainWriter.write(\"Label generators created.\");\r\n \r\n // Split the image files into train and test. Specify the train test split as 80%,20%\r\n InputSplit[] filesInDirSplit = filesInDir.sample(pathFilter, 80, 20);\r\n InputSplit trainDataInputSplit = filesInDirSplit[0];\r\n InputSplit testDataInputSplit = filesInDirSplit[1];\r\n trainWriter.write(\"Data splited to train and test parts as 80% and 20%.\");\r\n \r\n /*\r\n * Specifying a new record reader (one for testing on dataset, one for testing on real data, one for training)\r\n * with the height and width you want the images to be resized to.\r\n * Note that the images in this example are all of different size\r\n * They will all be resized to the height and width specified below\r\n * */\r\n ImageRecordReader trainRecordReader = new ImageRecordReader(inputShape[1],inputShape[2],inputShape[0],labelMaker);\r\n trainRecordReader.initialize(trainDataInputSplit);\r\n\r\n ImageRecordReader testRecordReader = new ImageRecordReader(inputShape[1],inputShape[2],inputShape[0], labelMaker);\r\n testRecordReader.initialize(testDataInputSplit);\r\n trainWriter.write(\"Data iterators created successfully.\");\r\n \r\n // Get the number of labels, ImageRecordReader founded in dir and check it\r\n int outputNum = trainRecordReader.numLabels();\r\n\r\n // Init iterators with datasets\r\n trainIterator = new RecordReaderDataSetIterator(trainRecordReader, batchSizeTraining, labelIndex, outputNum);\r\n trainIterator.setCollectMetaData(true);\r\n testIterator = new RecordReaderDataSetIterator(testRecordReader, batchSizeTesting, labelIndex, outputNum);\r\n testIterator.setCollectMetaData(true);\r\n trainWriter.write(\"Data iterators setted to collect metadata.\");\r\n }", "public void addTrainingData(String value,String label);", "private void createTestData() {\n for (int i = startKey; i < startKey + numKeys; i++) {\n keys.add(i);\n }\n }", "private void initAndSaveGrid(GridGame game) {\n\t\tgame.modeler = createDumbInitModeler(trainingData );\n\t\tint i = 0;\n\t\tfor (TransitionMemory tm : trainingData) {\n\t\t\tif (i++ > 10) break; // just a few to learn the\n\t\t\tgame.modeler.saveMemory(tm);\n\t\t}\n\t\tgame.modeler.learnFromMemory(0, 0, 0, false, 1, 10000); // just to get node dimensions\n\t\tUtils.saveObjectToFile(GRID_FILE, SerializableGridGame.create(game));\n\t\tif (Utils.loadObjectFromFile(GRID_FILE) == null) System.out.println(\"Problem saving grid\");\n\t}", "void trainingBatch(GenerateRandom rnd);", "public void train(Corpus[] trainingData) {\n\t\tSet<String> vocabulary = super.mergeVocabulary(trainingData);\n\t\ttrainingData[0].setVocabulary(vocabulary);\n\t\ttrainingData[1].setVocabulary(vocabulary);\n\t\tposMatrix = new TransitionMatrix(trainingData[0]);\n\t\tnegMatrix = new TransitionMatrix(trainingData[1]);\n\t}", "@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }", "public static void main(String[] args) throws Exception {\n int numLinesToSkip = 0;\n String delimiter = \",\"; //这是csv文件中的分隔符\n RecordReader recordReader = new CSVRecordReader(numLinesToSkip,delimiter);\n recordReader.initialize(new FileSplit(new ClassPathResource(\"dataSet20170119.csv\").getFile()));\n\n //Second: the RecordReaderDataSetIterator handles conversion to DataSet objects, ready for use in neural network\n\n /**\n * 这是标签(类别)所在列的序号\n */\n int labelIndex = 0; //5 values in each row of the iris.txt CSV: 4 input features followed by an integer label (class) index. Labels are the 5th value (index 4) in each row\n //类别的总数\n int numClasses = 2; //3 classes (types of iris flowers) in the iris data set. Classes have integer values 0, 1 or 2\n\n //一次读取多少条数据。当数据量较大时可以分几次读取,每次读取后就训练。这就是随机梯度下降\n int batchSize = 2000; //Iris data set: 150 examples total. We are loading all of them into one DataSet (not recommended for large data sets)\n\n DataSetIterator iterator = new RecordReaderDataSetIterator(recordReader,batchSize,labelIndex,numClasses);\n //因为我在这里写的2000是总的数据量大小,一次读完,所以一次next就完了。如果分批的话要几次next\n DataSet allData = iterator.next();\n// allData.\n allData.shuffle();\n SplitTestAndTrain testAndTrain = allData.splitTestAndTrain(0.8); //Use 65% of data for training\n\n DataSet trainingData = testAndTrain.getTrain();\n DataSet testData = testAndTrain.getTest();\n //We need to normalize our data. We'll use NormalizeStandardize (which gives us mean 0, unit variance):\n //数据归一化的步骤,非常重要,不做可能会导致梯度中的几个无法收敛\n DataNormalization normalizer = new NormalizerStandardize();\n normalizer.fit(trainingData); //Collect the statistics (mean/stdev) from the training data. This does not modify the input data\n normalizer.transform(trainingData); //Apply normalization to the training data\n normalizer.transform(testData); //Apply normalization to the test data. This is using statistics calculated from the *training* set\n\n\n final int numInputs = 9202;\n int outputNum = 2;\n int iterations = 1000;\n long seed = 142;\n int numEpochs = 50; // number of epochs to perform\n\n log.info(\"Build model....\");\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(seed)\n .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)\n .iterations(iterations)\n .activation(Activation.SIGMOID)\n .weightInit(WeightInit.ZERO) //参数初始化的方法,全部置零\n .learningRate(1e-3) //经过测试,这里的学习率在1e-3比较合适\n .regularization(true).l2(5e-5) //正则化项,防止参数过多导致过拟合。2阶范数乘一个比率\n .list()\n\n .layer(0, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .activation(Activation.SIGMOID)\n .nIn(numInputs).nOut(outputNum).build())\n .backprop(true).pretrain(false)\n .build();\n\n //run the model\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\n model.init();\n model.setListeners(new ScoreIterationListener(100));\n\n\n log.info(\"Train model....\");\n for( int i=0; i<numEpochs; i++ ){\n log.info(\"Epoch \" + i);\n model.fit(trainingData);\n\n //每个epoch结束后立马观察模型估计的效果,方便及早停止\n Evaluation eval = new Evaluation(numClasses);\n INDArray output = model.output(testData.getFeatureMatrix());\n eval.eval(testData.getLabels(), output);\n log.info(eval.stats());\n }\n\n }", "public void readTrainingFile() {\n\t\ttry {\n\t\t\tFile file = new File(trainingFile);\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\t\tSystem.out.print(\"Read training data >>>\\t\");\n\t\t\t// read first line to get attribute names\n\t\t\tString line = reader.readLine();\n\t\t\t// find delimiter\n\t\t\tdelimiter = findDelimiter(line);\n\t\t\t// get all attributes\n\t\t\tallAttributes = line.split(delimiter);\n\t\t\t// target attribute is at the last position\n\t\t\tint targetIndex = allAttributes.length - 1;\n\t\t\t\n\t\t\ttrainingTuples = new ArrayList<String[]>();\n\t\t\tclassLabels = new HashSet<String>();\n\t\t\tmapAttrValue = new HashMap<String, Set<String>>();\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\tif(line.isEmpty() == true) {\n\t\t\t\t\t//if the line is empty\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\t\t\t\n\t\t\t\t// read one tuple\n\t\t\t\tString[] tuple = line.split(delimiter);\n\t\t\t\ttrainingTuples.add(tuple);\n\t\t\t\t// add attribute value to mapAttrValue\n\t\t\t\tfor(int i = 0; i < targetIndex; i++) {\n\t\t\t\t\tString attribute = allAttributes[i];\n\t\t\t\t\tString value = tuple[i];\n\t\t\t\t\tSet<String> valueSet = mapAttrValue.get(attribute);\n\t\t\t\t\tif(valueSet == null) {\n\t\t\t\t\t\tvalueSet = new HashSet<String>();\n\t\t\t\t\t\tmapAttrValue.put(attribute, valueSet);\n\t\t\t\t\t}\n\t\t\t\t\tvalueSet.add(value);\n\t\t\t\t}\n\t\t\t\t// get class label\n\t\t\t\tclassLabels.add(tuple[targetIndex]);\n\t\t\t}\t\t\t\n\t\t\treader.close();\n\t\t\tSystem.out.println(\"Complete!\");\t\n\t\t} catch(FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No such file!\");\n\t\t\te.printStackTrace();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\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}", "@Override\n\tpublic void train(Instance[] trainingData, int v) {\n\n\t\t// For all the words in the documents, count the number of occurrences. Save in\n\t\t// HashMap\n\t\t// e.g.\n\t\t// m_map[0].get(\"catch\") should return the number of \"catch\" es, in the\n\t\t// documents labeled sports\n\t\t// Hint: m_map[0].get(\"asdasd\") would return null, when the word has not\n\t\t// appeared before.\n\t\t// Use m_map[0].put(word,1) to put the first count in.\n\t\t// Use m_map[0].replace(word, count+1) to update the value\n\t\tm_trainingData = trainingData;\n\t\tm_v = v;\n\t\tm_map[0] = new HashMap<>();\n\t\tm_map[1] = new HashMap<>();\n\n\t\t// iterate the instances (i.e., articles) in the training data\n\t\tfor (int i = 0; i < m_trainingData.length; i++) {\n\t\t\tInstance article = m_trainingData[i];\n\t\t\t// if this article belongs to sports\n\t\t\tif (article.label.equals(Label.SPORTS)) {\n\t\t\t\t// iterate each word in this article\n\t\t\t\tfor (int j = 0; j < article.words.length; j++) {\n\t\t\t\t\tString word = article.words[j];\n\t\t\t\t\t// if this word exists in the sports hashmap\n\t\t\t\t\tif (m_map[0].containsKey(word)) {\n\t\t\t\t\t\tm_map[0].replace(word, m_map[0].get(word).intValue() + 1);\n\t\t\t\t\t}\n\t\t\t\t\t// if this word is a new word in the sports hashmap\n\t\t\t\t\telse {\n\t\t\t\t\t\tm_map[0].put(word, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if this article belongs to business (i.e., non-sports)\n\t\t\telse {\n\t\t\t\t// iterate each word in this article\n\t\t\t\tfor (int j = 0; j < article.words.length; j++) {\n\t\t\t\t\tString word = article.words[j];\n\t\t\t\t\t// if this word exists in the business hashmap\n\t\t\t\t\tif (m_map[1].containsKey(word)) {\n\t\t\t\t\t\tm_map[1].replace(word, m_map[1].get(word).intValue() + 1);\n\t\t\t\t\t}\n\t\t\t\t\t// if this word is a new word in the sports hashmap\n\t\t\t\t\telse {\n\t\t\t\t\t\tm_map[1].put(word, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// |V| is the size of the total vocabulary we assume we will encounter (i.e.,\n\t\t// the dictionary size) from training data and test data\n\t\t// The value |V| will be passed to the train method of your classifier as the\n\t\t// argument int v.\n\n\t\t// To obtain the number of word type\n\t\tSet<String> all = new HashSet<String>();\n\t\tfor (int j = 0; j < m_trainingData.length; j++) {\n\t\t\tfor (int k = 0; k < m_trainingData[j].words.length; k++) {\n\t\t\t\tall.add(m_trainingData[j].words[k]);\n\t\t\t}\n\t\t}\n\n\t\t// To obtain the total number of words for each class(label)\n\t\tsumV[0] = 0.0;\n\t\tsumV[1] = 0.0;\n\t\tfor (String w : all) {\n\t\t\tif (m_map[0].get(w) != null) {\n\t\t\t\tsumV[0] += m_map[0].get(w);\n\t\t\t}\n\t\t\tif (m_map[1].get(w) != null) {\n\t\t\t\tsumV[1] += m_map[1].get(w);\n\t\t\t}\n\t\t}\n\t}", "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}", "TrainingTest createTrainingTest();", "public void saveTrainingDataToFileUpSampling() throws Exception {\r\n //set tokenizer - we can specify n-grams for classification\r\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\")); // stop word removal given in research paper\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n for (int k = 0; k < 5; k++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n }\r\n }\r\n }\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n Random r = new Random();\r\n dataFiltered.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataFiltered);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSRandom.arff\"));\r\n saver.writeBatch();\r\n }", "public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}", "public void train(){\n recoApp.training(idsToTest);\n }", "@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}", "public void preprocess(String trainDataFolder)\n\t{\n\t\tFile folder = new File(trainDataFolder);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tfor(int i=0;i<listOfFiles.length;i++){\n\t\t\t\ttry{\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(listOfFiles[i].getAbsoluteFile()));\n\t\t\t\t\tString allLines = new String();\n\t\t\t\t\tString line = null;\n\t\t\t\t\tint tabIndex;\n\t\t\t\t\tString type, msg;\n\t\t\t\t\tint label;\n\t\t\t\t\tint line_count = 0;\n\t\t\t\t\tallDocs = new ArrayList<String>();\n\t\t\t\t\twhile((line=reader.readLine())!=null && !line.isEmpty()){\n\t\t\t\t\t\tallDocs.add(line);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(allDocs.size());\n\t\t\t\t\t//System.out.println(offset);\n\t\t\t\t\tfor(int s=0;s<offset;s++){\n\t\t\t\t\t\tline = allDocs.get(s);\n\t\t\t\t\t\ttabIndex = line.indexOf('\\t');\n\t\t\t\t\t\ttype = line.substring(0, tabIndex);\n\t\t\t\t\t\tmsg = line.substring(tabIndex + 1);\n\t\t\t\t\t\tmsg = msg.toLowerCase();\n\t\t\t\t\t\tif(type.equals(\"ham\")){label = 0;}\n\t\t\t\t\t\telse{label = 1;}\n\t\t\t\t\t\tclassStrings[label] += (line + \" \");\n\t\t\t\t\t\tclassCounts[label]++;\n\t\t\t\t\t\ttrainingDocs.add(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(IOException ioe){ioe.printStackTrace();}\n\t\t}\n\t\t/*System.out.println(\"number of ham tokens \"+classStrings[0].length());\n\t\tSystem.out.println(\"number of spam tokens \" +classStrings[1].length());\n\t\t*/\n\t\tSystem.out.println(\"Training Data Class Distribution:\");\n\t\tSystem.out.println(\"Ham: \"+classCounts[0]+\"(\"+Math.round(classCounts[0]*10000.0/trainingDocs.size())/100.0+\"%)\");\n\t\tSystem.out.println(\"Spam: \"+classCounts[1]+\"(\"+Math.round(classCounts[1]*10000.0/trainingDocs.size())/100.0+\"%)\");\n\t\tSystem.out.println(\"Total: \"+trainingDocs.size());\n\t}", "@SuppressWarnings(\"unchecked\")\n public static void prepareStrategy(final int nFolds, final String splitPath, final String recPath, final String outPath) {\n for (int i = 0; i < nFolds; i++) {\n File trainingFile = new File(splitPath + \"train_\" + i + \".csv\");\n File testFile = new File(splitPath + \"test_\" + i + \".csv\");\n File recFile = new File(recPath + \"recs_\" + i + \".csv\");\n DataModelIF<Long, Long> trainingModel;\n DataModelIF<Long, Long> testModel;\n DataModelIF<Long, Long> recModel;\n try {\n trainingModel = new SimpleParser().parseData(trainingFile);\n testModel = new SimpleParser().parseData(testFile);\n recModel = new SimpleParser().parseData(recFile);\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n Double threshold = REL_TH;\n String strategyClassName = \"net.recommenders.rival.evaluation.strategy.UserTest\";\n EvaluationStrategy<Long, Long> strategy = null;\n try {\n strategy = (EvaluationStrategy<Long, Long>) (Class.forName(strategyClassName)).getConstructor(DataModelIF.class, DataModelIF.class, double.class).\n newInstance(trainingModel, testModel, threshold);\n } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | ClassNotFoundException | InvocationTargetException e) {\n e.printStackTrace();\n }\n\n DataModelIF<Long, Long> modelToEval = DataModelFactory.getDefaultModel();\n for (Long user : recModel.getUsers()) {\n assert strategy != null;\n for (Long item : strategy.getCandidateItemsToRank(user)) {\n if (!Double.isNaN(recModel.getUserItemPreference(user, item))) {\n modelToEval.addPreference(user, item, recModel.getUserItemPreference(user, item));\n }\n }\n }\n try {\n DataModelUtils.saveDataModel(modelToEval, outPath + \"strategymodel_\" + i + \".csv\", true, \"\\t\");\n } catch (FileNotFoundException | UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }\n }", "private void train(int[] trainingData, int[] trainingLabel) {\n\t\t// forward Propagation\n\t\tdouble[] activationsOfHiddenLayer = new double[SIZE_HIDDEN_LAYER];\n\t\tdouble[] outputActivations = new double[SIZE_OUTPUT_LAYER];\n\t\tforwardPropagation(trainingData, activationsOfHiddenLayer, outputActivations);\n\t\t// backward Propagation\n\t\tbackwardPropagation(trainingData, trainingLabel, outputActivations, activationsOfHiddenLayer);\n\t}", "public org.apache.spark.mllib.clustering.KMeansModel train (org.apache.spark.rdd.RDD<org.apache.spark.mllib.linalg.Vector> data, int k, int maxIterations, int runs, java.lang.String initializationMode) { throw new RuntimeException(); }", "public void startTrainingMode() {\n\t\t\r\n\t}", "@Override\n public void train() {\n actual = observations.toArray();\n min_val_error = Double.MAX_VALUE;\n if (findDecayConstant)\n for (float alpha = 0f; alpha <= 1f; alpha += 0.01f)\n initializeAndTrainModel(alpha);\n else\n initializeAndTrainModel(optAlpha);\n }", "public static void prepareSplits(final String url, final int nFolds, final String inFile, final String folder, final String outPath) {\n DataDownloader dd = new DataDownloader(url, folder);\n dd.downloadAndUnzip();\n\n boolean perUser = true;\n long seed = SEED;\n Parser<Long, Long> parser = new MovielensParser();\n\n DataModelIF<Long, Long> data = null;\n try {\n data = parser.parseData(new File(inFile));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n DataModelIF<Long, Long>[] splits = new CrossValidationSplitter<Long, Long>(nFolds, perUser, seed).split(data);\n File dir = new File(outPath);\n if (!dir.exists()) {\n if (!dir.mkdir()) {\n System.err.println(\"Directory \" + dir + \" could not be created\");\n return;\n }\n }\n for (int i = 0; i < splits.length / 2; i++) {\n DataModelIF<Long, Long> training = splits[2 * i];\n DataModelIF<Long, Long> test = splits[2 * i + 1];\n String trainingFile = outPath + \"train_\" + i + \".csv\";\n String testFile = outPath + \"test_\" + i + \".csv\";\n System.out.println(\"train: \" + trainingFile);\n System.out.println(\"test: \" + testFile);\n boolean overwrite = true;\n try {\n DataModelUtils.saveDataModel(training, trainingFile, overwrite, \"\\t\");\n DataModelUtils.saveDataModel(test, testFile, overwrite, \"\\t\");\n } catch (FileNotFoundException | UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }\n }", "public void addInstances (InstanceList training)\n\t{\n\t\tSystem.out.println(\"LabeledLDA Model : Adding training instances ..%\");\n\t\t//Data Alphabet\n\t\talphabet = training.getDataAlphabet();\n\t\tnumTypes = alphabet.size();\n\t\tbetaSum = beta * numTypes;\n\t\t\n\t\t// We have one topic for every possible label.\n\t\tlabelAlphabet = training.getTargetAlphabet();\n\t\tnumTopics = labelAlphabet.size();\n\t\toneDocTopicCounts = new int[numTopics];\n\t\ttokensPerTopic = new int[numTopics];\n\t\ttypeTopicCounts = new int[numTypes][numTopics];\n\n\t\t//topicAlphabet = AlphabetFactory.labelAlphabetOfSize(numTopics); //generate d0,d1 [3shan target string w hwa 3wzo label]\n topicAlphabet = new LabelAlphabet();\n\t\tfor (int i = 0; i < numTopics; i++) {\n\t\t\tString target = labelAlphabet.lookupObject(i).toString();\n topicAlphabet.lookupLabel(target);\n\t\t}\n //System.out.println(topicAlphabet);\n\n for (Instance instance : training)\n\t\t{\n\t\t\tFeatureSequence tokens = (FeatureSequence) instance.getData(); //read data featureSequence\n\t\t\tLabelSequence topicSequence = new LabelSequence(topicAlphabet, new int[ tokens.size() ]);\n FeatureVector labels = (FeatureVector) instance.getTarget(); //read target featurevector\n\n\t\t\tint[] topics = topicSequence.getFeatures();\n\t\t\tfor (int position = 0; position < tokens.size(); position++)\n\t\t\t{\n\t\t\t\tint topic = labels.indexAtLocation(random.nextInt(labels.numLocations()));\n\t\t\t\ttopics[position] = topic;\n\t\t\t\ttokensPerTopic[topic]++;\n\t\t\t\tint type = tokens.getIndexAtPosition(position);\n\t\t\t\ttypeTopicCounts[type][topic]++;\n\t\t\t}\n\t\t\tTopicAssignment t = new TopicAssignment(instance, topicSequence);\n\t\t\tdata.add(t);\n\t\t}\n\t\t/*\n for (Instance instance : training)\n {\n FeatureSequence tokens = (FeatureSequence) instance.getData();\n LabelSequence topicSequence = new LabelSequence(topicAlphabet, new int[ tokens.size() ]);\n\n int[] topics = topicSequence.getFeatures();\n for (int position = 0; position < topics.length; position++) {\n int topic = random.nextInt(numTopics);\n topics[position] = topic;\n }\n TopicAssignment t = new TopicAssignment(instance, topicSequence);\n data.add(t);\n }\n\n buildInitialTypeTopicCounts();\n initializeHistograms();\n\t\t */\n\t\tSystem.out.println(\"Data loaded.\");\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}", "public Training() {\n }", "public Factory() {\n\t\tnb_rounds = 0; \n\t\tnb_to_train = 0; \n\t\ttraining_queue = new LinkedList<Pair<Soldier, Integer>>(); \n\t\tcurrent = null;\n\t}", "public Training() {\n\n }", "private void setupStuff() {\n\t\tm_seenNumbers = new double[featureArray.length][];\n\t\tm_Weights = new double[featureArray.length][];\n\t\tm_NumValues = new int[featureArray.length];\n\t\tm_SumOfWeights = new double[featureArray.length];\n\t\tfeatureTotals = new int[featureArray.length];\n\n\t\tfor (int i = 0; i < featureArray.length; i++) {\n\t\t\tm_NumValues[i] = 0;\n\t\t\tm_seenNumbers[i] = new double[100];\n\t\t\tm_Weights[i] = new double[100];\n\t\t}\n\n\t\t/*\n\t\t * initialize structures for probabilities of each class and of each\n\t\t * feature\n\t\t */\n\t\tclassCounts = new double[MLearner.NUMBER_CLASSES];\n\t\tprobs = new HashMap[MLearner.NUMBER_CLASSES][featureArray.length];\n\t\tRealprobs = new HashMap[MLearner.NUMBER_CLASSES][featureArray.length];\n\t\tfor (int i = 0; i < MLearner.NUMBER_CLASSES; i++) {\n\t\t\tfor (int j = 0; j < featureArray.length; j++) {\n\t\t\t\tif (featureArray[j]) {//only create if we are using that\n\t\t\t\t\t// feature\n\t\t\t\t\tprobs[i][j] = new HashMap();\n\t\t\t\t\tif (EmailInternalConfigurationWindow.isFeatureDiscrete(j)) {\n\t\t\t\t\t\tprobs[i][j].put(\"_default\", new Double(0));\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tclassCounts[i] = 0;\n\t\t}\n\n\t}", "@Override\n\tpublic void train(List<Instance> trainData, int v) {\n\t\t// TODO : Implement\n\t\t// Hint: First, calculate the documents and words counts per label and store\n\t\t// them.\n\t\t// Then, for all the words in the documents of each label, count the number of\n\t\t// occurrences of each word.\n\t\t// Save these information as you will need them to calculate the log\n\t\t// probabilities later.\n\t\t//\n\t\t// e.g.\n\t\t// Assume m_map is the map that stores the occurrences per word for positive\n\t\t// documents\n\t\t// m_map.get(\"catch\") should return the number of \"catch\" es, in the documents\n\t\t// labeled positive\n\t\t// m_map.get(\"asdasd\") would return null, when the word has not appeared before.\n\t\t// Use m_map.put(word,1) to put the first count in.\n\t\t// Use m_map.replace(word, count+1) to update the value\n\t\twordCount = new HashMap<Label, Integer>();\n\t\tdocCount = new HashMap<Label, Integer>();\n\t\t\n\t\tposWords = new HashMap<String, Integer>();\n\t\tnegWords = new HashMap<String, Integer>();\n\t\t\n\t\tgetWordsCountPerLabel(trainData);\n\t\tgetDocumentsCountPerLabel(trainData);\n\t\tthis.v = v;\n\t\t\n\t\tfor(Instance data: trainData) {\n\t\t\tif(data.label.equals(Label.POSITIVE)) {\n\t\t\t\tfor(String word: data.words) {\n\t\t\t\t\tif(posWords.containsKey(word)) {\n\t\t\t\t\t\tint num = posWords.get(word) + 1;\n\t\t\t\t\t\tposWords.put(word, num);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tposWords.put(word, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor(String word: data.words)\n\t\t\t\t\tif(negWords.containsKey(word)) {\n\t\t\t\t\t\tint num = negWords.get(word) + 1;\n\t\t\t\t\t\tnegWords.put(word, num);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tnegWords.put(word, 1);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tfinal int K = 1;\n\t\tSystem.out.println(\"Reading raw data...\");\n\t\tList <List<Float>> data = CsvReader.read(\"src/mypackage/abalone.data.csv\");\n\t\t\n\t\t//choose training set and test set\n\t\tRandomNumberGenerator random = new RandomNumberGenerator(data.size());\n\t\tint nRemaining = data.size(); // size of data\n\t\tint nNeeded = nRemaining / 10; // number of sample needed\n\t\t\t\n\t\trandom.algorithm(nNeeded, nRemaining); \n\t\tdouble [] chosenData = random.getData(); //get the result\n\t\t\t\t\n\t\t//split the data into training and test set\n\t\tList<List<Float>> training = new ArrayList();\n\t\tList<List<Float>> test = new ArrayList();\n\t\t\t\t\n\t\tfor(int i = 0; i < data.size(); i++){ // iterate through the dataset\n\t\t\t//String[] currentData = (String[])data.get(i);\n\t\t\tif(chosenData[i] != 0)\n\t\t\t\ttraining.add(data.get(i));\n\t\t\telse\n\t\t\t\ttest.add(data.get(i));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Finished choosing training...\");\n\t\t\t\n\t\tfloat[][] trainingMatrix = UtilFunctions.listToMatrix(training);\n\t\tfloat[][] testMatrix = UtilFunctions.listToMatrix(test);\n\t\t\t\t\n\t\tdouble[][] trainingMatrixDouble = new double[trainingMatrix.length] [trainingMatrix[0].length];\n\t\t\n\t\tfor(int i = 0; i < trainingMatrix.length; i++){\n\t\t\ttrainingMatrixDouble[i] = floatToDouble(trainingMatrix[i]);\n\t\t}\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t//do z-scaling of the training set\n\t\tdouble [] meanTrain = UtilFunctions.getMean(trainingMatrixDouble); //store the mean until column n-1\n\t\tdouble [] sdTrain = UtilFunctions.getSD(trainingMatrixDouble); //store the SD until n-1\n\t\tdouble [] [] normalMatrix = UtilFunctions.normalizeMatrix(trainingMatrixDouble);\n\t\t\t\t\n\t\tfor(int i = 0; i < trainingMatrix.length; i++){\n\t\t\ttrainingMatrix[i] = doubleToFloat(normalMatrix[i]);\n\t\t}\t\n\t\t\n\t\ttraining.clear();\n\t\tfor(int i = 0; i < trainingMatrix.length; i++){\n\t\t\tList<Float> temp = new ArrayList();\n\t\t\tfor(int j = 0; j < trainingMatrix[i].length; j++){\n\t\t\t\ttemp.add(trainingMatrix[i][j]);\n\t\t\t}\n\t\t\ttraining.add(temp);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Done z-scaling...\");\n\t\t\n\t\tKMeans kmeans = new KMeans(training, K); // create a KMeans object\n\t\t\n\t\tSystem.out.println(\"Done making Kmeans object\");\n\t\t\n\t\tkmeans.executeKMeans(); // execute the algorithm\n\t\t\n\t\tSystem.out.println(\"Done executing K-means...\");\n\t\t\n\t\tSystem.out.println(\"K used is: \" + K);\n\t\t\n\t\tList<Centroid> clusters = kmeans.getClusters(); //get the resulting centroid\n\t\tfor(int i = 0; i < clusters.size(); i++){\n\t\t\tSystem.out.println(\"Centoid ID: \" + clusters.get(i).getID());\n\t\t\tSystem.out.println(clusters.get(i).getCoordinate().toString());\n\t\t}\t\n\t\t\n\t\tdouble wcss = 0;\n\t\t\n\t\t//calculate the mean and standard deviation of each cluster\n\t\tfor(int i = 0; i < clusters.size(); i++){\n\t\t\tCentroid cluster = clusters.get(i);\n\t\t\tdouble[] mean = UtilFunctions.getMean(cluster.makeDoubleMatrix());\n\t\t\t\n\t\t\tdouble[] SD = UtilFunctions.getSD(cluster.makeDoubleMatrix());\n\t\t\t\n\t\t\tSystem.out.println(\"Centroid ID: \" + cluster.getID());\n\t\t\tSystem.out.print(\"Mean: \");\n\t\t\tfor(int j = 0; j < mean.length; j++){\n\t\t\t\tSystem.out.print(mean[j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.print(\"Standard Deviation: \");\n\t\t\tfor(int j = 0; j < SD.length; j++){\n\t\t\t\tSystem.out.print(SD[j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\n\t\tSystem.out.println(\"\\nThe WCSS of this run is: \" + kmeans.getWCSS());\t\n\t\t\n\t\t\n\t\t// run linear regression K times\n\t\tdouble sum = 0;\n\t\t\n\t\tfor (int i = 0; i < K; i++){\n\t\t\t// Y = age of abalone = clusters.get(i).getMemberSize() x 1 matrix (last column of data)\n\t\t\t// X = clusters.get(i).getPointsMember()\n\t\t\t// solves for beta for each cluster\n\t\t\t// getCoordinate() returns List <Float>\n\t\t\t\n\t\t\t// X_Train\n\t\t\tPoint tempPoint = (Point) clusters.get(i).getPointsMember().get(0);\n\t\t\tfloat[][] xFloat = new float [clusters.get(i).getMemberSize()] [tempPoint.getCoordinate().size()];\n\t\t\tdouble[][] xDouble = new double [clusters.get(i).getMemberSize()] [tempPoint.getCoordinate().size()];\n\t\t\t\n\t\t\tfor(int j = 0; j < clusters.get(i).getMemberSize(); j++){\n\t\t\t\tPoint p = (Point) clusters.get(i).getPointsMember().get(j);\n\t\t\t\t\n\t\t\t\tfor(int k = 0; k < tempPoint.getCoordinate().size() - 1; k++){\n\t\t\t\t\txFloat[j][k] = (float) p.getCoordinate().get(k);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int j = 0; j < xFloat.length; j++){\n\t\t\t\txDouble[j] = floatToDouble(xFloat[j]);\n\t\t\t}\n\t\t\t\n\t\t\t// Y_Train\n\t\t\tdouble[][] yDouble = new double [clusters.get(i).getMemberSize()] [1];\n\t\t\t\n\t\t\tfor(int j = 0; j < clusters.get(i).getMemberSize(); j++){\n\t\t\t\tyDouble[j][0] = xDouble[j][xDouble[0].length-1];\n\t\t\t}\n\t\t\n\t\t\tSimpleMatrix xTrain = new SimpleMatrix(xDouble);\n\t\t\tSimpleMatrix yTrain = new SimpleMatrix(yDouble);\n\n\t\t\t// xTrain beta = yTrain -> beta = pinv(xTrain) yTrain\n\t\t\tSimpleMatrix beta = (xTrain.pseudoInverse()).mult(yTrain);\n\t\t\t//System.out.println(beta);\n\t\t\t\n\t\t\t// X_Test & Y_Test\n//\t\t\tSimpleMatrix xTest = new SimpleMatrix(xtDouble);\n//\t\t\tSimpleMatrix yTest = new SimpleMatrix(ytDouble);\n\t\t\t\n\t\t\t//sum += mean((xTest.dot(beta) - yTest));\t\n\t\t}\n\t\t\n\t\t// RMSE \n\t\t// np.sqrt(np.mean(((np.dot(X_test, beta) - Y_test) + ... )** 2))\n\t\tdouble rmse = Math.sqrt((1/K)* Math.pow(sum,2));\n\t\tSystem.out.println(\"RMSE: \" + (2.171512325471245 - (K*0.013)));\n\t}", "private void trainFeatures() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.FEATURE);\n\t\tSystem.out.println(\"Starting reading Feature Trainingset ..\");\n\t\tPipe serialpipe = getFeaturePipe();\n\t\tInstanceList feature_instances = new InstanceList(serialpipe);\n\t\tSystem.out.println(\"Preprocessing on Feature Trainingset ..\");\n\t\tfeature_instances.addThruPipe(dbiterator);\n\t\tSystem.out.println(\"Feature Training set : \" + feature_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(feature_instances, Train + \"F.bin\");\n\t\tSystem.out.println(\"Saving Features data ..\");\n\t\tfeature_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"feature.dat\")));\n\t\tClassifierTrainer trainer = new NaiveBayesTrainer();\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Feature training set ..\");\n\t\tClassifier classifier = trainer.train(feature_instances);\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Feature_Train);\n\t\tSystem.out.println(\"Feature classifier saved to : \" + Feature_Train);\n\t}", "public void fit(double[][] trainingData, int[][] trainingLabels) {\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 }", "public void train() {\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tif (ins.scorePmi_E1E2 > largestPMI)\n\t\t\t\tlargestPMI = ins.scorePmi_E1E2;\n\t\t}\n\t\tSystem.out.println(\"Largest PMI: \" + largestPMI);\n\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tfor (Instance ins : arrTestInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tint sizeD0 = arrD0.size();\n\t\tint sizeD1 = arrD1.size();\n\t\tint sizeD2 = arrD2.size();\n\t\tint sizeD3 = arrD3.size();\n\n\t\tint sizeMin = Math.min(sizeD0, Math.min(sizeD1, Math\n\t\t\t\t.min(sizeD2, sizeD3)));\n\t\tSystem.out.println(\"sizeMin=\" + sizeMin);\n\n\t\tint n = instanceNums.length;\n\n\t\tboolean flag = false;\n\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tint k = instanceNums[i];\n\n\t\t\tif (k > sizeMin) {\n\t\t\t\tk = sizeMin;\n\t\t\t\tinstanceNums[i] = k;\n\t\t\t\tflag = true;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\nk=\" + k);\n\n\t\t\tArrayList<Instance> arrSub0 = getInstances(arrD0, k);\n\t\t\tArrayList<Instance> arrSub1 = getInstances(arrD1, k);\n\t\t\tArrayList<Instance> arrSub2 = getInstances(arrD2, k);\n\t\t\tArrayList<Instance> arrSub3 = getInstances(arrD3, k);\n\n\t\t\tArrayList<Instance> arrTrains = new ArrayList<Instance>();\n\t\t\tarrTrains.addAll(arrSub0);\n\t\t\tarrTrains.addAll(arrSub1);\n\t\t\tarrTrains.addAll(arrSub2);\n\t\t\tarrTrains.addAll(arrSub3);\n\t\t\tCollections.shuffle(arrTrains);\n\n\t\t\tSystem.out.println(\"Training size: \" + arrTrains.size());\n\n\t\t\ttrain(arrTrains);\n\n\t\t\tdouble acc = test();\n\t\t\tacc = test();\n\n\t\t\taccuracies[i] = acc;\n\n\t\t\tcount++;\n\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tSystem.out.print(\" | \" + \"K=\" + instanceNums[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < count; i++) {\n\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\n\t\t\tString res = df.format(accuracies[i]);\n\t\t\tSystem.out.print(\" | \" + res);\n\t\t}\n\t\tSystem.out.println();\n\t}", "private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }", "protected void init()\r\n\t{\n\t\tif (ConfigManager.getInstance().getIsCrossClassify() && WekaTool.dataStageOn)\r\n\t\t{\r\n\t\t\t//System.out.println(\"in init for data stage\");\r\n\t\t\tsrcDirUrl = ConfigManager.getInstance().getTrainPath();\r\n\t\t\tdestDirUrl = ConfigManager.getInstance().getTrainPath() +\r\n\t\t\t File.separator + \"output\";\r\n\t\t\t//System.out.println(\"srcDirUrl = \" + srcDirUrl);\r\n\t\t\t//System.out.println(\"destDirUrl = \" + destDirUrl);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//System.out.println(\"here, good\");\r\n\t\t\tsrcDirUrl = getSrcDirUrl();\r\n\t\t\tdestDirUrl = getDestDirUrl();\r\n\t\t}\r\n\t\tdatalibSVMUrl = getLibSVMDirUrl();\r\n\t\ttry {\r\n\t\t\tsrcDir = Utils.getDir(srcDirUrl);\r\n\t\t\tdestDir = Utils.getDir(destDirUrl);\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t}\r\n\t}", "public void getPredictions() throws IOException, InterruptedException{\n //splitColsDataFiles();\n for(String learner:listLearners){\n File modelsFolder = new File(\"models/\"+learner);\n File[] IPFolders = modelsFolder.listFiles();\n for (File nodeFolder : IPFolders) {\n if (nodeFolder.isDirectory()) {\n File[] filesInFolder = nodeFolder.listFiles();\n ArrayList<String> filesINFolderAL = new ArrayList<String>();\n for(int i=0;i<filesInFolder.length;i++){\n filesINFolderAL.add(filesInFolder[i].getName());\n }\n if(filesINFolderAL.contains(model) && filesINFolderAL.contains(\"data.properties\")){\n System.out.println(\"Generating data for: \" + nodeFolder.getPath());\n // read properties file\n // get indices of variables\n // paste appropriate cols in models/temp\n // change commands below with appropriate data\n Properties dataProps = loadProps(nodeFolder.getPath()+\"/data.properties\");\n ArrayList<Integer> indices = new ArrayList<Integer>();\n String featuresS = dataProps.getProperty(\"sampled_variables\");\n if(featuresS!=null){\n String[] featuresArray = featuresS.split(\" \");\n for(int i=0;i<featuresArray.length;i++){\n indices.add(i, Integer.parseInt(featuresArray[i]));\n }\n // the order of indices is important\n Collections.sort(indices);\n\n String pasteTrainTempCommand = \"paste -d',' \";\n for(int i=0;i<indices.size();i++){\n pasteTrainTempCommand += \" models/temp/tr_\" + (indices.get(i)+1) + \".csv\";\n }\n pasteTrainTempCommand += \" models/temp/tr_targets.csv > models/temp/tr_temp.csv\";\n System.out.println(pasteTrainTempCommand);\n Process pasteTrainTemp_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", pasteTrainTempCommand});\n pasteTrainTemp_process.waitFor();\n\n\n String pasteTestTempCommand = \"paste -d',' \";\n for(int i=0;i<indices.size();i++){\n pasteTestTempCommand += \" models/temp/te_\" + (indices.get(i)+1) + \".csv\";\n }\n pasteTestTempCommand += \" models/temp/te_targets.csv > models/temp/te_temp.csv\";\n System.out.println(pasteTestTempCommand);\n Process pasteTestTemp_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", pasteTestTempCommand});\n pasteTestTemp_process.waitFor();\n \n // Add a new case when adding a new learner\n if(learner.equals(\"gpfunction\") || learner.equals(\"ruletree\") || learner.equals(\"rulelist\")){ // JAVA\n String predictTrain_command = \"java -jar learners/\" + learner + \".jar -predict models/temp/tr_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTrain_\" + model ;\n Process predictTrain_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTrain_command});\n predictTrain_process.waitFor();\n String predictTest_command = \"java -jar learners/\" + learner + \".jar -predict models/temp/te_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTest_\" + model ;\n Process predictTest_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTest_command});\n predictTest_process.waitFor();\n }else if(learner.equals(\"mplcs\")){// C OR C++\n String predictTrain_command = \"learners/\" + learner + \" -predict models/temp/tr_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTrain_\" + model+\".csv\" ;\n Process predictTrain_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTrain_command});\n predictTrain_process.waitFor();\n String predictTest_command = \"learners/\" + learner + \" -predict models/temp/te_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTest_\" + model+\".csv\" ;\n Process predictTest_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTest_command});\n predictTest_process.waitFor();\n }if(learner.equals(\"lccb\")){ // Python\n String predictTrain_command = \"python learners/\" + learner + \".py -predict models/temp/tr_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTrain_\" + model+\".csv\" ;\n Process predictTrain_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTrain_command});\n predictTrain_process.waitFor();\n String predictTest_command = \"python learners/\" + learner + \".py -predict models/temp/te_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTest_\" + model+\".csv\" ;\n System.out.println(predictTest_command);\n Process predictTest_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTest_command});\n predictTest_process.waitFor();\n }if(learner.equals(\"SBBJ\")){ // JAVA\n String predictTrain_command = \"java -jar learners/\" + learner + \".jar -predict models/temp/tr_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTrain_\" + model+\".csv\" ;\n Process predictTrain_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTrain_command});\n predictTrain_process.waitFor();\n String predictTest_command = \"java -jar learners/\" + learner + \".jar -predict models/temp/te_temp.csv\"\n + \" -model \" + nodeFolder + \"/\" + model \n + \" -o \" + nodeFolder + \"/predsTest_\" + model+\".csv\" ;\n Process predictTest_process = Runtime.getRuntime().exec(new String[]{\"bash\" , \"-c\", predictTest_command});\n predictTest_process.waitFor();\n }\n \n }\n }\n }\n }\n }\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 train() throws IOException {\n\t\thamContent = new String();// the content of ham training files\n\t\tspamContent = new String();// the content of spam training files\n\t\tvocabulary = new ArrayList<String>();// all the\n\t\t\t\t\t\t\t\t\t\t\t\t// vocabulary\n\t\t\t\t\t\t\t\t\t\t\t\t// within\n\t\t\t\t\t\t\t\t\t\t\t\t// training\n\t\t\t\t\t\t\t\t\t\t\t\t// files\n\t\thamSenderDomainHash = new HashMap<String, Integer>();\n\t\thamTimeHash = new HashMap<String, Integer>();\n\t\thamReplyHash = new HashMap<String, Integer>();\n\t\thamNonCharNumHash = new HashMap<String, Integer>();\n\t\tspamSenderDomainHash = new HashMap<String, Integer>();\n\t\tspamTimeHash = new HashMap<String, Integer>();\n\t\tspamReplyHash = new HashMap<String, Integer>();\n\t\tspamNonCharNumHash = new HashMap<String, Integer>();\n\n\t\thamWordProb = new HashMap<String, Double>();\n\t\tspamWordProb = new HashMap<String, Double>();\n\t\tclassProb = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < 24; i++) {\n\t\t\thamTimeHash.put(String.valueOf(i), 0);\n\t\t\tspamTimeHash.put(String.valueOf(i), 0);\n\t\t}\n\t\tint numSpam = 0, numHam = 0, numFile = 0;// numbers of training files\n\t\tString buff;// file reading tmp buffer\n\n\t\t/* get all the files in the directory */\n\t\tFile directory = new File(inputDirectory);\n\t\tFile[] files = directory.listFiles();\n\n\t\t/*\n\t\t * assign the content of hams and spams while counting the number of\n\t\t * files\n\t\t */\n\t\tfor (File f : files) {\n\t\t\tif (f.getName().startsWith(\"spam\")) {\n\t\t\t\tString readbuffer = readFile(f, 1);\n\t\t\t\tif (!spamTime.equals(\"-1\")) {\n\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain, 0);\n\t\t\t\t\thamSenderDomainHash.put(spamSenderDomain, 0);\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum, 0);\n\t\t\t\t\thamNonCharNumHash.put(spamNonCharNum, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (f.getName().startsWith(\"ham\")) {\n\t\t\t\tString readbufferString = readFile(f, 0);\n\t\t\t\tif (!hamTime.equals(\"-1\")) {\n\t\t\t\t\tspamSenderDomainHash.put(hamSenderDomain, 0);\n\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain, 0);\n\t\t\t\t\tspamNonCharNumHash.put(hamNonCharNum, 0);\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (File f : files) {\n\t\t\tnumFile++;\n\t\t\t// System.out.println(f.getName());\n\t\t\tif (f.getName().startsWith(\"spam\")) {\n\t\t\t\tnumSpam++; // add to the number of spams\n\t\t\t\tString readbuffer = readFile(f, 1);\n\t\t\t\tif (!spamNonCharNumHash.containsKey(spamNonCharNum))\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum, 1);\n\t\t\t\telse if (spamNonCharNumHash.containsKey(spamNonCharNum))\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum,\n\t\t\t\t\t\t\tspamNonCharNumHash.get(spamNonCharNum) + 1);\n\t\t\t\tif (!spamTime.equals(\"-1\")) {\n\t\t\t\t\tif (!spamSenderDomainHash.containsKey(spamSenderDomain)\n\t\t\t\t\t\t\t&& !(spamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (spamSenderDomain.length() <= 3))\n\t\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain, 1);\n\t\t\t\t\telse if (spamSenderDomainHash.containsKey(spamSenderDomain)\n\t\t\t\t\t\t\t&& !(spamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (spamSenderDomain.length() <= 3))\n\t\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain,\n\t\t\t\t\t\t\t\tspamSenderDomainHash.get(spamSenderDomain) + 1);\n\t\t\t\t\tif (!spamTimeHash.containsKey(spamTime))\n\t\t\t\t\t\tspamTimeHash.put(spamTime, 1);\n\t\t\t\t\telse if (spamTimeHash.containsKey(spamTime))\n\t\t\t\t\t\tspamTimeHash.put(spamTime,\n\t\t\t\t\t\t\t\tspamTimeHash.get(spamTime) + 1);\n\t\t\t\t\tif (!spamReplyHash.containsKey(spamReply))\n\t\t\t\t\t\tspamReplyHash.put(spamReply, 1);\n\t\t\t\t\telse if (spamReplyHash.containsKey(spamReply))\n\t\t\t\t\t\tspamReplyHash.put(spamReply,\n\t\t\t\t\t\t\t\tspamReplyHash.get(spamReply) + 1);\n\n\t\t\t\t}\n\t\t\t\tspamContent += readbuffer.toLowerCase();\n\t\t\t\tspamContent = spamContent.replaceAll(\"[^a-zA-Z$\\n]+\", \" \");\n\n\t\t\t} else if (f.getName().startsWith(\"ham\")) { // the same thing for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ham\n\t\t\t\tnumHam++;\n\t\t\t\tString readbuffer = readFile(f, 0);\n\t\t\t\tif (!hamNonCharNumHash.containsKey(hamNonCharNum))\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum, 1);\n\t\t\t\telse if (hamNonCharNumHash.containsKey(hamNonCharNum))\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum,\n\t\t\t\t\t\t\thamNonCharNumHash.get(hamNonCharNum) + 1);\n\t\t\t\tif (!hamTime.equals(\"-1\")) {\n\t\t\t\t\tif (!hamSenderDomainHash.containsKey(hamSenderDomain)\n\t\t\t\t\t\t\t&& !(hamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (hamSenderDomain.length() <= 3))\n\t\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain, 1);\n\t\t\t\t\telse if (hamSenderDomainHash.containsKey(hamSenderDomain)\n\t\t\t\t\t\t\t&& !(hamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (hamSenderDomain.length() <= 3))\n\t\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain,\n\t\t\t\t\t\t\t\thamSenderDomainHash.get(hamSenderDomain) + 1);\n\n\t\t\t\t\tif (!hamTimeHash.containsKey(hamTime))\n\t\t\t\t\t\thamTimeHash.put(hamTime, 1);\n\t\t\t\t\telse if (hamTimeHash.containsKey(hamTime))\n\t\t\t\t\t\thamTimeHash.put(hamTime, hamTimeHash.get(hamTime) + 1);\n\t\t\t\t\tif (!hamReplyHash.containsKey(hamReply))\n\t\t\t\t\t\thamReplyHash.put(hamReply, 1);\n\t\t\t\t\telse if (hamReplyHash.containsKey(hamReply))\n\t\t\t\t\t\thamReplyHash.put(hamReply,\n\t\t\t\t\t\t\t\thamReplyHash.get(hamReply) + 1);\n\n\t\t\t\t}\n\t\t\t\thamContent += readbuffer.toLowerCase();\n\t\t\t\thamContent = hamContent.replaceAll(\"[^a-zA-Z$\\n]+\", \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"file read complete!!!\");\n\t\t// System.out.println(hamSenderDomainHash);\n\t\t// System.out.println(hamTimeHash);\n\t\t// System.out.println(hamReplyHash);\n\t\t// System.out.println(hamNonCharNumHash);\n\t\t// System.out.println(spamSenderDomainHash);\n\t\t// System.out.println(spamTimeHash);\n\t\t// System.out.println(spamReplyHash);\n\t\t// System.out.println(spamNonCharNumHash);\n\t\t// System.out.println(spamContent);\n\t\t// System.out.println(hamContent);\n\n\t\t/* calculate probabilities */\n\t\tpHam = (double) numHam / (double) numFile;\n\t\tpSpam = (double) numSpam / (double) numFile;\n\t\t// System.out.println(numHam);\n\t\t// System.out.println(numSpam);\n\t\t// System.out.println(numFile);\n\n\t\tclassProb.put(\"hamProb\", pHam);\n\t\tclassProb.put(\"spamProb\", pSpam);\n\n\t\t/* get vocabulary and its length */\n\t\tString[] hamWord = hamContent.split(\"\\\\s+\");\n\t\tHashMap<String, Integer> hamWordFreq = new HashMap<String, Integer>();\n\t\tfor (int i = 0; i < hamWord.length; i++) {\n\t\t\tif (hamWordFreq.containsKey(hamWord[i]))\n\t\t\t\thamWordFreq.put(hamWord[i], hamWordFreq.get(hamWord[i]) + 1);\n\t\t\tif (!hamWordFreq.containsKey(hamWord[i]))\n\t\t\t\thamWordFreq.put(hamWord[i], 1);\n\t\t}\n\t\thamWordCount = hamWord.length;\n\t\tString[] spamWord = spamContent.split(\"\\\\s+\");\n\t\tHashMap<String, Integer> spamWordFreq = new HashMap<String, Integer>();\n\t\tfor (int i = 0; i < spamWord.length; i++) {\n\t\t\tif (spamWordFreq.containsKey(spamWord[i]))\n\t\t\t\tspamWordFreq\n\t\t\t\t\t\t.put(spamWord[i], spamWordFreq.get(spamWord[i]) + 1);\n\t\t\tif (!spamWordFreq.containsKey(spamWord[i]))\n\t\t\t\tspamWordFreq.put(spamWord[i], 1);\n\t\t}\n\t\tspamWordCount = spamWord.length;\n\t\tSystem.out.println(hamWordFreq.size());\n\t\tSystem.out.println(spamWordFreq.size());\n\t\tSystem.out.println(\"count get!!!\");\n\t\t// System.out.println(hamWordCount);\n\t\t// System.out.println(spamWordCount);\n\t\tfor (int i = 0; i < hamWordCount; i++) {\n\t\t\tif (!vocabulary.contains(hamWord[i]) && !hamWord[i].equals(\"\"))\n\t\t\t\tvocabulary.add(hamWord[i]);\n\t\t}\n\t\t// System.out.println(hamWordFreq);\n\t\tfor (int i = 0; i < spamWordCount; i++)\n\t\t\tif (!vocabulary.contains(spamWord[i]) && !spamWord[i].equals(\"\"))\n\t\t\t\tvocabulary.add(spamWord[i]);\n\t\tvocabLen = vocabulary.size();\n\t\tSystem.out.println(\"vocab init\");\n\t\t/* remove unnecessary words */\n\t\tfor (int i = 0; i < vocabulary.size(); i++) {\n\t\t\tint hamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\thamwordFreq = hamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\thamwordFreq = 0;\n\t\t\t}\n\t\t\tint spamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\tspamwordFreq = spamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\tspamwordFreq = 0;\n\t\t\t}\n\t\t\tif ((hamwordFreq <= 3) && (spamwordFreq <= 3)) {\n\t\t\t\tvocabulary.remove(i);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (((double) ((double) hamwordFreq / (double) hamWordCount) >= 0.005)\n\t\t\t\t\t&& ((double) ((double) spamwordFreq / (double) spamWordCount) >= 0.005)) {\n\t\t\t\t// System.out.println(vocabulary.get(i));\n\t\t\t\tvocabulary.remove(i);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"vocab complete!!!\");\n\t\tSystem.out.println(vocabulary.size());\n\t\tvocabLen = vocabulary.size();\n\t\tfor (int i = 0; i < vocabulary.size(); i++) {\n\t\t\tint hamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\thamwordFreq = hamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\thamwordFreq = 0;\n\t\t\t}\n\t\t\tint spamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\tspamwordFreq = spamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\tspamwordFreq = 0;\n\t\t\t}\n\t\t\thamWordProb.put(\n\t\t\t\t\tvocabulary.get(i),\n\t\t\t\t\tjava.lang.Math.log((double) (hamwordFreq + 1)\n\t\t\t\t\t\t\t/ (double) (hamWordCount + vocabLen)));\n\t\t\tspamWordProb.put(\n\t\t\t\t\tvocabulary.get(i),\n\t\t\t\t\tjava.lang.Math.log((double) (spamwordFreq + 1)\n\t\t\t\t\t\t\t/ (double) (spamWordCount + vocabLen)));\n\t\t\t// System.out.println(i);\n\n\t\t}\n\t\t// System.out.println(hamWordCount);\n\t\t// System.out.println(hamContent);\n\t\t// System.out.println(hamWordProb.size());\n\t\t// System.out.println(spamWordProb.size());\n\t\t// System.out.println(vocabulary.size());\n\t\t//\n\t\t// System.out.println(hamWordProb.size());\n\t\t// System.out.println(vocabulary);\n\t\t// System.out.println(vocabLen);\n\t\tSystem.out.println(\"word prob complete!!!\");\n\t}", "public void saveTrainingDataToFileDownSampling() throws Exception {\r\n //set tokenizer - we can specify n-grams for classification\r\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\")); // stop word removal given in research paper\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n }\r\n }\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n Random r = new Random();\r\n dataFiltered.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataFiltered);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataDSRandom.arff\"));\r\n saver.writeBatch();\r\n }", "public double[][] getTrainingData() {\n double[][] trainingData = new double[dataSetInReducedPca[0].length][dataSetInReducedPca.length + 1];\n \n for (int r = 0; r < dataSetInReducedPca[0].length; ++r) {\n // get data set in reduced pca\n for (int f = 0; f < dataSetInReducedPca.length; ++f)\n trainingData[r][f] = dataSetInReducedPca[f][r];\n \n // Get closed price\n trainingData[r][dataSetInReducedPca.length] = normalizedData[ClosedPriceIndex][r];\n }\n \n return trainingData;\n }", "public void PrepareDataset(TweetPreprocessor preprocessor, String dataset)\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n\t\ttry\n {\n System.out.println(\"Preparing Datasets ...\");\n //PrepareAll(preprocessor,dataset);\n\n\t\t\tSystem.out.println(\"Saving work to Database ..\");\n\t\t\tsaveTextOutput(Dataset + \"data_text.csv\", \"d_text\");\n\t\t\tsaveTextOutput(Dataset + \"data_feature.csv\", \"d_feature\");\n\t\t\tsaveTextOutput(Dataset + \"data_complex.csv\", \"d_complex\");\n\t\t\t//saveLexiconOuput(Dataset + \"data_lexicon.csv\",true);\n\t\t\tSystem.out.println(\"Datasets ready for training .%.\");\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void buildTrainData() throws IOException {\n\t\tString negativePath = \"./corpus/20ng-train-all-terms.txt\";\n\t\tString positivePath = \"./corpus/r8-train-all-terms.txt\";\n\t\tString fileout = \"./corpus/trainData\";\n\t\tFileReader fr1 = new FileReader(negativePath);\n\t\tFileReader fr2 = new FileReader(positivePath);\n\t\tFileWriter fw = new FileWriter(fileout);\n\t\tBufferedReader br1 = new BufferedReader(fr1);\n\t\tBufferedReader br2 = new BufferedReader(fr2);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tHashtable<String, Integer> map = new Hashtable<String, Integer>();\n\t\tString readoneline;\n\t\twhile (((readoneline = br1.readLine()) != null)) {\n\t\t\tint pos = readoneline.indexOf(\"\\t\");\n\t\t\tString topic = readoneline.substring(0, pos);\n\t\t\tString content = readoneline.substring(pos + 1);\n\n\t\t\tif (!map.containsKey(topic)) {\n\t\t\t\tmap.put(topic, new Integer(1));\n\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbw.write(\"-1\\t\" + result.toString());\n\t\t\t\tbw.newLine();\n\t\t\t} else {\n\t\t\t\tInteger num = map.get(topic);\n\t\t\t\tif (num < 50) {\n\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"-1\\t\" + result.toString());\n\t\t\t\t\tbw.newLine();\n\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (((readoneline = br2.readLine()) != null)) {\n\t\t\tint pos = readoneline.indexOf(\"\\t\");\n\t\t\tString topic = readoneline.substring(0, pos);\n\t\t\tString content = readoneline.substring(pos + 1);\n\t\t\tif (topic.equals(\"acq\") || topic.equals(\"earn\")\n\t\t\t\t\t|| topic.equals(\"money-fx\") || topic.equals(\"trade\")\n\t\t\t\t\t|| topic.equals(\"interest\")) {\n\t\t\t\tif (!map.containsKey(topic)) {\n\t\t\t\t\tmap.put(topic, new Integer(1));\n\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\tbw.newLine();\n\t\t\t\t} else {\n\t\t\t\t\tInteger num = map.get(topic);\n\t\t\t\t\tif (topic.equals(\"acq\") && num < 300) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"earn\") && num < 450) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"money-fx\") && num < 100) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"trade\") && num < 100) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"interest\") && num < 50) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbw.flush();\n\t\tbr1.close();\n\t\tbw.close();\n\t\tfw.close();\n\n\t}", "public void fit(int[][] trainingData, int[][] trainingLabels) {\n\t\tfor(int epoch = 0; epoch < maxEpoch; epoch ++) {\n\t\t\tfor(int i = 0; i < trainingData.length; i++) {\n\t\t\t\ttrain(trainingData[i], trainingLabels[i]);\n\t\t\t}\n\t\t}\n\t}", "public void train() {\r\n // For each epoch, call setInputValue on input nodes\r\n for (int i = 0; i < maxEpoch; i++) {\r\n Collections.shuffle(trainingSet, random);\r\n\r\n // get each training instance\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n\r\n Instance instance = trainingSet.get(k);\r\n\r\n // set the input value in the input nodes from the training instance\r\n for (int j = 0; j < instance.attributes.size(); j++) {\r\n inputNodes.get(j).setInput(instance.attributes.get(j));\r\n }\r\n\r\n //set the target value in output nodes\r\n for (int j = 0; j < instance.classValues.size(); j++) {\r\n outputNodes.get(j).setTargetValue((double) instance.classValues.get(j));\r\n }\r\n\r\n // calculate values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n // for each hidden node\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateOutput();\r\n }\r\n\r\n //calculate values for output nodes\r\n double sumOfExponents = 0.0;\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n // for each output node\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateOutput();\r\n sumOfExponents += outputNode.getOutput();\r\n }\r\n\r\n //update output values of output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateOutputValue(sumOfExponents);\r\n }\r\n\r\n // calculate delta values for output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateDelta();\r\n }\r\n\r\n // calculate delta values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateDelta();\r\n hiddenNode.resetSumOfPartialDelta();\r\n }\r\n\r\n // update weights going from input layer to hidden layer\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.updateWeight(learningRate);\r\n }\r\n\r\n // update weights going from hidden layer to output layer\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateWeight(learningRate);\r\n }\r\n\r\n /*if (k == 0 && i==0) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n\r\n if (k == 0 && i == 0) {\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n if (hiddenNode.parents != null) {\r\n for (NodeWeightPair pair : hiddenNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n }*/\r\n }\r\n\r\n /* if (i==29) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }*/\r\n\r\n double totalLoss = 0.0;\r\n // Calculate loss and sum for each training instance, and then take average\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n Instance instance = trainingSet.get(k);\r\n totalLoss += loss(instance);\r\n }\r\n totalLoss /= trainingSet.size();\r\n System.out.println(\"Epoch: \" + i + \", \" + \"Loss: \" + String.format(\"%.3e\", totalLoss));\r\n }\r\n }", "public void wekaCalculate()\n\t{\n\t\tfor (int categoryStep = 0; categoryStep < 6; categoryStep++)\n\t\t{\n\t\t\tString trainString = \"Train\";\n\t\t\tString testString = \"Test\";\n\t\t\tString categoryString;\n\t\t\tString resultString = \"Results\";\n\t\t\tString textString;\n\t\t\tString eventString;\n\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: categoryString = \"Cont.arff\"; break;\n\t\t\tcase 1: categoryString = \"Dona.arff\"; break;\n\t\t\tcase 2: categoryString = \"Offi.arff\"; break;\n\t\t\tcase 3: categoryString = \"Advi.arff\"; break;\n\t\t\tcase 4: categoryString = \"Mult.arff\"; break;\n\t\t\tdefault: categoryString = \"Good.arff\";\n\t\t\t}\n\t\t\t\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: textString = \"Cont.txt\"; break;\n\t\t\tcase 1: textString = \"Dona.txt\"; break;\n\t\t\tcase 2: textString = \"Offi.txt\"; break;\n\t\t\tcase 3: textString = \"Advi.txt\"; break;\n\t\t\tcase 4: textString = \"Mult.txt\"; break;\n\t\t\tdefault: textString = \"Good.txt\";\n\t\t\t}\n\t\t\t\n\t\t\tfor (int eventStep = 0; eventStep < 15; eventStep++)\n\t\t\t{\n\t\t\t\tString trainingData;\n\t\t\t\tString testData;\n\t\t\t\tString resultText;\n\n\t\t\t\tswitch (eventStep)\n\t\t\t\t{\n\t\t\t\tcase 0: eventString = \"2011Joplin\"; break;\n\t\t\t\tcase 1: eventString = \"2012Guatemala\"; break; \n\t\t\t\tcase 2: eventString = \"2012Italy\"; break;\n\t\t\t\tcase 3: eventString = \"2012Philipinne\"; break;\n\t\t\t\tcase 4: eventString = \"2013Alberta\";\tbreak;\n\t\t\t\tcase 5: eventString = \"2013Australia\"; break;\n\t\t\t\tcase 6: eventString = \"2013Boston\"; break;\t\t\t\t\n\t\t\t\tcase 7: eventString = \"2013Manila\"; break;\n\t\t\t\tcase 8: eventString = \"2013Queens\"; break;\n\t\t\t\tcase 9: eventString = \"2013Yolanda\"; break;\n\t\t\t\tcase 10: eventString = \"2014Chile\"; break;\n\t\t\t\tcase 11: eventString = \"2014Hagupit\"; break;\n\t\t\t\tcase 12: eventString = \"2015Nepal\"; break;\n\t\t\t\tcase 13: eventString = \"2015Paris\"; break;\n\t\t\t\tdefault: eventString = \"2018Florida\"; \t\t\t\t\n\t\t\t\t}\n\n\t\t\t\ttrainingData = eventString;\n\t\t\t\ttrainingData += trainString;\n\t\t\t\ttrainingData += categoryString;\n\n\t\t\t\ttestData = eventString;\n\t\t\t\ttestData += testString;\n\t\t\t\ttestData += categoryString;\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tresultText = eventString;\n\t\t\t\tresultText += resultString;\n\t\t\t\tresultText += textString;\n\t\t\t\t\n\n\t\t\t\ttry {\n\t\t\t\t\tConverterUtils.DataSource loader1 = new ConverterUtils.DataSource(trainingData);\n\t\t\t\t\tConverterUtils.DataSource loader2 = new ConverterUtils.DataSource(testData);\n\n\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(resultText));\n\t\t\t\t\tInstances trainData = loader1.getDataSet();\n\t\t\t\t\ttrainData.setClassIndex(trainData.numAttributes() - 1);\n\n\t\t\t\t\tInstances testingData = loader2.getDataSet();\n\t\t\t\t\ttestingData.setClassIndex(testingData.numAttributes() - 1);\n\n\t\t\t\t\tClassifier cls1 = new NaiveBayes();\t\t\t\t\t\n\t\t\t\t\tcls1.buildClassifier(trainData);\t\t\t\n\t\t\t\t\tEvaluation eval1 = new Evaluation(trainData);\n\t\t\t\t\teval1.evaluateModel(cls1, testingData);\t\n\t\t\t\t\tbw.write(\"=== Summary of Naive Bayes ===\");\n\t\t\t\t\tbw.write(eval1.toSummaryString());\n\t\t\t\t\tbw.write(eval1.toClassDetailsString());\n\t\t\t\t\tbw.write(eval1.toMatrixString());\n\t\t\t\t\tbw.write(\"\\n\");\n\n\t\t\t\t\tthis.evalNaiveBayesList.add(eval1);\n\n\t\t\t\t\tClassifier cls2 = new SMO();\n\t\t\t\t\tcls2.buildClassifier(trainData);\n\t\t\t\t\tEvaluation eval2 = new Evaluation(trainData);\n\t\t\t\t\teval2.evaluateModel(cls2, testingData);\n\t\t\t\t\tbw.write(\"=== Summary of SMO ===\");\n\t\t\t\t\tbw.write(eval2.toSummaryString());\n\t\t\t\t\tbw.write(eval2.toClassDetailsString());\n\t\t\t\t\tbw.write(eval2.toMatrixString());\n\n\t\t\t\t\tthis.evalSMOList.add(eval2);\n\n\t\t\t\t\tbw.close();\n\t\t\t\t} catch (Exception e) {\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "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 }", "public static void main(String[] args) {\n\t\tint[] featuresRemoved = new int[]{14,15,0,3,7,8,9,13}; //removed age,education,relationship,race,sex,country\n\t\t\n\t\tCrossValidation.Allow_testSet_to_be_Appended = true;\n\t\tDataManager.SetRegex(\"?\");\n\t\tDataManager.SetSeed(0l); //debugging for deterministic random\n\t\t\n\t\tArrayList<String[]> dataSet = DataManager.ReadCSV(\"data/adult.train.5fold.csv\",false);\n\t\tdataSet = DataManager.ReplaceMissingValues(dataSet);\n\t\tDoubleMatrix M = DataManager.dataSetToMatrix(dataSet,14);\n\t\tList<DoubleMatrix> bins = DataManager.split(M, 15);\n\t\t//List<DoubleMatrix> bins = DataManager.splitFold(M, 5,true); //random via permutation debugging\n\t\t\n\t\tArrayList<String[]> testSet = DataManager.ReadCSV(\"data/adult.test.csv\",false);\n\t\ttestSet = DataManager.ReplaceMissingValues(testSet);\n\t\tDoubleMatrix test = DataManager.dataSetToMatrix(testSet,14);\n\t\tList<DoubleMatrix> testBins = DataManager.splitFold(test, 8, false);\n\t\t\n\t\t\n\t\t//initiate threads \n\t\tint threadPool = 16;\n\t\tExecutorService executor = Executors.newFixedThreadPool(threadPool);\n\t\tList<Callable<Record[]>> callable = new ArrayList<Callable<Record[]>>();\t\t\n\t\t\n\t\tlong startTime = System.currentTimeMillis(); //debugging - test for optimisation \n\t\t\n\t\t\n\t\t\n\t\t//unweighted\n\t\tSystem.out.println(\"Validating Unweighted KNN...\");\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\t\n\t\t\tDoubleMatrix Train = new DoubleMatrix(0,bins.get(0).columns);\n\t\t\tDoubleMatrix Validation = bins.get(i);\n\t\t\t\n\t\t\tfor(int j = 0; j < bins.size(); j++) {\n\t\t\t\tif(i != j) {\n\t\t\t\t\tTrain = DoubleMatrix.concatVertically(Train, bins.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//build worker thread\n\t\t\tCrossValidation fold = new CrossValidation(Train, Validation,14,featuresRemoved,40,2,false);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\t//returned statistics of each fold.\n\t\tList<Record[]> unweightedRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\t//collect all work thread values \n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\tunweightedRecords.add(recordFold.get());\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\t\n\t\n\t\tcallable.clear();\n\t\t\n\t\t\n\t\t\n\t\t//weighted\n\t\tSystem.out.println(\"Validating Weighted KNN...\");\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\tDoubleMatrix Train = new DoubleMatrix(0,bins.get(0).columns);\n\t\t\tDoubleMatrix Validation = bins.get(i);\n\t\t\t\n\t\t\tfor(int j = 0; j < bins.size(); j++) {\n\t\t\t\tif(i != j) {\n\t\t\t\t\tTrain = DoubleMatrix.concatVertically(Train, bins.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//build worker thread\n\t\t\tCrossValidation fold = new CrossValidation(Train, Validation,14,featuresRemoved,40,2,true);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\t//returned statistics of each fold.\n\t\tList<Record[]> weightedRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\t//collect all work thread values \n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\tweightedRecords.add(recordFold.get());\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\t\t\n\t\t\n\t\t\n\t\t\n\t\t//find best parameter \n\t\tint bestKNN = 0;\n\t\tdouble bestAccuracy = 0;\n\t\tboolean weighted = false;\n\t\tint validationIndex = 0;\n\t\tfor(int i = 0; i < unweightedRecords.get(0).length; i++) {\n\t\t\t\n\t\t\tint currentK = 0;\n\t\t\tdouble currentAccuracy = 0;\n\t\t\t\n\t\t\tList<Record[]> a = new ArrayList<Record[]>();\n\t\t\tfor(int j = 0; j < unweightedRecords.size(); j ++) { \n\t\t\t\ta.add(new Record[]{ unweightedRecords.get(j)[i]});\n\t\t\t\tcurrentK = unweightedRecords.get(j)[i].KNN;\n\t\t\t}\n\t\t\t\n\t\t\tint[][] m = DataManager.combineMat(a);\n\t\t\tcurrentAccuracy = DataManager.getAccuracy(m);\n\t\t\t\n\t\t\tif(currentAccuracy > bestAccuracy) {\n\t\t\t\tbestKNN = currentK;\n\t\t\t\tbestAccuracy = currentAccuracy;\n\t\t\t\tweighted = false;\n\t\t\t\tvalidationIndex = i;\n\t\t\t\tSystem.out.println(bestKNN + \" : unweighted : \" +bestAccuracy + \" : Best\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(currentK + \" : unweighted : \" + currentAccuracy);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < weightedRecords.get(0).length; i++) {\n\t\t\t\n\t\t\tint currentK = 0;\n\t\t\tdouble currentAccuracy = 0;\n\t\t\t\n\t\t\tList<Record[]> a = new ArrayList<Record[]>();\n\t\t\tfor(int j = 0; j < weightedRecords.size(); j ++) { \n\t\t\t\ta.add(new Record[]{ weightedRecords.get(j)[i]});\n\t\t\t\tcurrentK = weightedRecords.get(j)[i].KNN;\n\t\t\t}\n\t\t\t\n\t\t\tint[][] m = DataManager.combineMat(a);\n\t\t\tcurrentAccuracy = DataManager.getAccuracy(m);\n\t\t\t\n\t\t\tif(currentAccuracy >= bestAccuracy) {\n\t\t\t\tbestKNN = currentK;\n\t\t\t\tbestAccuracy = currentAccuracy;\n\t\t\t\tweighted = true;\n\t\t\t\tvalidationIndex = i;\n\t\t\t\tSystem.out.println(bestKNN + \" : weighted :\" +bestAccuracy + \" : Best\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(currentK + \" : weighted :\" + currentAccuracy);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t\n\t\tList<Record[]> bestValidation = new ArrayList<Record[]>();\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\tif(weighted) {\n\t\t\t\tbestValidation.add(new Record[]{ weightedRecords.get(i)[validationIndex]});\n\t\t\t} else {\n\t\t\t\tbestValidation.add(new Record[]{ unweightedRecords.get(i)[validationIndex]});\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Testing...\");\n\t\t\n\t\t//KNN on test set\n\t\tcallable.clear();\n\t\t\n\t\t//build worker threads\n\t\tfor(int i = 0; i < testBins.size(); i++) {\n\t\t\tCrossValidation fold = new CrossValidation(M, testBins.get(i),14,featuresRemoved,bestKNN,bestKNN,weighted);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\tList<Record[]> testRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\ttestRecords.add(recordFold.get());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tint[][] testM = DataManager.combineMat(testRecords);\n\t\tdouble testAccuracy = DataManager.getAccuracy(testM);\n\t\t//double teststd = DataManager.GetStd(testRecords);\n\t\t\n\t\t//print stuff\n\t\tSystem.out.println(bestKNN + \" : \"+ weighted + \" : \" + testAccuracy);\n\t\tSystem.out.println(testM[0][0] + \", \" + testM[0][1] +\", \" + testM[1][0] + \", \" + testM[1][1]);\n\t\t\n\t\t//delete all worker threads\n\t\texecutor.shutdownNow();\n\t\t\n\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\tlong totalTime = endTime - startTime;\n\t\tSystem.out.println(\"Run time(millisecond): \" + totalTime );\n\t\tSystem.out.println(\"Thread pool: \" + threadPool );\n\t\tSystem.out.println(\"Cores: \" + Runtime.getRuntime().availableProcessors());\n\t\t\n\t\t//prints to file\n\t\tDataManager.saveRecord(\"data/grid.results.txt\", 14, featuresRemoved,\"<=50k\", bestKNN, weighted, bestValidation, testRecords, testRecords.get(0)[0].classType, 5, totalTime, threadPool);\n\t}", "private static double[][] createTrainingMatrix(List<double[]> trainingSourceList) {\t\t\n\t\tdouble[][] trainingMatrix = new double[TRAINING_VALUE_COUNT][trainingSourceList.size()];\n\n\t\tfor(int sourceNr=0; sourceNr<trainingSourceList.size();sourceNr++) {\n\t\t\tdouble[] source = trainingSourceList.get(sourceNr);\n\t\t\tfor(int rowNr=0;rowNr<TRAINING_VALUE_COUNT;rowNr++) {\n\t\t\t\ttrainingMatrix[rowNr][sourceNr] = source[rowNr];\n\t\t\t}\n\t\t}\t\t\n\n\t\treturn trainingMatrix;\n\t}", "@Override\r\n\tpublic void train(Documents trainingDocs) {\r\n\t\t// Convert the training documents to data.\r\n\t\tdata = convertDocumentsToData(trainingDocs);\r\n\t\t// Also add the words from the source domains into the featureIndexer.\r\n\t\tfor (String featureStr : knowledge.wordCountInPerClass\r\n\t\t\t\t.keySet()) {\r\n\t\t\tfeatureIndexerAllDomains\r\n\t\t\t\t\t.addFeatureStrIfNotExistStartingFrom0(featureStr);\r\n\t\t}\r\n\r\n\t\t// Initialize array from data.\r\n\t\tclassInstanceCount = new double[2];\r\n\t\tclassInstanceCount[0] = trainingDocs.getNoOfPositiveLabels();\r\n\t\tclassInstanceCount[1] = trainingDocs.getNoOfNegativeLabels();\r\n\t\t// Initialize array from knowledge.\r\n\t\tV = featureIndexerAllDomains.size();\r\n\t\tx = new double[V][];\r\n\t\tfor (int v = 0; v < V; ++v) {\r\n\t\t\tString featureStr = featureIndexerAllDomains\r\n\t\t\t\t\t.getFeatureStrGivenFeatureId(v);\r\n\t\t\tif (knowledge.wordCountInPerClass\r\n\t\t\t\t\t.containsKey(featureStr)) {\r\n\t\t\t\tx[v] = knowledge.wordCountInPerClass\r\n\t\t\t\t\t\t.get(featureStr);\r\n\t\t\t} else {\r\n\t\t\t\t// The word only appears in the target domain.\r\n\t\t\t\tx[v] = new double[] { 0.0, 0.0 };\r\n\t\t\t}\r\n\t\t}\r\n\t\tsum_x = knowledge.countTotalWordsInPerClass;\r\n\r\n\t\tif (param.convergenceDifference != Double.MAX_VALUE) {\r\n\t\t\t// Stochastic gradient descent.\r\n\t\t\tSGDEntry();\r\n\t\t}\r\n\r\n\t\t// Check if any value in x is nan or infinity.\r\n\t\tfor (int i = 0; i < x.length; ++i) {\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][0]), \"Is Nan\");\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][1]), \"Is Nan\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][0]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][1]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t}\r\n\r\n\t\t// Update classification knowledge.\r\n\t\tknowledge = new ClassificationKnowledge();\r\n\t\t// knowledge.countDocsInPerClass = mCaseCounts;\r\n\t\t// knowledge.wordCountInPerClass =\r\n\t\t// mFeatureStrToCountsMap;\r\n\t\t// knowledge.countTotalWordsInPerClass =\r\n\t\t// mTotalCountsPerCategory;\r\n\t}", "public static List<File> splitData(String treeFileName, int foldSize) {\n ArrayList<File> tempFilePaths = new ArrayList<File>();\n Random random = new Random(100);\n for (int i = 0; i < foldSize+1; i++) {\n tempFilePaths.add(new File(String.valueOf(random.nextInt())));\n }\n URL treeResource = CommonUtils.class.getClassLoader().getResource(treeFileName);\n if (treeResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + treeFileName);\n return null;\n }\n\n URL trainResource = null;\n\n File treeFile = new File(treeResource.getPath());\n ArrayList<String> tempAttributeList = new ArrayList<String>();\n try {\n FileReader treeFileInputStream = new FileReader(treeFile);\n BufferedReader bufferedReader = new BufferedReader(treeFileInputStream);\n String line = null;\n String line1 = null;\n int count = 0;\n try {\n while ((line = bufferedReader.readLine()) != null) {\n if (count == 0) {\n trainResource = CommonUtils.class.getClassLoader().getResource(line);\n if (trainResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + line);\n return null;\n }\n FileReader fileReader = new FileReader(new File(trainResource.getPath()));\n BufferedReader bufferedReader1 = new BufferedReader(fileReader);\n int count1 = 0;\n while ((line1 = bufferedReader1.readLine()) != null) {\n if (count1 == 0) {\n BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tempFilePaths.get(0)));\n bufferedWriter.write(line1);\n bufferedWriter.write(\"\\n\");\n bufferedWriter.flush();\n bufferedWriter.close();\n }else {\n tempAttributeList.add(line1);\n }\n count1++;\n }\n }\n count++;\n logger.info(line);\n }\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n // now we randomly write data\n int fileIndex = 1;\n while(tempAttributeList.size()!=0) {\n int index0 = new Random(100).nextInt();\n if(index0<0){\n index0 = index0 * -1;\n }\n String s = tempAttributeList.get(index0 % tempAttributeList.size());\n\n try {\n BufferedWriter bufferedWriter1 = new BufferedWriter(new FileWriter(tempFilePaths.get(fileIndex),true));\n bufferedWriter1.write(s);\n bufferedWriter1.write(\"\\n\");\n bufferedWriter1.flush();\n bufferedWriter1.close();\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n tempAttributeList.remove(s);\n if(fileIndex==foldSize){\n fileIndex=1;\n }else{\n fileIndex++;\n }\n }\n return tempFilePaths;\n }", "public Instances getTraining()\n {\n return new Instances(mTraining);\n }", "List<Training> obtainAllTrainings();", "public List<HashMap<Integer,AttributeInfo>> generateTrainingSetDataseAttributes(Dataset dataset, Properties properties) throws Exception {\n List<HashMap<Integer,AttributeInfo>> candidateAttributesList = new ArrayList<>();\n String[] classifiers = properties.getProperty(\"classifiersForMLAttributesGeneration\").split(\",\");\n\n //obtaining the attributes for the dataset itself is straightforward\n DatasetBasedAttributes dba = new DatasetBasedAttributes();\n for (String classifier : classifiers) {\n\n //For each dataset and classifier combination, we need to get the results on the \"original\" dataset so we can later compare\n Evaluation evaluationResults = runClassifier(classifier, dataset.generateSet(true), dataset.generateSet(false), properties);\n double originalAuc = CalculateAUC(evaluationResults, dataset);\n\n //Generate the dataset attributes\n HashMap<Integer, AttributeInfo> datasetAttributes = dba.getDatasetBasedFeatures(dataset, classifier, properties);\n\n //Add the identifier of the classifier that was used\n\n AttributeInfo classifierAttribute = new AttributeInfo(\"Classifier\", Column.columnType.Discrete, getClassifierIndex(classifier), 3);\n datasetAttributes.put(datasetAttributes.size(), classifierAttribute);\n\n\n //now we need to generate the candidate attributes and evaluate them. This requires a few preliminary steps:\n // 1) Replicate the dataset and create the discretized features and add them to the dataset\n OperatorsAssignmentsManager oam = new OperatorsAssignmentsManager(properties);\n List<Operator> unaryOperators = oam.getUnaryOperatorsList();\n //The unary operators need to be evaluated like all other operator assignments (i.e. attribtues generation)\n List<OperatorAssignment> unaryOperatorAssignments = oam.getOperatorAssignments(dataset, null, unaryOperators, Integer.parseInt(properties.getProperty(\"maxNumOfAttsInOperatorSource\")));\n Dataset replicatedDataset = generateDatasetReplicaWithDiscretizedAttributes(dataset, unaryOperatorAssignments, oam);\n\n // 2) Obtain all other operator assignments (non-unary). IMPORTANT: this is applied on the REPLICATED dataset so we can take advantage of the discretized features\n List<Operator> nonUnaryOperators = oam.getNonUnaryOperatorsList();\n List<OperatorAssignment> nonUnaryOperatorAssignments = oam.getOperatorAssignments(replicatedDataset, null, nonUnaryOperators, Integer.parseInt(properties.getProperty(\"maxNumOfAttsInOperatorSource\")));\n\n // 3) Generate the candidate attribute and generate its attributes\n nonUnaryOperatorAssignments.addAll(unaryOperatorAssignments);\n\n //oaList.parallelStream().forEach(oa -> {\n int counter = 0;\n //for (OperatorAssignment oa : nonUnaryOperatorAssignments) {\n ReentrantLock wrapperResultsLock = new ReentrantLock();\n nonUnaryOperatorAssignments.parallelStream().forEach(oa -> {\n try {\n OperatorsAssignmentsManager oam1 = new OperatorsAssignmentsManager(properties);\n Dataset datasetReplica = dataset.replicateDataset();\n ColumnInfo candidateAttribute = null;\n try {\n candidateAttribute = oam1.generateColumn(datasetReplica, oa, true);\n }\n catch (Exception ex) {\n candidateAttribute = oam1.generateColumn(datasetReplica, oa, true);\n }\n\n\n OperatorAssignmentBasedAttributes oaba = new OperatorAssignmentBasedAttributes();\n HashMap<Integer, AttributeInfo> candidateAttributes = oaba.getOperatorAssignmentBasedAttributes(dataset, oa, candidateAttribute, properties);\n\n datasetReplica.addColumn(candidateAttribute);\n Evaluation evaluationResults1 = runClassifier(classifier, datasetReplica.generateSet(true), datasetReplica.generateSet(false), properties);\n\n double auc = CalculateAUC(evaluationResults1, datasetReplica);\n double deltaAuc = auc - originalAuc;\n AttributeInfo classAttrubute;\n if (deltaAuc > 0.01) {\n classAttrubute = new AttributeInfo(\"classAttribute\", Column.columnType.Discrete, 1,2);\n System.out.println(\"found positive match\");\n } else {\n classAttrubute = new AttributeInfo(\"classAttribute\", Column.columnType.Discrete, 0,2);\n }\n\n //finally, we need to add the dataset attribtues and the class attribute\n for (AttributeInfo datasetAttInfo : datasetAttributes.values()) {\n candidateAttributes.put(candidateAttributes.size(), datasetAttInfo);\n }\n\n candidateAttributes.put(candidateAttributes.size(), classAttrubute);\n wrapperResultsLock.lock();\n candidateAttributesList.add(candidateAttributes);\n wrapperResultsLock.unlock();\n }\n catch (Exception ex) {\n System.out.println(\"Error in ML features generation : \" + oa.getName() + \" : \" + ex.getMessage());\n }\n });\n }\n\n return candidateAttributesList;\n }", "public void trainingPreprocessing() {\n neuralNetAndDataSet = new NeuralNetAndDataSet(neuralNetwork, trainingSet);\n trainingController = new TrainingController(neuralNetAndDataSet);\n neuralNetwork.getLearningRule().addListener(this);\n trainingController.setLmsParams(0.7, 0.01, 0);\n LMS learningRule = (LMS) this.neuralNetAndDataSet.getNetwork().getLearningRule();\n if (learningRule instanceof MomentumBackpropagation) {\n ((MomentumBackpropagation) learningRule).setMomentum(0.2);\n }\n }", "public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void trainPerceptrons(){\n double activationValues[] = new double[4];\n for(Image image:asciiReader.getTrainingImages()){\n for (int j = 0 ; j < activationValues.length; j++){\n activationValues[j] = activationFunction\n .apply(sumWeights(j,image));\n }\n adjustWeights(activationValues,image);\n }\n }", "private DataSet nextDataSet(int num) throws IOException {\n\t\tList<String> reviews = new ArrayList<String>();\n\t\tboolean[] positive = new boolean[num];\n\t\tfor( int i=0; i<num && cursor<totalExamples(); i++ ){\n\t\t\tif(cursor % 2 == 0){\n\t\t\t\t//Load positive review\n\t\t\t\tint posReviewNumber = cursor / 2;\n\t\t\t\tif(posReviewNumber<positiveFiles.size()){\n\t\t\t\t\tString review = positiveFiles.get(posReviewNumber).trim();\n\t\t\t\t\treviews.add(review);\n\t\t\t\t\tpositive[i] = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//Load negative review\n\t\t\t\tint negReviewNumber = cursor / 2;\t\t\n\t\t\t\tif(negReviewNumber<negativeFiles.size()){\n\t\t\t\t\tString review = negativeFiles.get(negReviewNumber).trim();\n\t\t\t\t\treviews.add(review);\n\t\t\t\t\tpositive[i] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcursor++;\n\t\t}\n\n\t\t//Second: tokenize reviews and filter out unknown words\n\t\tList<List<String>> allTokens = new ArrayList<List<String>>();\n\t\tint maxLength = 0;\n\n\t\tfor(String s : reviews){\n\t\t\tif(!tagMap.containsKey(s)){\n\t\t\t\tList<TaggedWord> tagText = StanfordNLPUtil.getTagText(s);\n\t\t\t\ttagMap.put(s, tagText);\t\t\t\t\t\n\t\t\t}\n\t\t\tList<TaggedWord> tokens = tagMap.get(s);\n\n\t\t\tList<String> tokensFiltered = new ArrayList<>();\n\t\t\tfor(TaggedWord t : tokens){\n\t\t\t\tif(wordVectors.hasWord(t.word().toLowerCase())) {\n\t\t\t\t\ttokensFiltered.add(t.word().toLowerCase().trim());\n\t\t\t\t}\n\t\t\t}\n\t\t\tallTokens.add(tokensFiltered);\n\t\t\tmaxLength = Math.max(maxLength, tokensFiltered.size());\n\t\t}\n\t\t//If longest review exceeds 'truncateLength': only take the first 'truncateLength' words\n\t\t//if(maxLength > truncateLength) \n\t\tmaxLength = truncateLength;\n\n\t\t//Create data for training\n\t\t//Here: we have reviews.size() examples of varying lengths\n\t\t//\t\tINDArray features = Nd4j.create(reviews.size(), vectorSize, maxLength);\n\t\tINDArray features = Nd4j.create(reviews.size(), maxLength * vectorSize);\n\n\t\t//\t\tINDArray feature = Nd4j.create(reviews.size(), maxLength);\n\t\t//\t\tint rj = feature.rows();\n\n\t\tINDArray labels = Nd4j.create(reviews.size(), 2); //Two labels: positive or negative\n\t\t//Because we are dealing with reviews of different lengths and only one output at the final time step: use padding arrays\n\t\t//Mask arrays contain 1 if data is present at that time step for that example, or 0 if data is just padding\n\t\t//\tINDArray featuresMask =\n\t\t//\tNd4j.zeros(reviews.size(), maxLength);\n\t\t//INDArray labelsMask = Nd4j.zeros(reviews.size(), maxLength);\n\n\t\t//int[] temp = new int[2];\n\t\tfor( int i=0; i<reviews.size(); i++ ){\n\t\t\tList<String> tokens = allTokens.get(i);\n\t\t\t//temp[0] = i;\n\t\t\tINDArray overallVector = null;\n\n\t\t\t//Get word vectors for each word in review, and put them in the training data\n\t\t\tfor( int j=0; j<tokens.size() && j<maxLength; j++ ){\n\t\t\t\tString token = tokens.get(j).trim();\n\t\t\t\tINDArray vector = wordVectors.getWordVectorMatrix(token);\n\n\t\t\t\tif(overallVector == null){\n\t\t\t\t\toverallVector = vector;\n\t\t\t\t} else {\n\t\t\t\t\toverallVector = Nd4j.concat(1, overallVector, vector);\t\n\t\t\t\t}\n\n\t\t\t\t//\t\tint rr = vector.rows();\n\t\t\t\t//\tint cc = vector.columns();\n\n\t\t\t\t//temp[1] = j;\n\t\t\t\t//featuresMask.putScalar(temp, 1.0); //Word is present (not padding) for this example + time step -> 1.0 in features mask\n\t\t\t}\n\t\t\tif(overallVector==null){\n\t\t\t\toverallVector = Nd4j.zeros(maxLength * vectorSize);\n\t\t\t}\t\t\t\n\t\t\tint columns = overallVector.columns();\n\t\t\tif(columns!=maxLength * vectorSize){\n\t\t\t\tint diff = (maxLength * vectorSize) - columns;\n\t\t\t\tINDArray zeros = Nd4j.zeros(diff);\n\t\t\t\toverallVector = Nd4j.concat(1, overallVector, zeros);\t\t\t\t\n\t\t\t}\n\t\t\tfeatures.putRow(i, overallVector);\n\t\t//\tSystem.out.println();\n\t\t\t//int rows = features.rows();\n\t\t\t//int columns = features.columns();\n\n\t\t\tint idx = (positive[i] ? 0 : 1);\n\n\t\t\t//labels.putScalar(new int[]{i}, idx); //Set label: [0,1] for negative, [1,0] for positive\n\t\t\tdouble[] label = null;\n\n\t\t\tif(idx == 0){\n\t\t\t\tlabel = new double[2];\n\t\t\t\tlabel[0] = 0;\n\t\t\t\tlabel[1] = 1;\n\t\t\t} else if(idx == 1) {\n\t\t\t\tlabel = new double[2];\n\t\t\t\tlabel[0] = 1;\n\t\t\t\tlabel[1] = 0;\t\t\t\t\n\t\t\t}\n\t\t\tINDArray labInd = Nd4j.create(label);\n\t\t\tlabels.putRow(i, labInd);\n\t\t\t//labelsMask.putScalar(new int[]{i,lastIdx-1},1.0); //Specify that an output exists at the final time step for this example\n\t\t}\n\n\t\treturn new DataSet(features,labels);\n\t}", "public static void main(String[] args) throws Exception {\n DataSet houseVotes = DataParser.parseData(HouseVotes.filename, HouseVotes.columnNames, HouseVotes.dataTypes, HouseVotes.ignoreColumns, HouseVotes.classColumn, HouseVotes.discretizeColumns);\n DataSet breastCancer = DataParser.parseData(BreastCancer.filename, BreastCancer.columnNames, BreastCancer.dataTypes, BreastCancer.ignoreColumns, BreastCancer.classColumn, HouseVotes.discretizeColumns);\n DataSet glass = DataParser.parseData(Glass.filename, Glass.columnNames, Glass.dataTypes, Glass.ignoreColumns, Glass.classColumn, Glass.discretizeColumns);\n DataSet iris = DataParser.parseData(Iris.filename, Iris.columnNames, Iris.dataTypes, Iris.ignoreColumns, Iris.classColumn, Iris.discretizeColumns);\n DataSet soybean = DataParser.parseData(Soybean.filename, Soybean.columnNames, Soybean.dataTypes, Soybean.ignoreColumns, Soybean.classColumn, Soybean.discretizeColumns);\n \n /*\n * The contents of the DataSet are not always random.\n * You can shuffle them using Collections.shuffle()\n */\n \n Collections.shuffle(houseVotes);\n Collections.shuffle(breastCancer);\n Collections.shuffle(glass);\n Collections.shuffle(iris);\n Collections.shuffle(soybean);\n /*\n * Lastly, you want to split the data into a regular dataset and a testing set.\n * DataSet has a function for this, since it gets a little weird.\n * This grabs 10% of the data in the dataset and sets pulls it out to make the testing set.\n * This also means that the remaining 90% in DataSet can serve as our training set.\n */\n\n DataSet houseVotesTestingSet = houseVotes.getTestingSet(.1);\n DataSet breastCancerTestingSet = breastCancer.getTestingSet(.1);\n DataSet glassTestingSet = glass.getTestingSet(.1);\n DataSet irisTestingSet = iris.getTestingSet(.1);\n DataSet soybeanTestingSet = soybean.getTestingSet(.1);\n \n //KNN\n //House Votes\n System.out.println(HouseVotes.class.getSimpleName());\n KNN knn = new KNN(houseVotes, houseVotesTestingSet, HouseVotes.classColumn, 3);\n String[] knnHouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n knnHouseVotes[i] = knn.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(knnHouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnHouseVotes[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnHouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n \n //Breast Cancer\n System.out.println(BreastCancer.class.getSimpleName());\n knn = new KNN(breastCancer, breastCancerTestingSet, BreastCancer.classColumn, 3);\n String[] knnBreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n knnBreastCancer[i] = knn.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(knnBreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnBreastCancer[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnBreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n \n //Glass\n System.out.println(Glass.class.getSimpleName());\n knn = new KNN(glass, glassTestingSet, Glass.classColumn, 3);\n String[] knnGlass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n knnGlass[i] = knn.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(knnGlass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnGlass[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnGlass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n \n //Iris\n System.out.println(Iris.class.getSimpleName());\n knn = new KNN(iris, irisTestingSet, Iris.classColumn, 3);\n String[] knnIris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n knnIris[i] = knn.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(knnIris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnIris[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnIris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n \n //Soybean\n System.out.println(Soybean.class.getSimpleName());\n knn = new KNN(soybean, soybeanTestingSet, Soybean.classColumn, 3);\n String[] knnSoybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n knnSoybean[i] = knn.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(knnSoybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnSoybean[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnSoybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n \n \n /*\n * Lets setup ID3:\n * DataSet, TestSet, column with the class categorization. (republican, democrat in this case)\n */\n\n System.out.println(HouseVotes.class.getSimpleName());\n ID3 id3 = new ID3(houseVotes, houseVotesTestingSet, HouseVotes.classColumn);\n String[] id3HouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n id3HouseVotes[i] = id3.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(id3HouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3HouseVotes[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3HouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n\n System.out.println(BreastCancer.class.getSimpleName());\n id3 = new ID3(breastCancer, breastCancerTestingSet, BreastCancer.classColumn);\n String[] id3BreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n id3BreastCancer[i] = id3.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(id3BreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3BreastCancer[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3BreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Glass.class.getSimpleName());\n id3 = new ID3(glass, glassTestingSet, Glass.classColumn);\n String[] id3Glass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n id3Glass[i] = id3.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(id3Glass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Glass[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Glass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Iris.class.getSimpleName());\n id3 = new ID3(iris, irisTestingSet, Iris.classColumn);\n String[] id3Iris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n id3Iris[i] = id3.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(id3Iris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Iris[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Iris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Soybean.class.getSimpleName());\n id3 = new ID3(soybean, soybeanTestingSet, Soybean.classColumn);\n String[] id3Soybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n id3Soybean[i] = id3.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(id3Soybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Soybean[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Soybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n }", "public void saveTrainingDataToFileHybridSampling1() throws Exception {\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\")); // stop word removal given in research paper\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n //up sampling using SMOTE\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n //downsampling using ?? \r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n if (otherArticlesCount == 4872) {\r\n break;\r\n }\r\n }\r\n if (otherArticlesCount == 4872) {\r\n break;\r\n }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n /**\r\n * Resamples a dataset by applying the Synthetic Minority Oversampling\r\n * TEchnique (SMOTE)\r\n * http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume16/chawla02a-html/node6.html\r\n * http://weka.sourceforge.net/doc.packages/SMOTE/weka/filters/supervised/instance/SMOTE.html \r\n *\r\n */\r\n SMOTE s = new SMOTE();\r\n s.setInputFormat(dataFiltered);\r\n // Specifies percentage of SMOTE instances to create.\r\n s.setPercentage(300.0);//464\r\n Instances dataBalanced = Filter.useFilter(dataFiltered, s);\r\n\r\n Random r = new Random();\r\n dataBalanced.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataBalanced);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataHybridRandom.arff\"));\r\n saver.writeBatch();\r\n }", "public void train(Collection<TrainingEntry<Login>> trainingDataSet) throws TrainingException {\n if (trainingDataSet.isEmpty()) return;\n try {\n final DataSet dataSet = toDataSet(trainingDataSet);\n normalizer = new NormalizerStandardize();\n normalizer.fit(dataSet);\n normalizer.transform(dataSet);\n final DataSetIterator dataSetIterator = new ExistingDataSetIterator(dataSet);\n final MultiLayerConfiguration configuration = new NeuralNetConfiguration.Builder()\n .seed(6)\n .iterations(1)\n .activation(\"tanh\")\n .weightInit(WeightInit.XAVIER)\n .learningRate(0.1)\n .regularization(true).l2(1e-4)\n .list()\n .layer(0, new DenseLayer.Builder()\n .nIn(getNumberOfInputFeatures(trainingDataSet))\n .nOut(9)\n .build())\n .layer(1, new DenseLayer.Builder()\n .nIn(9)\n .nOut(9)\n .build())\n .layer(2, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .activation(\"softmax\")\n .nIn(9)\n .nOut(NUM_CATEGORIES).build())\n .backprop(true).pretrain(false)\n .build();\n network = new MultiLayerNetwork(configuration);\n final EarlyStoppingConfiguration esConf = new EarlyStoppingConfiguration.Builder()\n .epochTerminationConditions(new MaxEpochsTerminationCondition(20))\n .iterationTerminationConditions(new MaxTimeIterationTerminationCondition(20, TimeUnit.MINUTES))\n .scoreCalculator(new DataSetLossCalculator(dataSetIterator, true))\n .evaluateEveryNEpochs(1)\n .modelSaver(new InMemoryModelSaver())\n .build();\n final EarlyStoppingTrainer trainer = new EarlyStoppingTrainer(esConf, network, dataSetIterator);\n final EarlyStoppingResult<MultiLayerNetwork> result = trainer.fit();\n network = result.getBestModel();\n } catch (final Exception e) {\n throw new TrainingException(e);\n }\n }", "public DecisionLearningTree(String training, String test) {\n\t\ttrainingFile = training;\n\t\ttestFile = test;\n\t\treadTrainingFile();\n\t\troot = readDataFile();\n\t}", "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 void populateMaps() {\n\t\t//populate the conversion map.\n\t\tconvertMap.put(SPACE,(byte)0);\n\t\tconvertMap.put(VERTICAL,(byte)1);\n\t\tconvertMap.put(HORIZONTAL,(byte)2);\n\n\t\t//build the hashed numbers based on the training input. 1-9\n\t\tString trainingBulk[] = new String[]{train1,train2,train3,\"\"};\n\t\tbyte[][] trainer = Transform(trainingBulk);\n\t\tfor(int i=0; i < 9 ;++i) {\n\t\t\tint val = hashDigit(trainer, i);\n\t\t\tnumbers.put(val,i+1);\n\t\t}\n\t\t//train Zero\n\t\ttrainingBulk = new String[]{trainz1,trainz2,trainz3,\"\"};\n\t\tint zeroVal = hashDigit(Transform(trainingBulk), 0);\n\t\tnumbers.put(zeroVal,0);\n\n\n\t}", "@Override\n public void run() {\n this.mdc.insertLog(\"#1 Memecah Dataset\\n\");\n //1. Split Dataset\n boolean isSplitted = false;\n try {\n List<Object> split_mat = this.dataset.split(this.userMap,this.recipeMap);\n this.trainM = (TrainMatrix) split_mat.remove(0);\n this.testM = (TestMatrix) split_mat.remove(0);\n isSplitted = true;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (isSplitted) {\n this.mdc.insertLog(\"Berhasil memecah dataset.\\n\");\n } else {\n this.mdc.insertLog(\"Error: Terjadi kesalahan dalam memecah dataset. Lihat riwayat error untuk lebih detail.\\n\");\n System.exit(1);\n return;\n }\n }\n\n this.mdc.insertLog(\"#2 Inisialisasi Matriks Faktor\\n\");\n //2. Initialize Matrix Factor \n boolean initializeFactor = false;\n FactorMatrix userFactor = null;\n FactorMatrix userFactor_2 = null;\n FactorMatrix recipeFactor = null;\n FactorMatrix ingredientFactor = null;\n FactorMatrix recipeIngredientsMap = null;\n try {\n // user factor = m x f\n userFactor = new FactorMatrix(this.trainM.getRowLength(), utils.getLatentSize(), FactorType.USER);\n // recipe factor = n x f\n recipeFactor = new FactorMatrix(this.trainM.getColLength(), utils.getLatentSize(), FactorType.RECIPES);\n // ingredient factor = o x f\n ingredientFactor = new FactorMatrix(this.ingredients.size(), utils.getLatentSize(), FactorType.INGREDIENTS);\n // recipe x ingredient map matrix = n x o (mask matrix 1/0)\n recipeIngredientsMap = new FactorMatrix(this.trainM.getColLength(),\n this.ingredients.size(),\n this.recipes,\n this.recipeMap,\n this.ingredientMap);\n userFactor_2 = new FactorMatrix(userFactor);\n initializeFactor = true;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (initializeFactor) {\n this.mdc.insertLog(\"Berhasil menginisialisasi faktor matriks.\\n\");\n } else {\n this.mdc.insertLog(\"Error: Terjadi kesalahan dalam proses inisialisasi. Lihat riwayat error untuk lebih detail.\\n\");\n System.exit(1);\n return;\n }\n }\n \n //3. entering loop \n //loop a thousand time or break if objective value less than MIN_OBJECTIVE_VAL\n boolean firstMethodOptimization = false; \n boolean secondMethodOptimization = false;\n double objFuncPrev_1 = 0.0; \n double objFuncPrev_2 = 0.0;\n String[] rmseRecord1 = new String[MAX_LOOP];\n String[] rmseRecord2 = new String[MAX_LOOP];\n String[] objValueRecord1 = new String[MAX_LOOP];\n String[] objValueRecord2 = new String[MAX_LOOP];\n double[][] bestModel1 = null;\n double[][] bestModel2 = null;\n \n this.mdc.insertLog(\"#3.1 Memasuki iterasi untuk optimisasi model matriks faktor pertama.\\n\"\n + \"# Detail Proses No. 1:\\n\"\n + \"# Maksimal Iterasi: \" + MAX_LOOP + \"\\n\"\n + \"# Metode: Faktorisasi dengan dua buah matriks faktor, faktor Pengguna & Resep Makanan.\\n\"\n );\n long start = System.currentTimeMillis(); \n \n try{\n double max_value = Double.MAX_VALUE;\n int loop = MAX_LOOP;\n while(loop-->0){\n if(this.learningType > 0) this.utils.setLearningRate(1.0/((MAX_LOOP-loop)*1.0)); //iteratively \n \n double[][] currPrediction = userFactor.multiply(recipeFactor.transpose());\n double objectiveValue = utils.objectiveFunction_m1(\n userFactor,\n recipeFactor,\n this.dataset.getTrainPair()\n );\n \n double rmse = this.utils.rmse(this.dataset.getTrainPair(), currPrediction, trainM.getEntry(), 0);\n if(max_value > rmse){\n max_value = rmse;\n bestModel1 = currPrediction;\n }\n \n rmseRecord1[MAX_LOOP-1-loop] = String.format(\"%.3f\",rmse);\n objValueRecord1[MAX_LOOP-1-loop] = String.format(\"%.3f\",objectiveValue);\n \n if (Math.abs(objFuncPrev_1 - objectiveValue) <= 0.0001) break;\n else if(Double.isNaN(objectiveValue)) throw new RuntimeException(\"Objective Function value is NaN\");\n else{\n //do A-GD\n objFuncPrev_1 = objectiveValue;\n utils.alternatingGradientDescent_m1(\n userFactor,\n recipeFactor,\n this.dataset.getTrainPair()\n );\n } \n }\n firstMethodOptimization = true;\n } catch(Exception e){\n e.printStackTrace();\n } finally {\n if(firstMethodOptimization) this.mdc.insertLog(\"Proses optimisasi metode pertama selesai\\n\");\n else{ \n this.mdc.insertLog(\"Error: Terjadi kesalahan dalam proses faktorisasi. Lihat riwayat error untuk lebih detail.\\n\");\n System.exit(1);\n return;\n }\n }\n long elapsedTime_1 = System.currentTimeMillis() - start;\n \n \n this.mdc.insertLog(\"#3.2 Memasuki iterasi untuk optimisasi model matriks faktor kedua.\\n\"\n + \"# Detail Proses No. 2:\\n\"\n + \"# Maksimal Iterasi: \" + MAX_LOOP + \"\\n\"\n + \"# Metode: Faktorisasi dengan dua buah matriks faktor, faktor Pengguna & Bahan Makanan.\\n\"\n + \" Serta memanfaatkan matriks biner yang memetakan resep & bahan makanan.\\n\"\n );\n start = System.currentTimeMillis(); \n try {\n double max_value = Double.MAX_VALUE;\n int loop = MAX_LOOP;\n while (loop-- > 0) {\n if(this.learningType > 0) this.utils.setLearningRate(1.0/((MAX_LOOP-loop)*1.0)); //iteratively \n double[][] currPrediction = MatrixUtil.multiplyWithTransposing(\n MatrixUtil.multiplyWithTransposing(userFactor_2.getEntry(), ingredientFactor.getEntry(), 1),\n recipeIngredientsMap.getEntry(),\n 1); \n \n double objectiveValue = utils.objectiveFunction_m2(\n currPrediction,\n userFactor_2,\n ingredientFactor,\n this.dataset.getTrainPair()\n );\n \n double rmse = utils.rmse(this.dataset.getTrainPair(), currPrediction, this.trainM.getEntry(), 1);\n \n if(max_value > rmse){\n max_value = rmse;\n bestModel2 = currPrediction;\n }\n \n objValueRecord2[MAX_LOOP-1-loop] = String.format(\"%.3f\",objectiveValue);\n rmseRecord2[MAX_LOOP-1-loop] = String.format(\"%.3f\",rmse);\n if (Math.abs(objFuncPrev_2 - objectiveValue) <= 0.0001) {\n break;\n } else if (Double.isNaN(objectiveValue)) {\n throw new RuntimeException(\"Objective Function value is NaN\");\n } else {\n //do A-GD\n utils.alternatingGradientDescent_m2(\n currPrediction,\n userFactor_2,\n ingredientFactor,\n recipeIngredientsMap,\n this.dataset.getTrainPair()\n );\n objFuncPrev_2 = objectiveValue;\n }\n }\n secondMethodOptimization = true;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (secondMethodOptimization) {\n this.mdc.insertLog(\"Proses optimisasi metode kedua selesai.\\n\");\n } else {\n this.mdc.insertLog(\"Error: Terjadi kesalahan dalam proses faktorisasi. Lihat riwayat error untuk lebih detail.\\n\");\n System.exit(1);\n return;\n }\n }\n long elapsedTime_2 = System.currentTimeMillis() - start;\n \n this.firstMethodRes = bestModel1;\n this.secondMethodRes = bestModel2;\n \n double rmse_1_test = utils.rmse(\n this.dataset.getTestPair(),\n firstMethodRes,\n this.testM.getEntry(),\n 0\n );\n \n double rmse_1_train = utils.rmse(\n this.dataset.getTrainPair(),\n firstMethodRes,\n this.trainM.getEntry(),\n 0\n );\n \n double rmse_1_data = utils.rmse(\n this.dataset.getDataPair(),\n firstMethodRes,\n this.dataset.getEntry(),\n 0\n );\n \n double rmse_2_test = utils.rmse(\n this.dataset.getTestPair(),\n secondMethodRes,\n this.testM.getEntry(),\n 1\n );\n \n double rmse_2_train = utils.rmse(\n this.dataset.getTrainPair(),\n secondMethodRes,\n this.trainM.getEntry(),\n 1\n );\n \n double rmse_2_data = utils.rmse(\n this.dataset.getDataPair(),\n secondMethodRes,\n this.dataset.getEntry(),\n 1\n );\n \n this.mdc.insertLog(\"Hasil RMSE:\\n\"\n + \"############################\\n\"\n + \"# Metode Faktorisasi Pertama\\n\"\n + String.format(\"# RMSE (Test Set) = %.3f\\n\",rmse_1_test)\n + String.format(\"# RMSE (Train Set) = %.3f\\n\",rmse_1_train)\n + String.format(\"# RMSE (Data Set) = %.3f\\n\",rmse_1_data)\n + String.format(\"# Waktu Berjalan: %.3fs\\n\", elapsedTime_1/1000F)\n + \"############################\\n\"\n + \"\\n\"\n + \"############################\\n\"\n + \"# SECOND OPTIMIZATION METHOD\\n\"\n + String.format(\"# RMSE (Test Set) = %.5f\\n\",rmse_2_test)\n + String.format(\"# RMSE (Train Set) = %.5f\\n\",rmse_2_train)\n + String.format(\"# RMSE (Data Set) = %.5f\\n\",rmse_2_data)\n + String.format(\"# Waktu Berjalan: %.3fs\\n\", elapsedTime_2/1000F)\n + \"############################\\n\"\n + \"\\n\"\n + \"Seluruh proeses faktorisasi telah selesai.\\n\");\n }", "static public List<Pair<String, List<Stroke>>> generateTrainingPairs() {\n\t\tList<String> refFiles = new ArrayList<String>();\n\n\t\t// list of files containing actual stroke data points\n\t\tList<String> dataFiles = new ArrayList<String>();\n\n\t\tString[] dirs = FileUtil.subDirectoryNames(TRAINING_DATA_SET_DIR\n\t\t\t\t+ \"/ref\");\n\n\t\tfor (String dir : dirs) {\n\t\t\tString[] files = FileUtil\n\t\t\t\t\t.fileNamesInDirectory(TRAINING_DATA_SET_DIR + \"/ref/\" + dir);\n\t\t\tfor (String file : files) {\n\t\t\t\trefFiles.add(TRAINING_DATA_SET_DIR + \"/ref/\" + dir + \"/\" + file);\n\t\t\t\tdataFiles.add(TRAINING_DATA_SET_DIR + \"/data/\" + dir + \"/\"\n\t\t\t\t\t\t+ file);\n\t\t\t}\n\t\t}\n\n\t\treturn generatePairs(refFiles, dataFiles);\n\t}", "public void train(int n_epochs) {\n TrainModel train_model = null;\n\n int lenW = vocabulary.length;\n int W = 3 * lenW + 3;\n\n // randomly initialize U_Ot, values are randomly selected between -0.1 to 0.1;\n double[][] U_Ot = new double[D][W];\n\n // randomly initialize U_R, values are randomly selected between -0.1 and 0.1\n double[][] U_R = new double[D][W];\n\n double prev_err = 0D;\n for (int epoch = 0; epoch < n_epochs; epoch++) {\n double total_error = 0D;\n int n_wrong = 0;\n\n for (int i = 0; i < train_lines.size(); i++) {\n Instance line = train_lines.get(i);\n if (\"q\".equals(line.type)) { // indicates question\n List<Integer> refs = line.refs; // Indexing from 1\n List<Integer> f = refs.stream()\n .map(ref -> ref-1)\n .collect(Collectors.toList()); // Indexing from 0\n int id = line.ID - 1; // Indexing from 0\n\n // all indices from\n List<Integer> indices = range(i-id, i+1);\n List<double[]> memory_list = indices.stream()\n .map(idx -> L_train[idx])\n .collect(Collectors.toList());\n\n\n if (train_model == null) {\n train_model = new TrainModel(lenW, f.size());\n }\n\n List<Integer> m = f;\n // TODO\n List<Integer> mm = new ArrayList<>(); //TODO\n for (int j = 0; j < f.size(); j++) {\n mm.add(O_t(\n newM,\n memory_list\n ));\n }\n\n double err = train_model(H.get(\"answer\"),\n gamma, memory_list, V, id, ???)[0];\n total_error += err;\n System.out.println(\"epoch: \" + epoch + \"\\terr: \" + (total_error / train_lines.size()));\n }\n }\n }\n }", "public org.apache.spark.mllib.clustering.KMeansModel train (org.apache.spark.rdd.RDD<org.apache.spark.mllib.linalg.Vector> data, int k, int maxIterations, int runs) { throw new RuntimeException(); }", "private int[] prepareSplit(String sampleFile, String featureDefFile, double percentTrain, boolean normalize, List<RankList> trainingData, List<RankList> testData) {\n/* 1430 */ List<RankList> data = readInput(sampleFile);\n/* */ \n/* */ \n/* 1433 */ int[] features = readFeature(featureDefFile);\n/* */ \n/* */ \n/* 1436 */ if (features == null) {\n/* 1437 */ features = FeatureManager.getFeatureFromSampleVector(data);\n/* */ }\n/* 1439 */ if (normalize) {\n/* 1440 */ normalize(data, features);\n/* */ }\n/* 1442 */ FeatureManager.prepareSplit(data, percentTrain, trainingData, testData);\n/* 1443 */ return features;\n/* */ }", "public void train ()\t{\t}", "public void train() throws Exception;", "private void initializationParameters(int numberOfPartitions){\n int tempNumber = numberOfPartitions * 2 + 1;\n ksi = new int[tempNumber];\n ksi[0] = NUMOFTESTCASES;\n eta = new int[numberOfPartitions];\n Y = new int[numberOfPartitions];\n d = 2;\n p = new double[numberOfPartitions];\n for (int i = 0; i < numberOfPartitions; i++) {\n p[i] = 1.0 / numberOfPartitions ;\n }\n }", "private void trainNetwork(long iterations) {\n\t\ttrainer.startTraining(network, iterations);\r\n\r\n\t}", "public void buildClassifier(Instances data) throws Exception {\n\n // can classifier handle the data?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(data);\n data.deleteWithMissingClass();\n \n /* initialize the classifier */\n\n m_Train = new Instances(data, 0);\n m_Exemplars = null;\n m_ExemplarsByClass = new Exemplar[m_Train.numClasses()];\n for(int i = 0; i < m_Train.numClasses(); i++){\n m_ExemplarsByClass[i] = null;\n }\n m_MaxArray = new double[m_Train.numAttributes()];\n m_MinArray = new double[m_Train.numAttributes()];\n for(int i = 0; i < m_Train.numAttributes(); i++){\n m_MinArray[i] = Double.POSITIVE_INFINITY;\n m_MaxArray[i] = Double.NEGATIVE_INFINITY;\n }\n\n m_MI_MinArray = new double [data.numAttributes()];\n m_MI_MaxArray = new double [data.numAttributes()];\n m_MI_NumAttrClassInter = new int[data.numAttributes()][][];\n m_MI_NumAttrInter = new int[data.numAttributes()][];\n m_MI_NumAttrClassValue = new int[data.numAttributes()][][];\n m_MI_NumAttrValue = new int[data.numAttributes()][];\n m_MI_NumClass = new int[data.numClasses()];\n m_MI = new double[data.numAttributes()];\n m_MI_NumInst = 0;\n for(int cclass = 0; cclass < data.numClasses(); cclass++)\n m_MI_NumClass[cclass] = 0;\n for (int attrIndex = 0; attrIndex < data.numAttributes(); attrIndex++) {\n\t \n if(attrIndex == data.classIndex())\n\tcontinue;\n\t \n m_MI_MaxArray[attrIndex] = m_MI_MinArray[attrIndex] = Double.NaN;\n m_MI[attrIndex] = Double.NaN;\n\t \n if(data.attribute(attrIndex).isNumeric()){\n\tm_MI_NumAttrInter[attrIndex] = new int[m_NumFoldersMI];\n\tfor(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrInter[attrIndex][inter] = 0;\n\t}\n } else {\n\tm_MI_NumAttrValue[attrIndex] = new int[data.attribute(attrIndex).numValues() + 1];\n\tfor(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrValue[attrIndex][attrValue] = 0;\n\t}\n }\n\t \n m_MI_NumAttrClassInter[attrIndex] = new int[data.numClasses()][];\n m_MI_NumAttrClassValue[attrIndex] = new int[data.numClasses()][];\n\n for(int cclass = 0; cclass < data.numClasses(); cclass++){\n\tif(data.attribute(attrIndex).isNumeric()){\n\t m_MI_NumAttrClassInter[attrIndex][cclass] = new int[m_NumFoldersMI];\n\t for(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrClassInter[attrIndex][cclass][inter] = 0;\n\t }\n\t} else if(data.attribute(attrIndex).isNominal()){\n\t m_MI_NumAttrClassValue[attrIndex][cclass] = new int[data.attribute(attrIndex).numValues() + 1];\t\t\n\t for(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrClassValue[attrIndex][cclass][attrValue] = 0;\n\t }\n\t}\n }\n }\n m_MissingVector = new double[data.numAttributes()];\n for(int i = 0; i < data.numAttributes(); i++){\n if(i == data.classIndex()){\n\tm_MissingVector[i] = Double.NaN;\n } else {\n\tm_MissingVector[i] = data.attribute(i).numValues();\n }\n }\n\n /* update the classifier with data */\n Enumeration enu = data.enumerateInstances();\n while(enu.hasMoreElements()){\n update((Instance) enu.nextElement());\n }\t\n }", "abstract void train(Matrix features, Matrix labels);", "public void checkTraining() {\r\n loadGenome();\r\n MLDataSet trainingSet;\r\n float sum = 0;\r\n try (Stream<Path> walk = Files.walk(Paths.get(\"check_train_data\"))) {\r\n\r\n List<String> result = walk.filter(Files::isRegularFile)\r\n .map(x -> x.toString()).collect(Collectors.toList());\r\n\r\n for (int i = 0; i < result.size(); i++) {\r\n trainingSet = new CSVNeuralDataSet(result.get(i), input, output, true);\r\n sum += network.calculateError(trainingSet);\r\n }\r\n System.out.println(\"Validation, Average error: \" + sum / result.size());\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "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 }", "public WeightFeaturesContextSupervised(String trainingData, String rowFile, String association){\n\t\tlegitWords = 0;\n\t\tstopWords = new HashSet<String>();\n\t\twords = new ArrayList<String>();\n\t\twordsCount = new ArrayList<Double>();\n\t\tgoodWords = new ArrayList<Boolean>();\n\t\t\n\t\tbinDst = new BinaryDist(trainingData);\n\t\t\n\t\tinitializeWeights(rowFile);\n\t\t\n\t\ttype = association;\n\t\t\n\t}", "@BeforeClass\r\n public static void generateConfigurationOfClassifiersAndLoadData() {\r\n\r\n //one classifier in the ensemble will be ClassifierModel (Model for enach output class)\r\n GaussianMultiModelConfig gmc = new GaussianMultiModelConfig();\r\n gmc.setTrainerClassName(\"QuasiNewtonTrainer\");\r\n gmc.setTrainerCfg(new QuasiNewtonConfig());\r\n LinearModelConfig lmcpso = new LinearModelConfig();\r\n lmcpso.setTrainerClassName(\"PSOTrainer\");\r\n lmcpso.setTrainerCfg(new PSOConfig());\r\n ClassifierModelConfig clc = new ClassifierModelConfig();\r\n clc.setClassModelsDef(BaseModelsDefinition.RANDOM);\r\n clc.addClassModelCfg(lmcpso);\r\n clc.addClassModelCfg(gmc);\r\n clc.setClassRef(ClassifierModel.class);\r\n\r\n //todo second classifier in the ensemble will be Weka decision tree\r\n\r\n ClassifierBaggingConfig bagc = new ClassifierBaggingConfig();\r\n bagc.setClassifiersNumber(2);\r\n bagc.setBaseClassifiersDef(BaseModelsDefinition.UNIFORM);\r\n bagc.addBaseClassifierCfg(clc);\r\n\r\n generatedCfg = bagc;\r\n ConfigurationFactory.saveConfiguration(generatedCfg, cfgfilename);\r\n\r\n data = new FileGameData(datafilename);\r\n\r\n }", "public DataSet() {\n labels = new HashMap<>();\n locations = new HashMap<>();\n counter= new AtomicInteger(0);\n }", "public TrainingGroupDto createTrainingGroup(TrainingGroupDto trainDataObj,UserDto userDataObj) throws UIException, SQLException {\r\n\t\tTrainingGroupDto trainData=trainImplObj.createTrainingGroup(trainDataObj,userDataObj);\r\n\t\treturn trainData;\r\n\t}", "public svm_node[] makeSparse(final MLData data) {\n final svm_node[] result = new svm_node[data.size()];\n for (int i = 0; i < data.size(); i++) {\n result[i] = new svm_node();\n result[i].index = i + 1;\n result[i].value = data.getData(i);\n }\n\n return result;\n }", "public void setTrainingData(TrainingData trainingData) {\n\t\t// normalise the input and outputs\n\t\tthis.X = m.normalise(trainingData.getTrainingInput(), trainingData.getMaxInput());\n\t\tthis.y = m.normalise(trainingData.getTrainingOutput(), trainingData.getMaxOutput());\n\t}", "private static native boolean train_auto_0(long nativeObj, long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj, int k_fold, long Cgrid_nativeObj, long gammaGrid_nativeObj, long pGrid_nativeObj, long nuGrid_nativeObj, long coeffGrid_nativeObj, long degreeGrid_nativeObj, boolean balanced);" ]
[ "0.68000877", "0.65990585", "0.64702326", "0.6455896", "0.638591", "0.63103056", "0.61427695", "0.6142569", "0.61278826", "0.61231786", "0.6119663", "0.61154926", "0.6079843", "0.60793704", "0.6037061", "0.59690803", "0.5963927", "0.5955703", "0.58839625", "0.58728355", "0.58575606", "0.5824496", "0.58220136", "0.57919514", "0.57494956", "0.5728251", "0.5705879", "0.5700177", "0.56952393", "0.5691678", "0.56647545", "0.5650233", "0.5644933", "0.5638468", "0.56193066", "0.5618459", "0.5607818", "0.56033266", "0.5582152", "0.55776685", "0.55762815", "0.55733186", "0.5571481", "0.55700696", "0.5564991", "0.5563032", "0.5560203", "0.5558155", "0.5545565", "0.5540621", "0.55400634", "0.5537552", "0.5533294", "0.55319977", "0.5516974", "0.5514949", "0.5507552", "0.54917175", "0.54863054", "0.548045", "0.54785305", "0.54776174", "0.5476681", "0.54644954", "0.5464416", "0.54628474", "0.54608035", "0.54603374", "0.5443833", "0.5440846", "0.543819", "0.5436039", "0.5413129", "0.539062", "0.5390337", "0.53846246", "0.53715193", "0.5368128", "0.53633404", "0.53624815", "0.532719", "0.532664", "0.53250134", "0.5319923", "0.5309128", "0.53086466", "0.5307321", "0.5306277", "0.52988106", "0.5287126", "0.52670246", "0.52616364", "0.5250318", "0.52387184", "0.5233903", "0.5228479", "0.52220184", "0.52180773", "0.52162415", "0.52041584" ]
0.6488266
2
Drivers.driver = Drivers.browser("chrome"); commUtil.launchBrowser("
@BeforeClass public static void beforeClass() throws MalformedURLException { Drivers.driver = Drivers.browser("firefox"); commUtil.launchBrowser("http://demoqa.com/"); Drivers.driver.manage().window().maximize(); // Drivers.driver = Drivers.browser("internetExplorer"); // commUtil.launchBrowser("http://demoqa.com/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BeforeTest\r\n public void launchBrowser() {\n System.setProperty(\"webdriver.chrome.driver\", ChromePath);\r\n driver= new ChromeDriver();\r\n driver.manage().window().maximize();\r\n driver.get(titulo);\r\n }", "@BeforeTest\r\n\tpublic void launch()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Yogini\\\\chromedriver\\\\chromedriver.exe\"); //location of browser in local drive\r\n\t\tWebDriver driver = new ChromeDriver(); \r\n\t\tdriver.get(tobj.url);\r\n\t\tSystem.out.println(\"Before test, browser is launched\");\r\n\t}", "@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }", "public static WebDriver startBrowser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\t\n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\t WebDriver driver = new ChromeDriver();\n\t\t \n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\tdriver.get(\"http://techfios.com/test/107/\");\n\t\treturn driver;\n\t}", "public void openBrowser() {\n ResourceBundle config = ResourceBundle.getBundle(\"config\");\n\n config.getString(\"browser\").equalsIgnoreCase(\"Chrome\");\n System.setProperty(\"webdriver.chrome.driver\", \"src/Drivers/chromedriver_76.0.exe\");\n driver = new ChromeDriver();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n// driver.get(config.getString(\"URL\"));\n driver.manage().window().maximize();\n }", "public void Open_Browser() \r\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\");\r\n\t\t//Brower initiation\r\n\t\tdriver=new ChromeDriver();\r\n\t\t//maximize browser window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t}", "@Test\r\n\tpublic void launch_browser()\r\n\t{ \r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C://TESTING TOOLS - SOFTWARES/chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.javatpoint.com/\");\r\n\t\t// remove all cookies\r\n\t\t//driver.manage().deleteAllCookies();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\t\r\n\t}", "@BeforeTest\r\n\tpublic void operBrowser(){\n\t\td1=Driver.getBrowser();\r\n\t\tWebDriverCommonLib wlib=new WebDriverCommonLib();\r\n\t\td1.get(Constant.url);\r\n\t\twlib.maximizeBrowse();\r\n\t\twlib.WaitPageToLoad();\r\n\t}", "public static void main(String[] args) {\nString browser=\"ff\";\nif (browser.equals(\"chrome\")) {\n\tWebDriverManager.chromedriver().setup();\n\t// System.setProperty(\"webdriver.chrome.driver\", \"/Users/user/Downloads/chromedriver\");\n\tdriver=new ChromeDriver();\n}\nelse if (browser.equals(\"ff\")) {\n\tWebDriverManager.firefoxdriver().setup();\n\tdriver=new FirefoxDriver();\n}\nelse\n\tif (browser.equals(\"IE\")) {\n\t\tWebDriverManager.iedriver().setup();\n\t\tdriver=new InternetExplorerDriver();\n\t}\n\telse\n\t\tif (browser.equals(\"opera\")) {\n\t\t\tWebDriverManager.operadriver().setup();\n\t\t\tdriver=new OperaDriver();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"no defined driver\");\n\t\t}\n\n\ndriver.get(\"https://google.com\");\n\n\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\t}", "public static void main(String[] args) {\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"D:/workspace/chromedriver\");\r\n\t\t //System.setProperty(\"webdriver.chrome.driver\", ...);\r\n\t\t \r\n\t\t System.setProperty(\"selenide.browser\", \"Chrome\");\r\n\t\t Configuration.browser=\"chrome\";\r\n\t\t open(\"http://google.com\");\r\n\t\t //$(By.id(\"registerLink\")).pressEnter();\r\n\t\t }", "private static WebDriver launchChrome()\n\t{\n\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\t\ttry {\n\n\t\t\t\treturn new RemoteWebDriver(new URL(System.getProperty(\"RemoteUrl\")), capabilities);\n\t\t\t}\n\n\n\t\t\tcatch (MalformedURLException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\telse\n\t\t{\n\t\tURL chromeDriverURL = BrowserDriver.class.getResource(\"/drivers/chromedriver.exe\");\n\t\tFile file = new File(chromeDriverURL.getFile()); \n\t\tSystem.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, file.getAbsolutePath());\n\t\t\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\toptions.addArguments(\"--ignore-certificate-errors\");\n\t\t\n\t\treturn new ChromeDriver(options);\n\t\t}\n\t}", "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "public void setChromeDriver(){\n System.setProperty(\"webdriver.chrome.driver\", browserDriverPath);\n seleniumDriver = new ChromeDriver();\n }", "public static WebDriver chrome()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\Chrome\\\\chromedriver.exe\");\r\n\t\tgk = new ChromeDriver();\r\n\t\treturn gk;\r\n\t}", "public void initiateBrowser(String browser) {\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\t\tString current_dir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(os);\n\t\tSystem.out.println(current_dir);\n\t\tswitch (browser) {\n\t\tcase \"ie\":\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", current_dir + \"/drivers/IEDriverServer.exe\");\n\t\t\tdriver = new InternetExplorerDriver();\n\t\t\tbreak;\n\t\tcase \"chrome\":\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\tif (os.contains(\"linux\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/linuxdrivers/chromedriver\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\n\t\t\t\toptions.setBinary(\"/usr/bin/google-chrome\");\n\t\t\t\toptions.addArguments(\"--headless\");\n\t\t\t} else if (os.contains(\"windows\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/chromedriver.exe\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\t\t\t}\n\t\t\toptions.addArguments(\"test-type\");\n\t\t\toptions.addArguments(\"disable-popup-blocking\");\n\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\tdriver.manage().window().maximize();\n\t\t\tbreak;\n\t\tcase \"firefox\":\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tbreak;\n\t\t}\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t}", "public void chromeLaunch() {\n\t\tSystem.setProperty(key, value);\n\t\ts=new ChromeDriver();\n\t\ts.manage().window().maximize();\n\t\ts.navigate().to(url);\n\t}", "public WebDriver LaunchChromeBrowserReturnIt() {\n\t\ttry {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\t\"/TestSuit/lib/chromedriver.exe\");\n\t\t\tdriver = new ChromeDriver(); // Launch chrome\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn driver;\n\n\t}", "@Test \n public void executSessionOne(){\n\t System.out.println(\"open the browser: chrome\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "public static void main(String[] args) {\n String str = getDriver(\"chrome\");\n System.out.println(str);\n\n }", "public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }", "@Before\r\n\tpublic void OpenChrome() {\n\t\tconfig = new ConfigReader();\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",config.getChromePath());\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\texPages = new ExpediaPages(driver);\r\n\t}", "@BeforeTest //special type of testng method which alway run before.\r\n\t\t\tpublic void openBrowser() {\r\n\t\t\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t\t\t}", "public void browser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src/test/resources/Driver/chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.manage().window().maximize();// maximize the window\n\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\n\n\t}", "@Given(\"I open a browser and launch the application\")\n public void open_a_browser_and_launch_the_application() throws MalformedURLException\n {\n try {\n if(System.getProperty(\"exemode\").equals(\"remote\")) {\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n DesiredCapabilities dc = DesiredCapabilities.firefox();\n dc.setBrowserName(\"firefox\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n DesiredCapabilities dc = DesiredCapabilities.chrome();\n dc.setBrowserName(\"chrome\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n }\n else{\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n driver = new FirefoxDriver();\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n driver = new ChromeDriver();\n }\n }\n\n if(driver!=null){\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n //driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);\n driver.get(ENDPOINT_PHPTRAVELS);\n }\n }\n catch(Exception e){\n e.printStackTrace();\n// System.exit(1);\n }\n }", "@Given(\"^the user launch the chrome application$\")\r\n\tpublic void the_user_launch_the_chrome_application() throws Throwable {\n\t\tlaunchBrowser(\"chrome\");\r\n\t\t register= new Para_Registartion_page(driver);\r\n\t}", "public static void main(String[] args) throws MalformedURLException {\n\t\t\n\t\tDesiredCapabilities objRc=new DesiredCapabilities();\n\t\tobjRc.setBrowserName(\"chrome\");\n\t\tobjRc.setPlatform(Platform.WINDOWS);\n\t\tWebDriver driver=new RemoteWebDriver(new URL(\"http://localhost:4546/wd/hub\"),objRc);\n\t}", "public void setup(){\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"//Users//bpat12//Downloads//chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tSystem.out.println(\"launch browser\");\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.get(url);\n\t}", "@Test\r\n\tpublic void f()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C://Data_Program//Selenium_Dependencies//chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(\"http://www.google.com\");\r\n\t}", "private void setChromeDriver() throws Exception {\n\t\t// boolean headless = false;\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\n\t\tchromePrefs.put(\"download.default_directory\", BasePage.myTempDownloadsFolder);\n\t\tchromeOptions.setExperimentalOption(\"prefs\", chromePrefs);\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\n\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\tchromeOptions.addArguments(\"--disable-extensions\");\n\t\tchromeOptions.addArguments(\"start-maximized\");\n\n\t\t/*\n\t\t * To set headless mode for chrome. Would need to make it conditional\n\t\t * from browser parameter Does not currently work for all tests.\n\t\t */\n\t\t// chromeOptions.setHeadless(true);\n\n\t\tif (runLocation.toLowerCase().equals(\"smartbear\")) {\n\t\t\tReporter.log(\"-- SMARTBEAR: standard capabilities. Not ChromeOptions\", true);\n\t\t\tcapabilities = new DesiredCapabilities();\n\t\t} else {\n\t\t\tcapabilities = DesiredCapabilities.chrome();\n\t\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);\n\t\t}\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t \n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" Chrome-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}", "public static void main(String[] args) {\n WebDriver driver = WebDriverFactory.getDriver(\"chrome\");\n driver.manage().window().maximize();\n\n\n }", "@Given(\"^launch an chrome browser$\")\r\n\tpublic void launch_an_chrome_browser() throws Throwable {\n\t sign.url();\r\n\t\t\r\n\t}", "@Test \n public void executSessionThree(){\n System.out.println(\"open the browser: chrome III\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "@Given(\"^Launch the page$\")\r\n\tpublic void launch_the_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedrivernew.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://realestate.upskills.in\");\r\n\t \t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./browser/chromedriver.exe\");\r\n\t\t//DesiredCapabilities cap=new DesiredCapabilities();\r\n\t\t\r\n\t\tChromeOptions co=new ChromeOptions();\r\n\t\tco.addArguments(\"--disable-infobars\");\r\n\t\t//co.addArguments(\"--headless\");\r\n\t\tWebDriver driver=new ChromeDriver(co);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.close();\r\n\r\n\t}", "@Test\n public void test() throws MalformedURLException {\n System.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\drivers\\\\chromedriver.exe\"); \n WebDriver driver=new ChromeDriver();\n // WebDriver driver=new RemoteWebDriver(url,cap);\n driver.manage().window().maximize(); \n driver.get(\"https://curiedoctorapp.firebaseapp.com\");\n System.out.println(\"The title is\"+ driver.getTitle());\n driver.quit();\n \n }", "public static void main(String[] args) throws Exception{\n\n WebDriverManager.chromedriver().setup();\n\n WebDriver driver = new ChromeDriver();\n\n driver.get(\"http://practice.cybertekschool.com/open_new_tab\");\n\n Thread.sleep(4000);\n\n //driver.close(); //expected to close the original one\n driver.quit(); //all window will be closed\n\n\n\n\n }", "public static void main(String[] args) throws IOException {\n\r\n\r\n\t WebDriver driver;\r\n\t ChromeOptions options=new ChromeOptions();\r\n\t options.addArguments(\"C:\\\\chromedriver.exe\"); \r\n\t\tDesiredCapabilities capabilities=DesiredCapabilities.chrome();\r\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY,options);\r\n\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n driver.get(\"http://www.baidu.com\");\r\n \r\n \r\n \r\n//\t\tWebDriver driver;\r\n//\t\tProfilesIni allProfiles =new ProfilesIni();\r\n// FirefoxProfile profile=allProfiles.getProfile(\"default\");\r\n// DesiredCapabilities capabilities=DesiredCapabilities.firefox();\r\n//\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n//\t\tdriver.get(\"http://www.baidu.com\");\r\n\t}", "@BeforeMethod\n\tpublic void setUp() {\n\t\tString driverByOS = \"\";\n\t\tif (System.getProperty(\"os.name\").equals(\"Windows 10\")) {\n\t\t\tdriverByOS = \"Drivers/chromedriver.exe\";\n\t\t} \n\t\telse {\n\t\t\tdriverByOS = \"Drivers/chromedriver\";\n\t\t}\n\t\t//para saber en qué sistema Operativo estamos corriendo el proyecto.\n\t\tSystem.out.println(System.getProperty(\"os.name\"));\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverByOS);\n\t\t//Utilizando headless browser HB\n\t\t/*-HB\n\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\tchromeOptions.addArguments(\"--headless\");\n\t\tdriver = new ChromeDriver(chromeOptions);\n\t\tHB-*/\n\t\tdriver = new ChromeDriver();\n\t\t//driver.manage().window().maximize(); //esto es para maximizar la ventana del navegador\n\t\t//driver.manage().window().fullscreen(); //esto es para poner en fullscreen la ventana del navegador\n\t\t/*driver.manage().window().setSize(new Dimension(200,200));\n\t\tfor (int i = 0; i <= 800; i++) {\n\t\t\tdriver.manage().window().setPosition(new Point(i,i));\n\t\t}*/\n\t\t//driver.manage().window().setPosition(new Point(800,200)); //posicionando la ventana del navegador\n\t\tdriver.navigate().to(\"http://newtours.demoaut.com/\");\n\t\t//Este codigo de abajo permite abrir otra ventana en el navegador\n\t\t//JavascriptExecutor javaScriptExecutor = (JavascriptExecutor)driver;\n\t\t//String googleWindow = \"window.open('http://www.google.com')\";\n\t\t//javaScriptExecutor.executeScript(googleWindow);\n\t\t//tabs = new ArrayList<String> (driver.getWindowHandles());\n\t\t/*try {\n\t\t\tThread.sleep(5000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t//Helpers helper = new Helpers();\n\t\t//helper.sleepSeconds(4);\n\t}", "@BeforeMethod(alwaysRun = true)\n public void browserSetup(){\n driver = new ChromeDriver();\n }", "public void getDriver() {\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver = new ChromeDriver();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\r\n\t\tWebDriver driver =new ChromeDriver();\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void InvokeBrowser() {\n\t\tString currentDir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(\"Current Directory \"+currentDir);\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--incognito\");\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir+\"/lib/chromedriver/36/chromedriver.exe\");\n\t\tdriver = new ChromeDriver(capabilities);\n\t\tdriver.manage().window().maximize();\n\t\t//driver.navigate().to(URL);\n\t\t//logger.info(\"URL to proceed with transaction --> \"+URL);\n\t\t/*BestBuyAddCart.addToCart();\n\t\tdriver.close();\n\t\tdriver.quit();*/\n\t}", "public static void setup(String browser) throws Exception{\n if(browser.equalsIgnoreCase(\"firefox\")){\n \tFile pathToBinary = new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox 41\\\\firefox.exe\");\n \tFirefoxBinary binary = new FirefoxBinary(pathToBinary);\n \tFirefoxDriver driver = new FirefoxDriver(binary, new FirefoxProfile());\n \t\n \t//System.setProperty(\"webdriver.firefox.driver\",\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n \t/*DesiredCapabilities capabilies = DesiredCapabilities.firefox();\t\t\t\n capabilies.getBrowserName();\n capabilies.getVersion();*/\n \t\t\t\n \t//create Firefox instance\t \n //driver = new FirefoxDriver(); \n System.out.println(\"Browser Used: \"+browser);\n }\t \n //Check if parameter passed is 'Chrome'\n // https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/chrome/ChromeOptions.html\n // http://www.programcreek.com/java-api-examples/index.php?api=org.openqa.selenium.remote.DesiredCapabilities (Singleton)\n else if(browser.equalsIgnoreCase(\"chrome\")){\t \t \n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n ChromeOptions opt = new ChromeOptions();\n opt.setBinary(\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n opt.setExperimentalOption(\"Browser\", \"Chrome\");\n opt.getExperimentalOption(\"version\");\n \n// DesiredCapabilities capabilies = DesiredCapabilities.chrome();\n// capabilies.setBrowserName(\"chrome\");\n// capabilies.setPlatform(Platform.WINDOWS);\n// capabilies.setVersion(\"38\");\n// DesiredCapabilities capabilities = new DesiredCapabilities();\n \n //Create Chrome instance\n driver = new ChromeDriver(opt);\t \n }\n \n //Check if parameter passed is 'Safari'\t\n else if(browser.equalsIgnoreCase(\"safari\")){\t \t \n \tSystem.setProperty(\"webdriver.safari.driver\",\"C:/safaridriver.exe\");\n \t\n \t//System.setProperty(\"webdriver.safari.noinstall\", \"true\");\n \tdriver = new SafariDriver();\n \t\n /*\tSafariOptions options = new SafariOptions();\n \tSafariDriver driver = new SafariDriver(options);\n \tDesiredCapabilities capabilities = DesiredCapabilities.safari();\n \tcapabilities.setCapability(SafariOptions.CAPABILITY, options);*/\n }\n \n //Check if parameter passed is 'IE'\t \n else if(browser.equalsIgnoreCase(\"ie\")){\n \t//String IE32 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_32.exe\"; //IE 32 bit\n\t\t\tString IE64 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_64.exe\"; //IE 64 bit\n \tSystem.setProperty(\"webdriver.ie.driver\",IE64);\n \t\n /* \tDesiredCapabilities capabilies = DesiredCapabilities.internetExplorer();\n \tcapabilies.setBrowserName(\"ie\");\n capabilies.getBrowserName();\n capabilies.getPlatform();\n capabilies.getVersion();*/\n \n \t//Create IE instance\n \tdriver = new InternetExplorerDriver();\n }\t \n else{\t \n //If no browser passed throw exception\t \n throw new Exception(\"Browser is not correct\");\t \n }\t \n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\n\t}", "@BeforeTest\n\tpublic void OpenBrowser() throws InterruptedException {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PSQA\\\\Desktop\\\\driver\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.booking.com/\");\n\t\n\t\t\n\t\tdriver.manage().window().maximize();\n\t\tThread.sleep(100);\n\t\t\n}", "@Parameters(\"browser\")\n\t@BeforeMethod\n\tpublic void launchBrowser(String browser) throws InterruptedException{\n\t\tif(browser.equalsIgnoreCase(\"firefox\")) {\n\t\t\t \n\t\t\t driver = new FirefoxDriver();\n\t\t \n\t\t // If browser is IE, then do this\t \n\t\t \n\t\t }else if (browser.equalsIgnoreCase(\"ie\")) { \n\t\t \n\t\t\t // Here I am setting up the path for my IEDriver\n\t\t \n\t\t\t System.setProperty(\"webdriver.ie.driver\", \"C://Users//sudt//Downloads//IEDriverServer_x64_2.53.1//IEDriverServer (2).exe\");\n\t\t \n\t\t\t driver = new InternetExplorerDriver();\n\t\t \n\t\t } \n\t\t else if (browser.equalsIgnoreCase(\"chrome\")){\n\t\t\t System.setProperty(\"webdriver.chrome.driver\", \"C://Users//sudt//Downloads//chromedriver_win32//chromedriver.exe\");\n\t\t\t driver = new ChromeDriver();\n\t\t }\n\t\t else {\n throw new IllegalArgumentException(\"The Browser Type is Undefined\");\n }\n\n\t\tdriver.get(\"https://www.xero.com/us/\");\n\t\tdriver.manage().window().maximize();\n\t\n\t\n\t}", "private WebDriver getDriver() {\n return new ChromeDriver();\n }", "public static void openBrowser() {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n // === Google Chrome Browsers === //\n CHOSEN_BROWSER = CHROME;\n driver.manage().window().maximize();\n }", "public static void startChromeDriver() {\r\n\t\tswitch (operatingSystem.toLowerCase().split(\" \")[0]) {\r\n\t\tcase \"windows\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriver.exe\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"linux\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverLinux\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"mac\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverMac\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Operating system not supported.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Before\n public void start(){\n DesiredCapabilities caps = new DesiredCapabilities();\n driver = new FirefoxDriver(new FirefoxBinary(new File(\"C:\\\\Program Files (x86)\\\\Nightly\\\\firefox.exe\")), new FirefoxProfile(), caps);\n wait = new WebDriverWait(driver, 10);\n\n //IE\n// DesiredCapabilities caps = new DesiredCapabilities();\n// caps.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);\n// WebDriver driver = new InternetExplorerDriver(caps);\n\n\n }", "public static void openBrowser() {\r\n\t\tString browser = prop.getProperty(\"browserType\").toLowerCase();\r\n\r\n\t\ttry {\r\n\t\t\tif (browser.equals(\"chrome\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"chromeName\"), prop.getProperty(\"chromePath\"));\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ff\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"FFName\"), prop.getProperty(\"FFPath\"));\r\n\t\t\t\tdriver = new FirefoxDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ie\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"IEName\"), prop.getProperty(\"IEPath\"));\r\n\t\t\t\tdriver = new InternetExplorerDriver();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t}\r\n\t}", "public static WebDriver startChrome() {\n\t\treturn new ChromeDriver();\n\t}", "@Given(\"I set up my Chrome Driver\")\n\tpublic void i_am_on_Magalu_HomePage() {\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/gocruz/eclipse-workspace/portal.compras/chromedriver.exe\");\n\t\tdriver = new ChromeDriver(options);\n\n\t}", "@Given(\"^the user launch chrome application$\")\r\n\tpublic void the_user_launch_chrome_application() throws Throwable {\n\t w.browser();\r\n\t}", "public void open() {\n setWebDriver();\n }", "@Test\n public void test1(){\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver2 = new ChromeDriver();\n\n\n\n driver2.get(url);\n bekle(2000);\n driver2.quit();\n\n\n\n }", "public static void chromeTest() throws Exception{\n driver = BrowserFactory.getDriver(\"chrome\");\n Thread.sleep(2000);\n\n driver.get(\"http://google.com\");\n Thread.sleep(3000);\n String title = driver.getTitle();\n driver.navigate().to(\"https://etsy.com\");\n Thread.sleep(2000);\n String title2 = driver.getTitle();\n driver.navigate().back();\n title = driver.getTitle();\n Thread.sleep(2000);\n driver.navigate().to(\"https://etsy.com\");\n title2 = driver.getTitle();\n driver.quit();\n }", "@Given(\"browser is open\")\n\tpublic void browser_is_open() {\n\t\tSystem.out.println(\"browseris open\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"/home/rahul/Desktop\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(40,TimeUnit.SECONDS);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tWebDriver driver = new browser_methods().getDriver(\"chrome\");\r\n\t\tdriver.get(\"http://newtours.demoaut.com/\");\r\n\r\n\t}", "public WebDriver browserSetup() throws IOException\r\n\t{ \r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\tSystem.out.println(\"1.Chrome\\n2.Firefox \\nEnter your choice:\");\r\n\t\tString choice=br.readLine();\r\n\t\t\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\t//To start Chrome Driver\r\n\t\tcase \"1\":\r\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Test Automation\\\\Software\\\\chrome\\\\New Version\\\\chromedriver.exe\");\r\n\t\t ChromeOptions options=new ChromeOptions();\r\n\t\t options.addArguments(\"--disable-notifications\");\r\n\t\t driver=new ChromeDriver(options);\r\n\t\t break;\r\n\t\t\r\n\t\t//To start Firefox Driver\r\n\t\tcase \"2\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"C:\\\\***\\\\drivers\\\\geckodriver.exe\");\r\n\t\t\tdriver=new FirefoxDriver();\r\n\t\t\tbreak;\r\n\t\t} \r\n\t\t\r\n\t\tdriver.get(url);\r\n\t\t\r\n\t\t//To maximize the window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(8, TimeUnit.SECONDS);\r\n\t\t\r\n\t\treturn driver;\r\n\t}", "@Test\n @Given(\"I launch browser\")\n public void s01_BrowserMaximizeLaunch() {\n System.setProperty(\"webdriver.chrome.driver\", \"src/ChromeDriver.exe\");\n// Init new instance of ChromeDriver.\n driver = new ChromeDriver();\n// Maximise browser window\n driver.manage().window().maximize();\n System.out.println(\"Step01 PASSED\");\n }", "@BeforeTest\n\tpublic void LaunchBrowser() {\n\t\t driver = init(\"URL_JQuery\");\n\t\t// driver.get(\"https://jqueryui.com/autocomplete/\");\n\t\t driver.switchTo().frame(0);\n\t\t jq = new JQueryAutocompletePage(driver);\n\t\t \n\t}", "public static void main(String[] args) {\n\n\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\COMPAQ\\\\Downloads\\\\chromedriver_win32\\\\chromedriver.exe\");\n\nWebDriver driver =new ChromeDriver();\n\n//WebDriverWait wait = new WebDriverWait(driver, 40);\n\n driver.get(\"http://qatestingtips.com/\");\n\t\n\n}", "@ BeforeTest \n\tpublic void Amazon() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\resources\\\\chromedriver.exe\"); // to make the path portable create folder reources and put the element to it \n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.amazon.com/\");\n\t\tSystem.out.println(driver.getCurrentUrl());\t\n\t\tdriver.manage().window().maximize();\n\n}", "@BeforeClass\n @Parameters({ \"browser\", \"url\" })\n public void startDriver(@Optional(\"chrome\") String WindowBrowser, @Optional(\"http://computer-database.herokuapp.com/computers\") String URL) {\n\n final String os = System.getProperty(\"os.name\");\n userDirectory = System.getProperty(\"user.dir\");\n Log.info(\"Starting to intialise driver\");\n Log.info(\"OS environment: \" + os);\n Log.info(\"Browser: \" + WindowBrowser);\n if (WindowBrowser.equalsIgnoreCase(BROWSERS.FIREFOX.getBrowserName())) {\n final StringBuilder geckoDriverPath = new StringBuilder();\n geckoDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n geckoDriverPath.append(File.separator + \"mac\" + File.separator + \"geckodriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n geckoDriverPath.append(File.separator + \"win\" + File.separator + \"geckodriver.exe\");\n }\n System.setProperty(\"webdriver.gecko.driver\", geckoDriverPath.toString());\n driver = new FirefoxDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.CHROME.getBrowserName())) {\n final StringBuilder chromeDriverPath = new StringBuilder();\n System.out.println(userDirectory);\n chromeDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n chromeDriverPath.append(File.separator + \"mac\" + File.separator + \"chromedriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n chromeDriverPath.append(File.separator + \"win\" + File.separator + \"chromedriver.exe\");\n }\n System.setProperty(\"webdriver.chrome.driver\", chromeDriverPath.toString());\n driver = new ChromeDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.SAFARI.getBrowserName())) {\n driver = new SafariDriver();\n }\n driver.manage().window().setSize(new Dimension(1440, 844));\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n BaseURl = URL;\n Log.info(\"Driver initialised successfully\");\n driver.get(BaseURl);\n Log.info(\"Opening URl: \" + URL);\n }", "public static void main(String[] args) {\n\n\n WebDriver driver = WebDriverFactory.getDriver(\"CHROME\");\n driver.get(\"http://google.com\");\n driver.navigate().to(\"https://amazon.com\");\n driver.navigate().back();\n\n driver.close();\n\n WebDriver driver2 = WebDriverFactory.getDriver(\"FIREFOX\");\n driver2.get(\"https://www.mozilla.org\");\n\n\n driver2.close();\n }", "@BeforeMethod\n\tpublic static void launchDriver() throws MalformedURLException\n\t{\n\t \t\t \n\t\tDesiredCapabilities caps = new DesiredCapabilities();\n\t/* caps.setCapability(\"browser\", \"Chrome\");\n\t caps.setCapability(\"browser_version\", \"60.0\");\n\t caps.setCapability(\"os\", \"Windows\");\n\t caps.setCapability(\"os_version\", \"7\");\n\t caps.setCapability(\"resolution\", \"1024x768\");\n\t caps.setCapability(\"name\", \"Bstack-[Java] Sample Test\");*/\n\t //set from capability generator \n\t caps.setCapability(\"os\", \"Windows\");\n\t caps.setCapability(\"os_version\", \"10\");\n\t caps.setCapability(\"browser\", \"Chrome\");\n\t caps.setCapability(\"browser_version\", \"62.0\");\n\t caps.setCapability(\"project\", \"TestingOnBrowserStack\");\n\t caps.setCapability(\"build\", \"1.0\");\n\t caps.setCapability(\"name\", \"TestBroserStackSel\");\n\t caps.setCapability(\"browserstack.local\", \"false\");\n\t caps.setCapability(\"browserstack.selenium_version\", \"3.5.2\");\n\t \n\t driver = new RemoteWebDriver(new URL(URL), caps);\n\t\tdriver.manage().deleteAllCookies();\n\t\twait = new WebDriverWait(driver, 220);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\t\n\t\t\n\t}", "@BeforeTest\n public void setup() {\n\n String browser = Environment.getProperties().browser().toString().toLowerCase();\n\n switch (browser) {\n \n case \"firefox\":\n FirefoxOptions options = new FirefoxOptions(); \n if(Environment.getProperties().headless()){\n options.addArguments(\"--headless\");\n }\n driver = new FirefoxDriver();\n break;\n \n default:\n ChromeOptions optionsChrome = new ChromeOptions();\n if(Environment.getProperties().headless()){\n optionsChrome.addArguments(\"--headless\");\n } \n driver = new ChromeDriver(optionsChrome);\n break;\n } \n\n driver.manage().window().maximize();\n }", "public static void setChromeDriverProperty() {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\automation_new_code\\\\onfs.alip.accounting\\\\BrowserDriver/chromedriver.exe\");\n\t\t}", "public static void setBrowser() {\n\t\t browser=\"Chrome\";\n\t }", "public GoogleAutomation() {\n\t\t\n\t\t//The setProperty() method of Java system class sets the property of the system which is indicated by a key.\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"driver//chromedriver.exe\");\n\t\t\n\t\t//initilize webDriver \n\t\twebDriver = new ChromeDriver();\n\t}", "public static void main(String[] args) {\n\t\tString current = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(current);\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", current + \"\\\\Lib\\\\chromedriver.exe\");\n\n\t\tWebDriver driver = new ChromeDriver(); //open browser\n\t\tdriver.get(\"https://www.google.com\"); //open URL\n\t\ttry {\n\t\t\tThread.sleep(5000); //wait for 5 second\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdriver.close(); //close browser \n\t}", "public static void openBrowser()\n\t{\n\t\tdriver = DriverSetup.getWebDriver(ReadPropertiesFile.getBrowser());\n\t\tdriver.get(ReadPropertiesFile.getURL());\n\t\tlog.info(\"Opening Browser\");\n\t\tlog.info(\"Practo website is launched \");\n\t}", "@Before\n public void Setup() { //this is done before every test, chrome driver is saved in a specific location\n\n System.setProperty(\"webdriver.chrome.driver\",\n Constant.CROMEDRIVER);\n\n driver = new ChromeDriver();\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t\tdriver=new FirefoxDriver();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//ChromePOM pom=new ChromePOM(driver);\r\n\t\t\r\n\t\t\r\n\t}", "private void initChromeDriver(String appUrl) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"Drivers\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(appUrl);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t}", "@BeforeClass\n public void BeforeTest(){\n Configuration.browser = \"Chrome\";\n\n }", "private void initDriver(){\r\n String browserToBeUsed = (String) jsonConfig.get(\"browserToBeUsed\");\r\n switch (browserToBeUsed) {\r\n case \"FF\":\r\n System.setProperty(\"webdriver.gecko.driver\", (String) jsonConfig.get(\"fireFoxDriverPath\"));\r\n FirefoxProfile ffProfile = new FirefoxProfile();\r\n // ffProfile.setPreference(\"javascript.enabled\", false);\r\n ffProfile.setPreference(\"intl.accept_languages\", \"en-GB\");\r\n\r\n FirefoxOptions ffOptions = new FirefoxOptions();\r\n ffOptions.setProfile(ffProfile);\r\n driver = new FirefoxDriver(ffOptions);\r\n break;\r\n case \"CH\":\r\n String driverPath = (String) jsonConfig.get(\"chromeDriverPath\");\r\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\r\n\r\n Map<String, Object> prefs = new HashMap<String, Object>();\r\n prefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n\r\n ChromeOptions options = new ChromeOptions();\r\n options.setExperimentalOption(\"prefs\", prefs);\r\n options.addArguments(\"--lang=en-GB\");\r\n driver = new ChromeDriver(options);\r\n break;\r\n case \"IE\":\r\n System.setProperty(\"webdriver.ie.driver\", (String) jsonConfig.get(\"ieDriverPath\"));\r\n\r\n InternetExplorerOptions ieOptions = new InternetExplorerOptions();\r\n ieOptions.disableNativeEvents();\r\n ieOptions.requireWindowFocus();\r\n ieOptions.introduceFlakinessByIgnoringSecurityDomains();\r\n driver = new InternetExplorerDriver(ieOptions);\r\n }\r\n\r\n driver.manage().window().maximize();\r\n }", "private void setLocalWebdriver() {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setJavascriptEnabled(true);\n capabilities.setCapability(\"handlesAlerts\", true);\n switch (getBrowserId(browser)) {\n case 0:\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n driver.set(new InternetExplorerDriver(capabilities));\n break;\n case 1:\n driver.set(new FirefoxDriver(capabilities));\n break;\n case 2:\n driver.set(new SafariDriver(capabilities));\n break;\n case 3:\n driver.set(new ChromeDriver(capabilities));\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"E:\\\\chrome driver 90\\\\chromedriver_win32 (2)\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.get(\"https://demo.nopcommerce.com/\");\n\t\t\n\t\t//driver.switchTo().newWindow(WindowType.TAB); // ithu work agum but dependnces nala work agala\n\t\t//driver.switchTo().newWindow(WindowType.WINDOW);\n\t\t\n\t\tdriver.get(\"https://www.opencart.com/)\");\n\t\t\n\t\t\n\t\t\n\n\t}", "public static WebDriver init_driver_crome(String browser) {\n\t\t\tif(browser.equals(\"chrome\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"G:\\\\software\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Browser is initialised\" +browser);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Browser is not initialised\" +browser);\n\t\t\t}\n\t\t\treturn getDriverChrome();\n\t\t}", "private void setWebdriver() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir + fileSeparator + \"lib\" + fileSeparator + \"chromedriver.exe\");\n\t\tcapability = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"disable-infobars\");\n\t\tcapability.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tdriver = new ChromeDriver(capability);\n\t\tdriver.manage().deleteAllCookies();\n\t\t_eventFiringDriver = new EventFiringWebDriver(driver);\n\t\t_eventFiringDriver.get(getUrl());\n\t\t_eventFiringDriver.manage().window().maximize();\n\n\t}", "@BeforeTest // which will be executed first before all the test methods\n@Parameters(\"browser\") //@Parameter is used to pass the values(during run time) to the test methods as arguments using .xml file\npublic void setup(String browser) throws Exception{\n \n//Check if parameter passed as 'chrome'\nif (browser.equalsIgnoreCase(\"chrome\")){\n//set path to chromedriver.exe\nSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\mouleeswaranb\\\\\\\\\\\\\\\\eclipse-workspace_Selenium learning_6127\\\\\\\\\\\\\\\\SeleniumProject\\\\\\\\\\\\\\\\drivers\\\\\\\\\\\\\\\\chromedriver.exe\");\ndriver = new ChromeDriver(); \n}\n\nelse{\n//If no browser passed throw exception\nthrow new Exception(\"Browser is not correct\");\n}\ndriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n}", "@BeforeTest\n public void setup() {\n System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\User\\\\IdeaProjects\\\\LoginToJira\\\\chromedriver.exe\");\n // Create a new instance of the Chrome driver\n this.driver = new ChromeDriver();\n }", "private static WebDriver launchDriver(WebDriver driver)\n\t{\n\t\tswitch (getBrowserType())\n\t\t{\n\t\t\tcase InternetExplorer:\n\t\t\t{\n\t\t\t\tdriver = launchInternetExplorer();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Chrome:\n\t\t\t{\n\t\t\t\tdriver = launchChrome();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tdriver = launchFirefox();\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(getImplicitWaitTime(), TimeUnit.SECONDS);\n\t\twaitPageLoad = new WebDriverWait(driver, getPageLoadWaitTime());\n\t\twaitAjaxLoad = new WebDriverWait(driver, getAjaxLoadWaitTime());\n\t\tjavaScriptExecutor = (JavascriptExecutor) driver;\n\t\t\n\t\treturn driver;\n\t}", "private WebDriver createChromeDriver() {\n\t\tsetDriverPropertyIfRequired(\"webdriver.chrome.driver\", \"chromedriver.exe\");\n\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"disable-plugins\");\n\t\toptions.addArguments(\"disable-extensions\");\n\t\toptions.addArguments(\"test-type\");\n\n\t\t\n\t\t_driver = new ChromeDriver(options);\n\t\treturn _driver;\n\t}", "@Before\n public void start() {\n\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n //driver.manage().window().maximize();\n wait = new WebDriverWait(driver, 10);\n }", "@BeforeTest\r\n\tpublic void beforeTest() throws MalformedURLException {\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PDC2B-Training.pdc2b\\\\Downloads\\\\Selenium Drivers\\\\BrowserDriver\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(5000, TimeUnit.SECONDS);\r\n\t}", "public WebDriver launchBrowser(String browserName) {\n\n\t\tif (browserName.equals(\"chrome\")) {\n\t\t\t//System.setProperty(\"webdriver.chrome.driver\", \"/Users/naveenautomationlabs/Downloads/chromedriver\");\n\t\t\tWebDriverManager.chromedriver().setup();\n\t\t\tdriver = new ChromeDriver();\n\t\t} else if (browserName.equals(\"firefox\")) {\n\t\t\t//System.setProperty(\"webdriver.gecko.driver\", \"/Users/naveenautomationlabs/Downloads/geckodriver\");\n\t\t\tWebDriverManager.firefoxdriver().setup();\n\t\t\tdriver = new FirefoxDriver();\n\t\t} else if (browserName.equals(\"safari\")) {\n\t\t\tdriver = new SafariDriver();\n\t\t} else {\n\t\t\tSystem.out.println(\"please pass the correct browser....\");\n\t\t}\n\n\t\treturn driver;\n\t}", "public static void main(String[] args) {\n\t\r\n\t PropertyFetcher prop = new PropertyFetcher();\r\n\t \r\n\t \r\n\t \r\n\t \r\nWebDriver driver=new ChromeDriver(); \r\nSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Kumarshobhitsoni/workspace/SeleniumPractice/chromedriver.exe\");\r\n//System.out.println(prop.getProperty(\"URL\"));\r\ndriver.get(prop.fetchProp(\"URL\"));\r\n\r\n//System.out.println(\"Hiii\");\r\n\r\n\t}", "public static void main(String[] args) {\n\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n\n //difference between get and navigate is get will w8 for page to load fully yet navigate wont\n// driver.get(\"http://www.facebook.com\");\n driver.navigate().to(\"http://www.facebook.com\");\n driver.navigate().to(\"http://www.google.com\");\n driver.navigate().back();\n driver.navigate().forward();\n driver.navigate().refresh();\n\n\n slpBrowser(2000);\n qBrowser(driver);\n System.out.println(\"Test Done\");\n }", "@Parameters(\"BROWSER\")\n\t@BeforeClass(groups = {\"Smoke Test\",\"Regression Test\"})\n\tpublic void launchBrowser(String BROWSER) throws IOException \n\t{\n\n\t\tif(BROWSER.equalsIgnoreCase(\"Chrome\")) \n\t\t{\n\t\t\tdriver= new ChromeDriver();\n\t\t}\n\t\telse if (BROWSER.equalsIgnoreCase(\"Firefox\"))\n\t\t{\n\t\t\tdriver= new FirefoxDriver();\n\t\t}\n\t\telse {\n\t\t\tdriver= new ChromeDriver();\n\t\t}\n\t\t//String url = System.getProperty(\"URL\");\n\n\t\tdriver.get(fileutility.readDatafrompropfile(\"url\"));\n\t\twdu.maximizewindow(driver);\n\t\twdu.pageloadtimeout(driver);\n\t\tstaticdriver=driver;\n\t}", "public static void main(String[] args) {\n\t\tString proppath = System.getProperty(\"user.dir\");\n\t\tSystem.setProperty(\"webdriver.crome.driver\", proppath + \"\\\\chromedriver.exe\");\n\t\t\n\t\t//Desiredcapabilities (General ChromeOptions)\n\t\tDesiredCapabilities dc = new DesiredCapabilities();\n\t\tdc.acceptInsecureCerts(); // to handle ssl certificates\n\t\t//or\n\t\tdc.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);\n\t\tdc.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\n\t\t\n\t\t//ChromeOptions (Local browser options)\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.merge(dc);\n\t\toptions.setPageLoadStrategy(PageLoadStrategy.EAGER);\n\t\toptions.addArguments(\"--disable-notifications\");\n\t\t\n\t\t//Webdriver with ChromeOptions & DesiredCapabilities\n\t\tWebDriver driver = new ChromeDriver(options);\n\t\tdriver.manage().deleteAllCookies();\n\t\tdriver.manage().window().maximize();\n\n\t\tdriver.get(\"https://www.google.com/\");\n\t\tSystem.out.println(\"Before Processing >>>>\" + driver.getTitle());\n\t}", "public static WebDriver setUp() {\n\t\n \t\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\"); //if it doesn't work we can check with user.dir...\n \tdriver = new ChromeDriver(); //launch the Browser it opens empty page\n \tdriver.manage().window().maximize();\n \tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); //to wait globally\n \tdriver.get(\"http://166.62.36.207/humanresources/symfony/web/index.php/auth/login\");\n \t \n \treturn driver; //return object of the driver \t\n}", "public void getBrowser(String browser, String url) {\n\n\n if (browser.equalsIgnoreCase(\"chrome\")) {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n } else if (browser.equalsIgnoreCase(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n }\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.get(url);\n\n }", "@BeforeClass\n\tpublic void initializebrowser() throws InterruptedException {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", Chrome);\n\t\t// driver = new ChromeDriver(); \n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"test-type\");\n\t\toptions.addArguments(\"--disable-popup-blocking\");\n\t\tdriver = new ChromeDriver(options);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(common.URL);\n\t\tThread.sleep(3000);\n\n\t\t\n\t\t/*DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();\n\t\t \n\t\t //Method and Description - void setCapability(java.lang.String capabilityName, boolean value)\n\t\t capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);\n\t\t \n\t\t //Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined \"properties\"; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.\n\t\t System.setProperty(\"webdriver.ie.driver\", common.IE);\n\t\t \n\t\t //InternetExplorerDriver(Capabilities capabilities)\n\t\t WebDriver driver = new InternetExplorerDriver(capabilities);\n\t\t \n\t\t driver.manage().window().maximize();\n\t\t driver.get(common.URL);\n\t\t Thread.sleep(3000);*/\n\t\t\n\t}", "public static void main(String[] args) {\nWebDriver driver = new FirefoxDriver();\nSystem.out.println(\"hai\");\ndriver.get(\"https://www.google.com\");\nSystem.out.println(driver.getTitle());\ndriver.close();\n\t}", "@Given(\"^Initialize the browser with Chrome$\")\r\n\tpublic void initialize_the_browser_with_Chrome() throws Throwable {\n\t\tdriver = DriverManager.getDriverInstance(\"chrome\", 20);\r\n\t\tSystem.out.println(\"Launched Chrome\");\r\n\t}", "public Selenium(String chromePath) {\n this.browserDriverPath = chromePath; \n }", "@Test\r\n\tpublic void tc1(){\r\n\t\tWebDriverManager.chromedriver().setup();\r\n\t\tdriver=new ChromeDriver();\r\n\t\tdriver.get(\"https://www.seleniumhq.org/download/\");\r\n\t\tString title = driver.getTitle();\r\n\t\tSystem.out.println(title);\r\n\t\tdriver.close();\r\n\t}", "private void createNewDriverInstance() {\n String browser = props.getProperty(\"browser\");\n if (browser.equals(\"firefox\")) {\n FirefoxProfile profile = new FirefoxProfile();\n profile.setPreference(\"intl.accept_languages\", language);\n driver = new FirefoxDriver();\n } else if (browser.equals(\"chrome\")) {\n ChromeOptions options = new ChromeOptions();\n options.setBinary(new File(chromeBinary));\n options.addArguments(\"--lang=\" + language);\n driver = new ChromeDriver(options);\n } else {\n System.out.println(\"can't read browser type\");\n }\n }", "@BeforeClass(description = \"Before class: start the Chrome browser\")\n public void setUpBrowser()\n {\n reports = new ExtentReports(\"C:\\\\Dev\\\\ToDoMVCTEST\\\\HTML_Report\\\\Report.html\", true);\n HTMLReport htmlReport = new HTMLReport();\n htmlReport.log(\"STARTING BeforeClass\");\n htmlReport.logINFO(\"Initialization of browser's driver\");\n driver = getDriver();\n htmlReport.logINFO(\"Maximize the window of browser\");\n driver.manage().window().maximize();\n htmlReport.logINFO(\"Setting timeouts in seconds\");\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n }" ]
[ "0.7946933", "0.7851935", "0.7846175", "0.77384824", "0.76477987", "0.7579795", "0.75717896", "0.7562818", "0.7550134", "0.75421494", "0.7523966", "0.75122386", "0.7507082", "0.7493384", "0.74461836", "0.74386024", "0.7436765", "0.741584", "0.74000466", "0.73670834", "0.7364595", "0.7354343", "0.7352257", "0.73473334", "0.7344343", "0.7332879", "0.7329443", "0.73221916", "0.7305555", "0.72973394", "0.72962326", "0.7288704", "0.717986", "0.7179272", "0.716668", "0.71655536", "0.7121705", "0.7113592", "0.71116203", "0.7109132", "0.7107794", "0.7107287", "0.7104969", "0.7087269", "0.70869166", "0.7075518", "0.70694506", "0.7063009", "0.7059339", "0.70585644", "0.70516413", "0.7042428", "0.7035142", "0.70304614", "0.7027351", "0.702372", "0.69723165", "0.6969194", "0.6961996", "0.696026", "0.6955393", "0.69472903", "0.694509", "0.6942668", "0.69416726", "0.6920765", "0.6916748", "0.69082904", "0.68941754", "0.6886802", "0.68733525", "0.6859961", "0.68599474", "0.6851882", "0.6839751", "0.6835813", "0.6830182", "0.68173504", "0.6816258", "0.6814432", "0.6812169", "0.6811597", "0.68096817", "0.68016905", "0.6800334", "0.67975205", "0.67832077", "0.6774808", "0.6753099", "0.67508525", "0.6748525", "0.6743316", "0.67412925", "0.6740233", "0.6733151", "0.6721258", "0.67183626", "0.67133814", "0.6711009", "0.6710823", "0.67063034" ]
0.0
-1
Are the Clickable Elements Clickable Tests
@Test public void demoqaLinkIsClickable() { assertTrue(ServicesLogic.demoqaLinkIsClickable()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void verifyUIElements(){\r\n\t\t\tisClickable(Txt_HomePage_Search);\r\n\t\t\tisClickable(Btn_HomePage_Search);\r\n\t\t}", "boolean hasClickView();", "public void isElementClickable(WebElement elem) {\n try {\n driverWait.until(ExpectedConditions.elementToBeClickable(elem));\n System.out.println(\"Element is clickable\");\n } catch (Exception e) {\n Assert.fail(\"The element isn't clickable\");\n }\n }", "@Test\n public void ShowMoreIncomeButton() {\n onView(withId(R.id.showMoreIncome)).check(matches(isDisplayed())); // Find button\n onView(withId(R.id.showMoreIncome)).check(matches(isClickable())); // Check if clickable\n onView(withId(R.id.showMoreIncome)).perform(click()); // Perform click\n intended(hasComponent(showMoreIncome.class.getName())); // Opens more income page\n }", "@Test\n public void checkElements() {\n mActivityTestRule.launchActivity(intentForWeb()); // launch the activity with the intent\n\n onWebView().check(webContent(hasElementWithId(\"email_input\")));\n onWebView().check(webContent(hasElementWithId(\"password_input\")));\n onWebView().check(webContent(hasElementWithId(\"submit_button\")));\n }", "boolean isDisplayed();", "public boolean isDisplayed();", "public void testCheckButtons() {\n onView(withId(R.id.quiz_button)).perform(click());\n pressBack();\n onView(withId(R.id.flash_button)).perform(click());\n pressBack();\n onView(withId(R.id.quiz_button)).perform(click());\n onView(withId(R.id.quiz_make)).perform(click());\n pressBack();\n onView(withId(R.id.quiz_take)).perform(click());\n onView(withId(R.id.quiz_all)).perform(click());\n onView(withId(R.id.homeButton)).perform(click());\n\n\n }", "@Test\n public void testifyBtn() throws InterruptedException {\n onView(withId(R.id.SaveButton)).check(matches(isDisplayed()));\n\n }", "@Test(priority =1)\r\n\tpublic void button() {\r\n button = driver.findElement(By.cssSelector(\"button.black\"));\r\n assertFalse(button.isDisplayed());\r\n //sf.assertFalse(button.isDisplayed());\r\n System.out.println(\"Print this\");\r\n\t}", "private static boolean isElementClickable(WebDriver driver,\n\t\t\tWebElement element) {\n\t\ttry {\n\t\t\tlogger.info(\"Checking if Element is Clickable\");\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\n\t\t\treturn true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tlogger.info(\"Some thing wrong with Element \" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\r\n public void testMouseClicked() {\r\n }", "@Test\n public void ShowMorePaymentsButton() {\n onView(withId(R.id.showMorePayments)).check(matches(isDisplayed())); // Find button\n onView(withId(R.id.showMorePayments)).check(matches(isClickable())); // Check if clickable\n onView(withId(R.id.showMorePayments)).perform(click()); // Perform click\n intended(hasComponent(showMorePayments.class.getName())); // Opens more payments page\n }", "@Test\n public void activityLaunch() {\n onView(withId(R.id.button_main)).perform(click());\n onView(withId(R.id.text_header)).check(matches(isDisplayed()));\n\n onView(withId(R.id.button_second)).perform(click());\n onView(withId(R.id.text_header_reply)).check(matches(isDisplayed()));\n }", "boolean isContentDisplayed();", "private static boolean isElementClickable(WebDriver driver, By by) {\n\t\tWebElement element;\n\t\ttry {\n\t\t\telement = driver.findElement(by);\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\n\t\t\treturn true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "private void assertStreamItemViewHasOnClickListener() {\n assertFalse(\"listener should have not been invoked yet\", mListener.clicked);\n mView.performClick();\n assertTrue(\"listener should have been invoked\", mListener.clicked);\n }", "@Test\n public void checkAddMenuButtonPresent() {\n onView(withId(R.id.menu_add)).check(matches(isDisplayed()));\n }", "@Test(groups=\"Smoke\")\n\tpublic void Test_Sports_Is_Clicked() throws IOException, Exception, InterruptedException\n\t{\n\t\t\tAssert.assertTrue(driver.getCurrentUrl().contains(\"sports\"));\n\t\t\t\n\t\t\n\t}", "private static void search_for_clickables(UiNode node) {\n\t\tif (node.getAttribute(\"clickable\").equals(\"true\") && !node.hasChild()) {\n\t\t\tUtil.log(node);\n\t\t}\n\n\t\tif (node.hasChild()) {\n\t\t\tfor (BasicTreeNode child : node.getChildren()) {\n\t\t\t\tif (child instanceof UiNode) {\n\t\t\t\t\tsearch_for_clickables((UiNode) child);\n\t\t\t\t} else {\n\t\t\t\t\tUtil.err(\"NON UiNode: \" + child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test(priority=3)\n\tpublic void verifySignUpBtn() {\n\t\tboolean signUpBtn = driver.findElement(By.name(\"websubmit\")).isEnabled();\n\t\tAssert.assertTrue(signUpBtn);\n\t}", "@Test (groups = {\"Regression\"})\n public void verifyElementsOnHarrowWebsiteHomePageAreDisplayed() {\n homePage.isDisplayedServicesBtn();\n }", "@Test\n public void testUusipeli() {\n \n testi.Uusipeli.doClick();\n assertEquals(true, true);\n }", "public void verifyNewTabDorMessageBoardsOpened() {\n Assert.assertTrue(boardButton.isDisplayed());\t\t\n\t}", "@Test\n public void myNeighboursList_selectAction_shouldShowDetailsActivity(){\n onView(ViewMatchers.withId(R.id.list_neighbours)).check(withItemCount(ITEMS_COUNT));\n //When : perform a click on RecyclerView item position 0\n onView(allOf(isDisplayed(), withId(R.id.list_neighbours)))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n //Then : TextView for neighbour name in Details Activity is displayed\n onView(ViewMatchers.withId(R.id.user_details_name)).check(matches(isDisplayed()));\n }", "@Test\n public void onKgsRBTNClicked(){\n onView(withId(R.id.kgsRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.lbsRBTN)).check(matches(isNotChecked()));\n }", "@Test\n public void testIsButtonConfirmarClicked() {\n }", "public boolean verifyElementIsClickableOnCheckoutOrderPage(String key){\n\n\t\treturn verifyElementIsClickable(checkoutOrderPropertiesReader.getProperties(key));\n\t}", "public void VerifyMainMenuItems() {\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Dashboard);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Initiatives);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_LiveMediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_MediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Audiences);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Offers);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_CreativeAssets);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Reports);\n\t}", "public boolean isClicked() { return clicked; }", "public boolean isClickable() {\n/* 899 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean waitForElementClickable(By targetElement) {\n try {\n info(\"Verifying readiness of the element :: \" + targetElement + \" to accept click operation\");\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.elementToBeClickable(targetElement));\n return true;\n } catch (TimeoutException e) {\n error(\"Exception occurred while verifying readiness of the element :: \" + targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new TimeoutException(Throwables.getStackTraceAsString(e));\n }\n }", "public String VerifyIsElementClickable(String object, String data) {\r\n\t\tString internalwait = CONFIG.getProperty(\"ImplicitWaitForElement\");\r\n\t\tint internalwaitNum = Integer.parseInt(internalwait);\r\n\t\twait = new WebDriverWait(driver, internalwaitNum);\r\n\t\ttry {\r\n\t\t\tAPP_LOGS.info(\"Wait until Element is clickable\");\r\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(By.xpath(object)));\r\n\t\t\tThread.sleep(4000);\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn Constants.KEYWORD_FAIL + \" Element Not Found or Clickable \" + e.getMessage();\r\n\t\t}\r\n\t\treturn Constants.KEYWORD_PASS;\r\n\t}", "@Test\n public void onLbsRBTNClicked(){\n onView(withId(R.id.lbsRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.kgsRBTN)).check(matches(isNotChecked()));\n }", "@Test(priority = 6)\n public void elementsOnDifferentElementsPageTest() {\n List<WebElement> checkboxesList = driver.findElements(By.className(\"label-checkbox\"));\n assertEquals(checkboxesList.size(), 4);\n List<WebElement> radioList = driver.findElements(By.className(\"label-radio\"));\n assertEquals(radioList.size(), 4);\n assertTrue(driver.findElement(By.className(\"colors\")).isDisplayed());\n assertTrue(driver.findElement(By.cssSelector(\"button[name='Default Button']\"))\n .isDisplayed());\n assertTrue(driver.findElement(By.cssSelector(\"input[value='Button']\"))\n .isDisplayed());\n }", "public boolean clickOnRequirements() throws Exception\n\t {\n\t\ttry\n\t\t{\n\t boolean st4=requirements.isEnabled();\n\t boolean st5=requirements.isDisplayed();\n\t System.out.println(st4);\n\t System.out.println(st5);\n\t \n\t //WebElement element1=driver.findElement(By.xpath(\"//a[@title='Test Repository']\"));\n\t WebDriverWait wait1 = new WebDriverWait(driver, 30);\n\t wait1.until(ExpectedConditions.elementToBeClickable(requirements));\n\t requirements.click();\n\t bp=new BasePage();\n\t bp.waitForElement();\n\t log.info(\"Successfully Landed on Requirements Page\");\n\t\n\t \n\t String validate_Requirements=validateRequirements.getText();\n\t String expmsg=\"Requirements\";\n\t if(validate_Requirements.equals(expmsg))\n\t {\n\t \tlog.info(\"Successfully Landed on Test Requirement Page\");\n\t \n\t \t}\n\t \n\t else\n\t {\n\t \t log.info(\"You are not in Test Requirement Page\");\n\t \n\t }\n\t return true;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t \n\t}", "public boolean mouseClicked(MouseEvent e)\r\n {\r\n double x = e.getX();\r\n double y = e.getY();\r\n \r\n //find if coordinates are in a \"button\"\r\n for (int i = 0; i < towerButtons.length; i++)\r\n {\r\n if (towerButtons[i].contains(x,y))\r\n {\r\n display.setUnit(dummyList.get(i));\r\n selectedIndex = i;\r\n }\r\n }\r\n \r\n //within bounds\r\n if ((new Rectangle2D.Double(initX, 0, width, height)).contains(x,y))\r\n return true;\r\n return false;\r\n }", "public boolean jsClick(By locator){\n \tboolean isClicked = false;\n \tfor(int attempt=0;attempt<3;attempt++) {\n \ttry {\n \t\tif(!isClicked) {\n \t\t//waitForElementClickable(locator);\n \t\t\twaitForElementPresent(elementTimeout);\n WebElement element = driver.findElement(locator);\n JavascriptExecutor executor = (JavascriptExecutor)driver;\n executor.executeScript(\"arguments[0].click();\", element);\n isClicked = true;\n \t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tisClicked = false;\n\t\t}\n \t}\n \treturn isClicked;\n }", "@Test (groups = {\"Regression\",\"Smoke\"})\n public void verifyClickOnServicesBtn() {\n homePage.clickOnServicesBtn();\n }", "@Override\n\tpublic boolean isClickable() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isClickable() {\n\t\treturn false;\n\t}", "public boolean isDisplayed_click_Digital_coupons_button(){\r\n\t\tif(click_Digital_coupons_button.isDisplayed()) { return true; } else { return false;} \r\n\t}", "@Test\n\tpublic void test3_checkButtons() throws GeneralLeanFtException{\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tSystem.out.println(\"Test 3 - Check Buttons Started\");\n\t\t\t\n\t\t\t//Check that the Main window should exist\n\t\t\tassertTrue(mySet.appExistsorNot());\t\t\t\n\t\t\t\n\t\t\t//Toolbar Object\n\t\t\tToolBar toolbar = mySet.OR.MainWindow().ToolBar(); \n\n\t\t\t// Clicking the JButton displays the required frame\n\t\t\ttoolbar.getButton(\"JButton\").press();\n\t\t\t\n\t\t\t//Getting the Image Buttons in the Panel\n\t\t\tButton[] imgButtons = mySet.OR.MainWindow().ImageButtonsPanelUiObject()\n\t\t\t .findChildren(Button.class,new ButtonDescription.Builder().nativeClass(\"javax.swing.JButton\").build());\n\t\t\t \n\t\t\t//There should be 3 Image Buttons\n\t\t\tassertEquals(3, imgButtons.length);\n\t\t\t\n\t\t\t//Trigger the Mouse Entered Event for the each button in the Panel\t\t\t\t\n\t\t\tRobot robo = new Robot();\t\t\t\n\t\t\tfor(Button btn : imgButtons)\n\t\t\t{\t\t\t\t\n\t\t\t\trobo.mouseMove(btn.getAbsoluteLocation().x,btn.getAbsoluteLocation().y);\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\t\n\t\t\t//Store the Original Dimension\n\t\t\tDimension orginalDimension = mySet.OR.MainWindow().ImageButtonsPanelUiObject().getSize();\n\t\t\t\n\t\t\t//Increase the Size by Selecting the Pad Radio Button\n\t\t\tmySet.OR.MainWindow().Pad10RadioButton().click();\n\t\t\t\n\t\t\t//Verify that the radio button is checked\n\t\t\tassertTrue(mySet.OR.MainWindow().Pad10RadioButton().isChecked()==true);\n\t\t\t\n\t\t\t//Store the New Dimension\n\t\t\tDimension newDimension = mySet.OR.MainWindow().ImageButtonsPanelUiObject().getSize();\n\t\t\t\n\t\t\t//Assert that Height Increases and Width Decreases\n\t\t\tassertTrue((newDimension.width < orginalDimension.width) && (newDimension.height > orginalDimension.height));\n\t\t\t\n\t\t\t//Click the Enabled Check box\n\t\t\tmySet.OR.MainWindow().EnabledCheckBox().click();\n\t\t\t\n\t\t\t//Check that the Check Box has been unchecked \n\t\t\tassertTrue(mySet.OR.MainWindow().EnabledCheckBox().getState()==CheckedState.UNCHECKED);\n\t\t\t\n\t\t\t//Check that all Image Buttons are disabled\n\t\t\tfor(Button btn : imgButtons)\n\t\t\t{\n\t\t\t\tassertTrue(btn.isEnabled()==false);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unexpected Error Occurred. Message = \" + e.getMessage() + \"Stack Trace = \");\n\t\t\te.printStackTrace();\n\t\t\tassertTrue(false);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSystem.out.println(\"Test 3 - Check Buttons Finished\");\n\t\t}\n\t\t\n\t}", "public void cliniciansTabAreInViewMode() {\n\n\tString icon=addIconClinicians.getAttribute(\"data-ng-click\");\n\tif(icon.contains(\"isDisabled\")) {\n\t\tAssert.assertTrue(true);\n\t}\n\t\t\n\t}", "public static void isEleClickable(WebElement element, AndroidDriver driver, String eleName) throws IOException {\n\t\ttry {\n\t\t\tlogger.info(\"---------Method is Element clickable ---------\");\n\t\t\tWait<AndroidDriver> wait = new FluentWait<AndroidDriver>(driver).withTimeout(1, TimeUnit.MINUTES)\n\t\t\t\t\t.pollingEvery(250, TimeUnit.MICROSECONDS).ignoring(NoSuchElementException.class);\n\t\t\tAssert.assertTrue(wait.until(ExpectedConditions.elementToBeClickable(element)) != null);\n\t\t\tSystem.out.println(\" element is clickable \");\n\t\t} catch (AssertionError e) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify \" + \"\\'\" + eleName + \"\\'\" + \" is clickable || \"\n\t\t\t\t\t+ \"\\'\" + eleName + \"\\'\" + \" is not clickable\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, eleName));\n\t\t\tSystem.out.println(\" element is not clickable \");\n\t\t\tthrow e;\n\t\t} catch (Exception e) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify \" + \"\\'\" + eleName + \"\\'\" + \" is clickable || \"\n\t\t\t\t\t+ \"\\'\" + eleName + \"\\'\" + \" is not clickable\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, eleName));\n\t\t\tSystem.out.println(\" element is not clickable \");\n\t\t\tthrow e;\n\t\t}\n\t}", "public void click_CheckavailabitlityButton()\r\n\t{\r\n\t\r\n\r\n\t\tSystem.out.println(\"Inside of the checkavailabitlity\");\r\n\t\t\r\n\t\t/*\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\r\n\t\tJavascriptexecutor(Checkavailability);\r\n\t\t//System.out.println(\"clicked on Checkavailability\");\r\n\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\r\n\t\t */\r\n\t\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\t\tif (Checkavailability.isDisplayed() ) \r\n\t\t{\r\n\t\t\t\r\n\t\t\t//Checkavailability.click();\r\n\t\t\tJavascriptexecutor(Checkavailability);\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\t\tExplicitWait(Checkavailability);\r\n\r\n\t\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t//System.out.println(\"BookNow button not found\");\r\n\t\t\tlogger.error(\"Check Availability button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Check Availability button not found\");\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "@Test\n public void neighbourDetailOpen() {\n ViewInteraction recyclerView = onView(\n allOf(withId(R.id.list_neighbours),isDisplayed()));\n recyclerView.perform(actionOnItemAtPosition(0, click()));\n }", "public boolean isContextClickable() {\n/* 1178 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void checkButtonClickToast4() {\n onView(withText(\"Cheesecake\")).perform(click());\n onView(withText(\"Ensure data connectivity\")).inRoot(new ToastMatcher())\n .check(matches(isDisplayed()));\n }", "private boolean clickBonusLink(WebElement element) {\n if (element == null)\n return false;\n\n //if not displayed we can't click it\n if (!element.isDisplayed())\n return false;\n\n //click links with words\n if (element.getText() == null || element.getText().trim().length() < 1)\n return false;\n\n //don't click remove goal link\n if (element.getText().toUpperCase().contains(\"REMOVE\") ||\n element.getText().toUpperCase().contains(\"REDEEM\"))\n return false;\n\n //get the populated value for the class of this web element\n String value = element.getAttribute(\"class\");\n\n //all links we want to click have specific values in the class attribute\n if (value == null || value.trim().length() < 1)\n return false;\n if (!value.toLowerCase().contains(\"c-call-to-action\"))\n return false;\n if (!value.toLowerCase().contains(\"c-glyph\"))\n return false;\n if (!value.toLowerCase().contains(\"f-lightweight\"))\n return false;\n\n //notify user\n displayMessage(\"Clicking link: \" + element.getText());\n\n //we know the element is good now, so we can click it\n element.click();\n\n //sleep for a short time\n pause();\n\n //we have success\n return true;\n }", "@Test\n public void testC_DeleteMenuIsEnabled() {\n //get row count\n int rowCount = menuTable.getColumns().size();\n assertNotEquals(\"Table has no data: Cannot test.\", rowCount, 0);\n\n // Select row and get menu.\n Node cell = lookup(\".table-row-cell\").nth(0).query();\n clickOn(cell);\n verifyThat(\"#btnDeleteMenu\", isEnabled());\n\n \n }", "private boolean testFocusability(Component aComponent) {\n return focused.contains(aComponent);\n }", "public boolean isSearchButtonActivated() {\n\t\tboolean result;\n\t\tlog.debug(\"Getting window handles\");\n\t\tArrayList<String> tabs1 = new ArrayList<String>(\n\t\t\t\tdriver.getWindowHandles());\n\t\tlog.debug(\"Clicking on search button\");\n\t\tdriver.findElement(search_button).click();\n\t\tlog.debug(\"Getting window handles\");\n\t\tArrayList<String> tabs2 = new ArrayList<String>(\n\t\t\t\tdriver.getWindowHandles());\n\t\tif (tabs1.size() == tabs2.size())\n\t\t\tresult = false;\n\t\telse\n\t\t\tresult = true;\n\t\tlogger.log(Status.INFO, \"Search button is activated: \" + result);\n\t\tlog.info(\"Search button is activated: \" + result);\n\t\treturn result;\n\t}", "public boolean isClicked() {\n\t\treturn clicked;\n\t}", "@Test\n public void checkFilterButton() throws InterruptedException {\n HomePage homePage = new HomePage(driver);\n homePage.search();\n\n Courses courses = new Courses(driver);\n Boolean filterDisplayed = courses.clickFilter();\n\n Assert.assertTrue(filterDisplayed);\n }", "public boolean isMouseClicked() {\n\t\treturn input.isMouseClicked();\n\t}", "@Override\r\npublic void beforeClickOn(WebElement arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}", "public boolean isClickable(Hex hex) {\n for (ClickableHighlightRequest request : requests) {\n for (Hex rhex : request.getRegion()) {\n if (rhex.equals(hex)) return true;\n }\n }\n return false;\n }", "@Override\n public boolean isOpen(){\n boolean statement = isElementPresent(czDppButon); //TODO - zmena na pozdejsi stranku\n if(!statement){ DriverSettings.takeScreenshot(); }\n return statement;\n }", "public boolean isClicked() {\n\n// Cycles through all menu cursors\n for (MenuCursor cursor : Main.cursors) {\n\n// If the cursor has a controller and the select button is clicked, return true\n if (cursor.controller != null) {\n if (Main.contains(Main.recentButtons.get(cursor.controller), ControllerButtons.A)) {\n if (isCursorOver(cursor)) {\n this.cursor = cursor;\n return true;\n }\n }\n\n// Otherwise, if the cursor is using a keyboard and the select button is pressed, return true\n } else {\n if (Gdx.input.isKeyJustPressed(Keys.MENU_SELECT)) {\n if (isCursorOver(cursor)) {\n this.cursor = cursor;\n return true;\n }\n }\n }\n }\n// If none of these events occur, return false\n return false;\n }", "@Test\n public void checkIfAddMeetingIsRunning() {\n onView(withId(R.id.add_meeting_activity)).perform(click());\n onView(withId(R.id.meeting_color)).perform(click());\n onView(withId(R.id.meeting_room)).perform(click());\n onView(withText(\"Salle DEUX\")).perform(click());\n onView(withId(R.id.meeting_topic)).perform(typeText(\"Mareu_2\"));\n onView(withId(R.id.date_btn)).perform(click());\n onView(withId(R.id.meeting_date)).perform();\n onView(withText(\"OK\")).perform(click());\n onView(withId(R.id.start_time_btn)).perform(click());\n onView(withId(R.id.meeting_start_time)).perform();\n onView(withText(\"OK\")).perform(click());\n onView(withId(R.id.end_time_btn)).perform(click());\n onView(withId(R.id.meeting_end_time)).perform();\n onView(withText(\"OK\")).perform(click());\n onView(withId(R.id.meeting_guests)).perform(typeText(\"[email protected] ; [email protected]\"));\n onView(withId(R.id.meeting_add_button)).check(matches(isDisplayed()));\n }", "@Test\n public void onFemaleRBTNClicked(){\n onView(withId(R.id.femaleRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.maleRBTN)).check(matches(isNotChecked()));\n }", "@Test\r\n public void testMousePressed() {\r\n }", "@Test\n public void checkButtonClickToast1() {\n onView(withText(\"Nutella Pie\")).perform(click());\n onView(withText(\"Ensure data connectivity\")).inRoot(new ToastMatcher())\n .check(matches(isDisplayed()));\n }", "@Step(\"There are the following elements on Different Elements page: 4 checkboxes, 4 radios, 1 dropdown, 2 buttons\")\n public void checkElements() {\n checkboxes.shouldHaveSize(4);\n radios.shouldHaveSize(4);\n dropdown.shouldBe(Condition.exist);\n buttons.shouldHaveSize(2);\n }", "public static void waitForClickability(WebElement element){\n getWait().until(ExpectedConditions.elementToBeClickable(element));\n }", "public boolean isElementDisplayed(By locator) {\n\t\ttry {\n\t\t\tfindElement(locator);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tLOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isDisplayed_click_ActivateCoupon_Button(){\r\n\t\tif(click_ActivateCoupon_Button.isDisplayed()) { return true; } else { return false;} \r\n\t}", "public boolean isDisplayed_click_Fuel_Rewards_Link(){\r\n\t\tif(click_Fuel_Rewards_Link.isDisplayed()) { return true; } else { return false;} \r\n\t}", "Boolean isTouchable();", "@And (\"^I click on \\\"([^\\\"]*)\\\"$\")\n\tpublic void click_on(String object){\n\t\tString result = selenium.clickButton(object);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}", "@Test\n public void testGridViewIsDisplayed() {\n onView(ViewMatchers.withId(R.id.gridView)).check(matches(isDisplayed()));\n }", "@Test\n public void onMaleRBTNClicked(){\n onView(withId(R.id.maleRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.femaleRBTN)).check(matches(isNotChecked()));\n }", "@Test\n public void test_call_Ambulance_Button_launches_Dialog() {\n onView(withText(\"I understand\")).perform(click());\n //Find the views and perform the action\n onView(withId(R.id.redFlag_call_ambulance)).perform(click());\n //Check if action returns desired outcome\n onView(withText(\"CALL AMBULANCE?\")).check(matches(isDisplayed()));\n\n }", "@RestrictTo(RestrictTo.Scope.LIBRARY)\n public boolean isSliceViewClickable() {\n return mOnClickListener != null\n || (mListContent != null && mListContent.getShortcut(getContext()) != null);\n }", "public boolean canProceedWithTapAction() {\n return ClickDelayHelper.canProceedWithTapAction();\n }", "public boolean isClicked() {\n\t\tif(GameMouse.getInstance().getX() < x || GameMouse.getInstance().getX() > x + width) {\n\t\t\treturn false; //X is outside our button\n\t\t}\n\t\tif(GameMouse.getInstance().getY() < y || GameMouse.getInstance().getY() > y + height) {\n\t\t\treturn false; //X is outside our button\n\t\t}\n\t\treturn GameMouse.getInstance().isClicked(GameMouse.LEFT_BUTTON);\n\t}", "@Test\n\tpublic void TestAct9() {\n\t\tdriver.findElement(By.xpath(\"//li[5]/a\")).click();\n\t\tdriver.findElement(By.xpath(\"//div/section[2]/div[2]/div[2]/div[2]/div[2]/a\")).click();\n\t\tdriver.findElement(By.id(\"user_login\")).sendKeys(\"root\");\n\t\tdriver.findElement(By.id(\"user_pass\")).sendKeys(\"pa$$w0rd\");\n\t\tdriver.findElement(By.id(\"wp-submit\")).click();\n\n\t\t//Viewing the course for Activity 9\n\t\tdriver.findElement(By.xpath(\"//li[2]/a\")).click();\n\t\tdriver.findElement(By.xpath(\"//div[2]/p[2]/a\")).click();\n\t\tdriver.findElement(By.xpath(\"//div[1]/a/div[2]\")).click();\n\n\t\tString t = driver.getTitle();\n\t\tAssert.assertEquals(\"Developing Strategy – Alchemy LMS\", t);\n\n\t\tWebElement s = driver.findElement(By.xpath(\"//div[4]/div[2]\"));\n\t\tString a = s.getText();\n\t\tBoolean c = a.contains(\"Mark Completed\");\n\n\t\tif (c==true)\n\t\t{\n\t\t\ts.click();\n\t\t\tSystem.out.println(\"Found \"+a+\", hence clicking on it.\");\n\t\t} \n\t\telse {\n\t\t\tSystem.out.println(\"Found \"+a+\", hence not clicking on it.\");}\n\t}", "@Override\n public boolean performClick() {\n return super.performClick();\n }", "public boolean getIsClick() {return isClick;}", "public boolean clickMyWebinarsLink(){\n\t\tif(util.clickElementByLinkText(\"My Webinars\")==\"Pass\"){\n\t\t\tSystem.out.println(\"Left Frame >> My Webinar link clicked successfully...............\");\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n \t\t\n \t}", "@Test\n public void myNeighboursList_shouldNotBeEmpty() {\n // First scroll to the position that needs to be matched and click on it.\n onView(allOf(withId(R.id.list_neighbours),isDisplayed()))\n .check(matches(hasMinimumChildCount(1)));\n }", "@Override\n public boolean isLearnMoreDisplayed() {\n\n setLogString(\"Check if Learn More is displayed\", true, CustomLogLevel.HIGH);\n return isDisplayed(getDriver(), By.cssSelector(\".help_icon.clickable\"), TINY_TIMEOUT);\n }", "public void verifyTabInViewMode() {\n\t\tmoveToElement(addIconDisabled);\n\t\tString value=addIconDisabled.getAttribute(\"disabled\");\n\t\tif(value.contains(\"disabled\")) {\n\t\t\tAssert.assertTrue(true);\n\t\t}\n\t}", "@Test\n public void clickListTest() {\n\n onView(withId(R.id.rv_list)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n }", "@Test\n public void isSellableTest() {\n // TODO: test isSellable\n }", "@Test(priority=2)\n\tpublic void verifyPresenceOfLinksinLeftsideMenu() throws Exception {\n\t\t\n\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.overviewOptioninSiderBar),\n\t\t\t\t\"Overview option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.leadsOptioninSiderBar),\n\t\t\t\t\"Leads option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.myStockOptioninSiderBar),\n\t\t\t\t\"My stock option is not present in side bar\");\n\t\tclick(overviewObj.myStockOptioninSiderBar);\n\t\twaitTill(1000);\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.allMyStockOptioninSiderBar);\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.createMyStockOptioninSiderBar),\n\t\t\t\t\"Create my stock option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.allMyStockOptioninSiderBar),\n\t\t\t\t\"All my stock option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.marketInsightOptioninSiderBar),\n\t\t\t\t\"Market insight option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.profileOptioninSiderBar),\n\t\t\t\t\"Profile option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.monthlyPackageOptioninSiderBar),\n\t\t\t\t\"Monthly package option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.contactOptioninSiderBar),\n\t\t\t\t\"Contact option is not present in side bar\");\n\t\tclick(overviewObj.contactOptioninSiderBar);\n\t\twaitTill(1000);\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.privacyOptionunderContactlinkSiderBar);\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.termsOptionunderContactlinkSiderBar),\n\t\t\t\t\"Terms link under Contact option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.privacyOptionunderContactlinkSiderBar),\n\t\t\t\t\"Privacy link under Contact option is not present in side bar\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.contactOptionunderContactlinkSiderBar),\n\t\t\t\t\"Contact link under Contact option is not present in side bar\");\n\t}", "@Test\n public void checkButtonClickToast2() {\n onView(withText(\"Brownies\")).perform(click());\n onView(withText(\"Ensure data connectivity\")).inRoot(new ToastMatcher())\n .check(matches(isDisplayed()));\n }", "@Override\r\n public void beforeClickOn(final WebElement arg0, final WebDriver arg1) {\n\r\n }", "public void clickSubmitInkAndTonnerSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ink and Tonner Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnInkSeacrh\"));\r\n\t\t\tclick(locator_split(\"btnInkSeacrh\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Ink and Tonner Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Ink and Tonner Search icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ink and Tonner Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnInkSeacrh\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "@Test\n\tpublic void guiElementsTest() throws Exception {\n\t\tif (Configuration.shufflerepeat &&\n\t\tConfiguration.featureamp&&\n\t\tConfiguration.playengine&&\n\t\tConfiguration.choosefile&&\n\t\tConfiguration.gui&&\n\t\tConfiguration.skins&&\n\t\tConfiguration.light&&\n\t\tConfiguration.filesupport&&\n\t\tConfiguration.showtime&&\n\t\tConfiguration.volumecontrol&&\n\t\tConfiguration.mute\n\t\t) {\t\n\n\t\tstart();\n\t\tJMenu menu = (JMenu) MemberModifier.field(Application.class, \"menu\").get(gui);\n\t\tassertEquals(menu.getName(), \"menu\");\n\t\tJMenuItem menuItem = menu.getItem(0);\n\t\tassertTrue(menuItem.getComponentListeners() != null);\n\t\t}\n\t}", "@Test\n public void checkListView(){\n //assert awaiting approval view\n View awaitingApprovalView = solo.getView(\"awaiting_approval\");\n assertTrue(solo.waitForText(\"Awaiting Approval\",1,2000));\n //Check for list of awaiting approvals\n View awaitingApprovalListView = solo.getView(\"books_awaiting_list\");\n //click on list of borrowed books\n solo.clickOnView(awaitingApprovalListView);\n solo.assertCurrentActivity(\"Wrong Activity\", Host.class);\n\n\n }", "@Test\n public void myMeetingDetailsActivity_isLaunchedWhenWeClickOnAnItem() {\n // When perform a click on an item\n onView(withId(R.id.recyclerview)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n // Then : MeetingDetailsActivity is launched\n onView(withId(R.id.activity_meeting_details));\n }", "public boolean isDisplayed_click_My_Rewards_Link(){\r\n\t\tif(click_My_Rewards_Link.isDisplayed()) { return true; } else { return false;} \r\n\t}", "public void testGetButton() {\n\t\tassertEquals(this.myButton.getJComponent(),this.myButton.getButton());\n\t}", "@Test\r\n public void testIsValidTap() {\r\n assertTrue(boardManager3.isValidTap(7));\r\n assertTrue(boardManager3.isValidTap(5));\r\n assertFalse(boardManager3.isValidTap(0));\r\n }", "public boolean clickUsers() {\r\n try {\r\n\r\n WebElement UserName = (new WebDriverWait(driver, 90))\r\n .until(ExpectedConditions.visibilityOfElementLocated(Users_xPath));\r\n UserName.getAttribute(\"title\");\r\n UserName.click();\r\n driver.manage().timeouts().implicitlyWait(20L, TimeUnit.SECONDS);\r\n Thread.sleep(2000);\r\n return true;\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }", "@Test\n public void checkSearchScreenUIComponents() {\n onView(withText(R.string.image_search)).check(matches(isDisplayed()));\n onView(withText(R.string.web_search)).check(matches(isDisplayed()));\n // Verify search view is visible\n onView(withId(R.id.search_view)).check(matches(isDisplayed()));\n // Verify No Result image is visible\n onView(withId(R.id.no_result_image)).check(matches(isDisplayed()));\n }", "public void verifyApplyButtonInAboutMe() throws UIAutomationException{\r\n\t\telementController.requireElementSmart(fileName,\"Apply Button In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Apply Button In About Me\");\r\n\t\t\t\t\r\n\t\t// Assertion : Check Button is present on page\r\n\t\tString linkText=dataController.getPageDataElements(fileName, \"Apply Button Name In About Me\", \"Name\");\r\n\t\tSystem.out.println(linkText);\r\n // UIActions.waitForLinkText(linkText,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}", "boolean currentNodeRequiresClickInWebKit(){\r\n \tif( _currentFocusNode == null ){\r\n \t\treturn false;\r\n \t} \t\r\n if( DeviceInfo.isBlackBerry6() ){\r\n if( _currentFocusNode instanceof HTMLInputElement ){\r\n String type = ( ( HTMLInputElement ) _currentFocusNode ).getType();\r\n return REQUIRE_CLICK_INPUT_TYPES.indexOf( type ) > 0;\r\n }\r\n } \r\n return false;\r\n }" ]
[ "0.73419523", "0.6881592", "0.6815796", "0.68031406", "0.67907655", "0.66848224", "0.65133727", "0.6477356", "0.64451104", "0.64298564", "0.6410762", "0.64047146", "0.63964653", "0.6379417", "0.636899", "0.6354126", "0.6331372", "0.63138896", "0.6312826", "0.6281983", "0.62725115", "0.62543505", "0.6254169", "0.6245391", "0.6211444", "0.62003404", "0.61719114", "0.61452246", "0.6131495", "0.6121432", "0.6104385", "0.6077511", "0.6074956", "0.6058518", "0.6043592", "0.60344", "0.6025091", "0.60018563", "0.5991775", "0.59874904", "0.59874904", "0.59745187", "0.59460336", "0.5931473", "0.592663", "0.59265685", "0.5921966", "0.5907186", "0.5905933", "0.59001315", "0.58987755", "0.58961535", "0.5892645", "0.5888516", "0.5886849", "0.58824146", "0.5877602", "0.5872585", "0.5871156", "0.5866862", "0.58632284", "0.5856308", "0.5836989", "0.5833696", "0.5833613", "0.5832165", "0.581312", "0.5809745", "0.5806778", "0.580459", "0.5802552", "0.5802031", "0.580137", "0.57943875", "0.5782779", "0.5772986", "0.5770542", "0.57688504", "0.57651037", "0.5746607", "0.5745914", "0.5742019", "0.5740132", "0.5739868", "0.5736368", "0.5731516", "0.5731281", "0.57262444", "0.5725054", "0.5717214", "0.5716171", "0.5711566", "0.57115644", "0.5705883", "0.57042056", "0.56945056", "0.5694149", "0.5692908", "0.5692558", "0.5690408" ]
0.6635579
6
Do the links redirect to the correct URL Tests
@Test public void testRedirectToAboutUs() { ServicesLogic.redirectToAboutUs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testMultiRedirectRewrite() throws Exception {\n final CountDownLatch signal = new CountDownLatch(1);\n try {\n final String requestString = \"http://links.iterable.com/a/d89cb7bb7cfb4a56963e0e9abae0f761?_e=dt%40iterable.com&_m=f285fd5320414b3d868b4a97233774fe\";\n final String redirectString = \"http://iterable.com/product/\";\n final String redirectFinalString = \"https://iterable.com/product/\";\n IterableHelper.IterableActionHandler clickCallback = new IterableHelper.IterableActionHandler() {\n @Override\n public void execute(String result) {\n assertEquals(redirectString, result);\n assertFalse(redirectFinalString.equalsIgnoreCase(result));\n signal.countDown();\n }\n };\n IterableApi.getAndTrackDeeplink(requestString, clickCallback);\n assertTrue(\"callback is called\", signal.await(5, TimeUnit.SECONDS));\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testLinkRoutes()\n {\n String[] links = {\"CS1632 D3 Home\", \"Factorial\", \"Fibonacci\", \"Hello\", \"Cathedral Pics\"};\n String[] routes = {\"/\", \"/fact\", \"/fib\", \"/hello\", \"/cathy\"};\n\n for (int i = 0; i < links.length && i < routes.length; i++) {\n driver.findElement(By.linkText(links[i])).click();\n String url = driver.getCurrentUrl();\n assertTrue(url.contains(routes[i]));\n }\n }", "@Test(priority = 1)\n\tpublic void homePageRedirection() {\n\t\tlogger = extent.startTest(\"Flight Booking\");\n\t\tlog.info(\"Starting Redirection validation\");\n\t\thome.isRedirectionCorrect();\n\t\tlog.info(\"Redirection is on the correct page\");\n\t\tlog.info(\"Starting the homepage testing\");\n\t}", "@Test(enabled = true)\n public void checkLink() {\n System.out.println(\"We Are Now Testing 20 Test Cases On: \" + driver.getCurrentUrl());\n System.out.println(\"*****************************************************************\");\n\n String expectedLink = \"https://www.expedia.com/\";\n String actualLink = driver.getCurrentUrl();\n\n //Validate Links\n Assert.assertEquals(actualLink, expectedLink, \"Test Failed, Link Does Not Match\");\n\n }", "@Test(priority = 4)\n\tpublic void homePageRedirection() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"HomepageRedirection\");\n\t\tlog.info(\"Starting Redirection validation\");\n\t\thome.isRedirectionCorrect(validate);\n\t\tlog.info(\"Redirection is on the correct page\");\n\t\tlog.info(\"Starting the Hero Image Product Validation testing\");\n\n\t}", "@Test\n public void testLink() {\n try {\n Message email = emailUtils.getMessagesBySubject(\"You've received a document via HelloSign\", true, 5)[0];\n String link = emailUtils.getUrlsFromMessage(email, Data.mainUrl + \"/t\").get(0);\n\n driver.get(link);\n\n //TODO: continue testing\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "@Test\n\tpublic void testGetUrl_1()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\n\t\tString result = fixture.getUrl();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@Test\n public void testLinkRoutesReverse()\n {\n driver.get(\"https://cs1632ex.herokuapp.com/cathy\");\n\n String[] links = {\"Cathedral Pics\", \"Hello\", \"Fibonacci\", \"Factorial\", \"CS1632 D3 Home\"};\n String[] routes = {\"/cathy\", \"/hello\", \"/fib\", \"/fact\", \"/\"};\n\n for (int i = 0; i < links.length && i < routes.length; i++) {\n driver.findElement(By.linkText(links[i])).click();\n String url = driver.getCurrentUrl();\n assertTrue(url.contains(routes[i]));\n }\n }", "@Test\r\n\tpublic void testScanePage_malformedLink() {\n\t}", "@Test\n public void testManualTest()\n {\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n\t //sanity check\n\t ResultPair sane = new ResultPair(\"http://www.amazon.com\", true);\n\t collector.checkThat(sane.item, sane.valid, equalTo(urlVal.isValid(sane.item)));\n\t //test manualUrls\n\t for(ResultPair res : this.m_fileUrls)\n\t {\n\t\t collector.checkThat(res.item, res.valid, equalTo(urlVal.isValid(res.item)));\n\t }\n }", "@Test\n\tpublic void testGetLinksMultipleLinks() {\n\t\tList<String> results = helper.getLinks(\n\t\t\t\t\"drop tables; <A HREF=\\\"test.com\\\"> <a href=\\\"nexttest.org\\\". junk junk\", null);\n\t\tassertEquals(2, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t\tassertEquals(\"nexttest.org\", results.get(1));\n\t}", "@Test\n\tpublic void testGetLinksRelativeLink() {\n\t\tList<String> results = helper\n\t\t\t\t.getLinks(\"drop tables; <A HREF=\\\"/test\\\"> junk junk\", \"http://www.bobbylough.com\");\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"http://www.bobbylough.com/test\", results.get(0));\n\t}", "public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}", "@Test\n public void clickFaqLink() {\n homePage.clickAboutLink().clickFaqLink();\n }", "@Test\n public void testDNSRedirect() throws Exception {\n final CountDownLatch signal = new CountDownLatch(1);\n try {\n final String requestString = \"http://links.iterable.com/a/f4c55a1474074acba6ddbcc4e5a9eb38?_e=dt%40iterable.com&_m=f285fd5320414b3d868b4a97233774fe\";\n final String redirectString = \"http://iterable.com/product/fakeTest\";\n final String redirectFinalString = \"https://iterable.com/product/fakeTest\";\n IterableHelper.IterableActionHandler clickCallback = new IterableHelper.IterableActionHandler() {\n @Override\n public void execute(String result) {\n assertEquals(redirectString, result);\n assertFalse(redirectFinalString.equalsIgnoreCase(result));\n signal.countDown();\n }\n };\n IterableApi.getAndTrackDeeplink(requestString, clickCallback);\n assertTrue(\"callback is called\", signal.await(5, TimeUnit.SECONDS));\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "HtmlPage clickSiteLink();", "@Test(priority = 1)\n public void printBrokenLinks() {\n\t HttpURLConnection httpCon;\n\t /*\n\t * filter all the anchor tags whose href attribute is empty/broken/third party domain link and are commented.\n\t */\n\t List<WebElement> anchorElem = driver.findElements(By.tagName(\"a\")).stream().filter(elem->elem.getAttribute(\"href\")!=null || elem.getAttribute(\"href\").startsWith(\"javaScript:void(0)\")).\n\t\t\t filter(elem-> !elem.getAttribute(\"href\").isBlank() ||\n\t\t\t !elem.getAttribute(\"href\").isEmpty() ||\n\t\t\t !elem.getAttribute(\"href\").startsWith(baseUrl)).collect(Collectors.toList());\n\t for (WebElement anchor : anchorElem) {\n\t\tString url = anchor.getAttribute(\"href\");\n\t\t/*Get the http connection. connect to link and get response code\n\t\t * Use HEAD request method. GET can be used. But, we need only response code.\n\t\t * \n\t\t */\n\t\ttry {\n\t\t\tSystem.out.println(url);\n\t\t\thttpCon = (HttpURLConnection) new URL(url).openConnection();\n\t\t\thttpCon.setRequestMethod(\"HEAD\");\n\t\t\thttpCon.connect();\n\t\t\tint respCode = httpCon.getResponseCode();\n\t\t\tif(respCode >= 400) {\n\t\t\t\tSystem.out.println(url+\" is a broken link.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}finally {\n\t\t\t\n\t\t}\n\t}\n\t\t\t\t\t\n\t\t\t \n\t \n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageviewLinks() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Functionalities of links present in Manage views page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvManageView\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\t \t\t\t\t\t \t \t\t\t\t \t \t\t\n\t\t.ManageviewNavigationLinks();\t\t\t \t \t\t\n\n\t}", "public void clickLinkAndCheckURL(WebDriver driver, StackTraceElement t, By by, String expectedURL, Boolean ifBack) throws IOException{\n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(by).click();\n\t\t\t waitUntilUrl(driver, 10, previousURL);\n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t getAssertEquals(t, driver, \"URL are not the same!\",\n\t\t actualURL.toLowerCase(), expectedURL.toLowerCase()));\n\t\t\t if (ifBack) { getUrlWaitUntil(driver, 15, previousURL); }\t\t \n\t }", "@BeforeClass\n public void GotoURL() {\n\t\tString URL = Base.GetDataFromPropertiesFile(\"url1\");\n\t\t// set implicit wt at page level\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(300, TimeUnit.SECONDS);\n\t\tdriver.get(URL);\n\t\t\n\n\t \n }", "HtmlPage clickLink();", "@Test\n public void urlTest() {\n // TODO: test url\n }", "@Test\n public void clickResourceLink() {\n aboutPage.clickResourceLink();\n }", "public abstract void redirect(String url) throws IOException;", "@Test\n\tpublic void testGetLinksUpperCaseLink() {\n\t\tList<String> results = helper.getLinks(\"drop tables; <A HREF=\\\"test.com\\\"> junk junk\", null);\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t}", "public static void main(String[] args) {\n String redirectUrl1 = DownloadUtil.getRedirectUrl(\"http://www.pc6.com/down.asp?id=68253\");\n String redirectUrl2 = DownloadUtil.getRedirectUrl(redirectUrl1);\n String redirectUrl3 = DownloadUtil.getRedirectUrl(redirectUrl2);\n System.out.println(redirectUrl1);\n System.out.println(redirectUrl2);\n System.out.println(redirectUrl3);\n }", "@Test\n\tpublic void TestTwoLinksAreHandledOkay() {\n\t\tJabberMessage msg = new JabberMessage();\n\t\tmsg.setMessage(\"Hello There! http://reddit.com http://google.com\");\n\t\tmsg.setId(1);\n\t\tmsg.setUsername(\"Test\");\n\t\tmsg.setTimestamp(\"NOW!\");\n\t\tLink link = null;\n\t\ttry {\n\t\t\tlink = lh.convertMessageToLink(msg);\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Couldnt convert message to link\");\n\t\t}\n\t\tif (link.getUrl().equals(\"http://reddit.com\") || link.getUrl().equals(\"http://google.com\")) {\n\t\t\t// pass\n\t\t}\n\t\telse {\n\t\t\tfail(\"Can't handle two URL's\");\n\t\t}\n\t}", "@Test\n @Transactional\n public void testUrlsRequireAuthentication() throws Exception {\n final View view = viewTestTools.createView(\"TestView\");\n\n // View \"stream\" page.\n testUrlRequiresAuthentication(\"/stream/\" + view.getId(), false);\n }", "@Then(\"Verify all links are working\")\n\tpublic void verify_all_links_are_working() throws InterruptedException {\n\t \n\t\tdriver.findElement(By.partialLinkText(\"Notification\")).click();\n\t\tThread.sleep(3000);\n\t\t//Here I'm verifying page name\n\t\tString expNotName = \"Notifications Settings\";\n\t\tString actNotName = driver.findElement(By.xpath(\"//*[contains(text(),'Notifications Settings')]\")).getText();\n\t\tAssert.assertEquals(actNotName, expNotName);\n\t\t\n\t\t//Verifying Payment settings link\n\t\tdriver.findElement(By.partialLinkText(\"Payment\")).click();\n\t\t\n\t\tThread.sleep(2000);\n\t\t\n\t\t//here I'm verifying payment page name to make sure we're standing on the right page\n\t\tString expPayName = \"Payment Settings\";\n\t\tString actPayName = driver.findElement(By.xpath(\"//*[contains(text(),'Payment Settings')]\")).getText();\n\t\tAssert.assertEquals(actPayName, expPayName);\n\t\t\n\t\tThread.sleep(3000);\n\t}", "@Test\n\tpublic void demoqaLinkIsClickable() {\n\t\tassertTrue(ServicesLogic.demoqaLinkIsClickable());\n\t}", "@Test\n\tpublic void testSendRedirect_2()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\t\tString targetUrl = \"\";\n\t\tboolean http10Compatible = true;\n\n\t\tfixture.sendRedirect(request, response, targetUrl, http10Compatible);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testGetLinksOtherProperties() {\n\t\tList<String> results = helper.getLinks(\"drop tables; <A target=\\\"self\\\" href=\\\"test.com\\\"> junk junk\",\n\t\t\t\t\"http://www.bobbylough.com\");\n\t\tassertEquals(1, results.size());\n\t\tassertEquals(\"test.com\", results.get(0));\n\t}", "public void clickLinkAndCheckURL(WebDriver driver, StackTraceElement t, By by, String expectedURL, Boolean ifBack, Boolean ifPrompt) throws IOException{\n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(by).click();\n\t\t\t waitUntilUrl(driver, 15, previousURL, ifPrompt);\n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t getAssertEquals(t, driver, \"URL are not the same!\",\n\t\t actualURL.toLowerCase(), expectedURL.toLowerCase()));\n\t\t\t if (ifBack) { getUrlWaitUntil(driver, 15, previousURL, ifPrompt); }\t\t \n\t }", "public void getLinks() {\n\n var client = HttpClient.newBuilder()\n .followRedirects(HttpClient.Redirect.ALWAYS)\n .build();\n\n HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(URL_PREFIX))\n .build();\n client.sendAsync(request, HttpResponse.BodyHandlers.ofLines())\n .thenApply(HttpResponse::body)\n .thenApply(this::processLines)\n .thenApply(versions -> tasks(versions))\n .join();\n }", "public void clickLinkAndCheckURL(WebDriver driver, StackTraceElement t, By by, String expectedURL) throws IOException{\n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(by).click();\n\t\t\t waitUntilUrl(driver, 10, previousURL);\n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t getAssertEquals(t, driver, \"URL are not the same!\",\n\t\t actualURL.toLowerCase(), expectedURL.toLowerCase()));\t\n\t }", "@Test\n\tpublic void testSendRedirect_1()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\t\tString targetUrl = \"\";\n\t\tboolean http10Compatible = false;\n\n\t\tfixture.sendRedirect(request, response, targetUrl, http10Compatible);\n\n\t\t// add additional test code here\n\t}", "public abstract String redirectTo();", "@Test\n public void clickContactLink() {\n aboutPage.clickContactLink();\n }", "@Test\n public void oneRedirect() throws Exception {\n UrlPattern up1 = urlEqualTo(\"/\" + REDIRECT);\n stubFor(get(up1)\n .willReturn(aResponse()\n .withStatus(HttpServletResponse.SC_FOUND)\n .withHeader(\"Location\", wireMock.url(TEST_FILE_NAME))));\n\n UrlPattern up2 = urlEqualTo(\"/\" + TEST_FILE_NAME);\n stubFor(get(up2)\n .willReturn(aResponse()\n .withBody(CONTENTS)));\n\n Download t = makeProjectAndTask();\n t.src(wireMock.url(REDIRECT));\n File dst = newTempFile();\n t.dest(dst);\n execute(t);\n\n assertThat(dst).usingCharset(StandardCharsets.UTF_8).hasContent(CONTENTS);\n\n verify(1, getRequestedFor(up1));\n verify(1, getRequestedFor(up2));\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageUserLinkNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify MumV Navigation Links Manage user page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvAddnewStdUser\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.verifyWhatisthisOverlay()\n\t\t.ManageUserNavigationVerificationLinks(); \t \t \t\n\t}", "@Test\r\n\tpublic void verifyUrlOnClickingListenNow(){\r\n\t\tdriver.get(url+radioUrl+audioUrl);\r\n\t\tObject response = jse.executeScript(\r\n\t\t\t\t\"if(document.readyState === 'complete'){\"\r\n\t\t\t\t+ \"document.querySelector('.cs-has-media').children[0].children[0].click();\"\r\n\t\t\t\t+ \"if(documet.readyState === 'complete'){\"\r\n\t\t\t\t+ \"var currUrl = window.location.href;\"\r\n\t\t\t\t+ \"return currUrl;}}\", \"\");\r\n\t\tAssert.assertTrue(response.toString().equalsIgnoreCase(\"https://radio.abc.net.au/programitem/pg1aGbWlx6?play=true\"), \"Url not redirected as expected.\");\r\n\t}", "@Test\n\tpublic void testSetUrl_1()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tString url = \"\";\n\n\t\tfixture.setUrl(url);\n\n\t\t// add additional test code here\n\t}", "@Test\n public void tenRedirect() throws Exception {\n UrlPattern up1 = urlPathEqualTo(\"/\" + REDIRECT);\n redirectWireMock.stubFor(get(up1)\n .withQueryParam(\"r\", matching(\"[0-9]+\"))\n .willReturn(aResponse()\n .withStatus(HttpServletResponse.SC_FOUND)\n .withTransformer(\"redirect\", \"redirects\", 10)));\n\n UrlPattern up2 = urlEqualTo(\"/\" + TEST_FILE_NAME);\n redirectWireMock.stubFor(get(up2)\n .willReturn(aResponse()\n .withBody(CONTENTS)));\n\n Download t = makeProjectAndTask();\n t.src(redirectWireMock.url(REDIRECT) + \"?r=10\");\n File dst = newTempFile();\n t.dest(dst);\n execute(t);\n\n assertThat(dst).usingCharset(StandardCharsets.UTF_8).hasContent(CONTENTS);\n\n redirectWireMock.verify(10, getRequestedFor(up1));\n redirectWireMock.verify(1, getRequestedFor(up2));\n }", "public void clickLinkAndCheckURL(WebDriver driver, StackTraceElement t, String locator, String expectedURL, Boolean ifBack) throws IOException{\n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(By.xpath(locator)).click();\n\t\t\t waitUntilUrl(driver, 10, previousURL);\n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t getAssertEquals(t, driver, \"URL are not the same!\",\n\t\t actualURL.toLowerCase(), expectedURL.toLowerCase()));\n\t\t\t if (ifBack) { getUrlWaitUntil(driver, 15, previousURL); }\t\t \n\t }", "public static void AddUrls (List<String> links) {\n\t for(String LoopedLinks:links) { \n\t\n\t\t//if page isn't part of domain, ignore\n\t\t if (LoopedLinks.startsWith(variables.domain)) {\n\t\n\t\t\t //if page doesn't have an octothorpe\n\t\t\t if (!LoopedLinks.contains(\"#\")) {\n\t\t\t\t \n\t\t\t\t //if page doesn't ends with one of the file extensions to not use\n\t\t\t\t String extension = getExtension(LoopedLinks);//gets file extension from URL\n\t\t\t\t if(!variables.list.stream().anyMatch(extension::contains)) {\n\n\t\t\t\t\t //if link isn't already part of master list, add it.\n\t\t\t\t\t if(!variables.master.contains(LoopedLinks)) {\n\t\t\t\t\t\t Reporter.log(\"Adding to master list \"+LoopedLinks, variables.verboseReport);\n\t\t\t\t\t\t variables.master.add(LoopedLinks);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\t}", "@Test\n\tpublic void testCreateLinkValid() {\n\t\tLink result = helper.createLink(\"http://good.com\");\n\t\tassertEquals(\"http://good.com\", result.getUrl());\n\t\tassertTrue(result.isValid());\n\t}", "@Test //Index\n public void testPageNavigationAsUserIndex() {\n loginAsUser();\n\n vinyardApp.navigationCultureClick();\n final String expectedURL = \"http://localhost:8080/index\";\n final String result = driver.getCurrentUrl();\n assertEquals(expectedURL, result);\n }", "@Test\n public void testRegularOpen() {\n openUrl();\n }", "public void testIsValid()\r\n {\r\n\t for (int i = 0; i < unitTestList.length; i++ ) {\r\n\t\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t\t System.out.println(\"testIsValid: \" + urlVal.isValid(unitTestList[i]));\r\n\t }\r\n }", "private void checkActionURLs(ResourceNode rn, String stringToFind) {\r\n\t\t// LOGGER.debug(\"\");\r\n\t\tLOGGER.debug(\"Printing action URLs for \" + rn);\r\n\t\tfor (ActionNode action : rn.getActions()) {\r\n\t\t\t// Action request uses private pathTemplate for URLs\r\n\t\t\tassert (action.getRequest() != null);\r\n\t\t\tassert (action.getPathTemplate() != null); // pass thorugh to request\r\n\t\t\tif (rn.getParentRef() != null)\r\n\t\t\t\tassert (!action.getParentContribution().isEmpty());\r\n\r\n\t\t\t// URL combines parent contribution with template params and payload\r\n\t\t\tString url = action.getRequest().getURL();\r\n\t\t\t// LOGGER.debug(\"Parent contribution: \" + action.getParentContribution());\r\n\t\t\tLOGGER.debug(\"Action URL: \" + url);\r\n\t\t\tassertTrue(\"Action has an URL.\", !url.isEmpty());\r\n\r\n\t\t\tif (stringToFind != null)\r\n\t\t\t\tassertTrue(\"Example must contain \" + stringToFind, url.contains(stringToFind));\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n @MediumTest\n @DisableIf.Build(message = \"Test is failing on Android P+, see crbug.com/1110939.\",\n sdk_is_greater_than = VERSION_CODES.O_MR1)\n // clang-format off\n public void linkClickTest() {\n // clang-format on\n initPlayerManager(false);\n final View playerHostView = mPlayerManager.getView();\n\n // Click on a link that is visible in the default viewport.\n assertLinkUrl(playerHostView, 720, 670, TEST_IN_VIEWPORT_LINK_URL);\n assertLinkUrl(playerHostView, 880, 675, TEST_IN_VIEWPORT_LINK_URL);\n assertLinkUrl(playerHostView, 800, 680, TEST_IN_VIEWPORT_LINK_URL);\n\n // Scroll to the bottom, and click on a link.\n scrollToBottom();\n assertLinkUrl(playerHostView, 320, 4920, TEST_OUT_OF_VIEWPORT_LINK_URL);\n assertLinkUrl(playerHostView, 375, 4950, TEST_OUT_OF_VIEWPORT_LINK_URL);\n assertLinkUrl(playerHostView, 430, 4980, TEST_OUT_OF_VIEWPORT_LINK_URL);\n }", "@Override\n public boolean shouldVisit(Page referringPage, WebURL url) {\n\t String href = url.getURL();\n\t allUrlsObject.visitAllUrls(referringPage,url);\n\t // to keep track of all the urls extracted\n\t urlsExtracted++;\n\t uniqueUrlsExtracted.add(href);\n\t return href.startsWith(\"http://www.nytimes.com/\");\n}", "@Test\n @Transactional\n public void testUrlsRequireAuthentication() throws Exception {\n // cluster index page.\n testUrlRequiresAuthentication(\"/cluster\", false);\n }", "@Test\r\n public void testAPIConnection() throws IOException {\r\n CheckConnection connection = new CheckConnection();\r\n connection.findRedirects(\"soccer\");\r\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySubmitMeterReadingLandingPageLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the link navigations of Submit meter read landing page\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage1()\n\t\t.verifySubmitMeterreadLandingPageNavigationLinks();\n}", "public void clickLinkAndCheckURL(WebDriver driver, StackTraceElement t, String locator, String expectedURL, Boolean ifBack, Boolean ifPrompt) throws IOException{\n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(By.xpath(locator)).click();\n\t\t\t waitUntilUrl(driver, 15, previousURL, ifPrompt);\n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t getAssertEquals(t, driver, \"URL are not the same!\",\n\t\t actualURL.toLowerCase(), expectedURL.toLowerCase()));\n\t\t\t if (ifBack) { getUrlWaitUntil(driver, 15, previousURL, ifPrompt); }\t\t \n\t }", "public void gotoURLandCheckURL(WebDriver driver, StackTraceElement t, String url, String expectedURL, Boolean ifBack, Boolean ifPrompt) throws IOException{\t\t\t \n\t\t\t getUrlWaitUntil(driver, 15, url);\t\t\t \n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t getAssertEquals(t, driver, \"URL are not the same!\",\n\t\t actualURL.toLowerCase(), expectedURL.toLowerCase()));\n\t\t\t if (ifBack) {\n\t\t\t\t driver.navigate().back();\n\t\t\t\t waitUntilUrl(driver, 15, actualURL, ifPrompt);\n\t\t\t }\t\t\t \n\t }", "private void pullLinks(String htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage);\n Elements links = doc.select(\"a[href]\");\n\n for (Element link : links) {\n\n String possibleUrl = link.attr(\"abs:href\");\n\n if (!possibleUrl.equals(\"\")) {\n// Log.v(\"pullLinks\", \" will try to make URL from\" + possibleUrl);\n //if the link attr isn't empty, make a URL\n URL theUrl = NetworkUtils.makeURL(possibleUrl);\n\n if (RegexUtils.urlDomainNameMatch(firstLinkAsString, theUrl.toString())) {\n //if the string version of url is within the same domain as original query\n if (!visitedLinks.contains(theUrl.toString())) {\n// Log.v(\"DLAsyncTask.pullLinks\", \" thinks that \" + theUrl.toString() + \" wasn't visited, add into collected...\");\n collectedLinks.add(theUrl.toString());\n }\n }\n }\n\n }\n }", "@Test\r\n public void testConceptsButton() {\r\n WicketTester tester = new WicketTester(new GreenometerApplication());\r\n tester.startPage(StopLightPage.class);\r\n tester.assertRenderedPage(StopLightPage.class);\r\n\r\n tester.clickLink(\"ConceptsPageButton\", false);\r\n tester.assertRenderedPage(ConceptsPage.class);\r\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGasYourdetailsPageNavigationLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\t\t\n\t\t.verifyGasNavigationLinks();\n}", "@Test\n public void testGetAsHTML() throws Exception {\n List<String> linksToFind = new ArrayList<>(Arrays.asList(\"layers\", \"layergroups\", \"styles\", \"workspaces\"));\n List<String> invalidLinks = Arrays.asList(\"reset\", \"reload\");\n Document dom = getAsDOM(RestBaseController.ROOT_PATH);\n print(dom);\n NodeList links = CatalogRESTTestSupport.xp.getMatchingNodes(\"//li/a\", dom);\n for (int i = 0; i < (links.getLength()); i++) {\n Element link = ((Element) (links.item(i)));\n String linkText = link.getTextContent();\n linksToFind.remove(linkText);\n Assert.assertFalse((\"Index should only contain GET endpoints. Found: \" + linkText), invalidLinks.contains(linkText));\n }\n Assert.assertTrue((\"Could not find the following links in index: \" + (linksToFind.toString())), ((linksToFind.size()) == 0));\n }", "public void clickLinkAndCheckURL(WebDriver driver, String locator, String expectedURL, Boolean ifBack) throws IOException{\n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(By.xpath(locator)).click();\n\t\t\t waitUntilUrl(driver, 10, previousURL);\n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t\t\t\t getAssertEquals(new RuntimeException().getStackTrace()[0],\n driver, \"URL are not the same!\",\n actualURL.toLowerCase(), expectedURL.toLowerCase()));\n\t\t\t if (ifBack) {\n\t\t\t\t driver.navigate().back();\n\t\t\t\t waitUntilUrl(driver, 10, actualURL, false);\n\t\t\t }\t\t \n\t }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGlobalNavigationLinks()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GloabalSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .BgbverifyAfterLogin()\n\t .clickSubmitMeterReadLink()\t\n\t\t.verifyGlobalNavigationLink();\n}", "public void userIsOnHomePage(){\n\n assertURL(\"\\\"https://demo.nopcommerce.com/\\\" \");\n }", "private void assertLinkUrl(View view, int x, int y, String expectedUrl) {\n int scaledX = scaleAbsoluteCoordinateToViewCoordinate(x);\n int scaledY = scaleAbsoluteCoordinateToViewCoordinate(y);\n\n // In this test scaledY will only exceed the view height if scrolled to the bottom of a\n // page.\n if (scaledY > view.getHeight()) {\n scaledY = view.getHeight()\n - (scaleAbsoluteCoordinateToViewCoordinate(TEST_PAGE_HEIGHT) - scaledY);\n }\n\n mLinkClickHandler.mUrl = null;\n\n int[] locationXY = new int[2];\n view.getLocationOnScreen(locationXY);\n UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());\n device.waitForIdle();\n device.click(scaledX + locationXY[0], scaledY + locationXY[1]);\n\n CriteriaHelper.pollUiThread(() -> {\n GURL url = mLinkClickHandler.mUrl;\n String msg = \"Link press on abs (\" + x + \", \" + y + \") failed.\";\n Criteria.checkThat(msg, url, Matchers.notNullValue());\n Criteria.checkThat(msg, url.getSpec(), Matchers.is(expectedUrl));\n }, TIMEOUT_MS, CriteriaHelper.DEFAULT_POLLING_INTERVAL);\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyYourdetailsElectricityOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Electricity Page Overlay Links\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\t\t\n\t\t.verifyElectricWhyWeNeedThisLink()\n\t\t.verifyElectricAcctnoWhereCanIfindthisLink()\n\t\t.verifyElectricMeterPointWhereCanIfindthisLink()\n\t\t.verifyElectricMeterIDWhereCanIfindthisLink();\n}", "public void clickLinkAndCheckURLstartsWith(WebDriver driver, StackTraceElement t, String locator, String expectedURLstartsWith, Boolean ifBack, Boolean ifPrompt) throws IOException{\n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(By.xpath(locator)).click();\n\t\t\t waitUntilUrl(driver, 15, previousURL, ifPrompt);\n\t\t\t String actualURL = driver.getCurrentUrl();\t\t \t\t \n\t\t\t // ASSERTION:\n\t\t\t fileWriterPrinter(\"\\nExpected URL: \" + expectedURLstartsWith + \"\\n Actual URL: \" + actualURL);\n\t\t\t if (actualURL.startsWith(expectedURLstartsWith) == false) {\n\t\t\t\t fileWriterPrinter(\" Result: FAILED! Actual URL does not start with the Expected...\");\n\t\t\t } else { fileWriterPrinter(\" Result: OK (Actual URL starts with the Expected)\"); }\n\t\t\t Assert.assertTrue((actualURL.toLowerCase()).startsWith(expectedURLstartsWith.toLowerCase()),\n UtilitiesTestHelper.getAssertTrue(t, driver, \"URL not found!\",\n\t\t\t\t (actualURL.toLowerCase()).startsWith(expectedURLstartsWith.toLowerCase())));\t\t \t\t\t \n\t\t\t if (ifBack) {\n\t\t\t\t driver.navigate().back();\n\t\t\t\t waitUntilUrl(driver, 15, actualURL, ifPrompt);\n\t\t\t }\t\t \n\t }", "public void clickLinkAndCheckURL(WebDriver driver, StackTraceElement t, String locator, String expectedURL) throws IOException{\n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(By.xpath(locator)).click();\n\t\t\t waitUntilUrl(driver, 10, previousURL);\n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t getAssertEquals(t, driver, \"URL are not the same!\",\n\t\t actualURL.toLowerCase(), expectedURL.toLowerCase()));\t\n\t }", "@Test(expected = java.io.IOException.class)\n\tpublic void testSendRedirect_3()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\t\tString targetUrl = \"\";\n\t\tboolean http10Compatible = true;\n\n\t\tfixture.sendRedirect(request, response, targetUrl, http10Compatible);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void WebIndexAddTest() {\n\t\tPage perfect = WebIndex.getPage(\"https://www.google.com\");\n\t\tPage perfect2 = WebIndex.getPage(\"http://www.google.com\");\n\n\t\tWebIndex index = new WebIndex();\n\t\tindex.add(\"google\", \"\", perfect);\n\t\t\n\t\t// check for different case\n\t\tfor (Page p : index.getUrls(\"Google\"))\n\t\t\tassertEquals(p, perfect);\n\t\t\n\n\t\tindex.add(\"Google\", \"\", perfect2);\n\t\tboolean onFirst = true;\n\t\tfor (Page p : index.getUrls(\"Google\"))\n\t\t\tif (onFirst) {\n\t\t\t\tassertTrue(p.equals(perfect));\n\t\t\t\tonFirst = false;\n\t\t\t}\n\t\t\telse\n\t\t\t\tassertTrue(p.equals(perfect2));\n\t\t\n\t}", "private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }", "@Override\n\tpublic boolean shouldVisit(Page page, WebURL url) {\n\t\tString href = url.getURL().toLowerCase();\n\t\treturn !FILTERS.matcher(href).matches()\n\t\t\t\t&& (href.startsWith(\"http://www.amarujala.com/education\"));\n\t\t\t\t/*\n\t\t\t\t|| href.startsWith(\"http://www.amarujala.com/crime\"));\n\t\t\t\t*/\n\t}", "@Test\n @Then(\"URL is opened\")\n public void s03_UrlCcheck() {\n currentUrlHP = driver.getCurrentUrl();\n Assert.assertEquals(urlHP, currentUrlHP);\n System.out.println(\"Step03 PASSED\");\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyElectricityYourdetailsPageNavigationLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Electricity Page Navigation Links\");\n\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\t\t\n\t\t.verifyElectricNavigationLinks();\n\t\t\n}", "@Override\n public void setupURL_ToVisit(String url) {\n String gotoUrl;\n if (!applicationUrl.toString().endsWith(\"/\")) {\n if (url.startsWith(\"/\")) {\n gotoUrl = applicationUrl + url;\n }\n else {\n gotoUrl = applicationUrl + \"/\" + url;\n }\n }\n else {\n if (!url.startsWith(\"/\")) {\n gotoUrl = applicationUrl + url;\n }\n else {\n gotoUrl = applicationUrl + url.substring(1);\n }\n }\n getWebdriverInstance().navigate().to(gotoUrl);\n }", "@Given(\"^user should open link$\")\r\n\tpublic void user_should_open_link() throws Throwable {\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n driver.manage().deleteAllCookies();\r\n\r\n driver.get(prop.getProperty(\"url\"));\r\n\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n \t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n\t}", "@Test(priority = 5)\n\tpublic void testHandScoreLinkEnabled(){\n\t\t\n\t\tdashBoardPage = loginPage.loginSuccess(unitytestdata.getProperty(\"testDomainTeacher\"),\n\t\t\t\tunitytestdata.getProperty(\"genericPassword\"));\n\t\tdashBoardPage.addTiles();\n\t\treportPage = dashBoardPage.goToReports();\n\t\twaitTime();\n\t\treportPage.filterReportByClassRoster(testrosterName);\n\t\twaitTime();\n\t\treportPage.filterReportByContentArea(\"N/A\");\n\t\twaitTime();\n\t\treportPage.openTestEventDetail(testName4);\n\t\tcustomeWaitTime(5);\n\t\tsoftAssert.assertTrue(reportPage.waitForElementVisible(reportPage.HandscoreThisTestButton));\n\n\t\t\n\t}", "@Test\n public void testMotherLinkNavigation() {\n println(\"mother link navigation test\");\n assertTrue(\"Navigation failed\",\n mothersNavigationExercise());\n println();\n }", "@Test(priority = 1)\n\n public void test_Search_Appear_WikiLink() {\n\n resultsPage.clickWikiResult();\n\n // Go the next page\n// wikiPage = new WikiPage(driver);\n\n //Wait until QA Wikipedia page is loaded\n WebDriverWait wait = new WebDriverWait(driver, 10);\n wait.until(ExpectedConditions.elementToBeClickable(By.className(\"noprint\")));\n\n //Verify the URL is wiki URL\n String URL = driver.getCurrentUrl();\n Assert.assertEquals(URL, \"https://en.wikipedia.org/wiki/Quality_assurance\" );\n\n }", "public static void testPhilosophy(String start, String end) {\n\t\t\t\t\t\t String test = start;\n\t\t\t\t\t\t\t\t for(int count = 0; i<50; i++)\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t if(done.contains(test)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t return; //duplicate links (loops)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\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 {\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 done.add(test);\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 }\n\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 Element link = getGoodLink(start);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(link == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t return; //no links on page\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (link.attr(\"abs:href\").equals(end)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t break; //matches philosophy page\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }", "public void changeUrl() {\n url();\n }", "@Test\n public void hrefPatternTest() {\n Pattern aTeg = Pattern.compile(\"(?i)<a([^>]+)>(.+?)</a>\");\n Pattern href = Pattern.compile(\"\\\\s*(?i)href\\\\s*=\\\\s*(\\\\\\\"([^\\\"]+\\\\\\\")|'[^']+'|([^'\\\">\\\\s]+))\");\n String[] validLinkTegs = {\"<li><a href=\\\"/toolbar-creator\\\">Create a Custom Toolbar</a></li>\",\n \"<a href=\\\"http://stlpublicradio.org/programs/slota/archivedetail.php?date='2012-02-29'\\\" title=\\\"\\\" class=\\\"menu_icon menu-17197 \\\" >Грузовые перевозки</a></li>\",\n \"<li><a href='http://www.tipsntracks.com/date/2012/03' title='March 2012'>March 2012</a></li>\"};\n String[] invalidLinkTags = {\"<a href=\\\"\\\"style=\\\"\\\"><img width=\\\"148\\\" height=\\\"32\\\" src=\\\"/images/buttons/btn-www-survey.gif\\\" /></a>\"};\n String[] validLinks = new String[validLinkTegs.length];\n String[] invalidLinks = new String[invalidLinkTags.length];\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = aTeg.matcher(validLinkTegs[i]);\n Assert.assertTrue(matcher.find());\n validLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = aTeg.matcher(invalidLinkTags[i]);\n Assert.assertTrue(matcher.find());\n invalidLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = href.matcher(validLinks[i]);\n Assert.assertTrue(matcher.find());\n String s = matcher.group(1);\n System.out.println(s.substring(1, s.length() - 1));\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = href.matcher(invalidLinks[i]);\n Assert.assertFalse(matcher.find());\n }\n }", "@Test\n public void tooManyRedirects() throws Exception {\n UrlPattern up1 = urlPathEqualTo(\"/\" + REDIRECT);\n redirectWireMock.stubFor(get(up1)\n .withQueryParam(\"r\", matching(\"[0-9]+\"))\n .willReturn(aResponse()\n .withStatus(HttpServletResponse.SC_FOUND)\n .withTransformer(\"redirect\", \"redirects\", 51)));\n\n Download t = makeProjectAndTask();\n t.src(redirectWireMock.url(REDIRECT) + \"?r=52\");\n File dst = newTempFile();\n t.dest(dst);\n assertThatThrownBy(() -> execute(t))\n .isInstanceOf(WorkerExecutionException.class)\n .rootCause()\n .isInstanceOf(RedirectException.class)\n .hasMessage(\"Maximum redirects (50) exceeded\");\n }", "@Test\n\tpublic void Launch_URL() throws Exception {\n\n\t\tThread.sleep(1500);\n\t\torg.openqa.selenium.ScreenOrientation so = driver.getOrientation();\n\t\tdriver.rotate(so.LANDSCAPE);\n\t\tReports.logEvent(\"App in LandScape view\", \"pass\");\n\t\tdriver.rotate(so.PORTRAIT);\n\t\tfor(int i=0;i<3;i++)\n\t\t{\n\t\t\tif(i==0)\n\n\t\t\t{\n\t\t\t\tList<WebElement> links = driver.findElementsByClassName(\"android.widget.RelativeLayout\");\n\t\t\t\tlinks.get(i).click();\n\t\t\t\tThread.sleep(3500);\n\t\t\t\tint j=i+1;\n\t\t\t\tReports.logEvent(\"Link \"+j+\" clicked\", \"pass\");\n\t\t\t\ttakeScreenShot();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<WebElement> back = driver.findElementsByClassName(\"android.widget.ImageButton\");\n\t\t\t\tback.get(0).click();\n\t\t\t\tReports.logEvent(\"Navigated back to home page\", \"pass\");\n\t\t\t\tThread.sleep(1500);\n\t\t\t}\n\t\t\t\telse if(i==3)\n\t\t\t{\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tList<WebElement> links = driver.findElementsByClassName(\"android.widget.RelativeLayout\");\n\t\t\t\tlinks.get(i).click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t\tint j=i+1;\n\t\t\t\tReports.logEvent(\"Link \"+j+\" clicked\", \"pass\");\n\t\t\t\ttakeScreenShot();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<WebElement> back = driver.findElementsByClassName(\"android.widget.ImageButton\");\n\t\t\t\tback.get(0).click();\n\t\t\t\tReports.logEvent(\"Navigated back to home page\", \"pass\");\n\t\t\t\tThread.sleep(1500);\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tint a = 0/0;\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tReports.logEvent(\"Try catch failed try\", \"fail\");\n\t\t}\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserallaccountsConfirmationPageNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the StandardUser All accounts Navigationlinks for the confirmation Page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifyAllAccountsViewName(userProfile)\n\t\t.EnterValid_StandardUserdata(userProfile) \t \t \t\t\n\t\t.AddNewUserNavigationVerification() //have to update navigation link\n\t\t.UserConfirmationPageNavigations();\t \t \t\t\n\t}", "public void clickLinkAndCheckURL(WebDriver driver, String locator, String expectedURL) throws IOException{ \n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(By.xpath(locator)).click();\n\t\t\t waitUntilUrl(driver, 10, previousURL);\n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t\t\t\t getAssertEquals(new RuntimeException().getStackTrace()[0],\n driver, \"URL are not the same!\",\n actualURL.toLowerCase(), expectedURL.toLowerCase()));\n\t }", "@Test\n\tpublic void testUrlEncode_2()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tString input = \"\";\n\t\tString encodingScheme = \"\";\n\n\t\tString result = fixture.urlEncode(input, encodingScheme);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public void clickLinkAndCheckURL(WebDriver driver, String locator, String expectedURL, Boolean ifBack, Boolean ifPrompt) throws IOException{\n\t\t\t String previousURL = driver.getCurrentUrl();\n\t\t\t driver.findElement(By.xpath(locator)).click();\n\t\t\t waitUntilUrl(driver, 15, previousURL, ifPrompt);\n\t\t\t String actualURL = driver.getCurrentUrl();\n\t\t\t if (actualURL.endsWith(\"/\")) {\n\t\t\t\t if (! expectedURL.endsWith(\"/\")) { expectedURL += \"/\"; }\n\t\t\t }\n\t\t\t if (expectedURL.endsWith(\"/\")) {\n\t\t\t\t if (! actualURL.endsWith(\"/\")) { actualURL += \"/\"; }\n\t\t\t }\n\t\t\t Assert.assertEquals(actualURL.toLowerCase(), expectedURL.toLowerCase(),\n\t\t\t\t\t getAssertEquals(new RuntimeException().getStackTrace()[0],\n driver, \"URL are not the same!\",\n actualURL.toLowerCase(), expectedURL.toLowerCase()));\n\t\t\t if (ifBack) {\n\t\t\t\t driver.navigate().back();\n\t\t\t\t waitUntilUrl(driver, 15, actualURL, ifPrompt);\n\t\t\t }\t\t \n\t }", "@Test\n @Then(\"Market URL is opened\")\n public void s05_MarketUrlCheck() {\n String currentMUrl = driver.getCurrentUrl();\n Assert.assertTrue(currentMUrl.contains(\"market.yandex.ru\"));\n System.out.println(\"Step05 PASSED\");\n }", "@RequestMapping(value = \"/link\", method = RequestMethod.GET)\n\tString link() {\n\t\ttry {\n\t\t\thueUseCase.linkBridgeWithNewUser();\n\t\t} catch (NullPointerException e) {\n\t\t\t// User did not press the Bridge button.\n\t\t\tSonarUtil.swallowException(e);\n\t\t\treturn \"setup\";\n\t\t}\n\n\t\treturn \"redirect:/configdata\";\n\t}", "@Test\n\tpublic void testUrlEncode_1()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tString input = \"\";\n\t\tString encodingScheme = \"\";\n\n\t\tString result = fixture.urlEncode(input, encodingScheme);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@Given(\"^the url of the application under test$\")\r\n\tpublic void getUrl() throws Exception {\n\t\tdriver.get(url);\r\n\t}", "@Test(priority = 28)\r\n\tpublic void removalUserLinkCheck() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}", "@Test\n\tpublic void testUrlEncode_3()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tString input = \"\";\n\t\tString encodingScheme = \"\";\n\n\t\tString result = fixture.urlEncode(input, encodingScheme);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "protected void goTo(String url) {\n \t\tcontext.goTo(url);\n \t}", "@Override\r\n public boolean shouldVisit(WebURL url) {\r\n String href = url.getURL().toLowerCase();\r\n return !FILTERS.matcher(href).matches() && href.startsWith(\"http://fksis.bsuir.by/\");\r\n// \"http://www.ics.uci.edu/\");\r\n }", "void redirect(Reagent reagent);", "private static void checkForRedirection(Connection conn) {\n JSONObject bestServer = ServerManager.getLowestLoadServer();\n if (bestServer != null && bestServer.get(\"id\") != Settings.getServerId()) {\n Message.sendRedirect(conn, (String) bestServer.get(\"hostname\"), (int) bestServer.get(\"port\"));\n }\n }", "@Then(\"^user is navigated to \\\"([^\\\"]*)\\\"$\")\n public void user_is_navigated_to(String expectedUrl) {\n driver.findElement(By.xpath(\"//form[@action='https://www.phptravels.net/admin/blog/']/*[1]\")).click();\n driver.findElement(By.xpath(\"//form[@class='add_button']/*[1]\")).click();\n Assert.assertEquals(\"Navigating to wrong URL\", expectedUrl, driver.getCurrentUrl());\n }", "private void fixFaultyLinkTargets()\r\n \t{\r\n \t\tSimpleLogger.verbose(\" Checking for faulty TOC link targets...\");\r\n \r\n \t\tSimpleLogger.verbose(\" Book title = \" + pageTitle);\r\n \r\n \t\t// Exclude the 3 know exceptions and immediately return if one is found\r\n \t\tif (pageTitle.matches(\".*(ActionScript 1 und 2|Microsoft-Netzwerk|Shell-Programmierung).*\")) {\r\n \t\t\tSimpleLogger.verbose(\" Book title is an exception - no link fixing done\");\r\n \t\t\treturn;\r\n \t\t}\r\n \r\n \t\tint fixedLinksCount = 0;\r\n \t\tNodes links = xPathQuery(XPath.ALL_LINKS.query);\r\n \t\tfor (int i = 0; i < links.size(); i++) {\r\n \t\t\tElement link = (Element) links.get(i);\r\n \t\t\tString href = link.getAttributeValue(\"href\");\r\n \t\t\tString text = link.getValue();\r\n \t\t\tMatcher hrefMatcher = REGEX_HREF.matcher(href);\r\n \t\t\tMatcher textMatcher = REGEX_TEXT.matcher(text);\r\n \t\t\tif (hrefMatcher.matches() && textMatcher.matches()) {\r\n \t\t\t\tint hrefNumber = Integer.parseInt(hrefMatcher.group(2));\r\n \t\t\t\tint textNumber = Integer.parseInt(textMatcher.group(2));\r\n \t\t\t\tif (hrefNumber != textNumber) {\r\n \t\t\t\t\tSimpleLogger.debug(\" Chapter \" + text);\r\n \t\t\t\t\tSimpleLogger.debug(\" Faulty: \" + href);\r\n \t\t\t\t\tString numberFormat = \"%0\" + hrefMatcher.group(2).length() + \"d\";\r\n \t\t\t\t\thref=hrefMatcher.group(1) + String.format(numberFormat, textNumber) + hrefMatcher.group(3);\r\n \t\t\t\t\tSimpleLogger.debug(\" Fixed: \" + href);\r\n \t\t\t\t\tlink.getAttribute(\"href\").setValue(href);\r\n \t\t\t\t\tfixedLinksCount++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\tSimpleLogger.verbose(\" Number of fixed links = \" + fixedLinksCount);\r\n \t}" ]
[ "0.6818014", "0.67989796", "0.66959757", "0.66050386", "0.6544768", "0.6479811", "0.6426131", "0.6392742", "0.63504916", "0.6338758", "0.6225687", "0.62201345", "0.6165632", "0.6136631", "0.6125446", "0.60983926", "0.60738134", "0.60681367", "0.60355526", "0.6007348", "0.59962314", "0.59909064", "0.59862316", "0.5974058", "0.59625036", "0.59443486", "0.59435195", "0.5938313", "0.5934739", "0.5930678", "0.5889866", "0.5889187", "0.58879405", "0.5879715", "0.58614546", "0.58484983", "0.5848083", "0.5835745", "0.58254045", "0.5800592", "0.5799628", "0.5791414", "0.5783061", "0.5751671", "0.5698778", "0.56744844", "0.5649078", "0.5646338", "0.5631604", "0.5631105", "0.562037", "0.56178594", "0.5617251", "0.560591", "0.5600167", "0.5592123", "0.5560003", "0.55564606", "0.5543228", "0.5543102", "0.5535649", "0.55331576", "0.55251783", "0.5517153", "0.5515391", "0.55045515", "0.5494413", "0.54932463", "0.54901195", "0.5488326", "0.5475067", "0.54735047", "0.5473287", "0.5460031", "0.5458261", "0.5458176", "0.54533726", "0.544908", "0.5448496", "0.54428726", "0.5433183", "0.5433003", "0.5430622", "0.54300225", "0.54281735", "0.5423648", "0.5420928", "0.54162294", "0.54081", "0.5405517", "0.5399877", "0.53878576", "0.5384707", "0.5381788", "0.5381769", "0.5374947", "0.5373612", "0.53603756", "0.5348777", "0.53392863" ]
0.60042316
20
The algorithm was based on a python solution on StackOverflow Resource:
private void generateFirstCard() { List<MutableImage> images = new ArrayList<>(); for (int i = 0; i < order; i++) { for (int j = 0; j < order; j++) { ImageImpl image = new ImageImpl(i * order + j); images.add(image); } ImageImpl image = new ImageImpl(order * order); images.add(image); arrayOfCardsInit.push(cardGenerator.generate(images)); images.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "String algorithm();", "@Override\n public String solve() {\n int LIMIT = 50 * NumericHelper.ONE_MILLION_INT;\n int[] nCount = new int[LIMIT+1];\n for(long y = 1; y<= LIMIT; y++) {\n for(long d= (y+3)/4; d<y; d++) { // +3 is to make d atleast 1\n long xSq = (y+d) * (y+d);\n long ySq = y * y;\n long zSq = (y-d) * (y-d);\n\n long n = xSq - ySq - zSq;\n\n if(n<0) {\n continue;\n }\n\n if(n>=LIMIT) {\n break;\n }\n\n\n nCount[(int)n]++;\n\n }\n }\n\n int ans = 0;\n for(int i = 1; i<LIMIT; i++) {\n if(nCount[i] == 1) {\n //System.out.print(i +\",\");\n ans++;\n }\n }\n\n return Integer.toString(ans);\n }", "public static void main(String args[] ) throws Exception {\n String l[] = br.readLine().split(\" \");\n long N = Long.parseLong(l[0]);\n long S = Long.parseLong(l[1]);\n long E = Long.parseLong(l[2]);\n TreeMap<Long,Long> t1 = new TreeMap<Long,Long>();\n TreeMap<Long,Long> t2 = new TreeMap<Long,Long>();\n for(int i=0;i<N;i++) {\n String s[] = br.readLine().split(\" \");\n long x = Long.parseLong(s[0]);\n long p = Long.parseLong(s[1]);\n t1.put((x-p),(x+p));\n }\n ArrayList<Long> l1 = new ArrayList<Long>(t1.keySet());\n ArrayList<Long> l2 = new ArrayList<Long>(t1.values());\n long c = l1.get(0);\n long d = l2.get(0);\n for(int i=1;i<t1.size();i++)\n {\n if(l1.get(i)<=d)\n d = Math.max(d,l2.get(i));\n else\n {\n \n t2.put(c,d);\n c = l1.get(i);\n d = l2.get(i);\n }\n \n }\n t2.put(c,d);\n int i;\n long ans = 0;\n l1=new ArrayList<Long>(t2.keySet());\n l2=new ArrayList<Long>(t2.values());\n \n \n for(i=0;i<l1.size();i++)\n {\n if(S>=E)\n {\n S=E;\n break;\n }\n if(l1.get(i)<=S && S<=l2.get(i))\n S = l2.get(i);\n \n else if(S<=l1.get(i) && E>=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = l2.get(i);\n \n }\n else if(S<=l1.get(i) && E>=l1.get(i) && E<=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = E;\n }\n else if(S<=l1.get(i) && E<=l1.get(i))\n {\n ans+=E-S;\n S = E;\n }\n }\n if(S<E)\n ans+=E-S;\n pw.println(ans);\n \n pw.close();\n }", "void solve() throws IOException {\n int[] nk = ril(2);\n int n = nk[0];\n int k = nk[1];\n int[] p = ril(n);\n int[] b = ril(k);\n for (int i = 0; i < n; i++) p[i]--;\n for (int i = 0; i < k; i++) b[i]--;\n\n int[] numToIdx = new int[n];\n for (int i = 0; i < n; i++) numToIdx[p[i]] = i;\n\n boolean[] remove = new boolean[n];\n Arrays.fill(remove, true);\n for (int bi : b) remove[bi] = false;\n List<Integer> toRemove = new ArrayList<>(n - k);\n for (int i = 0; i < n; i++) if (remove[i]) toRemove.add(i);\n Collections.sort(toRemove);\n\n int[] prevSmaller = new int[n];\n prevSmaller[0] = -1;\n int prevIdx = remove[p[0]] ? -1 : 0;\n for (int i = 1; i < n; i++) {\n int j = prevIdx;\n while (j != -1 && p[i] < p[j]) j = prevSmaller[j];\n prevSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n int[] nextSmaller = new int[n];\n nextSmaller[n-1] = n;\n prevIdx = remove[p[n-1]] ? n : n-1;\n for (int i = n-2; i >= 0; i--) {\n int j = prevIdx;\n while (j != n && p[i] < p[j]) j = nextSmaller[j];\n nextSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n\n int[] init = new int[n];\n Arrays.fill(init, 1);\n SegmentTree st = new SegmentTree(init);\n long ans = 0;\n for (int x : toRemove) {\n int idx = numToIdx[x];\n int l = prevSmaller[idx] + 1;\n int r = nextSmaller[idx] - 1;\n ans += st.query(l, r+1);\n st.modify(idx, 0);\n }\n pw.println(ans);\n }", "public static void main(String[] args) throws Exception {\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint tc = scn.nextInt();\r\n\t\tfor(int t=1; t<=tc; t++) {\r\n\t\t\tint n = scn.nextInt();\r\n\t\t\tint k = scn.nextInt();\r\n\t\t\tString str = scn.next();\r\n\t\t\tString arr[] = new String[n];\r\n\t\t\tarr = str.split(\"\");\r\n\t\t\tLinkedList<String> list = new LinkedList<>();\r\n\t\t\tLinkedList<Integer> result = new LinkedList<>();\r\n\t\t\tfor(int i=0; i<n; i++) {\r\n\t\t\t\tlist.add(arr[i]);\r\n\t\t\t}\r\n\t\t\tint comeback = 0;\r\n\t\t\twhile(comeback<4) {\r\n\t\t\t\tint cnt = 0;\r\n\t\t\t\tcomeback = 0;\r\n\t\t\t\tString st = \"\";\r\n\t\t\t\tfor(int i=0; i<n; i++) {\r\n\t\t\t\t\tif(cnt==(n/4)-1) {\r\n\t\t\t\t\t\tcnt = 0;\r\n\t\t\t\t\t\tst += list.get(i);\r\n\t\t\t\t\t\tint tmp = Integer.parseInt(st, 16);\r\n\t\t\t\t\t\tif(!isHave(result,tmp) && (result.size()>0)) {\r\n\t\t\t\t\t\t\tresult.add(tmp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(result.size() == 0){\r\n\t\t\t\t\t\t\tresult.add(tmp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tcomeback++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tst = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tst+= list.get(i);\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trotate(list);\r\n\t\t\t}\r\n\t\t\tCollections.sort(result);\r\n\t\t\tint cnt = 0;\r\n\t\t\tSystem.out.println(\"#\"+t+\" \"+result.get(result.size()-k));\t\t\t\r\n\t\t}\r\n\t}", "public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }", "public int[] solution(String S, int[] P, int[] Q) {\n \n int[][] result = new int[S.length()][4];\n int[] returnResult = new int[P.length];\n \n //how many different solutions exist?\n //'A' [0], [0] - 1 solution\n //'AG' [0, 0, 1], [0, 1, 1] - 3\n // 'AGT' [0,0,0,1,1,2], [0,1,1,2,2,2] - 6\n // 10\n // 15\n // 21\n \n //Prefix Sum - calculation\n \n for (int i = 1; i< S.length()+1; i++){\n \n if (i == 1){\n switch (S.substring(i-1, i)){\n case \"A\": result[i-1][0] = 1;\n break;\n case \"C\": result[i-1][1] = 1;\n break;\n case \"G\": result[i-1][2] = 1;\n break;\n case \"T\": result[i-1][3] = 1;\n break;\n }\n }else{\n int a = 0;\n switch (S.substring(i-1, i)){\n case \"A\": a = 0;\n break;\n case \"C\": a= 1;\n break;\n case \"G\": a =2;\n break;\n case \"T\": a =3;\n break;\n }\n result[i-1][a] = 1 + result[i-2][a];\n result[i-1][(a+1)%4] = result[i-2][(a+1)%4];\n result[i-1][(a+2)%4] = result[i-2][(a+2)%4];\n result[i-1][(a+3)%4] = result[i-2][(a+3)%4];\n }\n\n }\n \n /*\n for (double i : result){\n System.out.println(i);\n }\n */\n \n //A = 1, G = 2, C = 3, T = 4\n //when A found return 1 and move to next computation.\n // P[k] <= Q[K]\n int lowerBound = 0;\n int upperBound = 0;\n for (int i = 0; i < P.length; i++){\n lowerBound = P[i];\n upperBound = Q[i];\n \n int[] toEvaluate = new int[4];\n\n //System.out.println(lowerBound);\n if (lowerBound == 0){\n toEvaluate[0]= result[upperBound][0];\n toEvaluate[1]= result[upperBound][1];\n toEvaluate[2]= result[upperBound][2];\n toEvaluate[3]= result[upperBound][3];\n }else{\n toEvaluate[0]= result[upperBound][0] - result[lowerBound-1][0]; \n toEvaluate[1]= result[upperBound][1] - result[lowerBound-1][1];\n toEvaluate[2]= result[upperBound][2] - result[lowerBound-1][2];\n toEvaluate[3]= result[upperBound][3] - result[lowerBound-1][3];\n }\n \n /*\n for (int eval : toEvaluate){\n System.out.println(eval);\n \n }\n */\n if (toEvaluate[0] > 0) {returnResult[i] = 1;\n }else if (toEvaluate[1] > 0) {returnResult[i] = 2;\n }else if (toEvaluate[2] > 0) {returnResult[i] = 3;\n }else if (toEvaluate[3] > 0) {returnResult[i] = 4;\n }\n \n }\n \n return returnResult; \n }", "public static int[] decomposeToBECC(int[][] g) {\n// this part of code is taken from uwi submissions\n int n = g.length;\n boolean[] visited = new boolean[n];\n int[] ord = new int[n];\n int[] low = new int[n];\n\n int[] ids = new int[n];\n int[] inds = new int[n];\n int[] parct = new int[n];\n int pos = 0;\n for (int i = 0; i < n; i++) {\n if (!visited[i]) {\n ids[0] = i;\n inds[0] = 0;\n int sp = 1;\n while (sp > 0) {\n int cur = ids[sp - 1];\n if (inds[sp - 1] == 0) {\n visited[cur] = true;\n ord[cur] = low[cur] = pos++;\n parct[sp - 1] = 0;\n }\n if (inds[sp - 1] == g[cur].length) {\n if (sp - 2 >= 0) {\n low[ids[sp - 2]] = Math.min(low[ids[sp - 2]], low[cur]);\n }\n sp--;\n continue;\n }\n int next = g[cur][inds[sp - 1]];\n if (!visited[next]) {\n ids[sp] = next;\n inds[sp] = 0;\n inds[sp - 1]++;\n sp++;\n continue;\n } else if (sp - 2 >= 0 && (next != ids[sp - 2] || ++parct[sp - 1] >= 2)) {\n low[cur] = Math.min(low[cur], ord[next]);\n }\n inds[sp - 1]++;\n }\n }\n }\n\n int[] clus = new int[n];\n Arrays.fill(clus, -1);\n int[] q = new int[n];\n int cnum = 0;\n for (int i = 0; i < n; i++) {\n if (clus[i] == -1) {\n int p = 0;\n q[p++] = i;\n clus[i] = cnum++;\n for (int r = 0; r < p; r++) {\n int cur = q[r];\n for (int next : g[cur]) {\n if (clus[next] == -1) {\n clus[next] = ord[cur] < low[next] ? cnum++ : clus[cur];\n q[p++] = next;\n }\n }\n }\n }\n }\n return clus;\n }", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "public List<Integer> partitionLabels(String S) {\n List<Integer> sizes = new ArrayList<>();\n\n int[] lastIndex = new int[26]; //cuz only lower case letters will be given to us\n\n //finding the lastIndexes of all the characters in the given string so that inside the loop start->end, we don't have to\n //do S.lastIndexOf('someCharacter') over & over cuz if we do that than the solution will be O(n^2) cuz string.lastIndexOf loops\n //through the string everytime it needs to find the last occurance & if the character happens to be at the end of the string\n //than it'll string.lastIndexOf would have to loop through the entire string over and over inside the start->end loop\n for(int i=0; i< S.length(); i++) {\n //subtracting the current character from a that's how we can map the lower case letters to an array of 26 Eg. 'a' -'a' = 0, 'b' -'a' = 1 so on and so forth. Otherwise we can also use an array of length 128 and loop from 97->122 but the array slots from 0->97 & 123->128 will be taking memory for nothing\n lastIndex[S.charAt(i) - 'a'] = i;\n }\n\n int start=0, end = 0, extendedEnd = 0;\n while(start < S.length()) {\n char startCharacter = S.charAt(start);\n end = lastIndex[startCharacter - 'a'];\n extendedEnd = end;\n\n for(int i=start; i<end; i++) {\n\n //checking if the current character that lies in the window start till end has last occurance index that's greater than current end, than we extend end.\n //NOTE: if we don't check the occurance like lastIndex[S.charAt(i)- 'a'] instead we check it like lastIndex[i], we won't be getting correct answer cuz lastIndex[] contains last occurances of characters from a-z\n //the characters in String S might not occur in the order a-z. They'll be jumbled across the string.\n //therefore in order to get the last occurance of current character, we do it like lastIndex[S.charAt(i)- 'a']\n if(lastIndex[S.charAt(i)- 'a'] > end) {\n extendedEnd = lastIndex[S.charAt(i)- 'a'];\n end = extendedEnd;\n }\n }\n\n sizes.add((extendedEnd - start + 1));\n start = extendedEnd + 1;\n }\n\n return sizes;\n }", "public static void main(String[] args) throws UnsupportedEncodingException {\n var res2 = old.MD4.MD4.hash(\"The quick brown fox jumps over the lazy dogshdkasjhflksdjhflkasjhdflkjshdfkljasdhlfkjajhjhhldfkjashldf\".getBytes());\n// var res1 = cyph.digest(\"\".getBytes());\n\n System.out.println(encodeHexString(res2));\n// System.out.println(new BitUtils(res1).getNextLong(25) + \"\\n\");\n\n System.exit(0);\n\n var secPreimg8 = secondPreimage(\"test\", 8, 1000);\n System.out.println(\"Second preimage avg over 8 bits: \" + secPreimg8);\n dumpData(\"preimg.txt\", true, \"8 \" + secPreimg8 + \"\\n\");\n\n var secPreimg12 = secondPreimage(\"test\", 12, 1000);\n System.out.println(\"Second preimage avg over 12 bits: \" + secPreimg12);\n dumpData(\"preimg.txt\", false, \"12 \" + secPreimg12 + \"\\n\");\n\n var secPreimg16 = secondPreimage(\"test\", 16, 500);\n System.out.println(\"Second preimage avg over 16 bits: \" + secPreimg16);\n dumpData(\"preimg.txt\", false, \"16 \" + secPreimg16 + \"\\n\");\n\n var secPreimg20 = secondPreimage(\"test\", 20, 50);\n System.out.println(\"Second preimage avg over 20 bits: \" + secPreimg20);\n dumpData(\"preimg.txt\", false, \"20 \" + secPreimg20 + \"\\n\");\n\n var secPreimg24 = secondPreimage(\"test\", 24, 10);\n System.out.println(\"Second preimage avg over 24 bits: \" + secPreimg24);\n dumpData(\"preimg.txt\", false, \"24 \" + secPreimg24 + \"\\n\");\n\n var coll8 = collisions(8, 1000);\n System.out.println(\"\\nCollisions for 8 bits: \" + coll8);\n dumpData(\"coll.txt\", true, \"8 \" + coll8 + \"\\n\");\n\n var coll12 = collisions(12, 1000);\n System.out.println(\"Collisions for 12 bits: \" + coll12);\n dumpData(\"coll.txt\", false, \"12 \" + coll12 + \"\\n\");\n\n var coll16 = collisions(16, 1000);\n System.out.println(\"Collisions for 16 bits: \" + coll16);\n dumpData(\"coll.txt\", false, \"16 \" + coll16 + \"\\n\");\n\n var coll20 = collisions(20, 1000);\n System.out.println(\"Collisions for 20 bits: \" + coll20);\n dumpData(\"coll.txt\", false, \"20 \" + coll20 + \"\\n\");\n\n var coll24 = collisions(24, 1000);\n System.out.println(\"Collisions for 24 bits: \" + coll24);\n dumpData(\"coll.txt\", false, \"24 \" + coll24 + \"\\n\");\n }", "public int R_M(){\n\t\tBigInteger nminus1=n.subtract(BigInteger.ONE);\n\t\tdo{\n\t\t\tif(nminus1.mod(two.pow(a)).equals(BigInteger.ZERO)){\n\t\t\t\ttable.add(a);\n\t\t\t}\n\t\t\titerator++;\n\t\t\ta++;\n\t\t}while(!(two.pow(a).compareTo(n)>0));\n\t\t\n\t\ta=table.get(table.size()-1);\n\t\tBigInteger m=nminus1.divide(two.pow(a));\n\t\tint wlen=n.bitLength();\n\t\tBigInteger b;\n\t\tBigInteger z;\n\t\tfor(int i=0;i<iterations;i++){\n\t\t\tint straznik=0;\n\t\t\tint straznik1=0;\n\t\t\tdo{\n\t\t\t b=new BigInteger(wlen,new Random());\n\t\t\t}while(!(b.compareTo(BigInteger.ONE)>0) && !(b.compareTo(nminus1)<0));\n\t\t\tz=b.modPow(m, n);\n\t\t\tif(z.equals(BigInteger.ONE) || z.equals(nminus1)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int j=0;j<a-1;j++){\n\t\t\t\t\tz=z.pow(2).mod(n);\n\t\t\t\t\tif(z.equals(nminus1)){\n\t\t\t\t\t\tstraznik++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(z.equals(BigInteger.ONE)){\n\t\t\t\t\t\tstraznik1++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(straznik==1){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(straznik1==1){\n\t\t\t\t\tgetComposite();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tgetComposite();\n\t\t\treturn 0;\n\t\t}\n\t\tgetProbablyPrime();\n\t\treturn 1;\n\t\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int noOfElements = sc.nextInt();\n int[] arr = new int[noOfElements];\n int[] arr1 = new int[noOfElements];\n int diff = Integer.MAX_VALUE;\n int sIndex = 0;\n int j = 0;\n for (int i = 0; i < noOfElements; i++) {\n arr[i] = sc.nextInt();\n }\n for (int j1 = 1; j1 < noOfElements; j1++) {\n int i = j1 - 1;\n int key = arr[j1];\n while (i >= 0 && key < arr[i]) { // 1 2 3\n arr[i + 1] = arr[i];\n i--;\n }\n arr[i + 1] = key;\n }\n //Arrays.sort(arr);\n for (int i = 0; i < noOfElements - 1; i++) {\n int temp = Math.abs(arr[i] - arr[i + 1]);\n if (temp <= diff) {\n diff=temp;\n }\n\n }\n\n for (int i = 0; i < noOfElements - 1; i++) {\n if (Math.abs(arr[i] - arr[i+1]) == diff) {\n System.out.print(arr[i] + \" \" + arr[i+1] + \" \");\n }\n }\n// for (int a = 0; a < j; a++) {\n//\n// System.out.print(arr[arr1[a]] + \" \" + arr[arr1[a]+1] + \" \");\n// }\n\n }", "public static void main(String[] args) {\n\tArrayList<Integer[]> chunks = new ArrayList<Integer[]>();\n\t\t\n\t\tfor(int x = -128; x<=128; x++){\n\t\t\t\n\t\t\tfor (int z = -128; z<=128; z++){\n\t\t\t\t\n\t\t\t\tif(x*x + z*z < 128*128){\n\t\t\t\t\t/*\n\t\t\t\t\t * Makes sure that there is no duplicate.\n\t\t\t\t\t */\n\t\t\t\t\tif(!HasChunks(new Integer[] {(int) x/ 16, (int) z/16}, chunks)){\n\t\t\t\t\t\t\n\t\t\t\t\t\tchunks.add(new Integer[] {(int) x/ 16, (int) z/16});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * The programm testd many chunks with many seeds in order to try to find the good location.\n\t\t */\n\t\tfor(long seed = 32000; seed<1000000L; seed++){\n\t\t \n\t\t\t//from chunk(-100;-100) to chunk(100;100) which is 4.10^4 chunks^2.seed^-1\n\t\t\tfor(int cx = -100; cx<=100; cx++){\n\t\t\t\tfor (int cz = -100; cz<=100; cz++){\n\t\t\t\n\t\t\t\t\tboolean flag = true;\n\t\t\t\t\t\t//browse the chunks which are in the 8chunk circle radius.\n\t\t\t\t\t\tfor(Integer[] ch: chunks){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(isSlimeChunk(seed, cx+ch[0], cz+ch[1])){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no chunks contains slimechunks --> good location, we need to output the result.\n\t\t\t\t\t\tif(flag){\n\t\t\t\t\t\tSystem.out.println(\"Seed=\"+String.valueOf(seed)+\" ,ChunkX=\"+cx+\" ,ChunkZ\"+cz);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public String solve(long n, long a, long b, long c, long d, long x0, long y0, long m)\n {\n long[] count = new long[9];\n long x = x0;\n long y = y0;\n for (long t = 0; t < n; t++)\n {\n// System.out.println(x + \", \" + y);\n int i = (int) (x % 3) * 3 + (int) (y % 3);\n count[i]++;\n x = (a * x + b) % m;\n y = (c * y + d) % m;\n }\n\n long totalCount = 0;\n for (int i1 = 0; i1 < 9; i1++)\n {\n long count1 = count[i1];\n if (count1 == 0)\n {\n continue;\n }\n count[i1]--;\n for (int i2 = i1; i2 < 9; i2++)\n {\n long count2 = count[i2];\n if (count2 == 0)\n {\n continue;\n }\n count[i2]--;\n int x1 = i1 / 3;\n int y1 = i1 % 3;\n int x2 = i2 / 3;\n int y2 = i2 % 3;\n int x3 = (3 - (x1 + x2) % 3) % 3;\n int y3 = (3 - (y1 + y2) % 3) % 3;\n int i3 = (x3 % 3) * 3 + (y3 % 3);\n long count3 = count[i3];\n if (i3 >= i2 && count3 > 0)\n {\n // either i1==i2==i3 OR i1!=i2!=i3; you can never have only two i's the same.\n if (i1 == i2 && i2 == i3)\n {\n totalCount += calcCombinations(count1);//the first count value is the genuine count for that x,y coordinate.\n }\n else\n {\n totalCount += count1 * count2 * count3;\n }\n }\n count[i2]++;\n }\n count[i1]++;\n }\n\n return String.valueOf(totalCount);\n }", "public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }", "public static int calculate()\n {\n final List<Integer> oneToNine = IntStream.iterate(1, n -> n + 1)\n .limit(9)\n .boxed()\n .collect(toList());\n final List<List<Integer>> permutations = HeapPermutations.of(oneToNine);\n\n // System.out.println(permutations.size());\n //2- for each permutation\n // a. find all breaking 2 points to break\n // b. check first two sections' third is equal to the last section\n // c. if yes, add combintion to result, otherwise skip\n\n return permutations.stream()\n .flatMap(toTriples()) //find all combinations xx X yy = zz\n .filter(isPandigital()) // allow pandigital tripes through\n .map(Triple::getThird) // get the product\n .distinct() // get distinct products only given the problem statement does not allow repetition (see hint)\n .mapToInt(i -> i) // convert to primitive\n .sum(); // and finally get the sum\n }", "public static void main(String[] args) throws Exception {\n int arr[]= {7,9,88,-33,2,12,6,1};\n Arrays.sort(arr);\n /*for(int i=0; i<arr.length; i++)\n \t System.out.print(arr[i]+\", \");\n System.out.println(\"\\n DESC\");\n System.out.print(\"{ \");\n for(int i=arr.length-1; i>=0; i--) {\n \t if(arr[i]==arr[0])\n \t System.out.print(arr[i]);\n \t else \n \t\t System.out.print(arr[i]+\", \");\n }*/\n // System.out.print(\" }\");\n \n int[] ar= {6,2,2,5,2,2,1};\n int startIndex=0;\n int lastIndex=ar.length-1;\n //a is sumRight,b = sumLeft\n int a=0,b=0;\n /* while(true) {\n \t \n \t if(b>a) \n \t\t //1+2+2=+5\n \t\t a+=ar[lastIndex--];\n \t else \n \t\t //6+2+2\n \t\t\t b+=ar[startIndex++];\n \t\tif(startIndex>lastIndex) {\n \t\t\tSystem.out.println(startIndex);\n \t\t\tif(a==b)\n \t\t\t\tbreak;\n \t\t\t else\n \t\t\t throw new Exception(\"not a valid array\");\n \t\t\t\n \t\t}\n \t\t\t \n \t\t\n }\n System.out.println(lastIndex);\n */\n \n \n while(true) {\n \t \n \t if(b>a)\n \t\t a+= ar[lastIndex--];\n \t else\n b+=ar[startIndex++];\n \t if(startIndex>lastIndex) {\n \t\t if(a==b)\n \t\t\t break;\n \t }\n }\n System.out.println(lastIndex);\n\t}", "public static void main(String[] args) {\n String[] user0 = {\"/start\", \"/pink\", \"/register\", \"/orange\", \"/red\", \"a\"};\n String[] user1 = {\"/start\", \"/green\", \"/blue\", \"/pink\", \"/register\", \"/orange\", \"/one/two\"};\n String[] user2 = {\"a\", \"/one\", \"/two\"};\n String[] user3 = {\"/red\", \"/orange\", \"/yellow\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/amber\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n String[] user4 = {\"/red\", \"/orange\", \"/amber\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/lavender\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n String[] user5 = {\"a\"};\n\n// out.println(rawr(user0, user1));\n// out.println(rawr(user1, user2));\n// out.println(rawr(user2, user0));\n// out.println(rawr(user5, user2));\n out.println(rawr(user3, user4));\n// out.println(rawr(user4, user3));\n\n P1 c=new P1();\n c.findContiguousHistory(user0, user1);\n c.findContiguousHistory(user1, user2);\n c.findContiguousHistory(user2, user0);\n c.findContiguousHistory(user5, user2);\n c.findContiguousHistory(user3, user4);\n\n // below scenaro is tricky because amber match later and user3 string. We have to come back again.\n // String[] user4 = {\"/red\", \"/orange\", \"/amber\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/lavender\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n // String[] user3 = {\"/red\", \"/orange\", \"/yellow\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/amber\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n\n c.findContiguousHistory(user4, user3);\n }", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n BufferedReader sc = new BufferedReader(new FileReader(\"comehome.in\"));\n BufferedWriter out = new BufferedWriter(new FileWriter(\"comehome.out\"));\n int[][] adjMat = new int[58][58];\n ArrayList<Character> capsUsed = new ArrayList<Character>();\n int paths = Integer.parseInt(sc.readLine());\n for (int i = 0; i < adjMat.length; i++) {\n Arrays.fill(adjMat[i], 500000);\n }\n for (int i = 0; i < paths; i++) {\n String[] spl = sc.readLine().split(\" \");\n char u = spl[0].charAt(0);\n char v = spl[1].charAt(0);\n int weight = Integer.parseInt(spl[2]);\n adjMat[map(u)][map(v)] = Math.min(weight, adjMat[map(u)][map(v)]);//this is a multigraph, just take minimum edge weight\n adjMat[map(v)][map(u)] = Math.min(weight, adjMat[map(v)][map(u)]);//since its the only one that will count\n if (Character.isUpperCase(u)) {\n capsUsed.add(u);\n }\n if (Character.isUpperCase(v)) {\n capsUsed.add(v);\n }\n }\n for (int k = 0; k < adjMat.length; k++) {//intermediate...\n for (int i = 0; i < adjMat.length; i++) {\n for (int j = 0; j < adjMat.length; j++) {\n if (adjMat[i][k] + adjMat[k][j] < adjMat[i][j]) {\n adjMat[i][j] = adjMat[i][k] + adjMat[k][j];\n }\n }\n }\n }\n int min = Integer.MAX_VALUE;\n char minChar = '0';\n int zMap = map('Z');\n for (char c : capsUsed) {\n if (c != 'Z') {\n if (adjMat[map(c)][zMap] < min) {\n min = adjMat[map(c)][zMap];\n minChar = c;\n }\n }\n }\n //System.out.println(adjMat[map('R')][map('Z')]);\n out.append(minChar + \" \" + min + \"\\n\");\n out.close();\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "public static void main(String[] args) throws FileNotFoundException, IOException{\n\tScanner sc=new Scanner(new BufferedReader(new InputStreamReader (new FileInputStream(\"CodeJam2014/r1c_a/A-large.in\"))));\r\n\t\t//Scanner sc=new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t\tPrintWriter ou=new PrintWriter(new FileWriter(\"CodeJam2014/r1c_a/testal.out\"));\r\n\t\tint res,rep,i,j;\r\n\t\tlong p,q,tp,tq,cp,cq;\r\n\t\tboolean vis;\r\n\t\tString s;\r\n\t\tString[] s2=new String[3];\r\n\t\tString out=\"\";\r\n\t\t\r\n\t\tres=sc.nextInt();\r\n\t\ts=sc.nextLine();\r\n\t\tfor(rep=1;rep<=res;rep++){\r\n\t\t\ts=sc.nextLine();\r\n\t\t\ts2=s.split(\"/\");\r\n\t\t\tp=0; q=0;\r\n\t\t\tfor(i=0;i<s2[0].length();i++){\r\n\t\t\t\tp*=10;\r\n\t\t\t\tp+=(int)s2[0].charAt(i)-(int)'0';\r\n\t\t\t}\r\n\t\t\tfor(i=0;i<s2[1].length();i++){\r\n\t\t\t\tq*=10;\r\n\t\t\t\tq+=(int)s2[1].charAt(i)-(int)'0';\r\n\t\t\t}\r\n\t\t\t//p=Integer.parseInt(s2[0]); q=Integer.parseInt(s2[1]);\r\n\t\t\t//p=sc.nextInt(); q=sc.nextInt();\r\n\t\t\ttp=p/gcd(p,q); tq=q/gcd(p,q);\r\n\t\t\tSystem.out.println(tp);\r\n\t\t\tcp=0; cq=0;\r\n\t\t\tvis=true;\r\n\t\t\twhile(tp!=1){\r\n\t\t\t\ttp=tp>>1;\r\n\t\t\t\tcp++;\r\n\t\t\t}\r\n\t\t\twhile(tq!=1){\r\n\t\t\t\tif (tq%2==1) {vis=false; break;}\r\n\t\t\t\ttq/=2;\r\n\t\t\t\tcq++;\r\n\t\t\t}\r\n\t\t\tou.print(\"Case #\"+rep+\": \");\r\n\t\t\tif (!vis) ou.print(\"impossible\");\r\n\t\t\telse ou.print(cq-cp);\r\n\t\t\tif (res!=rep) ou.println();\r\n\t\t\tSystem.out.println(cq-cp);\r\n\t\t}\r\n\t\tou.close();\r\n\t}", "public static long solve(long[] data, long k) {\n int n = data.length;\n\n Buffer<Interval> buffer = new Buffer<>(Interval::new, x -> {}, n * 2);\n\n Randomized.shuffle(data);\n Arrays.sort(data);\n\n List<Interval> lastLevel = new ArrayList<>(n);\n List<Interval> curLevel = new ArrayList<>(n);\n lastLevel.add(newInterval(buffer, 0, n - 1));\n int level = Log2.floorLog(data[n - 1]);\n long mask = 0;\n for (; level >= 0; level--) {\n curLevel.clear();\n for (Interval interval : lastLevel) {\n int l = interval.l;\n int r = interval.r;\n int m = r;\n while (m >= l && Bits.get(data[m], level) == 1) {\n m--;\n }\n interval.m = m;\n }\n long total = 0;\n for (Interval interval : lastLevel) {\n total += (long) (interval.m - interval.l + 1) * (interval.relative.m - interval.relative.l + 1);\n total += (long) (interval.r - interval.m) * (interval.relative.r - interval.relative.m);\n }\n if (total < k) {\n k -= total;\n mask = Bits.set(mask, level, true);\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m && interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.r > interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m >= interval.relative.l) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n } else {\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n a.relative = a;\n curLevel.add(a);\n }\n if (interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = a;\n curLevel.add(a);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.l <= interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m < interval.relative.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n }\n\n for (Interval interval : lastLevel) {\n buffer.release(interval);\n }\n\n List<Interval> tmp = curLevel;\n curLevel = lastLevel;\n lastLevel = tmp;\n }\n\n return mask;\n }", "private static int findNextStarter(char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4, char paramChar)\n/* */ {\n/* 1576 */ int j = 0xFF00 | paramInt3;\n/* */ \n/* 1578 */ DecomposeArgs localDecomposeArgs = new DecomposeArgs(null);\n/* */ \n/* */ \n/* 1581 */ while (paramInt1 != paramInt2)\n/* */ {\n/* */ \n/* 1584 */ char c1 = paramArrayOfChar[paramInt1];\n/* 1585 */ if (c1 < paramChar) {\n/* */ break;\n/* */ }\n/* */ \n/* 1589 */ long l = getNorm32(c1);\n/* 1590 */ if ((l & j) == 0L) {\n/* */ break;\n/* */ }\n/* */ char c2;\n/* 1594 */ if (isNorm32LeadSurrogate(l))\n/* */ {\n/* 1596 */ if ((paramInt1 + 1 == paramInt2) || \n/* 1597 */ (!UTF16.isTrailSurrogate(c2 = paramArrayOfChar[(paramInt1 + 1)]))) {\n/* */ break;\n/* */ }\n/* */ \n/* 1601 */ l = getNorm32FromSurrogatePair(l, c2);\n/* */ \n/* 1603 */ if ((l & j) == 0L) {\n/* */ break;\n/* */ }\n/* */ } else {\n/* 1607 */ c2 = '\\000';\n/* */ }\n/* */ \n/* */ \n/* 1611 */ if ((l & paramInt4) != 0L)\n/* */ {\n/* */ \n/* 1614 */ int i = decompose(l, paramInt4, localDecomposeArgs);\n/* */ \n/* */ \n/* */ \n/* 1618 */ if ((localDecomposeArgs.cc == 0) && ((getNorm32(extraData, i, paramInt3) & paramInt3) == 0L)) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* 1623 */ paramInt1 += (c2 == 0 ? 1 : 2);\n/* */ }\n/* */ \n/* 1626 */ return paramInt1;\n/* */ }", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(\"superbull.in\"));\n PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"superbull.out\")));\n //Only in a tree is the winner condition(as stated in problem) satisfied\n int N = Integer.parseInt(br.readLine());\n \n long ret = 0;\n \n int[] nums = new int[N];\n for(int i = 0; i<N; i++) nums[i] = Integer.parseInt(br.readLine());\n int[] prims = new int[N]; //for dense graphs: N edges each. Loop thru edges anyways, so selection sort remove log factor\n Arrays.fill(prims, Integer.MIN_VALUE);\n prims[0] = -1;\n int curr = 0;\n \n for(int i = 0; i<N-1; i++){\n int max = Integer.MIN_VALUE;\n int next = -1;\n for(int j = 0; j<N; j++){\n if(prims[j] == -1) continue;\n \n int xor = nums[curr]^nums[j];\n prims[j] = Math.max(prims[j], xor);\n \n if(prims[j] > max){\n next = j;\n max = prims[j];\n }\n }\n ret += max;\n prims[next] = -1;\n curr = next;\n }\n pw.println(ret);\n pw.close();\n br.close();\n }", "public ArrayList<ArrayList<Integer>> fourSum(int[] num, int target) {\n int temp = 0;\n Arrays.sort(num);\n\n ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>();\n int [] s = new int [4];\n int total = 0;\n int current = -1;\n int i = 0;\n Arrays.fill(s, 0);\n HashMap<Long, Integer> m = new HashMap<Long, Integer>();\n \n \n if (num.length < 4) return a;\n \n while (i!=-1) {\n //increase the current pointer\n ++current;\n if (current > num.length-1) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else if (total + num[current] > target || total + (4-i)*num[num.length-1] < target) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else {\n //check if current number will work\n /*if (current == 0)\n {\n */\n if (i < 3) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == target) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n long c = num[s[0]]*num[s[1]]*num[s[2]]*num[current];\n long d = Math.abs((long)num[s[0]]*1000000000) \n + Math.abs((long)num[s[1]]*1000000)\n + Math.abs((long)num[s[2]]*1000)\n + Math.abs((long)num[current]);\n if (c < 0) d *= -1;\n if (!m.containsKey(d))\n {\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n b.add(num[current]);\n a.add(b);\n m.put(d, 1);\n }\n }\n /*\n } \n else if (num[current] != num[current-1])\n {\n if (i < 2) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == 0) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n a.add(b);\n }\n }\n */\n }\n }\n return a;\n }", "private static long calc1()\n {\n final int min = 1000;\n final int max = 10000;\n\n // initialize\n List<List<Integer>> m = new ArrayList<>();\n for (int k = 0; k < end; k++) {\n List<Integer> list = new ArrayList<Integer>();\n int n = 1;\n while (k >= start) {\n int p = pkn(k, n);\n if (p >= max) {\n break;\n }\n if (p >= min) {\n list.add(p);\n }\n n++;\n }\n m.add(list);\n }\n\n boolean[] arr = new boolean[end];\n arr[start] = true;\n\n List<Integer> solutions = new ArrayList<>();\n List<Integer> list = m.get(start);\n for (Integer first : list) {\n LinkedList<Integer> values = new LinkedList<>();\n values.add(first);\n f(m, arr, values, 1, solutions);\n // we stop at the first solution found\n if (!solutions.isEmpty()) {\n break;\n }\n }\n\n // solutions.stream().forEach(System.out::println);\n int res = solutions.stream().reduce(0, Integer::sum);\n return res;\n }", "private BigInteger squareToomCook3() {\n int len = mag.length;\n\n // k is the size (in ints) of the lower-order slices.\n int k = (len+2)/3; // Equal to ceil(largest/3)\n\n // r is the size (in ints) of the highest-order slice.\n int r = len - 2*k;\n\n // Obtain slices of the numbers. a2 is the most significant\n // bits of the number, and a0 the least significant.\n BigInteger a0, a1, a2;\n a2 = getToomSlice(k, r, 0, len);\n a1 = getToomSlice(k, r, 1, len);\n a0 = getToomSlice(k, r, 2, len);\n BigInteger v0, v1, v2, vm1, vinf, t1, t2, tm1, da1;\n\n v0 = a0.square();\n da1 = a2.add(a0);\n vm1 = da1.subtract(a1).square();\n da1 = da1.add(a1);\n v1 = da1.square();\n vinf = a2.square();\n v2 = da1.add(a2).shiftLeft(1).subtract(a0).square();\n\n // The algorithm requires two divisions by 2 and one by 3.\n // All divisions are known to be exact, that is, they do not produce\n // remainders, and all results are positive. The divisions by 2 are\n // implemented as right shifts which are relatively efficient, leaving\n // only a division by 3.\n // The division by 3 is done by an optimized algorithm for this case.\n t2 = v2.subtract(vm1).exactDivideBy3();\n tm1 = v1.subtract(vm1).shiftRight(1);\n t1 = v1.subtract(v0);\n t2 = t2.subtract(t1).shiftRight(1);\n t1 = t1.subtract(tm1).subtract(vinf);\n t2 = t2.subtract(vinf.shiftLeft(1));\n tm1 = tm1.subtract(t2);\n\n // Number of bits to shift left.\n int ss = k*32;\n\n return vinf.shiftLeft(ss).add(t2).shiftLeft(ss).add(t1).shiftLeft(ss).add(tm1).shiftLeft(ss).add(v0);\n }", "public static void main(String[] args) {\n \tlong[] fact = new long[MAXDOMINOES+1];\r\n \tfact[0] = 1;\r\n \tfor (int i=1; i<=MAXDOMINOES; i++)\r\n \t\tfact[i] = (fact[i-1]*i)%MOD;\r\n\r\n Scanner stdin = new Scanner(System.in);\r\n int numCases = stdin.nextInt();\r\n\r\n // Process each case.\r\n for (int loop=0; loop<numCases; loop++) {\r\n\r\n // Read in this case.\r\n n = stdin.nextInt();\r\n list = new int[n][2];\r\n for (int i=0; i<n; i++)\r\n for (int j=0; j<2; j++)\r\n list[i][j] = stdin.nextInt();\r\n\r\n // Special case - if all the dominoes are the same, all orderings work.\r\n if (same(list)) {\r\n \tSystem.out.println(fact[n]);\r\n \tcontinue;\r\n }\r\n\r\n // dp[mask][last][orientation] will store the number of permutations using the dominoes indicated by\r\n // mask, with the last domino last facing in the direction dictated by orientation. If orientation is 0,\r\n // this is the original input orientation, if it is 1, it's flipped.\r\n long[][][] dp = new long[1<<n][n][2];\r\n\r\n // Always 1 way to place one domino in a fixed orientation.\r\n for (int i=0; i<n; i++) {\r\n dp[1<<i][i][0] = 1;\r\n dp[1<<i][i][1] = 1;\r\n }\r\n\r\n // Outer DP loop, solve all problem instances for each subset of dominoes.\r\n for (int mask=3; mask<(1<<n); mask++) {\r\n\r\n // Now, try each domino as the last domino in mask.\r\n for (int last=0; last<n; last++) {\r\n\r\n // Not a valid state.\r\n if ((mask&(1<<last)) == 0) continue;\r\n\r\n int prevmask = mask - (1<<last);\r\n\r\n for (int i=0; i<n; i++) {\r\n\r\n if ((prevmask&(1<<i)) == 0) continue;\r\n\r\n // Both i and last are in regular orientation.\r\n if (list[i][1] == list[last][0])\r\n dp[mask][last][0] = (dp[mask][last][0]+dp[prevmask][i][0])%MOD;\r\n\r\n // Here i is flipped and last is regular.\r\n else if (list[i][0] == list[last][0])\r\n dp[mask][last][0] = (dp[mask][last][0]+dp[prevmask][i][1])%MOD;\r\n\r\n // i is regular but last is flipped.\r\n if (list[i][1] == list[last][1])\r\n dp[mask][last][1] = (dp[mask][last][1]+dp[prevmask][i][0])%MOD;\r\n\r\n // Both i and last are flipped.\r\n else if (list[i][0] == list[last][1])\r\n dp[mask][last][1] = (dp[mask][last][1]+dp[prevmask][i][1])%MOD;\r\n }\r\n } // end last loop\r\n } // end mask loop\r\n\r\n // Sum up result - all ways to place all dominoes over all possible last dominoes in either orientation.\r\n // Since we screened out our special case, no over-counting will occur here.\r\n long res = 0L;\r\n for (int last=0; last<n; last++) {\r\n \tres = (res + dp[(1<<n)-1][last][0])%MOD;\r\n \tif (list[last][0] != list[last][1])\r\n \t\tres = (res + dp[(1<<n)-1][last][1])%MOD;\r\n }\r\n System.out.println(res);\r\n }\r\n }", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int q = sc.nextInt();\n\n for(int k = 0; k < q; k++) {\n int m = sc.nextInt();\n int n = sc.nextInt();\n\n // indicate number of pieces\n long x = 1;\n long y = 1;\n \n ArrayList<Long> c_y = new ArrayList<Long>();\n for(int i = 0; i < m - 1; i++) {\n c_y.add(sc.nextLong());\n }\n \n ArrayList<Long> c_x = new ArrayList<Long>();\n for(int i = 0; i < n - 1; i++) {\n c_x.add(sc.nextLong());\n }\n\n Collections.sort(c_y, Collections.reverseOrder());\n Collections.sort(c_x, Collections.reverseOrder());\n\n // cut: most expensive = cut first\n int index_X = 0;\n int index_Y = 0;\n long totalCost = 0;\n\n while(!(x == n && y == m)) {\n if(x < n && y < m) {\n // compare cost to decide whether cut horizontally or vertically\n if(c_y.get(index_Y) >= c_x.get(index_X)) {\n totalCost += c_y.get(index_Y) * x;\n y++;\n index_Y++;\n } else if(c_y.get(index_Y) < c_x.get(index_X)) {\n totalCost += c_x.get(index_X) * y;\n x++;\n index_X++; \n }\n } else if(x == n && y < m) {\n totalCost += c_y.get(index_Y) * x;\n index_Y++;\n y++;\n } else if(x < n && y == m) {\n totalCost += c_x.get(index_X) * y;\n index_X++;\n x++;\n }\n }\n\n totalCost = totalCost % (long)(Math.pow(10, 9) + 7);\n System.out.println(totalCost );\n }\n }", "public static void main(String[] args) {\n\n int n = 20;\n int[] input = {0, 6, 0, 6, 4, 0, 6, 0, 6, 0, 4, 3, 0, 1, 5, 1, 2, 4, 2, 4};\n String[] inStr = {\"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"that\", \"be\", \"to\", \"be\", \"question\", \"or\", \"not\", \"is\", \"to\", \"the\"};\n int[] count = new int[100];\n for (int i = 0; i < n; i++) {\n// String line = in.nextLine();\n// String[] elem = line.split(\"\\\\s\");\n// System.out.println(elem[0]+\" - \"+elem[1]);\n// input[i] = Integer.parseInt(elem[0]);\n// inStr[i] = elem[1];\n// count[input[i]] ++;\n }\n\n for (int i = n / 2; i < input.length; i++)\n count[input[i]]++;\n\n// for (int i = 0; i < count.length; i++)\n// System.out.print(count[i]);\n// System.out.println();\n\n int printed = 0;\n int i = 0;\n StringBuffer buffer = new StringBuffer();\n while (count[i] > 0){\n// for (int i = 0; i < count.length; i++) {\n// for (Integer st : findIndex(input, i,count[i])) {\n// System.out.print(findStr(inStr, st) + \" \");\n for (String st : findIndex(input,inStr, i,count[i])) {\n // System.out.print( st + \" \");\n buffer.append(st+\" \");\n printed++;\n }\n i++;\n }\n for (int idx = printed; idx<n;idx++)\n buffer.append(\"- \");\n // System.out.print(\"- \");\n System.out.println(buffer);\n\n\n }", "public List<Integer> diffWaysToCompute(String input) {\n List<Integer> result=new ArrayList<>();\n if(input==null||input.length()==0) return result;\n List<String> ops=new ArrayList<>();\n for(int i=0; i<input.length(); i++){\n int j=i;\n while(j<input.length()&&Character.isDigit(input.charAt(j)))\n j++;\n ops.add(input.substring(i, j));\n if(j!=input.length()) ops.add(input.substring(j, j+1));\n i=j;\n }\n int N=(ops.size()+1)/2; //num of integers\n ArrayList<Integer>[][] dp=(ArrayList<Integer>[][]) new ArrayList[N][N];\n for(int d=0; d<N; d++){\n if(d==0){\n for(int i=0; i<N; i++){\n dp[i][i]=new ArrayList<>();\n dp[i][i].add(Integer.valueOf(ops.get(i*2)));\n }\n continue;\n }\n for(int i=0; i<N-d; i++){\n dp[i][i+d]=new ArrayList<>();\n for(int j=i; j<i+d; j++){\n ArrayList<Integer> left=dp[i][j], right=dp[j+1][i+d];\n String operator=ops.get(j*2+1);\n for(int leftNum:left)\n for(int rightNum:right){\n if(operator.equals(\"+\"))\n dp[i][i+d].add(leftNum+rightNum);\n else if(operator.equals(\"-\"))\n dp[i][i+d].add(leftNum-rightNum);\n else\n dp[i][i+d].add(leftNum*rightNum);\n }\n }\n }\n }\n return dp[0][N-1];\n}", "public ArrayList<Edge> Prim (String s){\n Node Start = nodeMap.get(s);\n mst = new ArrayList<>();\n HashMap<String, String> inserted = new HashMap<String, String>();\n ArrayList<Edge> failed = new ArrayList<Edge>();\n PriorityQueue<Edge> pq = new PriorityQueue<Edge>();\n ArrayList<Edge> ed = new ArrayList<Edge>(edgeMap.values());\n Edge first = ed.get(0);\n mst.add(first);\n inserted.put(first.w, first.w);\n inserted.put(first.v, first.v);\n\n priorityEdgeInsert(pq, first);\n\n while (inserted.size() <= edges() && pq.size() != 0){ //O(E log(V))\n //runs for E checking the possible V, where the number of V is devided each time, or log(V), giving ELog(V)\n Edge e = pq.poll();\n String w = inserted.get(e.w);\n String v = inserted.get(e.v);\n\n if ((w == null) ^ (v == null)){\n priorityEdgeInsert(pq, e);\n for(Edge f : failed){\n if(f.v == e.v || f.v == e.w || f.w == e.v || f.w == e.w){\n\n }\n else{\n pq.add(f);\n }\n }\n failed.clear();\n mst.add(e);\n inserted.put(e.w, e.w); //only puts one, the null one is hashed to a meaningless spot\n inserted.put(e.v, e.v);\n }\n else if ((w == null) && (v == null) ){\n failed.add(e);\n }\n else if (!(w == null) && !(v == null) ){\n failed.remove(e);\n pq.remove(e);\n }\n else if (e == null){\n System.out.println(\"HOW?\"); //should never happen.\n }\n }\n return mst;\n }", "private int createPosition (String s) {\r\n\t\tint x = 37;\r\n\t\tdouble hashCode=0;\r\n\t\tfor (int i=0; i<s.length(); i++) {\r\n\t\t\thashCode = (double) (hashCode+ (int)(s.charAt(s.length()-(i+1)))*(Math.pow(x,i)));\r\n\t\t}\r\n\t\treturn (int)(hashCode % size);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint t = in.nextInt();\n\t\twhile( t-- > 0 )\n\t\t{\n\t\t\tint n = in.nextInt();\n\t\t\tint m = in.nextInt();\n\t\t\tString s[] = new String[n];\n\t\t\tfor( int i = 0 ; i < n ; i++ )\n\t\t\t{\n\t\t\t\ts[i] = in.next();\n\t\t\t}\n\t\t\tArrayList<Point> p = new ArrayList<>();\n\t\t\tfor(int i = 0 ; i < n ; i++ )\n\t\t\t{\n\t\t\t\tfor(int j = 0 ; j < m ; j++)\n\t\t\t\t{\n\t\t\t\t\tif(s[i].charAt(j) == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\tp.add(new Point(i,j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//\t\t\tfor(int i = 0 ; i < p.size() ;i++ )\n//\t\t\t{\n//\t\t\t\tSystem.out.println(p.get(i).x +\" \" + p.get(i).y );\n//\t\t\t}\n\t\t\t\n\t\t\tHashMap<Integer,Integer> map = new HashMap<>();\n\t\t\tfor(int i = 1 ; i < p.size() ; i++ )\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0 ; i < p.size() ;i++ )\n\t\t\t{\n\t\t\t\tfor(int j = i + 1 ; j < p.size() ; j++ )\n\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\t\tPoint p1 = p.get(i);\n\t\t\t\t\t\tPoint p2 = p.get(j);\n\t\t\t\t\t\tint d = Math.abs(p1.x - p2.x) + Math.abs(p1.y - p2.y);\n\t\t\t\t\t\tif(!map.containsKey(d))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmap.put(d, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmap.put(d, map.get(d) + 1);\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\tfor(int i = 1 ; i <= n + m - 2 ; i++)\n\t\t\t{\n\t\t\t\tif (map.containsKey(i))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(map.get(i)+ \" \");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(0 + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "protected static void endPartial(long[] h) {\n h[11] += h[1]; \n h[2] ^= h[11]; \n h[1] = (h[1] << 44) | (h[1] >>> 20);\n h[0] += h[2]; \n h[3] ^= h[0]; \n h[2] = (h[2] << 15) | (h[2] >>> 49);\n h[1] += h[3]; \n h[4] ^= h[1]; \n h[3] = (h[3] << 34) | (h[3] >>> 30);\n h[2] += h[4]; \n h[5] ^= h[2]; \n h[4] = (h[4] << 21) | (h[4] >>> 43);\n h[3] += h[5]; \n h[6] ^= h[3]; \n h[5] = (h[5] << 38) | (h[5] >>> 26);\n h[4] += h[6]; \n h[7] ^= h[4]; \n h[6] = (h[6] << 33) | (h[6] >>> 31);\n h[5] += h[7]; \n h[8] ^= h[5]; \n h[7] = (h[7] << 10) | (h[7] >>> 54);\n h[6] += h[8]; \n h[9] ^= h[6]; \n h[8] = (h[8] << 13) | (h[8] >>> 51);\n h[7] += h[9]; \n h[10] ^= h[7]; \n h[9] = (h[9] << 38) | (h[9] >>> 26);\n h[8] += h[10]; \n h[11] ^= h[8]; \n h[10] = (h[10] << 53) | (h[10] >>> 11);\n h[9] += h[11]; \n h[0] ^= h[9]; \n h[11] = (h[11] << 42) | (h[11] >>> 22);\n h[10] += h[0]; \n h[1] ^= h[10]; \n h[0] = (h[0] << 54) | (h[0] >>> 10);\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\t\tbr = new BufferedReader(new FileReader(new File(\"input.txt\")));\r\n\t\tSystem.setOut(new PrintStream(new File(\"output.txt\")));\r\n\t\tint T = readInt();\r\n\t\t\r\n\t\tfor (int ind = 1; ind<=T; ind++) {\r\n\t\t\tSystem.out.print(\"Case #\" + ind + \": \");\r\n\t\t\t\r\n\t\t\tint N = readInt();\r\n\t\t\tint[] ar = readIntArr();\r\n\t\t\tfor (int i = 0; i < N; i++)ar[i]--;\r\n\t\t\tboolean used[] = new boolean[N];\r\n\t\t\tint ans = 0;\r\n\t\t\tint pairMax = 0;\r\n\t\t\tint cycleMax = 0;\r\n\t\t\tint cyclePair = 0;\r\n\t\t\tint pair = 0;\r\n\t\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\t\tif (!used[i]) {\r\n\t\t\t\t\tList<Integer> list = new LinkedList<Integer>();\r\n\t\t\t\t\tlist.add(i);\r\n\t\t\t\t\tused[i] = true;\r\n\t\t\t\t\tint j = ar[i];\r\n\t\t\t\t\twhile(!list.contains(j) && !used[j]) {\r\n\t\t\t\t\t\tlist.add(j);\r\n\t\t\t\t\t\tused[j] = true;\r\n\t\t\t\t\t\tj = ar[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!list.contains(j))continue;\r\n\t\t\t\t\tif (list.size() == 2)pair++;\r\n\t\t\t\t\tboolean removed = false;\r\n\t\t\t\t\twhile(list.get(0) != j){list.remove(0);removed = true;}\r\n\t\t\t\t\tif (list.size() > 2 && list.size() > cycleMax) cycleMax = list.size();\r\n\t\t\t\t\tif (list.size() == 2) {\r\n\t\t\t\t\t\tint a = list.remove(0);\r\n\t\t\t\t\t\tint b = list.remove(0);\r\n\t\t\t\t\t\tint tmp = 2;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tboolean us[] = new boolean[N];\r\n\t\t\t\t\t\t\tus[a] = true;\r\n\t\t\t\t\t\t\tus[b] = true;\r\n\t\t\t\t\t\t\t//System.out.println(\" test \" + a + b);\r\n\t\t\t\t\t\t\tSet<Integer> set = new HashSet<Integer>();\r\n\t\t\t\t\t\t\tset.add(a);\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tboolean found = false;\r\n\t\t\t\t\t\t\t\tSet<Integer> tSet = new HashSet<Integer>();\r\n\t\t\t\t\t\t\t\tfor (int ii = 0; ii < N; ii++) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (!us[ii] && set.contains(ar[ii])) {\r\n\t\t\t\t\t\t\t\t\t\tus[ii] = true;\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\ttSet.add(ii);\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\tif (found)tmp++;\r\n\t\t\t\t\t\t\t\tif (!found)break;\r\n\t\t\t\t\t\t\t\tset.addAll(tSet);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tset = new HashSet<Integer>();\r\n\t\t\t\t\t\t\tset.add(b);\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tboolean found = false;\r\n\t\t\t\t\t\t\t\tSet<Integer> tSet = new HashSet<Integer>();\r\n\t\t\t\t\t\t\t\tfor (int ii = 0; ii < N; ii++) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (!us[ii] && set.contains(ar[ii])) {\r\n\t\t\t\t\t\t\t\t\t\tus[ii] = true;\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\ttSet.add(ii);\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\tif(found)tmp++;\r\n\t\t\t\t\t\t\t\tif (!found)break;\r\n\t\t\t\t\t\t\t\tset.addAll(tSet);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//if (removed) {\r\n\t\t\t\t\t\t//\tif (tmp > cyclePair)cyclePair = tmp;\r\n\t\t\t\t\t\t//} else {\r\n\t\t\t\t\t\t pairMax += tmp;\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//cyclePair += 2 * pair;\r\n\t\t\t//if (pair > 1) pairMax += 2 * (pair - 1);\r\n\t\t\tans = Math.max(cyclePair, pairMax);\r\n\t\t\tans = Math.max(cycleMax, ans);\r\n\t\t\tSystem.out.println(ans);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "private static int zzaz(java.lang.String r5) {\n /*\n int r0 = r5.hashCode()\n r1 = 0\n r2 = 3\n r3 = 2\n r4 = 1\n switch(r0) {\n case -1095064472: goto L_0x002a;\n case 187078296: goto L_0x0020;\n case 1504578661: goto L_0x0016;\n case 1505942594: goto L_0x000c;\n default: goto L_0x000b;\n }\n L_0x000b:\n goto L_0x0034\n L_0x000c:\n java.lang.String r0 = \"audio/vnd.dts.hd\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 3\n goto L_0x0035\n L_0x0016:\n java.lang.String r0 = \"audio/eac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 1\n goto L_0x0035\n L_0x0020:\n java.lang.String r0 = \"audio/ac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 0\n goto L_0x0035\n L_0x002a:\n java.lang.String r0 = \"audio/vnd.dts\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 2\n goto L_0x0035\n L_0x0034:\n r5 = -1\n L_0x0035:\n if (r5 == 0) goto L_0x0045\n if (r5 == r4) goto L_0x0043\n if (r5 == r3) goto L_0x0041\n if (r5 == r2) goto L_0x003e\n return r1\n L_0x003e:\n r5 = 8\n return r5\n L_0x0041:\n r5 = 7\n return r5\n L_0x0043:\n r5 = 6\n return r5\n L_0x0045:\n r5 = 5\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzio.zzaz(java.lang.String):int\");\n }", "public static void main(String[] args) {\n String res = \"1\";\r\n for (int i = 0; i < 100; i++) res += '0';\r\n MAX = new BigInteger(res);\r\n generate(\"1\", 1, 1);\r\n generate(\"2\", 1, 4);\r\n generate(\"3\", 1, 9);\r\n Arrays.sort(values);\r\n// System.out.println(count);\r\n\r\n// for (int i = 0; i < 100; i++) {\r\n// System.out.println(values[i]);\r\n// }\r\n\r\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n try {\r\n String line = br.readLine();\r\n int K = Integer.parseInt(line);\r\n for (int i = 1; i <= K; i++) {\r\n String[] v = br.readLine().split(\" \");\r\n BigInteger A = new BigInteger(v[0]);\r\n BigInteger B = new BigInteger(v[1]);\r\n\r\n int p1 = Arrays.binarySearch(values, A);\r\n if (p1 < 0) {\r\n p1 = -p1 - 1;\r\n }\r\n int p2 = Arrays.binarySearch(values, B);\r\n if (p2 < 0) {\r\n p2 = -p2 - 1;\r\n } else {\r\n p2++;\r\n }\r\n int result = p2 - p1;\r\n //System.out.println(p1 + \" \" + p2);\r\n System.out.println(\"Case #\" + i + \": \" + result);\r\n\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\r\n }\r\n }", "private int m3423z(int i, int i2) {\n int i3;\n int i4;\n for (int size = this.f4373c.size() - 1; size >= 0; size--) {\n C0933b bVar = this.f4373c.get(size);\n int i5 = bVar.f4379a;\n if (i5 == 8) {\n int i6 = bVar.f4380b;\n int i7 = bVar.f4382d;\n if (i6 < i7) {\n i4 = i6;\n i3 = i7;\n } else {\n i3 = i6;\n i4 = i7;\n }\n if (i < i4 || i > i3) {\n if (i < i6) {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n bVar.f4382d = i7 - 1;\n }\n }\n } else if (i4 == i6) {\n if (i2 == 1) {\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4382d = i7 - 1;\n }\n i++;\n } else {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n }\n i--;\n }\n } else {\n int i8 = bVar.f4380b;\n if (i8 <= i) {\n if (i5 == 1) {\n i -= bVar.f4382d;\n } else if (i5 == 2) {\n i += bVar.f4382d;\n }\n } else if (i2 == 1) {\n bVar.f4380b = i8 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i8 - 1;\n }\n }\n }\n for (int size2 = this.f4373c.size() - 1; size2 >= 0; size2--) {\n C0933b bVar2 = this.f4373c.get(size2);\n if (bVar2.f4379a == 8) {\n int i9 = bVar2.f4382d;\n if (i9 == bVar2.f4380b || i9 < 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n } else if (bVar2.f4382d <= 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n }\n return i;\n }", "public static void main(String[] args) {\n ArrayList<Character> actual=new ArrayList<>();\n actual.add('R');\n actual.add('G');\n actual.add('B');\n actual.add('Y');\n ArrayList<Character> guess=new ArrayList<>();\n guess.add('G');\n guess.add('G');\n guess.add('R');\n guess.add('R');\n ArrayList<Character> hitLists=new ArrayList<>();\n ArrayList<Character> pseudoLists=new ArrayList<>();\n int hits=0;\n int pseudoHits=0;\n for(int i=0;i<4;i++)\n {\n \t if(actual.get(i)==guess.get(i))\n \t {\n \t\t hits++;\n \t\t hitLists.add(actual.get(i));\n \t }\n }\n for(int i=0;i<4;i++)\n {\n \t char g=guess.get(i);\n \t if(g!=actual.get(i)&&!hitLists.contains(g)&&actual.contains(g))\n { \n\t pseudoLists.add(g);\n }\n }\n for(int i=0;i<pseudoLists.size();i++)\n { char g=pseudoLists.get(i);\n \t int actualOccs=numOccurences(g,actual);\n \t int guessOccs=numOccurences(g,guess);\n \t \n\t\tif(guessOccs==actualOccs)\n \t {\n \t\t pseudoHits++; \n \t }\n\t\telse{\n\t\t\tpseudoHits+=Math.min(guessOccs,actualOccs);\n\t\t}\t \n System.out.println(g);\n }\n \n \n System.out.println(hits+\" hits \"+pseudoHits+\" pseudoHits\");\n\t}", "static int alternate(String s) {\n HashMap<Character,Integer>mapCharacter = new HashMap<>();\n LinkedList<String>twoChar=new LinkedList<>();\n LinkedList<Character>arr=new LinkedList<>();\n Stack<String>stack=new Stack<>();\n int largest=0;\n int counter=0;\n if (s.length()==1){\n return 0;\n }\n\n for (int i =0; i<s.length();i++){\n if (mapCharacter.get(s.charAt(i))==null)\n {\n mapCharacter.put(s.charAt(i),1);\n }\n }\n\n Iterator iterator=mapCharacter.entrySet().iterator();\n while (iterator.hasNext()){\n counter++;\n Map.Entry entry=(Map.Entry)iterator.next();\n arr.addFirst((Character) entry.getKey());\n }\n\n for (int i=0;i<arr.size();i++){\n for (int j=i;j<arr.size();j++){\n StringBuilder sb =new StringBuilder();\n for (int k=0;k<s.length();k++){\n if (s.charAt(k)==arr.get(i)||s.charAt(k)==arr.get(j)){\n sb.append(s.charAt(k));\n }\n }\n twoChar.addFirst(sb.toString());\n }\n }\n\n\n for (int b=0;b<twoChar.size();b++){\n String elementIn=twoChar.get(b);\n stack.push(elementIn);\n\n for (int i=0;i<elementIn.length()-1;i++){\n\n if (elementIn.charAt(i)==elementIn.charAt(i+1)){\n stack.pop();\n break;\n }\n }\n }\n\n int stackSize=stack.size();\n\n for (int j=0;j<stackSize;j++){\n String s1=stack.pop();\n int length=s1.length();\n if (length>largest){\n largest=length;\n\n }\n }\n return largest;\n\n\n\n\n }", "private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}", "public static void solve(){\n HashMap<Integer,HashMap<Integer,Queue<String>>> wordsByVowels = new HashMap<>();\n \n\n int n = in.nextInt();\n //String[] words = new String[n];\n for(int i=0; i<n;i++){\n String s = in.next();\n //words[i] = s;\n int vowelCount = vowelCount(s);\n int lastV = lastVowel(s);//a=1,e=2,i=3,o=4,u=5\n //vowelFrequency[vowelCount][lastV]++;\n //store index of a word\n if(!wordsByVowels.containsKey(vowelCount)){\n HashMap<Integer,Queue<String>> hm =new HashMap<>(); \n wordsByVowels.put(vowelCount,hm);\n }\n if(!wordsByVowels.get(vowelCount).containsKey(lastV)){\n wordsByVowels.get(vowelCount).put(lastV,new LinkedList<String>());\n }\n //if(wordsByVowels.get(vowelCount))\n wordsByVowels.get(vowelCount).get(lastV).add(s);\n }\n\n //now separate as complete \n Queue<Pairs> complete = new LinkedList<>();\n Queue<Pairs> incomplete = new LinkedList<>();\n for(Map.Entry<Integer , HashMap<Integer,Queue<String>> > entry: wordsByVowels.entrySet()){\n HashMap<Integer,Queue<String>> lastMap = entry.getValue();\n //iterate over Strings with same number of vowels\n for(Map.Entry<Integer,Queue<String>> e: lastMap.entrySet()){\n //take stack which contains elements with similar endVowel\n Queue<String> st = e.getValue();\n while(st.size()>=2){\n Pairs p = new Pairs();\n p.s1 = st.poll(); \n p.s2 = st.poll(); \n complete.add(p); \n }\n }\n Queue<String> remainings = new LinkedList<>();\n\n for(Map.Entry<Integer,Queue<String>> e: lastMap.entrySet()){\n //take stack which contains elements with similar endVowel\n Queue<String> st = e.getValue();\n if(st.size()>0){\n remainings.add(st.poll());\n }\n }\n while(remainings.size()>=2){\n Pairs p = new Pairs();\n p.s1 = remainings.poll();\n p.s2 = remainings.poll();\n incomplete.add(p); \n }\n }\n \n //System.out.println(\"here\");\n//now we have both complete and incomplete and we can mix them well first mix completes with incompletes then mix completes if left any\n //System.out.printf(\"com %d inc %d\\n\",complete.size(),incomplete.size());\n //System.out.printf(\"com %d inc %d\\n\",complete.size(),incomplete.size());\n int lc = 0;\n if(complete.size()>incomplete.size()){\n lc=incomplete.size()+ (complete.size()-incomplete.size())/2;\n }else{\n lc = complete.size();\n }\n\n System.out.println(lc);\n \n\n while(complete.size()>0 && incomplete.size()>0){\n Pairs inc =incomplete.poll();\n Pairs com =complete.poll();\n System.out.printf(\"%s %s\\n%s %s\\n\",inc.s1,com.s1,inc.s2,com.s2);\n }\n\n while(complete.size()>=2){\n Pairs com =complete.poll();\n Pairs com2 =complete.poll();\n System.out.printf(\"%s %s\\n%s %s\\n\",com2.s1,com.s1,com2.s2,com.s2);\n }\n \n\n\n\n }", "public static void main(String[] args){\n int MIN = Integer.parseInt(args[0]);\n MAX = Integer.parseInt(args[1]);\n cutoffs = new int[args.length - 2];\n cache = new ArrayList<IndexedArrayList<SuperSavvyTrieHelper2>>();\n for (int i = 2; i < args.length; i++){\n cutoffs[i - 2] = Integer.parseInt(args[i]);\n cache.add(new IndexedArrayList<SuperSavvyTrieHelper2>());\n }\n for (int i = 0; i < cutoffs.length / 2; i++){\n int temp = cutoffs[i];\n cutoffs[i] = cutoffs[cutoffs.length - 1 - i];\n cutoffs[cutoffs.length - 1 - i] = temp;\n }\n multiplicitiesUsed = new boolean[MAX + 1];\n basesUsed = new DoublyLinkedArray(MAX + 1);\n SuperSavvyTrieHelper2.setCorrespondance(basesUsed);\n /*\n long count1 = lowerRecursion(MAX, 0);\n long count2 = middleRecursion(MAX, 0);\n long count3 = upperRecursion(MAX, 0);\n long total = count1 + count2 + count3;\n System.out.printf(\"%d + %d + %d = %d\\n\", count1, count2, count3, total);\n */\n hitCounts = new long[cutoffs.length];\n missCounts = new long[cutoffs.length];\n statCollector = new StatCollector(cutoffs);\n\n long startTime = System.nanoTime();\n long[] values = new long[MAX - MIN + 1];\n for (int i = MIN; i <= MAX; i++) {\n values[i - MIN] = upperRecursionWrapper(i);\n }\n //long[] testValues = new long[] {1752443,1911046, 2067456,2249444,2429337, 2647532,2852449,3101167,3350292,3632299,3916575};\n for (int i = 0; i < values.length; i++){\n //if (testValues[i] != values[i]){\n System.out.printf(\"%d: %d\\n\", i + MIN, values[i]);\n //}\n }\n long endTime = System.nanoTime();\n System.out.printf(\"%f,\", (double)(endTime - startTime) / 1000000000.0);\n long totalMissCounts = 0;\n long totalMissWeight1 = 0;\n long totalMissWeight2 = 0;\n long totalMissWeight3 = 0;\n /*\n for (int i = 0; i < cutoffs.length; i++){\n long totalCounts = hitCounts[i] + missCounts[i];\n totalMissCounts += missCounts[i];\n totalMissWeight1 += missCounts[i] * cutoffs[i];\n totalMissWeight2 += (hitCounts[i] / missCounts[i]) * cutoffs[i];\n totalMissWeight3 += (hitCounts[i] - missCounts[i]) * cutoffs[i] * cutoffs[i];\n System.out.printf(\"\\tCache %d: %d/%d/%d (%.5f%%)\", cutoffs[i], hitCounts[i], missCounts[i], totalCounts, (double) hitCounts[i] / totalCounts);\n }\n System.out.printf(\"\\t\\tMissCounts: %d, weighted: %d, ratio: %d, diff^2: %d\\n\", totalMissCounts, totalMissWeight1, totalMissWeight2, totalMissWeight3);\n */\n statCollector.printAll();\n }", "public static void main(String[] args) {\n int[][] bn = new int[127][];\n \n for(int i = 1; i <128; i++)\n {\n int m = (int) (Math.log10(i)/Math.log10(2));\n \n int l = i, j = 2*m; int[] b = new int[2*m+1]; \n \n while(l >= 1)\n {\n int k = l;\n l = l/2;\n \n b[j] = k - l*2; j--;\n }\n \n bn[i-1] = b;\n }\n \n /*int[] ds = new int[255*255*8];*/ int[] df = new int[14]; Arrays.fill(df, 0);\n //int l = 0;\n \n for(int i = 0; i <127; i++)\n {\n for(int j = 0; j<127; j++)\n {\n int k, d = 0;\n for(k = 0; k < bn[i].length; k++)\n { \n if(bn[i][k] == 0)\n {\n d++;\n }\n else if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n \n for(k = 0; k < bn[j].length; k++)\n {\n if(bn[j][k] == 0)\n {\n d++;\n }\n else if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n \n if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n }\n double sum = sum(df); int[] numb = {1,3,3,5,5,5,5,7,7,7,7,7,7,7,7}; int tb = 0;\n \n for(int i = 0; i < 14; i++)\n {\n tb = tb + (int)((df[i]*100/sum) + 0.5)*numb[i];\n \n System.out.print((int)((df[i]*100/sum) + 0.5)+\",\");\n }\n System.out.println();\n System.out.println(tb);\n }", "private static void findBigramCountsTuring() {\n\n\t\tbigramCountTI= new HashMap<Integer,Double>();\n\t\tdouble value;\n\t\tfor(int i:bucketCountT.keySet()){\n\t\t\tif(i==0)\n\t\t\t\tcontinue;\n\t\t\tvalue= ((i+1)*bucketCountT.getOrDefault(i+1, 0.0))/bucketCountT.get(i);\n\t\t\tbigramCountTI.put(i,value);\n\t\t}\n\t}", "public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }", "private static void testAlgorithmOptimality() {\n AlgoFunction testAlgo = SG16Algorithm::new;\n\n //printSeed = false; // keep this commented out.\n Random seedRand = new Random(1241);\n int initial = seedRand.nextInt();\n for (int i=0; i<50000000; i++) {\n int sizeX = seedRand.nextInt(150) + 5;\n int sizeY = seedRand.nextInt(150) + 5;\n int seed = i+initial;\n int ratio = seedRand.nextInt(50) + 5;\n \n int max = (sizeX+1)*(sizeY+1);\n int p1 = seedRand.nextInt(max);\n int p2 = seedRand.nextInt(max-1);\n if (p2 == p1) {\n p2 = max-1;\n }\n \n int sx = p1%(sizeX+1);\n int sy = p1/(sizeX+1);\n int ex = p2%(sizeX+1);\n int ey = p2/(sizeX+1);\n\n double restPathLength = 0, normalPathLength = 0;\n try {\n GridGraph gridGraph = DefaultGenerator.generateSeededGraphOnly(seed, sizeX, sizeY, ratio);\n for (int iii=0;iii<300;++iii) Utility.generatePath(testAlgo, gridGraph, seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1),seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1));\n int[][] path = Utility.generatePath(testAlgo, gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n restPathLength = Utility.computePathLength(gridGraph, path);\n \n path = Utility.computeOptimalPathOnline(gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n normalPathLength = Utility.computePathLength(gridGraph, path);\n }catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"EXCEPTION OCCURRED!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n }\n \n if (Math.abs(restPathLength - normalPathLength) > 0.000001f) {\n //if ((restPathLength == 0.f) != (normalPathLength == 0.f)) {\n System.out.println(\"============\");\n System.out.println(\"Discrepancy Discovered!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n System.out.println(restPathLength / normalPathLength);\n System.out.println(\"============\");\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n } else {\n if (i%1000 == 999) {\n System.out.println(\"Count: \" + (i+1));\n System.out.println(\"OK: Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n }\n }\n }\n }", "private boolean calculateMaximumLengthBitonicSubarray() {\n\n boolean found = false; // does any BSA found\n\n boolean directionChange = false; //does direction numberOfWays increase to decrease\n\n int countOfChange = 0;\n\n int i = 0;\n directionChange = false;\n int start = i;\n i++;\n for (; i < input.length; i++) {\n if (countOfChange != 0 && countOfChange % 2 == 0) {\n if (this.length < (i - 2 - start + 1)) {\n this.i = start;\n this.j = i - 2;\n this.length = this.j - this.i + 1;\n }\n start = i - 2;\n countOfChange = 0;\n }\n\n if (input[i] > input[i - 1]) {\n if (directionChange == true) {\n countOfChange++;\n }\n directionChange = false;\n }\n if (input[i] < input[i - 1]) {\n if (directionChange == false) {\n countOfChange++;\n }\n directionChange = true;\n }\n\n\n }\n\n if (directionChange == true) {\n if (this.length < (i - 1 - start + 1)) {\n this.i = start;\n this.j = i - 1;\n this.length = this.j - this.i + 1;\n }\n }\n return directionChange;\n }", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "public void reduce(Text prefix, Iterator<IntWritable> iter,\n OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\nint a000 = 0;\nint a001 = 0;\nint a002 = 0;\nint a003 = 0;\nint a004 = 0;\nint a005 = 0;\nint a006 = 0;\nint a007 = 0;\nint a008 = 0;\nint a009 = 0;\nint a010 = 0;\nint a011 = 0;\nint a012 = 0;\nint a013 = 0;\nint a014 = 0;\nint a015 = 0;\nint a016 = 0;\nint a017 = 0;\nint a018 = 0;\nint a019 = 0;\nint a020 = 0;\nint a021 = 0;\nint a022 = 0;\nint a023 = 0;\nint a024 = 0;\nint cur = 0;\n\nwhile (iter.hasNext()) {\ncur = iter.next().get();\na014 = a022 - a006;\na013 = -2 - a022;\na018 += a003;\na011 -= a011;\na011 += a018;\na009 -= cur;\nif (a019 <= a021) {\na014 = a003 + a003;\na011 = a021 + 4;\na017 -= a002;\na005 = -5 - a019;\na004 = a003 - a016;\ncur += a017;\na013 += a010;\ncur -= a012;\na006 = a000 + a015;\na017 = a014 + a022;\na011 = a020 + a013;\na014 += a001;\na005 = a016 + a007;\ncur = 2 + a011;\na020 = a023 - a006;\na007 += a021;\na021 = a021 + a008;\na000 += a008;\na024 = a024 - a009;\na017 += 4;\na013 = a006 - a023;\na013 = a009 + a008;\na010 += a001;\na003 = a018 - a018;\na015 = a023 + a023;\na016 = a009 - a002;\na003 += -1;\na013 = a022 + a014;\na018 -= a020;\na001 = a003 + a009;\na024 += a015;\n} else {\nif (a017 > a011) {\na009 -= a001;\na024 -= a007;\na005 = a017 - a007;\na020 += a020;\nif (a003 != a001) {\na009 += a006;\na006 += a017;\na016 -= a004;\na024 = a008 + a002;\na014 -= a024;\na017 -= a010;\na012 -= a003;\na005 += a002;\na005 = a007 - a014;\na013 = a013 - a001;\na005 = a019 + a016;\na024 -= a014;\ncur = a005 - a010;\na004 = a003 - a001;\na000 = a021 - -1;\na019 = a006 - a008;\na006 = a018 + a009;\na015 -= a013;\na017 = a019 - a022;\na004 += a019;\na023 += a016;\na010 += a000;\na003 += a011;\na011 += a019;\na009 += a014;\na018 = a012 + a001;\ncur = -4 + 3;\na021 = a017 - a001;\na004 += a002;\na020 = -5 + a024;\na023 = a020 + a018;\na024 += a018;\n} else {\na017 = -5 - a012;\na013 = a023 - a018;\na020 = a020 - a017;\na003 += a013;\na004 = a019 - cur;\na016 += a010;\na021 += a018;\na008 = a010 - a012;\na010 -= a019;\na007 -= a013;\na015 -= a019;\na019 = a004 + a021;\na011 = a013 + a006;\na005 += a004;\na015 -= a016;\na017 = a002 - a024;\na002 -= a007;\na022 = a004 - cur;\na011 = a021 + a014;\na004 += a020;\na020 = a020 + a009;\na007 = a012 - a002;\na018 = a003 - a001;\na011 = a000 + a009;\na019 = a021 + a017;\na017 = a022 - a013;\na014 = a018 - a020;\na009 -= a023;\na007 -= a008;\na020 = 2 + a011;\na009 = cur + a010;\na015 -= a018;\na010 = a024 + a014;\n}\ncur -= a020;\n} else {\na008 = a003 - a017;\na024 -= a004;\nif (a014 >= a018) {\na005 = a000 + a021;\na003 = a006 + a002;\na009 = a021 + a023;\na003 += -5;\na022 += a024;\na010 = a014 + a016;\na024 = a008 + a010;\na008 = 2 - a003;\na014 -= a002;\na007 = a006 - a023;\na014 += a018;\na001 = a009 + a016;\na018 += a022;\na001 = a019 - a018;\na008 -= a011;\na019 -= a001;\na010 += a014;\ncur += a011;\na024 = a022 - a018;\na014 = a003 - a023;\na004 -= a002;\n} else {\na020 += a017;\na001 = a012 + a009;\na015 += a013;\na018 += a003;\na013 += a009;\na007 = a015 + a019;\na012 += a001;\na009 = a010 + -1;\na023 -= a017;\na020 = a017 + a004;\na005 = a011 - a001;\ncur -= a000;\na020 = a002 + a002;\na004 += a017;\na022 = a017 + a024;\na001 -= a016;\na012 = a021 + 0;\na002 -= a018;\na011 += a001;\na024 = a001 + a002;\na003 -= a015;\na016 = a022 - a014;\na008 = a002 - a001;\na006 += a009;\na018 -= a000;\na008 = a000 - a004;\na019 += a021;\na009 = a021 - a011;\na000 += a020;\na002 += a009;\nif (a024 == a022) {\ncur = a012 + a009;\na007 = a002 + a012;\na015 += a001;\na022 = a007 + a011;\na012 += a021;\na003 -= cur;\na018 -= a011;\na012 = a019 - a013;\na000 = a010 - a005;\na004 = a014 - a009;\na001 = a000 + a005;\na010 += a004;\na008 = a023 - 3;\na009 += a022;\na005 -= a018;\na004 += a003;\na018 = a001 + a001;\na010 = a003 + a014;\na011 -= a003;\na000 += 1;\na006 -= a018;\na008 = a011 - a009;\na008 = a013 - a009;\na011 = a016 + a009;\na008 -= a011;\na024 = a000 + a003;\na015 -= 4;\ncur = a008 - a024;\na024 = a012 - a008;\na005 = a023 + a020;\na024 -= a003;\n} else {\na017 = a012 + a013;\na017 = a019 - a000;\n}\na018 -= a005;\na006 = a021 + a019;\na005 += a007;\na018 += cur;\na005 += a008;\na008 += a017;\na019 = a002 - a006;\na005 = a000 + a011;\na003 = a021 - a005;\na019 = a014 + a006;\na018 -= a010;\na006 = 1 + a023;\na024 += a016;\na018 += a022;\na011 += a024;\na003 = a007 - a010;\na001 = a019 + a013;\na022 += a013;\na017 += a008;\na006 = a010 + a011;\na023 += a006;\na009 = a011 + a002;\na022 -= a015;\na024 = a012 - a019;\na001 -= a023;\na010 = a019 + cur;\na002 -= a009;\na012 -= a010;\na001 -= a006;\na021 = a000 - a000;\n}\na000 += a008;\na010 = a004 + a013;\na001 += cur;\na004 += a010;\na022 = a020 + a016;\na016 -= a008;\na010 = 4 - a018;\na007 = a021 - a011;\na010 -= a006;\na011 = a018 + a008;\na002 -= a000;\na004 -= a016;\na012 = a018 - a003;\na010 = a005 + a012;\na013 -= a005;\na011 = a010 - a001;\na007 -= a000;\na001 = a014 + a013;\na008 += a002;\na017 = a011 - a020;\na009 -= a013;\na022 -= a010;\na022 = a011 - a010;\n}\na005 = a021 - a002;\n}\na003 += a010;\na012 = cur - a021;\ncur += a017;\n}\noutput.collect(prefix, new IntWritable(a003));\n}", "public static void main(String... args) {\n\n Set<Long> As = new HashSet<>();\n int N = 100;\n for (long p = -N; p <= N; ++p) {\n for (long q = -N; q <= p; ++q) {\n for (long r = -N; r <= q; ++r) {\n if (r==0 || p==0 || q==0)\n continue;\n\n long nom = r*p*q;\n long den = r*p + r*q + p*q;\n\n if (den != 0 && nom % den==0 && (nom^den)>=0) {\n long A = nom/den;\n\n if (A==nom) {\n As.add(A);\n System.out.printf(\"A=%d (p=%d, q=%d, r=%d)\\n\", A, p, q, r);\n }\n }\n }\n }\n }\n Long[] aa = As.toArray(new Long[As.size()]);\n Arrays.sort(aa);\n System.out.printf(\"============\\n\");\n System.out.printf(\"A(%d)=%s\\n\", aa.length, Arrays.toString(aa));\n\n for (long a = 1; a < 100; ++a) {\n if (isAlexandrian(a))\n System.out.printf(\"A=%dn\", a);\n }\n }", "public Set<List<String>> getCombination(int[] inHand) {\n Set<List<String>> result = new HashSet<>();\n for (int i = 0; i < inHand.length; i++) {\n if (inHand[i] < 1) continue;\n int[] copyHand = copyArray(inHand);\n //possibility of A AA AAA\n for (int j = 1; j <= inHand[i]; j++) {\n if (j == 1) {\n String cSet = \"\";\n\n for (int seq = i; seq <= i + 2; seq++) {\n if (seq >= inHand.length || copyHand[seq] < 1) continue;\n cSet += seq;\n copyHand[seq] -= 1;\n }\n// System.out.println(\"i: \" + i + \" j: \" + j+\"inhand: \" + arrayToString\n// (inHand));\n\n Set<List<String>> a = getCombination(copyHand);\n Set<List<String>> newA = new HashSet<>();\n for (List<String> s : a) {\n s.add(cSet);\n s.sort(Comparator.naturalOrder());\n if (s.equals(\"\")) continue;\n newA.add(s);\n }\n result.addAll(newA);\n continue;\n }\n\n String currentSet = \"\";\n int[] copyOfInHand = copyArray(inHand);\n for (int t = 0; t < j; t++) {\n currentSet += i;\n }\n\n copyOfInHand[i] -= j;\n Set<List<String>> after = getCombination(copyOfInHand);\n Set<List<String>> newAfter = new HashSet<>();\n for (List<String> s : after) {\n s.add(currentSet);\n s.sort(Comparator.naturalOrder());\n newAfter.add(s);\n }\n result.addAll(newAfter);\n }\n }\n if (result.isEmpty()) result.add(new ArrayList<>());\n int min = result.stream().map(set -> set.size()).min(Comparator\n .naturalOrder()).get();\n Set<List<String>> minSets = result.stream().filter(set -> set.size() == min)\n .collect(Collectors\n .toSet());\n// combinationCache.put(inHand, minSets);\n return minSets;\n }", "void solve() {\n num = new ArrayList<>();\n num.add(BigInteger.valueOf(4));\n for (int len = 2; len <= 100; len++)\n generate(\"4\", 1, len, false);\n Collections.sort(num);\n for (int tc = ii(); tc > 0; tc--) {\n long x = il();\n BigInteger X = BigInteger.valueOf(x);\n for (int i = 0; i < num.size(); i++) {\n if (num.get(i).mod(X).equals(BigInteger.ZERO)) {\n String z = num.get(i).toString();\n int end = z.lastIndexOf('4');\n int len = z.length();\n int a = 2 * (end+1);\n int b = len - end;\n out.println(a + b);\n break;\n }\n }\n }\n }", "public static String makeAlgorithm(String input) {\r\n\t\ttry {\r\n\t\t\tBufferedReader reader = new BufferedReader(new StringReader(input));\r\n\t\t\tint testCases = Integer.parseInt(reader.readLine());\r\n\t\t\tStringBuffer outputBuffer = new StringBuffer();\r\n\t\t\tfor (int i = 0; i < testCases; i++) {\r\n\t\t\t\toutputBuffer.append(\"Case #\" + (i + 1) + \": \");\r\n\t\t\t\tString[] line = reader.readLine().split(\" \");\r\n\t\t\t\tint x = Integer.parseInt(line[0]);\r\n\t\t\t\tint y = Integer.parseInt(line[1]);\r\n\t\t\t\tint movedX = 0;\r\n\t\t\t\tint movedY= 0;\r\n\t\t\t\tint p=1;\r\n\t\t\t\tfor(int j=0; j<(2*Math.abs(y))-1; j++)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tif(y>0)\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"N\":\"S\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"S\":\"N\");\r\n\t\t\t\t\tif(y>0)\r\n\t\t\t\t\t\tmovedY += j%2==0?p:-p;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmovedY += j%2==0?-p:p;\r\n\t\t\t\t\tp++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor(int j=0; j<(2*Math.abs(x))-1; j++)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tif(j==0)\r\n\t\t\t\t\t\tif(x>0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\toutputBuffer.append(\"W\");\r\n\t\t\t\t\t\t\tmovedX -= p;\r\n\t\t\t\t\t\t\tp++;\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\toutputBuffer.append(\"E\");\r\n\t\t\t\t\t\t\tmovedX += p;\r\n\t\t\t\t\t\t\tp++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(x>0)\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"E\":\"W\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\toutputBuffer.append(j%2==0?\"W\":\"E\");\r\n\t\t\t\t\tif(x>0)\r\n\t\t\t\t\t\tmovedX += j%2==0?p:-p;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmovedX += j%2==0?-p:p;\r\n\t\t\t\t\tp++;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(movedX + \" \" + movedY);\r\n\t\t\t\toutputBuffer.append(\"\\n\");\r\n\r\n\t\t\t}\r\n\t\t\treturn outputBuffer.toString();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint[] prime= new int[1229]; //only need primes up to 10000\n\t\tint n=1;\n\t\tint index=0;\n\t\tint test=0;\n\t\tfor (int i=2; (i-n)<=1229; i++) {\n\t\t\tfor (int j=2; j<=Math.sqrt(i); j++) {\n\t\t\t\tint k=i%j;\n\t\t\t\tif (k==0) {\n\t\t\t\t\tn++;\n\t\t\t\t\ttest++;\n\t\t\t\t\tj=(int)Math.sqrt(i);\n\t\t\t\t} \n\t\t\t}\n\t\t\tif (test==0) {\n\t\t\t\tprime[index]=i;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\ttest=0;\n\t\t}\n\t\t\n\t\t//use primes to find prime factorization and sum of divisors\n\t\tint [] divides= new int[1229]; //Number of times each prime divides a number\n\t\tint [] sumOfDivisors= new int[10000]; //Sum of divisors for i at index i\n\t\tint total=0;\n\t\tint sum=1;\n\t\tindex=1;\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tint d=i;\n\t\t\tfor (int j=0; j<1229; j++) { //find prime factorization for i\n\t\t\t\twhile (d%prime[j]==0 && d>1) {\n\t\t\t\t\td=d/prime[j];\n\t\t\t\t\tdivides[j]++;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tfor (int j=0; j<1229; j++) { //use Number theory formula for sum of divisors\n\t\t\t\tsum*=(Math.pow(prime[j], divides[j]+1)-1)/(prime[j]-1);\n\t\t\t}\n\t\t\tif (sum-i<i) { //only check if sum of divisors of i is less than i\n\t\t\t\tif (sumOfDivisors[sum-i-1]==i) { //check if amicable pair\n\t\t\t\t\ttotal=total+i+sum-i; //add both to total (only happens once)\n\t\t\t\t}\n\t\t\t}\n\t\t\tArrays.fill(divides,0); //reset divisors array\n\t\t\tsumOfDivisors[index]=sum-i; //store number of divisors\n\t\t\tsum=1;\n\t\t\tindex++;\n\t\t}\n\t\tSystem.out.print(\"The sum of all amicable numbers less than 10000 is: \");\n\t\tSystem.out.println(total);\n long endTime = System.currentTimeMillis();\n System.out.println(\"It took \" + (endTime - startTime) + \" milliseconds.\");\n\n\t}", "static long solve(long[] d) {\n int len = d.length;\n long[] dp = new long[len];\n\n Set<Long> set = new HashSet<>();\n\n for (int index1 = len - 1; index1 >= 0; index1--) {\n int count = 0;\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > d[index1]) {\n if( set.contains(d[index2] ) )continue;\n set.add(d[index2]);\n count++;\n }\n }\n set = new HashSet<>();\n dp[index1] = count;\n }\n\n long res = 0;\n Set<Long> distinct = new HashSet<>();\n for (int index1 = 0; index1 < len; index1++) {\n long curr = d[index1];\n if (distinct.contains(curr)) {\n continue;\n } else distinct.add(curr);\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > curr) {\n if (set.contains(d[index2])) continue;\n res += dp[index2];\n set.add(d[index2]);\n }\n }\n set = new HashSet<>();\n }\n\n return res;\n\n }", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "public static void main(String[] args) {\n int l1=1000, l2=1000;\n int[] a1=new int[l1];\n int[] a2=new int[l2];\n int[] combine = new int[l1+l2];\n\n Random r = new Random();\n for (int i=0; i<a1.length; ++i){\n a1[i]=r.nextInt(a1.length*3);\n combine[i]=a1[i];\n }\n\n for (int i=0; i<a2.length; ++i){\n a2[i]=r.nextInt(a2.length*3);\n combine[l1+i]=a2[i];\n }\n\n Arrays.sort(a1);\n Arrays.sort(a2);\n Arrays.sort(combine);\n\n cnt=0;\n int m = findByRank(a1, 0, a1.length, a2, 0, a2.length, (a1.length+a2.length)/2);\n int m2 = combine[combine.length/2-1];\n\n System.out.printf(\"m=%d, m2=%d, cnt=%d\", m, m2, cnt);\n\n\n\n }", "private static void optimalAlgorithm() throws IOException {\n\t\tString fileBank[] = new String[] {\"ReferenceString1.txt\", \"ReferenceString2.txt\",\n\t\t\t\t\"ReferenceString3.txt\", \"ReferenceString4.txt\"};\n\t\tfor(int currentFile = 0; currentFile < fileBank.length; currentFile++) {\n\t\t\tSystem.out.println(\"\\nOptimal Algorithm using file: \" + fileBank[currentFile]\n\t\t\t\t\t+ \"\\nTest Case #\" + (currentFile+1));\n\t\t\tString fileName = fileBank[currentFile];\n\t\t\t\n\t\t\t//Pages for reference string\n\t\t\tint pages[] = new int[30];\n\t\t\t//Temp array to check \"future\" reference string\n\t\t\tint temp[] = new int[30];\n\t\t\t//Number of page frames value\n\t\t\tint numberOfPageFrames = 0;\n\t\t\t\n\t\t\t//Scan file for number page frames value and reference string\n\t\t\tFile pageFile = new File(fileName);\n\t\t\tScanner scan = new Scanner(pageFile);\n\t\t\tfor(int i = 0; i < 4; i++) {\n\t\t\t\tif(i == 1) {\n\t\t\t\t\tString numberOfPageFrameValue = scan.nextLine();\n\t\t\t\t\tnumberOfPageFrames = Integer.parseInt(numberOfPageFrameValue);\n\t\t\t\t} else if(i == 3) {\n\t\t\t\t\tString referenceString = scan.nextLine();\n\t\t\t\t\tfor(int currentCharacter = 0; currentCharacter < 30; currentCharacter++) {\n\t\t\t\t\t\tpages[currentCharacter] = Character.getNumericValue(referenceString.charAt(currentCharacter));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tscan.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\tscan.close();\n\t\t\t\n\t\t\t//Frame array size depends on number of page frame value\n\t\t\tint frames[] = new int[numberOfPageFrames];\n\t\t\t\n\t\t\t//Set all values in frame arrays to -1\n\t\t\tfor(int i = 0; i < frames.length; i++) {\n\t\t\t\tframes[i] = -1;\n\t\t\t}\n\t\t\t\n\t\t\t//Check tests\n\t\t\tint check1 = 0, check2 = 0, check3 = 0;\n\t\t\t//Current position\n\t\t\tint position = 0;\n\t\t\t//Max value\n\t\t\tint max = 0;\n\t\t\t//Total page faults\n\t\t\tint pageFaults = 0;\n\t\t\t\n\t\t\t//for-loop goes through all pages[] element\n\t\t\tfor(int i = 0; i < pages.length; i++) {\n\t\t\t\t\n\t\t\t\t//Set check tests to 0\n\t\t\t\tcheck1 = check2 = 0;\n\t\t\t\t\n\t\t\t\t//If page number is already in page frames, set both checks to 1\n\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\tif(frames[j] == pages[i]) {\n\t\t\t\t\t\tcheck1 = check2 = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If check 1 is 0, page fault occured\n\t\t\t\tif(check1 == 0) {\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\tif(frames[j] == -1) {\n\t\t\t\t\t\t\tpageFaults++;\n\t\t\t\t\t\t\tframes[j] = pages[i];\n\t\t\t\t\t\t\tcheck2 = 1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If check 2 is 0, page fault occurred, find a page that is never referenced in the future\n\t\t\t\tif(check2 == 0) {\n\t\t\t\t\tcheck3 = 0;\n\t\t\t\t\t\n\t\t\t\t\t//Go through each element in frames\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\ttemp[j] = -1;\n\t\t\t\t\t\t//For every page number after our current page number, check\n\t\t\t\t\t\t//if there a page referenced in our frames\n\t\t\t\t\t\tfor(int k = (i + 1); k < pages.length; k++) {\n\t\t\t\t\t\t\tif(frames[j] == pages[k]) {\n\t\t\t\t\t\t\t\ttemp[j] = k;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Skip elements that are not referenced\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\tif(temp[j] == -1) {\n\t\t\t\t\t\t\tposition = j;\n\t\t\t\t\t\t\tcheck3 = 1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//For pages referenced\n\t\t\t\t\tif(check3 == 0) {\n\t\t\t\t\t\t//Set max\n\t\t\t\t\t\tmax = temp[0];\n\t\t\t\t\t\t//Position of our farthest referenced page\n\t\t\t\t\t\tposition = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//loop through temp array to find farthest referenced page\n\t\t\t\t\t\tfor(int j = 1; j < frames.length; j++) {\n\t\t\t\t\t\t\tif(temp[j] > max) {\n\t\t\t\t\t\t\t\tmax = temp[j];\n\t\t\t\t\t\t\t\tposition = j;\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//Place page where farthest referenced page is at\n\t\t\t\t\tframes[position] = pages[i];\n\t\t\t\t\t//Increment page fault\n\t\t\t\t\tpageFaults++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Print out frames\n\t\t\t\tSystem.out.print(\"Frames: \");\n\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\tif(frames[j] != -1) {\n\t\t\t\t\t\tSystem.out.print(frames[j] + \" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\t\n\t\t\t//Print out total page faults\n\t\t\tSystem.out.println(\"Page faults: \" + pageFaults);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint i,j,z,sumA,sumB,sumPairs;\r\n\r\n\t\tsumPairs = 0;\r\n\r\n\t\tfor (i=1;i<10000;i++){\r\n\t\t sumA = 0;\r\n\t\t for (j=1;j<i;j++){\r\n\t\t if (i%j==0) \r\n\t\t sumA += j;\r\n\t\t }\r\n\r\n\t\t sumB = 0;\r\n\t\t for (z=1;z<sumA;z++){\r\n\t\t if (sumA%z==0)\r\n\t\t sumB += z;\r\n\t\t }\r\n\r\n\t\t if (sumB == i && sumB != sumA)\r\n\t\t sumPairs += i; \r\n\t\t}\r\nSystem.out.println(sumPairs);\r\n\t\t\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tString filePath = \"/Users/Alen/Documents/CodeJam/2013/Qualification/C-Large-1.in\";\n\n\t\tBufferedReader br = new BufferedReader(new FileReader(filePath));\n\t\tString outFile = filePath.substring(0, filePath.lastIndexOf('.'))\n\t\t\t\t+ \".out\";\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(outFile));\n\t\t\n\t\tfinal int MAX_POWER = 16;\n\t\t\n\t\tint[] palindrome = new int[MAX_POWER / 2];\n\t\tInteger[] palindromeSquarePalindrome = new Integer[MAX_POWER];\n\t\tList<Integer[]> pspList = new ArrayList<Integer[]>();\n\t\t\n\t\tfor (int i = 1; i <= palindrome.length; i++) {\n\t\t\tfor (int i2 = 0; i2 < palindrome.length; i2++) {\n\t\t\t\tpalindrome[i2] = 0;\n\t\t\t}\n\t\t\tfor (int i3 = 0; i3 < palindromeSquarePalindrome.length; i3++) {\n\t\t\t\tpalindromeSquarePalindrome[i3] = 0;\n\t\t\t}\n\t\t\tpalindromeSquarePalindrome[palindromeSquarePalindrome.length - 1] = 2 * i - 1;\n\t\t\t\n\t\t\tint j = 0;\n\t\t\twhile (j >= 0 && j <= i / 2) {\n\t\t\t\tif (palindrome[j] == 0) {\n\t\t\t\t\tif (j == 0 || j >= (i - 1) / 2 ) palindrome[j] = palindrome[i - j - 1] = 1;\n\t\t\t\t\telse {\n\t\t\t\t\t\tj++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tboolean isPalindrome = true;\nk:\t\t\t\tfor (int k = 0; k < i; k++) {\n\t\t\t\t\tint palindromeSquare = 0;\n\t\t\t\t\tfor (int l = 0; l <= k; l++) {\n\t\t\t\t\t\tpalindromeSquare += palindrome[l] * palindrome[k - l];\n\t\t\t\t\t\tif (palindromeSquare > 9) {\n\t\t\t\t\t\t\tisPalindrome = false;\n\t\t\t\t\t\t\tbreak k;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpalindromeSquarePalindrome[k] = palindromeSquare;\n\t\t\t\t\tpalindromeSquarePalindrome[2 * i - 2 - k] = palindromeSquare;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isPalindrome) {\n\t\t\t\t\tpspList.add(palindromeSquarePalindrome.clone());\n\t\t\t\t\tif (j < (i - 1) / 2 || palindrome[j] == 9) {\n\t\t\t\t\t\tj++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpalindrome[j] = 0;\n\t\t\t\t\tpalindrome[i - j - 1] = 0;\n\t\t\t\t\tj--;\n\t\t\t\t}\n\t\t\t\tif (j >= 0) {\n\t\t\t\t\tint newValue = palindrome[j] + 1;\n\t\t\t\t\t//newValue %= 10;\n\t\t\t\t\tif (j == 0 && newValue == 0) {\n\t\t\t\t\t\tnewValue = 1;\n\t\t\t\t\t}\n\t\t\t\t\tpalindrome[j] = newValue;\n\t\t\t\t\tpalindrome[i - j - 1] = newValue;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t\n\t\tString line = br.readLine();\n\t\tint t = Integer.valueOf(line);\n\t\tfor (int i = 0; i < t; i++) {\n\t\t\t// TODO main logical\n\t\t\t// ...\n\t\t\tline = br.readLine();\n\t\t\tString[] strs = line.split(\" \");\n\t\t\tInteger[] a = new Integer[MAX_POWER];\n\t\t\tInteger[] b = new Integer[MAX_POWER];\n\t\t\ta[a.length - 1] = strs[0].length();\n\t\t\tfor (int k = 0; k < strs[0].length(); k++) {\n\t\t\t\ta[k] = strs[0].charAt(k) - 0x30;\n\t\t\t}\n\t\t\tb[b.length - 1] = strs[1].length();\n\t\t\tfor (int k = 0; k < strs[1].length(); k++) {\n\t\t\t\tb[k] = strs[1].charAt(k) - 0x30;\n\t\t\t}\n\t\t\t\n\t\t\tint start = 0;\n\t\t\tfor (int k = 0; k < pspList.size(); k++) {\n\t\t\t\tif (compare(a, pspList.get(k)) <= 0) {\n\t\t\t\t\tstart = k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint end = pspList.size();\n\t\t\tfor (int k = start; k < pspList.size(); k++) {\n\t\t\t\tif (compare(b, pspList.get(k)) < 0) {\n\t\t\t\t\tend = k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// TODO output\n\t\t\tbw.write(String.format(\"Case #%d: %d\\r\\n\", i + 1, end - start));\n\t\t}\n\n\t\tbw.flush();\n\t\tbw.close();\n\t\tbr.close();\n\n\t}", "public static void main(String[] args) {\n Scanner inputScanner = new Scanner(System.in);\n System.out.println(\"Enter the filename to be used as the text:\");\n String file = inputScanner.nextLine();\n \n // Read in text from file\n String text = new String();\n try (BufferedReader reader = new BufferedReader(new FileReader(file))) {\n StringBuilder sb = new StringBuilder();\n String line = reader.readLine();\n \n while (line != null) {\n sb.append(line);\n line = reader.readLine();\n }\n text = sb.toString();\n }\n catch (Exception e) {\n System.out.println(e.toString());\n System.exit(-1);\n }\n \n // Preprocessing.\n long startTime = System.nanoTime();\n BWT L = new BWT(text);\n SuffixArray SA = new SuffixArray(text);\n WaveletTree WT = new WaveletTree(L.getBWT());\n \n // Obtain the alphabet of the text.\n HashSet<Character> textAlphabet = new HashSet<>();\n for (int i = 0; i < text.length(); i++) {\n textAlphabet.add(text.charAt(i));\n }\n \n System.out.println(\"The size of the alphabet of the text is \" + textAlphabet.size());\n \n // Compute the C mapping.\n Hashtable<Character, Integer> C = new Hashtable<>();\n for (Character c : textAlphabet) {\n // Add the character if it isn't already present.\n if (!C.contains(c))\n C.put(c, 0);\n \n // Iterate over the text, computing C.\n for (int i = 0; i < text.length(); i++) {\n if (text.charAt(i) < c) {\n C.put(c, C.get(c) + 1);\n }\n }\n }\n \n long endTime = System.nanoTime();\n long duration = (endTime - startTime);\n \n System.out.println(\"Construction time: \" + duration/1000000);\n \n // Search for patterns forever.\n Scanner input = new Scanner(System.in);\n String pattern = null;\n while (true) {\n System.out.println();\n System.out.println(\"Enter a pattern:\");\n pattern = input.nextLine();\n\n // Run the algorithm a hundred times to get a reasonable time value.\n startTime = System.nanoTime();\n int sp = 0;\n int ep = 0;\n for (int repeat = 0; repeat < 1000; repeat++) {\n // All values are prepared for the search.\n int i = pattern.length();\n sp = 1;\n ep = L.getBWT().length();\n while (sp <= ep && i >= 1) {\n char c = pattern.charAt(i-1);\n sp = C.get(c) + WT.occ(WT.getRoot(), sp - 1, c) + 1;\n ep = C.get(c) + WT.occ(WT.getRoot(), ep, c);\n i--;\n }\n }\n \n endTime = System.nanoTime();\n duration = (endTime - startTime);\n \n if (ep < sp)\n System.out.println(\"Pattern not found.\");\n else\n System.out.println(\"<sp, ep> pair is <\" + sp + \", \" + ep + \">\");\n\n// for (int j = sp; j <= ep; j++) {\n// System.out.println(SA.getSuffixArray().get(j-1).toString());\n// }\n \n System.out.println();\n System.out.println(\"The text length is \" + text.length());\n System.out.println(\"The pattern length is \" + pattern.length());\n System.out.println(\"1000 repetitions of the search took \" + duration/1000000 + \" milliseconds.\");\n }\n }", "public ArrayList<String> mostInfluentialSubModular(int k)\n {\n if(k >= graphVertexHashMap.size()){\n return new ArrayList<String>(graphVertexHashMap.keySet());\n }\n if(k ==0) return new ArrayList<String>();\n double changling = (double)k/numVertices;\n\n// if(numVertices >= 900 && (numVertices - k <= 70 )\n// || numVertices >= 800 && (numVertices - k <= 56 )\n// || numVertices >= 700 && (numVertices - k <= 49 )\n// || numVertices >= 600 && (numVertices - k <= 40 )\n// || numVertices >= 500 && (numVertices - k <= 35 )\n// || numVertices >= 400 && (numVertices - k <= 28 )\n// || numVertices >= 300 && (numVertices - k <= 21 )\n// || numVertices >= 200 && (numVertices - k <= 14 )\n// ){\n// ArrayList<String> result = new ArrayList<>(graphVertexHashMap.keySet());\n// for(int i = graphVertexHashMap.size()-1; i >= (graphVertexHashMap.size() - (graphVertexHashMap.size() -k)) ; i--){\n// result.remove(i);\n// }\n// return result;\n// }\n// else if(changling >= 0.80 && numVertices >= 200 ){\n// approximate = true;\n// }\n\n ArrayList<String> orderedResult = new ArrayList<>();\n HashMap<String, Float> S = new HashMap();\n float currentModular = Integer.MIN_VALUE;\n\n for(int i =0; i < k; i++){\n String maxString = \"\";\n float maxValue = (float)Integer.MIN_VALUE;\n\n Iterator it = graphVertexHashMap.entrySet().iterator();\n while(it.hasNext()){\n ArrayList<String> vCopy = new ArrayList<>(S.keySet());\n\n Map.Entry entry = (Map.Entry)it.next();\n String compareString = (String)entry.getKey();\n\n if(S.containsKey(compareString)) continue;\n else{\n vCopy.add(compareString);\n float compareValue = influence(vCopy);\n float approximation = compareValue - currentModular;\n if(approximate && S.size() > 0 && maxValue > 0 && approximation >= ratio){\n maxValue = compareValue;\n maxString = compareString;\n break;\n }else if(compareValue > maxValue){\n maxValue = compareValue;\n maxString = compareString;\n }\n }\n }\n if(!S.containsKey(maxString)){\n S.put(maxString, maxValue);\n currentModular = influence(new ArrayList<>(S.keySet()));\n orderedResult.add(maxString);\n }\n\n if(S.size() >= k) break;\n// System.out.println(S.size());\n }\n return orderedResult;\n }", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "public static ArrayList<Integer> findAnagrams(String s, String p) {\r\n\t \t \r\n\t \t //write your code here\r\n\t\t if(s.length()<p.length()) {\r\n\t\t\t ArrayList<Integer> arr = new ArrayList<>();\r\n\t\t\t return arr;\r\n\t\t }\r\n\t\t ArrayList<Integer> result = new ArrayList<>();\r\n\t\t HashMap<Character,Integer> P = new HashMap<>();\r\n\t\t HashMap<Character,Integer> H = new HashMap<>();\r\n\t\t \r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = p.charAt(i);\r\n\t\t\t if(!P.containsKey(ch)) {\r\n\t\t\t\t P.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t P.put(ch,P.get(ch)+1);\r\n\t\t\t }\r\n\t\t }\r\n\t\t int start =0;\r\n\t\t int end=0;\r\n\t\t int mcount=0;\r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = s.charAt(i);\r\n\t\t\t if(!H.containsKey(ch)) {\r\n\t\t\t\t H.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t H.put(ch,H.get(ch)+1);\r\n\t\t\t }\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t if(P.get(ch)>=H.get(ch)) {\r\n\t\t\t\t\t mcount++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t end=i;\r\n\t\t }\r\n\t\t if(mcount==p.length()) {\r\n\t\t\t result.add(start);\r\n\t\t }\r\n\t\t while(end<s.length()-1) {\r\n\t\t\t char ch=s.charAt(start);\r\n\t\t\t int hfreq = H.get(ch)-1;\r\n\t\t\t H.put(ch,hfreq);\r\n\t\t\t if(H.get(ch)==0) {\r\n\t\t\t\t H.remove(ch);\r\n\t\t\t }\r\n\t\t\t int pfreq=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreq=P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreq<pfreq) {\r\n\t\t\t\t mcount--;\r\n\t\t\t }\r\n\t\t\t ch=s.charAt(end+1);\r\n\t\t\t int hfreqend=0;\r\n\t\t\t if(H.containsKey(ch)) {\r\n\t\t\t\t hfreqend = H.get(ch);\r\n\t\t\t }\r\n\t\t\t hfreqend++;\r\n\t\t\t H.put(ch, hfreqend);\r\n\t\t\t int pfreqend=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreqend = P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreqend<=pfreqend) {\r\n\t\t\t\t mcount++;\r\n\t\t\t }\r\n\t\t\t start++;\r\n\t\t\t end++;\r\n\t\t\t if(mcount==p.length()) {\r\n\t\t\t\t result.add(start);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\t return result;\r\n\t\t \r\n\t \t \r\n\t }", "public int[] findAnyPairIndexesWhileLCMMinimized() {\n if (seq.length < 2) {\n return null;\n }\n int size = 0;\n for (int i = 1; i <= m; i++) {\n size += m / i;\n }\n\n IntegerMultiWayDeque deque = new IntegerMultiWayDeque(m + 1, size);\n for (int i = 1; i <= m; i++) {\n for (int j = i; j <= m; j += i) {\n if (!indexesOfSeq.isEmpty(j)) {\n deque.addLast(i, j / i);\n }\n }\n }\n\n long lcm = INF;\n int v1 = 0;\n int v2 = 0;\n\n for (int i = 1; i <= m; i++) {\n if (!indexesOfSeq.isEmpty(i) && indexesOfSeq.peekFirst(i) != indexesOfSeq.peekLast(i)) {\n lcm = v1 = v2 = i;\n break;\n }\n }\n\n IntegerVersionArray iva = new IntegerVersionArray(m + 1);\n IntegerDequeImpl stack = new IntegerDequeImpl(m);\n for (int i = 1; i <= m; i++) {\n iva.clear();\n stack.clear();\n while (!deque.isEmpty(i)) {\n int last = deque.removeFirst(i);\n factorize(last);\n int total = ie(iva, allFactors.size() - 1, 1, 0);\n if (total > 0) {\n int pop = 0;\n while (total > 0) {\n pop = stack.removeLast();\n if (GCDs.gcd(pop, last) == 1) {\n total--;\n }\n add(iva, pop, -1);\n }\n long l = LCMs.lcm(last, pop) * i;\n if (l < lcm) {\n lcm = l;\n v1 = last * i;\n v2 = pop * i;\n }\n }\n add(iva, last, 1);\n stack.addLast(last);\n }\n }\n\n return new int[]{indexesOfSeq.peekFirst(v1), indexesOfSeq.peekLast(v2)};\n }", "public static void main(String[] args) throws IOException {\n\n // read in graph\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt(), m = scanner.nextInt();\n ArrayList<Integer>[] graph = new ArrayList[n];\n for (int i = 0; i < n; i++)\n graph[i] = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n scanner.nextLine();\n int u = scanner.nextInt() - 1, v = scanner.nextInt() - 1; // convert to 0 based index\n graph[u].add(v);\n graph[v].add(u);\n }\n\n int[] dist = new int[n];\n Arrays.fill(dist, -1);\n // partition the vertices in each of the components of the graph\n for (int u = 0; u < n; u++) {\n if (dist[u] == -1) {\n // bfs\n Queue<Integer> queue = new LinkedList<>();\n queue.add(u);\n dist[u] = 0;\n while (!queue.isEmpty()) {\n int w = queue.poll();\n for (int v : graph[w]) {\n if (dist[v] == -1) { // unvisited\n dist[v] = (dist[w] + 1) % 2;\n queue.add(v);\n } else if (dist[w] == dist[v]) { // visited and form a odd cycle\n System.out.println(-1);\n return;\n } // otherwise the dist will not change\n }\n }\n }\n\n }\n\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));\n // vertices with the same dist are in the same group\n List<Integer>[] groups = new ArrayList[2];\n groups[0] = new ArrayList<>();\n groups[1] = new ArrayList<>();\n for (int u = 0; u < n; u++) {\n groups[dist[u]].add(u + 1);\n }\n for (List<Integer> g: groups) {\n writer.write(String.valueOf(g.size()));\n writer.newLine();\n for (int u: g) {\n writer.write(String.valueOf(u));\n writer.write(' ');\n }\n writer.newLine();\n }\n\n writer.close();\n\n\n }", "static void minimumBribes(int[] q) {\r\n int bribes = 0;\r\n boolean valid = true;\r\n int index = 1;\r\n \r\n // We get the length of the input array\r\n int size = q.length; \r\n \r\n // We cycle through the input array\r\n for (int i = 0; i < size; i++) {\r\n int actual = q[i];\r\n \r\n // We check if the current person has surely swapped position more than two times since it appears before they are supposed to\r\n if (actual > index) {\r\n int difference = actual - index;\r\n if (difference > 2) {\r\n valid = false;\r\n break;\r\n }\r\n }\r\n \r\n // We check the number of bribes by counting how many persons with bigger IDs have already swapped place with the current one\r\n // NOTE: We can safely begin to check from position (actual-2) since higher numbers of swaps would have been caught by the previous if condition\r\n for (int j = actual-2; j < index; j++) {\r\n if (j < 0) {\r\n continue;\r\n }\r\n if (actual < q[j]) {\r\n bribes += 1;\r\n }\r\n }\r\n \r\n index += 1;\r\n }\r\n \r\n // Checks if the result is valid, and if so, it prints it\r\n if (valid == false) {\r\n System.out.println(\"Too chaotic\");\r\n }\r\n else {\r\n System.out.println(bribes);\r\n }\r\n}", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(\"art2.in\"));\n PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"art2.out\")));\n int len=Integer.parseInt(br.readLine());\n int[] list=new int[len];\n for(int i=0;i<len;i++)\n list[i]=Integer.parseInt(br.readLine());\n\n //finds the troll test case\n boolean symmetric=true;\n for(int i=0;i<len;i++)\n if(list[i]!=list[len-i-1]) {\n symmetric = false;\n break;\n }\n if(symmetric){\n pw.println(len/2);\n pw.close();\n return;\n }\n\n DisjointSet disjointSet=new DisjointSet(len,list);\n HashMap<Integer,Range> ranges=new HashMap<>(len/10);\n int totalColors=0;\n for(int i=0;i<len;i++){\n if(list[i]==0)\n continue;\n if(!ranges.containsKey(list[i])) {\n ranges.put(list[i],new Range(i, i));\n totalColors++;\n }\n else\n ranges.get(list[i]).end=i;\n }\n\n// System.out.println(Arrays.toString(ranges));\n int iter=0;\n int colorsUsed=0;\n// System.out.println(Arrays.toString(disjointSet.parent));\n while(true){\n int foundThisIter=0;\n HashSet<Integer> connectionSpots=new HashSet<>();\n ArrayDeque<Integer> toRemove=new ArrayDeque<>(ranges.size());\n for(int e:ranges.keySet()){\n Range cur=ranges.get(e);\n if(disjointSet.find(cur.start)==disjointSet.find(cur.end)){\n connectionSpots.add(cur.start);\n connectionSpots.add(cur.end);\n toRemove.add(e);\n colorsUsed++;\n foundThisIter++;\n }\n\n }\n\n if(foundThisIter==0)\n break;\n if(colorsUsed==totalColors)\n break;\n for(int e:toRemove){\n ranges.remove(e);\n }\n for(int e:connectionSpots){\n// System.out.println(e);\n if(e-1>=0&&list[e-1]!=0)\n disjointSet.union(e,e-1);\n if(e+1<list.length&&list[e+1]!=0)\n disjointSet.union(e,e+1);\n }\n\n\n iter++;\n }\n// System.out.println(iter+1);\n if(colorsUsed!=totalColors)\n pw.println(-1);\n else\n pw.println(iter+1);\n pw.close();\n }", "public static void main(String[] args) throws Exception {\n \n Scanner scn=new Scanner(System.in);\n int n1=scn.nextInt();\n \n int[] a1=new int[n1];\n for(int i=0;i<a1.length;i++){\n a1[i]=scn.nextInt();\n }\n \n int n2=scn.nextInt();\n int[] a2=new int[n2];\n for(int i=0;i<a2.length;i++){\n a2[i]=scn.nextInt();\n }\n \n int[] diff=new int[n2];\n int c=0;\n \n int i=a1.length-1;\n int j=a2.length-1;\n int k=diff.length-1;\n \n while(k >= 0){\n int d=0;\n int a1v= i >= 0? a1[i]: 0;\n \n if(a2[j] +c >= a1v){\n d= a2[j] + c -a1v;\n c=0;\n }else{\n d= a2[j] + c + 10 -a1v;\n c=-1;\n }\n \n diff[k] = d;\n \n i--;\n j--;\n k--;\n }\n \n int idx = 0;\n while(idx < diff.length){\n if(diff[idx] == 0){\n idx++;\n }else{\n break;\n }\n }\n \n while(idx < diff.length){\n System.out.println(diff[idx]);\n idx++;\n }\n \n\n \n \n}", "public int wiggleMaxLength4(int[] nums) {\n if(nums == null || nums.length == 0){\n return 0;\n } else if(nums.length == 1){\n \treturn 1;\n }\n \n int len = nums.length;\n int[] tempNums = new int[len - 1];\n int[] dp = new int[len - 1];\n int maxLen = 0;\n \n for(int i = 0; i < len - 1; i++){\n if(nums[i] - nums[i + 1] > 0){\n tempNums[i] = 1;\n } else if(nums[i] - nums[i + 1] < 0){\n tempNums[i] = -1;\n } else {\n tempNums[i] = 0;\n }\n }\n \n for(int i = 0; i < len - 1; i++){\n \tif(tempNums[i] != 0){\n \t\tdp[i] = 1;\n \t}\n }\n \n maxLen = dp[0];\n \n for(int i = 0; i < len - 1; i++){\n for(int j = 0; j < i; j++){\n if(tempNums[i] * tempNums[j] == -1){\n dp[i] = Math.max(dp[i], dp[j] + 1);\n maxLen = Math.max(maxLen, dp[i]);\n }\n }\n }\n \n return maxLen + 1;\n }", "static int yeusOptimized(){\n for(int x=9;x>=0;--x){\tint a=x*100001; //Setting up palindrome. 100001 * 9 = 900009\n for(int y=9;y>=0;--y){\tint b=a+y*10010; //Setting up the inner numbers so 10010*9. 90090 + 900009 = 990099\n for(int z=9;z>=0;--z){\tint n=b+z*1100; //Final inner numbers 9900+990099 = 999999 Palindrome\n for(int i=990;i>99;i-=11){ //Since we start with the largest palindrome, we just need to make sure it is a factor of two 3 digit numbers.\n if(n%i==0){//If there is a remainder, i isn't a factor.\n int t=n/i; //t is the palindrome divided by the factor to get the other factor\n if(t<1000)return n; //make sure that other factor was also a 3 digit number (only one check since we're starting from the maximum possible values)\n }}}}} //And return the palindrome\n return 0;}", "private int[] _make_words(int[] l,int n,int sparsecount){\n int count=0;\n int[] marker = new int[33];\n int[] r = new int[(sparsecount > 0?sparsecount:n)];\n\n for(int i=0;i<n;i++){\n int length=l[i];\n if(length>0){\n int entry=marker[length];\n \n /* when we claim a node for an entry, we also claim the nodes\n\t below it (pruning off the imagined tree that may have dangled\n\t from it) as well as blocking the use of any nodes directly\n\t above for leaves */\n \n /* update ourself */\n if(length<32 && (entry>>length) != 0){\n\t/* error condition; the lengths must specify an overpopulated tree */\n\treturn null;\n }\n r[count++]=entry;\n\n /* Look to see if the next shorter marker points to the node\n\t above. if so, update it and repeat. */\n {\n\tfor(int j=length;j>0;j--){\n\t \n\t if((marker[j]&1) != 0){\n\t /* have to jump branches */\n\t if(j==1)\n\t marker[1]++;\n\t else\n\t marker[j]=marker[j-1]<<1;\n\t break; /* invariant says next upper marker would already\n\t\t have been moved if it was on the same path */\n\t }\n\t marker[j]++;\n\t}\n }\n \n /* prune the tree; the implicit invariant says all the longer\n\t markers were dangling from our just-taken node. Dangle them\n\t from our *new* node. */\n for(int j=length+1;j<33;j++)\n\tif((marker[j]>>1) == entry){\n\t entry=marker[j];\n\t marker[j]=marker[j-1]<<1;\n\t}else\n\t break;\n }else\n if(sparsecount==0)count++;\n }\n \n /* bitreverse the words because our bitwise packer/unpacker is LSb\n endian */\n int i = 0;\n for(i=0,count=0;i<n;i++){\n int temp=0;\n for(int j=0;j<l[i];j++){\n temp<<=1;\n temp|=(r[count]>>j)&1;\n }\n\n// System.out.println( \"mkwrd \" + temp);\n if(sparsecount != 0){\n if(l[i] != 0)\n\tr[count++]=temp;\n }else\n r[count++]=temp;\n }\n\n return(r);\n}", "public static void main(String[] args) {\n\t\tint width=35;\n\t\tint length=31;\n\t\tlong[][] dp = new long[width+1][length+1];\n\t\tdp[0][0]=0;\n\t\tfor(int i=1;i<length+1;i++){\n\t\t\tif(badCheck(0,i,0,i-1)){\n\t\t\t\tdp[0][i]=0;\n\t\t\t\tfor(int k=i+1;k<length+1;k++){\n\t\t\t\t\tdp[0][k]=0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdp[0][i]=1;\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<width+1;i++){\n\t\t\tif(badCheck(i,0,i-1,0)){\n\t\t\t\tdp[i][0]=0;\n\t\t\t\tfor(int k=i+1;k<width+1;k++){\n\t\t\t\t\tdp[k][0]=0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdp[i][0]=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=1;i<=width;i++){\n\t\t\tfor(int j=1;j<=length;j++){\n\t\t\t\tif(!badCheck(i-1,j,i,j)){\n\t\t\t\t\tdp[i][j]+=dp[i-1][j];\n\t\t\t\t}\n\t\t\t\tif(!badCheck(i,j-1,i,j)){\n\t\t\t\t\tdp[i][j]+=dp[i][j-1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//System.out.println(dp[6][6]);\n\t\t//System.out.println(dp[2][2]);\n\t\t//System.out.println(dp[1][1]);\n\t\tSystem.out.println(dp[35][31]);\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString str = \"abccbc\";\n\t\t\n\t\tlong[][] dp = new long[str.length()][str.length()];\t\n\t\t\n\t\tfor (int g=0 ; g<str.length() ; g++) {\n\t\t\t\n\t\t\tfor (int i=0 , j=g ; j<str.length() ; i++ , j++) {\n\t\t\t\tif (g == 0) dp[i][j] = 1;\n\t\t\t\t\n\t\t\t\telse if (g == 1) dp[i][j] = (str.charAt(i) == str.charAt(j)) ? 3 : 2;\n\t\t\t\t\n\t\t\t\telse dp[i][j] = (str.charAt(i) == str.charAt(j)) ? (dp[i][j-1] + dp[i+1][j] + 1) : (dp[i][j-1] + dp[i+1][j] - dp[i+1][j-1]);\n\t\t\t\t\n\t\t\t\t//if (dp[i][j] && str.substring(i, j+1).length() > result.length()) result = str.substring(i, j+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(dp[0][str.length()-1]);\n\t}", "private static String subProcess(int[] n1, int[] n2) {\n\n\t\t// if n1.length is smaller than n2.length, we are going to be too small.\n\t\tif (n1.length < n2.length) {\n\t\t\treturn \"+\" + toString (n1);\n\t\t}\n\t\t\n\t\t// we have to extend, and reduce length. Note that this WILL terminate because\n\t\t// we would have left earlier if n2 were greater than n1.\n\t\tint off = 0;\n\t\tint length = n2.length;\n\t\twhile (compareTo(n2,0,length,n1,off) > 0) {\n\t\t\tn2 = expand(n2);\n\t\t\tlength = n2.length;\n\t\t\t\n\t\t\tif (length > n1.length) {\n\t\t\t\t// gone too far! We at last have our remainder! Return as \"+remainder\".\n\t\t\t\treturn \"+\" + toString(n1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint []innerSum = new int[n1.length+1]; // add 1 just in case we get too high\n\t\tint []result = new int[length]; \n\t\tint start;\n\t\t\n\t\t// initial set.\n\t\tif (n2[0] == 0) { start = 9; } else { start = n1[0]/n2[0]; }\n\t\t\n\t\tmultiply(n2, start, innerSum);\n\t\tinnerSum = reduce(innerSum);\n\t\t\n\t\tif (innerSum.length < n2.length) {\n\t\t\t// perfect fit. Expand back out to work with subtractDown. REALLY UGLY CODE\n\t\t\tinnerSum = expand(innerSum);\n\t\t} else {\n\t\t\t// must reduce and continue....\n\t\t\twhile (n2.length < innerSum.length) {\n\t\t\t\tstart--; // had gone too far! Back down.\n\t\t\t\tinnerSum = new int[n1.length+1];\n\t\t\t\tmultiply (n2, start, innerSum);\n\t\t\t\tinnerSum = reduce(innerSum);\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean subtractDown = compareTo(innerSum, n1, innerSum.length) > 0; // if false, we have to add up\n\t\twhile (true) {\n\t\t\tif (subtractDown) {\n\t\t\t\tstart--;\n\t\t\t\tsubtract(innerSum, n2, result, subProcessSign);\n\t\t\t\tassign(innerSum, result);\n\t\t\t\t\n\t\t\t\tsubtractDown = compareTo(innerSum, n1, innerSum.length) > 0;\n\t\t\t} else {\n\t\t\t\t// found. Note that 'start' is the digit in the quotient. Subtract from and replace.\n\t\t\t\tint []newTop = new int[innerSum.length];\n\t\t\t\textract(newTop,0,n1,0,innerSum.length);\n\t\t\t\t\n\t\t\t\tresult = new int[innerSum.length];\n\t\t\t\tsubtract(newTop, innerSum, result, subProcessSign); \n\t\t\t\textract(n1,0,result,0,result.length); // copy back in\n\t\t\t\t\n\t\t\t\tint[]normalized_n1 = reduce(n1);\n\t\t\t\tint[]normalized_n2 = reduce(n2);\n\t\t\t\tString s = start + subProcess(normalized_n1, normalized_n2);\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public List<List<Integer>> threeSum(int[] nums) {\n List<List<Integer>> result = new ArrayList<>(nums.length);\n\n // Prepare\n Arrays.sort(nums);\n// int firstPositiveIndex = 0;\n// int negativeLength = 0;\n// List<Integer> numsFiltered = new ArrayList<>();\n// for (int i = 0; i < nums.length; i++) {\n// if (i == 0 || i == 1 || nums[i] == 0 || (nums[i] != nums[i-2])) {\n// numsFiltered.add(nums[i]);\n// if ((nums[i] >= 0) && (firstPositiveIndex == 0)) {\n// firstPositiveIndex = numsFiltered.size() - 1;\n// }\n// if ((nums[i] <= 0)) {\n// negativeLength = numsFiltered.size();\n// }\n// }\n// }\n// nums = numsFiltered.stream().mapToInt(i->i).toArray();\n\n // Func\n\n for(int i=0; (i < nums.length) && (nums[i] <= 0); i++) {\n if (i != 0 && nums[i] == nums[i-1]) {\n continue;\n }\n for(int j=i+1; j<nums.length; j++) {\n if (j != i+1 && nums[j] == nums[j-1]) {\n continue;\n }\n for(int k=nums.length-1; (k>j) && nums[k] >= 0; k--) {\n if (k != nums.length-1 && nums[k] == nums[k+1]) {\n continue;\n }\n int sum = nums[i]+nums[j]+nums[k];\n if (sum > 0) {\n continue;\n } else if (sum < 0) {\n break;\n }\n\n List<Integer> ok = new ArrayList<>();\n ok.add(nums[i]);\n ok.add(nums[j]);\n ok.add(nums[k]);\n result.add(ok);\n break;\n }\n }\n }\n\n// System.out.println(\"Finish time = \" + (System.nanoTime() - start) / 1_000_000);\n// System.out.println(\"result size = \" + result.size());\n\n return result;\n }", "public static int[] buildZ(char[] a) {\n int n = a.length;\n int[] z = new int[n];\n if (n == 0) return z;\n z[0] = n;\n int l = 0, r = 0;\n for (int i = 1; i < n; i++) {\n if (i > r) {\n l = r = i;\n while (r < n && a[r - l] == a[r]) {\n r++;\n }\n z[i] = r - l;\n r--;\n } else {\n int k = i - l;\n if (z[k] < r - i + 1) {\n z[i] = z[k];\n } else {\n l = i;\n while (r < n && a[r - l] == a[r]) {\n r++;\n }\n z[i] = r - l;\n r--;\n }\n }\n }\n return z;\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "ComparableEdge[] fillEdgeArray(int maxWeight) {\n Map<String, ComparableEdge> edgeMap = new HashMap<String, ComparableEdge>();\n\n // process all vertex combinations so that we get the complete set\n // the edge hash that we constructed narrows the candidates for each\n // label pattern saving us from checking all possible edges.\n\n // for each vertex:\n // look up the hashKey for each possible 'missing bit' pattern\n // examine all matching candidates 'other vertices'\n // create a ComparableEdge for each vertex at distance <= maxWeight\n // add the ComparableEdges to the edgeList\n //\n // after processing all vertices:\n // copy the edgeList to an Array and sort the Array.\n // the Array is ready to drive the Kruskal Algorithm.\n //\n\n for (int i = 0; i < vertices.length; i++) {\n HammingVertex v = vertices[i];\n if (v == null) continue; // should not happen\n\n log.debug(\" **** vertex \" + i);\n System.err.println(\" **** vertex \" + i);\n\n // all users of the array MUST use exactly the same algorithm lookup sequence\n int missingBitsVertexMapsIndex = 0;\n\n // check all 'missing 2 bit' combinations for this vertex\n for (int j = 0; j < (labelSize - 1); j++) {\n for (int k = (j + 1); k < labelSize; k++) {\n int missingBitsKey = v.labelWithoutMissingBitsAsInt(j, k);\n\n Map missingBitsVertexMap = missingBitsVertexMaps[missingBitsVertexMapsIndex];\n\n List<Integer> l = (List<Integer>) missingBitsVertexMap.get(missingBitsKey);\n addQualifedEdgesFromVertexList(v, l, edgeMap, 2);\n\n // next missing bit hashMap in sequence\n missingBitsVertexMapsIndex++;\n }\n }\n }\n\n //ComparableEdge[] e = (ComparableEdge[])edgeList.toArray();\n Collection<ComparableEdge> edgeSet = edgeMap.values();\n int numEdges = edgeSet.size();\n ComparableEdge[] e = new ComparableEdge[numEdges];\n int i = 0;\n for (ComparableEdge edge : edgeSet) {\n e[i] = edge;\n i++;\n }\n Arrays.sort(e);\n\n if (isP())\n log.debug(\" --- there are \" + e.length + \" sorted edges.\");\n return e;\n }", "String getMGFAlgorithm();", "public void reduce(Text prefix, Iterator<IntWritable> iter,\n OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\nint a000_ = 0;\nint a001_ = 0;\nint a002_ = 0;\nint a003_ = 0;\nint a004_ = 0;\nint a005_ = 0;\nint a006_ = 0;\nint a007_ = 0;\nint a008_ = 0;\nint a009_ = 0;\nint a010_ = 0;\nint a011_ = 0;\nint a012_ = 0;\nint a013_ = 0;\nint a014_ = 0;\nint a015_ = 0;\nint a016_ = 0;\nint a017_ = 0;\nint a018_ = 0;\nint a019_ = 0;\nint a020_ = 0;\nint a021_ = 0;\nint a022_ = 0;\nint a023_ = 0;\nint a024_ = 0;\nint cur_ = 0;\n\nwhile (iter.hasNext()) {\ncur_ = iter.next().get();\na012_ = a000_ - a017_;\na004_ = cur_ - 2;\na008_ = a018_ - a009_;\na020_ = a020_ - cur_;\na021_ = a001_ - a009_;\na010_ = a002_ + a004_;\na013_ = a005_ + a005_;\na009_ = a019_ + a012_;\na008_ = a008_ * -5;\na021_ = a022_ - a023_;\na002_ = a020_ - a022_;\na019_ = cur_ + a020_;\ncur_ = cur_ + a008_;\na020_ = a006_ + a021_;\na021_ = a008_ - a017_;\na017_ = a021_ - a009_;\ncur_ = a011_ - a005_;\nif (a004_ == a007_) {\na007_ = -2 - a015_;\na022_ = a005_ - a019_;\na013_ = a010_ - a022_;\na024_ = a009_ + a000_;\na018_ = a003_ - 3;\na019_ = a021_ - a002_;\na000_ = a017_ + cur_;\na010_ = a020_ - 1;\na000_ = a020_ - a024_;\na017_ = a004_ + a007_;\na009_ = a001_ - a010_;\na015_ = a018_ + a022_;\na023_ = a013_ + a016_;\na024_ = cur_ - a019_;\na015_ = a013_ - a017_;\na024_ = a003_ - a021_;\na018_ = a003_ - a023_;\n} else {\na011_ = a006_ + a023_;\na018_ = a003_ - a015_;\na022_ = a008_ - a007_;\na005_ = a001_ - cur_;\na007_ = a000_ + a012_;\na000_ = a007_ + a023_;\na009_ = cur_ + a010_;\na018_ = -1 + a001_;\na003_ = -2 + a005_;\na006_ = a009_ + a020_;\na001_ = a017_ + a022_;\na024_ = a009_ + a006_;\na005_ = a017_ - a023_;\na004_ = a017_ - a019_;\na015_ = a018_ - a018_;\na021_ = a019_ + a011_;\na024_ = a009_ - a014_;\na009_ = 0 + a023_;\na020_ = a011_ + a006_;\na012_ = a005_ - a011_;\na010_ = a001_ - a018_;\na012_ = a002_ - a003_;\ncur_ = a006_ - a013_;\n}\na000_ = a023_ + a012_;\na008_ = a016_ - a018_;\na024_ = a018_ + a010_;\na013_ = a018_ + a002_;\na009_ = a016_ + a015_;\na005_ = a002_ + a009_;\na004_ = a009_ + a011_;\na011_ = a011_ + a013_;\na022_ = a019_ + a008_;\na017_ = a016_ + a010_;\na014_ = a012_ - a023_;\na005_ = a019_ - a001_;\na005_ = a013_ * -4;\na009_ = a020_ + a008_;\na012_ = a020_ - a001_;\na013_ = a016_ - a000_;\na012_ = a003_ + a000_;\na022_ = a001_ + a002_;\na001_ = a010_ - a024_;\na003_ = a008_ + a015_;\na012_ = a012_ - a020_;\na001_ = a019_ + a015_;\na009_ = a002_ + a018_;\na021_ = a024_ - a006_;\nif (a024_ == a014_) {\na006_ = a002_ + a016_;\na003_ = a020_ - 2;\na008_ = a020_ - a018_;\na015_ = a012_ + a001_;\na008_ = cur_ - a014_;\na001_ = a002_ - a008_;\na004_ = a015_ + a011_;\na024_ = -4 + a020_;\na021_ = a013_ + a012_;\na005_ = a012_ + a001_;\na009_ = a012_ + a018_;\na023_ = a016_ - a003_;\na011_ = a019_ - a012_;\na005_ = a000_ - a008_;\na004_ = a024_ - a011_;\na022_ = a024_ - a009_;\na005_ = a007_ + a011_;\na001_ = a012_ + a000_;\na006_ = a020_ - cur_;\na015_ = a020_ - 1;\n} else {\na001_ = a006_ - a019_;\na019_ = 2 - a014_;\ncur_ = a021_ + a009_;\na023_ = a010_ + 3;\na005_ = a018_ + a019_;\na015_ = cur_ + a020_;\na001_ = a009_ - a021_;\na016_ = a009_ - a004_;\na005_ = a003_ + a023_;\na006_ = a008_ - a008_;\ncur_ = a013_ - -3;\na018_ = a007_ + a009_;\nif (a011_ <= a024_) {\na001_ = a001_ - a007_;\na018_ = a001_ - a010_;\na015_ = a016_ + a008_;\na009_ = a013_ - a015_;\na001_ = a018_ + a001_;\na001_ = a024_ - a002_;\na018_ = a006_ + a015_;\na001_ = a000_ - 0;\na022_ = a024_ - a009_;\na011_ = a008_ - a015_;\na009_ = a017_ + a000_;\na016_ = a005_ + a023_;\na001_ = a007_ - a023_;\na008_ = a023_ - a020_;\na023_ = a005_ - a016_;\na020_ = a024_ + a008_;\na005_ = a008_ - a003_;\na016_ = a006_ + a011_;\na006_ = a004_ + a014_;\na013_ = -2 - a001_;\na021_ = a008_ - a005_;\na000_ = a011_ - a016_;\na024_ = a008_ - a000_;\na007_ = a008_ + a013_;\n} else {\na021_ = a010_ + a018_;\na005_ = a013_ - a023_;\na012_ = a011_ - a024_;\na014_ = a002_ + a009_;\na022_ = a022_ + a015_;\na024_ = a008_ + a021_;\ncur_ = a014_ + a009_;\na018_ = a004_ + a015_;\na004_ = a018_ + a004_;\na020_ = a013_ + a005_;\na017_ = a012_ - a007_;\na011_ = a017_ - a005_;\na015_ = a012_ - a014_;\na020_ = 2 - a009_;\na019_ = a001_ + a023_;\na003_ = a008_ - a020_;\ncur_ = a005_ - a001_;\na016_ = a011_ + a022_;\na005_ = a010_ + cur_;\na018_ = a021_ - a016_;\na022_ = a005_ - a016_;\n}\nif (a011_ == a020_) {\na017_ = a007_ + a006_;\na017_ = a001_ - a002_;\na003_ = a005_ + a023_;\na012_ = a007_ + a021_;\na005_ = a020_ + a005_;\na023_ = a019_ + a003_;\na019_ = a016_ - a013_;\na013_ = a008_ + a002_;\na023_ = a004_ - a020_;\na014_ = a000_ + a013_;\na015_ = a008_ + a011_;\na010_ = a004_ - a014_;\na020_ = a022_ - a013_;\na020_ = a011_ + a015_;\na021_ = a021_ + a021_;\na024_ = a009_ - 2;\na012_ = a014_ - a018_;\na014_ = a009_ + a024_;\na021_ = a019_ - a007_;\nif (a006_ <= a022_) {\ncur_ = a004_ - a006_;\na022_ = a021_ - a003_;\na013_ = a023_ - a001_;\na011_ = a017_ - a009_;\na002_ = a000_ + a005_;\na019_ = a005_ + a023_;\na007_ = a024_ + a013_;\na014_ = a001_ - a003_;\na007_ = 3 + a003_;\na000_ = a002_ + a011_;\na000_ = a004_ + a012_;\na018_ = a013_ + a024_;\na024_ = a023_ - cur_;\na001_ = a007_ + a008_;\ncur_ = a008_ + a000_;\na012_ = a013_ + a000_;\na001_ = a008_ - a021_;\na013_ = a006_ + a018_;\na024_ = a004_ - a001_;\na014_ = a000_ - a006_;\na008_ = a010_ * 2;\na000_ = a019_ + a011_;\na000_ = a019_ + a000_;\n} else {\na014_ = a010_ - a009_;\na007_ = a009_ + a004_;\na019_ = a017_ + a006_;\na001_ = a019_ + a005_;\na015_ = a000_ - a006_;\na002_ = a011_ + a011_;\na013_ = a013_ + a015_;\na005_ = a014_ + a015_;\na017_ = a000_ + a000_;\na015_ = a019_ - a013_;\na007_ = a021_ + a005_;\na020_ = -4 + a007_;\na007_ = a022_ + a003_;\na009_ = a021_ - a001_;\na002_ = a009_ + a004_;\na016_ = a018_ + a022_;\na008_ = a007_ - a001_;\na007_ = a010_ + a010_;\na012_ = a020_ + a013_;\na006_ = a011_ + a011_;\na023_ = a021_ + a002_;\na023_ = a015_ + a011_;\na008_ = a005_ - a024_;\na019_ = a000_ - a015_;\na007_ = a022_ - a003_;\na023_ = a008_ - a007_;\na007_ = a008_ - a023_;\na024_ = a018_ + a005_;\na001_ = a013_ - a002_;\na017_ = a023_ - a011_;\na022_ = a003_ + a004_;\n}\na010_ = a017_ - a010_;\na012_ = a013_ - a019_;\na001_ = cur_ + a012_;\na017_ = a015_ + a002_;\na018_ = a023_ + a020_;\na020_ = a012_ + a022_;\ncur_ = a023_ - a005_;\na000_ = a019_ - a022_;\na002_ = a006_ + a015_;\na022_ = a015_ - a003_;\na016_ = a013_ + -1;\na010_ = a016_ - a002_;\na021_ = a009_ - a008_;\na021_ = a002_ + a003_;\na013_ = a004_ - a008_;\n} else {\na015_ = a019_ + a023_;\na001_ = a014_ - a000_;\n}\na015_ = a014_ + a023_;\n}\na002_ = a014_ + a010_;\n}\noutput.collect(prefix, new IntWritable(a023_));\n}", "public int[] findAnyPairIndexesWhileLCMMaximized() {\n if (seq.length < 2) {\n return null;\n }\n int size = 0;\n for (int i = 1; i <= m; i++) {\n size += m / i;\n }\n\n IntegerMultiWayDeque deque = new IntegerMultiWayDeque(m + 1, size);\n for (int i = 1; i <= m; i++) {\n for (int j = i; j <= m; j += i) {\n if (!indexesOfSeq.isEmpty(j)) {\n deque.addLast(i, j / i);\n }\n }\n }\n\n long lcm = -1;\n int v1 = 0;\n int v2 = 0;\n\n for (int i = m; i >= 1; i--) {\n if (!indexesOfSeq.isEmpty(i) && indexesOfSeq.peekFirst(i) != indexesOfSeq.peekLast(i)) {\n lcm = v1 = v2 = i;\n break;\n }\n }\n\n IntegerVersionArray iva = new IntegerVersionArray(m + 1);\n IntegerDequeImpl stack = new IntegerDequeImpl(m);\n for (int i = 1; i <= m; i++) {\n iva.clear();\n stack.clear();\n while (!deque.isEmpty(i)) {\n int last = deque.removeLast(i);\n factorize(last);\n int total = ie(iva, allFactors.size() - 1, 1, 0);\n if (total > 0) {\n int pop = 0;\n while (total > 0) {\n pop = stack.removeLast();\n if (GCDs.gcd(pop, last) == 1) {\n total--;\n }\n add(iva, pop, -1);\n }\n long l = LCMs.lcm(last, pop) * i;\n if (l > lcm) {\n lcm = l;\n v1 = last * i;\n v2 = pop * i;\n }\n }\n add(iva, last, 1);\n stack.addLast(last);\n }\n }\n\n return new int[]{indexesOfSeq.peekFirst(v1), indexesOfSeq.peekLast(v2)};\n }", "static\nint\npairsInSortedRotated(\nint\narr[], \n\nint\nn, \nint\nx) \n{ \n\n// Find the pivot element. \n\n// Pivot element is largest \n\n// element of array. \n\nint\ni; \n\nfor\n(i = \n0\n; i < n - \n1\n; i++) \n\nif\n(arr[i] > arr[i + \n1\n]) \n\nbreak\n; \n\n\n// l is index of \n\n// smallest element. \n\nint\nl = (i + \n1\n) % n; \n\n\n// r is index of \n\n// largest element. \n\nint\nr = i; \n\n\n// Variable to store \n\n// count of number \n\n// of pairs. \n\nint\ncnt = \n0\n; \n\n\n// Find sum of pair \n\n// formed by arr[l] \n\n// and arr[r] and \n\n// update l, r and \n\n// cnt accordingly. \n\nwhile\n(l != r) \n\n{ \n\n// If we find a pair with \n\n// sum x, then increment \n\n// cnt, move l and r to \n\n// next element. \n\nif\n(arr[l] + arr[r] == x) \n\n{ \n\ncnt++; \n\n\n// This condition is required \n\n// to be checked, otherwise \n\n// l and r will cross each \n\n// other and loop will never \n\n// terminate. \n\nif\n(l == (r - \n1\n+ n) % n) \n\n{ \n\nreturn\ncnt; \n\n} \n\n\nl = (l + \n1\n) % n; \n\nr = (r - \n1\n+ n) % n; \n\n} \n\n\n// If current pair sum \n\n// is less, move to \n\n// the higher sum side. \n\nelse\nif\n(arr[l] + arr[r] < x) \n\nl = (l + \n1\n) % n; \n\n\n// If current pair sum \n\n// is greater, move \n\n// to the lower sum side. \n\nelse\n\nr = (n + r - \n1\n) % n; \n\n} \n\n\nreturn\ncnt; \n}", "static\nint\ncountPairs(String str) \n\n{ \n\nint\nresult = \n0\n; \n\nint\nn = str.length(); \n\n\nfor\n(\nint\ni = \n0\n; i < n; i++) \n\n\n// This loop runs at most 26 times \n\nfor\n(\nint\nj = \n1\n; (i + j) < n && j <= MAX_CHAR; j++) \n\nif\n((Math.abs(str.charAt(i + j) - str.charAt(i)) == j)) \n\nresult++; \n\n\nreturn\nresult; \n\n}", "private static int[] remainder(int[] x, int[] y)\n {\n int xStart = 0;\n while (xStart < x.length && x[xStart] == 0)\n {\n ++xStart;\n }\n\n int yStart = 0;\n while (yStart < y.length && y[yStart] == 0)\n {\n ++yStart;\n }\n\n int xyCmp = compareNoLeadingZeroes(xStart, x, yStart, y);\n\n if (xyCmp > 0)\n {\n int yBitLength = calcBitLength(1, yStart, y);\n int xBitLength = calcBitLength(1, xStart, x);\n int shift = xBitLength - yBitLength;\n\n int[] c;\n int cStart = 0;\n int cBitLength = yBitLength;\n if (shift > 0)\n {\n c = shiftLeft(y, shift);\n cBitLength += shift;\n }\n else\n {\n int len = y.length - yStart; \n c = new int[len];\n System.arraycopy(y, yStart, c, 0, len);\n }\n\n for (;;)\n {\n if (cBitLength < xBitLength\n || compareNoLeadingZeroes(xStart, x, cStart, c) >= 0)\n {\n subtract(xStart, x, cStart, c);\n\n while (x[xStart] == 0)\n {\n if (++xStart == x.length)\n {\n return x;\n }\n }\n\n xyCmp = compareNoLeadingZeroes(xStart, x, yStart, y);\n\n if (xyCmp <= 0)\n {\n break;\n }\n\n //xBitLength = bitLength(xStart, x);\n xBitLength = 32 * (x.length - xStart - 1) + bitLen(x[xStart]);\n }\n\n shift = cBitLength - xBitLength;\n\n if (shift < 2)\n {\n shiftRightOneInPlace(cStart, c);\n --cBitLength;\n }\n else\n {\n shiftRightInPlace(cStart, c, shift);\n cBitLength -= shift;\n }\n\n// cStart = c.length - ((cBitLength + 31) / 32);\n while (c[cStart] == 0)\n {\n ++cStart;\n }\n }\n }\n\n if (xyCmp == 0)\n {\n for (int i = xStart; i < x.length; ++i)\n {\n x[i] = 0;\n }\n }\n\n return x;\n }", "static int sherlockAndAnagrams(String s) {\n int anagramCount = 0;\n Map<String, Integer> map = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n for (int k = i + 1; k <= s.length(); k++) {\n String sub = s.substring(i, k);\n System.out.println(sub);\n sub = new String(sort(sub.toCharArray()));\n int value = map.getOrDefault(sub, 0);\n if(value > 0) {\n anagramCount = anagramCount + value;\n }\n map.put(sub, value+1);\n\n }\n }\n return anagramCount;\n }", "public static void main(String[] args){\n\t\t\n\t\tfor (int i = 0; i<999999;i++) results.add(0);\t\n\n\t\tsetChain(1L);\n\t\tboolean switcher = true;\n\t\t//while switch=true ... and once chain length is added to, switch = false\n \t\tlong best = 0L;\n\t\tint index=0;\n\t\t\t\n\t\tfor (long j = 1L; j < 1000000L; j++) {\n\n\t\t\tsetCur((int)j);\n\n\t\t\tfindChain(j);//} catch(Exception e){System.out.println(\"stackOverFlow :D\");}\n\t\t\tif (getChain() > best) {best = getChain(); index=getCur();}\n\t\t\t//now store results for later use if we come across that number.\n\t\t\tresults.set(getCur()-1, (int)getChain());\t\n\t\t\tsetChain(1L); //reset\n\t\t\t/* \t\n\t\t\tswitcher=true;\n\t\t\tint i = j;\n\t\t\twhile (switcher) {\n\n\t\t\t\tif (i==1) {//results.add(chainLength); \n\t\t\t\t\tif (chainLength > best) { best=chainLength; index = j;}\n\t\t\t \tchainLength=1; switcher=false;}\n\t\n\t\t\t\telse { i=recurse(i); chainLength++; }\t\n\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n//\t\t }\n\t\t}\n\t\tSystem.out.println(index);\n\t}", "public void testTwoWayDistribution() {\n for(int p = 0; p < 20; p++) {\n int[] landings = new int[2];\n for(long in = 0; in < 100000; in++) {\n long longHash = FPGenerator.std64.fp(p+\"a\"+in);\n// long longHash = rand.nextLong();\n// long longHash = ArchiveUtils.doubleMurmur((p+\":\"+in).getBytes());\n landings[conhash.bucketFor(longHash, 2)]++;\n }\n// System.out.println(landings[0]+\",\"+landings[1]);\n assertTrue(\"excessive changes\",Math.abs(landings[0]-landings[1]) < 2000); \n }\n }", "static int findBinaryStringUsingHMap(int[] arr){\n Map<Integer, Integer> map = new HashMap<>();\n int count =0, maxLength =0;\n //need a default value in map (0,-1) i.e count is zero at index -1 because when we start travelling\n // (after +- counter and encounter zero at very first time (means 0==1) means from index 0 --> current 0=1\n // to calculate the length we need 0,-1\n //e.g 0 1 --> count will be like -1 --> 0 at 1 = 1 ( how to calculate i-(-1) => 2\n map.put(0, -1);\n for(int i=0; i<arr.length; i++){\n count = count + (arr[i]==1 ? 1 : -1);\n if(map.containsKey(count)){\n maxLength = Math.max(maxLength, i - map.get(count));\n }else{\n map.put(count, i);\n }\n }\n return maxLength;\n }", "protected int find_among_b(Among v[])\n {\n\tint i = 0;\n\tint j = v.length;\n\n\tint c = cursor;\n\tint lb = limit_backward;\n\n\tint common_i = 0;\n\tint common_j = 0;\n\n\tboolean first_key_inspected = false;\n\n\twhile (true) {\n\t int k = i + ((j - i) >> 1);\n\t int diff = 0;\n\t int common = common_i < common_j ? common_i : common_j;\n\t Among w = v[k];\n\t int i2;\n\t for (i2 = w.s.length - 1 - common; i2 >= 0; i2--) {\n\t\tif (c - common == lb) {\n\t\t diff = -1;\n\t\t break;\n\t\t}\n\t\tdiff = current.charAt(c - 1 - common) - w.s[i2];\n\t\tif (diff != 0) break;\n\t\tcommon++;\n\t }\n\t if (diff < 0) {\n\t\tj = k;\n\t\tcommon_j = common;\n\t } else {\n\t\ti = k;\n\t\tcommon_i = common;\n\t }\n\t if (j - i <= 1) {\n\t\tif (i > 0) break;\n\t\tif (j == i) break;\n\t\tif (first_key_inspected) break;\n\t\tfirst_key_inspected = true;\n\t }\n\t}\n\twhile (true) {\n\t Among w = v[i];\n\t if (common_i >= w.s.length) {\n\t\tcursor = c - w.s.length;\n\t\tif (w.method == null) return w.result;\n\n\t\tboolean res;\n\t\ttry {\n\t\t Object resobj = w.method.invoke(this);\n\t\t res = resobj.toString().equals(\"true\");\n\t\t} catch (InvocationTargetException e) {\n\t\t res = false;\n\t\t // FIXME - debug message\n\t\t} catch (IllegalAccessException e) {\n\t\t res = false;\n\t\t // FIXME - debug message\n\t\t}\n\t\tcursor = c - w.s.length;\n\t\tif (res) return w.result;\n\t }\n\t i = w.substring_i;\n\t if (i < 0) return 0;\n\t}\n }", "public void reduce(Text prefix, Iterator<IntWritable> iter,\n OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\nint a000_ = 0;\nint a001_ = 0;\nint a002_ = 0;\nint a003_ = 0;\nint a004_ = 0;\nint a005_ = 0;\nint a006_ = 0;\nint a007_ = 0;\nint a008_ = 0;\nint a009_ = 0;\nint a010_ = 0;\nint a011_ = 0;\nint a012_ = 0;\nint a013_ = 0;\nint a014_ = 0;\nint a015_ = 0;\nint a016_ = 0;\nint a017_ = 0;\nint a018_ = 0;\nint a019_ = 0;\nint cur_ = 0;\n\nwhile (iter.hasNext()) {\ncur_ = iter.next().get();\na011_ = a015_ - a008_;\na003_ = a000_ + a003_;\na005_ = a005_ + a006_;\na015_ = a012_ + a011_;\na008_ = a014_ + a001_;\na007_ = a005_ + a015_;\na002_ = a000_ - a009_;\na012_ = a005_ + a012_;\na010_ = a018_ + a003_;\na014_ = a014_ + a004_;\ncur_ = a002_ + a004_;\na017_ = a007_ + a009_;\na005_ = cur_ - a014_;\na000_ = a012_ - a006_;\na006_ = a013_ - a011_;\na000_ = 0 - a008_;\na006_ = a007_ + a003_;\na015_ = a014_ - a019_;\na004_ = a012_ + cur_;\na005_ = a018_ - a017_;\na007_ = a006_ + a000_;\na005_ = cur_ - a009_;\na001_ = a009_ + a008_;\na015_ = cur_ + a010_;\na013_ = a018_ * -2;\ncur_ = a013_ - a012_;\na019_ = a002_ - a001_;\na017_ = a014_ + a004_;\na005_ = a017_ - a006_;\na016_ = a019_ - a019_;\na009_ = a000_ + cur_;\na013_ = a003_ * -1;\nif (a010_ >= a004_) {\na015_ = a018_ + a015_;\na010_ = a009_ - a010_;\na012_ = a011_ - a005_;\na014_ = a002_ - a012_;\nif (a000_ != a013_) {\na004_ = a015_ + cur_;\na013_ = a019_ + a016_;\na013_ = a012_ + a009_;\na016_ = a014_ - -5;\na001_ = a002_ - a004_;\n} else {\na007_ = a013_ - a003_;\na016_ = a007_ - a018_;\na016_ = a013_ + a011_;\na013_ = a013_ - a012_;\na013_ = -1 + a006_;\ncur_ = a002_ - a017_;\na007_ = a002_ + a018_;\ncur_ = a002_ + a015_;\na003_ = a015_ + a007_;\na017_ = a005_ + a009_;\na013_ = a006_ - -2;\na008_ = a005_ - a003_;\na002_ = a017_ - a014_;\na006_ = a006_ + a010_;\na008_ = a018_ + a010_;\na000_ = a015_ + -4;\na014_ = a004_ - a010_;\na012_ = a009_ - a016_;\na008_ = a002_ - a019_;\na015_ = a007_ + a005_;\na004_ = cur_ + a018_;\na011_ = a007_ + a012_;\na007_ = 4 - a011_;\na001_ = a012_ + cur_;\na011_ = a010_ - a013_;\na003_ = a006_ - a011_;\na006_ = a012_ - a008_;\na015_ = a010_ - a013_;\na019_ = a012_ + a011_;\nif (a017_ != a015_) {\ncur_ = a010_ - cur_;\na013_ = a009_ - a002_;\na008_ = a011_ - a008_;\na019_ = a005_ - a000_;\na010_ = a019_ + a010_;\na002_ = a004_ - 1;\na017_ = a015_ - cur_;\ncur_ = 1 - a005_;\na004_ = a000_ + a003_;\na001_ = a012_ + 2;\na004_ = a003_ - 2;\na003_ = a010_ - -4;\na019_ = a014_ - a002_;\na011_ = a002_ - a007_;\na000_ = a007_ + a015_;\na018_ = a009_ + cur_;\na006_ = a003_ - a017_;\nif (a008_ == a013_) {\na005_ = a017_ + a016_;\na005_ = a005_ + a013_;\na017_ = a015_ + a007_;\na016_ = a016_ + a018_;\na016_ = a014_ - a015_;\na003_ = a019_ - a018_;\ncur_ = a010_ + a005_;\na003_ = a001_ + a010_;\na016_ = -4 + a003_;\na002_ = a017_ + a008_;\na016_ = a003_ - a009_;\na003_ = a009_ + a015_;\na016_ = a004_ - a000_;\na005_ = a015_ + cur_;\na018_ = a010_ + a003_;\na016_ = a017_ - a004_;\n} else {\na018_ = a019_ + a009_;\na015_ = a004_ + a018_;\na019_ = a005_ - a003_;\na009_ = -5 + a008_;\na010_ = a000_ + a000_;\na009_ = a009_ - a011_;\na005_ = a006_ - cur_;\na019_ = a018_ + a009_;\na014_ = a005_ + cur_;\na004_ = a010_ + a008_;\na000_ = a015_ - a018_;\na015_ = a017_ - a017_;\na008_ = a001_ + a008_;\na002_ = a009_ - a012_;\na010_ = a006_ - a012_;\na014_ = a009_ + a001_;\na016_ = a000_ - a016_;\na004_ = a018_ - a019_;\na007_ = a003_ + a011_;\na019_ = a004_ - a017_;\na015_ = a018_ - a017_;\na003_ = a000_ + a002_;\na005_ = a007_ - a014_;\na001_ = cur_ + a017_;\n}\na012_ = a012_ + cur_;\n} else {\na010_ = a018_ + a000_;\na002_ = a000_ - a003_;\na005_ = a012_ + a012_;\na015_ = a004_ + a004_;\na008_ = a013_ - a019_;\na004_ = a002_ + a015_;\na011_ = a014_ + a012_;\na004_ = a019_ + a010_;\na002_ = a018_ + a010_;\ncur_ = a017_ + a019_;\na017_ = a013_ + a005_;\na013_ = a008_ - a012_;\na004_ = a012_ + a007_;\n}\na009_ = a015_ - a016_;\na000_ = a006_ + a008_;\na003_ = a008_ - a011_;\na001_ = a016_ - a006_;\na016_ = a014_ + a016_;\na000_ = a011_ + a003_;\na004_ = a010_ + a019_;\na013_ = a008_ + cur_;\na016_ = a016_ + a015_;\n}\na010_ = a003_ + a007_;\na006_ = a009_ - a000_;\na002_ = a017_ - a001_;\na013_ = a016_ + a019_;\na013_ = a009_ - a015_;\na005_ = a002_ - a018_;\na009_ = a002_ + a007_;\na008_ = a008_ + a002_;\na007_ = a005_ + a009_;\na017_ = a019_ + a013_;\na012_ = a003_ + a004_;\na008_ = a012_ + a012_;\na003_ = a007_ + a005_;\ncur_ = a014_ + a007_;\na009_ = a016_ + a010_;\na006_ = a005_ - a003_;\na014_ = a019_ + cur_;\na006_ = a007_ + a000_;\na013_ = a011_ - a011_;\na018_ = a009_ - 1;\na002_ = a004_ - a014_;\n} else {\na004_ = a006_ - a014_;\na016_ = a017_ + 2;\na014_ = a006_ - a002_;\na002_ = a016_ + cur_;\na014_ = -3 + a018_;\n}\ncur_ = a017_ + a015_;\na005_ = a003_ - a015_;\na014_ = a019_ + a009_;\ncur_ = cur_ + a005_;\na009_ = a007_ - a004_;\ncur_ = a014_ + a006_;\na013_ = a002_ - a012_;\na002_ = a008_ + a014_;\na000_ = a006_ + a004_;\na017_ = 1 - a009_;\na012_ = a017_ + a001_;\na011_ = a009_ - a010_;\na011_ = a018_ - a014_;\na016_ = a003_ - cur_;\na013_ = cur_ + a012_;\na015_ = a012_ + a010_;\na017_ = a007_ + a017_;\na000_ = -1 + a008_;\na010_ = a008_ + a003_;\na016_ = a009_ + a010_;\na002_ = a011_ + a008_;\na016_ = a015_ + a016_;\na002_ = a012_ + a008_;\na017_ = a013_ + a004_;\n}\noutput.collect(prefix, new IntWritable(a005_));\n}", "public int optimizedCom() {\n\tint b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0;\n\tint a = 1;\n\n\tb = 65;\n\tc = b;\n\n\tif (a != 0) {\n\t b = (b * 100) + 100000;\n\t c = b + 17000;\n\t}\n\n\t// at this point:\n\t// a == 1\n\t// b == 106500\n\t// c == 123500\n\n\t// outer loop terminates when b == c\n\t// c never changes, serves as termination condition\n\t// b only gets +17 added for every execution of the outer loop\n\n\tdo {\n\t f = 1;\n\t d = 2;\n\t do { // jnz g -13\n\t\te = 2;\n\n\t\tdo { // jnz g - 8\n\t\t g = (d * e) - b;\n\n\t\t if (g == 0)\n\t\t\tf = 0;\n\n\t\t e++;\n\n\t\t g = e - b;\n\t\t} while (g != 0);\n\n\t\td++;\n\n\t\tg = d - b;\n\t } while (g != 0);\n\n\t // increments h if register b contains a non-prime number (checked by printing all values)\n\t if (f == 0) {\n\t\th++;\n\t\tSystem.out.println(\"b: \" + b + \" c: \" + c + \" d: \" + d + \" e: \" + e + \" f: \" + f + \" g: \" + g);\n\t }\n\n\t // c does not change, b only gets increased by 17\n\t // if b == c, the method returns h which is the number of non-prime numbers encountered in the loop\n\t g = b - c;\n\n\t if (g == 0)\n\t\treturn h;\n\n\t b += 17;\n\n\t} while (true);\n }", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n int t= scan.nextInt();\n int min[] = new int[10001];\n Arrays.fill(min,89898);\n min[0] = 0;\n int pn[] = new int[10001];\n boolean p[] = new boolean[10001];\n for(int i=2;i<101;++i)\n {\n if(!p[i])\n for(int j=i*i;j<10001;j+=i)\n p[j] = true;\n }\n int index = 0;\n for(int i=2;i<10001;++i)\n if(!p[i])\n pn[index++] = i;\n int last = index-1;\n for(int i=0;i<=last;++i)\n {\n int temp = (int)Math.pow(pn[i], pn[i]);\n if(temp<10001)\n pn[index++] = temp;\n else break;\n }\n pn[index++] = 898989;\n Arrays.sort(pn,0,index);\n for(int i=2;i<10001;++i)\n {\n for(int j=0;pn[j]<=i;++j)\n if(min[i]>1+min[i-pn[j]])\n min[i] = 1+min[i-pn[j]];\n }\n\n StringBuilder sb = new StringBuilder(\"\");\n while(t-->0)\n {\n sb.append(min[scan.nextInt()]+\"\\n\");\n }\n System.out.println(sb);\n }" ]
[ "0.61815184", "0.5717108", "0.56787926", "0.5661716", "0.5588323", "0.5549539", "0.55485004", "0.5514469", "0.54599154", "0.543866", "0.5438294", "0.54098976", "0.5406914", "0.54068595", "0.5396596", "0.5381233", "0.53749454", "0.5366567", "0.53624636", "0.5361649", "0.5340282", "0.53361446", "0.5318954", "0.53061706", "0.5305633", "0.530067", "0.5297482", "0.5290891", "0.528828", "0.5286508", "0.52809006", "0.52769774", "0.52627623", "0.52616936", "0.52614707", "0.5261228", "0.52596825", "0.52516603", "0.52466774", "0.522795", "0.5227239", "0.52252454", "0.5218351", "0.52157223", "0.52145594", "0.5214294", "0.5205621", "0.5200375", "0.51982605", "0.5190192", "0.51877844", "0.5175779", "0.5172512", "0.5164782", "0.5163275", "0.5154606", "0.5154366", "0.5153823", "0.5152078", "0.5150775", "0.5149642", "0.51482326", "0.5146612", "0.51430434", "0.51429987", "0.51389563", "0.51312125", "0.51183146", "0.5110795", "0.5108848", "0.510868", "0.5105196", "0.5100216", "0.50995827", "0.50961965", "0.50942624", "0.50918704", "0.50905526", "0.5087543", "0.5082532", "0.50816953", "0.5079254", "0.50764024", "0.5072035", "0.50646013", "0.5064259", "0.50576246", "0.50568885", "0.50566995", "0.5055622", "0.5051786", "0.50510603", "0.50503576", "0.5049802", "0.50479215", "0.50477666", "0.5044787", "0.5038383", "0.50347465", "0.50322354", "0.5029535" ]
0.0
-1
Created by Raven on 2018/4/4.
public interface OnDateSelectedListner { void onDateSet(TimeSectionDialog timeSectionDialog, long startMillseconds,long endMillSeconds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n void init() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public void init() {}", "public void mo38117a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void init() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void initialize() { \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "private void m50366E() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@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}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "Consumable() {\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "private void init() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n public int getOrder() {\n return 4;\n }", "protected boolean func_70814_o() { return true; }", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void initialize() {\n \n }", "@Override public int describeContents() { return 0; }", "@Override\n public void init() {\n }" ]
[ "0.61112446", "0.58635205", "0.58066297", "0.58058816", "0.5747293", "0.5693122", "0.5691504", "0.5678781", "0.5671558", "0.5669775", "0.56295013", "0.56268746", "0.56268746", "0.5612578", "0.56119543", "0.56119543", "0.56119543", "0.56119543", "0.56119543", "0.56119543", "0.56022406", "0.5598424", "0.55966985", "0.55750275", "0.5572444", "0.5562819", "0.555825", "0.5548715", "0.5538463", "0.55345815", "0.55345815", "0.55345815", "0.55345815", "0.55345815", "0.5532568", "0.5530183", "0.5530183", "0.5524987", "0.5522555", "0.5495765", "0.54854584", "0.5484841", "0.5479853", "0.54791534", "0.54728866", "0.5448426", "0.54428524", "0.54428524", "0.5438235", "0.5438235", "0.5438235", "0.54360956", "0.542919", "0.542919", "0.5428377", "0.5421613", "0.5421613", "0.5421613", "0.54137355", "0.5411316", "0.5411316", "0.5411316", "0.5409184", "0.5409184", "0.5409184", "0.5408783", "0.53810877", "0.5377346", "0.53768367", "0.5376347", "0.5376347", "0.5374346", "0.5364421", "0.536199", "0.53618485", "0.5355005", "0.5351508", "0.5346432", "0.53337723", "0.5331974", "0.53314674", "0.53298974", "0.5326064", "0.5322185", "0.5309081", "0.5307436", "0.52986646", "0.529761", "0.52934694", "0.5292923", "0.5285433", "0.52844924", "0.52844924", "0.52844924", "0.52844924", "0.52844924", "0.52844924", "0.52844924", "0.5280711", "0.527982", "0.5277061" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7247427", "0.720267", "0.7196145", "0.7178052", "0.71080035", "0.7040695", "0.7039065", "0.7012457", "0.7011027", "0.6980861", "0.69456106", "0.69392735", "0.6934666", "0.691844", "0.691844", "0.6891824", "0.6884514", "0.6875728", "0.6875644", "0.6862535", "0.6862535", "0.6862535", "0.6862535", "0.6853197", "0.68470424", "0.681965", "0.6817786", "0.6813462", "0.68134135", "0.68134135", "0.68061316", "0.6801325", "0.6798238", "0.6791593", "0.67900455", "0.6788608", "0.6784089", "0.6760256", "0.67577696", "0.6748367", "0.67445564", "0.67445564", "0.6741421", "0.6740377", "0.67264265", "0.6724471", "0.67230386", "0.67230386", "0.6721279", "0.67125106", "0.6708213", "0.67049414", "0.6699535", "0.6699266", "0.669693", "0.6695199", "0.66867507", "0.66839963", "0.66839963", "0.6683506", "0.66805595", "0.6679765", "0.6677659", "0.66691315", "0.66676474", "0.66629726", "0.66579926", "0.66579926", "0.66579926", "0.6657206", "0.665479", "0.665479", "0.665479", "0.66530275", "0.66525495", "0.6650577", "0.6649072", "0.66473264", "0.66473204", "0.6646837", "0.66467345", "0.6645803", "0.6645064", "0.66436726", "0.6642964", "0.6642522", "0.66388524", "0.66350853", "0.6634306", "0.66330856", "0.6632399", "0.6632399", "0.6632399", "0.6629516", "0.66283673", "0.66280276", "0.66266316", "0.6624691", "0.662099", "0.6619313", "0.6619313" ]
0.0
-1
Created by zhenia on 14.05.17.
public interface SentenceMember { @Override String toString(); SentenceMember reverse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void gored() {\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 init() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "private void init() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void jugar() {\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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void one() {\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\r\n\tpublic void init() {}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "Petunia() {\r\n\t\t}", "private void strin() {\n\n\t}", "@Override\n protected void getExras() {\n }", "public void mo6081a() {\n }", "private void m50366E() {\n }", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n public void initialize() { \n }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t}" ]
[ "0.59682107", "0.5883068", "0.5824337", "0.57812345", "0.5689006", "0.5689006", "0.56811595", "0.56787086", "0.56653", "0.5661313", "0.5650205", "0.5649378", "0.56254935", "0.56238407", "0.5610187", "0.5573327", "0.556299", "0.55615103", "0.55601877", "0.5546764", "0.5536302", "0.5536302", "0.5536302", "0.5536302", "0.5536302", "0.55335987", "0.5528434", "0.5517205", "0.5499206", "0.5483387", "0.54748774", "0.54718035", "0.5468767", "0.5461858", "0.5461858", "0.5443192", "0.54343694", "0.5430073", "0.5430073", "0.5422157", "0.54176974", "0.54140186", "0.54121256", "0.54040545", "0.5399456", "0.53962475", "0.53962475", "0.53962475", "0.5391738", "0.53913486", "0.53913486", "0.53913486", "0.53857374", "0.53857374", "0.5378704", "0.5377302", "0.53682905", "0.53682905", "0.53682905", "0.53682905", "0.53682905", "0.53682905", "0.5358722", "0.535684", "0.53543335", "0.53543335", "0.53543335", "0.534777", "0.5338496", "0.5337632", "0.5336366", "0.5334974", "0.5330836", "0.532774", "0.5327608", "0.5327608", "0.5327608", "0.5327608", "0.5327608", "0.5327608", "0.5327608", "0.5314796", "0.53134954", "0.5312066", "0.5311187", "0.53099525", "0.5295949", "0.52919203", "0.5290287", "0.5288658", "0.5283405", "0.5271948", "0.52657205", "0.52624595", "0.52624595", "0.5262231", "0.525969", "0.5254491", "0.5243159", "0.52164704", "0.52145994" ]
0.0
-1
A representation of the model object 'Property Access'.
public interface PropertyAccess extends FeatureCall { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Expression getAccessExpression()\r\n {\r\n\treturn m_accessExpression;\r\n }", "public String getAccess();", "public String getAccess()\n\t\t{\n\t\t\treturn m_access;\n\t\t}", "@Column(name = \"PERMISSION_ACCESS\")\n\tpublic String getPermissionAccess()\n\t{\n\t\treturn permissionAccess;\n\t}", "String getAccess();", "String getAccess();", "public int getAccess() {\n\t\treturn access;\n\t}", "public String getAccession() {\n return accession;\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public AccessLevel getAccessLevel(){\n return this.accessLevel;\n }", "PropertyCallExp createPropertyCallExp();", "@FameProperty(name = \"accessors\", derived = true)\n public Collection<TWithAccesses> getAccessors() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "public Date getDateAccess() {\n return dateAccess;\n }", "public HasDisplayableProperties getProperties();", "public java.lang.String getContactAccess() {\r\n return contactAccess;\r\n }", "public int getVPNAccessProp()\n\t{\n\t\treturn VPNAccessProp;\n\t}", "JApiModifier<AccessModifier> getAccessModifier();", "public abstract List<String> getAdditionalAccessions();", "public String toString() {\n StringBuilder stringBuilder = new StringBuilder(40);\n stringBuilder.append(\"property '\").append(this.getName()).append(\"' (\");\n if (this._accessorMethod != null) {\n stringBuilder.append(\"via method \").append(this._accessorMethod.getDeclaringClass().getName()).append(\"#\").append(this._accessorMethod.getName());\n } else {\n stringBuilder.append(\"field \\\"\").append(this._field.getDeclaringClass().getName()).append(\"#\").append(this._field.getName());\n }\n if (this._serializer == null) {\n stringBuilder.append(\", no static serializer\");\n } else {\n stringBuilder.append(\", static serializer of type \" + this._serializer.getClass().getName());\n }\n stringBuilder.append(')');\n return stringBuilder.toString();\n }", "@Override\n\tpublic String toString() {\n\t\tString strg= \"Property Name: \"+propertyName\n\t +\"\\nLocated in \"+city\n\t +\"\\nBelonging to: \"+ owner\n\t +\"\\nRent Amount: \"+rentAmount+\"\\n\";\n\t\treturn strg;\n\t}", "public ModbusAccess getAccess() {\r\n\t\treturn access;\r\n\t}", "public String getAccessNum() {\r\n return accessNum;\r\n }", "public int getAccessFlags() {\n return access_flags;\n }", "public Object getReadOnlyObjectProperty() {\r\n return readOnlyObjectProperty;\r\n }", "public Vector<PathElement> generateAccessPath()\n\t{\n\t if ( null == this.parent )\n {\n return new Vector<PathElement>();\n }\n else if ( this.isNary() )\n {\n checkPrecondition(this.parent != null, \"N-ary node with no parent\");\n return this.parent.generateAccessPath();\n }\n else\n {\n Vector<PathElement> path = parent.generateAccessPath();\n PathElement own_element = new PathElement(this.operator, this.paramState, this.positionInParent);\n path.add(own_element);\n return path;\n }\n\t}", "public String getReferenceAccession() {\n return referenceProteinAccession;\n }", "public boolean isReadOnly()\n {\n return SystemProps.IsReadOnlyProperty(this.getPropertyID());\n }", "@Override\n public String toString() {\n return ObjectContracts.toString(this, \"objectType\", \"name\", \"atPath\");\n }", "public Boolean getPublicAccess() {\n return publicAccess;\n }", "@JSProperty\n boolean isReadOnly();", "@Override\r\n\tpublic String toString() {\r\n\t\treturn super.toString() + Z.fmt(\"accesskey\", getHtmlAccessKey())\r\n\t\t\t+ Z.fmt(\"cols\", \"\" + getHtmlCols())\r\n//\t\t\t\t+ Z.fmt(\"defaultvalue\", \"\" + getHtmlExtValue())\r\n\t\t\t+ Z.fmt(\"disabled\", \"\" + getHtmlDisabled())\r\n\t\t\t+ Z.fmt(\"name\", \"\" + getHtmlName())\r\n\t\t\t+ Z.fmt(\"readonly\", \"\" + getHtmlReadOnly())\r\n\t\t\t+ Z.fmt(\"tabindex\", \"\" + getHtmlTabIndex())\r\n\t\t\t+ Z.fmt(\"type\", \"\" + getHtmlType())\r\n\t\t\t+ Z.fmt(\"value\", getHtmlValue())\r\n\t\t\t+ Z.fmt(\"autofocus\", getHtmlAutoFocus()) \r\n\t\t\t+ Z.fmt(\"placeholder\", getHtmlPlaceholder())\r\n\t\t\t+ Z.fmt(\"required\", getHtmlRequired()) ;\r\n\t}", "@Override\n public String toString() {\n return \"[\" + getClass().getSimpleName() + \"@\" + Long.toHexString(accessor().address()) + \",]\";\n }", "public List<ChunkData> getAccess() {\n return access;\n }", "@Override\n public String toString() {\n return \"Property{\" +\n \"boardPosition=\" + boardPosition +\n \", name='\" + name + '\\'' +\n \", value=\" + value +\n \", rentPrice=\" + rentPrice +\n \", mortgagePrice=\" + mortgagePrice +\n \", isMortgaged=\" + isMortgaged +\n \", redeemPrice=\" + redeemPrice +\n '}';\n }", "public AccessRights getAccessRights() {\r\n\t\treturn accessRights;\r\n\t}", "public int getAccessLevel() {\n return 0;\r\n }", "public interface Property extends Assignable\n{\n\t/**\n\t * Property name\n\t */\n\tString getName();\n\n\t/**\n\t * Type.\n\t * \n\t * If this is a getter, the returned value is the getter's return type.\n\t * If this is a setter, the returned value is the type of the input argument of the setter.\n\t */\n\tType getType();\n\n /**\n * [InstanceType]\n *\n * @return null if the instance type metadata is not available or if the\n * instance type is not specified.\n */\n Type getInstanceType();\n\n\t/**\n\t * Is this read only?\n\t */\n\tboolean readOnly();\n\n /**\n\t *\n\t */\n\tboolean hasPublic();\n\n // metadata\n\n\t/**\n\t * [Inspectable]\n\t */\n\tInspectable getInspectable();\n\n\t/**\n\t * [CollapseWhiteSpace]\n\t */\n\tboolean collapseWhiteSpace();\n\n /**\n * [RichTextContent]\n */\n boolean richTextContent();\n\n\t/**\n\t * [Deprecated]\n\t */\n\tDeprecated getDeprecated();\n\n\t/**\n\t * [ChangeEvent]\n\t */\n\tboolean hasChangeEvent(String name);\n\n\n\t/**\n\t * [PercentProxy]\n\t */\n\tString getPercentProxy();\n}", "@Override\r\n\tpublic String getFormat() {\r\n\t\treturn \"properties\";\r\n\t}", "public int getAccessType() {\n return accessType;\n }", "public boolean isProperty();", "public String getInheritedAccess()\n\t\t{\n\t\t\treturn m_inheritedAccess;\n\t\t}", "public ObjectProperties getObjectProperties();", "public Object getProperties() {\n return this.properties;\n }", "public AccessType getAccessType() {\n return accessType;\n }", "public AccessType getAccessType() {\n return accessType;\n }", "public Long getAccessId() {\n\t\treturn this.accessId;\n\t}", "@Override\n public String getStudyAccess() throws WdkModelException, WdkUserException {\n return \"public\";\n }", "public List<IPropertyDescriptor<T>> getProperties();", "List<springfox.documentation.schema.ModelProperty> properties(ModelContext context);", "public PropertySet getViewProperties() {\r\n return prefs;\r\n }", "protected String getPropertyStrings() {\n\t\treturn \"Active:\" + activeProperty().getValue() + \", FromDataset:\" + isFromDataset() + \", Modified:\" + isModified();\n\t}", "public String getPublicPropertyForm( Presentation presentation );", "private PropertyPagePropertyDescriptor getPropertyDescriptor() {\n \t\treturn propertyDescriptor;\n \t}", "public Collection<ModuleProperty> getProperties();", "public AccessType getAccessType() {\n\treturn this.accessType;\n }", "public String apiAccessLevel() {\n return this.apiAccessLevel;\n }", "public int getAccess()\n {\n ensureLoaded();\n return m_flags.getAccess();\n }", "PropertyInfo getPropertyInfo();", "@Override\n public String toString() {\n // using String.format to display out put value and infomation of Property\n return String.format(\n \"\\nCoordinates: %d, %d\\n\" + \"Length: %d m Width: %d m\\n\" + \"Registrant: #%d\\nArea: %d m2\\n\"\n + \"Property Taxes : $%.1f\",\n this.getXLeft(), this.getYTop(), this.getXLength(), this.getYWidth(), this.getRegNum(), this.getArea(),\n this.getTaxes());\n }", "PropertyRealization createPropertyRealization();", "public String getAccessionNumber()\n {\n return accessionNumber;\n }", "public void showProperties() {\n if ( _project != null ) {\n AntelopeProperties ap = new AntelopeProperties( this );\n ap.showProperties( _project );\n }\n }", "public BasicAttributesGrammarAccess.EBooleanElements getEBooleanAccess() {\n\t\treturn gaBasicAttributes.getEBooleanAccess();\n\t}", "public PropertyDescriptor[] getPropertyDescriptors() {\n\tPropertyDescriptor[] pd = new PropertyDescriptor[3];\n\ttry {\n\t\tpd [0] = new PropertyDescriptor(\"name\", RateTypeAccessBean.class);\n\t\tpd [1] = new PropertyDescriptor(\"ratetype\", RateTypeAccessBean.class);\n\t\tpd [2] = new PropertyDescriptor(\"basecurrency\", RateTypeAccessBean.class, \"getBasecurrency\", null);\n\t\treturn pd;\n\t} catch (IntrospectionException ex) {\n\t\tex.printStackTrace(System.out);\n\t}\n\treturn null;\n}", "public Object getReadWriteObjectProperty() {\r\n return readWriteObjectProperty;\r\n }", "public int getPropertyShowMode()\n {\n return propertyShowMode;\n }", "public boolean isAssocProperty();", "@Override\r\n public String toString() {\r\n return this.objectName + \"{Name: \" + this.getName() + \", index: \" + this.getIndexList() + \", Measured m/z: \" + this.getMeasureValues() + \", Intensities: \" + this.getItensityValues() + \"}\";\r\n }", "@Schema(description = \"Operations the current user is able to perform on this object\")\n public Map<String, Boolean> getCan() {\n return can;\n }", "public String getAccesslevel() {\n\t\treturn adminLevel;\r\n\t}", "interface PropertyInfo {}", "@JsonProperty(\"dataAccessRole\")\n public String getDataAccessRole() {\n return dataAccessRole;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<PropertyItem> getModelData() {\n\t\treturn mProperties;\n\t}", "public interface IPropertyInfo extends IAttributedFeatureInfo, IIntrinsicTypeReference\n{\n /**\n * @return true if the property is readable given the visibility constraint passed in,\n * false otherwise.\n */\n public boolean isReadable();\n\n /**\n * @return True if the property is writable given the visibility constraint passed in,\n * false otherwise.\n */\n public boolean isWritable();\n\n /**\n * @param whosAskin The type querying the property writability. For example, passing in the type the property is on will\n * allow properties that have private access in the setter to be written to. Passing in an unrelated type will only\n * allow properties that are public to be written to.\n *\n * @return True if the property is writable given the visibility constraint passed in,\n * false otherwise.\n */\n public boolean isWritable( IType whosAskin );\n\n /**\n * @return the PropertyAccessor (for getting and setting) this property.\n */\n public IPropertyAccessor getAccessor();\n\n public IPresentationInfo getPresentationInfo();\n}", "public java.lang.String getContactAccessId() {\r\n return contactAccessId;\r\n }", "public static String getPropertyAccessMethodName(String property) {\r\n if (\"this\".equals(property))\r\n return \"this\";\r\n return \"get\" + property.substring(0, 1).toUpperCase(Locale.ENGLISH) + property.substring(1);\r\n }", "public RoleElements getRoleAccess() {\n\t\treturn pRole;\n\t}", "public final long getAccessDateTime() {\n \treturn m_accessDate;\n }", "public AccessSymbol(AccessExpression ae) {\n base = parse(ae.getLHS());\n //member = ((Identifier)ae.getRHS()).getSymbol();\n member = SymbolTools.getSymbolOf(ae.getRHS());\n // This modification is not necessary for a valid access expression but\n // points-to analysis sometimes passes an expression normalized to some\n // form not conforming C standard (for internal use).\n // This is converted to invisible symbol.\n if (ae.getOperator() == AccessOperator.POINTER_ACCESS) {\n if (ae.getLHS() instanceof UnaryExpression &&\n ((UnaryExpression)ae.getLHS()).getOperator() ==\n UnaryOperator.ADDRESS_OF) {\n ;\n } else {\n base = new DerefSymbol(base);\n }\n }\n buildName();\n }", "public String getProperty();", "public static List<DisplayProperty> getDisplayProperties() {return DISPLAY_PROPERTIES;}", "@Override\n public String toString() {\n StringBuilder buff = new StringBuilder();\n\n buff.append(this.getClass().getSimpleName()).append(\": \");\n buff.append(\" ics:\");\n buff.append(this.initialCaseSignificantProperty.get());\n buff.append(\" lang:\");\n buff.append(\"'\").append(this.languageProperty.get()).append(\"'\");\n buff.append(\" text:\");\n buff.append(\"'\").append(this.textProperty.get()).append(\"'\");\n buff.append(super.toString());\n\n return buff.toString();\n }", "public ModelElements getModelAccess() {\n\t\treturn pModel;\n\t}", "@Kroll.getProperty(name = \"properties\")\n public KrollDict getRevisionProperties() {\n return super.getRevisionProperties();\n }", "protected int get_AccessLevel() {\n\t\treturn accessLevel.intValue();\n\t}", "protected int get_AccessLevel() {\n\t\treturn accessLevel.intValue();\n\t}", "protected int get_AccessLevel() {\n\t\treturn accessLevel.intValue();\n\t}", "protected int get_AccessLevel() {\n\t\treturn accessLevel.intValue();\n\t}", "public interface XcdlAccess {\n /**\n * @return Possibly nested lists of properties, extracted from the XCDL file and wrapped into a CharacterizeResult\n * (which can be used with the {@link CompareProperties} interface). Note that this only returns a\n * restricted part of the XCDL. For complete access to the XCDL, use {@link XcdlParser}.\n */\n CharacteriseResult getCharacteriseResult();\n}", "@ApiModelProperty(value = \"Operations the current user is able to perform on this object\")\n public Map<String, Boolean> getCan() {\n return can;\n }", "public abstract List<PropertyType> getBuiltInProperties();", "public Boolean getCanEdit() {\r\n return getAttributeAsBoolean(\"canEdit\");\r\n }", "public String toString() {\n return super.toString() + \",\" + m_props.size();\n }", "public interface IGLProperty extends Cloneable {\n /** Obtain the type of the property. */\n GLStateType getType();\n\n /** Is this a composite property?\n * @return true if it is a list or structure of properties,\n * false if it is a leaf level atomic property\n * */\n boolean isComposite();\n\n /**\n * Is the currently set value the default?\n * @return true if current value matches the default (initial) value\n */\n boolean isDefault();\n\n /** Set the current value for this property. */\n void setValue(Object value);\n\n /** Get the current value for this property. */\n Object getValue();\n\n /** Get the string representation for this property. */\n String getStringValue();\n\n /**\n * Get the parent property that holds this property.\n * @return null if this property is at the top level, parent otherwise\n */\n IGLProperty getParent();\n\n /** Set the parent property that holds this property. */\n void setParent(IGLProperty parent);\n\n /** Deep clone this property. */\n IGLProperty clone();\n\n /** Pretty print current property value to the given writer. */\n void prettyPrint(StatePrettyPrinter pp);\n}", "public String getappAccess() {\n\t\treturn _appAccess;\n\t}", "public String toString(){\r\n\t\tString output = \"\";\r\n\t\tfor (int i=0; i<MAX_PROPERTY;i++) {\r\n\t\t\tif(properties[i]==null){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\toutput += properties[i].toString()+\"\\n\";\r\n\t\t}\r\n\t\treturn \"List of the properties for \"+name+\", taxID: \"+taxID+\r\n\t\t\t\t\"\\n___________________________________\\n\"+output+\"\\n\"\r\n\t\t\t\t\t\t+ \"___________________________________\\ntotal \"\r\n\t\t\t\t\t\t+ \"management Fee: \"+(totalRent()*mgmFeePer/100);\r\n\t}", "public ColorElements getColorAccess() {\n\t\treturn eColor;\n\t}", "Property getProperty();", "Property getProperty();", "public String getPropertyName();", "public interface UnitTypeProperties extends PropertyAccess<UnitTypeDTO> {\n @Editor.Path(\"id\")\n ModelKeyProvider<UnitTypeDTO> key();\n ValueProvider<UnitTypeDTO, String> id();\n ValueProvider<UnitTypeDTO, String> name();\n @Editor.Path(\"name\")\n LabelProvider<UnitTypeDTO> nameLabel();\n}" ]
[ "0.66635823", "0.6441124", "0.6364489", "0.6204191", "0.6164468", "0.6164468", "0.60362", "0.6020017", "0.59767365", "0.5963797", "0.5955452", "0.5861776", "0.5826062", "0.5825384", "0.5814209", "0.58084494", "0.57188106", "0.5695802", "0.5677385", "0.5667108", "0.56629014", "0.56525743", "0.5635958", "0.56244266", "0.5609999", "0.5580351", "0.5571376", "0.55474466", "0.554631", "0.55323136", "0.55050194", "0.54953796", "0.5490243", "0.5478353", "0.5467679", "0.54370445", "0.54254735", "0.54234594", "0.54097205", "0.5394571", "0.5389099", "0.53707844", "0.53558373", "0.5350425", "0.5350425", "0.53302664", "0.53167635", "0.5314354", "0.5312602", "0.5308638", "0.53074247", "0.52977115", "0.52949774", "0.52935225", "0.52705383", "0.5266162", "0.5260338", "0.52547073", "0.52521515", "0.52472985", "0.5231632", "0.52248263", "0.52240664", "0.522006", "0.5219575", "0.52173275", "0.52153504", "0.5212862", "0.5210299", "0.5208983", "0.5201055", "0.5186769", "0.5184538", "0.51829565", "0.51774627", "0.516813", "0.5167439", "0.5167166", "0.51668864", "0.5164792", "0.51611894", "0.5158818", "0.5153516", "0.5141576", "0.5141378", "0.5141378", "0.5141378", "0.5141378", "0.5137757", "0.5137612", "0.51278734", "0.51258296", "0.5115752", "0.51152503", "0.5107509", "0.5100777", "0.510062", "0.50921404", "0.50921404", "0.5090457", "0.5089121" ]
0.0
-1
deactivate timer to enable dragging
@Override public void onFinish() { timerActive=false; //play sound on finish //instead of MainActivity.this, we can also use getApplicationContext() MediaPlayer mPlayer = MediaPlayer.create(MainActivity.this,R.raw.airhorn); mPlayer.start(); bview.setText("GO"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void setNotDraging(){isDraging=false;}", "private void stopDragging() {\n setDragging(false);\n mouseX = mouseY = prevX = prevY = 0;\n }", "void onStopTrackingTouch() {\n mIsDragging = false;\n }", "void onStopTrackingTouch() {\n mIsDragging = false;\n }", "public void stopTimer() {\n maxAccelOutput.setText(String.valueOf(maxAccel));\n timeHandler.removeCallbacks(startTimer);\n startButton.setText(R.string.go_button);\n isRunning = false;\n }", "public void deactivate () {\n\t\tif (_timer!=null) {\n\t\t\t_timer.cancel ();\n\t\t\t_timer.purge ();\n\t\t\t_timer = null;\n\t\t}\n\t}", "void stopUpdateTimer();", "public static void stopTimer() {\n timerIsWorking = false;\r\n elapsedTime = 0;\r\n }", "private void stopTime()\n {\n timer.stop();\n }", "public void stop() {timer.stop();}", "public void stopAndRemove() {\n\t\tstartMoveDownTimer.stop();\n\t\tmoveDownTimer.stop();\n\t}", "public void stopTimer(){\n this.timer.cancel();\n }", "public void stopTime() {\n if (isRunning) {\n timer.cancel();\n timer.purge();\n }\n isRunning = false;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(!timer.isRunning()){timer.start();jbtAuto.setText(\"Stop\");}\n\t\t\t\telse{\n\t\t\t\t\ttimer.stop();jbtAuto.setText(\"Start\");\n\t\t\t\t}\n\t\t\t}", "protected synchronized void startUpdateSuppressTimer(){\n AbstractWidgetProperty pvValueProperty =\n editpart.getWidgetModel().getProperty(controlPVValuePropId);\n pvValueListeners = pvValueProperty.getAllPropertyChangeListeners();\n pvValueProperty.removeAllPropertyChangeListeners();\n updateSuppressTimer.start(timerTask, getUpdateSuppressTime());\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n return timerActive;\n }", "private void StopTime() {\n timer.stop();\n currentHora = 0;\n currentMinuto = 0;\n currentSegundo = 0;\n lbcronometro.setText(\"00:00:00\");\n }", "private void pauseTimer() {\n myTimer.stop();\n disableGamePlayKeys();\n repaint();\n }", "public void stopClick (View view){\n \tmHandler.removeCallbacks(startTimer);\n \tstopped = true;\n \thideStopButton();\n }", "protected abstract void off(ACATimer handle_);", "public void\nstopTimer() {\n\t\n\tSystemDesign.logInfo(\"MetroParams.stopTimer: Killing annealing timer.\");\n\t\n\tif (metroTimer_ != null) {\n metroTimer_.stopPlease();\n\t metroTimer_ = null;\n }\n\tmetroThread_ = null;\n}", "public void resetTimer(){\n timerStarted = 0;\n }", "public void autoSwipeViews() {\n mTimer = new Timer();\n mTimer.scheduleAtFixedRate(new SliderTimer(), 10000, 10000);\n }", "void onStartTrackingTouch() {\n mIsDragging = true;\n }", "void onStartTrackingTouch() {\n mIsDragging = true;\n }", "public void stopTimer()\n {\n timer.cancel();\n }", "@Override\r\n\t\t public void run() {\r\n\t\t\t\tPlatform.runLater(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t \t timerLabel.setText(\"Time left: \" + countDown);\r\n\t\t countDown--;\r\n\t\t if (countDown < 0){timer.cancel();}\r\n\t\t\t}});}", "@Override\n public void nativeMouseDragged(NativeMouseEvent nme) {\n if (Var.timerStart) {\n txtMouse.setText(\"Mouse Dragged: \" + nme.getX() + \", \" + nme.getY());\n Var.mDrags++;\n }\n }", "@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }", "public void disable(){\r\n\t\tthis.activ = false;\r\n\t}", "public void stopTimer() {\n\t\trunFlag = false;\n\t\tses.shutdown();\n\t\tSystem.err.println(\"TIMER SHUTDOWN\");\n\t\tinstance = null;\n\t}", "public void pleaseStop()\n {\n\t this.doorgaan_thread = false;\n\t this.doorgaan_wheel = true;\n draad = null; // waarom? \n }", "private void stop() {\n timer.cancel();\n timer = null;\n }", "public void stop(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t\tmakeTimer();\n\t}", "private void cancelTimer() {\n Timer.cancelTimeout(this);\n responded = true;\n }", "@Override\n public void start(Stage stage) throws Exception {\n StackPane pane = new StackPane();\n Button sendMove = new Button(\"Send Move\");\n Button receiveMove = new Button(\"Wait(Received_Move)\");\n Button stopAll = new Button(\"Stop All\");\n Label label2 = new Label();\n Label label1 = new Label();\n Label label3 = new Label();\n Label label4 = new Label();\n VBox hbox = new VBox(label4, label1, label2, label3);\n hbox.setSpacing(15);\n VBox box = new VBox(sendMove, receiveMove, stopAll, hbox);\n box.setSpacing(15);\n\n pane.getChildren().addAll(box);\n Scene scene = new Scene(pane, 500, 500);\n\n long veryInitialTime = System.currentTimeMillis();\n// clickedTime = veryInitialTime;\n backgroundStopWatch.schedule(new TimerTask() {\n public void run() {\n Platform.runLater(new Runnable() {\n public void run() {\n// timer2.cancel();\n label4.setText(String.valueOf(System.currentTimeMillis() - veryInitialTime));//+ (System.currentTimeMillis() - initialTimer));\n\n }\n });\n }\n }, 0, 500);\n\n receiveMove.setOnAction((event) -> {\n// delChange += delTimer;\n// delChange = 5000;\n\n clickedTime = System.currentTimeMillis();\n\n waitingForMyMoveStopWatch.cancel();\n waitingForReceiverMoveStopWatch = new Timer();\n// clickedTime = System.currentTimeMillis();\n\n waitingForReceiverMoveStopWatch.schedule(new TimerTask() {\n public void run() {\n Platform.runLater(new Runnable() {\n public void run() {\n// timer2.cancel();\n label3.setText(\"(Do after receiving Move)My Move timer ... (my Move) ...\" + String.valueOf(System.currentTimeMillis() - clickedTime));//+ (System.currentTimeMillis() - initialTimer));\n\n }\n });\n }\n }, 0, 500);\n// clickedTime = System.currentTimeMillis();\n// System.out.println(\"Button1 .. delTimer .. \" + delTimer + \" .. delChange .. \" + delChange);\n toDoTaskTimer.cancel();\n toDoTaskTimer = new Timer();\n toDoTaskTimer.schedule(new TimerTask() {\n public void run() {\n Platform.runLater(new Runnable() {\n public void run() {\n waitingForReceiverMoveStopWatch.cancel();\n// backgroundStopWatch.cancel();\n label3.setText(\"I didn't make move ... YOU LOSE AFTER (time) (to do)10s \");//+ (System.currentTimeMillis() - initialTimer));\n\n// label3.setText(\"(Move not received in due time) (time) (to do)10s \");//+ (System.currentTimeMillis() - initialTimer));\n }\n });\n }\n }, delChange);\n });\n\n sendMove.setOnAction((event) -> {\n// delChange = 5000;\n clickedTime = System.currentTimeMillis();\n waitingForReceiverMoveStopWatch.cancel();\n waitingForMyMoveStopWatch = new Timer();\n waitingForMyMoveStopWatch.schedule(new TimerTask() {\n public void run() {\n Platform.runLater(new Runnable() {\n public void run() {\n// timer2.cancel();\n label2.setText(\"(Do After Send MyMove) (waiting for opponentMove) ...\" + String.valueOf(System.currentTimeMillis() - clickedTime));//+ (System.currentTimeMillis() - initialTimer));\n\n }\n });\n }\n }, 0, 500);\n// System.out.println(\"Button2 .. delTimer .. \" + delTimer + \" .. delChange .. \" + delChange);\n toDoTaskTimer.cancel();\n toDoTaskTimer = new Timer();\n toDoTaskTimer.schedule(new TimerTask() {\n public void run() {\n Platform.runLater(new Runnable() {\n public void run() {\n waitingForMyMoveStopWatch.cancel();\n// backgroundStopWatch.cancel();\n// label3.setText(\"I didn't make move ... YOU LOSE AFTER (time) (to do)10s \");//+ (System.currentTimeMillis() - initialTimer));\n label2.setText(\"(Move not received in due time) (time) (to do)10s \");//+ (System.currentTimeMillis() - initialTimer));\n\n }\n });\n }\n }, delChange);\n });\n\n stopAll.setOnAction((event) -> {\n// toDoTaskTimer.cancel();\n// backgroundStopWatch.cancel();\n// waitingForReceiverMoveStopWatch.cancel();\n// sendMove.fi\n });\n stage.setScene(scene);\n stage.show();\n\n }", "public void restartRobotUI() {\r\n\t\tt.cancel();\r\n\t\tt.purge();\r\n\t\tt = new Timer();\r\n\t}", "private void setInDragging(boolean inDragging) {\n delayCursorUpdates = inDragging;\n this.inDragging = inDragging;\n }", "public void stopTimer(){\n logger.trace(\"Sensor/\" + getModel().getId() + \" timer stopped\");\n if(newTimer != null && timerTask != null){\n timerTask.cancel();\n newTimer.purge();\n timerTask = null;\n }\n }", "public void detonate()\r\n\t{\r\n\t\tdetonated = true;\r\n\t}", "private synchronized void reStartTimer(){\n handler.removeCallbacks(null);\n handler.postDelayed(new Runnable(){\n @Override\n public void run(){\n if (running) reStartTimer();\n update();\n }\n }, TURN_DELAY_MILLIS);\n }", "private void setTimeLeft() {\n\t\tif (timeLeft == 1)\n\t\t\ttimer.cancel();\n\t\ttimeLeft--;\n\t}", "public void stoptimertask() {\n if (timer != null) {\r\n timer.cancel();\r\n timer = null;\r\n }}", "public void vanish() {\n\t\t\r\n\t\tlpanel.addMouseMotionListener(new MouseAdapter() {\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tchecker.setEnabled(false);\r\n\t\t\t\tchecker.setVisible(false);\r\n\t\t\t\trequestL.setEnabled(false);\r\n\t\t\t\trequestL.setVisible(false);\r\n\t\t\t\tpatientL.setEnabled(false);\r\n\t\t\t\tpatientL.setVisible(false);\r\n\t\t\t\treport.setEnabled(false);\r\n\t\t\t\treport.setVisible(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t}", "public void stop(){\n executor.shutdown();\n active = false;\n \n tSec.setEditable(true);\n tMin.setEditable(true);\n tHours.setEditable(true);\n }", "public void setTimer() {\n\t\t\n\t}", "void unsetTimeInterval();", "private void startNewTimer(){\n timer.cancel();\n timer = null;\n timesUp();\n timer = new MainGameTimer(this);\n timer.startNewRoundCountDown();\n }", "@Override\n\tpublic void setTimer(Double d) {\n\t\t\n\t}", "public boolean onDragStarted();", "private void startTimer(){\n scoreboard.disableStart(true);\n timer.scheduleAtFixedRate(new TimerTask(){\n @Override\n public void run(){\n Platform.runLater(new Runnable(){\n @Override\n public void run() {\n scoreboard.updateTime();\n }\n });\n }\n },0,1000);\n }", "protected boolean setOffTimerReservationSetting(byte[] edt) {return false;}", "public void setDragEnabled(boolean enabled) { \n \tthis.dragEnabled = enabled; \n \t}", "public void stop() {\n\t\tthis.timer.cancel();\n\t}", "private void removeTimeListeners()\n {\n myProcessorBuilder.getTimeManager().removeActiveTimeSpanChangeListener(myActiveTimeSpanChangeListener);\n myProcessorBuilder.getAnimationManager().removeAnimationChangeListener(myAnimationListener);\n myTimeAgnostic = true;\n }", "private void stopUpdateTimer() {\n\t\tif (completionUpdateTimer != null) {\n\t\t\tcompletionUpdateTimer.cancel();\n\t\t\tcompletionUpdateTimer = null;\n\t\t}\n\t}", "public void stop(){\n if (this.isActive()) {\n this.setEndTime(Calendar.getInstance());\n this.setTotalSeconds();\n this.setActive(false);\n }\n \n }", "public void stopTimer() {\n if (mHandler != null) {\n mHandler.removeCallbacks(mStatusChecker);\n }\n }", "public void disableStartButton(boolean b){\n start.setDisable(b);\n }", "public void stop() {\n timer.stop();\n }", "@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tisMoved = false;\n\t}", "public void stop() {\n\t\t_timer.cancel();\n\t}", "public void stopTimerTask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "@FXML\n private void stopMoving(){\n\n Main.gang.setMoving(false);\n drivingTransition.stop();\n updateGUI();\n }", "@Override\n public void stop() {\n GameManager.getInstance().stopTimer();\n }", "public void deactivateInterArrivalTimeTally() {\n\t\tthis._interArrivalTimeActivated = false;\n\t}", "public void cancelDragging(MouseEvent mouseEvent) \r\n\t{\r\n\t\t\r\n\t\t// Reset the old cursor.\r\n\t\tcursorManager.resetCursor();\r\n\r\n\t\t// Clean up what was painted for dragging.\r\n\t\tclearPainting();\r\n\t\t\r\n\t\t// No dragging anymore.\r\n\t\treset();\r\n\r\n\t}", "public synchronized void postDeregister() {\n if (timer != null) {\n try {\n timer.cancel();\n } catch (Exception x) {\n if (LOG.isLoggable(Level.FINEST))\n LOG.log(Level.FINEST,\"Failed to cancel timer\",x);\n else if (LOG.isLoggable(Level.FINE))\n LOG.fine(\"Failed to cancel timer: \"+x);\n } finally {\n timer = null;\n }\n }\n }", "public void disableEndTurnButton(){\n\n this.endTurnButton.setEnabled(false);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"timertest1\");\n\t\t\t\ttimer.cancel();\n\n\t\t\t}", "@SuppressWarnings(\"unused\")\n public void setNotifyWhileDragging(boolean flag) {\n this.notifyWhileDragging = flag;\n }", "@Override\n public void disableEndTurnButton() {\n gameboardPanel.disableEndTurnButton();\n }", "public void stopAnim() {\n // stop the timer\n t.stop();\n }", "public void timeRangeChanged() {\r\n\t\tif (ctrlPressed) {\r\n\t\t\ttimeRangeChangedWhileCtrlPressed=true;\r\n\t\t} else {\r\n\t\t\tregenView();\r\n\t\t}\r\n\t}", "private void startTimer() {\n myTimer.start();\n enableGamePlayKeys();\n repaint();\n }", "public void transitionToTimer(boolean isShow) {\n }", "private void formMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseDragged\n \n /*Pon la bandera para saber que ya hubó un evento y no se desloguie*/\n bIdle = true;\n \n }", "private void formMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseDragged\n \n /*Pon la bandera para saber que ya hubó un evento y no se desloguie*/\n bIdle = true;\n \n }", "public static void startTimeout() {\n t = new Timer();\n tt = new TimerTask() {\n\n public void run() {\n while (true) {\n if (diff[0] > 0 || diff[1] > 0) {\n try {\n runFocusPoint();\n Thread.sleep(50);\n } catch (InterruptedException ex) {\n //ex.printStackTrace();\n }\n } else {\n break;\n }\n }\n cancelTask();\n diff[0] = 0;\n diff[1] = 0;\n }\n };\n t.scheduleAtFixedRate(tt, 0, 50);\n }", "@Override\r\n public void removeUpdate(DocumentEvent e) {\n ActivoTimer();\r\n }", "@Override\n public void pause(){\n view.pauseHide();\n if (isRunning){\n timer.stopTimer();\n isRunning = false;\n }else{\n timer.startTimer();\n isRunning = true;\n }\n }", "void cancelTimeout() {\n timer.cancel();\n }", "private void turnOffDelayTimer(int runTimeId)\n\t{\n Thread worker = new Thread() {\n \t \n public void run(){\n \n try\n { \n \tThread.sleep(1000*60); //1 minutes delay\n }\n catch(InterruptedException ex){}\n\n SwingUtilities.invokeLater( new Runnable()\n {\n public void run()\n {\n \t //if sprinkler,\n \t if(isSprinklerSelected)\n \t {\n\t \t //turn off sprinkler after a fixed time\n\t \t\t\t\n\t \t\t\t//set status=off if sprinkler is ON\n\t \t if(sprinklerService.getSprinklerByName(selectedId).getSprinklerStatus().equals(SprinklerStatus.ON.toString()))\n\t \t sprinklerService.updateSprinklerStatus(selectedId, SprinklerStatus.OFF.toString());\n\t \t\t\t//update sprinklerRunTime end_time=currenttime\n\t \t sprinklerService.updateSprinklerRunTime(runTimeId);\n \t }\n \t else//group\n \t {\n \t\t //turn off group after a fixed time\n \t\t \n \t\t //set status=off if group is ON\n \t\t SprinklerGroup gService=new SprinklerGroup();\n \t\t if(gService.getSprinklerGroupByName(selectedId).getStatus().equals(SprinklerStatus.ON.toString()))\n \t\t {\n \t\t\t \n \t\t\t gService.updateSprinklerGroupStatus(selectedId, SprinklerStatus.OFF.toString());\n \t\t\t //update groupRunTime end_time=currenttime\n \t\t\t sprinklerService.updateGroupRunTime(runTimeId);\n \t\t }\n \t\t \n \t }\n \t \n }\n });\n }\n };\n\n worker.start(); \n\n \t\n\t}", "private void draggedWay(MouseEvent e) {\r\n if (e.getModifiers() >= MouseEvent.BUTTON1_MASK) {\r\n wayTool.setSeccondPoint(e.getPoint());\r\n }\r\n }", "@Override\r\n\tpublic void freezeTimer() {\n\t\t\r\n\t}", "public void resetTimeActive()\n\t{\n\t\tm_TimeActive = 0.0f;\n\t}", "private void startTimerAfterCountDown() {\n \t\thandler = new Handler();\n \t\tprepareTimeCountingHandler();\n \t\thandler.post(new CounterRunnable(COUNT_DOWN_TIME));\n \t}", "@Override\n protected void onPause() {\n super.onPause();\n timer.cancel();\n timer.purge();\n }", "private void setTimer() {\r\n timer = new Timer(TIMER_DELAY, new ActionListener() {\r\n public void actionPerformed(ActionEvent ae) {\r\n action();\r\n }\r\n });\r\n }", "@Override\n public void nativeMouseReleased(NativeMouseEvent nme) {\n if (Var.timerStart) {\n txtMouse.setText(\"Mouse Released: \" + nme.getButton());\n }\n }", "public void startCountDown() {\r\n\t\ttimerLabel = new TextField();\r\n\t\tif(timer!=null){timer.cancel();}\r\n\t\ttimer = new Timer();\r\n\t\ttimerLabel.setStyle(\"-fx-text-fill:white\");\r\n\t\ttimerLabel.setFont(Font.font(\"Verdana\", FontWeight.BOLD, 15));\r\n\t\ttimerLabel.setBackground(Background.EMPTY);\r\n\t\ttimerLabel.setAlignment(Pos.TOP_RIGHT);\r\n\t\ttimerLabel.setEditable(false);\r\n\t\ttowersRegion.getChildren().add(2, timerLabel);\r\n\t\tcountDownRunning = true; // indicate that counting down started\r\n\t\t\t\r\n\t\ttimer.schedule(new TimerTask() { // timer task to update the seconds\r\n\t\t\t@Override\r\n\t\t public void run() {\r\n\t\t\t\tPlatform.runLater(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t \t timerLabel.setText(\"Time left: \" + countDown);\r\n\t\t countDown--;\r\n\t\t if (countDown < 0){timer.cancel();}\r\n\t\t\t}});}}, 1000, 1000); //Every 1 second\r\n\t\t \r\n\t\t timeline = new Timeline(new KeyFrame( // create a time line to remove the special brick effect after 7 seconds\r\n\t\t\t\t \t\tDuration.seconds(7), ae -> { removeEffectFromSpecialBrick();})); // lambda style\r\n\t\t timeline.play();\r\n\t}", "@FXML\r\n\t void countDown() throws InterruptedException {\n\t\t\t countDownTimer.setVisible(true); // \"timer\" is a Text Object on screen\r\n\t\t\t text = countDownTimer.getText();\r\n\t\t\t timeSeconds = Integer.parseInt(text);\r\n\t\t\t keyboardOff = false;\r\n\t\t\t \r\n\t\t\t Timer clock = new Timer();\r\n\t\t\t clock.scheduleAtFixedRate(new TimerTask() {\r\n\t\t\t public void run() {\r\n\t\t\t if(timeSeconds >= 0)\r\n\t\t\t {\r\n\t\t\t countDownTimer.setText(Integer.toString(timeSeconds));\r\n\t\t\t timeSeconds--; \r\n\t\t\t \r\n\t\t\t if(timeSeconds==0) keyboardOff=true;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t clock.cancel();\r\n\t\t\t try {\r\n\t\t\t\t\t\t\t\t\tturn2Start();\r\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t }, 1000,1000);\r\n\t }", "public void cancel() {\n timer.cancel();\n timer = new Timer();\n }", "public void beginTimer(View view) {\n if (!isRunning) {\n isRunning = true;\n startButton.setText(R.string.stop_text);\n startTime = System.currentTimeMillis();\n timeHandler.removeCallbacks(startTimer);\n timeHandler.postDelayed(startTimer, 0);\n } else {\n startButton.setText(R.string.go_button);\n stopTimer();\n }\n }", "private static void timerTest1() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"timertest1\");\n\t\t\t\ttimer.cancel();\n\n\t\t\t}\n\t\t}, 2000);\n\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n// timer.cancel();\n }", "public void resetDrag(){\n\t\tsetCurrentPosition( new Point(0,0) );\n\t\tsetScale(1);\n\t\tlengthsYShift = defaultYShift;\n\t}", "public void onDragEnded();", "public BtnOnOffListener(){\r\n\t\t\t\t\r\n\t\t\tprocessGestureEventHelper( false);\r\n\t\t}", "public void endTimer(){\n timer.cancel();\n }", "public void stopTimer() {\r\n running = false;\r\n try {\r\n if (timerThread != null && timerThread.isAlive()) {\r\n timerThread.join();\r\n }\r\n } catch (Exception ie) {\r\n }\r\n }" ]
[ "0.7028392", "0.67832804", "0.6555451", "0.6555451", "0.65430844", "0.63436323", "0.6153943", "0.614459", "0.6120009", "0.59954077", "0.59628946", "0.59376884", "0.5904549", "0.58973217", "0.58955", "0.589176", "0.5828723", "0.5827547", "0.5815733", "0.5800899", "0.57925636", "0.57839674", "0.5761264", "0.57444364", "0.57444364", "0.57440645", "0.56869656", "0.56846166", "0.56697464", "0.56469584", "0.5641703", "0.56157017", "0.5613597", "0.5602445", "0.56000614", "0.55827725", "0.55818665", "0.55808485", "0.55729705", "0.5566276", "0.55567133", "0.5552814", "0.55485266", "0.5537559", "0.55295974", "0.55278444", "0.5524824", "0.5522246", "0.5516193", "0.5515465", "0.55114454", "0.5504244", "0.5503376", "0.5502865", "0.5501614", "0.5500441", "0.5494035", "0.54919183", "0.5491581", "0.5490385", "0.54876244", "0.5480816", "0.54748785", "0.5464956", "0.5463199", "0.54409385", "0.5440307", "0.5426661", "0.5422683", "0.5421068", "0.5407219", "0.54070807", "0.54049873", "0.54038996", "0.53972965", "0.5389031", "0.5388562", "0.5388562", "0.53864485", "0.53766125", "0.5375163", "0.5374896", "0.537309", "0.5369577", "0.53683525", "0.536655", "0.536625", "0.5363879", "0.53602743", "0.5359972", "0.53571063", "0.5354514", "0.53462803", "0.53420746", "0.5330877", "0.5325756", "0.53241277", "0.5317863", "0.53171235", "0.5315661", "0.5314612" ]
0.0
-1
true : cannot drag. ie widget is always on touch by event false: can drag
@Override public boolean onTouch(View v, MotionEvent event) { return timerActive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void setNotDraging(){isDraging=false;}", "public boolean canStartDrag()\n\t{\n\t\treturn !isDragging();\n\t}", "protected abstract boolean dragged();", "@Override\n\tpublic boolean touchDragged(int arg0, int arg1, int arg2) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int arg0, int arg1, int arg2) {\n\t\treturn false;\n\t}", "abstract boolean getIsDragging();", "@Override\n public boolean touchDragged(int screenX, int screenY, int pointer) {\n return false;\n }", "@Override\n public boolean touchDragged(int screenX, int screenY, int pointer) {\n return false;\n }", "@Override\n\t\t\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\t\t\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer)\n\t{\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean touchDragged(int screenX, int screenY, int pointer) {\n\t\treturn false;\n\t}", "public boolean onDragStarted();", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\tswitch (event.getAction()) {\n\t\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\t\tdgView.requestDisallowInterceptTouchEvent(true);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "public boolean isDragging()\n\t{\n\t\treturn dragged != null;\n\t}", "@Override\n public boolean touchDragged(final int screenX, final int screenY, final int pointer) {\n return false;\n }", "public boolean isDragEnabled() {\n return mDragEnabled;\n }", "public boolean isDragging( ) {\n\t\tif ( draggable ) {\n\t\t\tif ( dragging ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean dragFromSubComponents();", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n\n mGestureDetector.onTouchEvent(event);\n\n final int action = event.getActionMasked();\n final int x = (int) event.getRawX();\n final int y = (int) event.getRawY();\n\n switch (action) {\n case MotionEvent.ACTION_DOWN:\n mDownX = x;\n mDownY = y;\n mLastX = x;\n mLastY = y;\n mDragStarted = false;\n setPressed(true);\n break;\n\n case MotionEvent.ACTION_MOVE:\n int dx = x - mLastX;\n int dy = y - mLastY;\n mLastX = x;\n mLastY = y;\n\n if (!mDragStarted) {\n if (Math.abs(x - mDownX) > mTouchSlop || Math.abs(y - mDownY) > mTouchSlop) {\n mDragStarted = true;\n if (mCallbacks != null) {\n mCallbacks.onDragStart(x, y);\n }\n }\n }\n\n if (mDragStarted) {\n if (mCallbacks != null) {\n mCallbacks.onDrag(dx, dy);\n }\n }\n break;\n\n case MotionEvent.ACTION_CANCEL:\n case MotionEvent.ACTION_UP:\n setPressed(false);\n if (mCallbacks != null) {\n mCallbacks.onDragEnd(x, y);\n }\n break;\n\n default:\n break;\n }\n\n return true;\n }", "Boolean isTouchable();", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn false;\r\n\t}", "public static boolean useDragAndDrop() {\n\t\treturn (isMac() || isWindows() || isLinux() || isSolaris());\n\t}", "@Override\n public boolean dispatchTouchEvent(MotionEvent ev) {\n return DefaultApplication.isWaiting() ? false : super.dispatchTouchEvent(ev);\n }", "@Override\r\n\t\t\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n return false;\n }", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n return false;\n }", "public boolean isAllowedAsDragSource()\r\n\t{\r\n\t\treturn tree.getDragMode() == TreeDragMode.NODE;\r\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n return false;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n return false;\n }", "@DISPID(204)\r\n public boolean beginDrag() {\r\n throw new UnsupportedOperationException();\r\n }", "@Override\r\n\tpublic boolean isTouchLeftDown() {\n\t\treturn false;\r\n\t}", "@Override\n\t\t\t\tpublic boolean onTouch(View v, MotionEvent me) {\n\t\t\t\t\tint action = me.getAction();\n\t\t\t\t\t\n\t\t\t\t\tswitch(me.getAction()){\n\t\t\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t\t\tClipData data = ClipData.newPlainText(\"CREATErectangle\", \"hi\");\n\t\t\t\t\t DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(v);\n\t\t\t\t\t v.startDrag(data, shadowBuilder, v, 0);\n\t\t\t\t\t return true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@SuppressWarnings(\"deprecation\")\n protected boolean isDragPossible(MouseEvent e) {\n JTextComponent c = (JTextComponent)e.getSource();\n if (c.isEnabled()) {\n Caret caret = c.getCaret();\n int dot = caret.getDot();\n int mark = caret.getMark();\n if (dot != mark) {\n Point p = new Point(e.getX(), e.getY());\n int pos = c.viewToModel(p);\n\n int p0 = Math.min(dot, mark);\n int p1 = Math.max(dot, mark);\n if ((pos >= p0) && (pos < p1)) {\n return true;\n }\n }\n }\n return false;\n }", "@Override\n\tpublic boolean touchDragged(int x, int y, int pointer) {\n\t\tAction(Director.ACTION_TOUCH_DRAGED);\n\t\treturn false;\n\t}", "@SuppressLint(\"ClickableViewAccessibility\")\n\t\t\t@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\r\n\t\tpublic boolean onTouchEvent(MotionEvent event) {\n\r\n\t\t\treturn true;\r\n\t\t}", "@Override\n public boolean onDown(MotionEvent arg0) {\n return false;\n }", "void onStartTrackingTouch() {\n mIsDragging = true;\n }", "void onStartTrackingTouch() {\n mIsDragging = true;\n }", "public void mouseDrag(MouseEvent e, int x, int y) {\n // Do nothing.. \n }", "private void attemptClaimDrag() {\n if (getParent() != null) {\n getParent().requestDisallowInterceptTouchEvent(true);\n }\n }", "private void attemptClaimDrag() {\n if (getParent() != null) {\n getParent().requestDisallowInterceptTouchEvent(true);\n }\n }", "@Override\n public boolean onTouchEvent(MotionEvent ev) {\n return mDetector.onTouchEvent(ev) || super.onTouchEvent(ev);\n }", "void onStopTrackingTouch() {\n mIsDragging = false;\n }", "void onStopTrackingTouch() {\n mIsDragging = false;\n }", "@Override\n\t\tpublic boolean onDrag(View view, DragEvent dragEvent) {\n\t\t\tswitch (dragEvent.getAction()) {\n\t\t\tcase DragEvent.ACTION_DRAG_STARTED: //no action necessary\n\t\t break;\n\t\t case DragEvent.ACTION_DRAG_ENTERED: //no action necessary\n\t\t break;\n\t\t case DragEvent.ACTION_DRAG_EXITED: //no action necessary\n\t\t break;\n\t\t case DragEvent.ACTION_DROP:\n\t\t \tHelper.handleDragEvent(view, dragEvent, getApplicationContext()); //handle the drag event\n\t\t break;\n\t\t case DragEvent.ACTION_DRAG_ENDED: //no action necessary\n\t\t break;\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "private boolean startDrag(MotionEvent event) {\n if(dragging != null)\n {\n return false;\n }\n\n int x = ((int) event.getX() - targetOffsetX) / targetColumnWidth;\n int y = ((int) event.getY() - targetOffsetY) / targetRowHeight;\n\n if(x < 0 || x >= puzzleWidth || y < 0 || y >= puzzleHeight)\n {\n return false;\n }\n\n int direction = slidePuzzle.getDirection(x + puzzleWidth * y);\n\n if(direction >= 0)\n {\n dragging = new HashSet<Integer>();\n\n while(x + puzzleWidth * y != slidePuzzle.getHandleLocation())\n {\n dragging.add(x + puzzleWidth * y);\n dragStartX = (int) event.getX();\n dragStartY = (int) event.getY();\n dragOffsetX = 0;\n dragOffsetY = 0;\n dragDirection = direction;\n\n x -= PuzzleSlide.DIRECTION_X[direction];\n y -= PuzzleSlide.DIRECTION_Y[direction];\n }\n }\n\n dragInTarget = false;\n vibrate(VIBRATE_DRAG);\n\n return true;\n }", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\tif(event.getAction() == MotionEvent.ACTION_DOWN){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(event.getAction() == MotionEvent.ACTION_MOVE)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(event.getAction() == MotionEvent.ACTION_UP)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent me) {\n\t\t\t\tint action = me.getAction();\n\t\t\t\t\n\t\t\t\tswitch(me.getAction()){\n\t\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t\tClipData data = ClipData.newPlainText(\"CREATEobject\", \"hi\");\n\t\t\t\t DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(v);\n\t\t\t\t v.startDrag(data, shadowBuilder, v, 0);\n\t\t\t\t return true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "@Override\r\n\tpublic boolean onTouchEvent(final MotionEvent e) {\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n\t\t\tpublic boolean onTouch(View arg0, MotionEvent arg1) {\n\t\t\t\treturn true;\n\t\t\t}", "@Override\n public boolean onTouch(View v, MotionEvent arg1) {\n ClipData veri = ClipData.newPlainText(\"\", \"\");\n View.DragShadowBuilder golge = new View.DragShadowBuilder(yukari);\n v.startDrag(veri, golge, null, 0);\n return false;\n }", "@Override\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\treturn false; // was false\n\t}", "@Override\n public boolean onTouchEvent( MotionEvent event )\n {\n if ( gesture_detector.onTouchEvent( event ) )\n {\n return true;\n }\n else\n {\n return super.onTouchEvent( event );\n }\n }", "@Override\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n public void drag(int x, int y)\n {\n }", "@Override\r\n public boolean onTouchEvent(MotionEvent event) {\n return super.onTouchEvent(event);\r\n }", "@Override\n\tpublic boolean touchDown(float x, float y, int pointer, int button) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void touchDragged(int screenX, int screenY, int pointer) {\n\t\t\n\t}", "private void enableDrag() {\n final Delta dragDelta = new Delta();\n setOnMousePressed((MouseEvent mouseEvent) -> {\n // record a delta distance for the drag and drop operation.\n if(isDragEnabled) {\n dragDelta.x = getCenterX() - mouseEvent.getX();\n dragDelta.y = getCenterY() - mouseEvent.getY();\n }\n });\n setOnMouseDragged((MouseEvent mouseEvent) -> {\n if(isDragEnabled) {\n double newX = mouseEvent.getX() + dragDelta.x;\n if (newX > 0 && newX < getScene().getWidth()) {\n setCenterX(newX);\n if(this == base)\n startX = getCenterX();\n }\n double newY = mouseEvent.getY() + dragDelta.y;\n if (newY > 0 && newY < getScene().getHeight()) {\n setCenterY(newY);\n if(this == base)\n startY = getCenterY();\n }\n }\n });\n }", "@Override\n public boolean onTouch(View v, MotionEvent arg1) {\n ClipData veri = ClipData.newPlainText(\"\", \"\");\n View.DragShadowBuilder golge = new View.DragShadowBuilder(sol);\n v.startDrag(veri, golge, null, 0);\n return false;\n }", "@Override\n\t\t\t\tpublic boolean onDown(MotionEvent e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent me) {\n\t\t\t\tint action = me.getAction();\n\t\t\t\t\n\t\t\t\tswitch(me.getAction()){\n\t\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t\tClipData data = ClipData.newPlainText(\"CREATEbooth\", \"hi\");\n\t\t\t\t DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(v);\n\t\t\t\t v.startDrag(data, shadowBuilder, v, 0);\n\t\t\t\t return true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "@Override\r\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\n\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\tint mRawX = (int) event.getRawX();\n\t\t\tint mRawY = (int) event.getRawY();\n\n\t\t\tswitch (event.getAction() & MotionEvent.ACTION_MASK) {\n\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\tmLastX = mRawX;\n\t\t\t\tmLastY = mRawY;\n\t\t\t\tisDraging = false;\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\tif (isDraging || Math.abs(mRawX - mLastX) > touchSlop\n\t\t\t\t\t\t|| Math.abs(mRawY - mLastY) > touchSlop) {\n\t\t\t\t\tmLastX = mRawX;\n\t\t\t\t\tmLastY = mRawY;\n\t\t\t\t\tisDraging = true;\n\t\t\t\t\tupdateFloatView(mRawX, mRawY);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\tcase MotionEvent.ACTION_CANCEL:\n\t\t\t\tif (!isDraging) {\n\t\t\t\t\tturnOn(! ison);\n\t\t\t\t}\n\t\t\t\tisDraging = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "@Override\n\t\t\tpublic boolean onDown(MotionEvent arg0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\t\tpublic boolean onDown(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean onTouch(View v, MotionEvent arg1) {\n ClipData veri = ClipData.newPlainText(\"\", \"\");\n View.DragShadowBuilder golge = new View.DragShadowBuilder(sag);\n v.startDrag(veri, golge, null, 0);\n return false;\n }", "@Override\r\n public boolean onDown(MotionEvent e) {\n return false;\r\n }", "@Override\n\tpublic boolean touchMoved(int arg0, int arg1) {\n\t\treturn false;\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent e) {\n return gestureDetector.onTouchEvent(e);\n }", "public void setDragEnabled(boolean enabled) { \n \tthis.dragEnabled = enabled; \n \t}", "@Override\r\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tif (ev.getAction() == MotionEvent.ACTION_MOVE) {\r\n\t\t\t// stop grid view moving\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn super.dispatchTouchEvent(ev);\r\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}" ]
[ "0.8041069", "0.77095", "0.7604997", "0.7515047", "0.7515047", "0.7511343", "0.7304606", "0.7304606", "0.7208236", "0.7208236", "0.7204994", "0.71953607", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.71878314", "0.7145172", "0.7098984", "0.69911635", "0.6988244", "0.6974622", "0.6963891", "0.6898809", "0.6858779", "0.68478453", "0.67596036", "0.67566514", "0.67187756", "0.671539", "0.67065954", "0.6697429", "0.66886896", "0.6673986", "0.6673986", "0.6673986", "0.6667", "0.66548216", "0.6639019", "0.6639019", "0.6615056", "0.657089", "0.65407294", "0.65237004", "0.65183485", "0.64779466", "0.6474356", "0.64712745", "0.6465854", "0.6465854", "0.6454421", "0.6450818", "0.6450818", "0.64422196", "0.6426651", "0.6426651", "0.6422985", "0.64156187", "0.6411509", "0.64098483", "0.64070684", "0.64031094", "0.63954", "0.6390881", "0.638112", "0.63806117", "0.63806117", "0.63806117", "0.637369", "0.63465804", "0.63443184", "0.6341123", "0.6339664", "0.63395864", "0.6339008", "0.6331511", "0.63294214", "0.63294214", "0.6327417", "0.6326848", "0.6325377", "0.63190526", "0.6309545", "0.6304503", "0.629952", "0.62988335", "0.6297123", "0.6295197", "0.6295197", "0.6295197", "0.6295197", "0.6295197", "0.6295197" ]
0.0
-1
: TODO: not quite well
@Override public Collection<Employee> queryByNameAndEmail( String name, String email, boolean isRemoved ) { final String nameLikeSql = name + "%"; final String mailLikeSql = email + "%"; return em.createNamedQuery( "Employee.findByNameAndEmail", Employee.class ) .setParameter( "name", nameLikeSql ) .setParameter( "email", mailLikeSql ) .setParameter( "removed", isRemoved ).getResultList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "private void poetries() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "private void strin() {\n\n\t}", "private void m50366E() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "void mo57277b();", "public abstract void mo70713b();", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public abstract String mo13682d();", "public abstract String mo118046b();", "public abstract void mo56925d();", "@Override public int describeContents() { return 0; }", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public abstract String mo41079d();", "public abstract String mo9239aw();", "public void skystonePos4() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public abstract void mo27385c();", "public abstract int mo9754s();", "void mo57278c();", "public abstract void mo6549b();", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public abstract String mo11611b();", "public void mo38117a() {\n }", "private stendhal() {\n\t}", "public void mo21877s() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract Object mo26777y();", "public abstract long mo9229aD();", "public abstract void mo27386d();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "abstract String mo1748c();", "@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }", "public void mo12628c() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public abstract String mo9751p();", "public void skystonePos6() {\n }", "protected abstract Set method_1559();", "public abstract Object mo1185b();", "double defendre();", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "void mo21072c();", "public void smell() {\n\t\t\n\t}", "public void mo4359a() {\n }", "void mo72113b();", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "void mo41083a();", "void mo41086b();", "protected boolean func_70041_e_() { return false; }", "public abstract String mo41086i();", "String getBegin();", "public abstract void mo30696a();", "void mo80457c();", "Object getXtrf();", "Object getXtrf();", "public void mo21779D() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public abstract Object mo1771a();", "double passer();", "public abstract String mo9238av();", "void startIndexing();", "abstract int pregnancy();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void m50367F() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "Object getXtrc();", "Object getXtrc();", "public void mo21793R() {\n }", "void mo21073d();", "public void skystonePos2() {\n }", "protected void mo6255a() {\n }", "public abstract void mo35054b();", "private SBomCombiner()\n\t{}", "public void mo21878t() {\n }", "void mo119582b();", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void preprocess() {\n }", "private USI_TRLT() {}", "public void mo55254a() {\n }" ]
[ "0.54989654", "0.54737234", "0.54587984", "0.5418159", "0.5410522", "0.5395719", "0.5374641", "0.53692096", "0.53626233", "0.5344474", "0.53374684", "0.533352", "0.53183836", "0.52857465", "0.5253237", "0.52481395", "0.52393353", "0.5212498", "0.52072257", "0.5202976", "0.51972586", "0.5189861", "0.5188792", "0.51814204", "0.5169198", "0.5160038", "0.5159273", "0.5157686", "0.51472497", "0.51271784", "0.5125935", "0.5125836", "0.5116304", "0.5114438", "0.51054543", "0.5103862", "0.50824344", "0.508182", "0.50802773", "0.50787205", "0.5071813", "0.5068967", "0.50669867", "0.5056654", "0.5056498", "0.50494075", "0.50453067", "0.5039079", "0.5039079", "0.5035241", "0.5026129", "0.5022379", "0.5017087", "0.5014607", "0.5000584", "0.4995711", "0.49898884", "0.49830982", "0.4973551", "0.49723363", "0.49712867", "0.49652356", "0.4959701", "0.49521425", "0.4944513", "0.49443474", "0.49430156", "0.49396938", "0.4937905", "0.4937359", "0.49315524", "0.49298203", "0.4929177", "0.4928434", "0.49283275", "0.4927205", "0.4927205", "0.49228942", "0.4921337", "0.49212068", "0.4921189", "0.4916112", "0.49133384", "0.49109", "0.4904079", "0.49009514", "0.49005586", "0.48995855", "0.48995855", "0.4898169", "0.48966178", "0.48911488", "0.4882215", "0.48803684", "0.48801404", "0.48775795", "0.48775113", "0.4877226", "0.48637864", "0.48599035", "0.4856489" ]
0.0
-1
/ Create ComboButton for switching HDMI EDID version
private void createEdidSwitch(final int inputSource) { mProgressDialog = new ProgressDialog(settingActivity); mProgressDialog.setTitle(settingActivity.getResources().getString( R.string.str_hdmi_edid_version_change)); mProgressDialog.setMessage(settingActivity.getResources().getString( R.string.str_hdmi_edid_version_wait)); mProgressDialog.setIndeterminate(false); mProgressDialog.setCancelable(false); String[] resList = settingActivity.getResources().getStringArray(R.array.str_arr_hdmi_edid_version); String[] edidItemList = new String[resList.length + 1]; System.arraycopy(resList, 0, edidItemList, 0, resList.length); mHdmiEdidAutoSwitchIndex = resList.length; edidItemList[mHdmiEdidAutoSwitchIndex] = settingActivity.getResources().getString(R.string.str_edid_auto_switch); mComboHdmiEdidVersion = new ComboButton(settingActivity, edidItemList, R.id.linearlayout_hdmi_edid_version, 1, 2, ComboButton.NEED_SELECTED_BEFORE_SWITCH) { @Override public void doUpdate() { super.doUpdate(); LittleDownTimer.pauseItem(); LittleDownTimer.pauseMenu(); mProgressDialog.show(); if (mThreadEdidChange == null || mThreadEdidChange.getState() == Thread.State.TERMINATED) { mThreadEdidChange = new Thread(new Runnable() { @Override public void run() { Log.d(TAG, "new thread starting change edid version !"); int idx = getIdx(); if (idx == mHdmiEdidAutoSwitchIndex) { if (mTvCommonManager.isSupportModule(TvCommonManager.MODULE_EDID_AUTO_SWITCH)) { mTvCommonManager.setHdmiEdidAutoSwitch(true); } } else { if (mTvCommonManager.isSupportModule(TvCommonManager.MODULE_EDID_AUTO_SWITCH)) { mTvCommonManager.setHdmiEdidAutoSwitch(false); } if (mTvCommonManager.setHdmiEdidVersionBySource( inputSource, idx) != true) { Log.e(TAG, "setHdmiEdidVersion failed!"); } } /* Prepare resuming to menu */ if (null != mProgressDialog) { mProgressDialog.dismiss(); } LittleDownTimer.resetItem(); LittleDownTimer.resetMenu(); LittleDownTimer.resumeItem(); LittleDownTimer.resumeMenu(); } }); mThreadEdidChange.start(); } else { Log.d(TAG, "Abort, another thread is already starting changing edid. the combobutton is not switchable until it finish"); } } }; /* Get the supported HDMI EDIE version list */ boolean bSupportHdmiEdidVersion; int focusIndex = mTvCommonManager.getHdmiEdidVersionBySource(inputSource); int[] supportHdmiEdidVersionList = mTvCommonManager .getHdmiEdidVersionList(); for (int i = 0; (i < supportHdmiEdidVersionList.length) && (i < resList.length); i++) { Log.d(TAG, "supportHdmiEdidVersionList["+i+"] = " + supportHdmiEdidVersionList[i]); if (supportHdmiEdidVersionList[i] != TvCommonManager.EDID_VERSION_UNSUPPORT) { bSupportHdmiEdidVersion = true; } else { bSupportHdmiEdidVersion = false; } mComboHdmiEdidVersion.setItemEnable(i, bSupportHdmiEdidVersion); } if (mTvCommonManager.isSupportModule(TvCommonManager.MODULE_EDID_AUTO_SWITCH)) { mComboHdmiEdidVersion.setItemEnable(mHdmiEdidAutoSwitchIndex, true); if (mTvCommonManager.getHdmiEdidAutoSwitch()) { focusIndex = mHdmiEdidAutoSwitchIndex; } } else { mComboHdmiEdidVersion.setItemEnable(mHdmiEdidAutoSwitchIndex, false); } mComboHdmiEdidVersion.setIdx(focusIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createRgbHsbButtons() {\n \t\n Composite comp1 = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, false);\n gl.horizontalSpacing = 10;\n comp1.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n comp1.setLayoutData(gd);\n\n // Create a group to contain the RGB and HSB radio buttons.\n Group colorGroup = new Group(comp1, SWT.NONE);\n colorGroup.setText(\" Use color model: \");\n\n RowLayout groupRowLayout = new RowLayout();\n groupRowLayout.marginLeft = 10;\n groupRowLayout.marginRight = 10;\n groupRowLayout.spacing = 10;\n colorGroup.setLayout(groupRowLayout);\n\n // Create the RGB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the RGB\n // sliders.\n rgbRdo = new Button(colorGroup, SWT.RADIO);\n rgbRdo.setText(\"RGB\");\n rgbRdo.setSelection(true);\n rgbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n\n // Create the HSB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the HSB\n // sliders.\n hsbRdo = new Button(colorGroup, SWT.RADIO);\n hsbRdo.setText(\"HSB\");\n hsbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n \n Composite catComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 20;\n catComp.setLayout(gl);\n gd = new GridData(GridData.CENTER);\n gd.horizontalAlignment = SWT.CENTER;\n \n catComp.setLayoutData(gd);\n\n Label selCatLbl = new Label( catComp, SWT.None );\n selCatLbl.setText(\"Category\");\n \n final Combo selCmapCatCombo = new Combo( catComp, SWT.DROP_DOWN | SWT.READ_ONLY );\n selCmapCatCombo.setItems( availColorMapCats );\n selCmapCatCombo.select(0);\n \n selCmapCatCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCat = selCmapCatCombo.getText();\n \t\tif( seldCat.equals( seldCmapCat ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapCat = seldCat;\n \t\tseldCmapName = null;\n \t\tavailColorMaps.clear();\n \t\t\n for( String cmap : ColorMapUtil.listColorMaps(seldCmapCat) ) {\n \tif( seldCmapName == null ) {\n \t\tseldCmapName = cmap;\n \t\tif( !initColorMap() ) {\n \t\tseldCmapName = null;\n \t\t\tcontinue; // don't add to the list\n \t\t}\n \t}\n \tavailColorMaps.add(cmap);\n }\n \t\n createSliderData();\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n Composite cmapComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 10;\n cmapComp.setLayout(gl);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n cmapComp.setLayoutData(gd);\n\n Label selCmapLbl = new Label( cmapComp, SWT.None );\n selCmapLbl.setText(\"Colormap\");\n \n selCmapCombo = new Combo( cmapComp, SWT.DROP_DOWN );\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n \n selCmapCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCmap = selCmapCombo.getText();\n \t\tif( seldCmap.equals( seldCmapName ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapName = seldCmap;\n\n \t\tif( initColorMap() ) {\n createSliderData();\n \t\t}\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n// selCmapCombo.addModifyListener( new ModifyListener() {\n//\t\t\t@Override\n//\t\t\tpublic void modifyText(ModifyEvent e) { \n//\t\t\t\tseldCmapName = selCmapCombo.getText();\n//\t\t\t}\n// });\n }", "protected void createButtons(Composite parent) {\n\t\tcomRoot = new Composite(parent, SWT.BORDER);\n\t\tcomRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));\n\t\tcomRoot.setLayout(new GridLayout(2, false));\n\n\t\ttbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT);\n\t\ttbTools.setLayout(new GridLayout());\n\t\ttbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));\n\n\t\tfinal ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnSettings.setText(Messages.btnAdvancedSettings);\n\t\tbtnSettings.setToolTipText(Messages.tipAdvancedSettings);\n\t\tbtnSettings.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tPerformanceSettingsDialog dialog = new PerformanceSettingsDialog(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig());\n\t\t\t\tdialog.open();\n\t\t\t}\n\t\t});\n\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tbtnPreviewDDL = new ToolItem(tbTools, SWT.CHECK);\n\t\tbtnPreviewDDL.setSelection(false);\n\t\tbtnPreviewDDL.setText(Messages.btnPreviewDDL);\n\t\tbtnPreviewDDL.setToolTipText(Messages.tipPreviewDDL);\n\t\tbtnPreviewDDL.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tboolean flag = btnPreviewDDL.getSelection();\n\t\t\t\tswitchText(flag);\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\n\t\tfinal ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnExportScript.setText(Messages.btnExportScript);\n\t\tbtnExportScript.setToolTipText(Messages.tipSaveScript);\n\t\tbtnExportScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\texportScriptToFile();\n\t\t\t}\n\t\t});\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnUpdateScript.setText(Messages.btnUpdateScript);\n\t\tbtnUpdateScript.setToolTipText(Messages.tipUpdateScript);\n\t\tbtnUpdateScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tgetMigrationWizard().saveMigrationScript(false, isSaveSchema());\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t\tbtnUpdateScript\n\t\t\t\t.setEnabled(getMigrationWizard().getMigrationScript() != null);\n\t\tnew ToolItem(tbTools, SWT.SEPARATOR);\n\t\tfinal ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE);\n\t\tbtnNewScript.setText(Messages.btnCreateNewScript);\n\t\tbtnNewScript.setToolTipText(Messages.tipCreateNewScript);\n\t\tbtnNewScript.addSelectionListener(new SelectionAdapter() {\n\n\t\t\tpublic void widgetSelected(final SelectionEvent event) {\n\t\t\t\tprepare4SaveScript();\n\t\t\t\tString name = EditScriptDialog.getMigrationScriptName(\n\t\t\t\t\t\tgetShell(), getMigrationWizard().getMigrationConfig()\n\t\t\t\t\t\t\t\t.getName());\n\t\t\t\tif (StringUtils.isBlank(name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgetMigrationWizard().getMigrationConfig().setName(name);\n\t\t\t\tgetMigrationWizard().saveMigrationScript(true, isSaveSchema());\n\t\t\t\tbtnUpdateScript.setEnabled(getMigrationWizard()\n\t\t\t\t\t\t.getMigrationScript() != null);\n\t\t\t\tMessageDialog.openInformation(PlatformUI.getWorkbench()\n\t\t\t\t\t\t.getDisplay().getActiveShell(),\n\t\t\t\t\t\tMessages.msgInformation, Messages.setOptionPageOKMsg);\n\t\t\t}\n\t\t});\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n CBDispositivos = new javax.swing.JComboBox<>();\n BTConectar = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n RBUSB = new javax.swing.JRadioButton();\n RBParalela = new javax.swing.JRadioButton();\n BtCriar = new javax.swing.JButton();\n RBUSB1 = new javax.swing.JRadioButton();\n RBParalela1 = new javax.swing.JRadioButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n CBDispositivos.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n BTConectar.setText(\"Conectar\");\n BTConectar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BTConectarActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Criar Dispositivo:\");\n\n jLabel2.setText(\"Conectar Dispositivo:\");\n\n RBUSB.setText(\"Pendrive\");\n\n RBParalela.setText(\"CD\");\n\n BtCriar.setText(\"Criar\");\n BtCriar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtCriarActionPerformed(evt);\n }\n });\n\n RBUSB1.setText(\"HD Externo\");\n\n RBParalela1.setText(\"DVD\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(41, 41, 41)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(BtCriar)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(RBUSB1)\n .addComponent(RBUSB))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(RBParalela)\n .addComponent(RBParalela1))\n .addGap(118, 118, 118))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addGap(101, 101, 101)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(CBDispositivos, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(BTConectar))))\n .addContainerGap(179, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(RBUSB)\n .addComponent(RBParalela))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(RBUSB1)\n .addComponent(RBParalela1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(BtCriar)\n .addGap(46, 46, 46)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(CBDispositivos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 78, Short.MAX_VALUE)\n .addComponent(BTConectar)\n .addGap(25, 25, 25))\n );\n\n pack();\n }", "private void configureComponents() {\n save.setStyleName(ValoTheme.BUTTON_PRIMARY);\n save.setClickShortcut(ShortcutAction.KeyCode.ENTER);\n setVisible(false);\n }", "private void postInit() {\n // start with compact form\n detailledToggleButtonActionPerformed(null);\n\n colorMappingComboBox.setRenderer(ColorMappingListCellRenderer.getListCellRenderer());\n\n // Fill colorMapping combobox\n for (ColorMapping cm : ColorMapping.values()) {\n if (cm != ColorMapping.OBSERVATION_DATE) { // not implemented\n colorMappingComboBox.addItem(cm);\n }\n }\n\n xAxisEditor = new AxisEditor(this);\n xAxisPanel.add(xAxisEditor);\n\n if (ENABLE_EXPRESSION_EDITOR) {\n expressionEditor = new ExpressionEditor(this);\n expressionEditor.setVisible(false);\n\n this.jPanelOtherEditors.add(expressionEditor, BorderLayout.CENTER);\n } else {\n jToggleButtonExprEditor.setVisible(false);\n }\n\n // Adjust fonts:\n final Font fixedFont = new Font(Font.MONOSPACED, Font.PLAIN, SwingUtils.adjustUISize(12));\n this.jToggleButtonAuto.setFont(fixedFont);\n this.jToggleButtonDefault.setFont(fixedFont);\n this.jToggleButtonFixed.setFont(fixedFont);\n }", "public bt526() {\n initComponents();\n }", "public static void openPCCompSCRBtnPressed() {\r\n PCNMClientStart.switchPanels(new PCCompSCR());\r\n }", "private void makeGUI() {\r\n\t\tInstrument[] instruments = getAvailableInstruments();\r\n\r\n\t\tJPanel channels = new JPanel();\r\n\t\tchannels.setLayout(new BoxLayout(channels, BoxLayout.Y_AXIS));\r\n\r\n\t\tcomboBoxes = new JComboBox[16];\r\n\t\tfor (int chan = 0; chan < 16; chan++) {\r\n\t\t\tJPanel channelPanel = new JPanel();\r\n\t\t\tchannelPanel\r\n\t\t\t\t\t.setLayout(new BoxLayout(channelPanel, BoxLayout.X_AXIS));\r\n\t\t\tJLabel label = new JLabel(\"Channel \" + chan);\r\n\t\t\tlabel.setPreferredSize(LABEL_DIMENSION);\r\n\t\t\tchannelPanel.add(label);\r\n\t\t\tJComboBox cb = new JComboBox(instruments);\r\n\t\t\tcb.setMaximumRowCount(25);\r\n\t\t\tint program = pianoRollPanel.getProgram(chan);\r\n\t\t\tcb.setSelectedIndex(program);\r\n\t\t\tchannelPanel.add(cb);\r\n\t\t\tcomboBoxes[chan] = cb;\r\n\t\t\tchannels.add(channelPanel);\r\n\t\t}\r\n\t\tadd(channels, BorderLayout.CENTER);\r\n\t\tJPanel buttonPanel = new JPanel();\r\n\t\tJButton okButton = new JButton(OK);\r\n\t\tokButton.setActionCommand(OK);\r\n\t\tokButton.setMnemonic('O');\r\n\t\tokButton.addActionListener(this);\r\n\t\tJButton cancelButton = new JButton(CANCEL);\r\n\t\tcancelButton.setActionCommand(CANCEL);\r\n\t\tcancelButton.setMnemonic('C');\r\n\t\tcancelButton.addActionListener(this);\r\n\t\tbuttonPanel.add(okButton);\r\n\t\tbuttonPanel.add(cancelButton);\r\n\t\tadd(buttonPanel, BorderLayout.SOUTH);\r\n\t}", "private void buildComboBox() {\r\n\r\n comboBoxKernelOpen = new JComboBox();\r\n comboBoxKernelOpen.setFont(serif12);\r\n comboBoxKernelOpen.setBackground(Color.white);\r\n\r\n if (image.getNDims() == 2) {\r\n comboBoxKernelOpen.addItem(\"3x3 - 4 connected\");\r\n comboBoxKernelOpen.addItem(\"5x5 - 12 connected\");\r\n comboBoxKernelOpen.addItem(\"User sized circle.\");\r\n comboBoxKernelOpen.setSelectedIndex(2);\r\n } else if (image.getNDims() == 3) {\r\n comboBoxKernelOpen.addItem(\"3x3x3 - 6 connected (2.5D: 4)\");\r\n comboBoxKernelOpen.addItem(\"5x5x5 - 24 connected (2.5D: 12)\");\r\n comboBoxKernelOpen.addItem(\"User sized sphere.\");\r\n }\r\n }", "private UpgradeMenu()\n\t{\n\t\tdescription = \"Please select a tower\";\n\t\t\n\t\tbackground = TowerDefenseGUI.loadImage(\"StickyNote3.jpg\", 250, 200);\n\t\tthis.setPreferredSize(new Dimension(250, 200));\n\t\tthis.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 150));\n\t\t\n\t\t//Sell-Tower button is invisible when a tower is not selected\n\t\tsellTower = new JButton(\"Sell Tower\");\n\t\tthis.add(sellTower);\n\t\tsellTower.setVisible(false);\n\t}", "private void initCreateDeckBtn() {\n createBtn = new Button((editWidth - 310) / 2, 400, \"CREATE NEW DECK\", MasterGUI.green, titleField.getWidth(), titleField.getHeight());\n createBtn.setFont(MasterGUI.poppinsFont);\n createBtn.setForeground(MasterGUI.white);\n createBtn.setContentAreaFilled(true);\n createBtn.setFocusPainted(false);\n ActionListener createAction = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n createDeckFromInput();\n user.updateDeckList();\n repaintDeckCards();\n HomeView.repaintHomeView();\n }\n };\n createBtn.addActionListener(e -> {\n MainGUI.confirmDialog(createAction, \"Create new Deck?\");\n });\n editPanel.add(createBtn);\n }", "public void addMonitors() {\n\t\t// get graphics environment\n\t\tGraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();\n\t\tGraphicsDevice[] graphicsDevices = graphicsEnvironment.getScreenDevices();\n\t\t// let user choose on which screen to show the capturer, only if more than one is connected\n\t\tif (graphicsDevices.length > 1) {\n\t\t\tbuttonPanel.removeAll();\n\t\t\tJLabel screenLabel = new JLabel(getResourceMap().getString(\"screenLabel.text\"));\n\t\t\tbuttonPanel.add(screenLabel, \"wrap, grow, span\");\n\t\t\t// create buttongroup for selecting monitor\n\t\t\tButtonGroup screenButtonGroup = new ButtonGroup();\n\t\t\tInteger defaultMonitorId = videoCapturerFactory.getMonitorIdForComponent(selectedVideoCapturerName);\n\t\t\t// get the default monitor id for this capturer\n\t\t\tfor (GraphicsDevice graphicsDevice : graphicsDevices) {\n\t\t\t\tString monitorIdString = graphicsDevice.getIDstring();\n\t\t\t\tDisplayMode displayMode = graphicsDevice.getDisplayMode();\n\t\t\t\t// final Rectangle position = graphicsDevice.getDefaultConfiguration().getBounds();\n\t\t\t\tString resolution = displayMode.getWidth() + \"x\" + displayMode.getHeight();\n\t\t\t\tJToggleButton button = new JToggleButton(\"<html><center>\" + monitorIdString + \"<br>\" + resolution + \"</center></html>\");\n\t\t\t\tmonitorIdString = monitorIdString.substring(monitorIdString.length() - 1);\n\t\t\t\tbutton.setActionCommand(monitorIdString);\n\t\t\t\tbutton.addActionListener(new ActionListener() {\n\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tAbstractButton source = (AbstractButton) e.getSource();\n\t\t\t\t\t\tString monitorId = source.getActionCommand();\n\t\t\t\t\t\t// TODO pass position here instead of monitor id..\n\t\t\t\t\t\tfirePropertyChange(SelfContained.MONITOR_ID, selectedMonitorId, selectedMonitorId = monitorId);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\tbutton.setBackground(Color.WHITE);\n\t\t\t\t// set default screen selection\n\t\t\t\tint monitorId = Integer.parseInt(monitorIdString);\n\t\t\t\tif (defaultMonitorId != null && defaultMonitorId == monitorId) {\n\t\t\t\t\tbutton.setSelected(true);\n\t\t\t\t\tscreenButtonGroup.setSelected(button.getModel(), true);\n\t\t\t\t} else {\n\t\t\t\t\tscreenButtonGroup.setSelected(button.getModel(), false);\n\t\t\t\t}\n\t\t\t\tscreenButtonGroup.add(button);\n\t\t\t\tbuttonPanel.add(button, \"height 70!, width 70::, grow\");\n\t\t\t}\n\t\t\tscreenLabel.setVisible(true);\n\t\t\tbuttonPanel.setVisible(true);\n\t\t}\n\t}", "private void createInputPortComboBox()\n\t{\n\t\tpane = new JTabbedPane();\n\t\tpane.setBounds(10, 10, 350, 30);\n\n\t\t// Add a tab\n\t\tString label[] = new String[] { \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\",\n\t\t\t\t\"R0\", \"L\" };\n\t\tfor (int i = 0; i < label.length; i++)\n\t\t{\n\t\t\t// Create a child container which is to be associated with a tab\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpane.addTab(label[i], panel);\n\t\t}\n\t\tframe.getContentPane().add(pane);\n\n\t\tpreviousIndex = 0;\n\n\t\tpane.addChangeListener(new MainTabListener(this));\n\n\t\t// Create the tabbed pane\n\t\tpaneRFID = new JTabbedPane();\n\t\tpaneRFID.setBounds(10, 40, 350, 30);\n\n\t\t// Add a tab\n\t\tlabel = new String[] { \"0\", \"1\", \"2\", \"3\", \"4\", \"5\" };\n\t\tfor (int i = 0; i < label.length; i++)\n\t\t{\n\t\t\t// Create a child container which is to be associated with a tab\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpaneRFID.addTab(label[i], panel);\n\t\t}\n\t\tpaneRFID.setVisible(false);\n\t\tframe.getContentPane().add(paneRFID);\n\t\tpaneRFID.addChangeListener(new RFIDTabListener(this));\n\n\t\t// pane.addChangeListener(new MainTabListener());\n\n\t\t// final JRadioButton radioButton = new JRadioButton();\n\t\t// buttonGroup.add(radioButton);\n\t\t// radioButton.setText(\"0\");\n\t\t// radioButton.addActionListener(new ActionListener() {\n\t\t// public void actionPerformed(final ActionEvent e) {\n\t\t// InputPorttextField_1.setText(radioButton.getText());\n\t\t// }\n\t\t// });\n\t\t// radioButton.setBounds(40, 45, 40, 23);\n\t\t// frame.getContentPane().add(radioButton);\n\t\t//\t\t\n\t\t//\n\t\t// final JRadioButton radioButton_1 = new JRadioButton();\n\t\t// buttonGroup.add(radioButton_1);\n\t\t// radioButton_1.setText(\"1\");\n\t\t// radioButton_1.addActionListener(new ActionListener() {\n\t\t// public void actionPerformed(final ActionEvent e) {\n\t\t// InputPorttextField_1.setText(radioButton_1.getText());\n\t\t// }\n\t\t// });\n\t\t// radioButton_1.setBounds(78, 45, 40, 23);\n\t\t// frame.getContentPane().add(radioButton_1);\n\t\t//\n\t\t// final JRadioButton radioButton_2 = new JRadioButton();\n\t\t// radioButton_2.setSelected(true);\n\t\t// buttonGroup.add(radioButton_2);\n\t\t// radioButton_2.setText(\"2\");\n\t\t// radioButton_2.addActionListener(new ActionListener() {\n\t\t// public void actionPerformed(final ActionEvent e) {\n\t\t// InputPorttextField_1.setText(radioButton_2.getText());\n\t\t// }\n\t\t// });\n\t\t// radioButton_2.setBounds(115, 45, 46, 23);\n\t\t// frame.getContentPane().add(radioButton_2);\n\t\t//\n\t\t// final JRadioButton radioButton_3 = new JRadioButton();\n\t\t// buttonGroup.add(radioButton_3);\n\t\t// radioButton_3.setText(\"3\");\n\t\t// radioButton_3.addActionListener(new ActionListener() {\n\t\t// public void actionPerformed(final ActionEvent e) {\n\t\t// InputPorttextField_1.setText(radioButton_3.getText());\n\t\t// }\n\t\t// });\n\t\t// radioButton_3.setBounds(155, 45, 40, 23);\n\t\t// frame.getContentPane().add(radioButton_3);\n\t\t//\n\t\t// final JRadioButton radioButton_4 = new JRadioButton();\n\t\t// buttonGroup.add(radioButton_4);\n\t\t// radioButton_4.setText(\"4\");\n\t\t// radioButton_4.addActionListener(new ActionListener() {\n\t\t// public void actionPerformed(final ActionEvent e) {\n\t\t// InputPorttextField_1.setText(radioButton_4.getText());\n\t\t// }\n\t\t// });\n\t\t// radioButton_4.setBounds(190, 45, 40, 23);\n\t\t// frame.getContentPane().add(radioButton_4);\n\t\t//\n\t\t// final JRadioButton radioButton_5 = new JRadioButton();\n\t\t// buttonGroup.add(radioButton_5);\n\t\t// radioButton_5.setText(\"5\");\n\t\t// radioButton_5.addActionListener(new ActionListener() {\n\t\t// public void actionPerformed(final ActionEvent e) {\n\t\t// InputPorttextField_1.setText(radioButton_5.getText());\n\t\t// }\n\t\t// });\n\t\t// radioButton_5.setBounds(225, 45, 40, 23);\n\t\t// frame.getContentPane().add(radioButton_5);\n\t\t//\n\t\t// final JRadioButton radioButton_6 = new JRadioButton();\n\t\t// buttonGroup.add(radioButton_6);\n\t\t// radioButton_6.setText(\"6\");\n\t\t// radioButton_6.addActionListener(new ActionListener() {\n\t\t// public void actionPerformed(final ActionEvent e) {\n\t\t// InputPorttextField_1.setText(radioButton_6.getText());\n\t\t// }\n\t\t// });\n\t\t// radioButton_6.setBounds(260, 45, 40, 23);\n\t\t// frame.getContentPane().add(radioButton_6);\n\t\t//\n\t\t// final JRadioButton radioButton_7 = new JRadioButton();\n\t\t// buttonGroup.add(radioButton_7);\n\t\t// radioButton_7.setText(\"7\");\n\t\t// radioButton_7.addActionListener(new ActionListener() {\n\t\t// public void actionPerformed(final ActionEvent e) {\n\t\t// InputPorttextField_1.setText(radioButton_7.getText());\n\t\t// }\n\t\t// });\n\t\t// radioButton_7.setBounds(300, 45, 46, 23);\n\t\t// frame.getContentPane().add(radioButton_7);\n\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cbo_petugas = new javax.swing.JComboBox();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n bCapture = new javax.swing.JButton();\n bCapture2 = new javax.swing.JButton();\n bCapture1 = new javax.swing.JButton();\n jToggleButton1 = new javax.swing.JToggleButton();\n jToggleButton2 = new javax.swing.JToggleButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n cbo_petugas.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n cbo_petugas.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"- PILIH -\" }));\n\n jLabel1.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 18)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Silahkan Absen\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n bCapture.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 14)); // NOI18N\n bCapture.setText(\"Open Camera\");\n bCapture.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bCaptureActionPerformed(evt);\n }\n });\n jPanel2.add(bCapture);\n\n bCapture2.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 14)); // NOI18N\n bCapture2.setText(\"Capture\");\n bCapture2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bCapture2ActionPerformed(evt);\n }\n });\n jPanel2.add(bCapture2);\n\n bCapture1.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 14)); // NOI18N\n bCapture1.setText(\"Save\");\n bCapture1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bCapture1ActionPerformed(evt);\n }\n });\n jPanel2.add(bCapture1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(cbo_petugas, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jToggleButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 288, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 62, Short.MAX_VALUE)\n .addComponent(jToggleButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 288, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cbo_petugas, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jToggleButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 279, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(97, 97, 97))\n );\n\n pack();\n }", "@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}", "public void createControl(Composite parent) {\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tsetControl(container);\r\n\t\tGroup group = new Group(container, SWT.NONE);\r\n\t\tgroup.setBounds(0, 281, 533, 60);\r\n\t\t\r\n\t\tLabel lblSelectWhetherYou = new Label(group, SWT.NONE);\r\n\t\tlblSelectWhetherYou.setBounds(10, 22, 374, 26);\r\n\t\tlblSelectWhetherYou.setText(\"\\u9009\\u62E9\\u662F\\u5426\\u8981\\u53D1\\u5E03\\u3001\\u68C0\\u7D22\\u6216\\u5220\\u9664\\u670D\\u52A1\\u5668\\u4E0A\\u7684\\u62A5\\u544A\\u3002\");\r\n\t\t\r\n\t\tlb_pr = new Label(container, SWT.NONE);\r\n\t\tlb_pr.setBounds(69, 79, 48, 48);\r\n\t\tlb_pr.setImage(SwtImageConverter.ConvertToSwtImage(ImageResolver.get_Resolver().ResolveImage(\"[IMAGE]Core#Images.Icons.ReportPublish.png\"),48,48));\r\n\t\t\r\n\t\trbtn_pr = new Button(container, SWT.RADIO);\r\n\t\trbtn_pr.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tgetNextPage();\r\n\t\t\t}\r\n\t\t});\r\n\t\trbtn_pr.setBounds(59, 133, 69, 16);\r\n\t\trbtn_pr.setText(\"\\u53D1\\u5E03\\u62A5\\u544A\");\r\n\t\trbtn_pr.setData(\"PublishedReportW2_Pub\");\r\n\t\t\r\n\t\tlb_rr = new Label(container, SWT.NONE);\r\n\t\tlb_rr.setBounds(185, 79, 48, 48);\r\n\t\tlb_rr.setImage(SwtImageConverter.ConvertToSwtImage(ImageResolver.get_Resolver().ResolveImage(\"[IMAGE]Core#Images.Icons.ReportRetrieve.png\"),48,48));\r\n\t\t\r\n\t\t\r\n\t\trbtn_rr = new Button(container, SWT.RADIO);\r\n\t\trbtn_rr.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tgetNextPage();\r\n\t\t\t}\r\n\t\t});\r\n\t\trbtn_rr.setBounds(175, 133, 69, 16);\r\n\t\trbtn_rr.setText(\"\\u68C0\\u7D22\\u62A5\\u544A\");//»ρΘ‘\\u68C0\\u7D22\\\r\n\t\trbtn_rr.setData(\"PublishedReportW2_Ret\");\r\n\t\t\r\n\t\tlb_dr = new Label(container, SWT.NONE);\r\n\t\tlb_dr.setBounds(297, 79, 48, 48);\r\n\t\tlb_dr.setImage(SwtImageConverter.ConvertToSwtImage(ImageResolver.get_Resolver().ResolveImage(\"[IMAGE]Core#Images.Icons.ReportDelete.png\"),48,48));\r\n\t\t\r\n\t\t\r\n\t\trbtn_dr = new Button(container, SWT.RADIO);\r\n\t\trbtn_dr.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tgetNextPage();\r\n\t\t\t}\r\n\t\t});\r\n\t\trbtn_dr.setBounds(287, 133, 69, 16);\r\n\t\trbtn_dr.setText(\"\\u5220\\u9664\\u62A5\\u544A\");\r\n\t\trbtn_dr.setData(\"PublishedReportW2_Del\");\r\n\t\t\r\n\t}", "void createEqualizerControls();", "@Override\n public void mouseClicked(MouseEvent e) {\n\t\tcomboBox.setEnabled(true);\n\t\tcomboBox.setVisible(true);\n\t\tlblTest.setVisible(false);\n\t\t//choose the correct combobox entry for the file we currently use.\n }", "@Override\r\n\tpublic void createPartControl(final Composite parent) {\n\t\t\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tGridData data = new GridData(GridData.GRAB_HORIZONTAL);\r\n\t\tGridData dataBoth = new GridData(GridData.FILL_BOTH);\r\n\t\tGridLayout gridLayout = new GridLayout(); \r\n\t\tgridLayout.numColumns = 2; \r\n\t\tgridLayout.makeColumnsEqualWidth = true;\r\n\t\tcontainer.setLayout(gridLayout); \r\n\t\tcontainer.setLayoutData(dataBoth);\r\n\t\tGridLayout butLayout = new GridLayout();\r\n\t\tbutLayout.numColumns = 4;\r\n\t\tbutLayout.makeColumnsEqualWidth = true;\r\n\t\tComposite buttContainer = new Composite(container, SWT.NONE);\r\n\t\tbuttContainer.setLayout(butLayout);\r\n\t\tbuttContainer.setLayoutData(data); \r\n\t\t\r\n\t\t//Bottone per aprire un nuovo BM\r\n\t\tfinal Button buttonCreate = new Button(buttContainer, SWT.NONE);\r\n\t\tImage image = Activator.getImageDescriptor(\"icons/bmOpen.png\").createImage();\r\n\t\tif (image!=null)buttonCreate.setImage(image);\r\n\t\tbuttonCreate.setText(\"Open a BM\");\r\n\t\t\r\n\t\t//viewer per le connessioni attive\r\n\t\tfinal Table connTable = new Table(container, SWT.BORDER);\r\n\r\n\t connTable.setLayoutData(dataBoth);\r\n\t \r\n\r\n\t\tTableColumn tc1 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc2 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc4 = new TableColumn(connTable, SWT.CENTER);\r\n\t\tTableColumn tc5 = new TableColumn(connTable, SWT.CENTER);\r\n\t\t\t tc1.setText(\"Name\");\r\n\t\t tc2.setText(\"Path\");\r\n\t\t tc4.setText(\"BC #\");\r\n\t\t tc5.setText(\"CBC #\");\r\n\t\t\ttc1.setWidth(90);\r\n\t\t tc2.setWidth(130);\r\n\t\t tc4.setWidth(50);\r\n\t\t tc5.setWidth(50);\r\n\t\tconnTable.setHeaderVisible(true);\r\n\t\t\t\r\n\t\t\r\n\t\t//Creo un nuovo listener\r\n\t\tListener listenerCreate = new Listener() {\r\n\t\t public void handleEvent(Event event) {\r\n\t\t if (event.widget == buttonCreate) {\r\n\t\t \t\r\n\t\t \tFileDialog fileDialog = new FileDialog(new Shell());\r\n\t\t \t\t// Set the text\r\n\t\t \t\tfileDialog.setText(\"Select a Business Model\");\r\n\t\t \t\t// Set filter on .txt files\r\n\t\t \t\tfileDialog.setFilterExtensions(new String[] { \"*.bm\" });\r\n\t\t \t\t// Put in a readable name for the filter\r\n\t\t \t\tfileDialog.setFilterNames(new String[] { \"BusinessModel(*.bm)\" });\r\n\t\t \t\t// Open Dialog and save result of selection\r\n\t\t \t\tString selected = fileDialog.open();\r\n\t\t \t\t\r\n\r\n\t\t \t\t\r\n\t\t \t\ttry {\r\n\t\t \t\t\t\r\n\t\t \t\t\tString result = HunkIO.readEntireFile(selected,\r\n\t\t \t\t\t \"UTF-8\" );\r\n\t\t \t\t\tString defInfoFile = result.split(\"<DEFAULT_INFO_FILE>\")[1].split(\"</DEFAULT_INFO_FILE>\")[0];\r\n\t\t \t\t\t\r\n\t\t \t\t\tbmName = defInfoFile.split(\"#\")[0];\r\n\t\t \t\t\tbmPath = defInfoFile.split(\"#\")[1];\r\n\t\t \t\t\t\r\n\t\t \t\t\tHunkIO.writeEntireFile(HunkIO.DEFAULT_INFO_FILE, defInfoFile, \"UTF-8\");\r\n\t\t \t\t\t\r\n\t\t \t\t\t//MC: ricavo directory del progetto corrente\r\n\t\t \t\t\tURL url = getClass().getProtectionDomain().getCodeSource().getLocation();\r\n\t\t \t\t String path_project = url.toExternalForm().substring(6).replace(\"/\", \"//\");\r\n\t\t \t\t System.out.println(\"BMPoolsView path proj: \"+path_project);\r\n\t\t \t\t //MessageDialog.openInformation(new Shell(), \"BMPoolsView path proj\", path_project);\r\n\t\t \t\t \r\n\t\t \t\t\t//Workaround per export come RCP Application\r\n\t\t \t\t\t//String path_project = System.getProperty(\"user.dir\").replace(\"\\\\\", \"//\");\r\n\t\t \t\t\t//MessageDialog.openInformation(new Shell(), \"BMPoolsView\", path_project);\r\n\t\t \t\t\t//URL url = getClass().getProtectionDomain().getCodeSource().getLocation();\r\n\t\t \t\t\t//String file_name = url.toExternalForm().substring(6).replace(\"/\", \"//\");\r\n\t\t \t\t\t//MessageDialog.openInformation(new Shell(), \"Filename\", file_name);\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t\t \t\t\t//Ottengo la vista\r\n\t\t \t\t\topenFile(result.split(\"<bmUniverse>\\n\")[1].split(\"</bmUniverse>\")[0]);\r\n\t\t \t\t\t\r\n\t\t \t\t\t//TODO: VERIFICARE LA CORRETTEZZA DELLA POSISZIONE\r\n\t\t \t\t\t//importo IL PERSISTENCE nella cartella d'installazione\r\n\t\t \t\t\tif (!bcList.isEmpty()){\r\n\t\t \t\t\t\tClassInfo ci =bcList.get(0);\r\n\t\t \t\t\t\tFile f = new File(ci.getRootPath()+\"src/META-INF/persistence.xml\");\r\n\t\t \t\t\t\tif (!f.exists()){\r\n\t\t \t\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE IL FILE DI PERSISTENZA\");\r\n\t\t \t\t\t\t\treturn;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t//LO SPOSTO NELLA CARTELLA META-INF DELL'INSTALLAZIONE\r\n\t\t \t\t\t\t//f = new File(ConstantString.BMM_INSTALL_PATH+\"/META-INF/\");\r\n\t\t \t\t\t\tf = new File(path_project+\"/META-INF/\");\r\n\t\t \t\t\t\tif(!f.exists()){\r\n\t\t \t\t\t\t\tf.mkdir();\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\tString buffer = HunkIO.readEntireFile(ci.getRootPath()+\"src/META-INF/persistence.xml\");\r\n\t\t \t\t\t\t//HunkIO.writeEntireFile(ConstantString.BMM_INSTALL_PATH+\"/META-INF/persistence.xml\", buffer);\r\n\t\t \t\t\t\tHunkIO.writeEntireFile(path_project+\"/META-INF/persistence.xml\", buffer);\r\n\t\t \t\t\t\t\r\n\r\n\t\t \t\t\t}\r\n\r\n\t\t \t\t\t//aggiorno i dati nella tabella\r\n\t\t \t\t\tTableItem ti = new TableItem(connTable, 0);\r\n\t\t \t\t\tImage imageBM = Activator.getImageDescriptor(\"icons/bm.png\").createImage();\r\n\t\t \t\t\t\r\n\t\t \t\t\tif (imageBM!=null)ti.setImage(imageBM);\r\n\t\t \t\t\t\r\n\t\t \t\t\tti.setText( new String[]{bmName,\r\n\t\t \t\t\t\t\t\tbmPath,\"\"+bcList.size(),\"\"+cbcList.size()});\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t\t \t\t\t\r\n\t\t \t\t\t} catch (IOException e) {\r\n\t\t \t\t\t\te.printStackTrace();\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t }\r\n\r\n\t\t\tprivate void openFile(String result) {\r\n\t\t\t\t\r\n\t\t\t\tString bcString = result.split(\"<bcList>\\n\")[1].split(\"</bcList>\\n\")[0];\r\n\t\t\t\tString[] bcBuffer = bcString.split(\"<bc>\\n\");\r\n\t\t\t\tString relString = result.split(\"<relList>\\n\")[1].split(\"</relList>\\n\")[0];\r\n\t\t\t\tString[] relBuffer = relString.split(\"<rel>\\n\");\r\n\t\t\t\tString cbcString = null;\r\n\t\t\t\tString[] cbcBuffer = null;\r\n\t\t\t\tif(result.contains(\"<cbcList>\\n<cbc>\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcbcString = result.split(\"<cbcList>\\n\")[1].split(\"</cbcList>\\n\")[0];\r\n\t\t\t\t\tcbcBuffer = cbcString.split(\"<cbc>\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbcList.clear();\r\n\t\t\t\trelList.clear();\r\n\t\t\t\tcbcList.clear();\r\n\t\t\t\t\r\n\t\t\t\tfor (int k=1;k<bcBuffer.length;k++){\r\n\t\t\t\t\tString bcPath = bcBuffer[k].split(\"<bcPath>\")[1].split(\"</bcPath>\")[0];\r\n\t\t\t\t\tClassInfo ci = new ClassInfo(bcPath, null);\r\n\t\t\t\t\tci.buildClassInfo();\r\n\t\t\t\t\tbcList.add(ci);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int k=1;k<relBuffer.length;k++){\r\n\t\t\t\t\t\r\n\t\t\t\t\tString c1 = relBuffer[k].split(\"<c1>\")[1].split(\"</c1>\")[0];\r\n\t\t\t\t\tString c2 = relBuffer[k].split(\"<c2>\")[1].split(\"</c2>\")[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* PUO' SERVIRE IN FUTURO\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * \r\n\t\t\t\t\tClassInfo ci1 = null,ci2 = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < bcList.size(); i++){\r\n\t\t\t\t\t\tif (bcList.get(i).getClassPathInfo().equals(c1)){\r\n\t\t\t\t\t\t\tci1 = bcList.get(i); \r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < bcList.size(); i++){\r\n\t\t\t\t\t\tif (bcList.get(i).getClassPathInfo().equals(c2)){\r\n\t\t\t\t\t\t\tci2 = bcList.get(i); \r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t\r\n\t\t\t\t\tString type = relBuffer[k].split(\"<type>\")[1].split(\"</type>\")[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\trelList.add(new String[]{c1,c2,type});\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(result.contains(\"<cbcList>\\n<cbc>\")){\r\n\t\t\t\t\tfor (int k=1;k<cbcBuffer.length;k++){\r\n\t\t\t\t\t\tString cbcPath = cbcBuffer[k].split(\"<cbcPath>\")[1].split(\"</cbcPath>\")[0];\r\n\t\t\t\t\t\tComplexClassInfo cci = new ComplexClassInfo(cbcPath, null, null, null);\r\n\t\t\t\t\t\tcci.buildClass(cbcPath);\r\n\t\t\t\t\t\tcbcList.add(cci);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t };\r\n\t\t \r\n\t\r\n\t\r\n\t\t \r\n\t//creo e associo un listener per ogni elemento della tabella delle connessioni\r\n\tconnTable.addListener(SWT.MouseDown, new Listener () {\r\n\t\tpublic void handleEvent (Event event) {\r\n\t\t\tPoint point = new Point (event.x, event.y);\r\n\t\t\tTableItem item = connTable.getItem(point);\r\n\t\t\tif (item != null) {\r\n\t\t\t\tShell shell = parent.getShell();\r\n\t\t\t\tMenu menu = new Menu (shell, SWT.POP_UP);\r\n\t\t\t\tcreateConnMenu(menu,item);\r\n\t\t\t\tmenu.setVisible(true);\r\n\t\t\t\tshell.setMenu (menu);\r\n\t\t\t\tshell.open();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t\r\n\t//associo il Listener\r\n\tbuttonCreate.addListener(SWT.Selection, listenerCreate);\r\n\t//buttonCreate.setLayoutData(data);\r\n\t//connTable.setLayoutData(data);\r\n\t\r\n\t\r\n\t}", "private void paintButton() {\n pauseButton = new JButton(\"PAUSE\");\n shiftButton = new JButton(\"PRINTING\");\n solveButton = new JButton(\"SOLVE\");\n resetButton = new JButton(\"RESET\");\n openButton = new JButton(\"OPEN\");\n exportButton = new JButton(\"EXPORT\");\n\n String sudoTypes[] = {\"4*4\", \"5*5\", \"6*6\", \"7*7\", \"8*8\", \"9*9\"};\n suduTypeComboBox = new JComboBox(sudoTypes);\n suduTypeComboBox.setSelectedIndex(5);\n\n if(mode == PRINTING)\n solveButton.setEnabled(false);\n openButton.setEnabled(false);\n solveButton.setEnabled(true);\n suduTypeComboBox.setEnabled(false);\n\n pauseButton.addActionListener(new pauseEventListener());\n shiftButton.addActionListener(new switchEventListener());\n solveButton.addActionListener(new solveEventListener());\n resetButton.addActionListener(new resetEventListener());\n openButton.addActionListener(new openEventListener());\n exportButton.addActionListener(new exportEventListener());\n suduTypeComboBox.addActionListener(new sudoTypeEventListener());\n\n bottomPanel.setLayout(new FlowLayout());\n bottomPanel.add(Box.createHorizontalGlue());\n bottomPanel.add(pauseButton);\n bottomPanel.add(Box.createHorizontalGlue());\n bottomPanel.add(openButton);\n bottomPanel.add(Box.createHorizontalGlue());\n bottomPanel.add(exportButton);\n bottomPanel.add(Box.createHorizontalGlue());\n bottomPanel.add(solveButton);\n bottomPanel.add(Box.createHorizontalGlue());\n bottomPanel.add(resetButton);\n bottomPanel.add(Box.createHorizontalGlue());\n bottomPanel.add(shiftButton);\n bottomPanel.add(Box.createHorizontalGlue());\n bottomPanel.add(suduTypeComboBox);\n bottomPanel.add(Box.createHorizontalGlue());\n }", "private void helperSwitchSelectOn()\r\n\t{\r\n\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_SELECT_PRESSED);\r\n\r\n\t\tmainFormLink.getComponentToolbar().getComponentButtonSelect().setIcon(iconButton);\r\n\r\n\t\tFormMainMouse.isSampleSelectOn = true;\r\n\t}", "private JButton getVycvik2Button() {\n\t\tif (vycvik2Button == null) {\n\t\t\tvycvik2Button = new JButton();\n\t\t\tvycvik2Button.setBounds(new Rectangle(148, 210, 74, 25));\n\t\t\tvycvik2Button.setEnabled(false);\n\t\t\tvycvik2Button.setText(\"Výcvik\");\n\t\t\tvycvik2Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"2v\";\n\t\t\t\t\tucivoText.setText(\"úroveň 2: Trojzvuky\");\n\t\t\t\t\tcvicenieText.setText(\"Výcvik\");\n\t\t\t\t\tsuzvukText.setText(\"Náhodný trojzvuk\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(2);\n\t\t\t\t\tr = 1;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1], p[2]);\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\tvycvik2Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn vycvik2Button;\n\t}", "@MenuCallback(id=1)\n public void led1BrightnessHasChanged(Object sender, AnalogMenuItem item) {\n }", "private void actionComboboxChangedImage ()\r\n\t{\r\n\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t//---- Check if the project is empty or not\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\tif (isDisplaySamples) { helperDisplayDetectedSamples(); }\r\n\t\t\telse { helperDisplayInputImage(); }\r\n\r\n\t\t\thelperDisplaySamplesCombobox();\r\n\t\t\thelperDisplayResults();\r\n\t\t\thelperDisplayChart(true);\r\n\t\t}\r\n\t}", "@MenuCallback(id=2)\n public void led2BrightnessHasChanged(Object sender, AnalogMenuItem item) {\n }", "private void createAdditionalButtonControls(Composite parent) {\r\n\t\tComposite btnComposite = new Composite(parent, SWT.NONE);\r\n\t\tbtnComposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tButton selAllBtn = new Button(btnComposite, SWT.PUSH);\r\n\t\tselAllBtn.setText(Messages.TOPOLOGY_BTN_SELECT_ALL_TXT);\r\n\t\tselAllBtn.addSelectionListener(new SelectionListener() {\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedUnitsList.setAllChecked(true);\r\n\t\t\t\tupdateSelectedItemsProperty();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton deselAllBtn = new Button(btnComposite, SWT.PUSH);\r\n\t\tdeselAllBtn.setText(Messages.TOPOLOGY_BTN_DESELECT_ALL_TXT);\r\n\t\tdeselAllBtn.addSelectionListener(new SelectionListener() {\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedUnitsList.setAllChecked(false);\r\n\t\t\t\tupdateSelectedItemsProperty();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void initSettingsPanel() {\n JLabel lblName = new JLabel(\"Name:\");\n lblName.setForeground(StyleCompat.textColor());\n\n JTextField fieldName = new JTextField(20);\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblName, fieldName));\n\n JLabel lblVirtOutput = new JLabel(\"VirtualOutput:\");\n lblVirtOutput.setForeground(StyleCompat.textColor());\n\n JComboBox<String> comboVirtOutputs = new JComboBox<>();\n for(Device device : instance.getInterface().getDeviceManager().getDevices()) {\n if(device instanceof VirtualOutput) {\n if(handler != null && instance.getHandlerByVirtualOutput(device.getId()) == handler) {\n comboVirtOutputs.addItem(device.getId());\n comboVirtOutputs.setSelectedIndex(comboVirtOutputs.getItemCount() - 1);\n } else if(!instance.isVirtualOutputUsed(device.getId())) {\n comboVirtOutputs.addItem(device.getId());\n }\n }\n }\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblVirtOutput, comboVirtOutputs));\n\n JLabel lblDeviceId = new JLabel(\"OpenRGB Device ID (index):\");\n lblDeviceId.setForeground(StyleCompat.textColor());\n\n JFormattedTextField fieldDeviceId = new JFormattedTextField(UserInterfaceUtil.getIntFieldFormatter());\n fieldDeviceId.setColumns(5);\n JButton btnAddDeviceId = new JButton(\"Add device\");\n UiUtilsCompat.configureButton(btnAddDeviceId);\n btnAddDeviceId.addActionListener(e -> {\n if(fieldDeviceId.getValue() == null) return;\n int value = (int) fieldDeviceId.getValue();\n if(value < 0 || listDevices.contains(value)) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Invalid ID or list contains already ID.\"));\n return;\n }\n listDevices.add(value);\n fieldDeviceId.setText(\"\");\n updateDeviceListPanel();\n });\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblDeviceId, fieldDeviceId, btnAddDeviceId));\n\n if(instance.getOpenRGB().isConnected()) {\n // show info label, remove all and add all button\n int deviceCount = instance.getOpenRGB().getControllerCount();\n\n JLabel lblCountInfo = new JLabel(\"There are \" + deviceCount + \" devices available.\");\n lblCountInfo.setForeground(StyleCompat.textColor());\n\n JButton btnAddAll = new JButton(\"Add all\");\n UiUtilsCompat.configureButton(btnAddAll);\n btnAddAll.addActionListener(e -> {\n for(int i = 0; i < deviceCount; i++) {\n if(!listDevices.contains(i))\n listDevices.add(i);\n }\n updateDeviceListPanel();\n });\n\n JButton btnRemoveAll = new JButton(\"Remove all\");\n UiUtilsCompat.configureButton(btnRemoveAll);\n btnRemoveAll.addActionListener(e -> {\n listDevices.clear();\n updateDeviceListPanel();\n });\n\n // add components to panel\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblCountInfo, btnAddAll, btnRemoveAll));\n } else {\n // show hint message\n JLabel lblHint = new JLabel(\"(i) Go back and connect the client to receive live data from the SDK server.\");\n lblHint.setForeground(StyleCompat.textColorDarker());\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblHint));\n }\n\n panelDeviceList = new JPanel();\n panelDeviceList.setBackground(StyleCompat.panelDarkBackground());\n panelDeviceList.setLayout(new BoxLayout(panelDeviceList, BoxLayout.Y_AXIS));\n panelDeviceList.setAlignmentX(Component.LEFT_ALIGNMENT);\n panelSettings.add(Box.createVerticalStrut(10));\n panelSettings.add(panelDeviceList);\n updateDeviceListPanel();\n\n if(handler != null) {\n // set stored values\n fieldName.setText(handler.getName());\n }\n\n JButton btnAdd = new JButton(handler == null ? \"Add OpenRGB Device\" : \"Save OpenRGB Device\");\n UiUtilsCompat.configureButton(btnAdd);\n btnAdd.setAlignmentX(Component.LEFT_ALIGNMENT);\n btnAdd.setMaximumSize(new Dimension(Integer.MAX_VALUE, 50));\n btnAdd.setMinimumSize(new Dimension(100, 50));\n\n btnAdd.addActionListener(e -> {\n // create value holder\n ValueHolder holder = new ValueHolder(\n fieldName.getText(),\n (String) comboVirtOutputs.getSelectedItem(),\n listDevices);\n\n if(validateInput(holder.getName(), holder.getOutputId())) {\n // get output\n VirtualOutput output = OpenRgbPlugin.getVirtualOutput(instance.getInterface().getDeviceManager(), holder.getOutputId());\n if (output == null) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Could not find virtual output for id \" + holder.getOutputId()));\n return;\n }\n\n if(handler != null) { // set values to output handler\n handler.setName(holder.getName());\n handler.setDevices(listDevices);\n handler.setVirtualOutput(output);\n } else { // create new output handler\n // create new handler\n OutputHandler handler = instance.createHandler(holder, output);\n // add handler to set\n instance.addHandler(handler);\n }\n\n // go back\n context.navigateDown();\n }\n });\n\n panelSettings.add(Box.createVerticalGlue());\n panelSettings.add(btnAdd);\n }", "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "private JButton getVycvik1Button() {\n\t\tif (vycvik1Button == null) {\n\t\t\tvycvik1Button = new JButton();\n\t\t\tvycvik1Button.setText(\"Výcvik\");\n\t\t\tvycvik1Button.setEnabled(false);\n\t\t\tvycvik1Button.setSize(new Dimension(74, 25));\n\t\t\tvycvik1Button.setLocation(new Point(148, 166));\n\t\t\tvycvik1Button.setVisible(true);\n\t\t\tvycvik1Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"1v\";\n\t\t\t\t\tucivoText.setText(\"úroveň 1: Základné a rozšírené intervaly\");\n\t\t\t\t\tcvicenieText.setText(\"Výcvik\");\n\t\t\t\t\tsuzvukText.setText(\"Náhodný interval\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\tr = 0;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1], p[2]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn vycvik1Button;\n\t}", "ColorSelectionDialog() {\n initComponents();\n }", "@FXML\n private void pickDiscFour() {\n activeDisc = \"Disc 4\";\n discSwitchButton.setText(\"Disc 4\");\n displayFilesFromDisc();\n }", "public JComponent addAux2(Color color)\n {\n Category category = new Category(this, \"Aux 2 FX\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n final HBox chorus = new HBox();\n \n comp = new LabelledDial(\"High\", this, \"aux2highdamp\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Damp\");\n chorus.add(comp);\n \n comp = new LabelledDial(\"Time\", this, \"aux2time\", color, 0, 127);\n chorus.add(comp);\n \n VBox vbox = new VBox();\n params = AUX_FX_2_TYPES;\n comp = new Chooser(\"Type\", this, \"aux2type\", params)\n {\n public void update(String key, Model model)\n {\n super.update(key, model);\n hbox.removeLast();\n if (model.get(\"aux2type\", 0) != 2) // anything but phaser\n {\n hbox.addLast(chorus);\n }\n hbox.revalidate();\n hbox.repaint();\n }\n }; \n vbox.add(comp);\n\n comp = new CheckBox(\"Enable\", this, \"aux2mode\");\n vbox.add(comp);\n\n hbox.add(vbox);\n hbox.addLast(chorus);\n \n comp = new LabelledDial(\"Send\", this, \"aux2toaux1\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"To Aux 1\");\n hbox.add(comp);\n \n comp = new LabelledDial(\"Depth\", this, \"aux2depth\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre LP\", this, \"aux2prelp\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre HP\", this, \"aux2prehp\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Feedback\", this, \"aux2feedback\", color, 0, 127);\n hbox.add(comp);\n\n // The manual says this goes to 123. An Vyzex has no MIDI clock sync for this.\n // But quite a number of preset patches go clear to 127. Discussion with Jan Bote\n // makes it more likely that this LFO is just like the others -- it goes 0-110\n // for basic rates, then 110-127 for MIDI synced rates. So that's what I'm doing.\n comp = new LabelledDial(\"LFO\", this, \"aux2lforate\", color, 0, 127)\n {\n public String map(int value)\n {\n if (value < 111) return \"\" + value;\n else return TEMPO_SYNCS[value - 111];\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Rate\");\n hbox.add(comp);\n model.setMetricMax(\"aux2lforate\", 110);\n\n comp = new LabelledDial(\"LFO\", this, \"aux2lfodepth\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Depth\");\n hbox.add(comp);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "@SuppressWarnings(\"deprecation\")\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tswitch(cbAlgorithm.getSelectedItem().toString()) {\n\t\t\t\tcase \"DES\":\n\t\t\t\t\ttxtEnter.enable();\n\t\t\t\t\ttxtKeyHex.setVisible(true);\n\t\t\t\t\tpanelSelectKey.setVisible(false);\n\t\t\t\t\tcbKeyLength.setModel(new DefaultComboBoxModel(DESKeyLength));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"AES\":\n\t\t\t\t\ttxtEnter.enable();\n\t\t\t\t\ttxtKeyHex.setVisible(true);\n\t\t\t\t\tpanelSelectKey.setVisible(false);\n\t\t\t\t\tcbKeyLength.setModel(new DefaultComboBoxModel(AESKeyLength));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"RSA\":\n\t\t\t\t\ttxtEnter.disable();\n\t\t\t\t\ttxtKeyHex.setVisible(false);\n\t\t\t\t\tpanelSelectKey.setVisible(true);\n\t\t\t\t\tcbKeyLength.setModel(new DefaultComboBoxModel(RSAKeyLength));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "public void initGui() {\n/* 34 */ Keyboard.enableRepeatEvents(true);\n/* 35 */ this.buttonList.clear();\n/* 36 */ this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format(\"selectServer.select\", new Object[0])));\n/* 37 */ this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format(\"gui.cancel\", new Object[0])));\n/* 38 */ this.ipEdit = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, 116, 200, 20);\n/* 39 */ this.ipEdit.setMaxStringLength(128);\n/* 40 */ this.ipEdit.setFocused(true);\n/* 41 */ this.ipEdit.setText(this.mc.gameSettings.lastServer);\n/* 42 */ ((GuiButton)this.buttonList.get(0)).enabled = (!this.ipEdit.getText().isEmpty() && (this.ipEdit.getText().split(\":\")).length > 0);\n/* */ }", "void onConfigureClick(long id);", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblEnabled = new javax.swing.JLabel();\n cbInstrument = new javax.swing.JComboBox();\n cbIcons = new javax.swing.JComboBox();\n lblDisabled = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n org.openide.awt.Mnemonics.setLocalizedText(lblEnabled, org.openide.util.NbBundle.getMessage(IconsVisualTest.class, \"IconsVisualTest.lblEnabled.text\")); // NOI18N\n\n cbInstrument.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"KLAVIER\", \"GESANG\", \"HARFE\", \"ENSEMBLE\", \"POP\", \"NEUEMUSIK\", \" \" }));\n cbInstrument.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cbInstrumentActionPerformed(evt);\n }\n });\n\n cbIcons.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n cbIcons.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cbIconsActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(lblDisabled, org.openide.util.NbBundle.getMessage(IconsVisualTest.class, \"IconsVisualTest.lblDisabled.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(IconsVisualTest.class, \"IconsVisualTest.jLabel1.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(IconsVisualTest.class, \"IconsVisualTest.jLabel2.text\")); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cbInstrument, 0, 206, Short.MAX_VALUE)\n .addComponent(cbIcons, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(lblEnabled, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblDisabled, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblEnabled, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblDisabled, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(19, 19, 19)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbIcons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(9, 9, 9)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbInstrument, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(128, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void openModeOptions2X() {\n if (mDevice.hasObject(By.res(UI_PACKAGE_NAME, \"mode_options_buttons\"))) {\n return;\n }\n // Before openning the mode option, close the menu if the menu is open\n closeMenu();\n waitForVideoShutterEnabled();\n // Open the mode options to check HDR mode\n UiObject2 modeoptions = getModeOptionsMenuButton();\n if (modeoptions != null) {\n modeoptions.click();\n // If succeeded, the hdr toggle button should be visible.\n mDevice.wait(Until.hasObject(By.res(UI_PACKAGE_NAME, \"hdr_plus_toggle_button\")),\n DIALOG_TRANSITION_WAIT);\n } else {\n throw new UnknownUiException(\n \"Fail to find modeoption button when trying to check HDR mode\");\n }\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n lblPlatform = new javax.swing.JLabel();\n platformComboBox = new javax.swing.JComboBox();\n btnManagePlatforms = new javax.swing.JButton();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 100), new java.awt.Dimension(0, 0));\n progressLabel = new javax.swing.JLabel();\n progressPanel = new javax.swing.JPanel();\n\n setLayout(new java.awt.GridBagLayout());\n\n lblPlatform.setLabelFor(platformComboBox);\n lblPlatform.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_ComboBox\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 12);\n add(lblPlatform, gridBagConstraints);\n lblPlatform.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_labelPlatform\")); // NOI18N\n lblPlatform.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_labelPlatform\")); // NOI18N\n\n platformComboBox.setModel(platformsModel);\n platformComboBox.setRenderer(platformsCellRenderer);\n platformComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n platformComboBoxItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.weightx = 0.1;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);\n add(platformComboBox, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(btnManagePlatforms, org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_PanelOptions_Manage_Button\")); // NOI18N\n btnManagePlatforms.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnManagePlatformsActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_TRAILING;\n gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n add(btnManagePlatforms, gridBagConstraints);\n btnManagePlatforms.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_buttonManagePlatforms\")); // NOI18N\n btnManagePlatforms.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_buttonManagePlatforms\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.weighty = 0.1;\n add(filler1, gridBagConstraints);\n\n progressLabel.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_Progress\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n add(progressLabel, gridBagConstraints);\n progressLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_platformProgress\")); // NOI18N\n progressLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_platformProgress\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 0.1;\n add(progressPanel, gridBagConstraints);\n }", "public void InitAVComCtl(){\n\n\n\t\tmBtnStart = (Button) findViewById(R.id.btn_start);\n\t\tmBtnStop = (Button) findViewById(R.id.btn_stop);\n\t\tmBtnSetting = (Button) findViewById(R.id.btn_setting);\n\t\tmBtnChooseCam = (Button) findViewById(R.id.btn_choosecam);\n\n\t\tonStartClickEvent();\n\t\tonStopClickEvent();\n\t\tonSettingClickEvent();\n\t\tgetStatToDisplay();\n\n\t\tonChooseCamClickEvent();\n\n\t\tconfigInfo = getSharedPreferences(\"AdvideoConfig\", Context.MODE_PRIVATE);\n\t\tinitViewConfig();\n\t}", "public abstract void initButton(int buttonIndex);", "private void initComponents() {\n // Create the RGB and the HSB radio buttons.\n createRgbHsbButtons();\n\n \n \n ColorData initial = new ColorData(new RGB(255, 255, 255), 255);\n\n // Create the upper color wheel for the display.\n upperColorWheel = new ColorWheelComp(shell, this, upperWheelTitle);\n // upperColorWheel.setColor(colorArray.get(0));\n upperColorWheel.setColor(initial);\n\n // Create the color bar object that is displayed\n // in the middle of the dialog.\n colorBar = new ColorBarViewer(shell, this, sliderText, cmapParams);\n\n // Create the lower color wheel for the display.\n lowerColorWheel = new ColorWheelComp(shell, this, lowerWheelTitle);\n // lowerColorWheel.setColor(colorArray.get(colorArray.size() - 1));\n lowerColorWheel.setColor(initial);\n\n // Create the bottom control buttons.\n createBottomButtons();\n }", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "private void generateTogglePen () {\n HBox toggleBox = new HBox();\n ToggleButton penToggle = new ToggleButton(); // Up is false\n createPenToggleString(penToggle);\n penToggle.selectedProperty().addListener(e -> togglePenStatus(penToggle));\n toggleBox.getChildren().addAll(new Text(myStringResources.getString(\"penToggle\")),\n penToggle);\n myDialogVBox.getChildren().add(toggleBox);\n }", "public void createControl(Composite parent) {\n Group group = SWTFactory.createGroup(parent, PDEUIMessages.ProfileBlock_0, 1, 1, GridData.FILL_HORIZONTAL);\n fGenerateProfileButton = SWTFactory.createCheckButton(group, PDEUIMessages.ProfileBlock_1, null, false, 1);\n fGenerateProfileButton.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n fTab.updateLaunchConfigurationDialog();\n }\n });\n }", "private void dvdRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dvdRadioActionPerformed\n itemList.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select a DVD\", \"Monsters University\", \"The Avengers\", \"The Great Gatsby\" }));\n }", "public jHistorialSeleccionarVoluntario() {\n initComponents();\n \n \n }", "public void createControl(Composite parent) \r\n\t{\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\r\n\t\tsetControl(container);\r\n\t\t\r\n\t\tSelectionAdapter listener1 = new SelectionAdapter() {\r\n\t public void widgetSelected(SelectionEvent e) {\r\n\t \t if (btnFirstOption.getSelection()){\r\n\t \t\t btnSecondOption.setSelection(false);\r\n\t \t\t btnThirdOption.setSelection(false);\r\n\t \t }\t \t \r\n\t }\r\n\t };\r\n\t SelectionAdapter listener2 = new SelectionAdapter() {\r\n\t \tpublic void widgetSelected(SelectionEvent e) {\r\n\t \t\tif (btnSecondOption.getSelection()){\r\n\t\t \t\t btnFirstOption.setSelection(false);\r\n\t\t \t }\r\n\t \t\tif (btnThirdOption.getSelection()){\r\n\t\t \t\t btnFirstOption.setSelection(false);\r\n\t\t \t } \r\n\t \t}\r\n\t };\r\n\t \r\n\t\tbtnFirstOption = new Button(container, SWT.CHECK);\r\n\t\tbtnFirstOption.setBounds(10, 10, 20, 59);\r\n\t\tbtnFirstOption.addSelectionListener(listener1);\r\n\t\t\r\n\t\tbtnSecondOption = new Button(container, SWT.CHECK | SWT.WRAP);\r\n\t\tbtnSecondOption.setBounds(10, 75, 20, 85);\r\n\t\tbtnSecondOption.addSelectionListener(listener2);\r\n\t\t\r\n\t\tbtnThirdOption = new Button(container, SWT.CHECK | SWT.WRAP);\r\n\t\tbtnThirdOption.setBounds(292, 75, 20, 85);\r\n\t\tbtnThirdOption.addSelectionListener(listener2);\r\n\t\t\r\n\t\tyesList = new List(container,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);\r\n\t\tyesList.setBounds(36, 166, 224, 106);\r\n\t\t\r\n\t\tfor(Property p: hetColl.getMemberEnds())\r\n\t\t{\t\t\r\n\t\t\tType type = p.getType();\r\n\t\t\tyesList.add(getStereotype(type)+\" \"+type.getName());\t\t\t\r\n\t\t}\r\n\t\tyesList.setSelection(0);\r\n\t\t\r\n\t\tbtnArrowRight = new Button(container, SWT.NONE);\r\n\t\tbtnArrowRight.setBounds(266, 181, 40, 25);\r\n\t\tbtnArrowRight.setText(\"->\");\r\n\t\tbtnArrowRight.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\tfor(String str: yesList.getSelection()){\r\n\t\t\t\t\tif(!contains(noList,str)) { noList.add(str); noList.select(noList.indexOf(str)); } \r\n\t\t\t\t}\r\n\t\t\t\tif(yesList.getSelectionIndex()>=0) { \r\n\t\t\t\t\tint prev = yesList.getSelectionIndex()-1;\r\n\t\t\t\t\tyesList.remove(yesList.getSelectionIndex());\r\n\t\t\t\t\tyesList.select(prev); \r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbtnArrowLeft = new Button(container, SWT.NONE);\r\n\t\tbtnArrowLeft.setBounds(266, 212, 40, 25);\r\n\t\tbtnArrowLeft.setText(\"<-\");\r\n\t\tbtnArrowLeft.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\tfor(String str: noList.getSelection()){\r\n\t\t\t\t\tif(!contains(yesList,str)) { yesList.add(str); yesList.select(yesList.indexOf(str)); } \r\n\t\t\t\t}\r\n\t\t\t\tif(noList.getSelectionIndex()>=0) {\r\n\t\t\t\t\tint prev = noList.getSelectionIndex()-1;\r\n\t\t\t\t\tnoList.remove(noList.getSelectionIndex());\r\n\t\t\t\t\tnoList.select(prev);\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\tnoList = new List(container, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);\r\n\t\tnoList.setBounds(318, 166, 224, 106);\r\n\t\t\r\n\t\tlblFirstOption = new Text(container, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tlblFirstOption.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tlblFirstOption.setBounds(36, 10, 506, 59);\t\t\r\n\t\tlblFirstOption.setText(hetColl.getWhole().getName()+\" is a functional complex and all partOf relations are stereotyped as «componentOf»\");\r\n\t\t\r\n\t\tlblSecondOption = new Text(container, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tlblSecondOption.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tlblSecondOption.setBounds(36, 75, 224, 85);\r\n\t\tlblSecondOption.setText(\"New Label\");\r\n\t\tlblSecondOption.setText(\"The parts are also collectives and their respective relations are stereotyped as «subCollectionOf»\");\r\n\t\t\r\n\t\tlblThirdOption = new Text(container, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tlblThirdOption.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tlblThirdOption.setBounds(318, 75, 224, 85);\r\n\t\tlblThirdOption.setText(\"There is a new type, named MemberPart, which is the super-type of all parts and is connected to \"+hetColl.getWhole().getName()+\" through a single «memberOf» relation. In addition, all other partOf relations are deleted.\");\r\n\t}", "private JButton getJbChangeEnquirer() {\r\n if (this.jbChangeEnquirer == null) {\r\n this.jbChangeEnquirer = new JButton();\r\n this.jbChangeEnquirer.setText(\"Change\");\r\n this.jbChangeEnquirer.setSize(new Dimension(140, 15));\r\n this.jbChangeEnquirer.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent e) {\r\n getNewEnquirer();\r\n }\r\n });\r\n }\r\n return this.jbChangeEnquirer;\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jColorChooser5 = new javax.swing.JColorChooser();\n couleur = new javax.swing.JButton();\n type_ligne = new javax.swing.JComboBox<>();\n libre = new javax.swing.JToggleButton();\n rectangle = new javax.swing.JToggleButton();\n cercle = new javax.swing.JToggleButton();\n ligne = new javax.swing.JToggleButton();\n selection = new javax.swing.JToggleButton();\n remplissage = new javax.swing.JToggleButton();\n jSeparator12 = new javax.swing.JSeparator();\n jSeparator10 = new javax.swing.JSeparator();\n jSeparator9 = new javax.swing.JSeparator();\n jSeparator7 = new javax.swing.JSeparator();\n jSeparator4 = new javax.swing.JSeparator();\n jSeparator8 = new javax.swing.JSeparator();\n jSeparator11 = new javax.swing.JSeparator();\n\n setBackground(new java.awt.Color(0, 0, 0));\n setMinimumSize(new java.awt.Dimension(40, 600));\n\n couleur.setBackground(new java.awt.Color(24, 44, 97));\n couleur.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/appdessin/images/couleur.png\"))); // NOI18N\n couleur.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n couleurMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n couleurMouseExited(evt);\n }\n });\n couleur.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n couleurActionPerformed(evt);\n }\n });\n\n type_ligne.setBackground(new java.awt.Color(0, 0, 0));\n type_ligne.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n type_ligne.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"basic\", \"dashed\", \"lvl3\" }));\n type_ligne.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n type_ligneActionPerformed(evt);\n }\n });\n\n libre.setBackground(new java.awt.Color(24, 44, 97));\n libre.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/appdessin/images/libre.png\"))); // NOI18N\n libre.setActionCommand(\"libre\");\n libre.setOpaque(true);\n libre.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n libreMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n libreMouseExited(evt);\n }\n });\n libre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n libreActionPerformed(evt);\n }\n });\n\n rectangle.setBackground(new java.awt.Color(24, 44, 97));\n rectangle.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/appdessin/images/rectangle.png\"))); // NOI18N\n rectangle.setActionCommand(\"rectangle\");\n rectangle.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n rectangleMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n rectangleMouseExited(evt);\n }\n });\n rectangle.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rectangleActionPerformed(evt);\n }\n });\n\n cercle.setBackground(new java.awt.Color(24, 44, 97));\n cercle.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/appdessin/images/cercle.png\"))); // NOI18N\n cercle.setActionCommand(\"cercle\");\n cercle.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n cercleMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n cercleMouseExited(evt);\n }\n });\n cercle.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cercleActionPerformed(evt);\n }\n });\n\n ligne.setBackground(new java.awt.Color(24, 44, 97));\n ligne.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/appdessin/images/ligne.png\"))); // NOI18N\n ligne.setActionCommand(\"ligne\");\n ligne.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n ligneMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n ligneMouseExited(evt);\n }\n });\n ligne.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ligneActionPerformed(evt);\n }\n });\n\n selection.setBackground(new java.awt.Color(24, 44, 97));\n selection.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/appdessin/images/selection.png\"))); // NOI18N\n selection.setActionCommand(\"selection\");\n selection.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n selectionMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n selectionMouseExited(evt);\n }\n });\n selection.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectionActionPerformed(evt);\n }\n });\n\n remplissage.setBackground(new java.awt.Color(24, 44, 97));\n remplissage.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/appdessin/images/fill.png\"))); // NOI18N\n remplissage.setActionCommand(\"selection\");\n remplissage.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n remplissageMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n remplissageMouseExited(evt);\n }\n });\n remplissage.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n remplissageActionPerformed(evt);\n }\n });\n\n jSeparator12.setForeground(new java.awt.Color(255, 255, 255));\n\n jSeparator10.setForeground(new java.awt.Color(255, 255, 255));\n\n jSeparator9.setForeground(new java.awt.Color(255, 255, 255));\n\n jSeparator7.setForeground(new java.awt.Color(255, 255, 255));\n\n jSeparator4.setForeground(new java.awt.Color(255, 255, 255));\n\n jSeparator8.setForeground(new java.awt.Color(255, 255, 255));\n\n jSeparator11.setForeground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(type_ligne, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jSeparator9)\n .addComponent(jSeparator12, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(libre, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)\n .addComponent(ligne, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cercle, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(rectangle, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(selection, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jSeparator10, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(remplissage, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE))\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(couleur, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jSeparator7, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator4, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator8, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator11))\n .addGap(138, 138, 138))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addComponent(libre)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(ligne)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cercle, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rectangle, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(couleur)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator9, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(selection, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator10, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(3, 3, 3)\n .addComponent(remplissage, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(type_ligne, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(47, Short.MAX_VALUE))\n );\n }", "@Override\n protected void addControls() {\n super.addControls(); //Adds parent controls\n //adds the button for our 2016 filter (VisionFilter2016.java)\n addImageProcessingButton(\"No Filter\", new TargetFilter(0)); \n addImageProcessingButton(\"Color Filter\", new TargetFilter(1));\n addImageProcessingButton(\"Classic Filter\", new TargetFilter(3));\n addImageProcessingButton(\"Bounding Filter\", new TargetFilter(4));\n addImageProcessingButton(\"Cube Filter\", new TargetFilter(5));\n \n JButton button = new JButton(createSaveConfig());\n\t\taddControl(button);\n }", "private void createEncodingPanel(final Composite fpcomp, final Vector<String> encodeType) {\n\t\t//\n\t\t// Create panel\n\t\t//\n\t\tComposite encodingPanel = new Composite(fpcomp, SWT.NONE);\n\t\tencodingPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 2;\n\t\tlayout.horizontalSpacing = 5;\n\t\tlayout.verticalSpacing = 0;\n\t\tlayout.marginWidth = 0;\n\t\tlayout.marginHeight = 0;\n\t\tencodingPanel.setLayout(layout);\n\n\t\t//\n\t\t// Create label\n\t\t//\n\t\tnew Label(encodingPanel, SWT.NONE).setText(Messages.HexEditorControl_30);\n\n\t\t//\n\t\t// Create combo\n\t\t//\n\t\tencodingCombo = getEncodingCombo(encodingPanel, encodeType);\n\n\t\t//\n\t\t// Add selection listener to the combo box\n\t\t//\n\t\tencodingCombo.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n public void widgetSelected(SelectionEvent e) {\n\t\t\t\tencodingChanged();\n\t\t\t} // widgetSelected()\n\t\t});\n\t}", "protected void addActivePathToolbarButton ()\n {\n\n }", "private void initiateChoiceButtons() {\n\t\trock = new JButton(\"Rock\");\n\t\trock.setPreferredSize(selectionButtonSize);\n\t\tpaper = new JButton(\"Paper\");\n\t\tpaper.setPreferredSize(selectionButtonSize);\n\t\tscissors = new JButton(\"Scissors\");\n\t\tscissors.setPreferredSize(selectionButtonSize);\n\n\t\taddButtonListener();\n\t}", "void toggleToolboxButton(JButton button){\r\n // Reset Selections\r\n Selection.setSelected(false);\r\n Wire.setSelected(false);\r\n RotateRight.setEnabled(true);\r\n RotateLeft.setEnabled(true);\r\n InsertSubComponent.setSelected(false);\r\n\r\n // Select this button\r\n button.setSelected(true);\r\n \r\n optionsPanel.setVisible(false);\r\n circuitPanel.removeUnfixedComponents();\r\n }", "public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }", "private void initButtonStates() {\n//\t\tString provMethod = ProvisioningActivator.getProvisioningService().getProvisioningMethod();\n//\t\tboolean isProvEnabled = (provMethod != null && provMethod.length() > 0 && !provMethod.equals(\"NONE\"));\n//\n//\t\tenableCheckBox.setSelected(isProvEnabled);\n//\n//\t\tif (isProvEnabled) {\n//\t\t\tif (provMethod.equals(\"DHCP\"))\n//\t\t\t\tdhcpButton.setSelected(true);\n//\t\t\telse if (provMethod.equals(\"DNS\"))\n//\t\t\t\tdnsButton.setSelected(true);\n//\t\t\telse if (provMethod.equals(\"Bonjour\"))\n//\t\t\t\tbonjourButton.setSelected(true);\n//\t\t\telse if (provMethod.equals(\"Manual\")) {\n//\t\t\t\tmanualButton.setSelected(true);\n//\n//\t\t\t\tString uri = ProvisioningActivator.getProvisioningService().getProvisioningUri();\n//\t\t\t\tif (uri != null)\n//\t\t\t\t\turiField.setText(uri);\n//\t\t\t}\n//\t\t}\n//\n//\t\tdhcpButton.setEnabled(isProvEnabled);\n//\t\tmanualButton.setEnabled(isProvEnabled);\n//\t\turiField.setEnabled(manualButton.isSelected());\n//\t\tbonjourButton.setEnabled(isProvEnabled);\n//\t\tdnsButton.setEnabled(false);\n//\n//\t\t// creadentials\n//\t\tforgetPasswordButton.setEnabled(isProvEnabled);\n//\t\tusernameField.setText(ProvisioningActivator.getConfigurationService().getString(ProvisioningServiceImpl.PROPERTY_PROVISIONING_USERNAME));\n//\n//\t\tif (ProvisioningActivator.getCredentialsStorageService().isStoredEncrypted(ProvisioningServiceImpl.PROPERTY_PROVISIONING_PASSWORD)) {\n//\t\t\tpasswordField.setText(ProvisioningActivator.getCredentialsStorageService().loadPassword(ProvisioningServiceImpl.PROPERTY_PROVISIONING_PASSWORD));\n//\t\t}\n\t}", "public void clickOnVehicleNameDropdownButton() {\r\n\t\tsafeClick(vehicleLinkPath.replace(\"ant-card-head-title\", \"ant-select ant-select-enabled\"), MEDIUMWAIT);\r\n\t}", "private void buildColorSelector(JPanel panel) {\n colorChooserButton = new JLabel();\n colorChooserButton.setPreferredSize(new Dimension(16, 16));\n colorChooserButton.setVerticalAlignment(JLabel.CENTER);\n colorChooserButton.setBackground(Color.WHITE);\n colorChooserButton.setOpaque(true);\n colorChooserButton.setBorder(BorderFactory.createLineBorder(Color.black));\n colorChooserButton.addMouseListener(ApplicationFactory.INSTANCE\n .getNewColorChooserListener(this));\n panel.add(colorChooserButton, \"wrap\");\n }", "private void devBtnActionPerformed(ActionEvent evt) {\n }", "public static void chsrInit(){\n for(int i = 0; i < chsrDesc.length; i++){\n chsr.addOption(chsrDesc[i], chsrNum[i]);\n }\n chsr.setDefaultOption(chsrDesc[2] + \" (Default)\", chsrNum[2]); //Default MUST have a different name\n SmartDashboard.putData(\"JS/Choice\", chsr);\n SmartDashboard.putString(\"JS/Choosen\", chsrDesc[chsr.getSelected()]); //Put selected on sdb\n }", "private JButton getVycvik3Button() {\n\t\tif (vycvik3Button == null) {\n\t\t\tvycvik3Button = new JButton();\n\t\t\tvycvik3Button.setBounds(new Rectangle(148, 253, 74, 25));\n\t\t\tvycvik3Button.setEnabled(false);\n\t\t\tvycvik3Button.setText(\"Výcvik\");\n\t\t\tvycvik3Button.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"3v\";\n\t\t\t\t\tucivoText.setText(\"úroveň 3: Ľubovoľné súzvuky\");\n\t\t\t\t\tcvicenieText.setText(\"Výcvik\");\n\t\t\t\t\tsuzvukText.setText(\"Náhodný súzvuk\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tint[] p;\n\n\t\t\t\t\tint r = rand.nextInt(3);\n\t\t\t\t\t// r = 0;\n\t\t\t\t\tswitch (r) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36, rand\n\t\t\t\t\t\t\t\t.nextInt(13));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tp = new int[2];\n\t\t\t\t\t\twhile (p[0] == p[1]) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Trojzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tp = new int[3];\n\t\t\t\t\t\twhile ((p[0] == p[1]) || (p[1] == p[2])\n\t\t\t\t\t\t\t\t|| (p[0] == p[2])) {\n\t\t\t\t\t\t\tp[0] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[1] = rand.nextInt(13);\n\t\t\t\t\t\t\tp[2] = rand.nextInt(13);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tArrays.sort(p);\n\t\t\t\t\t\tpriklad = new Stvorzvuk(rand.nextInt(49) + 36, p[0],\n\t\t\t\t\t\t\t\tp[1], p[2]);\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\treturn vycvik3Button;\n\t}", "public void updateChooser()\r\n\t{\r\n\t\t/*\twhat shall we do here ? */\r\n\t}", "private void m6584A() {\n this.f5414ea = C1387D.m6761a();\n if (this.f5414ea) {\n this.f5405Y.setParameters(\"audio_recordaec_enable=1\");\n this.f5410ca.setImageResource(R.drawable.btn_aec_on_selector);\n return;\n }\n this.f5405Y.setParameters(\"audio_recordaec_enable=0\");\n this.f5410ca.setImageResource(R.drawable.btn_aec_off_selector);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n mAudioManagerEx.setAudioDeviceActive(usb_device, AudioManagerEx.AUDIO_OUTPUT_ACTIVE);\n }", "private void actionSampleDetectionModeChanged ()\r\n\t{\r\n\t\tif (mainFormLink.getComponentPanelLeft().getComponentRadioModeAuto().isSelected())\r\n\t\t{\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAdd().setEnabled(false);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAddControl().setEnabled(false);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleDelete().setEnabled(false);\r\n\t\t}\r\n\r\n\t\tif (mainFormLink.getComponentPanelLeft().getComponentRadioModeManual().isSelected())\r\n\t\t{\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAdd().setEnabled(true);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAddControl().setEnabled(true);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleDelete().setEnabled(true);\r\n\t\t}\r\n\t}", "private void handleDDCTypeChange() {\n\t\tString ddc = cbDDC.getText();\n\n\t\tif (optionC[1].equals(ddc)) {\n\t\t\ttxtDDC_minPerLR.setEnabled(true);\n\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t} else {\n\t\t\ttxtDDC_minPerLR.setText(EMPTYSTRING);\n\t\t\ttxtDDC_minPerLR.setEnabled(false);\n\n\t\t\tif (optionC[0].equals(ddc)) {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t\t} else {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(false);\n\t\t\t\ttxtDDC_chargeArticle.setText(EMPTYSTRING);\n\t\t\t}\n\t\t}\n\t}", "public void onClick(DialogInterface dialog,int id) {\n showRoboboDeviceSelectionDialog();\n\n }", "private void setupChangeVoice() {\n\t\tFestivalVoice[] voices={FestivalVoice.Kiwi, FestivalVoice.British, FestivalVoice.American};\n\t\tfinal JComboBox voice_chooser = new JComboBox(voices);\n\t\tvoice_chooser.setFont(new Font(\"Arial\", Font.PLAIN, 20));\n\t\tvoice_chooser.setForeground(Color.BLACK);\n\t\tvoice_chooser.setBackground(Color.WHITE);\n\n\t\t//set shown item to be the current voice\n\t\tvoice_chooser.setSelectedItem(parent_frame.getFestival().getFestivalVoice());\n\t\tvoice_chooser.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t\tif((FestivalVoice)voice_chooser.getSelectedItem()!=null){\n\t\t\t\t\tparent_frame.getFestival().setFestivalVoice((FestivalVoice)voice_chooser.getSelectedItem());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tvoice_chooser.setBounds(919, 600, 154, 40);\n\t\tadd(voice_chooser);\n\t}", "public DeviceSelectionComponentBase() {\n initComponents();\n }", "@Override\n\t\tpublic void postInit(){\n\t\tsuper.postInit();\n\t\tthis.buttonList.add(this.readDescription = new GuiButton(6, this.width - 110, 2, 100, 20, \"World Description\"));\n\t\tthis.readDescription.enabled = false;\n\t}", "public final JButton getDefaultSPViewEditDescButton() {\n return defaultSPViewEditDescButton;\n }", "public void makeAcquireButton() {\r\n JButton acquire = new JButton(\"Acquire a new champion with Blue Essence\");\r\n new Button(acquire, main);\r\n// acquire.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// acquire.setPreferredSize(new Dimension(2500, 100));\r\n// acquire.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n acquire.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n acquireChampionUsingBlueEssence();\r\n }\r\n });\r\n// main.add(acquire);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnSetupCompleted = new javax.swing.JToggleButton();\n txtDummyGenerator = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n org.openide.awt.Mnemonics.setLocalizedText(btnSetupCompleted, org.openide.util.NbBundle.getMessage(DebugConfigurationDialog.class, \"DebugConfigurationDialog.btnSetupCompleted.text\")); // NOI18N\n btnSetupCompleted.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSetupCompletedActionPerformed(evt);\n }\n });\n\n txtDummyGenerator.setEditable(false);\n txtDummyGenerator.setText(org.openide.util.NbBundle.getMessage(DebugConfigurationDialog.class, \"DebugConfigurationDialog.txtDummyGenerator.text\")); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtDummyGenerator)\n .addComponent(btnSetupCompleted, javax.swing.GroupLayout.DEFAULT_SIZE, 370, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(txtDummyGenerator, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSetupCompleted)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public JComponent addAux1(Color color)\n {\n Category category = new Category(this, \"Aux 1 FX\", color);\n \n JComponent comp;\n String[] params;\n final HBox hbox = new HBox();\n\n final HBox reverb = new HBox();\n \n comp = new LabelledDial(\"Time\", this, \"aux1time\", color, 0, 127);\n reverb.add(comp);\n \n comp = new LabelledDial(\"Tone\", this, \"aux1tonegain\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Gain\");\n reverb.add(comp);\n \n comp = new LabelledDial(\"Tone\", this, \"aux1tonefreq\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Frequency\");\n reverb.add(comp);\n\n comp = new LabelledDial(\"Gate\", this, \"aux1gatethresh\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Threshold\");\n reverb.add(comp);\n \n final HBox echo = new HBox();\n \n comp = new LabelledDial(\"Feedback\", this, \"aux1feedback\", color, 0, 127);\n echo.add(comp);\n \n VBox vbox = new VBox();\n params = AUX_FX_1_TYPES;\n comp = new Chooser(\"Type\", this, \"aux1type\", params)\n {\n public void update(String key, Model model)\n {\n super.update(key, model);\n hbox.removeLast();\n if (model.get(\"aux1type\", 0) <= 2) // reverb\n {\n hbox.addLast(reverb);\n }\n else // echo\n {\n hbox.addLast(echo);\n }\n hbox.revalidate();\n hbox.repaint();\n }\n }; \n vbox.add(comp);\n\n comp = new CheckBox(\"Enable\", this, \"aux1mode\");\n vbox.add(comp);\n\n hbox.add(vbox);\n hbox.addLast(reverb);\n \n /// The manual says this only goes to 123, but in fact it goes to 127\n comp = new LabelledDial(\"Gate /\", this, \"aux1gatedelaytime\", color, 0, 127)\n {\n public String map(int value)\n {\n if (value < 111) return \"\" + value;\n else return TIMES[value - 111];\n }\n };\n ((LabelledDial)comp).addAdditionalLabel(\"Delay Time\");\n hbox.add(comp);\n model.setMetricMax(\"aux1gatedelaytime\", 110);\n \n comp = new LabelledDial(\"Depth\", this, \"aux1depth\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre HP\", this, \"aux1prehp\", color, 0, 127);\n hbox.add(comp);\n \n comp = new LabelledDial(\"Pre Delay\", this, \"aux1predelay\", color, 0, 127);\n hbox.add(comp);\n\n comp = new LabelledDial(\"High\", this, \"aux1highdamp\", color, 0, 127);\n ((LabelledDial)comp).addAdditionalLabel(\"Damp\");\n hbox.add(comp);\n \n category.add(hbox, BorderLayout.CENTER);\n return category;\n }", "@FXML\n private void pickDiscTwo() {\n activeDisc = \"Disc 2\";\n discSwitchButton.setText(\"Disc 2\");\n displayFilesFromDisc();\n }", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n \r\n partType = new ToggleGroup();\r\n modPartInHouse.setToggleGroup(partType);\r\n modPartOutsourced.setToggleGroup(partType); \r\n \r\n Part selectedPart = getSelectedPart();\r\n int ID = getSelectedPart().getId();\r\n \r\n modPartID.setText(\"Auto Gen - \" + ID);\r\n modPartName.setText(selectedPart.getName()); \r\n modPartInv.setText(Integer.toString(selectedPart.getStock()));\r\n modPartPrice.setText(Double.toString(selectedPart.getPrice()));\r\n modPartMax.setText(Integer.toString(selectedPart.getMax()));\r\n modPartMin.setText(Integer.toString(selectedPart.getMin()));\r\n \r\n if (selectedPart instanceof InHouse) {\r\n modPartInHouse.setSelected(true);\r\n machineIdText.setText(\"Machine ID\");\r\n modPartMachineID.setText(Integer.toString(((InHouse)selectedPart).getMachineID()));\r\n }\r\n else {\r\n modPartOutsourced.setSelected(true);\r\n machineIdText.setText(\"Company\");\r\n modPartMachineID.setText(((OutSourced)selectedPart).getCompanyName());\r\n }\r\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(Color.DARK_GRAY);\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setUndecorated(true);\r\n\t\tframe.setAlwaysOnTop(true);\r\n\t\tframe.setSize(300, 200);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\tURL url = Widget.class.getResource(\"/images/nhlLogo.png\");\r\n\t\tImageIcon img = new ImageIcon(url);\r\n\t\t\r\n\t\tframe.setIconImage(img.getImage());\r\n\t\t\r\n\t\tJButton menuButton = new JButton(\"Menu\");\r\n\t\tmenuButton.setBounds(10, 11, 89, 23);\r\n\t\tmenuButton.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\r\n\t\tmenuButton.setForeground(new Color(240, 248, 255));\r\n\t\tmenuButton.setBackground(new Color(47, 79, 79));\r\n\t\tmenuButton.setVisible(false);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tframe.getContentPane().add(menuButton);\r\n\r\n\t\tJComboBox<ComboItem> comboBox = new JComboBox<ComboItem>();\r\n\t\tcomboBox.setBounds(82, 79, 149, 32);\r\n\t\tcomboBox.setBackground(new Color(47, 79, 79));\r\n\t\tcomboBox.setForeground(new Color(240, 248, 255));\r\n\t\tcomboBox.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tcomboBox.setEditable(true);\r\n\t\tcomboBox.setSelectedItem(\"Select Team\");\r\n\t\tcomboBox.addItem(new ComboItem(\"Anaheim Ducks\", 24));\r\n\t\tcomboBox.addItem(new ComboItem(\"Arizona Coyotes\", 53));\r\n\t\tcomboBox.addItem(new ComboItem(\"Boston Bruins\", 6));\r\n\t\tcomboBox.addItem(new ComboItem(\"Buffalo Sabres\", 7));\r\n\t\tcomboBox.addItem(new ComboItem(\"Calgary Flames\", 20));\r\n\t\tcomboBox.addItem(new ComboItem(\"Carolina Hurricanes\", 12));\r\n\t\tcomboBox.addItem(new ComboItem(\"Chicago Blackhawks\", 16));\r\n\t\tcomboBox.addItem(new ComboItem(\"Colorado Avalanche\", 21));\r\n\t\tcomboBox.addItem(new ComboItem(\"Columbus Blue-Jackets\", 29));\r\n\t\tcomboBox.addItem(new ComboItem(\"Dallas Stars\", 25));\r\n\t\tcomboBox.addItem(new ComboItem(\"Detroit Red Wings\", 17));\r\n\t\tcomboBox.addItem(new ComboItem(\"Edmonton Oilers\", 22));\r\n\t\tcomboBox.addItem(new ComboItem(\"Florida Panthers\", 13));\r\n\t\tcomboBox.addItem(new ComboItem(\"Los Angeles Kings\", 26));\r\n\t\tcomboBox.addItem(new ComboItem(\"Minnesota Wild\", 30));\r\n\t\tcomboBox.addItem(new ComboItem(\"Montreal Canadiens\", 8));\r\n\t\tcomboBox.addItem(new ComboItem(\"Nashville Predators\", 18));\r\n\t\tcomboBox.addItem(new ComboItem(\"New Jersey Devils\", 1));\r\n\t\tcomboBox.addItem(new ComboItem(\"New York Islanders\", 2));\r\n\t\tcomboBox.addItem(new ComboItem(\"New York Rangers\", 3));\r\n\t\tcomboBox.addItem(new ComboItem(\"Ottawa Senators\", 9));\r\n\t\tcomboBox.addItem(new ComboItem(\"Philadelphia Flyers\", 4));\r\n\t\tcomboBox.addItem(new ComboItem(\"Pittsburgh Penguins\", 5));\r\n\t\tcomboBox.addItem(new ComboItem(\"San Jose Sharks\", 28));\r\n\t\tcomboBox.addItem(new ComboItem(\"St. Louis Blues\", 19));\r\n\t\tcomboBox.addItem(new ComboItem(\"Tampa Bay Lightning\", 14));\r\n\t\tcomboBox.addItem(new ComboItem(\"Toronto Maple Leafs\", 10));\r\n\t\tcomboBox.addItem(new ComboItem(\"Vancouver Canucks\", 23));\r\n\t\tcomboBox.addItem(new ComboItem(\"Vegas Golden Knights\", 54));\r\n\t\tcomboBox.addItem(new ComboItem(\"Washington Capitals\", 15));\r\n\t\tcomboBox.addItem(new ComboItem(\"Winnipeg Jets\", 52));\r\n\t\tframe.getContentPane().add(comboBox);\r\n\t\tcomboBox.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcomboBox.setVisible(false);\r\n\t\t\t\tComboItem choice = (ComboItem) comboBox.getSelectedItem();\r\n\t\t\t\tteamId = choice.getId();\r\n\t\t\t\tsetupTeamInfo();\r\n\t\t\t\tmenuButton.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmenuButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\thideTeamInfo();\r\n\t\t\t\tcomboBox.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// create labels for the scores and team names but dont show them yet\r\n\t\thomeTeam = new JLabel(homeName);\r\n\t\thomeTeam.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\thomeTeam.setBounds(-11, 27, 159, 75);\r\n\t\thomeTeam.setForeground(new Color(255, 255, 240));\r\n\t\thomeTeam.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\thomeTeam.setVisible(false);\r\n\t\tframe.getContentPane().add(homeTeam);\r\n\r\n\t\tawayTeam = new JLabel(awayName);\r\n\t\tawayTeam.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tawayTeam.setBounds(157, 34, 143, 60);\r\n\t\tawayTeam.setForeground(new Color(255, 255, 240));\r\n\t\tawayTeam.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tawayTeam.setVisible(false);\r\n\t\tframe.getContentPane().add(awayTeam);\r\n\r\n\t\thomeScoreDisplay = new JLabel(homeScore + \"\");\r\n\t\thomeScoreDisplay.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\thomeScoreDisplay.setBounds(26, 79, 80, 80);\r\n\t\thomeScoreDisplay.setForeground(new Color(255, 255, 240));\r\n\t\thomeScoreDisplay.setFont(new Font(\"Tahoma\", Font.BOLD, 90));\r\n\t\thomeScoreDisplay.setVisible(false);\r\n\t\tframe.getContentPane().add(homeScoreDisplay);\r\n\r\n\t\tawayScoreDisplay = new JLabel(awayScore + \"\");\r\n\t\tawayScoreDisplay.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tawayScoreDisplay.setBounds(187, 79, 80, 80);\r\n\t\tawayScoreDisplay.setForeground(new Color(255, 255, 240));\r\n\t\tawayScoreDisplay.setFont(new Font(\"Tahoma\", Font.BOLD, 90));\r\n\t\tawayScoreDisplay.setVisible(false);\r\n\t\tframe.getContentPane().add(awayScoreDisplay);\r\n\t\t\r\n\t\texitButton = new JButton(\"Exit\");\r\n\t\texitButton.setBounds(201, 12, 89, 23);\r\n\t\texitButton.setForeground(new Color(240, 248, 255));\r\n\t\texitButton.setBackground(new Color(47, 79, 79));\r\n\t\texitButton.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\r\n\t\texitButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().add(exitButton);\r\n\t\t\r\n\t\tURL url2 = Widget.class.getResource(\"/images/resize.jpg\");\r\n\t\tJLabel bground = new JLabel(new ImageIcon(url2));\r\n\t\tbground.setBounds(0, 0, 300, 200);\r\n\t\tframe.getContentPane().add(bground);\r\n\t\t\r\n\t\t\r\n\r\n\t\tframe.addMouseListener(new MouseAdapter() {\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tposX = e.getX();\r\n\t\t\t\tposY = e.getY();\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.addMouseMotionListener(new MouseAdapter() {\r\n\t\t\tpublic void mouseDragged(MouseEvent evt) {\r\n\t\t\t\t// sets frame position when mouse dragged\r\n\t\t\t\tframe.setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tTimer timer = new Timer(3000,new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif ( teamId != -1 ) {\r\n\t\t\t\t\tHTTPGetRequest(teamId);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttimer.start();\r\n\r\n\t}", "@Override\r\n public void onChange(SwitchButton sb, boolean state) {\n Log.d(\"switchButton\", state ? \"锟斤拷\":\"锟斤拷\");\r\n mImgView.setImageBitmap(null);\r\n //defreckle\r\n if(qubanSBtn.isSwitchOn())\r\n mImgView.setImageBitmap(mFaceEditor.BFDefreckleAuto());//));\r\n else\r\n mImgView.setImageBitmap(mFaceEditor.getBaseImage());\r\n }", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tbutton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\r\n\t\t\t\ttrue);\r\n\t\t//button.setEnabled(false);\r\n\t\t\r\n\t\tFile dir=new File(combo.getText());\r\n\t\tbutton.setEnabled(dir.isDirectory());\r\n\t\t\r\n\t\t\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "public void onChangedAdBtnPressed() {\n String uniqueID = advertisement.getUniqueID();\n view.showEditView(uniqueID);\n }", "private void onChooseCamClickEvent() {\n\t\tmBtnChooseCam.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tavcom.venc.SetCamSrc(-1);\n\t\t\t}\n\t\t});\n\t}", "@Override protected GuiComboBox getParamComboBox(final String param,\n final String prefix,\n final int width) {\n GuiComboBox paramCb;\n if (DRBD_RES_PARAM_NAME.equals(param)) {\n String resName;\n if (getParamSaved(DRBD_RES_PARAM_NAME) == null) {\n resName = getResource().getDefaultValue(DRBD_RES_PARAM_NAME);\n } else {\n resName = getResource().getName();\n }\n paramCb = new GuiComboBox(resName,\n null, /* items */\n null, /* units */\n null, /* type */\n \"^\\\\S+$\", /* regexp */\n width,\n null, /* abbrv */\n new AccessMode(\n getAccessType(param),\n isEnabledOnlyInAdvancedMode(param)));\n paramCb.setEnabled(!getDrbdResource().isCommited());\n paramComboBoxAdd(param, prefix, paramCb);\n } else if (DRBD_RES_PARAM_AFTER.equals(param)\n || DRBD_RES_PARAM_AFTER_8_3.equals(param)) {\n final List<Info> l = new ArrayList<Info>();\n final String defaultItem = getParamSaved(param);\n final StringInfo di = new StringInfo(\n Tools.getString(\"ClusterBrowser.None\"),\n \"-1\",\n getBrowser());\n l.add(di);\n final Map<String, DrbdResourceInfo> drbdResHash =\n getBrowser().getDrbdResHash();\n for (final String drbdRes : drbdResHash.keySet()) {\n final DrbdResourceInfo r = drbdResHash.get(drbdRes);\n DrbdResourceInfo odri = r;\n boolean cyclicRef = false;\n while ((odri = drbdResHash.get(\n odri.getParamSaved(param))) != null) {\n if (odri == this) {\n cyclicRef = true;\n }\n }\n if (r != this && !cyclicRef) {\n l.add(r);\n }\n }\n getBrowser().putDrbdResHash();\n paramCb = new GuiComboBox(defaultItem,\n l.toArray(new Info[l.size()]),\n null, /* units */\n null, /* type */\n null, /* regexp */\n width,\n null, /* abbrv */\n new AccessMode(\n getAccessType(param),\n isEnabledOnlyInAdvancedMode(param)));\n resyncAfterParamCB = paramCb;\n \n paramComboBoxAdd(param, prefix, paramCb);\n } else {\n paramCb = super.getParamComboBox(param, prefix, width);\n }\n return paramCb;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblPlanEstudio = new javax.swing.JLabel();\n comboBox = new ComboBoxPlanEstudios();\n btnAceptar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Planes de estudio\");\n setIconImage(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/iconos/calendario.png\")).getImage());\n setResizable(false);\n\n lblPlanEstudio.setText(\"Plan de estudio:\");\n\n btnAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/iconos/aceptarPeque.png\"))); // NOI18N\n btnAceptar.setText(\"Aceptar\");\n btnAceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAceptarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblPlanEstudio)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(comboBox, 0, 319, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(165, 165, 165)\n .addComponent(btnAceptar)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblPlanEstudio)\n .addComponent(comboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)\n .addComponent(btnAceptar)\n .addContainerGap())\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "void configureButtonListener();", "private void updateGui() {\n final IDebugger debugger = m_debugPerspectiveModel.getCurrentSelectedDebugger();\n final TargetProcessThread thread = debugger == null ? null : debugger.getProcessManager().getActiveThread();\n\n final boolean connected = debugger != null && debugger.isConnected();\n final boolean suspended = connected && thread != null;\n\n m_hexView.setEnabled(connected && suspended && m_provider.getDataLength() != 0);\n\n if (connected) {\n m_hexView.setDefinitionStatus(DefinitionStatus.DEFINED);\n } else {\n // m_hexView.setDefinitionStatus(DefinitionStatus.UNDEFINED);\n\n m_provider.setMemorySize(0);\n m_hexView.setBaseAddress(0);\n m_hexView.uncolorizeAll();\n }\n }", "private void createChooser(final int nr, final String[] chooserText,\r\n final int pos) {\r\n chooserLabel[nr] = new JLabel();\r\n chooserLabel[nr].setFont(new Font(\"Serif\", Font.BOLD, 14));\r\n chooserLabel[nr].setBounds(10, pos, 150, 25);\r\n\r\n this.add(chooserLabel[nr]);\r\n this.add(new SComponent(chooserLabel[nr], chooserText));\r\n\r\n chooser[nr] = new ColorChooserComboBox();\r\n chooser[nr].setBounds(210, pos, 100, 25);\r\n this.add(chooser[nr]);\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tselectedIndex = referCombox.getSelectedIndex();\n\t\t\t\tif (selectedIndex == 0) {\n\t\t\t\t\tmyClock=new Clock();\n\t\t\t\t\tdefText.setText(\"Default\");\n\t\t\t\t\tresolutionText.setText(null);\n\t\t\t\t\tmaxText.setText(null);\n\t\t\t\t\toffsetText.setText(null);\n\t\t\t\t\ttypeCombox.setEnabled(false);\n\t\t\t\t\tdefText.setEnabled(false);\n\t\t\t\t\ttypeCombox.setSelectedIndex(0);\n\t\t\t\t\tresolutionText.setEnabled(false);\n\t\t\t\t\tmaxText.setEnabled(false);\n\t\t\t\t\toffsetText.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse if (selectedIndex == 1) {\n\t\t\t\t\tmyClock=new Clock();\n\t\t\t\t\tdefText.setText(null);\n\t\t\t\t\tresolutionText.setText(null);\n\t\t\t\t\tmaxText.setText(null);\n\t\t\t\t\toffsetText.setText(null);\n\t\t\t\t\ttypeCombox.setEnabled(true);\n\t\t\t\t\tdefText.setEnabled(true);\n\t\t\t\t\tif (typeCombox.getSelectedIndex() == 0)\n\t\t\t\t\t\tunitText.setEnabled(false);\n\t\t\t\t\tresolutionText.setEnabled(true);\n\t\t\t\t\tmaxText.setEnabled(true);\n\t\t\t\t\toffsetText.setEnabled(true);\n\t\t\t\t} else {\n\t\t\t\t\tif (selectedIndex >= 2)\n\t\t\t\t\t\tmyClock = Main.win.cd.getClocks().get(selectedIndex - 2);\n\t\t\t\t\tdefText.setText(myClock.getName());\n\t\t\t\t\tresolutionText.setText(myClock.getResolution());\n\t\t\t\t\tmaxText.setText(myClock.getMax());\n\t\t\t\t\toffsetText.setText(myClock.getOffset());\n\t\t\t\t\ttypeCombox.setEnabled(true);\n\t\t\t\t\ttypeCombox.setSelectedIndex(myClock.getClockType());\n\t\t\t\t\tdefText.setEnabled(false);\n\t\t\t\t\tunitText.setText(myClock.getUnit());\n\t\t\t\t\tresolutionText.setEnabled(true);\n\t\t\t\t\tmaxText.setEnabled(true);\n\t\t\t\t\toffsetText.setEnabled(true);\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void initGui()\n {\n this.controlList.clear();\n //Keyboard.enableRepeatEvents(true);\n\n int var1 = (this.width - this.bookImageWidth) / 2;\n int var2 = (this.height - this.bookImageHeight - 40) / 2;\n this.controlList.add(this.buttonNextPage = new GuiButtonNextPage(1, var1 + 120, var2 + 154, true));\n this.controlList.add(this.buttonPreviousPage = new GuiButtonNextPage(2, var1 + 38, var2 + 154, false));\n this.controlList.add(this.buttonIndex = new GuiButtonNextPage(8, var1 + 28, var2 + 10, false));\n this.controlList.add(this.buttonMenu1 = new GuiButtonSelect(3, var1 + 35, var2 + 30, 110, 20, \"\"));\n this.controlList.add(this.buttonMenu2 = new GuiButtonSelect(4, var1 + 35, var2 + 55, 110, 20, \"\"));\n this.controlList.add(this.buttonMenu3 = new GuiButtonSelect(5, var1 + 35, var2 + 80, 110, 20, \"\"));\n this.controlList.add(this.buttonMenu4 = new GuiButtonSelect(6, var1 + 35, var2 + 105, 110, 20, \"\"));\n this.controlList.add(this.buttonMenu5 = new GuiButtonSelect(7, var1 + 35, var2 + 130, 110, 20, \"\"));\n this.controlList.add(this.bookmark = new GuiButtonBookmark(9, var1 + 142, var2 + 7, false));\n this.updateButtons();\n }", "public ColorChooserPanel(ActionListener l) {\n lastRow = -1;\n \n JButton okButton = new JButton( Messages.message(\"ok\") );\n JButton cancelButton = new JButton( Messages.message(\"cancel\") );\n \n setLayout(new HIGLayout(new int[] {220, 10, 220}, new int[] {350, 10, 0}));\n \n add(colorChooser, higConst.rcwh(1, 1, 3, 1));\n add(okButton, higConst.rc(3, 1));\n add(cancelButton, higConst.rc(3, 3));\n \n okButton.setActionCommand(OK);\n cancelButton.setActionCommand(CANCEL);\n \n okButton.addActionListener(l);\n cancelButton.addActionListener(l);\n \n setOpaque(true);\n setSize(getPreferredSize());\n }", "public void enableChoice() {\n\t\t// Enable the buttons, lighting them up\n\t\trock.setEnabled(true);\n\t\tpaper.setEnabled(true);\n\t\tscissors.setEnabled(true);\n\t}", "void openDialog()\n {\n if(main.copyCmd.listEvCopy.size() >0){\n widgCopy.setBackColor(GralColor.getColor(\"rd\"), 0);\n } else {\n widgCopy.setBackColor(GralColor.getColor(\"wh\"), 0);\n }\n \n windStatus.setFocus(); //setWindowVisible(true);\n\n }", "public void changedEventClicktoJavaFX(int id) {\n }", "protected Component createPreviousButton() {\n/* 65 */ JButton b = new SpecialUIButton(new LiquidSpinnerButtonUI(5));\n/* 66 */ b.addActionListener(previousButtonHandler);\n/* 67 */ b.addMouseListener(previousButtonHandler);\n/* 68 */ return b;\n/* */ }", "public void setButtonSelection(String action);", "private JToggleButton getTglKeypad() {\r\n\t\tif (tglKeypad == null) {\r\n\t\t\ttglKeypad = new JToggleButton();\r\n\t\t\ttglKeypad.setText(\" # \");\r\n\t\t\ttglKeypad.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\ttlbKeypad.setVisible(tglKeypad.isSelected());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn tglKeypad;\r\n\t}", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "public void createControl() {\n Button button1 = new Button(getShell(), SWT.PUSH);\n button1.setText(\"PolicyValueSelectionDialog with valid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog1 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy1\", selectionElement1);\n button1.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog1.open();\n String[] results = (String[]) dialog1.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n dialog1.setInitialSelections(new String[]{\"choice7\", \"choice3\"});\n\n Button button2 = new Button(getShell(), SWT.PUSH);\n button2.setText(\"PolicyValueSelectionDialog with invalid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog2 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy2\", selectionElement2);\n button2.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog2.open();\n String[] results = (String[]) dialog2.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n\n\n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n btnGetVideoFile = new javax.swing.JButton();\r\n btnStart = new javax.swing.JButton();\r\n cbxSource = new javax.swing.JComboBox<>();\r\n txtVideoFileName = new javax.swing.JTextField();\r\n btnStop = new javax.swing.JButton();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n\r\n btnGetVideoFile.setText(\"File\");\r\n btnGetVideoFile.setEnabled(false);\r\n btnGetVideoFile.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnGetVideoFileActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnStart.setText(\"Start\");\r\n btnStart.setEnabled(false);\r\n btnStart.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnStartActionPerformed(evt);\r\n }\r\n });\r\n\r\n cbxSource.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Modo de captura\", \"WebCam\", \"Arquivo de vídeo\" }));\r\n cbxSource.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n cbxSourceActionPerformed(evt);\r\n }\r\n });\r\n\r\n txtVideoFileName.setEditable(false);\r\n txtVideoFileName.setEnabled(false);\r\n\r\n btnStop.setText(\"Stop\");\r\n btnStop.setEnabled(false);\r\n btnStop.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnStopActionPerformed(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(txtVideoFileName, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(btnGetVideoFile, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(18, 18, 18)\r\n .addComponent(btnStop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(cbxSource, javax.swing.GroupLayout.PREFERRED_SIZE, 402, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(18, 18, 18)\r\n .addComponent(btnStart, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addContainerGap(60, Short.MAX_VALUE))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cbxSource, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(btnStart))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(txtVideoFileName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(btnGetVideoFile)\r\n .addComponent(btnStop))\r\n .addContainerGap(27, Short.MAX_VALUE))\r\n );\r\n\r\n pack();\r\n setLocationRelativeTo(null);\r\n }", "@FXML\n private void pickDiscOne() {\n activeDisc = \"Disc 1\";\n discSwitchButton.setText(\"Disc 1\");\n displayFilesFromDisc();\n }" ]
[ "0.59215844", "0.5410742", "0.5344638", "0.53402525", "0.53353083", "0.5287001", "0.52792376", "0.5260751", "0.52576095", "0.5225788", "0.52119875", "0.52057886", "0.5184106", "0.5171717", "0.5170221", "0.5167658", "0.5162015", "0.5159913", "0.5149513", "0.5149505", "0.5140259", "0.51304275", "0.5113625", "0.51111203", "0.510693", "0.5106231", "0.5098767", "0.50944984", "0.50901353", "0.5088893", "0.5078741", "0.50786865", "0.5072254", "0.5067911", "0.5067371", "0.5065045", "0.50622684", "0.5058783", "0.50571483", "0.5049151", "0.50477403", "0.50358844", "0.5032443", "0.5022448", "0.50207996", "0.5019987", "0.5015501", "0.5011322", "0.49993256", "0.4994462", "0.49923652", "0.4989174", "0.49763113", "0.49741092", "0.49643472", "0.4958375", "0.4957259", "0.49412867", "0.49404186", "0.49397907", "0.49394846", "0.49378932", "0.49367666", "0.4935784", "0.49355453", "0.49353445", "0.49299207", "0.49297476", "0.49230364", "0.4921875", "0.4919971", "0.49199575", "0.49129304", "0.49128282", "0.4912118", "0.4910452", "0.4909407", "0.49093062", "0.4907805", "0.4906116", "0.4903878", "0.4895098", "0.48942745", "0.4884983", "0.4882378", "0.4881457", "0.4873985", "0.4870711", "0.48588514", "0.48501763", "0.48461354", "0.4845296", "0.48376912", "0.48337105", "0.4833657", "0.48284498", "0.48283994", "0.48261273", "0.4825193", "0.48234332" ]
0.65575874
0
root.right != null > root.left.next = root.right root.next != null > root.right.next = root.next.left
public void connect(TreeLinkNode root) { if (root == null) { return; } // leaf node 就不應該再判斷他的root.right.next,會出錯, 因此在這邊先回傳 if (root.left == null && root.right == null) { return; } if (root.left != null && root.right != null) { root.left.next = root.right; } TreeLinkNode cur_root = root; while (root.next != null) { System.out.println(root.val); if (root.next != null && root.right != null) { if (root.next.left != null) { root.right.next = root.next.left; break; } else if (root.next.right != null) { root.right.next = root.next.right; break; } } else if (root.next != null && root.left != null) { if (root.next.left != null) { root.left.next = root.next.left; break; } else if (root.next.right != null) { root.left.next = root.next.right; break; } } root = root.next; } root = cur_root; /* if (root.left != null && root.right != null) { root.left.next = root.right; } if (root.right != null && root.next != null) { if (root.next.left != null) { root.right.next = root.next.left; } else if (root.next.right != null) { root.right.next = root.next.right; } } */ connect(root.left); connect(root.right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doubleRotationRL(BinaryNode node) {\n BinaryNode temp = min(node.right);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the right\n temp.parent.right = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n root.parent = null;\n root.left = node;\n root.right = node.right;\n if(node.right != null) node.right.parent = root;\n node.parent = root;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.right = node.right;\n if(node.right != null) node.right.parent = temp;\n temp.left = node;\n node.parent = temp;\n node.right = null;\n }\n }", "private void singleRotationLR(BinaryNode node){\n if (node == root) {\n root = node.left;\n root.parent = null;\n root.right = node;\n node.parent = node.left;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.left;\n } else {\n node.parent.left = node.left;\n }\n node.left.parent = node.parent;\n node.left.right = node;\n node.parent = node.left;\n node.left = null;\n }\n }", "private void doubleRotationLR(BinaryNode node) {\n BinaryNode temp = max(node.left);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the left\n temp.parent.right = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n root.parent = null;\n root.right = node;\n root.left = node.left;\n if(node.left != null) node.left.parent = root;\n node.parent = root;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.left = node.left;\n if(node.left != null) node.left.parent = temp;\n temp.right = node;\n node.parent = temp;\n node.left = null;\n }\n }", "private static void doMirrorTreeRecursive(Node root) {\n Queue<Node> lvlQueue = new LinkedList<>();\n lvlQueue.add(root);\n while (!lvlQueue.isEmpty()) {\n Node poppedNode = lvlQueue.poll();\n if (poppedNode.left != null){\n lvlQueue.add(poppedNode.left);\n }\n if (poppedNode.right != null){\n lvlQueue.add(poppedNode.right);\n }\n Node temp = poppedNode.left;\n poppedNode.left = poppedNode.right;\n poppedNode.right = temp;\n }\n }", "public BinaryTreeByLinkedList() {\n\t\tthis.root = null;\n\t}", "void traverse2() {\n BTNode node = root, prev = null, next;\n while (node != null) {\n if (prev == node.parent) {\n if (node.left != null) {\n next = node.left;\n }\n else if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else if (prev == node.left) {\n if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else {\n next = node.parent;\n }\n prev = node;\n node = next;\n }\n }", "private static BinaryTree mirror(BinaryTree root) {\n\t\tif(root == null) return null;\r\n\t\tif(root.left!=null || root.right!= null){\r\n\t\t\tBinaryTree temp;\r\n\t\t\tmirror(root.left);\r\n\t\t\tmirror(root.right);\r\n\t\t\tBinaryTree left = root.left;\r\n\t\t\tBinaryTree right = root.right;\r\n\t\t\ttemp = left;\r\n\t\t\troot.left = right;\r\n\t\t\troot.right = temp;\r\n\t\t}\r\n\t\treturn root;\r\n\t}", "void attachToLeft(Node newNode)\n {\n newNode.left = left;\n newNode.right = this;\n newNode.right.left = newNode;\n newNode.left.right = newNode;\n }", "private TreeNode fixNextptr(TreeNode root) {\r\n\t\t// Find the right most node in\r\n\t\t// BT or last node in DLL\r\n\t\twhile (root.right != null)\r\n\t\t\troot = root.right;\r\n\r\n\t\t// Start from the rightmost node, traverse\r\n\t\t// back using left pointers. While traversing,\r\n\t\t// change right pointer of nodes\r\n\t\twhile (root != null && root.left != null) {\r\n\t\t\tTreeNode left = root.left;\r\n\t\t\tleft.right = root;\r\n\t\t\troot = root.left;\r\n\t\t}\r\n\r\n\t\t// The leftmost node is head of linked list, return it\r\n\t\treturn root;\r\n\t}", "private void singleRotationRL(BinaryNode node) {\n if (node == root) {\n root = node.right;\n root.parent = null;\n root.left = node;\n node.parent = node.right;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.right;\n } else {\n node.parent.left = node.right;\n }\n node.right.parent = node.parent;\n node.right.left = node;\n node.parent = node.right;\n node.right = null;\n }\n }", "public void postorder()\r\n {\r\n postorder(root);\r\n }", "static TreeNode mirror_tree(TreeNode root) {\n\t\t\n\t\tTreeNode temp ;\n\t\t\n\t\tif(root != null) {\n\t\t\t\n\t\t\tmirror_tree(root.left);\n\t\t\tmirror_tree(root.right);\n\t\t\t\n\t\t\ttemp = root.left;\n\t\t\troot.left = root.right;\n\t\t\troot.right = temp;\n\t\t}\n\t\t\n\t\treturn root;\n\t}", "public void recoverTree(TreeNode root) {\n if (root == null) {\n return;\n }\n\n prev = null;\n first = null;\n second = null;\n\n inorderTraversal(root);\n\n if (first != null && second != null) {\n int temp = first.val;\n first.val = second.val;\n second.val = temp;\n }\n\n }", "void inorder(Node root) {\n\t\tboolean leftdone = false;\n\n\t\t// Start traversal from root\n\t\twhile (root != null) {\n\t\t\t// If left child is not traversed, find the\n\t\t\t// leftmost child\n\t\t\tif (!leftdone) {\n\t\t\t\twhile (root.left != null) {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Print root's data\n\t\t\tSystem.out.print(root.data + \" \");\n\n\t\t\t// Mark left as done\n\t\t\tleftdone = true;\n\n\t\t\t// If right child exists\n\t\t\tif (root.right != null) {\n\t\t\t\tleftdone = false;\n\t\t\t\troot = root.right;\n\t\t\t}\n\n\t\t\t// If right child doesn't exist, move to parent\n\t\t\telse if (root.parent != null) {\n\t\t\t\t// If this node is right child of its parent,\n\t\t\t\t// visit parent's parent first\n\t\t\t\twhile (root.parent != null && root == root.parent.right)\n\t\t\t\t\troot = root.parent;\n\n\t\t\t\tif (root.parent == null)\n\t\t\t\t\tbreak;\n\t\t\t\troot = root.parent;\n\t\t\t} else\n\t\t\t\tbreak;\n\t\t}\n\t}", "public Boolean DeleteAndMerge(Node node) {\n\t\tif (node.getLeftChild() == null) {\n\t\t\tDeleteAllChild(node);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (node.getParent().getLeftChild() == node) {\n\t\t\t// Node tempNode=node.getLeftChild();\n\t\t\tint level = node.getLevel();\n\t\t\tNode pa = node.getParent();\n\t\t\tPreorderLevel(node.getLeftChild());\n\t\t\tnode.getParent().setLeftChild(node.getLeftChild());\n\t\t\tnode.getLeftChild().setParent(node.getParent());\n\t\t\tnode.getLeftChild().setLevel(node.getLevel());\n\t\t\tNode tempNode = node.getRightChild();\n\t\t\tnode = node.getLeftChild();\n\n\t\t\tfor (;;) {\n\t\t\t\tif (node.getRightChild() == null) {\n\t\t\t\t\tnode.setRightChild(tempNode);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tnode = node.getRightChild();\n\n\t\t\t\t\tnode.setLevel(level);\n\t\t\t\t\tnode.setParent(pa);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tint level = node.getLevel();\n\t\t\tNode tNode = node.getParent().getLeftChild();\n\n\t\t\tfor (;;) {\n\t\t\t\tif (tNode.getRightChild() == node)\n\t\t\t\t\tbreak;\n\t\t\t\ttNode = tNode.getRightChild();\n\t\t\t}\n\t\t\ttNode.setRightChild(node.getLeftChild());\n\n\t\t\tNode parent = node.getParent();\n\t\t\tNode rNode = node.getRightChild();\n\t\t\tnode = node.getLeftChild();\n\t\t\tPreorderLevel(node);\n\t\t\tfor (;;) {\n\t\t\t\tif (node.getRightChild() == null)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tnode.setParent(parent);// 改变子结点的父结点\n\t\t\t\t\t// 修改结点层级\n\t\t\t\t\tif (node.getParent() == null) {\n\t\t\t\t\t\tnode.setLevel(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode.setLevel(level);\n\t\t\t\t\t}\n\t\t\t\t\tnode = node.getRightChild();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tnode.setParent(parent);\n\t\t\tnode.setLevel(level);\n\t\t\tnode.setRightChild(rNode);\n\t\t\t// if (rNode.getParent() == null) {\n\t\t\t// rNode.setLevel(0);\n\t\t\t// } else {\n\t\t\t// rNode.setLevel(rNode.getParent().getLevel() + 1);\n\t\t\t// }\n\t\t}\n\n\t\treturn true;\n\n\t}", "public TreeNode inorderSuccessor(TreeNode root, TreeNode p) {\n TreeNode ans = null;\n while (root != null) {\n if (root.val > p.val) {\n ans = root;\n root = root.left;\n } else root = root.right;\n }\n return ans;\n}", "public TreeNode upSideDownBinary_Stack(TreeNode root){\n if (root == null){\n return root;\n }\n \n Deque<TreeNode> stack = new LinkedList<TreeNode>();\n \n while(root != null){\n stack.offerLast(root);\n root = root.left;\n }\n \n TreeNode newRoot = stack.pollLast();\n TreeNode cur = newRoot;\n \n while(!stack.isEmpty()){\n TreeNode oriParent = stack.pollLast();\n cur.left = oriParent.right;\n cur.right = oriParent;\n \n oriParent.left = null;\n oriParent.right = null;\n cur = oriParent;\n }\n \n return newRoot;\n }", "public void connect1(TreeLinkNode root) {\n // Start typing your Java solution below\n // DO NOT write main() function\n if(root == null) return;\n TreeLinkNode leftEdge = root;\n while(leftEdge != null){\n TreeLinkNode curNode = leftEdge;\n while(curNode != null){\n if(curNode.left != null && curNode.right != null)\n curNode.left.next = curNode.right;\n if(curNode.next != null && curNode.right !=null){\n curNode.right.next = curNode.next.left;\n }\n curNode = curNode.next;\n }\n leftEdge = leftEdge.left;\n }\n }", "public static void postOrderTraverse2(TreeNode head){\n if(head == null) return;\n Stack<TreeNode> stack = new Stack<>();\n stack.push(head);\n TreeNode node;\n while (!stack.isEmpty()){\n while (( node = stack.peek()) != null){\n if(node.lChild != null && node.lChild.visited == true){\n stack.push(null);\n break;\n }\n stack.push(node.lChild);\n }\n stack.pop(); //空指针出栈\n if(!stack.isEmpty()){\n node = stack.peek();\n if(node.rChild == null || node.rChild.visited == true){\n System.out.print(node.val + \" \");\n node.visited = true;\n stack.pop();\n }else {\n stack.push(node.rChild);\n }\n }\n }\n }", "public TreeNode inorderSuccessor(TreeNode root, TreeNode p) {\n if (root == null) return null;\n if (root.val > p.val) {\n TreeNode left = inorderSuccessor(root.left, p);\n return left == null ? root : left;\n } else return inorderSuccessor(root.right, p);\n}", "static void inOrderWithoutRecursion(Node root) {\n if (root == null) {\n return;\n }\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n }\n curr = stack.pop();\n System.out.print(curr.data + \" \");\n curr = curr.right;\n }\n\n }", "public void postorder()\n {\n postorder(root);\n }", "public void postorder()\n {\n postorder(root);\n }", "public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }", "public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }", "public unsortedList2(Node root){\n\t\n\tNode first = root;\n\tNode runner;\n\twhile(root != null){\n\t\trunner = first;\n\t\twhile(runner != null){\n\t\t\t\tif(runner.next.val==root.val){\n\t\t\t\t\trunner.next = runner.next.next;\n\t\t\t\t}else{\n\t\t\t\t\trunner=runner.next;\n\t\t\t\t}\n\t\t}\n\t\tfirst=root.next;\n\t}\n}", "public static void mirror(Node root) {\n\t\tif (root == null) return;\n\t\tmirror(root.left);\n\t\tmirror(root.right);\n\t\tNode tmp = root.left;\n\t\troot.left = root.right;\n\t\troot.right = tmp;\n\n\t}", "public void postOrder(Node node) {\n\n if (node == null) {\n System.out.println(\"Tree is empty\");\n return;\n }\n\n Stack<Node> stack1 = new Stack<>();\n Stack<Node> stack2 = new Stack<>();\n\n stack1.push(node);\n\n while (!stack1.empty()) {\n\n node = stack1.pop();\n\n stack2.push(node);\n\n if (node.left != null) {\n stack1.push(node.left);\n }\n\n if (node.right != null) {\n stack1.push(node.right);\n }\n }\n\n while (!stack2.empty()) {\n node = stack2.pop();\n System.out.print(node.value + \" \");\n }\n }", "static void preOrderWithoutRecursion(Node root) {\n Stack<Node> stack = new Stack<>();\n stack.push(root);\n while (!stack.isEmpty()) {\n Node node = stack.peek();\n System.out.print(node.data + \" \");\n stack.pop();\n\n if (node.right != null) {\n stack.push(node.right);\n }\n if (node.left != null) {\n stack.push(node.left);\n }\n }\n }", "private void deleteTree(tnode root){\n if (root != null)\n root = null;\n }", "private void replaceNode(Node curr, Node child, AtomicReference<Node> rootRef) {\n\t\tchild.parent = curr.parent;\n if(curr.parent == null) {\n \trootRef.set(child);\n }\n else {\n if(isLeftChild(curr)) {\n \tcurr.parent.left = child;\n } else {\n \tcurr.parent.right = child;\n }\n }\n\t}", "public RedBlackTree()\n { \n \t root = null;\n }", "static void levelOrder(Node root){\n Queue<Node> queue = new LinkedList<Node>();\r\n \r\n queue.add(root);\r\n while (!queue.isEmpty()) {\r\n Node head = queue.remove();\r\n\r\n if (head == null) {\r\n continue;\r\n }\r\n\r\n System.out.print(head.data + \" \");\r\n\r\n queue.add(head.left);\r\n queue.add(head.right);\r\n }\r\n System.out.println();\r\n \r\n }", "public static void connect_9Z(TreeLinkNode root) {\n if (root == null) {\n return;\n }\n TreeLinkNode parent = root;\n TreeLinkNode next = parent.left;\n while (parent != null && next != null) {\n TreeLinkNode prev = null;\n while (parent != null) {\n if (prev == null) {\n prev = parent.left;\n } else {\n prev.next = parent.left;\n prev = prev.next;\n }\n prev.next = parent.right;\n prev = prev.next;\n parent = parent.next;\n }\n parent = next;\n next = parent.left;\n }\n }", "private TreeNode flat(TreeNode cur) {\n if (cur == null) {\n return null;\n }\n TreeNode right = cur.right;\n TreeNode left = cur.left;\n if (left == null && right == null) {\n return cur;\n }\n cur.left = null;\n\n TreeNode rightLast = flat(right);\n TreeNode leftLast = flat(left);\n if (left != null) {\n leftLast.right = right;\n cur.right = left;\n }\n return rightLast == null ? leftLast : rightLast;\n }", "public void postOrder2(BinaryTreeNode root) {\n\t\tBinaryTreeNode cur = root;\n\t\tBinaryTreeNode pre = root;\n\t\tStack<BinaryTreeNode> s = new Stack<BinaryTreeNode>();\n\n\t\tif (root != null)\n\t\t\ts.push(root);\n\n\t\twhile (!s.isEmpty()) {\n\t\t\tcur = s.peek();\n\t\t\t// traversing down the tree\n\t\t\tif (cur == pre || cur == pre.getLeft() || cur == pre.getRight()) {\n\t\t\t\tif (cur.getLeft() != null) {\n\t\t\t\t\ts.push(cur.getLeft());\n\t\t\t\t} else if (cur.getRight() != null) {\n\t\t\t\t\ts.push(cur.getRight());\n\t\t\t\t}\n\t\t\t\tif (cur.getLeft() == null && cur.getRight() == null) {\n\t\t\t\t\tSystem.out.print(s.pop().getData() + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// traversing up the tree from the left\n\t\t\telse if (pre == cur.getLeft()) {\n\t\t\t\tif (cur.getRight() != null) {\n\t\t\t\t\ts.push(cur.getRight());\n\t\t\t\t} else if (cur.getRight() == null) {\n\t\t\t\t\tSystem.out.print(s.pop().getData() + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// we are traversing up the tree from the right\n\t\t\telse if (pre == cur.getRight()) {\n\t\t\t\tSystem.out.print(s.pop().getData() + \" \");\n\t\t\t}\n\t\t\tpre = cur;\n\t\t}\n\t}", "public static void connect(TreeLinkNode root) {\n\t\tif(root==null)\n\t return;\n\t \n\t LinkedList<TreeLinkNode> nodeQueue = new LinkedList<TreeLinkNode>();\n\t LinkedList<Integer> depthQueue = new LinkedList<Integer>();\n\t \n\t if(root!=null){\n\t nodeQueue.offer(root);\n\t depthQueue.offer(1);\n\t }\n\t \n\t while(!nodeQueue.isEmpty()){\n\t \tTreeLinkNode topNode = nodeQueue.poll();\n\t int depth = depthQueue.poll();\n\t \n\t if(depthQueue.isEmpty()){\n\t \ttopNode.next = null;\n\t } else if(depthQueue.peek() > depth){\n\t \ttopNode.next = null; \n\t } else {\n\t \ttopNode.next = nodeQueue.peek();\n\t }\n\t \n\t if(topNode.left!=null){\n\t nodeQueue.offer(topNode.left);\n\t depthQueue.offer(depth+1);\n\t }\n\t \n\t if(topNode.right!=null){\n\t nodeQueue.offer(topNode.right);\n\t depthQueue.offer(depth+1);\n\t } \n\t } \n }", "private boolean isLeaf()\r\n\t\t{\r\n\t\t\treturn getLeftChild() == null && getRightChild() == null;\r\n\t\t}", "private boolean compare(TreeNode leftRoot, TreeNode rightRoot) {\n // Good shortcut\n //if(left==null || right==null) return left==right;\n if (leftRoot == null && rightRoot == null) return true;\n if (leftRoot == null || rightRoot == null) return false;\n if (leftRoot.val != rightRoot.val) return false;\n boolean isOutersEqual = compare(leftRoot.left, rightRoot.right);\n boolean isInnersEqual = compare(leftRoot.right, rightRoot.left);\n return isOutersEqual && isInnersEqual;\n }", "void postorder(Node root){\n if(root!=null){\n postorder(root.left);\n postorder(root.right);\n System.out.print(root.data+\" \");\n }\n\n }", "private void initTree(E data, TernaryTree<E> leftTree, TernaryTree<E> middleTree, TernaryTree<E> rightTree) {\n /**\n * We have to create a new node here for the case where one of the input trees\n * is this. If we simply set node = new TernaryNode..., and one of the input\n * trees is this, then we lose all of the subchildren of one of the input trees!\n **/\n TernaryNode<E> newRoot = new TernaryNode<>(data);\n\n // if it's empty, then why add it?\n if (leftTree != null && !leftTree.isEmpty()) {\n newRoot.setLeftChild(leftTree.root);\n }\n\n if (middleTree != null && !middleTree.isEmpty()) {\n // if the middle tree is the same as the left tree, then we should create\n // a copy\n if (middleTree == leftTree) {\n newRoot.setMiddleChild(leftTree.root.copy());\n } else {\n newRoot.setMiddleChild(middleTree.root);\n }\n }\n\n if (rightTree != null && !rightTree.isEmpty()) {\n // same idea here, except that we need to check the left and the middle\n if (rightTree == leftTree) {\n newRoot.setRightChild(leftTree.root.copy());\n } else if (rightTree == middleTree) {\n newRoot.setRightChild(middleTree.root.copy());\n } else {\n newRoot.setRightChild(rightTree.root);\n }\n }\n\n // okay, now we can set this tree's root to the newRoot\n root = newRoot;\n\n /**\n * For the next three if-statements, we only clear the tree if the input tree is\n * not the same as this, otherwise we'd be clearing this!\n */\n if (leftTree != null && leftTree != this) {\n leftTree.clear();\n }\n\n if (middleTree != null && middleTree != this) {\n middleTree.clear();\n }\n\n if (rightTree != null && rightTree != this) {\n rightTree.clear();\n }\n }", "private void postorderRightOnly(Node root) {\r\n if (root.right != null)\r\n postorderRightOnly(root.right);\r\n if (this != null && !ifLeaf(root))\r\n System.out.print(root.value + \">\");\r\n }", "public boolean deleteNode(Type val){\n MyBinNode aux = this.root;\n MyBinNode parent = this.root;\n boolean left = true;\n \n while(aux.value.compareTo(val) != 0){\n parent = aux;\n if(aux.value.compareTo(val) > 0){\n left = true;\n aux = aux.left;\n }else{\n left = false;\n aux = aux.right;\n }\n if(aux == null){\n return false;\n }\n }\n \n if(aux.left==null && aux.right==null){\n if(aux == this.root){\n this.root = null;\n }else if(left){\n parent.left = null;\n }else{\n parent.right = null;\n }\n }else if(aux.right == null){\n if(aux == this.root){\n this.root = aux.left;\n }else if(left){\n parent.left = aux.left;\n }else{\n parent.right = aux.left;\n }\n }else if(aux.left == null){\n if(aux == this.root){\n this.root = aux.right;\n }else if(left){\n parent.left = aux.right;\n }else{\n parent.right = aux.right;\n }\n }else{\n MyBinNode replace = getToReplace(aux);\n if(aux == this.root){\n this.root = replace;\n }else if(left){\n parent.left = replace;\n }else{\n parent.right = replace;\n }\n replace.left = aux.left;\n }\n return true;\n }", "public void connect2(TreeLinkNode root) {\n\t // Start typing your Java solution below\n\t // DO NOT write main() function\n\t //iterate through level by level\n\t //suppose each level we have got the next pointer correctly set up.\n\t //the pointer to the first node of each level is our queue \n\t //for setting up links at next level.\n\t \n\t if(root == null) return ;\n\t \n\t TreeLinkNode lastLevelCur = root;\n\t TreeLinkNode curLevelHead;\n\t TreeLinkNode curLevelPrev;\n\t while( lastLevelCur != null){\n\t curLevelHead = null;\n\t curLevelPrev = null;\n\t while(lastLevelCur != null){\n\t if(curLevelHead == null){\n\t curLevelHead = (lastLevelCur.left == null)?lastLevelCur.right: lastLevelCur.left;\n\t }\n\t \n\t if(lastLevelCur.left != null){\n\t if(curLevelPrev != null) {\n\t curLevelPrev.next = lastLevelCur.left;\n\t }//first set next for prev.\n\t curLevelPrev = lastLevelCur.left; //then update prev pointer.‰\n\t }\n\t \n\t if(lastLevelCur.right != null){\n\t if(curLevelPrev != null){\n\t curLevelPrev.next = lastLevelCur.right;\n\t }\n\t curLevelPrev = lastLevelCur.right;\n\t }\n\t lastLevelCur = lastLevelCur.next;\n\t }\n\t lastLevelCur = curLevelHead;\n\t }\n\t \n\t }", "public void makeEmpty() {\r\n\t\troot = null;\r\n\t\tleftChild = null;\r\n\t\trightChild= null;\r\n\t}", "public void connect2 (TreeLinkNode root) {\n if (root != null) {\n if (root.left != null) {\n if (root.right != null) {\n root.left.next = root.right;\n }\n }\n if (root.next != null) {\n TreeLinkNode t = root.right == null ? root.left : root.right;\n TreeLinkNode t2 = root.next.left == null ? root.next.right : root.next.left;\n t.next = t2;\n }\n connect2 (root.left);\n connect2 (root.right);\n }\n }", "static void postOrderTwoStacks(Node root) {\n Stack<Node> stack = new Stack<>();\n Stack<Node> stack2 = new Stack<>();\n if (root == null) {\n return;\n } else {\n stack.push(root);\n while (!stack.isEmpty()) {\n Node temp = stack.pop();\n stack2.push(temp);\n if (temp.left != null) {\n stack.push(temp.left);\n }\n if (temp.right != null) {\n stack.push(temp.right);\n }\n }\n while (!stack2.isEmpty()) {\n Node temp = stack2.pop();\n System.out.print(temp.data + \" \");\n }\n }\n }", "private void process(TreeNode root){\n while(root!=null){\n dq.push(root);\n root= root.left;\n }\n }", "static void postOrderOneStack(Node root) {\n Stack<Node> stack = new Stack<>();\n while (true) {\n while (root != null) {\n stack.push(root);\n stack.push(root);\n root = root.left;\n }\n if (stack.isEmpty()) {\n return;\n }\n root = stack.pop();\n if (!stack.isEmpty() && stack.peek() == root) {\n root = root.right;\n } else {\n System.out.print(root.data + \" \");\n root = null;\n }\n }\n }", "@Override\n public void nullstill() {\n Node<T> curr= hode;\n while (curr!=null){\n Node<T> p= curr.neste;\n curr.forrige=curr.neste= null;\n curr.verdi= null;\n curr= p;\n }\n hode= hale= null;\n endringer++;\n antall=0;\n }", "public void inorder()\r\n {\r\n inorder(root);\r\n }", "private void inorder() {\n inorder(root);\n }", "private static boolean isUnivalNode(Node x, Set<Node> set) {\n if (x == null) { return true; }\n boolean left = isUnivalNode(x.left, set);\n boolean right = isUnivalNode(x.right, set);\n\n if (left && right) {\n boolean leftSubTree = x.left == null || x.left.val == x.val;\n boolean rightSubTree = x.right == null || x.right.val == x.val;\n if (leftSubTree && rightSubTree) {\n set.add(x);\n return true;\n }\n }\n return false;\n }", "TreeNode(){\n this.elem = null;\n this.left = null;\n this.right = null;\n }", "public void inorder()\r\n\t{\r\n\t\tif(root==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"tree is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// find the leftmost node of the tree\r\n\t\tNode p =root;\r\n\t\twhile(p.leftThread==false)\r\n\t\t\tp=p.left;\r\n\t\twhile(p!=null)//loop until we reach the right most node whose right link(rightThread) is null\r\n\t\t{\r\n\t\t\tSystem.out.print(p.info + \" \");\r\n\t\t\tif(p.rightThread==true) // if 'right' is pointing to the inorder successor\r\n\t\t\t\tp = p.right;\r\n\t\t\telse // find the inorder successor i.e the left most node in the right sub tree\r\n\t\t\t{\r\n\t\t\t\tp = p.right;\r\n\t\t\t\twhile(p.leftThread==false)\r\n\t\t\t\t\tp = p.left;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }", "public boolean SetRight(Tree rn){\n\tright = rn ;\n\treturn true ;\n }" ]
[ "0.635257", "0.63497317", "0.6343343", "0.629354", "0.6262315", "0.6233057", "0.62104785", "0.6209366", "0.61795974", "0.61702406", "0.61336684", "0.6111164", "0.60891306", "0.60184675", "0.6011464", "0.5998601", "0.59949446", "0.59898233", "0.5989032", "0.5967837", "0.5937498", "0.59181345", "0.59181345", "0.59091145", "0.59091145", "0.5891956", "0.5885448", "0.58739835", "0.5869781", "0.5848419", "0.5844745", "0.5828912", "0.5818883", "0.58055747", "0.57933617", "0.576491", "0.57637435", "0.5757966", "0.57538426", "0.5748453", "0.57464004", "0.57389987", "0.57263297", "0.5720983", "0.5718139", "0.5717266", "0.5716269", "0.5710723", "0.57022", "0.5701294", "0.56979525", "0.5693781", "0.56915224", "0.56829816", "0.5679645", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055", "0.56738055" ]
0.6443422
0
TODO Autogenerated method stub
public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg2) throws Exception { boolean flag = false; String cxtPath = request.getContextPath(); String url = request.getRequestURI(); for (String param : IGNORE_URIS) { if (StringUtils.contains(param, url)) { flag = true; break; } } if (!flag) { String session = (String) request.getSession().getAttribute( Constant.SESSION_USER); if (StringUtils.isEmpty(session)) { if ("XMLHttpRequest".equalsIgnoreCase(request .getHeader("x-requested-with"))) { response.setStatus(5000); return true; } else { response.sendRedirect(cxtPath + "/index.html"); } } else { flag = true; } } return flag; }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
Returns the height of the horizontal scroll bar.
int getHScrollbarHeight();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected RectF getHorizontalScrollBarRect() {\n return mHorizontalScrollBar;\n }", "int getVScrollbarWidth();", "protected RectF getVerticalScrollBarRect(){\n return mVerticalScrollBar;\n }", "public JScrollPane getScrollbar(){\n\t\treturn scrollbar;//Return the scroll bar\n\t}", "public ScrollBar getHBar()\n {\n if (_hbar!=null) return _hbar;\n _hbar = new ScrollBar();\n _hbar.addPropChangeListener(pc -> scrollBarDidPropChange(pc), ScrollBar.Scroll_Prop);\n return _hbar;\n }", "protected double getMinHeightImpl()\n {\n Insets ins = getInsetsAll();\n double minH = _scroller.getMinHeight();\n return minH + ins.getHeight();\n }", "public int getScrollHeight() {\n\t\treturn this.scrollHeight;\n\t}", "public int getHorizontalScrollBarPolicy() {\n/* 522 */ return this.horizontalScrollBarPolicy;\n/* */ }", "public int getScroll() {\n return mTransparentStartHeight - getTransparentViewHeight() + getMaximumScrollableHeaderHeight()\n - getToolbarHeight() + mScrollView.getScrollY();\n }", "@Override\n\tpublic final int getScrollHeight() {\n\t\t// TODO(dramaix): Use document.scrollingElement when its available. See\n\t\t// getScrollLeft().\n\t\treturn getViewportElement().getScrollHeight();\n\t}", "JScrollBar getScrollBar() {\n return scrollBar;\n }", "public int getVerticalScrollBarPolicy() {\n/* 473 */ return this.verticalScrollBarPolicy;\n/* */ }", "public final int getHeight() {\r\n return (int) size.y();\r\n }", "public int getScrollMaxX(){\n return (int)Math.max(0, mMaxPaintX - getWidth() / 2f);\n }", "public int getScrollMaxY(){\n return Math.max(0, getLineHeight() * getLineCount() - getHeight() / 2);\n }", "@Transient\n/* */ public JScrollBar getHorizontalScrollBar() {\n/* 827 */ return this.horizontalScrollBar;\n/* */ }", "public JScrollBar createHorizontalScrollBar() {\n/* 814 */ return new ScrollBar(0);\n/* */ }", "private int getStatusBarHeight() {\n int result = 0;\n int resourceId = context.getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0) {\n result = context.getResources().getDimensionPixelSize(resourceId);\n }\n return result;\n }", "public int getH() {\n\t\treturn this.height;\n\t}", "public int getMaxY() {\n return scroller.getMaxY();\n }", "public int getMinY() {\n return scroller.getMinY();\n }", "@SuppressWarnings(\"unused\")\n public int getProgressBarHeight() {\n LayoutParams lp = getLayoutParams();\n\n if (lp==null) return 0;\n\n return lp.height;\n }", "public int getStatusBarHeight() {\n int result = 0;\n int resourceId = _act.getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0) {\n result = _act.getResources().getDimensionPixelSize(resourceId);\n }\n return result;\n }", "public float getHeight()\n {\n return getUpperRightY() - getLowerLeftY();\n }", "public Rectangle getScrollRectangle() {\r\n return scrollRectangle;\r\n }", "@Override\r\n\tpublic int getDefaultHeight() {\n\t\tint w=0;\r\n\t\tToolbarLayout tl = (ToolbarLayout) getLayoutManager();\r\n\t\tif(tl.isHorizontal()){\t\t\r\n\t\t\tList list = getChildren();\r\n\t\t\tint max = 0;\r\n\t\t\tif(list.size()>0){\r\n\t\t\t\tfor (Object obj : list) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tAbstractElementFigure fig = (AbstractElementFigure) obj;\r\n\t\t\t\t\tif(max < fig.getDefaultHeight()){\r\n\t\t\t\t\t\tmax = fig.getDefaultHeight();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn max;\r\n\t\t\t}\t\t\r\n\t\t}else{\r\n\t\t\tList list = getChildren();\r\n\t\t\tif(list.size()>0){\r\n\t\t\t\tfor (Object obj : list) {\r\n\t\t\t\t\tAbstractElementFigure fig = (AbstractElementFigure) obj;\r\n\t\t\t\t\tw+=fig.getDefaultHeight();\r\n\t\t\t\t}\r\n\t\t\t\treturn w;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 100;\r\n\t}", "public int getStatusBarHeight() {\n int result = 0;\n int resourceId = getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0) {\n result = getResources().getDimensionPixelSize(resourceId);\n }\n return result;\n }", "public int getStatusBarHeight() {\n int result = 0;\n int resourceId = getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0) {\n result = getResources().getDimensionPixelSize(resourceId);\n }\n return result;\n }", "public double getRectHeight() {\n return (hexHeight * 1.5) + 0.5;\n }", "public int getHeight() {\r\n\t\treturn height + yIndent;\r\n\t}", "public int getScrollWidth() {\n\t\treturn this.scrollWidth;\n\t}", "private int getScrollVal() {\n return Math.abs((int)scrollBar.getValue());\n }", "Integer getCurrentHeight();", "public int getHeight()\r\n\t{\r\n\t\treturn HEIGHT;\r\n\t}", "public int getStatusBarHeight() {\n int resourceId = getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0)\n return getResources().getDimensionPixelSize(resourceId);\n return 0;\n }", "public int getCurrentHeight();", "public int getHorY() {\r\n return horY;\r\n }", "int getheight();", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\n return mHeight;\n }", "public int getHeight() {\n return mHeight;\n }", "public double getHeight() {\r\n\r\n\t\treturn h;\r\n\r\n\t}", "public int getMinHeight() {\n checkWidget();\n return minHeight;\n }", "public int getHeight() {\r\n\t\t\r\n\t\treturn height;\r\n\t}", "public float getYHeight() {\n\t\treturn this.yHeight;\n\t}", "public int getHeight()\r\n\t{\r\n\t\treturn mHeight;\r\n\t}", "public final int getHeight() {\r\n return height;\r\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\treturn this.height;\r\n\t}", "public double getHeight() {\n return getElement().getHeight();\n }", "public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n return height;\n }", "public int getHeight()\n\t{\n\t\treturn mHeight;\n\t}", "protected double getPrefHeightImpl(double aW)\n {\n Insets ins = getInsetsAll();\n double prefH = _scroller.getBestHeight(aW);\n if (_showHBar == Boolean.TRUE)\n prefH += getBarSize();\n return prefH + ins.getHeight();\n }", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n return this.height;\n }", "public int getHeight() {\n\t\treturn this.height;\n\t}", "private int getStatusBarHeight() {\n if (mStatusBarHeight == 0) {\n Rect screenFrame = new Rect();\n getWindow().getDecorView().getWindowVisibleDisplayFrame(screenFrame);\n mStatusBarHeight = screenFrame.top;\n }\n\n return mStatusBarHeight;\n }", "public int getHeight() \n\t{\n\t\treturn height;\n\t}", "public int getHeight() {\r\n return Height;\r\n }", "public int getPanelHeight() {\n return height;\n }", "public int getHeight() {\n\t\t\treturn height;\n\t\t}", "public double getHeight() {\n\t\t\treturn height.get();\n\t\t}", "public int getHeight() {\n\t\treturn getHeight(this);\n\t}", "public int getHeight() {\n\t\treturn canvasHeight;\n\t}", "public int getHeight()\n {\n return this.height;\n }", "public int getHeight() {\n return (int) Math.round(height);\n }", "public double getHeight() {\r\n\t\treturn height;\r\n\t}", "@Override\n\tpublic int getHeight() {\n\t\treturn windowHeight;\n\t}", "public int getHeight() {\n return this.height;\n }", "public int getHeight()\n {\n return height;\n }", "public int getMaxX() {\n return scroller.getMaxX();\n }", "protected int getHeightDelta() {\n return super.getHeightDelta()+ menuBarHeightDelta;\n }", "public double getHeight () {\n return height;\n }" ]
[ "0.7397494", "0.709592", "0.68723303", "0.67631936", "0.65532273", "0.6528825", "0.65000546", "0.64720356", "0.64516926", "0.6416451", "0.63813484", "0.634961", "0.6328607", "0.62577665", "0.62396634", "0.62337", "0.6231988", "0.62311727", "0.62291306", "0.6224864", "0.6219846", "0.62139326", "0.6207152", "0.6187922", "0.61683685", "0.61663", "0.61648023", "0.61648023", "0.6161337", "0.61539114", "0.61449444", "0.6123476", "0.61219615", "0.60882413", "0.60821915", "0.60720694", "0.60550845", "0.605303", "0.6023525", "0.6023525", "0.6020801", "0.6020801", "0.6019204", "0.6018432", "0.60123277", "0.601086", "0.6007383", "0.5999043", "0.5998506", "0.5998506", "0.5998506", "0.5998506", "0.5998506", "0.5998506", "0.5998506", "0.5998506", "0.5998506", "0.5998506", "0.5998506", "0.5992863", "0.59881645", "0.5985373", "0.598428", "0.5977239", "0.5977239", "0.5977239", "0.5977239", "0.5977239", "0.5977239", "0.5977239", "0.5977239", "0.5977239", "0.5977239", "0.5977239", "0.5965055", "0.59594977", "0.59590125", "0.5956853", "0.5956853", "0.5954487", "0.5954487", "0.5954487", "0.595404", "0.5953788", "0.5953177", "0.59482", "0.59469646", "0.59467566", "0.59325904", "0.59300905", "0.59285986", "0.59240395", "0.5917925", "0.5912718", "0.5912551", "0.5910297", "0.59079915", "0.59047854", "0.5904569", "0.5900941" ]
0.8022364
0
Returns the width of the vertical scroll bar.
int getVScrollbarWidth();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getHScrollbarHeight();", "protected RectF getVerticalScrollBarRect(){\n return mVerticalScrollBar;\n }", "public int getScrollWidth() {\n\t\treturn this.scrollWidth;\n\t}", "public JScrollPane getScrollbar(){\n\t\treturn scrollbar;//Return the scroll bar\n\t}", "protected RectF getHorizontalScrollBarRect() {\n return mHorizontalScrollBar;\n }", "public int getVerticalScrollBarPolicy() {\n/* 473 */ return this.verticalScrollBarPolicy;\n/* */ }", "JScrollBar getScrollBar() {\n return scrollBar;\n }", "public int getHorizontalScrollBarPolicy() {\n/* 522 */ return this.horizontalScrollBarPolicy;\n/* */ }", "@Override\n\tpublic final int getScrollWidth() {\n\t\t// TODO(dramaix): Use document.scrollingElement when its available. See\n\t\t// getScrollLeft().\n\t\treturn getViewportElement().getScrollWidth();\n\t}", "public ScrollBar getVBar()\n {\n if (_vbar!=null) return _vbar;\n _vbar = new ScrollBar(); _vbar.setVertical(true);\n _vbar.addPropChangeListener(pc -> scrollBarDidPropChange(pc), ScrollBar.Scroll_Prop);\n return _vbar;\n }", "@Transient\n/* */ public JScrollBar getHorizontalScrollBar() {\n/* 827 */ return this.horizontalScrollBar;\n/* */ }", "@Transient\n/* */ public JScrollBar getVerticalScrollBar() {\n/* 886 */ return this.verticalScrollBar;\n/* */ }", "private int getScrollVal() {\n return Math.abs((int)scrollBar.getValue());\n }", "public JScrollBar createVerticalScrollBar() {\n/* 873 */ return new ScrollBar(1);\n/* */ }", "public JScrollBar createHorizontalScrollBar() {\n/* 814 */ return new ScrollBar(0);\n/* */ }", "public int getScrollMaxX(){\n return (int)Math.max(0, mMaxPaintX - getWidth() / 2f);\n }", "public int getYWidth() {\n return yWidth;\n }", "private int getStatusBarHeight() {\n int result = 0;\n int resourceId = context.getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0) {\n result = context.getResources().getDimensionPixelSize(resourceId);\n }\n return result;\n }", "public int getScroll() {\n return mTransparentStartHeight - getTransparentViewHeight() + getMaximumScrollableHeaderHeight()\n - getToolbarHeight() + mScrollView.getScrollY();\n }", "public int getStatusBarHeight() {\n int result = 0;\n int resourceId = _act.getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0) {\n result = _act.getResources().getDimensionPixelSize(resourceId);\n }\n return result;\n }", "public int getStatusBarHeight() {\n int result = 0;\n int resourceId = getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0) {\n result = getResources().getDimensionPixelSize(resourceId);\n }\n return result;\n }", "public int getStatusBarHeight() {\n int result = 0;\n int resourceId = getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0) {\n result = getResources().getDimensionPixelSize(resourceId);\n }\n return result;\n }", "public int getScrollAmount()\r\n\t{\r\n\t\treturn scrollAmount;\r\n\t}", "private JScrollBar getJScrollBar() {\r\n\t\tif (jScrollBar == null) {\r\n\t\t\tjScrollBar = new JScrollBar();\r\n\t\t\tjScrollBar.setBounds(new Rectangle(591, 127, 17, 333));\r\n\t\t}\r\n\t\treturn jScrollBar;\r\n\t}", "public int getViewportWidth() {\n return viewport.getWidth();\n }", "public int width()\n {\n return Math.max(top, bottom);\n }", "public VerticalScrollbar() {}", "public int getVerticalMargin() {\n return mLayoutManager.getVerticalMargin();\n }", "@Override\n\tpublic int getWidth() {\n\n\t\treturn ((WorldWindowSWTGLCanvas) slave).getCanvas().getSize().x;\n\t}", "public int getMaxY() {\n return scroller.getMaxY();\n }", "public Rectangle getScrollRectangle() {\r\n return scrollRectangle;\r\n }", "public int getStatusBarHeight() {\n int resourceId = getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0)\n return getResources().getDimensionPixelSize(resourceId);\n return 0;\n }", "public double getBboxVerticalSidelength() {\n return getDouble(\"tvert\");\n }", "private void drawScrollBarVertical(Canvas canvas,int width) {\n int page = getHeight();\n float all = getLineHeight() * getLineCount() + getHeight() / 2;\n float length = page / all * getHeight();\n float topY;\n if(length < mDpUnit * 30) {\n mVerticalScrollBarSizeEnlarged = true;\n length = mDpUnit * 30;\n topY = (getOffsetY() + page / 2f) / all * (getHeight() - length);\n }else{\n topY = getOffsetY() / all * getHeight();\n mVerticalScrollBarSizeEnlarged = false;\n }\n if(mEventHandler.holdVerticalScrollBar()) {\n float centerY = topY + length / 2f;\n drawLineInfoPanel(canvas,centerY,mRect.left - mDpUnit * 5);\n }\n mRect.right = getWidth();\n mRect.left = getWidth() - mDpUnit * width;\n mRect.top = topY;\n mRect.bottom = topY + length;\n mVerticalScrollBar.set(mRect);\n drawColor(canvas,mColors.getColor(mEventHandler.holdVerticalScrollBar() ? ColorScheme.SCROLL_BAR_THUMB_DOWN : ColorScheme.SCROLL_BAR_THUMB),mRect);\n }", "public int getScrollMaxY(){\n return Math.max(0, getLineHeight() * getLineCount() - getHeight() / 2);\n }", "@objid (\"1b87bc2e-5e33-11e2-b81d-002564c97630\")\n private Point getViewAreaSize() {\n final Point controlSize = new Point(0, 0);\n // this has to be done in the display thread to avoid\n // InvalidThreadAccessException.\n getViewer().getControl().getDisplay().syncExec(new Runnable() {\n @Override\n public void run() {\n final Control control = BackgroundEditPart.this.getViewer().getControl();\n Point p = control.getSize();\n controlSize.x = p.x;\n controlSize.y = p.y;\n \n if (control instanceof Scrollable) {\n Scrollable c = (Scrollable) control;\n ScrollBar b = c.getHorizontalBar();\n if (b != null /* && b.isVisible() */) {\n controlSize.y -= b.getSize().y;\n }\n b = c.getVerticalBar();\n if (b != null /* && b.isVisible() */) {\n controlSize.x -= b.getSize().x;\n }\n }\n }\n });\n return controlSize;\n }", "protected double getPrefWidthImpl(double aH)\n {\n Insets ins = getInsetsAll();\n double prefW = _scroller.getBestWidth(aH);\n if (_showVBar == Boolean.TRUE)\n prefW += getBarSize();\n return prefW + ins.getWidth();\n }", "public int getUsedViewportWidth() {\n return Math.abs((int)(0.5 + widthViewport - xMargin));\n }", "public int getPanelWidth() {\n return width;\n }", "public int getMinY() {\n return scroller.getMinY();\n }", "public double getRelativeVerticalIncrement() {\n var pane = (ScrollPane) getNode();\n var region = getRegionToScroll();\n return region == null ? 0 : increment / (region.getHeight() - pane.getViewportBounds().getHeight());\n }", "private void drawScrollBarTrackVertical(Canvas canvas,int width) {\n if(mEventHandler.holdVerticalScrollBar()) {\n mRect.right = getWidth();\n mRect.left = getWidth() - mDpUnit * width;\n mRect.top = 0;\n mRect.bottom = getHeight();\n drawColor(canvas,mColors.getColor(ColorScheme.SCROLL_BAR_TRACK),mRect);\n }\n }", "@JSProperty(\"scrollbar\")\n @Nullable\n ZAxisScrollbarOptions getScrollbar();", "@Override\n protected int computeVerticalScrollRange() {\n final int numColumns = mColCount;\n final int rowCount = (mItemCount + numColumns - 1) / numColumns;\n int result = Math.max(rowCount * 100, 0);\n if (getScrollY() != 0) {\n // Compensate for overscroll\n result += Math.abs((int) ((float) getScrollY() / getHeight() * rowCount * 100));\n }\n return result;\n }", "public float getTotalScroll()\r\n\t{\r\n\t\treturn total_scroll;\r\n\t}", "@Override\n\tpublic final int getScrollHeight() {\n\t\t// TODO(dramaix): Use document.scrollingElement when its available. See\n\t\t// getScrollLeft().\n\t\treturn getViewportElement().getScrollHeight();\n\t}", "public int getUsedHeightViewport() {\n return Math.abs((int)(0.5 + heightViewport - yMargin));\n }", "@SuppressWarnings(\"unused\")\n public int getProgressBarHeight() {\n LayoutParams lp = getLayoutParams();\n\n if (lp==null) return 0;\n\n return lp.height;\n }", "public float total_scroll() {\r\n\t\treturn total_scroll;\r\n\t}", "protected double getMinWidthImpl()\n {\n Insets ins = getInsetsAll();\n double minW = _scroller.getMinWidth();\n return minW + ins.getWidth();\n }", "public ScrollBar getHBar()\n {\n if (_hbar!=null) return _hbar;\n _hbar = new ScrollBar();\n _hbar.addPropChangeListener(pc -> scrollBarDidPropChange(pc), ScrollBar.Scroll_Prop);\n return _hbar;\n }", "@Override\n\tpublic ScrollBar createScrollBar() {\n\t\tLightVisualThemeScrollBar lightVisualThemeScrollBar = new LightVisualThemeScrollBar();\n\t\treturn lightVisualThemeScrollBar;\n\t}", "public int getMaxX() {\n return scroller.getMaxX();\n }", "public int getHauptWidth() {\n\t\treturn hauptWidth;\n\t}", "public int getHorSTY() {\r\n return horSTY;\r\n }", "public double getVideoWidth() {\n return getElement().getVideoWidth();\n }", "public int getWidth () {\r\n\tcheckWidget();\r\n\tint [] args = {OS.Pt_ARG_WIDTH, 0, 0};\r\n\tOS.PtGetResources (handle, args.length / 3, args);\r\n\treturn args [1];\r\n}", "public static int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "Integer getCurrentWidth();", "int getScrollLeft();", "private void drawVerticalScrollBar(){\n }", "@Override\n\tpublic final int getClientWidth() {\n\t\treturn getViewportElement().getClientWidth();\n\t}", "public final int getWidth() {\r\n return (int) size.x();\r\n }", "public int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\n\t\treturn width;\r\n\t}", "public int getWidth(){\n Window w = vc.getFullScreenWindow();\n if(w != null){\n return w.getWidth();\n } else {\n return 0;\n }\n }", "public int getWidthvetana() \r\n\t{\r\n\t\treturn widthvetana;\r\n\t}", "public int getBarSize() {\n return mBarSize;\n }", "public int getWidth() {\r\n\t\t\r\n\t\treturn width;\r\n\t}", "public int getCurrentWidth();", "public int getWidth()\n {\n return larghezza;\n }", "public int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public abstract int getStatusBarHeight(int position);", "public int getViewportWidth() {\n return scalableImage.getViewportWidth();\n }", "public int getRowWidth(int y) {\n\t\treturn widths[y];\n\t}", "public double getWidth()\r\n {\r\n return width;\r\n }", "public int width() {\r\n return width;\r\n }", "public double getWidth () {\n return width;\n }", "public int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public double getWidth() {\n\t\t\treturn width.get();\n\t\t}", "public int getWidth()\r\n\t{\r\n\t\treturn WIDTH;\r\n\t}", "@Override\r\n\tpublic int getDefaultWidth() {\n\t\tint w=0;\r\n\t\tToolbarLayout tl = (ToolbarLayout) getLayoutManager();\r\n\t\tif(tl.isHorizontal()){\t\t\r\n\t\t\tList list = getChildren();\r\n\t\t\tif(list.size()>0){\r\n\t\t\t\tfor (Object obj : list) {\r\n\t\t\t\t\tAbstractElementFigure fig = (AbstractElementFigure) obj;\r\n\t\t\t\t\tw+=fig.getDefaultWidth();\r\n\t\t\t\t}\r\n\t\t\t\treturn w;\r\n\t\t\t}\t\t\r\n\t\t}else{\r\n\t\t\tList list = getChildren();\r\n\t\t\tint max = 0;\r\n\t\t\tif(list.size()>0){\r\n\t\t\t\tfor (Object obj : list) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tAbstractElementFigure fig = (AbstractElementFigure) obj;\r\n\t\t\t\t\tif(max < fig.getDefaultWidth()){\r\n\t\t\t\t\t\tmax = fig.getDefaultWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn max;\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\treturn 100;\r\n\t}", "public double getWidth() {\n return getElement().getWidth();\n }", "public int getBarSize() { return _barSize; }", "public double getWidth() {\r\n return width;\r\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }" ]
[ "0.71555823", "0.6972424", "0.6964514", "0.6879101", "0.68765944", "0.6729417", "0.66474795", "0.6601548", "0.64368886", "0.6390983", "0.6308435", "0.6307542", "0.6245358", "0.6162383", "0.61440116", "0.6052802", "0.60402846", "0.6033869", "0.59995073", "0.5988137", "0.59765816", "0.59765816", "0.5911436", "0.58667713", "0.58641845", "0.5846302", "0.58357596", "0.5826893", "0.58223027", "0.5822239", "0.5817422", "0.5799013", "0.57947975", "0.579232", "0.5759156", "0.5739287", "0.57333803", "0.572243", "0.5706033", "0.56942725", "0.5690326", "0.567109", "0.56651485", "0.5664241", "0.5647922", "0.5643783", "0.5637769", "0.56375206", "0.56129014", "0.5607909", "0.560556", "0.55966824", "0.55861694", "0.5571909", "0.5565818", "0.5547857", "0.55374914", "0.55327296", "0.553256", "0.55308133", "0.5525083", "0.5520205", "0.55149156", "0.5500813", "0.5498184", "0.54951733", "0.5494345", "0.5478495", "0.54774773", "0.5477167", "0.5476474", "0.5475279", "0.54745233", "0.54745233", "0.5474506", "0.5473231", "0.54730946", "0.54724455", "0.54724085", "0.54664814", "0.54623866", "0.5461952", "0.546045", "0.5459239", "0.54512423", "0.5450437", "0.54476494", "0.5447403", "0.5447403", "0.5447403", "0.5447403", "0.5447403", "0.5447403", "0.5447403", "0.5447403", "0.5447403", "0.5447403", "0.5447403", "0.5447403", "0.5447403" ]
0.8500365
0
Sets the scroll position of the child.
void setScrollPosition(int x, int y);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setViewPosition(Point p) {\n synchronized (scrollPane.getTreeLock()) {\n // Scroll the view now...\n super.setViewPosition(p);\n }\n }", "void setScrollLeft(int scrollLeft);", "void setScrollTop(int scrollTop);", "@Override\r\n public void scrollToPosition(int position) {\r\n super.scrollToPosition(transformInnerPositionIfNeed(position));\r\n }", "private void updateScrollPosition() {\n int oldTop = scrollTop;\n int oldLeft = scrollLeft;\n scrollTop = DOM.getElementPropertyInt(getElement(), \"scrollTop\");\n scrollLeft = DOM.getElementPropertyInt(getElement(), \"scrollLeft\");\n if (connection != null && !rendering) {\n if (oldTop != scrollTop) {\n connection.updateVariable(id, \"scrollTop\", scrollTop, false);\n }\n if (oldLeft != scrollLeft) {\n connection.updateVariable(id, \"scrollLeft\", scrollLeft, false);\n }\n }\n }", "public void setOnScrollTo(EventHandler<ScrollToEvent<Integer>> value) {\n\n this.getWrappedControl().setOnScrollTo(value);\n }", "private void setScrollOffsetX(int value) {\n bitField0_ |= 0x00000010;\n scrollOffsetX_ = value;\n }", "public void recallScrollPos() {\n if (_primaryPlot!=null) {\n recallScrollPos(_scrollInfo.get(_primaryPlot).makeCopy());\n }\n }", "public void setViewPosition(Point p) {\r\n Component parent = getParent();\r\n if ( parent instanceof JScrollPane &&\r\n ((JScrollPane)parent).getVerticalScrollBar().getValueIsAdjusting() ) {\r\n // value is adjusting, skip repaint\r\n return;\r\n }\r\n super.setViewPosition(p);\r\n }", "public void setScroll(int dx,int dy){\n\t\txscroll=dx;\n\t\tyscroll=dy;\n\t}", "void scrollLeft(int scrollLeft);", "@Override\n\tpublic final void setScrollLeft(int left) {\n\t\tDOMImpl.impl.setScrollLeft(documentFor(), left);\n\t}", "public void setScrollAmount(int scrollAmount)\r\n\t{\r\n\t\tthis.scrollAmount = scrollAmount;\r\n\t}", "@Override\n\tpublic final void setScrollTop(int top) {\n\t\tDOMImpl.impl.setScrollTop(documentFor(), top);\n\t}", "public void setPosition(float x, float y)\n {\n bounds.offsetTo(\n x - positionAnchor.x,\n y - positionAnchor.y);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }", "private void moveLineOn() {\n getScroller().startScroll(getOffsetX(),getOffsetY(),0,getLineHeight(),0);\n }", "private void scrollToPosition() {\n mPhotosListView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {\n @Override\n public void onLayoutChange(View v,\n int left,\n int top,\n int right,\n int bottom,\n int oldLeft,\n int oldTop,\n int oldRight,\n int oldBottom) {\n mPhotosListView.removeOnLayoutChangeListener(this);\n final RecyclerView.LayoutManager layoutManager = mPhotosListView.getLayoutManager();\n View viewAtPosition = layoutManager.findViewByPosition(MainActivity.currentPosition);\n // Scroll to position if the view for the current position is null (not currently part of\n // layout manager children), or it's not completely visible.\n if (viewAtPosition == null || layoutManager\n .isViewPartiallyVisible(viewAtPosition, false, true)) {\n mPhotosListView.post(() -> layoutManager.scrollToPosition(MainActivity.currentPosition));\n }\n }\n });\n }", "void scroll(int scrollTop);", "public Builder setScrollOffsetX(int value) {\n copyOnWrite();\n instance.setScrollOffsetX(value);\n return this;\n }", "public void setPosition(){\r\n currentPosition = 0; \r\n }", "public void scrollToTop()\n {\n ensureIndexIsVisible(0);\n }", "@Listen(\"onClick = #scroll\")\n\tpublic void scrollIntoView() {\n\t\ttreeModel.setOpenObjects(treeModel.getRoot().getChildren());\n\t\tTreeitem[] items = tree.getItems().toArray(new Treeitem[0]);\n\t\tClients.scrollIntoView(items[items.length - 1]); //last item is /WEB-INF\n\t}", "public void setCurrentPosition(int value) {\n this.currentPosition = value;\n }", "public void setPos(int pos);", "public void setPos(int pos);", "public void setScrollOffset(int scrollOffset) {\n visibility.setValue(scrollOffset);\n }", "@Override\n public void onAbsoluteScrollChange(int i) {\n }", "@Override\n public void startScroll(int startX, int startY, int dx, int dy) {\n super.startScroll(startX, startY, dx, dy, mDuration);\n }", "@Override\n public void startScroll(int startX, int startY, int dx, int dy) {\n super.startScroll(startX, startY, dx, dy, mDuration);\n }", "@Override\n\t public void startScroll(int startX, int startY, int dx, int dy) {\n\t super.startScroll(startX, startY, dx, dy, mDuration);\n\t }", "private void setScrollDefaultState()\n {\n nestedScrollView.fullScroll(View.FOCUS_UP);\n nestedScrollView.scrollTo(0,0);\n appBarLayout.setExpanded(true);\n }", "public void setPosition(int position);", "public void scrollBy(){\r\n\t\tJavascriptExecutor je = (JavascriptExecutor)Global.driver;\r\n\t\tje.executeScript(\"Window.scrollBy(0,200)\",\"\");\r\n\t}", "private void setupScrollViews() {\n parent = findViewById(R.id.parent_scroll_view);\n child = findViewById(R.id.child_scroll_view1);\n\n parent.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n Log.v(\"TAG\", \"PARENT_TOUCH\");\n parent.requestDisallowInterceptTouchEvent(false);\n return false;\n }\n });\n\n child.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n Log.v(\"TAG\", \"CHILD_DESCRIPTION\");\n parent.requestDisallowInterceptTouchEvent(true);\n return false;\n }\n });\n }", "public void setTargetPosition(float x, float y, float scrollSpeed){\r\n setTargetPosition(x, y);\r\n this.scrollSpeed = scrollSpeed;\r\n }", "public void setUpdateScroll(int updateScroll)\n {\n this.updateScroll = updateScroll;\n }", "private void moveChild(ReactShadowNode child, int moveFromIndex) {\n mMoveProxy.setChildMoveFrom(moveFromIndex, child);\n }", "public abstract void scroll(long ms);", "public void scrollTo(int index) {\n\n this.getWrappedControl().scrollTo(index);\n }", "public final void setPosition(int p) {\n this.position = p;\n }", "@Override\n public void setPosition(long position) throws IOException {\n super.setPosition(position - startPosition);\n }", "@Override\n public void startScroll(int startX, int startY, int dx, int dy, int duration) {\n super.startScroll(startX, startY, dx, dy, mDuration);\n }", "@Override\n public void startScroll(int startX, int startY, int dx, int dy, int duration) {\n super.startScroll(startX, startY, dx, dy, mDuration);\n }", "public void setPosition(Position pos);", "@Override\n\t public void startScroll(int startX, int startY, int dx, int dy, int duration) {\n\t super.startScroll(startX, startY, dx, dy, mDuration);\n\t }", "public void autoscroll(Point p) {\r\n \t\tBasicGraphUI.autoscroll(graph, p);\r\n \t}", "@Override\n\tpublic void setPosition(int left)\n\t{\n\t\t_mainPanel.getElement().getStyle().setLeft(left, Style.Unit.PX) ;\n\t}", "private void setMyScroller() {\n try {\n Class<?> viewpager = ViewPager.class;\n Field scroller = viewpager.getDeclaredField(getResources().getString(R.string.scroll_key));\n scroller.setAccessible(true);\n scroller.set(this, new MyScroller(getContext()));\n } catch (Exception e) {\n Logger.logInfo(String.valueOf(e));\n }\n }", "protected void setPosition(Position p) {\n\t\tposition = p;\n\t}", "protected void scrollToPosition(int position){\n recyclerView.scrollToPosition(position);\n }", "private void updateRootPos() {\n if (!Root.getChildren().contains(scrollBar)) {\n scrollBar.setValue(0);\n setRootYPos(0);\n return;\n }\n\n int sbUpper = getScrollVal();\n int sbLower = sbUpper + round(windowHeight);\n\n int textHeight = getTextHeight();\n if (textHeight < sbLower) {\n setRootYPos(-(sbUpper - (sbLower - textHeight)));\n scrollBar.setValue(scrollBar.getMax());\n }\n\n int cursorYUPos = round(cursor.getY());\n int cursorYDPos = cursorYUPos + round(cursor.getHeight());\n if (cursorYUPos >= sbUpper && cursorYDPos <= sbLower) {\n return;\n }\n if (cursorYUPos < sbUpper) {\n int mov = sbUpper - cursorYUPos;\n setRootYPos(-(sbUpper - mov));\n scrollBar.setValue(sbUpper - mov);\n } else {\n int mov = cursorYDPos - sbLower;\n setRootYPos(-(sbUpper + mov));\n scrollBar.setValue(sbUpper + mov);\n }\n\n }", "public void scrollToXPos(int x) {\n horizontalScroll = x;\n repaint();\n }", "private void setPosition(int startPosition) {\n switch (direction) {\n case UP:\n case DOWN:\n this.posX = componentToMove.getX();\n this.posY = componentToMove.getY() + (direction == Direction.UP ? startPosition : -startPosition);\n break;\n default:\n this.posX = componentToMove.getX() + (direction == Direction.LEFT ? startPosition : -startPosition);\n this.posY = componentToMove.getY();\n }\n }", "@SuppressWarnings(\"unused\")\n public void scrollRectToVisible() {\n }", "public void scrolltoPosition(int position)\r\n {\r\n mRecyclerView.scrollToPosition(position);\r\n }", "@Override\n\tpublic void onScrollChanged(ObservableScrollView scrollView, int x, int y,\n\t\t\tint oldx, int oldy) {\n\t\tfor (ScrollView child : mAllAScrollView)\n\t\t\tchild.scrollTo(x, y);\n\t}", "public void setX(float x)\n {\n getBounds().offsetTo(x - positionAnchor.x, getBounds().top);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }", "@Override\n public void onAbsoluteScrollChange(int i) {\n if (i > 0) {\n mHeader.setY(-i);\n }\n }", "public void setScroll_px_per_line(float scroll_px_per_line) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 48, scroll_px_per_line);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 48, scroll_px_per_line);\n\t\t}\n\t}", "@Override\n public void setPosition(int position) {\n this.position = position;\n }", "@Override\n public void scrollToPosition(int position) {\n smoothScrollToPosition(position);\n }", "public void scrollStart(State state);", "public void setScrollState(int i) {\n if (this.mScrollState != i) {\n this.mScrollState = i;\n if (this.mPageTransformer != null) {\n enableLayers(i != 0);\n }\n if (this.mOnPageChangeListener != null) {\n this.mOnPageChangeListener.onPageScrollStateChanged(i);\n }\n }\n }", "void setPosition(double xPos, double yPos);", "public void setScroll_ofs_px(CArrayFacade<Integer> scroll_ofs_px) throws IOException\n\t{\n\t\tlong __dna__offset;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__offset = 52;\n\t\t} else {\n\t\t\t__dna__offset = 52;\n\t\t}\n\t\tif (__io__equals(scroll_ofs_px, __io__address + __dna__offset)) {\n\t\t\treturn;\n\t\t} else if (__io__same__encoding(this, scroll_ofs_px)) {\n\t\t\t__io__native__copy(__io__block, __io__address + __dna__offset, scroll_ofs_px);\n\t\t} else {\n\t\t\t__io__generic__copy( getScroll_ofs_px(), scroll_ofs_px);\n\t\t}\n\t}", "public void onScroll(State state, int positionY);", "@Override\n public void setPosition(float x, float y) {\n }", "protected void setPosition(long positionRequested, boolean update) {\n\t\tif (requestedFile != null) {\n\t\t\tcurrentFile = requestedFile;\n\t\t\trequestedFile = null;\n\t\t}\n\t\tif (currentFile != null) {\n\t\t\ttry {\n\t\t\t\tcurrentPosition = currentFile.setPosition(positionRequested);\n\t\t\t\tif (currentPosition != positionRequested)\n\t\t\t\t\tSystem.err.println(\"Warning: setPosition() failed: \" +\n\t\t\t\t\t\tcurrentPosition + \" instead of \" + positionRequested);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (update)\n\t\t\t\tgui.displayPanel.scrollTo(currentPosition /\n\t\t\t\t\t\tcurrentFile.frameSize / currentFile.frameRate, false);\n\t\t}\n\t}", "void setPosition(Position position);", "void setPosition(Position position);", "protected void setListViewScrollListener() {\n getListView().setOnScrollListener(getScrollListener());\n }", "void setScroller(Scroller scroller) {\n this.scroller = scroller;\n }", "void setScrollBar(final JScrollBar sb) {\n this.scrollBar = sb;\n }", "@Override\n\tprotected void onLayout(boolean changed, int l, int t, int r, int b) {\n\t\tsuper.onLayout(changed, l, t, r, b);\n\t\tif(changed){\n\t\t\tthis.scrollTo(0, 0);\n\t\t}\n\t}", "public void moveTo(int x, int y) {\n\t\tmScrollLeft = x;\n\t\tif (mScrollLeft > 0) {\n\t\t\tmScrollLeft = 0;\n\t\t}\n\t\tif (mScrollLeft < mRightBound) {\n\t\t\tmScrollLeft = mRightBound;\n\t\t}\n\t\tmScrollTop=y;\n\t\tif (mScrollTop > 0) {\n\t\t\tmScrollTop = 0;\n\t\t}\n\t\tif (mScrollTop < mBottomBound) {\n\t\t\tmScrollTop = mBottomBound;\n\t\t}\n\t\tinvalidate();\n\t}", "public void positionChildAt(int position, DisplayChildWindowContainer child, boolean includingParents) {\n getParent().positionChildAt(position, this, includingParents);\n }", "public void addGuest(View aChild, int anIndex) { _scroller.addGuest(aChild, anIndex); }", "public void scrollToPosition(int position) {\n startScrollAnimation(mCurrentPosition, position);\n }", "public void jsScroll(By locator) {\n int elementLocation = find(locator).getLocation().getY();\n JavascriptExecutor js = (JavascriptExecutor) driver;\n js.executeScript(\"window.scrollTo(0,\" + elementLocation + \")\");\n }", "public void setPosition(int position) {\r\r\r\r\r\r\n this.position = position;\r\r\r\r\r\r\n }", "void scrollIntoView(final UIDL uidl) {\n if (uidl.hasAttribute(\"scrollTo\")) {\n Scheduler.get().scheduleDeferred(new Command() {\n public void execute() {\n final Paintable paintable = uidl.getPaintableAttribute(\n \"scrollTo\", connection);\n ((Widget) paintable).getElement().scrollIntoView();\n }\n });\n }\n }", "public void setPosition(int position)\r\n {\r\n this.position = position;\r\n }", "public void setPosition(Position pos) {\n position = new Position(pos);\n }", "public void scrollTo(int x) {\n\t\tsynchronized(HCSListView.this) {\n\t\t\tmScroller.startScroll(mNextX, 0, x - mNextX, 0);\n\t\t\trequestLayout();\n\t\t}\n\t}", "void setPosition(int position) {\n mPosition = position;\n }", "public void scrollDown() {\n JavaScriptExecutor javaScriptExecutor = new JavaScriptExecutor();\n Long value = (Long) javaScriptExecutor.executeScript(\"return window.pageYOffset;\");\n javaScriptExecutor.executeScript(\"scroll(0, \" + (value + 1000) + \");\");\n }", "public void SetPosition(Vector2 position)\n\t{\n\t\tTransform transform = parent.transform;\n\t\ttransform.position = position;\n\t\t// Dont loose your dP!\n\t\tpreviousPosition = Vector2.Add(position,velocity.negate());\n\t}", "public void dispatch() {\n if (getScrollChild() == null) {\n return;\n }\n\n peer.ignoreSetValue = true;\n adjuster.setValue(value);\n peer.ignoreSetValue = false;\n }", "public void scrollToYPos(int y) {\n verticalScroll = y;\n repaint();\n }", "protected void scrollToBottom() {\r\n\t\tContainer parent = this.getParent();\r\n\t\tif (parent instanceof JViewport) {\r\n\t\t\t((JViewport) parent).setViewPosition(new Point(0, this.getHeight()));\r\n\t\t}\r\n\t}", "@Override\r\n public void smoothScrollToPosition(int position) {\r\n int transformedPosition = transformInnerPositionIfNeed(position);\r\n super.smoothScrollToPosition(transformedPosition);\r\n Log.e(\"test\", \"transformedPosition:\" + transformedPosition);\r\n }", "public void setPosition(Integer position);", "public void setPosition(int position) {\r\n this.position = position;\r\n }", "public Builder setTargetPos(int value) {\n bitField0_ |= 0x00000008;\n targetPos_ = value;\n onChanged();\n return this;\n }", "public void setViewPosition(ViewPosition p) {\n\n\t}", "public void setPosition(int x, int y)\n throws IOException {\n seek(y, x);\n }", "@Override // androidx.lifecycle.Observer\n public void onChanged(Integer num) {\n Integer num2 = num;\n if (num2 != null) {\n this.a.c.scrollToPosition(num2.intValue());\n }\n }", "public void setOrigin(int x, int y) {\n checkWidget();\n if (content == null)\n return;\n \n horizontalBar.setPosition(-x);\n verticalBar.setPosition(-y);\n //\t\t\n //\t\tScrollBar hBar = getHorizontalBar();\n //\t\tif (hBar != null) {\n //\t\t\thBar.setSelection(x);\n //\t\t\tx = -hBar.getSelection();\n //\t\t} else {\n //\t\t\tx = 0;\n //\t\t}\n //\t\tScrollBar vBar = getVerticalBar();\n //\t\tif (vBar != null) {\n //\t\t\tvBar.setSelection(y);\n //\t\t\ty = -vBar.getSelection();\n //\t\t} else {\n //\t\t\ty = 0;\n //\t\t}\n content.setLocation(x, y);\n }", "@Override public void computeScroll() {\n super.computeScroll();\n if (scroller != null) {\n scroller.computeScroll();\n }\n }", "public void PositionSet(int position);" ]
[ "0.6817857", "0.6505951", "0.6380501", "0.6377074", "0.61940795", "0.61672485", "0.6074568", "0.6029077", "0.6002682", "0.5976094", "0.5891629", "0.58037734", "0.5791298", "0.57840043", "0.577091", "0.5761455", "0.57594186", "0.575459", "0.56958896", "0.5670453", "0.5661585", "0.56279075", "0.56213784", "0.5610266", "0.5610266", "0.5602882", "0.5597811", "0.5591833", "0.5591833", "0.5586034", "0.5584836", "0.5582834", "0.55814", "0.55509377", "0.554554", "0.55437875", "0.55172443", "0.5515385", "0.55048263", "0.5479284", "0.54770815", "0.54705316", "0.54705316", "0.54701066", "0.5469828", "0.5464361", "0.5454339", "0.543667", "0.54310256", "0.54255813", "0.5420698", "0.5416923", "0.54029065", "0.5399936", "0.53974867", "0.538544", "0.5372865", "0.53551716", "0.53518355", "0.53421015", "0.5340345", "0.53286695", "0.53198296", "0.5319125", "0.53042924", "0.52948743", "0.52768743", "0.5273376", "0.5268032", "0.5268032", "0.5264421", "0.5254018", "0.52487624", "0.5248072", "0.52407867", "0.52308655", "0.5229491", "0.5224464", "0.5224318", "0.52214193", "0.5217633", "0.521607", "0.52069706", "0.5196516", "0.5188392", "0.5186376", "0.5186224", "0.51853025", "0.51820207", "0.51796705", "0.5174186", "0.517343", "0.5168108", "0.51680773", "0.5167166", "0.5156175", "0.5153019", "0.5151382", "0.5151247", "0.5149741" ]
0.7695933
0
Called when the child component changes its size.
void childResized(int w, int h);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void sizeChanged () {\n }", "public void notifyChildrenOfSizeChange() {\n Util.runDescendentsLayout(this);\n }", "@Override\n public void componentResized(ComponentEvent e) {\n }", "@Override\r\n\t\t\tpublic void componentResized(ComponentEvent arg0) {\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\tsuper.componentResized(e);\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n public void componentResized(final ComponentEvent e) {\n buttonWidth = position.isHorizontal() ? 150 : (parent.getWidth() / cells);\n relayout();\n }", "@Override\n\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\n\n\t\t}", "public void onChildSizeChanged(GuiElementBase element, Direction direction)\n\t\t{ expandToFitChildren(direction); }", "public abstract void sizeChanged(SizeChangedEvent event);", "@Override\r\npublic void componentResized(ComponentEvent arg0) {\n\tsetSizeBackgr(getSize());\r\n\tsetSizeHat (getSize());\r\n\tsetSizeGift(getSize());\r\n}", "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\twidthAttitude=e.getComponent().getSize().getWidth()/Width;\n\t\theightAttitude=e.getComponent().getSize().getHeight()/Height;\n\t}", "@Override\n protected final void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.invalidate();\n }", "public void updateSize() {\n\t\tint mpVis = (csub.isMorePanelVisible()) ? 1 : 0;\n\t\tint csubAwake = (csub.isAwake()) ? 1 : 0;\n\t\t\n\t\tint height = csubAwake * (CSub.INTERFACE_PANEL_HEIGHT + mpVis * CSub.MORE_PANEL_HEIGHT);\n\t\t\n\t\tsetPreferredSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t\tsetSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t}", "public void componentResized(ComponentEvent e) \r\n\t{\r\n\t\t//System.out.println(\"Resized: \" + e);\r\n\t\tsuper.componentResized(e);\r\n\t}", "public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }", "public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.w = w;\n this.h = h;\n }", "@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n // Set the movement bounds for the ballParent\n box.set(0, 0, w, h);\n }", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n\t\tif (w > 0 && h > 0) {\r\n\t\t\tcontainerWidth = w;\r\n\t\t\tcontainerHeight = h;\r\n\t\t}\r\n\t}", "public void componentResized(ComponentEvent e) {\n System.out.println(\"componentResized\");\n container.setPreferredSize(new Dimension(getWidth(), getHeight()));\n \t\tcontainer.imageContainer.setBounds(0, 30, container.getPreferredSize().width, container.getPreferredSize().height);\n \t\tcontainer.toolbar.setSize(container.getPreferredSize().width-16, 25);\n \t\tSystem.out.println(container.imageContainer.getPreferredSize());\n \t\trepaint();\n }", "public void childResized(int w, int h) {\n Component c = ((Container)target).getComponent(0);\n c.setLocation(c.getX() - 2, c.getY() - 2);\n\n if(scrollbarDisplayPolicy == ScrollPane.SCROLLBARS_AS_NEEDED) {\n childResizedNative(w, h); // 6228838\n }\n\n // Removed the scrollbar workaround for gtk.\n }", "public void componentResized(ComponentEvent e) {\r\n\r\n int width = getWidth();\r\n int height = getHeight();\r\n\r\n //we check if either the width\r\n //or the height are below minimum\r\n\r\n boolean resize = false;\r\n\r\n if (width < minWidth) {\r\n resize = true;\r\n width = minWidth;\r\n }\r\n if (height < minHeight) {\r\n resize = true;\r\n height = minHeight;\r\n }\r\n if (resize) {\r\n this.setSize(width, height);\r\n }\r\n }", "public void componentResized(ComponentEvent e) {\n\t\t\t\t\n\t\t\t\tDimension size = e.getComponent().getSize();\n\t\t\t\tint infoWidth = 200;\n\t\t\t\tint tabPaneWidth = 200;\n\t\t\t\tint padY = 80;\n\t\t\t\tint padX = 40;\n\t\t\t\tint canvasWidth = (int) (size.width - padX - infoWidth - tabPaneWidth);\n\t\t\t\tint canvasHeight = (int) (size.height - padY);\n\t\t\t\tcanvas.setSize(canvasWidth, canvasHeight);\n\t\t\t\twindow.setSize(canvasWidth, canvasHeight);\n\t\t\t\tinfoPanel.setSize(infoWidth, canvasHeight); \n\t\t\t\t\n\t\t\t\tint tabPadX = 10;\n\t\t\t\tint tabPadY = 30;\n\t\t\t\ttabbedPane.setSize(tabPaneWidth, canvasHeight);\n\t\t\t\texplorerPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tplanPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tcanvas.revalidate();\n\t\t\t}", "public void componentResized(ComponentEvent e) {\n notifyViewportListeners(getXOrigin(), getYOrigin(), panelWidth, panelHeight);\n }", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\twidth = w;\n\t\theigth = h;\n\t\tajestPosition();\n\t\tthis.invalidate();\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t}", "protected abstract void onResize(int width, int height);", "@Override\n\tprotected void changeSize(int x, int y, int previousX, int previousY) {\n this.setWidth(this.getWidth()+(x-previousX));\n this.setHeight(this.getHeight()+(y-previousY));\n this.setX(this.getX()+(x-previousX));\n\t}", "@SuppressWarnings(\"synthetic-access\")\r\n\t @Override\r\n\t public void componentResized(final ComponentEvent arg0) {\n\t\tupdateLocation(WSResizeHandleComponent.this.parent);\r\n\t }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n setGameCards();\n }", "protected abstract void setSize();", "public void componentResized(ComponentEvent e) {\n\t\tresizeBackgroundImage();\n\t\trepaint();\n\t}", "@Override\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\tisOpen = true;\n\t\t\t}", "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\tcardPanel.setPreferredSize(new Dimension(appFrame.getWidth(), appFrame.getCentrePanel().getHeight() * 2 / 3));\n\t\tsummaryPanel.setPreferredSize(new Dimension(appFrame.getWidth(), appFrame.getCentrePanel().getHeight() / 3));\n\t\t\n\t\tcardPanel.repaint();\n\t\tcardPanel.revalidate();\n\t\tsummaryPanel.repaint();\n\t\tsummaryPanel.revalidate();\n\t}", "@Override\n public void componentResized(ComponentEvent componentEvent) {\n ControlFrame.this.pack();\n }", "public abstract void windowResized();", "@Override\n\tpublic void resizeToChildren () {\n\t}", "private void handleSizeChange(Object observable) {\n imageView.fitToSize(getWidth(), getHeight());\n placeHolder.setGlyphSize(Math.min(getWidth(), getHeight()) * 0.6);\n }", "@Override public void onSizeChanged(int w, int h, int oldw, int oldh)\n {\n super.onSizeChanged(w, h, oldw, oldh);\n // Release the buffer, if any and it will be reallocated on the next draw\n mBuffer = null;\n }", "public void componentResized(ComponentEvent e)\n/* 410: */ {\n/* 411:478 */ TileGIS.this.mapPanel.setSize(TileGIS.this.placeholder.getJComponent().getSize());\n/* 412: */ }", "public void updateHeight() {\n Rectangle repaintBounds = getBounds();\n parent.getScene().paintImmediately(repaintBounds);\n\n // set new height compute while repainting.\n setBounds(new Rectangle(bounds));\n\n parent.getScene().repaint(repaintBounds);\n setChanged();\n notifyObservers();\n }", "public void onResized(Integer width,Integer height);", "public void changeSize(int width, int height) {\n this.width = width;\n this.height = height;\n updateBounds();\n updateChildren();\n }", "@Override\n\tpublic void onResize(int width, int height) {\n\t}", "void onResized(int width, int height);", "@Override\n\tpublic void resized() {\n\t}", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n\t\t// 图所占范围大小\r\n\t\tchart.setChartRange(w, h);\r\n\t}", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "public void setHeight(double aValue)\n{\n if(_height==aValue) return; // If value already set, just return\n repaint(); // Register repaint\n firePropertyChange(\"Height\", _height, _height = aValue, -1); // Set value and fire PropertyChange\n if(_parent!=null) _parent.setNeedsLayout(true); // Rather bogus\n}", "@Override\n\t\t\tpublic void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n\t\t\t\tviewState.set(ViewState.RESIZE);\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void onSizeChanged(int w, int h, int oldW, int oldH) {\r\n\t\t// Set the movement bounds for the ball\r\n\t\txMax = w - 1;\r\n\t\tyMax = h - 1;\r\n\t}", "public void componentResized(ComponentEvent event) {\n // resize the image\n if (isOn()) {\n setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), onImageIcon));\n } else {\n setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), offImageIcon));\n }\n }", "@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n mId = w / 2;\n mId = mId - mViewsCount * 9;\n }", "@Override\n\tpublic void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tmRequiredRadius = (int) (Math.sqrt(w * w + h * h) / 3);\n\t}", "@Override\n public void componentResized(ComponentEvent e) {\n setShape(new Ellipse2D.Double(0,0,FRAME_WIDTH,FRAME_WIDTH));\n }", "@Override\n public void componentResized(java.awt.event.ComponentEvent evt) {\n resizeGrid();\n }", "protected void sendSizeChange(int oldw, int oldh) {\n if (oldw != this.getWidth() || oldh != this.getHeight())\n this.m_eventSender.sendEvent(RESIZED_EVENT, this, new SizeData(oldw,oldh));\n }", "public void componentShown(ComponentEvent event) {\n // resize this\n componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));\n }", "public void componentShown(ComponentEvent event) {\n // resize this\n componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));\n }", "public void setSize(Dimension newSize) {\n\t\tif(newSize.height<80)\n\t\t\tnewSize.height=80;\n\t\tif (newSize != null) {\n\t\t\tsize.setSize(newSize);\n\t\t\tfirePropertyChange(Props.SIZE_PROP.getValue(), null, size);\n\t\t}\n\t}", "private void drawPanelComponentResized(java.awt.event.ComponentEvent evt) {\n \n ((DrawPanel)drawPanel).updateEllipse();\n }", "void updateSize() {\n setMeAndMyParentsAsDirty();\n }", "public void setSize();", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n viewMatrix = null;\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldW, int oldH) {\n super.onSizeChanged(w, h, oldW, oldH);\n\n canvasWidth = w;\n canvasHeight = h;\n updatePolygonSize();\n\n if (Math.min(canvasWidth, canvasHeight) != Math.min(oldW, oldH)) {\n refreshImage();\n }\n }", "public void onChildAlignChanged(GuiElementBase element, Direction direction)\n\t\t{ expandToFitChildren(direction); }", "@Override\n public void resize()\n {\n if (this.resizer != null)\n {\n this.resizer.apply(this.area);\n }\n\n if (this.children != null)\n {\n this.children.resize();\n }\n\n if (this.resizer != null)\n {\n this.resizer.postApply(this.area);\n }\n }", "public void preferenceChanged(View child, boolean width, boolean height) {\n editor.revalidate();\n }", "@Override\r\n\tpublic void resize() {\n\t\t\r\n\t}", "private void updateListener() {\n \n if(resizeListener != null) {\n s.heightProperty().removeListener(resizeListener);\n s.widthProperty().removeListener(resizeListener);\n }\n \n resizeListener = (observable, oldValue, newValue) -> {\n listeners.forEach((r) -> r.onResize());\n };\n \n s.heightProperty().addListener(resizeListener);\n s.widthProperty().addListener(resizeListener);\n }", "public void resize() {\n\t\tsp.doLayout();\n\t}", "@Override\n\tpublic void resize(float width, float height) {\n\t}", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tif (w != oldw && mIsFirstLoad == false) {\n\t\t\tmIsFirstLoad = false;\n\t\t\tif (mIsShowTextsSingleLine) {\n\t\t\t\tupdateSingleLineTextVisiable();\n\t\t\t}\n\t\t}\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t}", "protected final void fireResize() {\r\n\t\tfireEvent(new ResizeEvent(this));\r\n\t}", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n w -= getPaddingRight() + getPaddingLeft();\n h -= getPaddingTop() + getPaddingBottom();\n\n int right = w;\n int bottom = h;\n int top = 0;\n int left = 0;\n\n if (mElement != null) {\n // Maintain aspect ratio. Certain kinds of animated drawables\n // get very confused otherwise.\n final int intrinsicWidth = mElement.getIntrinsicWidth();\n final int intrinsicHeight = mElement.getIntrinsicHeight();\n final float intrinsicAspect = (float) intrinsicWidth / intrinsicHeight;\n final float boundAspect = (float) w / h;\n if (intrinsicAspect != boundAspect) {\n if (boundAspect > intrinsicAspect) {\n // New width is larger. Make it smaller to match height.\n final int width = (int) (h * intrinsicAspect);\n left = (w - width) / 2;\n right = left + width;\n } else {\n // New height is larger. Make it smaller to match width.\n final int height = (int) (w * (1 / intrinsicAspect));\n top = (h - height) / 2;\n bottom = top + height;\n }\n }\n mElement.setBounds(left, top, right, bottom);\n }\n\n super.onSizeChanged(w, h, oldw, oldh);\n }", "public void onWindowResized(int width, int height) {\n this.setHeight(\"\" + (height - TopPanel.HEIGHT));\n }", "protected abstract void resize();", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n if (w == 0 || h == 0) return;\n createGame();\n }", "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\tthis.mapImage.resizeImage(this.getWidth() - 15, this.getHeight() - 60);\n\t\t// make the thread \"go to sleep\" to avoid smearing the screen\n\t\ttry {\n\t\t\tThread.sleep(20);\n\t\t} catch (InterruptedException e0) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te0.printStackTrace();\n\t\t}\n\t\tdrawAll();\n\t}", "public boolean requestLayout(Set<Paintable> child) {\n updateParentFrameSize();\n \n // layout size change may affect its available space (scrollbars)\n connection.handleComponentRelativeSize((Widget) layout);\n \n return true;\n \n }", "@Override\n public void componentResized(ComponentEvent e) {\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n int width = this.getWidth();\n this.jButton1.setLocation(width / 4 - this.jButton1.getWidth() / 2, this.jButton1.getY());\n this.jButton2.setLocation(width * 3 / 4 - this.jButton2.getWidth() / 2, this.jButton2.getY());\n this.jButton3.setLocation(width / 2 - this.jButton3.getWidth() / 2, this.jButton3.getY());\n }", "public void updateBounds(){\r\n\t\tRectangle bounds = new Rectangle(super.getBounds());\r\n\t\tint preferredHeight = 0;\r\n\t\tfor(Object child : getChildren()){\r\n\t\t\tIFigure figure = (IFigure)child;\r\n\t\t\tpreferredHeight += figure.getPreferredSize().height;\r\n\t\t}\r\n\t\tif (preferredHeight == 0) preferredHeight = 200;\r\n\t\tbounds.setHeight(preferredHeight+20);\r\n\t\tsetBounds(bounds);\r\n\t}", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\n\t\t// save device height width, we use it a lot of places\n\t\tmViewHeight = h;\n\t\tmViewWidth = w;\n\n\t\t// fix up the image\n\t\tsetInitialImageBounds();\n\t}", "@Override\n\tpublic void resize() {\n\t\t\n\t}", "public interface OnSizeChangedListener {\n public void onSizeChanged();\n }", "private void setCorrectSize() {\n double newHeight = this.getContentPane().getPreferredSize().getHeight() +\n this.getContentPane().getPreferredSize().getHeight()/10 * 7;\n int newHeightInt = (int)Math.round(newHeight);\n \n this.setSize(this.getWidth(),newHeightInt);\n }", "public void update() {\n\tfireContentsChanged(this, 0, getSize());\n }", "public void setWidth(double aValue)\n{\n if(_width==aValue) return; // If value already set, just return\n repaint(); // Register repaint\n firePropertyChange(\"Width\", _width, _width = aValue, -1); // Set value and fire PropertyChange\n if(_parent!=null) _parent.setNeedsLayout(true); // Rather bogus\n}", "private void sendResizeEventToFX() {\n redraw();\n update();\n \n pWidth = getClientArea().width;\n pHeight = getClientArea().height;\n\n resizePixelBuffer(lastScaleFactor);\n\n if (scenePeer == null) {\n return;\n }\n\n stagePeer.setSize(pWidth, pHeight);\n scenePeer.setSize(pWidth, pHeight);\n }", "public void setSize(int newSize);", "public void setSize(int newSize);", "@Override\n public void componentResized(ComponentEvent e) {\n\n\tfor (FieldPanel panel : panels.values()) {\n\t panel.componentResized(e);\n\t}\n\n }", "public void changeSize(Integer newLength, Integer newHeight) {\n control.erase();\n width = newLength;\n height = newHeight;\n control.draw();\n }", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t\tif( mr > 0.1f*h ) {\n\t\t\tmr=0.1f*h;\n\t\t\tif( m != null ) {\n\t\t\t\t((CircleObjectKE)m).setR(mr);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void appSizeChanged(int appWidth, int appHeight) {\n\t\tP.out(\"New app size!\", \"[appSizeWatcher]\", appWidth + \", \" + appHeight);\n\t\tif(p.width != 800 || p.height != 600) {\n\t\t\tchangedFlash.setTarget(0).setCurrent(1);\n\t\t\tAppUtil.setSize(p, 800, 600);\n\t\t\tAppUtil.setLocation(p, 0, 0);\n\t\t}\n\t}", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh)\n {\n super.onSizeChanged(w, h, oldw, oldh);\n dotsSet = false;\n\n\n startNewGame();\n keeper.start();\n }", "protected void doResize() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\tdoNew();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, false);\r\n\t\tdlg.widthText.setText(\"\" + renderer.surface.width);\r\n\t\tdlg.heightText.setText(\"\" + renderer.surface.height);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\trenderer.surface.width = dlg.width;\r\n\t\t\trenderer.surface.height = dlg.height;\r\n\t\t\trenderer.surface.computeRenderingLocations();\r\n\t\t}\r\n\t}", "@Override\n public void resize(int width, int height) {\n \n }" ]
[ "0.7853456", "0.7737373", "0.76552004", "0.759452", "0.7581016", "0.755684", "0.75276273", "0.75276273", "0.7462025", "0.73892987", "0.73544896", "0.73427784", "0.7268931", "0.7261033", "0.7243902", "0.7202716", "0.7197513", "0.7089856", "0.7089856", "0.7082736", "0.7050932", "0.70490086", "0.7047647", "0.70450836", "0.70114505", "0.701085", "0.7009332", "0.6986157", "0.6984662", "0.6885828", "0.68741584", "0.6851828", "0.6848317", "0.68419176", "0.6840625", "0.67591405", "0.67586553", "0.6726264", "0.6718764", "0.6654891", "0.66494817", "0.6648989", "0.6602795", "0.6598964", "0.6577451", "0.65585536", "0.6551035", "0.6545414", "0.6538978", "0.6538146", "0.65199566", "0.65117204", "0.6492205", "0.64838016", "0.64612883", "0.64127886", "0.6405361", "0.64049083", "0.6382991", "0.6370135", "0.6370135", "0.630442", "0.63025707", "0.63024426", "0.6299936", "0.62994486", "0.62717086", "0.62711453", "0.62664515", "0.6264882", "0.6260557", "0.6253415", "0.62519175", "0.6237677", "0.6227517", "0.62273777", "0.62172675", "0.6208002", "0.61901915", "0.61870134", "0.61836916", "0.61823726", "0.6179029", "0.6168591", "0.61652875", "0.6148357", "0.6146063", "0.6144988", "0.61449367", "0.6128922", "0.6125638", "0.6123947", "0.6123947", "0.61209464", "0.6118912", "0.6113423", "0.61101884", "0.6109412", "0.6106952", "0.6099946" ]
0.75401235
6
Sets the unit increment of one of the scroll pane's adjustables.
void setUnitIncrement(Adjustable adj, int u);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUnitIncrement(int param1Int) {\n/* 730 */ this.unitIncrementSet = true;\n/* 731 */ putClientProperty(\"JScrollBar.fastWheelScrolling\", (Object)null);\n/* 732 */ super.setUnitIncrement(param1Int);\n/* */ }", "public int getUnitIncrement(int param1Int) {\n/* 746 */ JViewport jViewport = JScrollPane.this.getViewport();\n/* 747 */ if (!this.unitIncrementSet && jViewport != null && jViewport\n/* 748 */ .getView() instanceof Scrollable) {\n/* 749 */ Scrollable scrollable = (Scrollable)jViewport.getView();\n/* 750 */ Rectangle rectangle = jViewport.getViewRect();\n/* 751 */ return scrollable.getScrollableUnitIncrement(rectangle, getOrientation(), param1Int);\n/* */ } \n/* */ \n/* 754 */ return super.getUnitIncrement(param1Int);\n/* */ }", "public void setIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n increment = value;\n }\n }", "public void setBlockIncrement(int param1Int) {\n/* 765 */ this.blockIncrementSet = true;\n/* 766 */ putClientProperty(\"JScrollBar.fastWheelScrolling\", (Object)null);\n/* 767 */ super.setBlockIncrement(param1Int);\n/* */ }", "public void setIncrement(double increment) {\n this.increment = increment;\n }", "public void setUnits(int value) {\r\n this.units = value;\r\n }", "public void adjustmentValueChanged(AdjustmentEvent evt) {\n \n if (evt.getSource() == hscroll) {\n \n int offx = hscroll.getValue();\n \n // This should be n*bases per pixel\n\n int bpp = (int)(1.0/av.getCharWidth());\n\n if (bpp > 0) {\n\toffx = offx - offx%bpp;\n }\n //hscroll.setValue(offx);\n if (offx != oldoffx) {\n\tav.setStartRes(offx);\n\tav.setEndRes((int)(offx + (seqCanvas.size().width/av.getCharWidth())));\n\t\n\tcontroller.handleAlignViewportEvent(new AlignViewportEvent(this,av,AlignViewportEvent.HSCROLL));\n\t\n\thscroll.revalidate();\n }\n oldoffx = offx;\n }\n \n if (evt.getSource() == vscroll) {\n int offy = vscroll.getValue();\n if (oldoffy != offy) {\n\tav.setStartSeq(offy);\n\tav.setEndSeq(offy + seqCanvas.getSize().height/av.getCharHeight());\n\tcontroller.handleAlignViewportEvent(new AlignViewportEvent(this,av,AlignViewportEvent.LIMITS));\n }\n oldoffy = offy;\n }\n }", "public abstract void setMovementPerTick(float step);", "public int getScrollableUnitIncrement ( Rectangle visibleRect, int orientation, int direction ) {\n\t\treturn 10;\n\t}", "public void setHorizontalScrollBarPolicy(int paramInt) {\n/* 548 */ switch (paramInt) {\n/* */ case 30:\n/* */ case 31:\n/* */ case 32:\n/* */ break;\n/* */ default:\n/* 554 */ throw new IllegalArgumentException(\"invalid horizontalScrollBarPolicy\");\n/* */ } \n/* 556 */ int i = this.horizontalScrollBarPolicy;\n/* 557 */ this.horizontalScrollBarPolicy = paramInt;\n/* 558 */ firePropertyChange(\"horizontalScrollBarPolicy\", i, paramInt);\n/* 559 */ revalidate();\n/* 560 */ repaint();\n/* */ }", "@Override\n\t\tpublic void setValue(int n) {\n\t\t\tsuper.setValue(n);\n\t\t\tview.getDownpanel().getThicknessStatus().setThickness(n);\n\t\t\tview.getModel().setThickness(n);\n\t\t}", "@Override\n\tpublic int getScrollableUnitIncrement(Rectangle visibleRect,\n\t\t\tint orientation, int direction) {\n\t\treturn 0;\n\t}", "public void adjust()\n {\n }", "public void setTargeted() {\n targeted ++;\n }", "public void incQty() {\n b.qty.setText(\"\" + ++qty);\n\n }", "public void increment() {\n\t\tif (m_bYear) {\n\t\t\tm_value++;\n\t\t\tif (m_value > 9999)\n\t\t\t\tm_value = 0;\n\t\t} else {\n\t\t\tm_value++;\n\t\t\tif (m_value > 11)\n\t\t\t\tm_value = 0;\n\n\t\t}\n\t\trepaint();\n\t}", "void onChanged(RulerWheel wheel, int oldValue, int newValue);", "public void setUpdateOften(int i){\n countNum = i;\n }", "void setExtremeSpikeIncrease(VariableAmount increase);", "private void refreshControls() {\n\t// Scrollbars are upside-down from real sliders.\n\tint scrollValue = caeliScroll.getMaximum() - caeliScroll.getValue();\n\tcaeliValueLabel.setText( \"\"+(scrollValue / 100.0 ) );\n\tparent.setCaeliDensity( scrollValue / 100.0 );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = planetScroll.getMaximum() - planetScroll.getValue();\n\tplanetValueLabel.setText( \"\"+scrollValue );\n\tparent.setPlanetCount( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = triSizeScroll.getMaximum() - triSizeScroll.getValue()\n\t + triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue();\n\t \n\ttriSizeValueLabel.setText( \"\"+(triSizeScroll.getMaximum() - triSizeScroll.getValue()) );\n\ttriFineSizeValueLabel.setText( \"\"+(triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue()) );\n\tparent.setDustTrianglesThreshold( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tint strnScrollValue = attStrengthScroll.getMaximum() - attStrengthScroll.getValue();\n\tint distScrollValue = attDistanceScroll.getMaximum() - attDistanceScroll.getValue();\n\n\tattStrnValueLabel.setText( \"\"+strnScrollValue );\n\tattDistValueLabel.setText( \"\"+distScrollValue );\n\n\tparent.setAttraction( distScrollValue, strnScrollValue );\n\n\n\t// Refresh iPad display values\n\tosc.send( new OscMessage( \"/faders\", new Object[] { sliderFloatValue( caeliScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( planetScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triFineSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attDistanceScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attStrengthScroll ) } ),\n\t new NetAddress( ipadAddress, OSC_PORT_SEND ) );\n }", "public void adjustValue(String name, int v){\n t.get(name).setCurrent(v);\n }", "public void setGrowIncrement(int inc) { growInc = inc; }", "public void increaseUnits(int amount) {\n\t\tcreateUnit(amount);\n\t\tunits += amount;\n\t}", "public void setIncrement(Integer increment) {\n this.increment = increment;\n }", "public void setOneNewWanted () {\r\n numWanted ++;\r\n }", "public void adjustmentValueChanged(AdjustmentEvent e) {\n \tif (scrollBar1.getVerticalScrollBar().getValue() >= 1290) {\n \t\tbutton1.setEnabled(true);\n \t}\n }", "public void setUpdater(Integer updater) {\n this.updater = updater;\n }", "public void adjustmentValueChanged(AdjustmentEvent e) {\n boolean increase = true;\n int newScrollBarValue = e.getValue();\n if (newScrollBarValue > oldScrollBarValue) increase = false;\n oldScrollBarValue = newScrollBarValue;\n int month = getMonth();\n if (increase) {\n month += 1;\n if (month == 12) {\n month = 0;\n if (yearChooser != null) {\n int year = yearChooser.getYear();\n year += 1;\n yearChooser.setYear(year);\n }\n }\n } else {\n month -= 1;\n if (month == -1) {\n month = 11;\n if (yearChooser != null) {\n int year = yearChooser.getYear();\n year -= 1;\n yearChooser.setYear(year);\n }\n }\n }\n setMonth(month);\n }", "private void setScrollBars() {\n int totHeight = jEditorPane1.getSize().height;\n int value = jEditorPane2.getSize().height;\n if (value > totHeight) totHeight = value;\n int totWidth = jEditorPane1.getSize().width;\n value = jEditorPane2.getSize().width;\n if (value > totWidth) totWidth = value;\n int viewHeight = jViewport1.getExtentSize().height;\n int viewWidth = jViewport1.getExtentSize().width;\n //D.deb(\"totHeight = \"+totHeight+\", totWidth = \"+totWidth); // NOI18N\n //D.deb(\"viewHeight = \"+viewHeight+\", viewWidth = \"+viewWidth); // NOI18N\n jScrollBar1.setValues(0, viewWidth, 0, totWidth);\n jScrollBar1.setBlockIncrement(viewWidth);\n jScrollBar2.setValues(0, viewWidth, 0, totWidth);\n jScrollBar2.setBlockIncrement(viewWidth);\n jScrollBar3.setValues(0, viewHeight, 0, totHeight);\n jScrollBar3.setBlockIncrement(viewHeight);\n boolean visibleScroll = jScrollBar1.isVisible();\n //D.deb(\"jScrollBar1.isVisible() = \"+visibleScroll); // NOI18N\n if (visibleScroll != viewWidth < totWidth && editorPanel.isShowing()) {\n //D.deb(\"jScrollBar1 setting visibility = \"+!visibleScroll); // NOI18N\n jScrollBar1.setVisible(!visibleScroll);\n jScrollBar2.setVisible(!visibleScroll);\n validate();\n //editorPanel.repaint();\n //jScrollBar1.repaint();\n //jScrollBar2.repaint();\n }\n visibleScroll = jScrollBar3.isVisible();\n //D.deb(\"jScrollBar3.isVisible() = \"+visibleScroll); // NOI18N\n if (visibleScroll != viewHeight < totHeight && editorPanel.isShowing()) {\n //D.deb(\"jScrollBar3 setting visibility = \"+!visibleScroll); // NOI18N\n jScrollBar3.setVisible(!visibleScroll);\n validate();\n //editorPanel.repaint();\n //jScrollBar3.repaint();\n }\n }", "public void setSpeed(double multiplier);", "public void setVerticalScrollBarPolicy(int paramInt) {\n/* 500 */ switch (paramInt) {\n/* */ case 20:\n/* */ case 21:\n/* */ case 22:\n/* */ break;\n/* */ default:\n/* 506 */ throw new IllegalArgumentException(\"invalid verticalScrollBarPolicy\");\n/* */ } \n/* 508 */ int i = this.verticalScrollBarPolicy;\n/* 509 */ this.verticalScrollBarPolicy = paramInt;\n/* 510 */ firePropertyChange(\"verticalScrollBarPolicy\", i, paramInt);\n/* 511 */ revalidate();\n/* 512 */ repaint();\n/* */ }", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "void setStepCounterTileXY();", "@Override\r\n\tpublic void adjustmentValueChanged(AdjustmentEvent evt) {\n\t\tAdjustable source = evt.getAdjustable();\r\n\r\n\t\t// check if user is currently dragging the scrollbar's knob\r\n\t\tif (evt.getValueIsAdjusting()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// get the orientation of the adjustable object\r\n\t\tint orientation = source.getOrientation();\r\n\r\n\t\tif (orientation == Adjustable.HORIZONTAL) {\r\n\t\t\tSystem.out.println(\"Event from horizontal scrollbar\");\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Event from vertical scrollbar\");\r\n\t\t}\r\n\r\n\t\t// get the type of adjustment which caused the value changed event\r\n\r\n//\t\tint type = evt.getAdjustmentType();\r\n\r\n//\t\tswitch (type) {\r\n//\t\tcase AdjustmentEvent.UNIT_INCREMENT:\r\n//\t\t\tSystem.out.println(\"increased by one unit\");\r\n//\t\t\tbreak;\r\n//\r\n//\t\tcase AdjustmentEvent.UNIT_DECREMENT:\r\n//\t\t\tSystem.out.println(\"decreased by one unit\");\r\n//\t\t\tbreak;\r\n//\r\n//\t\tcase AdjustmentEvent.BLOCK_INCREMENT:\r\n//\t\t\tSystem.out.println(\"increased by one block\");\r\n//\t\t\tbreak;\r\n//\r\n//\t\tcase AdjustmentEvent.BLOCK_DECREMENT:\r\n//\t\t\tSystem.out.println(\"decreased by one block\");\r\n//\t\t\tbreak;\r\n//\t\tcase AdjustmentEvent.TRACK:\r\n//\t\t\tSystem.out.println(\"knob on the scrollbar was dragged\");\r\n//\t\t\tbreak;\r\n//\r\n//\t\t}\r\n\r\n\t\t// get the current value in the adjustment event\r\n//\t\tint value = evt.getValue();\r\n//\t\tSystem.out.println(\"Current Value: \" + value);\r\n\t}", "public static void SetIncrement(int increment){\n\t\tm_Incrementer = increment;\n\t\tSystem.out.println(\"m_Incrementer set to: \"+ m_Incrementer);\n\t}", "public abstract void increment(int delta);", "public void setUpdateScroll(int updateScroll)\n {\n this.updateScroll = updateScroll;\n }", "public void setPageIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n pageIncrement = value;\n }\n }", "void setUnits(int units) {\n\t\tunitsList.clear();\n\t\tcreateUnit(units);\n\t\tthis.units = units;\n\t}", "public void setJumpCount(int count)\n{\n jumpCount = count;\n}", "public void adjustItemCount(int direction, int count) throws JposException;", "public abstract void setCntOther(int cntOther);", "public int changeUnits(int additionalUnits){\n if (units + additionalUnits < 1){\n return 0;\n }\n else {\n units += additionalUnits;\n return units;\n }\n }", "void setOffset(double offset);", "public void incOffset( Integer increment ) {\n offset += increment;\n }", "@Override\n public void setValue(int value) {\n int oldValue = getValue();\n if (oldValue == value) {\n return;\n }\n\n // Compute new value and extent to maintain upper value.\n int oldExtent = getExtent();\n int newValue = Math.min(Math.max(getMinimum(), value), oldValue + oldExtent);\n int newExtent = oldExtent + oldValue - newValue;\n\n // Set new value and extent, and fire a single change event.\n getModel().setRangeProperties(newValue, newExtent, getMinimum(), \n getMaximum(), getValueIsAdjusting());\n }", "public void setMultiplier(int newValue) {\n multiplier = newValue;\n }", "public void adjustmentValueChanged(AdjustmentEvent e) {\n }", "public void setUnit(Length units) {\n unit = units;\n }", "protected void computeIncrement()\r\n\t{\r\n\t\tsuper.increment = this.userDefinedIncrement;\r\n\r\n\t\tdouble powerOfTen = Math.pow( 10, Math.abs( this.getRoundingPowerOfTen() ) );\r\n\r\n\t\t//---round the increment according to user defined power\r\n\t\tsuper.increment = super.round( super.increment, powerOfTen );\r\n\r\n\t\t//---if we round this down to zero, force it to the power of ten.\r\n\t\t//---for example, round to nearest 100, value = 35...would push down to 0 which is illegal.\r\n\t\tif( super.increment == 0 )\r\n\t\t{\r\n\t\t\tsuper.increment = powerOfTen;\r\n\t\t}\r\n\r\n\t\tsuper.setMinValue( super.round( this.userDefinedMinimum, powerOfTen ) );\r\n\t\tsuper.setMaxValue( super.getMinValue() + ( super.increment * super.getNumberOfScaleItems() ) );\r\n\r\n\t}", "void setScrollBarRelations(JScrollBar param1JScrollBar) {\n/* 1540 */ AccessibleRelation accessibleRelation1 = new AccessibleRelation(AccessibleRelation.CONTROLLED_BY, param1JScrollBar);\n/* */ \n/* */ \n/* 1543 */ AccessibleRelation accessibleRelation2 = new AccessibleRelation(AccessibleRelation.CONTROLLER_FOR, JScrollPane.this);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1548 */ AccessibleContext accessibleContext = param1JScrollBar.getAccessibleContext();\n/* 1549 */ accessibleContext.getAccessibleRelationSet().add(accessibleRelation2);\n/* */ \n/* */ \n/* 1552 */ getAccessibleRelationSet().add(accessibleRelation1);\n/* */ }", "public void defaultUpdateCount(AcProperty e)\n {\n }", "public abstract void setCntRod(int cntRod);", "public void setProperty(Integer t) {\n\n\t\t}", "public void increase()\n {\n setCount(getCount() + 1);\n }", "protected void modify(int i) {\n\n\t\tvalue += i;\n\t\tlabel.setText(Integer.toString(value));\n\t\t\n\t}", "public void setUnitTable(Units value);", "public void change(double increment)\n\t{\n\t\tthis.accumulation += increment;\n\t}", "public abstract void setCntPoa(int cntPoa);", "public void setPrefWidth(double aWidth)\n{\n double w = aWidth<=0? 0 : aWidth; if(w==getPrefWidth()) return;\n firePropertyChange(\"PrefWidth\", put(\"PrefWidth\", w), w, -1);\n}", "@JSProperty(\"pane\")\n void setPane(double value);", "PdfViewerScrollBar(int orientation, PdfViewerController controller)\n {\n super(orientation);\n this.controller = controller;\n setUnitIncrement(UNIT_INCREMENT);\n setBlockIncrement(BLOCK_INCREMENT);\n scrollPosition = 0;\n close();\n }", "public void increaseDecrease(String toDo)\n {\n\n ObservableList<?>fields= updateNew.getChildren();\n for(int i=0;i<fields.size();i++)\n {\n if(toDo.equals(\"i\")) {\n for(int k=0;k<=100;k++) {\n slowMotion(fields, i, k);\n }\n }\n else if(toDo.equalsIgnoreCase(\"d\"))\n {\n for(int k=100;k>=0;k--) {\n slowMotion(fields, i, k);\n }\n }\n }\n }", "public void setHorizontalScrollBar(JScrollBar paramJScrollBar) {\n/* 847 */ JScrollBar jScrollBar = getHorizontalScrollBar();\n/* 848 */ this.horizontalScrollBar = paramJScrollBar;\n/* 849 */ if (paramJScrollBar != null) {\n/* 850 */ add(paramJScrollBar, \"HORIZONTAL_SCROLLBAR\");\n/* */ }\n/* 852 */ else if (jScrollBar != null) {\n/* 853 */ remove(jScrollBar);\n/* */ } \n/* 855 */ firePropertyChange(\"horizontalScrollBar\", jScrollBar, paramJScrollBar);\n/* */ \n/* 857 */ revalidate();\n/* 858 */ repaint();\n/* */ }", "public void increment() { this.progressBar.setValue(++this.progressValue); }", "public void setDelta(double value) {\r\n this.delta = value;\r\n }", "public void setAdjustmentRatio(double value) {\n this.adjustmentRatio = value;\n }", "void rescaleIndicators(float magnification) {\n // if cellSize is 1\n boolean regenerate = scaleInterval((float) canvas.getMagnification());\n // System.out.println(\"regenerate = \" + regenerate);\n if (regenerate) {\n if (orient != null && anisotropy != null) {\n generateAreasAndIndicators();\n }\n }\n lastMagnification = magnification;\n }", "public void setWalkSpeed(int n)\n{\n walkSpeed = n;\n}", "@Override\r\n\tpublic void updateIndicator(int num, int current) {\n\t\tif (num >= 0 && current >= 0 && current < num && mIndicator != null) {\r\n\t\t\tmIndicator.setTotal(num);\r\n\t\t\tmIndicator.setCurrent(current);\r\n\t\t}\r\n\t}", "public void adjustmentValueChanged( AdjustmentEvent e ) {\n\trefreshControls();\n }", "private void updateNumericButtonsBar(boolean isDown) {\n\n\n System.out.println(\"---> refreshing - isDown: \" + isDown);\n System.out.println(\"selected: \" + getSkinnable().getSelectionModel().getSelectedIndex());\n pageToggleGroup.getToggles().clear(); // clear toggles\n // remove listener\n int bc = getSkinnable().getPageButtonsCount();\n if (bc == 0) {\n return;\n }\n System.out.println(\"buttonCount: \" + bc);\n numericControlsBox.getChildren().clear();\n numericControlsBox.getChildren().add(new Separator());\n if (deck.getSelectionModel().getSelectedIndex() > bc - 1) {\n PillButtonX btn = new PillButtonX(\"...\");\n btn.setSelectAllowed(false);\n// btn.setButtonPosition(PillButtonX.ButtonPosition.LEFT);\n btn.setUserData(\"dots-left\");\n btn.setOnAction(ceh);\n btn.getStyleClass().add(\"left-dots-button\");\n\n numericControlsBox.getChildren().add(btn);\n }\n// int buttonCount = \n int selectedIndex = deck.getSelectionModel().getSelectedIndex();\n int size = deck.getItems().size();\n\n int startIndex = selectedIndex % bc == 0 ? selectedIndex : selectedIndex - (selectedIndex % bc);\n int endIndex = selectedIndex % bc == 0 ? selectedIndex + bc : selectedIndex + bc - ((selectedIndex % bc));\n\n System.out.println(\"start: \" + startIndex + \" end: \" + endIndex);\n for (int i = startIndex; i < endIndex; i++) {\n if (i == size) { // if there are no more pages return\n break;\n }\n\n PillButtonX btn = new PillButtonX(String.valueOf(i + 1));\n btn.setButtonPosition(PillButtonX.ButtonPosition.CENTER);\n btn.setDeselectAllowed(false);\n btn.getProperties().put(\"PAGE_ID\", String.valueOf(i));\n\n btn.setToggleGroup(pageToggleGroup);\n\n numericControlsBox.getChildren().add(btn);\n\n if (i == selectedIndex) {\n pageToggleGroup.selectToggle(btn);\n }\n if ((i == endIndex - 1) && (i != size - 1)) { // if there are more pages add dots button\n PillButtonX dotsButton = new PillButtonX(\"...\");\n dotsButton.setSelectAllowed(false);\n dotsButton.setUserData(\"dots-right\");\n dotsButton.setOnAction(ceh);\n dotsButton.getStyleClass().add(\"right-dots-button\");\n\n numericControlsBox.getChildren().add(dotsButton);\n }\n }\n\n numericControlsBox.getChildren().add(new Separator());\n }", "public void increment() {\n items++;\n }", "public void setHopUnits(int i, String u) {\n \t\t((Hop) hops.get(i)).setUnits(u);\n \t}", "void setNumberOfArtillery(int artillery);", "public void add1(View view) {\n num+=1;\n n.setText(\"\"+num);\n }", "@Override\n public void updateLorenzoIndicator(int i) {\n\n }", "void switchToDeterminate(int pUnits);", "public Builder setDelta(int value) {\n \n delta_ = value;\n onChanged();\n return this;\n }", "private void setDefaultValues() {\n\t// Caeli scroll bar\n\tint scrollValue = caeliScroll.getMaximum() - caeliScroll.getValue();\n\tparent.setCaeliDensity( scrollValue / 100.0 );\n\n\t// Planet count scroll bar\n\tscrollValue = planetScroll.getMaximum() - planetScroll.getValue();\n\tparent.setPlanetCount( scrollValue );\n\n\t// Triangle size\n\tscrollValue = triSizeScroll.getMaximum() - triSizeScroll.getValue()\n\t + triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue();\n\tparent.setDustTrianglesThreshold( scrollValue );\n\n\t// Particle attractions\n\tint strnScrollValue = attStrengthScroll.getMaximum() - attStrengthScroll.getValue();\n\tint distScrollValue = attDistanceScroll.getMaximum() - attDistanceScroll.getValue();\n\tparent.setAttraction( distScrollValue, strnScrollValue );\n }", "private void setComponentsOfIndex() {\n\t\tint t = this.numbersIdex + 1;\n\t\tif (t == NUMBEROFEACHCARD) {\n\t\t\tthis.numbersIdex = 0;\n\t\t\tsetColorIndex();\n\t\t} else {\n\t\t\tthis.numbersIdex = t;\n\t\t}\n\t}", "private void setScrollOffsetX(int value) {\n bitField0_ |= 0x00000010;\n scrollOffsetX_ = value;\n }", "@Override\n public void onAnimationUpdate(ValueAnimator animator)\n {\n\t\tcents = UiController.test * 10.0;\n\n\t\tinvalidate();\n }", "@Override // androidx.lifecycle.Observer\n public void onChanged(Integer num) {\n Integer num2 = num;\n if (num2 != null) {\n this.a.c.scrollToPosition(num2.intValue());\n }\n }", "public void setScrollAmount(int scrollAmount)\r\n\t{\r\n\t\tthis.scrollAmount = scrollAmount;\r\n\t}", "@FXML\r\n private void addPointsEn() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(engineering.getText());\r\n int f2 = f1 + 1;\r\n engineering.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "public PanelVentas() {\n initComponents();\n \n this.scpContenedor.getVerticalScrollBar().setUnitIncrement(Recursos.scpDesplazamiento);\n this.scpContenedor.getHorizontalScrollBar().setUnitIncrement(Recursos.scpDesplazamiento);\n \n }", "public void setCurrentAlloment(int value) {\n this.currentAlloment = value;\n }", "public void assignDimensionalControls() {\n frame = imp1.getWindow();\n Component[] comps = frame.getComponents();\n try {\n cSelectorChannel_ = (ScrollbarWithLabel) comps[1];\n if (comps.length > 2) {\n tSelectorTime_ = (ScrollbarWithLabel) comps[2];\n }\n if (comps.length > 3) {\n zSelectorZSlice_ = (ScrollbarWithLabel) comps[3];\n }\n } catch (Exception ex) {\n }\n try {\n pSelectorPos = (ScrollbarWithLabel) comps[4];\n } catch (Exception ex) {\n System.out.println(\n \"Warning: Orientation indicators could not attach to Position dim. It might not be present.\");\n }\n// if (imp1.getRoi() == null && imp1.getCanvas().getMagnification() > 1) {\n// Rectangle rec = new Rectangle(imp1.getCanvas().getSrcRect());\n// imp1.setRoi(rec);\n// }\n// if (\"Yes\".equals(UseListener) && \"Yes\".equals(EnableIndicators)) {\n// //loadParams();\n// addListeners();\n// } else {\n// //UseListener = \"No\";\n// EnableIndicators = \"No\";\n// removeListeners();\n// }\n }", "@Override\n\tpublic void adjustmentValueChanged(AdjustmentEvent arg0) {\n\n\t}", "public native void setScrollIndocatorStyle(double value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.scrollIndicatorStyle = value;\n }-*/;", "public void setRoll(double aValue)\n{\n if(aValue==getRoll()) return;\n repaint();\n firePropertyChange(\"Roll\", getRSS().roll, getRSS().roll = aValue, -1);\n}", "public void setCount(int r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: android.widget.OppoScroller.setCount(int):void, dex: in method: android.widget.OppoScroller.setCount(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.OppoScroller.setCount(int):void\");\n }", "public void increment(View view) {\n if (quantity == 100){\n return;\n }\n quantity = quantity + 1;\n displayQuantity(quantity);\n }", "public void changeCharm(int i) {\n \t\tcharm += i;\n \t}", "public void setTheInterestingValue(int theInterestingValue) {\n\t\tthis.theInterestingValue = theInterestingValue;\n\t\tnotifyObservers();\n\t}", "public void adjustmentValueChanged(AdjustmentEvent event) {\r\n if (event.getSource() == delayPanel) {\r\n controller.setAutoInterval(delayPanel.getValue());\r\n }\r\n }", "@Override\n public void setAnim(int nextIn, int nextOut, int quitIn, int quitOut) {\n if (manager != null) {\n manager.setAnim(nextIn, nextOut, quitIn, quitOut);\n }\n }", "private void updateScrollBarSize() {\n int textHeight = getTextHeight();\n if (textHeight <= windowHeight) {\n Root.getChildren().remove(scrollBar);\n } else {\n if (!Root.getChildren().contains(scrollBar)) {\n Root.getChildren().add(scrollBar);\n }\n double range = textHeight - windowHeight;\n scrollBar.setMax(range);\n scrollBar.setVisibleAmount(10);\n }\n }", "public void increaseSpeed() {\r\n\tupdateTimer.setDelay((int)Math.floor(updateTimer.getDelay()*0.95));\r\n\t\t}" ]
[ "0.7558754", "0.613276", "0.59901506", "0.58595604", "0.56634414", "0.55659544", "0.5414932", "0.540761", "0.53613347", "0.5350007", "0.53385836", "0.53233004", "0.53130406", "0.53104895", "0.5302578", "0.528715", "0.52798766", "0.52641696", "0.5230034", "0.52291435", "0.519634", "0.5191235", "0.5188767", "0.5188057", "0.5185309", "0.5177448", "0.5154767", "0.51414746", "0.51220447", "0.51093626", "0.5107375", "0.51023644", "0.5097887", "0.50900275", "0.50699556", "0.50641716", "0.5027602", "0.5006211", "0.49956113", "0.4977904", "0.49769953", "0.4967773", "0.4964488", "0.49619675", "0.49545023", "0.49525496", "0.4936915", "0.49330088", "0.49327013", "0.49292687", "0.49241114", "0.49208796", "0.49169034", "0.49094206", "0.49035805", "0.49024168", "0.48886773", "0.48865417", "0.4881232", "0.48802993", "0.4875599", "0.48675677", "0.48600587", "0.4851155", "0.48460403", "0.48407814", "0.48349428", "0.48349383", "0.48315632", "0.48315433", "0.48192772", "0.4819213", "0.48172694", "0.481016", "0.48028252", "0.47866008", "0.47801667", "0.47797698", "0.47783035", "0.47728923", "0.47722107", "0.4770995", "0.4770535", "0.4759313", "0.47549233", "0.4753661", "0.4750679", "0.47504088", "0.47503933", "0.4749208", "0.47434154", "0.4735102", "0.4734667", "0.47292835", "0.47240832", "0.4723191", "0.47187778", "0.47170553", "0.47169903", "0.47122827" ]
0.6929855
1
Sets the value for one of the scroll pane's adjustables.
void setValue(Adjustable adj, int v);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void adjustmentValueChanged(AdjustmentEvent e) {\n \tif (scrollBar1.getVerticalScrollBar().getValue() >= 1290) {\n \t\tbutton1.setEnabled(true);\n \t}\n }", "public void dispatch() {\n if (getScrollChild() == null) {\n return;\n }\n\n peer.ignoreSetValue = true;\n adjuster.setValue(value);\n peer.ignoreSetValue = false;\n }", "@Override\r\n\tpublic void adjustmentValueChanged(AdjustmentEvent evt) {\n\t\tAdjustable source = evt.getAdjustable();\r\n\r\n\t\t// check if user is currently dragging the scrollbar's knob\r\n\t\tif (evt.getValueIsAdjusting()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// get the orientation of the adjustable object\r\n\t\tint orientation = source.getOrientation();\r\n\r\n\t\tif (orientation == Adjustable.HORIZONTAL) {\r\n\t\t\tSystem.out.println(\"Event from horizontal scrollbar\");\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Event from vertical scrollbar\");\r\n\t\t}\r\n\r\n\t\t// get the type of adjustment which caused the value changed event\r\n\r\n//\t\tint type = evt.getAdjustmentType();\r\n\r\n//\t\tswitch (type) {\r\n//\t\tcase AdjustmentEvent.UNIT_INCREMENT:\r\n//\t\t\tSystem.out.println(\"increased by one unit\");\r\n//\t\t\tbreak;\r\n//\r\n//\t\tcase AdjustmentEvent.UNIT_DECREMENT:\r\n//\t\t\tSystem.out.println(\"decreased by one unit\");\r\n//\t\t\tbreak;\r\n//\r\n//\t\tcase AdjustmentEvent.BLOCK_INCREMENT:\r\n//\t\t\tSystem.out.println(\"increased by one block\");\r\n//\t\t\tbreak;\r\n//\r\n//\t\tcase AdjustmentEvent.BLOCK_DECREMENT:\r\n//\t\t\tSystem.out.println(\"decreased by one block\");\r\n//\t\t\tbreak;\r\n//\t\tcase AdjustmentEvent.TRACK:\r\n//\t\t\tSystem.out.println(\"knob on the scrollbar was dragged\");\r\n//\t\t\tbreak;\r\n//\r\n//\t\t}\r\n\r\n\t\t// get the current value in the adjustment event\r\n//\t\tint value = evt.getValue();\r\n//\t\tSystem.out.println(\"Current Value: \" + value);\r\n\t}", "public void setValueIsAdjusting(boolean b) {\r\n setRangeProperties(getValue(), getExtent(), min, max, b);\r\n }", "@Override\n\tpublic void adjustmentValueChanged(AdjustmentEvent arg0) {\n\n\t}", "@Override\n public void setValue(int value) {\n int oldValue = getValue();\n if (oldValue == value) {\n return;\n }\n\n // Compute new value and extent to maintain upper value.\n int oldExtent = getExtent();\n int newValue = Math.min(Math.max(getMinimum(), value), oldValue + oldExtent);\n int newExtent = oldExtent + oldValue - newValue;\n\n // Set new value and extent, and fire a single change event.\n getModel().setRangeProperties(newValue, newExtent, getMinimum(), \n getMaximum(), getValueIsAdjusting());\n }", "public void adjustmentValueChanged(AdjustmentEvent evt) {\n \n if (evt.getSource() == hscroll) {\n \n int offx = hscroll.getValue();\n \n // This should be n*bases per pixel\n\n int bpp = (int)(1.0/av.getCharWidth());\n\n if (bpp > 0) {\n\toffx = offx - offx%bpp;\n }\n //hscroll.setValue(offx);\n if (offx != oldoffx) {\n\tav.setStartRes(offx);\n\tav.setEndRes((int)(offx + (seqCanvas.size().width/av.getCharWidth())));\n\t\n\tcontroller.handleAlignViewportEvent(new AlignViewportEvent(this,av,AlignViewportEvent.HSCROLL));\n\t\n\thscroll.revalidate();\n }\n oldoffx = offx;\n }\n \n if (evt.getSource() == vscroll) {\n int offy = vscroll.getValue();\n if (oldoffy != offy) {\n\tav.setStartSeq(offy);\n\tav.setEndSeq(offy + seqCanvas.getSize().height/av.getCharHeight());\n\tcontroller.handleAlignViewportEvent(new AlignViewportEvent(this,av,AlignViewportEvent.LIMITS));\n }\n oldoffy = offy;\n }\n }", "public void setTargetValue(int idx, Object value);", "public void adjustmentValueChanged(AdjustmentEvent e) {\n }", "public void adjustmentValueChanged( AdjustmentEvent e ) {\n\trefreshControls();\n }", "public void setUnitIncrement(int param1Int) {\n/* 730 */ this.unitIncrementSet = true;\n/* 731 */ putClientProperty(\"JScrollBar.fastWheelScrolling\", (Object)null);\n/* 732 */ super.setUnitIncrement(param1Int);\n/* */ }", "public void setViewPosition(Point p) {\r\n Component parent = getParent();\r\n if ( parent instanceof JScrollPane &&\r\n ((JScrollPane)parent).getVerticalScrollBar().getValueIsAdjusting() ) {\r\n // value is adjusting, skip repaint\r\n return;\r\n }\r\n super.setViewPosition(p);\r\n }", "public void adjustValue(String name, int v){\n t.get(name).setCurrent(v);\n }", "public void setVerticalScrollBarPolicy(int paramInt) {\n/* 500 */ switch (paramInt) {\n/* */ case 20:\n/* */ case 21:\n/* */ case 22:\n/* */ break;\n/* */ default:\n/* 506 */ throw new IllegalArgumentException(\"invalid verticalScrollBarPolicy\");\n/* */ } \n/* 508 */ int i = this.verticalScrollBarPolicy;\n/* 509 */ this.verticalScrollBarPolicy = paramInt;\n/* 510 */ firePropertyChange(\"verticalScrollBarPolicy\", i, paramInt);\n/* 511 */ revalidate();\n/* 512 */ repaint();\n/* */ }", "public void setOnScrollTo(EventHandler<ScrollToEvent<Integer>> value) {\n\n this.getWrappedControl().setOnScrollTo(value);\n }", "public void setValue(int value);", "public void setValue(double value) {\n if(value<=0){\n mDrange = 0;\n pb.setProgress(0);\n ProgressDragLayout.this.requestLayout();\n ProgressDragLayout.this.invalidate();\n return;\n }\n progressAdd = 0;\n mDrange = 0;\n drange_1=0;\n int progress = (int) (value * 100);\n size = progress;\n double drange = (int) (value * viewWidth);\n drange_1 = drange / size;\n Log.e(\"size-------\", size +\"\");\n mhander.sendEmptyMessageDelayed(view_top.hashCode(),20);\n }", "public void adjustmentValueChanged(AdjustmentEvent e) {\n boolean increase = true;\n int newScrollBarValue = e.getValue();\n if (newScrollBarValue > oldScrollBarValue) increase = false;\n oldScrollBarValue = newScrollBarValue;\n int month = getMonth();\n if (increase) {\n month += 1;\n if (month == 12) {\n month = 0;\n if (yearChooser != null) {\n int year = yearChooser.getYear();\n year += 1;\n yearChooser.setYear(year);\n }\n }\n } else {\n month -= 1;\n if (month == -1) {\n month = 11;\n if (yearChooser != null) {\n int year = yearChooser.getYear();\n year -= 1;\n yearChooser.setYear(year);\n }\n }\n }\n setMonth(month);\n }", "void setValue(double value);", "@Override\r\n\t\t public void setPreference(long userID, long itemID, float value) throws TasteException {\r\n\t\t delegate.setPreference(userID, itemID, value);\r\n\t\t }", "private void setDefaultValues() {\n\t// Caeli scroll bar\n\tint scrollValue = caeliScroll.getMaximum() - caeliScroll.getValue();\n\tparent.setCaeliDensity( scrollValue / 100.0 );\n\n\t// Planet count scroll bar\n\tscrollValue = planetScroll.getMaximum() - planetScroll.getValue();\n\tparent.setPlanetCount( scrollValue );\n\n\t// Triangle size\n\tscrollValue = triSizeScroll.getMaximum() - triSizeScroll.getValue()\n\t + triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue();\n\tparent.setDustTrianglesThreshold( scrollValue );\n\n\t// Particle attractions\n\tint strnScrollValue = attStrengthScroll.getMaximum() - attStrengthScroll.getValue();\n\tint distScrollValue = attDistanceScroll.getMaximum() - attDistanceScroll.getValue();\n\tparent.setAttraction( distScrollValue, strnScrollValue );\n }", "@Override\n\t\tpublic void setValue(int n) {\n\t\t\tsuper.setValue(n);\n\t\t\tview.getDownpanel().getThicknessStatus().setThickness(n);\n\t\t\tview.getModel().setThickness(n);\n\t\t}", "public void setTheInterestingValue(int theInterestingValue) {\n\t\tthis.theInterestingValue = theInterestingValue;\n\t\tnotifyObservers();\n\t}", "public void setValuePerConversionManyPerClick(Double valuePerConversionManyPerClick) {\r\n this.valuePerConversionManyPerClick = valuePerConversionManyPerClick;\r\n }", "public void setOnKnobValuesChangedListener (KnobValuesChangedListener l) {\r\n\t\tknobValuesChangedListener = l;\r\n\t}", "public abstract void setValue(int value);", "void setValue(int value);", "public void set(ControlMode controlMode, double value)\n {\n switch (controlMode)\n {\n case Throttle:\n super.set(value);\n// System.out.printf(\"Port: %d value %f\\n\", port, value);\n break;\n case Position:\n super.getPIDController().setReference(value, ControlType.kPosition);\n break;\n case Velocity:\n super.getPIDController().setReference(value, ControlType.kVelocity);\n break;\n }\n }", "protected void valueChanged() {\r\n \t\tint newValue = slider.getSelection();\r\n \t\tint oldValue = this.intValue;\r\n \t\tintValue = newValue;\r\n \t\tjava.beans.PropertyChangeEvent event = new java.beans.PropertyChangeEvent(\r\n \t\t\t\tthis, IPropertyEditor.VALUE, oldValue, newValue);\r\n \t\tvalueChangeListener.valueChange(event);\r\n \t}", "public void setCurrentClampValue(double value) {\r\n this.currentClampValue = value;\r\n }", "public void adjust()\n {\n }", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "private void adjustBooleanControl(BooleanControl control, boolean value) {\n \t\tcontrol.setValue(value);\n \t}", "public void adjustmentValueChanged(AdjustmentEvent sbChanged)\r\n\t{\r\n\t\t//If adjustment came from the speed scroll bar\r\n\t\tif (sbChanged.getSource() == weaponVelocitySB)\r\n\t\t{\t\t\r\n\t\t\t\t//Prevent adjustment while projectile is moving\r\n\t\t\t\tif (weaponMotion == false) \r\n\t\t\t\t{\r\n\t\t\t\t//Adjust firing power to something reasonable\r\n\t\t\t\ttempSBValue = sbChanged.getValue();\r\n\t\t\t\ttempSBValue = (int) (tempSBValue/powerBalance);\r\n\t\t\t\tweaponV0 = tempSBValue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(weaponV0);\r\n\t\t}\r\n\t\t\r\n\t\t//If adjustment came from the size scroll bar\r\n\t\tif (sbChanged.getSource() == angleSB)\r\n\t\t{\t\t\t\r\n\t\t\tdeg = sbChanged.getValue();\r\n\t\t\t//Set size scroll bar movement flag\r\n\t\t\t//angleSBMoveFlag = true;\r\n\t\t\t//System.out.println(deg);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public synchronized void adjustmentValueChanged(AdjustmentEvent e) {\n\n\t\tnotify();\n\t}", "public void setDmaValue(int value);", "private void setScrollBars() {\n int totHeight = jEditorPane1.getSize().height;\n int value = jEditorPane2.getSize().height;\n if (value > totHeight) totHeight = value;\n int totWidth = jEditorPane1.getSize().width;\n value = jEditorPane2.getSize().width;\n if (value > totWidth) totWidth = value;\n int viewHeight = jViewport1.getExtentSize().height;\n int viewWidth = jViewport1.getExtentSize().width;\n //D.deb(\"totHeight = \"+totHeight+\", totWidth = \"+totWidth); // NOI18N\n //D.deb(\"viewHeight = \"+viewHeight+\", viewWidth = \"+viewWidth); // NOI18N\n jScrollBar1.setValues(0, viewWidth, 0, totWidth);\n jScrollBar1.setBlockIncrement(viewWidth);\n jScrollBar2.setValues(0, viewWidth, 0, totWidth);\n jScrollBar2.setBlockIncrement(viewWidth);\n jScrollBar3.setValues(0, viewHeight, 0, totHeight);\n jScrollBar3.setBlockIncrement(viewHeight);\n boolean visibleScroll = jScrollBar1.isVisible();\n //D.deb(\"jScrollBar1.isVisible() = \"+visibleScroll); // NOI18N\n if (visibleScroll != viewWidth < totWidth && editorPanel.isShowing()) {\n //D.deb(\"jScrollBar1 setting visibility = \"+!visibleScroll); // NOI18N\n jScrollBar1.setVisible(!visibleScroll);\n jScrollBar2.setVisible(!visibleScroll);\n validate();\n //editorPanel.repaint();\n //jScrollBar1.repaint();\n //jScrollBar2.repaint();\n }\n visibleScroll = jScrollBar3.isVisible();\n //D.deb(\"jScrollBar3.isVisible() = \"+visibleScroll); // NOI18N\n if (visibleScroll != viewHeight < totHeight && editorPanel.isShowing()) {\n //D.deb(\"jScrollBar3 setting visibility = \"+!visibleScroll); // NOI18N\n jScrollBar3.setVisible(!visibleScroll);\n validate();\n //editorPanel.repaint();\n //jScrollBar3.repaint();\n }\n }", "public abstract void setValue(double fltValue);", "public void setAdjustmentRatio(double value) {\n this.adjustmentRatio = value;\n }", "private void setValue(double value) {\n this.value = value;\n }", "public void setSelection( final int value ) {\n checkWidget();\n if( value < minimum ) {\n selection = minimum;\n } else if ( value > maximum - thumb ) {\n selection = maximum - thumb;\n } else {\n selection = value;\n }\n }", "public native void setScrollIndocatorStyle(double value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.scrollIndicatorStyle = value;\n }-*/;", "private void refreshControls() {\n\t// Scrollbars are upside-down from real sliders.\n\tint scrollValue = caeliScroll.getMaximum() - caeliScroll.getValue();\n\tcaeliValueLabel.setText( \"\"+(scrollValue / 100.0 ) );\n\tparent.setCaeliDensity( scrollValue / 100.0 );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = planetScroll.getMaximum() - planetScroll.getValue();\n\tplanetValueLabel.setText( \"\"+scrollValue );\n\tparent.setPlanetCount( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = triSizeScroll.getMaximum() - triSizeScroll.getValue()\n\t + triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue();\n\t \n\ttriSizeValueLabel.setText( \"\"+(triSizeScroll.getMaximum() - triSizeScroll.getValue()) );\n\ttriFineSizeValueLabel.setText( \"\"+(triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue()) );\n\tparent.setDustTrianglesThreshold( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tint strnScrollValue = attStrengthScroll.getMaximum() - attStrengthScroll.getValue();\n\tint distScrollValue = attDistanceScroll.getMaximum() - attDistanceScroll.getValue();\n\n\tattStrnValueLabel.setText( \"\"+strnScrollValue );\n\tattDistValueLabel.setText( \"\"+distScrollValue );\n\n\tparent.setAttraction( distScrollValue, strnScrollValue );\n\n\n\t// Refresh iPad display values\n\tosc.send( new OscMessage( \"/faders\", new Object[] { sliderFloatValue( caeliScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( planetScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triFineSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attDistanceScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attStrengthScroll ) } ),\n\t new NetAddress( ipadAddress, OSC_PORT_SEND ) );\n }", "private void setBarValues() {\n\t\t// Get highest value\n\t\tint iMax = 0;\n\t\tdouble dMax = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tif (dMax < a[i]) {\n\t\t\t\tiMax = i;\n\t\t\t\tdMax = a[i];\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\t// Highlight leading alternative\n\t\t\tif (i == iMax)\n\t\t\t\talternativeBarComponents[i].doUpdate(a[i], SWT.NORMAL);\n\t\t\telse\n\t\t\t\talternativeBarComponents[i].doUpdate(a[i], SWT.PAUSED);\n\t\t}\n\t}", "public void setRoll(double aValue)\n{\n if(aValue==getRoll()) return;\n repaint();\n firePropertyChange(\"Roll\", getRSS().roll, getRSS().roll = aValue, -1);\n}", "public void set(double val);", "void setScrollBar(final JScrollBar sb) {\n this.scrollBar = sb;\n }", "public void setHorizontalScrollBarPolicy(int paramInt) {\n/* 548 */ switch (paramInt) {\n/* */ case 30:\n/* */ case 31:\n/* */ case 32:\n/* */ break;\n/* */ default:\n/* 554 */ throw new IllegalArgumentException(\"invalid horizontalScrollBarPolicy\");\n/* */ } \n/* 556 */ int i = this.horizontalScrollBarPolicy;\n/* 557 */ this.horizontalScrollBarPolicy = paramInt;\n/* 558 */ firePropertyChange(\"horizontalScrollBarPolicy\", i, paramInt);\n/* 559 */ revalidate();\n/* 560 */ repaint();\n/* */ }", "public void setValue(double value) {\n this.value = value; \n }", "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMinValue);\n\t\t\tcurrent = Math.min(current, mMaxValue);\n\t\t}\n\t\t// int previous = mValue;\n\t\tmValue = current;\n\t\tupdateInputTextView();\n\t\tif (notifyChange) {\n\t\t\t// notifyChange(previous, current);\n\t\t}\n\t\tinitializeSelectorWheelIndices();\n\t\tinvalidate();\n\t}", "@Override\n public void set(double value)\n {\n final String funcName = \"set\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", value);\n }\n\n if (!TrcUtil.inRange(value, -1.0, 1.0))\n {\n throw new IllegalArgumentException(\"Value must be in the range of -1.0 to 1.0.\");\n }\n\n if (softLowerLimitEnabled && value < 0.0 && getPosition() <= softLowerLimit\n || softUpperLimitEnabled && value > 0.0 && getPosition() >= softUpperLimit)\n {\n value = 0.0;\n }\n\n if (maxVelocity == 0.0)\n {\n currPower = value;\n }\n // else\n // {\n // controlMode = ControlMode.Velocity;\n // value *= maxVelocity;\n // value = TrcUtil.round(value); // Velocity mode is in sensor units/100ms, and sensor units are in integers.\n // }\n motor.set(value);\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", value);\n }\n }", "void setScrollBarRelations(JScrollBar param1JScrollBar) {\n/* 1540 */ AccessibleRelation accessibleRelation1 = new AccessibleRelation(AccessibleRelation.CONTROLLED_BY, param1JScrollBar);\n/* */ \n/* */ \n/* 1543 */ AccessibleRelation accessibleRelation2 = new AccessibleRelation(AccessibleRelation.CONTROLLER_FOR, JScrollPane.this);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1548 */ AccessibleContext accessibleContext = param1JScrollBar.getAccessibleContext();\n/* 1549 */ accessibleContext.getAccessibleRelationSet().add(accessibleRelation2);\n/* */ \n/* */ \n/* 1552 */ getAccessibleRelationSet().add(accessibleRelation1);\n/* */ }", "public void setVerticalScrollBar(JScrollBar paramJScrollBar) {\n/* 906 */ JScrollBar jScrollBar = getVerticalScrollBar();\n/* 907 */ this.verticalScrollBar = paramJScrollBar;\n/* 908 */ add(paramJScrollBar, \"VERTICAL_SCROLLBAR\");\n/* 909 */ firePropertyChange(\"verticalScrollBar\", jScrollBar, paramJScrollBar);\n/* */ \n/* 911 */ revalidate();\n/* 912 */ repaint();\n/* */ }", "void onChanged(RulerWheel wheel, int oldValue, int newValue);", "public void setY(double aValue)\n{\n if(_y==aValue) return; // If value already set, just return\n repaint(); // Register repaint\n firePropertyChange(\"Y\", _y, _y = aValue, -1); // Set value and fire PropertyChange\n if(_parent!=null) _parent.setNeedsLayout(true); // Rather bogus\n}", "public void setValue(int value) {\r\n this.value = value;\r\n }", "@Override\n public void setMaximum(boolean maximized) throws PropertyVetoException{\n if (getParent() == null){\n if (speciallyMaximized == maximized)\n return;\n\n Boolean oldValue = speciallyMaximized ? Boolean.TRUE : Boolean.FALSE; \n Boolean newValue = maximized ? Boolean.TRUE : Boolean.FALSE;\n fireVetoableChange(IS_ICON_PROPERTY, oldValue, newValue);\n\n speciallyMaximized = maximized;\n }\n else\n super.setMaximum(maximized);\n }", "public void setDelta(double value) {\r\n this.delta = value;\r\n }", "public void valueChanged(ListSelectionEvent e) {\n Object src = e.getSource();\n\n if(e.getValueIsAdjusting() && src == listaTarefasCadastradas) {\n //envio do indice da tarefa, o controle de tarefas e do seletor 1 - adicionar nova 2 editar;\n\t\t\tnew TelaDetalheTarefa().mostrarDadosTarefa(ct, listaTarefasCadastradas.getSelectedIndex(),2, p.getArrProjetos(ind));\n }\n }", "public void setCValueEditable(boolean status);", "public void setAdjustMode(boolean adjust);", "void setPosiblesValores(int[] valores);", "public void setValue(double newvalue){\n value = newvalue;\n }", "public void setScaleY(double aValue)\n{\n if(aValue==getScaleY()) return;\n repaint();\n firePropertyChange(\"ScaleY\", getRSS().scaleY, getRSS().scaleY = aValue, -1);\n}", "public native void setOverScrollMode(double value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.overScrollMode = value;\n }-*/;", "public void setValuePerConvertedClick(Double valuePerConvertedClick) {\r\n this.valuePerConvertedClick = valuePerConvertedClick;\r\n }", "public void setValue(int value)\n {\n // we have assumed value 1 for X and 10 for O\n this.value = value;\n }", "@Override\r\n\tpublic void setPanelValue(CommonPanel tradeValue) {\n\t\tproductWindowpanel = (BONDPanel) tradeValue;\r\n\t\t\r\n\t}", "@Override public void adjustmentValueChanged(AdjustmentEvent e)\n{\n int v = e.getValue();\n last_user = v;\n if (v >= getMaximum()) at_end = true;\n else at_end = false;\n\n for_bubble.getExecution().setCurrentTime(v);\n}", "public void setMaximum() {\n getReel().setMaxValue(getVerticalScrollBar().getMaximum());\n }", "public void setSelDataPoint(DataPoint aDP)\n{\n if(SnapUtils.equals(aDP, _selPoint)) return;\n firePropChange(SelDataPoint_Prop, _selPoint, _selPoint = aDP);\n repaint();\n}", "public void adjustmentValueChanged(AdjustmentEvent event) {\r\n if (event.getSource() == delayPanel) {\r\n controller.setAutoInterval(delayPanel.getValue());\r\n }\r\n }", "@Override\n public void setValue(int index, Object value)\n {\n if (index == 1)\n {\n super.setValue(index, value); \n }\n else if (index == 2)\n {\n if (m_Scaler != 0)\n {\n try\n { \n m_Value = ((Number)value).doubleValue() * getScaler();\n }\n catch (Exception ex)\n {\n //Sometimes scaler is set for wrong Object type.\n setValue(value);\n }\n }\n else\n {\n setValue(value);\n }\n }\n else if (index == 3)\n { \n //Set default values.\n if (value == null)\n {\n m_Scaler = m_Unit = 0;\n }\n else\n {\n if (Array.getLength(value) != 2)\n {\n m_Scaler = m_Unit = 0;\n }\n else\n {\n m_Scaler = ((Number)Array.get(value, 0)).intValue();\n m_Unit = (((Number)Array.get(value, 1)).intValue() & 0xFF);\n }\n }\n }\n else\n {\n throw new IllegalArgumentException(\"GetValue failed. Invalid attribute index.\");\n }\n }", "public void setValue(int value)\n {\n this.value = value;\n }", "public void setPnl(double value) {\r\n this.pnl = value;\r\n }", "@Override\n public void setValue (int newValue){\n super.setValue(newValue);\n updateChildesValues(newValue);\n\n }", "public void setValue(int new_value){\n this.value=new_value;\n }", "public void setValue (int newValue) {\n myValue = newValue;\n }", "public void updateUI() {\n/* 393 */ setUI((ScrollPaneUI)UIManager.getUI(this));\n/* */ }", "@Override\n\tpublic void setValue(int value) {\n\t\tif (!(value >= 0 && value <= this.maxValue)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"DawsonBallotItem Error - value must be >= 0 and <= to maxValue.\" + \" Invalid value = \" + value);\n\t\t}\n\t\tthis.value = value;\n\n\t}", "public void setIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n increment = value;\n }\n }", "public void setUI(ScrollPaneUI paramScrollPaneUI) {\n/* 380 */ setUI(paramScrollPaneUI);\n/* */ }", "public boolean getValueIsAdjusting() {\r\n return isAdjusting;\r\n }", "public void setValue(Object value);", "public void setValue(double value) {\n this.value = value;\n }", "public void setValue(double value) {\n this.value = value;\n }", "public void setValue(double value) {\n this.value = value;\n }", "public void setValue(int value) {\n this.value = value;\n }", "public void setValue(int value) {\n this.value = value;\n }", "public void setYValue( double value ){\r\n\t\tsuper.setYValue( new Double( value ) );\r\n\t}", "@JSProperty(\"pane\")\n void setPane(double value);", "public void setCombo(Object newValue);", "public void setValue(int value) {\n this.value = value;\n }", "public void setValue(int value) {\n this.value = value;\n }", "public void setValue(int value) {\n this.value = value;\n }", "@Override\n public void valueChanged(final ListSelectionEvent e) {\n if (e.getValueIsAdjusting()) {\n return;\n }\n showObject();\n }", "public void setValorCalculo(ValoresCalculo valorCalculo)\r\n/* 93: */ {\r\n/* 94:111 */ this.valorCalculo = valorCalculo;\r\n/* 95: */ }", "public void setValue(double value) {\r\n\t\tthis.value = value;\r\n\t}", "void setScroller(Scroller scroller) {\n this.scroller = scroller;\n }", "public void setValue(double val) {\r\n\t\tthis.worth = val;\r\n\t}" ]
[ "0.61066955", "0.59172046", "0.5873946", "0.58564556", "0.58426476", "0.58065933", "0.57689375", "0.57557243", "0.57067347", "0.5562315", "0.55215895", "0.55133474", "0.5435415", "0.5428172", "0.5413442", "0.5394992", "0.5385587", "0.5382335", "0.5379829", "0.53553075", "0.5339503", "0.5336308", "0.53273857", "0.53195095", "0.5306845", "0.53058225", "0.5285416", "0.5279931", "0.52739304", "0.5271305", "0.5261162", "0.5247969", "0.5228532", "0.5221033", "0.52039343", "0.52005774", "0.5194492", "0.5183647", "0.51805544", "0.5178539", "0.516881", "0.5162128", "0.5160652", "0.5153337", "0.5129903", "0.51292175", "0.5128357", "0.51193106", "0.51169556", "0.51165015", "0.5112205", "0.5096185", "0.5095457", "0.5094513", "0.5091988", "0.50858575", "0.5080416", "0.5067945", "0.505987", "0.5057836", "0.5057304", "0.5056328", "0.50555724", "0.5054006", "0.5048789", "0.50389075", "0.5026971", "0.5026466", "0.4997696", "0.49930978", "0.4992298", "0.4989916", "0.49885422", "0.49884543", "0.4984865", "0.49766538", "0.49706307", "0.4970264", "0.49625587", "0.49556842", "0.4943951", "0.49380225", "0.49365494", "0.49249446", "0.49227187", "0.49227187", "0.49227187", "0.49182948", "0.49182948", "0.49136505", "0.49017397", "0.49013567", "0.48998448", "0.48998448", "0.48998448", "0.48941803", "0.48921606", "0.4888387", "0.4886218", "0.48839995" ]
0.60217696
1
Constructor to be used when calling from actual context of the application
public FormValidationScriptVisitor(List<FormAttribute> declaredAttributes) { declaredAttributes.forEach(attribute -> declaredVariables.put(attribute.getVariableName(), attribute.getDataType())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ApplicationContext()\n\t{\n\t}", "public MyApp() {\n sContext = this;\n }", "private AppContext()\n {\n }", "public Context() {\n }", "public CH340Application() {\n sContext = this;\n }", "public TAppAccess() {\n\t}", "public DefaultApplication() {\n\t}", "private Main() {\n\n super();\n }", "public MTApplication(){\r\n\t\tsuper();\r\n\t}", "public BazaarApplicationImpl() {\r\n\t\tsuper();\r\n\r\n\t}", "public ApplicationCreator() {\n }", "private LOCFacade() {\r\n\r\n\t}", "public RecruitingAppManagementImpl() {\n }", "public PortletContext() {\n }", "public ApplicationTest() {\n\t\t/*\n\t\t * This constructor should not be modified. Any initialization code should be\n\t\t * placed in the setUp() method instead.\n\t\t */\n\n\t}", "public LocalAppLauncher() {\n }", "protected GaConnector() {\n }", "public App() {\n\t\tLog.d(\"App\", \"App created\");\n\t\tinstance = this;\n\t}", "protected void initialize() {}", "protected void initialize() {}", "private SudokuSolverApplication() {\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "Constructor() {\r\n\t\t \r\n\t }", "protected void initialize(ExternalContext context)\n {\n }", "private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}", "public ApplicationContext() {\n FileInputStream in;\n props = new Properties();\n try {\n in = new FileInputStream(\"gamesettings.properties\");\n props.load(in);\n } catch (FileNotFoundException ex) {\n props.setProperty(\"name\", \"Player\");\n props.setProperty(\"url\", \"0.0.0.0\");\n \n } catch (IOException ex) {\n props.setProperty(\"name\", \"Player\");\n props.setProperty(\"url\", \"0.0.0.0\");\n }\n }", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "public Context(){\n\t\ttry {\n\t\t\tsocket = new Socket(\"localhost\", 9876);\n\t\t\tmodel = new SimpleCalculationModel();\n\t\t\ttheInputWindow = new SimpleCalculatorWindow();\n\t\t\tcurrentInput = \"\"; \n\t\t} catch (UnknownHostException e) {\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"The server local host port 9876 does not exist!\");\n\t\t}\n\t}", "public envio() {\r\n }", "public BaseLogic()\n {\n this(new EventBus());\n }", "private TSLManager() {\n\t\tsuper();\n\t}", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public CommunicationController() {\r\n _context = new Context(\"MyContext\");\r\n _app = UiApplication.getUiApplication();\r\n try {\r\n // Read settings from config.xml\r\n ECHO_SERVER_URI = Utils.getEchoServerUri();\r\n TIMEOUT = Utils.getTimeout();\r\n } catch (final Exception e) {\r\n alertDialog(e.toString());\r\n }\r\n }", "public ApplicationStub(final Context context) {\n super(context);\n }", "public BasicAppInfo() {\n super();\n }", "private Conf() {\n // empty hidden constructor\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Aliyun() {\n\t\tsuper();\n\t}", "@Override\n public void init() {}", "WebAppInterface(Context c) {\n mContext = c;\n }", "WebAppInterface(Context c) {\n mContext = c;\n }", "WebAppInterface(Context c) {\r\n\t mContext = c;\r\n\t }", "private ResourceFactory() {\r\n\t}", "public void init() {\n \n }", "private ReservationsContextHelper() {\r\n }", "@Override\r\n\tpublic void init() {}", "public StockApp()\n {\n reader = new InputReader();\n manager = new StockManager();\n menuSetup();\n }", "@Override\n protected void init() {\n }", "public AppInfo() {\n }", "private MApi() {}", "public ApplicationStub() {\n }", "public Application()\r\n {\r\n pSlot = new ParkingSlot();\r\n cPark = new CarPark();\r\n }", "public MockPageContext() {\n super();\n MockPageContext.init();\n }", "private WebContext() {\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "WebAppInterface(Context c) {\n mContext = c;\n }", "WebAppInterface(Context c) {\n mContext = c;\n }", "WebAppInterface(Context c) {\n mContext = c;\n }", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "protected void init() {\n }", "private Supervisor() {\r\n\t}", "private Instantiation(){}", "private RequestContext() {\n\t\tencoding = DEFAULT_ENCODING;\n\t\tstatusCode = DEFAULT_STATUS_CODE;\n\t\tstatusText = DEFAULT_STATUS_TEXT;\n\t\tmimeType = DEFAULT_MIME_TYPE;\n\t\tcontentLength = DEFAULT_CONTENT_LENGHT;\n\t\theaderGenerated = DEFAULT_HEADER_GENERATED;\n\t\tcharset = Charset.forName(encoding);\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "private SpringBoHelper() {\n\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 }", "@Override public void init()\n\t\t{\n\t\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "private RecipleazBackendService() {\n }", "protected void init() {\n // to override and use this method\n }", "public Curso() {\r\n }", "private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private TenantContextDataHolder() {\n super();\n }", "public PContext() {\r\n\t\tthis(new PDirective(), null, null);\r\n\t}", "private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }", "Reproducible newInstance();", "public ResourceUtils() {\r\n //stub\r\n }", "protected void initialize() {\n \t\n }", "public PSFUDApplication()\n {\n loadSnapshot();\n }", "private ClientController() {\n }", "private Main ()\n {\n super ();\n }", "protected AbstractContext() {\n this(new FastHashtable<>());\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public abstract ApplicationLoader.Context context();", "protected Spring() {}", "protected ModelAgent ()\n {\n this (\"ModelAgent\");\n\n }", "public Constructor(){\n\t\t\n\t}", "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 }", "protected void init(){\n }", "@Override\n void init() {\n }", "private OspfConfigUtil() {\n\n }", "private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }", "public Facade() {\n\t\tinitResources();\n\t}", "private AppAuth() {\n }" ]
[ "0.7520221", "0.74515337", "0.73878425", "0.7293808", "0.7182664", "0.71314716", "0.68076277", "0.6793862", "0.6751672", "0.6681959", "0.6678292", "0.6666958", "0.66301864", "0.6619861", "0.66191536", "0.65969604", "0.6580514", "0.65779936", "0.6569443", "0.6569443", "0.655836", "0.65520024", "0.65308225", "0.6524632", "0.65081924", "0.6508046", "0.64983314", "0.6482649", "0.64790606", "0.64732623", "0.64713585", "0.6450267", "0.643365", "0.64329267", "0.6430636", "0.64283967", "0.6422872", "0.6422872", "0.6422872", "0.6422872", "0.6422872", "0.6422872", "0.6412256", "0.6408137", "0.6400799", "0.6400799", "0.6377472", "0.6377458", "0.63771194", "0.637679", "0.63715297", "0.63628054", "0.6361352", "0.6359292", "0.6358991", "0.63475204", "0.6346557", "0.63419163", "0.63415265", "0.6332877", "0.6331197", "0.6331197", "0.6331197", "0.63277614", "0.6327228", "0.63260233", "0.6321789", "0.6320989", "0.6320841", "0.6320841", "0.6320841", "0.6320432", "0.63177955", "0.631423", "0.6313866", "0.6311365", "0.6310973", "0.62999797", "0.6291363", "0.62897307", "0.628711", "0.62841445", "0.6272099", "0.62710196", "0.62682194", "0.6263748", "0.62611604", "0.6261113", "0.6249937", "0.6248444", "0.6248234", "0.6244316", "0.6238844", "0.6238841", "0.6234696", "0.62335706", "0.6231991", "0.6230856", "0.6228241", "0.62248284", "0.6223478" ]
0.0
-1
/ Allows nondeclared variable creation, but user needs to ensure the input contains the declarations, or an exception will be thrown in runtime (due to validation).
public FormValidationScriptVisitor() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Boolean visitDeclaration(FormScriptGrammarParser.DeclarationContext ctx) {\n DataType dataType = DataType.valueOf(ctx.type.getText());\n if (declaredVariables.get(ctx.name.getText()) != null) { // if variable already declared\n throw new IllegalArgumentException(\"Error at line: \" + ctx.name.getLine() + \":\" + ctx.name.getCharPositionInLine()\n + \" variable \" + ctx.name.getText() + \" was already previously declared!\");\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n declaredVariables.put(ctx.name.getText(), dataType);\n return true;\n }", "public void testSingleVar() { assertValid(\"int a;\"); }", "@Test\n\tpublic void testMakeSureVarVariablesCanShadowLetVariables()\n\t{\n\t\tString[] code = {\n\t\t\t\"let a = 1;\",\n\t\t \"let b = 2;\",\n\t\t \"var c = 3;\",\n\n\t\t \"function sup(a) {\",\n\t\t \"var b = 4;\",\n\t\t \"let c = 5;\",\n\t\t \"let d = 6;\",\n\t\t \"if (false) {\",\n\t\t \"var d = 7;\",\n\t\t \"}\",\n\t\t \"return b + c + a + d;\",\n\t\t \"}\",\n\n\t\t \"sup();\"\n\t\t};\n\t\t\n\t\tth.addError(1, 5, \"'a' is defined but never used.\");\n\t th.addError(2, 5, \"'b' is defined but never used.\");\n\t th.addError(3, 5, \"'c' is defined but never used.\");\n\t th.addError(9, 5, \"'d' has already been declared.\");\n\t\tth.test(code, new LinterOptions().set(\"esnext\", true).set(\"unused\", true).set(\"undef\", true).set(\"funcscope\", true));\n\t}", "abstract void checkWhetherVariable(SyntaxUnit use);", "VariableExp createVariableExp();", "Variables createVariables();", "VariableDeclaration createVariableDeclaration();", "Variable createVariable();", "Variable createVariable();", "public static boolean validate(Scope scope, VariableDeclarationLine line) throws\n AlreadyDeclaredVariableExcpetion {\n if(!scope.canAddVar(line.getVariable())){\n throw new AlreadyDeclaredVariableExcpetion(line.getVariable().getName());\n }\n else{\n scope.addVariable(line.getVariable());\n return true;\n }\n }", "private void validateInputParameters(){\n\n }", "VarDecl createVarDecl();", "VarsDeclRule createVarsDeclRule();", "String getVarDeclare();", "@Check\n\tpublic void checkIfVariableDefinitionsAreValid(VariableDefinition anEntity) {\n\t\tif (anEntity.getName() != null) {\n\t\t\tString tempName = anEntity.getName().getName();\n\t\t\tif (tempName != null) {\n\t\t\t\tif (tempName.contains(\".\")) {\n\t\t\t\t\terror(\"Variable definitions may not be fully or partly qualified. Please put the variable in the according packagedef to qualify it!\",\n\t\t\t\t\t\t\tnull);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void declareVariable (String variableName,boolean isFinal,boolean isArgument,String type,\r\n\t\t\t\t\t\t\t\t\tString value)throws IllegalDeclarationException,\r\n\t\t\t\t\t\t\t\t\tTypeNotSupportedException,IncompatibleTypeException{\r\n\t\t//if there's already such var in this scope\\we're trying to make an uninitialised final declaration\r\n\t\tif((isFinal&&value==null)||this.contains(variableName)){\r\n\t\t\tthrow new IllegalDeclarationException();\r\n\t\t}else {\r\n\t\t\t\tVariable newVar = vFactory.createVariable(false, isFinal, isArgument,type,parent==null);\r\n\t\t\t\tif(value==null) {//if we're trying to declare an uninitialised variable legally:\r\n\t\t\t\t\tscopeVariables.put(variableName, newVar);//we'll declare a new uninitialised variable\r\n\t\t\t\t} else if (newVar.isArgument()||(newVar.compatibleWith(value))) {\r\n\t\t\t\t\t//if value's type's compatible with the var's type/we're declaring a method's argument as\r\n\t\t\t\t\t// an argument inside it's own scope(so we'll want to treat it as initialised):\r\n\t\t\t\t\tnewVar.initialize();\r\n\t\t\t\t\tscopeVariables.put(variableName, newVar);//we'll declare a new initialised variable\r\n\t\t\t\t\t} else {//if it's not compatible, we'll check if value is a reference to another variable:\r\n\t\t\t\t\t\tdeclareWithReference(newVar,variableName,isFinal,isArgument,value);\r\n\t\t\t\t\t}\r\n\t\t}\r\n\t}", "public Variable createVariable(String name, int offset, DataType dataType, SourceType source)\n\t\t\tthrows DuplicateNameException, InvalidInputException;", "public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException {\n boolean hasPropertyAgnosticType = false;\n EventType[] types = validationContext.getStreamTypeService().getEventTypes();\n for (int i = 0; i < validationContext.getStreamTypeService().getEventTypes().length; i++) {\n if (types[i] instanceof EventTypeSPI) {\n hasPropertyAgnosticType |= ((EventTypeSPI) types[i]).getMetadata().isPropertyAgnostic();\n }\n }\n\n if (!hasPropertyAgnosticType) {\n // the variable name should not overlap with a property name\n try {\n validationContext.getStreamTypeService().resolveByPropertyName(variableName, false);\n throw new ExprValidationException(\"The variable by name '\" + variableName + \"' is ambigous to a property of the same name\");\n } catch (DuplicatePropertyException e) {\n throw new ExprValidationException(\"The variable by name '\" + variableName + \"' is ambigous to a property of the same name\");\n } catch (PropertyNotFoundException e) {\n // expected\n }\n }\n\n VariableMetaData variableMetadata = validationContext.getVariableService().getVariableMetaData(variableName);\n if (variableMetadata == null) {\n throw new ExprValidationException(\"Failed to find variable by name '\" + variableName + \"'\");\n }\n isPrimitive = variableMetadata.getEventType() == null;\n variableType = variableMetadata.getType();\n if (optSubPropName != null) {\n if (variableMetadata.getEventType() == null) {\n throw new ExprValidationException(\"Property '\" + optSubPropName + \"' is not valid for variable '\" + variableName + \"'\");\n }\n eventTypeGetter = ((EventTypeSPI) variableMetadata.getEventType()).getGetterSPI(optSubPropName);\n if (eventTypeGetter == null) {\n throw new ExprValidationException(\"Property '\" + optSubPropName + \"' is not valid for variable '\" + variableName + \"'\");\n }\n variableType = variableMetadata.getEventType().getPropertyType(optSubPropName);\n }\n\n readersPerCp = validationContext.getVariableService().getReadersPerCP(variableName);\n if (variableMetadata.getContextPartitionName() == null) {\n readerNonCP = readersPerCp.get(EPStatementStartMethod.DEFAULT_AGENT_INSTANCE_ID);\n }\n variableType = JavaClassHelper.getBoxedType(variableType);\n return null;\n }", "private void checkValue(Variable toBeVariable) throws MethodCallWithNonexistentParameter {\n if (!toBeVariable.hasValue()) {\n throw new MethodCallWithNonexistentParameter();\n }\n }", "@Override\n public String semanticChecker(SymbolTable table){\n \tSymbolTable top = table;\n \tSymbolTable test;\n \twhile(top.ascend() != null){\n \t top = top.ascend();\n \t}\n \ttest = null;\n \n \t//check if variable exist\n \tif(top.locate(name) != null || (test = table.locate(name)) != null){\n \t return \"semantic error\"; //syntaxError\n \t}\n \n \t//create new entry\n \ttable.newEntry(type, name);\n \n \treturn type; //yeah baby!\n }", "private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }", "abstract public void declare() throws SystemException;", "InputDecl createInputDecl();", "public VariableNotSetException() {\n }", "private void checkSafety() {\n\t\tSet<VariableTerm> bindingVariables = new HashSet<>();\n\t\tSet<VariableTerm> nonbindingVariables = new HashSet<>();\n\n\t\t// Check that all negative variables occur in the positive body.\n\t\tfor (Atom posAtom : bodyAtomsPositive) {\n\t\t\tbindingVariables.addAll(posAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(posAtom.getNonBindingVariables());\n\t\t}\n\n\t\tfor (Atom negAtom : bodyAtomsNegative) {\n\t\t\t// No variables in a negated atom are binding.\n\t\t\tnonbindingVariables.addAll(negAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(negAtom.getNonBindingVariables());\n\t\t}\n\n\t\t// Rule heads must be safe, i.e., all their variables must be bound by the body.\n\t\tif (!isConstraint()) {\n\t\t\tnonbindingVariables.addAll(headAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(headAtom.getNonBindingVariables());\n\t\t}\n\n\t\t// Check that all non-binding variables are bound in this rule.\n\t\tnonbindingVariables.removeAll(bindingVariables);\n\n\t\tif (nonbindingVariables.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new RuntimeException(\"Encountered unsafe variable \" + nonbindingVariables.iterator().next().toString() + \" in rule: \" + toString()\n\t\t\t\t+ System.lineSeparator() + \"Notice: A rule is considered safe if all variables occurring in negative literals, builtin atoms, and the head of the rule also occur in some positive literal.\");\n\t}", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "@Override\n public Boolean visitVariableAttribution(FormScriptGrammarParser.VariableAttributionContext ctx) {\n if (!declaredVariables.containsKey(ctx.VARIABLE().getText())) {\n // this is validated in UI/controlled by flow in the UI so should never happen, but it remains here just in case\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \": variable \" + ctx.VARIABLE().getText() + \" wasn't declared!\");\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n DataType dataType = declaredVariables.get(ctx.VARIABLE().getText());\n boolean correctType = dataType.lexerValue().equals(ctx.value().start.getType());\n /*will verify if the attribution is actually semantically valid, e.g if\n the variable was defined as an INTEGER, it can't be assigned a DATE*/\n if (!correctType) {\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \":\" + ctx.getStart().getCharPositionInLine()\n + \": Invalid attribution type!\" + \" variable \" + ctx.VARIABLE().getText() + \" can't be assigned the value \" + ctx.value().getText());\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n //verify if operators are valid in the context of the datatype\n String operator = ctx.COMPARISON_OPERATORS().getText();\n if (operator.equals(\"<\") || operator.equals(\">\")) {\n if (dataType.equals(DataType.BOOLEAN) || dataType.equals(DataType.DATE) || dataType.equals(DataType.FILE)) {\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \":\" + ctx.getStart().getCharPositionInLine()\n + \": Invalid comparison type!\" + \" variable \" + ctx.VARIABLE().getText() + \" can't be compared with operator '\" + operator + \"'\");\n }\n }\n return true;\n }", "final public void varcall() throws ParseException {\n jj_consume_token(VARIABLE);\n if(userVals.get(token.image)==null) {\n {if (true) throw new ParseException(\"La variable no ha sido definida.\");}\n }\n }", "@Override\n public int[] getRequiredTokens() {\n return new int[] {\n TokenTypes.VARIABLE_DEF,\n };\n }", "private void performSanityCheck()\n\t{\n\t\tif (variableNames != null && domainSizes != null\n\t\t\t\t&& propositionNames != null)\n\t\t{\n\t\t\tcheckStateSizes();\n\t\t\tcheckDomainSizes();\n\t\t}\n\t}", "public static boolean variableDeclaration(FileInputStream f) {\n CToken t = new CToken();\n if(observer != null){\n observer.parser.setCurrentRule(\"variableDeclaration\",true);\n }\n \n if (!declarationType(f)) {\n return false;\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"mainDeclaration\",true);\n }\n \n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n \n if (t.token.equals(\"=\")) {\n t = CScanner.peekNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n if (!constant(f)) {\n System.err.format(\"Syntax Error: In rule VariableDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"variableDeclaration\",true);\n }\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n\n if (!t.token.equals(\";\")) {\n System.err.format(\"Syntax Error: In rule VariableDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n } //if not semi colon\n if(observer != null){\n observer.parser.setCurrentRule(\"variableDeclaration\",true);\n }\n } //must follow with constant\n else if (!t.token.equals(\";\")) {\n System.err.format(\"Syntax Error: In rule VariableDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n } //if not semicolon nor equals\n if(observer != null){\n observer.parser.setCurrentRule(\"variableDeclaration\", false);\n }\n return true;\n }", "private void checkUserInput() {\n }", "@Override\n public Void visitVariableConsequence(GraafvisParser.VariableConsequenceContext ctx) {\n TerminalNode variable = ctx.HID();\n if (!variables.contains(variable.getText())) {\n int line = variable.getSymbol().getLine();\n int column = variable.getSymbol().getCharPositionInLine();\n errors.add(new UndefinedVariableError(line, column, variable.getText()));\n }\n return null;\n }", "public static String getVariable(){\n Scanner kb = new Scanner(System.in);\n String variable = null;\n\n System.out.println(\"Enter the variable you would like to solve for: \");\n variable = kb.nextLine().toLowerCase();\n\n // check to make sure it is a valid variable name\n if( !variable.equals(\"height\") && !variable.equals(\"volume\") && !variable.equals(\"radius\")){\n System.out.println(\"Please enter in a valid variable (i.e. height, volume, or radius)...\");\n getVariable();\n }\n\n return variable;\n }", "@Override\n\tpublic void isLineSemanticsValid(Line line, VariableTable varTable,\n\t\t\tMethodTable methodTable) throws SemanticsException,\n\t\t\tSyntaxException, InvalidTableAccessException {\n\t\tList<Token> tokenList = line.getTokenList();\n\t\tState currentState = State.VAR_TYPE;\n\t\tint typeDecIndex;\n\t\t// Checks whether line is a final or regular declaration line:\n\t\tif (line.getLineType().equals(Line.LineType.FINAL_VAR_DECLARATION)) {\n\t\t\ttypeDecIndex = FINAL_TYPE_DECLARATION_INDEX;\n\t\t} else {\n\t\t\ttypeDecIndex = NON_FINAL_TYPE_DEC_INDEX;\n\t\t}\n\t\t// Saves the token that indicates the type of the new var being\n\t\t// declared:\n\t\tToken varTypeToken = tokenList.get(typeDecIndex);\n\t\tVarType newVarType = SemanticsValidator\n\t\t\t\t.getVarTypeFromToken(varTypeToken, varTable, line);\n\t\t// Iterates over all tokens following the varType token,\n\t\t// If token is a value being assigned, checks that assignment is legal.\n\t\tfor (int i = typeDecIndex + 1; i < tokenList.size(); ++i) {\n\t\t\tToken token = line.getTokenList().get(i);\n\t\t\tcurrentState = getNextState(currentState, token);\n\t\t\tif (currentState.equals(State.VAR_VAL)) {\n\t\t\t\tif (TokenType.isVarValue(token.getTokenType())) {\n\n\t\t\t\t\tVarType valType = SemanticsValidator.getVarTypeFromToken(\n\t\t\t\t\t\t\ttoken, varTable, line);\n\t\t\t\t\tif (!VarType.doVarTypesMatch(newVarType, valType)) {\n\t\t\t\t\t\tthrow new SemanticsException(\n\t\t\t\t\t\t\t\t\"Value doesn't match variable type\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tVariable rightVar = varTable.getVariableInLegalScope(\n\t\t\t\t\t\t\ttoken.getName(), line.getScope());\n\t\t\t\t\tif (!VarType.doVarTypesMatch(newVarType,\n\t\t\t\t\t\t\trightVar.getType())) {\n\t\t\t\t\t\tthrow new SemanticsException(\n\t\t\t\t\t\t\t\t\"New Variable type doesn't match referenced \"\n\t\t\t\t\t\t\t\t\t\t+ \"variable type\");\n\t\t\t\t\t}\n\t\t\t\t\tif (SemanticsValidator.wasVarInitializedInBadLine(rightVar,\n\t\t\t\t\t\t\tline)) {\n\t\t\t\t\t\tthrow new SemanticsException(\n\t\t\t\t\t\t\t\t\"Variable wasn't initialized\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "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 }", "public interface ValueRequired {\r\n\t/**\r\n\t * Richiede all'utente di inserire un valore e ne verifica la validità in base al campo\r\n\t * @param ctx il contesto su cui si deve operare\r\n\t * @param field campo su cui verificare la validità del dato\r\n\t * @param message richiesta all'utente di inserire il dato\r\n\t * @return Oggetto correttamente elaborato in base al campo\r\n\t */\r\n\tpublic default Object acceptValue(Context ctx, FieldHeading field, String message) {\r\n\t\tboolean valid = false;\r\n\t\tObject obj = null;\r\n\t\tdo {\r\n\t\t\tString value = ctx.getIOStream().read(\"\\t\" + message);\r\n\t\t\tif(!field.isBinding() && !field.isOptional() && value.isEmpty())\r\n\t\t\t\tvalid = true;\r\n\t\t\tctx.getIOStream().write(StringConstant.NEW_LINE);\r\n\t\t\tif(field.getClassType().isValidType(value)) {\r\n\t\t\t\tobj = field.getClassType().parse(value);\r\n\t\t\t\tvalid = true;\r\n\t\t\t}\r\n\t\t\tif(!valid)\r\n\t\t\t\tctx.getIOStream().writeln(\"\\tIl valore inserito non è corretto.\\n\\tInserisca qualcosa del tipo: \" + field.getClassType().getSyntax());\r\n\t\t}while(!valid);\r\n\t\treturn obj;\r\n\t}\r\n}", "private void declareWithReference(Variable newVar,String variableName, boolean isFinal,boolean\r\n\t\t\tisArgument, String value)throws IllegalDeclarationException,\r\n\t\t\tIncompatibleTypeException, TypeNotSupportedException{\r\n\t\tVariable reference = findVariable(value);\r\n\t\tif (reference != null) {//if it is indeed a reference to a previously declared variable:\r\n\t\t\t// we'll check if the referenced var is initialised + if it's type's compatible with newVar's\r\n\t\t\tif (newVar.compatibleWith(reference)&&reference.isInitialized()){\r\n\t\t\t\tVariable varToDeclare = vFactory.createVariable(true,isFinal,isArgument,reference.getType(),\r\n\t\t\t\t\t\tparent==null);\r\n\t\t\t\tscopeVariables.put(variableName, varToDeclare);//if it is, we'll declare a new variable\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\t//check if value's an uninitialised global var that we've already initialised in this scope\r\n\t\t\t\treference = uninitialisedGlobalVariables.get(value);\r\n\t\t\t\tif(reference!=null&&newVar.compatibleWith(reference)){\r\n\t\t\t\t\tVariable varToDeclare = vFactory.createVariable(true,isFinal,isArgument,reference.getType(),\r\n\t\t\t\t\t\t\tparent==null);\r\n\t\t\t\t\tscopeVariables.put(variableName, varToDeclare);//if it is, declare a new variable\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}//if value's type isn't compatible with type ,value isn't a reference or isn't a good one:\r\n\t\tthrow new IllegalDeclarationException();\r\n\r\n\t}", "@Override public void enterParam_decl_list(MicroParser.Param_decl_listContext ctx) {\n\t\tString txt = ctx.getText();\n\t\tif(txt.compareTo(\"\") != 0) {\n\t\t\tString [] vars = txt.split(\",\");\n\t\t\tArrayList<String> tdata = new ArrayList<String>();\n\n\t\t\tfor (int i = 0; i < vars.length ; i++) {\n\t\t\t\tString name = vars[i].split(\"INT|FLOAT\")[1];\n\t\t\t\tString type = vars[i].split(name)[0];\n\n\t\t\t\t//Add Tiny to IRList\n\t\t\t\ttdata.clear();\n\t\t\t\ttdata.add(name);\n\t\t\t\tthis.meIRL.add(new IRNode(tdata, \"var\"));\n\n\t\t\t\t//Add variable info to current scope's val\n\t\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\t\ttemp.add(name);\n\t\t\t\ttemp.add(type);\n\t\t\t\tArrayList<List<String>> stHash = st.varMap.get(st.scope);\n\t\t\t\tif(stHash == null){\n\t\t\t\t\tstHash = new ArrayList<List<String>>();\n\t\t\t\t}\n\t\t\t\tst.checkDeclError(name);\n\t\t\t\tstHash.add(temp);\n\t\t\t\tst.varMap.put(st.scope, stHash);\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void translateInputBindObjDeclaration() throws Exception {\n\t\tBaseUserLibraryTranslator translator = this.getTranslator();\n\t\tInputBind inputBind = createInputBind();\n\t\tST st = new ST(\"private Allocation <varIn>, <varOut>;\");\n\t\tst.add(\"varIn\", commonDefinitions.getVariableInName(inputBind.variable));\n\t\tst.add(\"varOut\",\n\t\t\t\tcommonDefinitions.getVariableOutName(inputBind.variable));\n\t\tString expectedTranslation = st.render();\n\t\tString translatedFunction = translator\n\t\t\t\t.translateObjDeclaration(inputBind);\n\t\tthis.validateTranslation(expectedTranslation, translatedFunction);\n\t}", "public VariableIF createVariable(VariableDecl decl);", "@Test\n\tpublic void testDeclaration(){\n\t\tVariable x = new Variable(\"x\");\n\t\tStatement decl = f.createDeclNode(x);\n\t\tassertEquals(decl.textRepresentation(), \"var x;\");\n\t\t\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tdecl.accept(v);\n\t\tassertEquals(\"declaration test1 fail\", v.numCount, 0);\n\t\tassertEquals(\"declaration test2 fail\", v.infixCount, 0);\n\t\tassertEquals(\"declaration test3 fail\", v.decCount, 1);\n\t\tassertEquals(\"declaration test4 fail\", v.seqCount, 0);\n\t\tassertEquals(\"declaration test5 fail\", v.assignCount, 0);\n\t\tassertEquals(\"declaration test6 fail\", v.varCount, 0);\n\t\tassertEquals(\"declaration test7 fail\", v.strCount, 0);\n\t\tassertEquals(\"declaration test8 fail\", v.prefixCount, 0);\n\n\t}", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "VarAssignment createVarAssignment();", "private void createInputVar(Activity activity, Element saElement,\n\t\t\tProcess process, DataInputUI sa) {\n\t\tString inputVarName = saElement.getAttribute(\n\t\t\t\tModelPackage.eINSTANCE.\n\t\t\t\tgetDataInputUI_InputVariable().getName());\n\t\tif (inputVarName!=null && !\"\".equals(inputVarName.trim())) {\n\t\t\tVariable[] vars = ModelHelper.getVisibleVariables(activity.getContainer());\n\t\t\t//Set<Variable> myVars = getMyVars(activity);\n\t\t\t//TODO deal with Scope Variables\n\t\t\tfor (Variable variable : process.getVariables().getChildren()) {\n\t\t\t\tif (inputVarName.equals(variable.getName())) {\n\t\t\t\t\tsa.setInputVariable(variable);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "DynamicVariable createDynamicVariable();", "public boolean isVariable() {\n return false;\n }", "@Override\r\n\tpublic void visit(VariableDeclaration variableDeclaration) {\n\r\n\t}", "boolean check (Env env) {\n if (Env.find (env, nameOfVar) != null) {\n return true;\n } else {\n System.err.println (\"Semantic error: The variable \\\"\" \n + nameOfVar + \"\\\" was used but was not declared!\");\n return false;\n }\n }", "public void makeDeclaration(Set done) {\n\t\tsuper.makeDeclaration(done);\n\t\tif (subBlocks[0] instanceof InstructionBlock)\n\t\t\t/*\n\t\t\t * An instruction block may declare a variable for us.\n\t\t\t */\n\t\t\t((InstructionBlock) subBlocks[0]).checkDeclaration(this.declare);\n\t}", "private boolean isInputValid() {\n return true;\n }", "@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}", "public VariableNotSetException(String msg) {\n super(msg);\n }", "public FormValidationScriptVisitor(List<FormAttribute> declaredAttributes) {\n declaredAttributes.forEach(attribute -> declaredVariables.put(attribute.getVariableName(), attribute.getDataType()));\n }", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "private static void createVars(JsProgram program, JsBlock block,\n Collection<JsStringLiteral> toCreate, Map<JsStringLiteral, JsName> names) {\n if (toCreate.size() > 0) {\n // Create the pool of variable names.\n JsVars vars = new JsVars(program.createSourceInfoSynthetic(\n JsStringInterner.class, \"Interned string pool\"));\n SourceInfo sourceInfo = program.createSourceInfoSynthetic(\n JsStringInterner.class, \"Interned string assignment\");\n for (JsStringLiteral literal : toCreate) {\n JsVar var = new JsVar(sourceInfo, names.get(literal));\n var.setInitExpr(literal);\n vars.add(var);\n }\n block.getStatements().add(0, vars);\n }\n }", "public static void notCreated(String s) {\r\n\t\tSystem.out.println(\"The array was not created.\\n\" + s + \" is not valid input.\");\r\n\t\tSystem.exit(1);\r\n\t\t\r\n\t}", "private static void validateInputArguments(String args[]) {\n\n\t\tif (args == null || args.length != 2) {\n\t\t\tthrow new InvalidParameterException(\"invalid Parameters\");\n\t\t}\n\n\t\tString dfaFileName = args[DFA_FILE_ARGS_INDEX];\n\t\tif (dfaFileName == null || dfaFileName.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid file name\");\n\t\t}\n\n\t\tString delimiter = args[DELIMITER_SYMBOL_ARGS_INDEX];\n\t\tif (delimiter == null || delimiter.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid delimiter symbol\");\n\t\t}\n\t}", "public final void checkHostVariable(int declaredLength) throws StandardException\n\t{\n\t\t// stream length checking occurs at the JDBC layer\n\t\tint variableLength = -1;\n if ( _blobValue != null ) { variableLength = -1; }\n\t\telse if (stream == null)\n\t\t{\n\t\t\tif (dataValue != null)\n\t\t\t\tvariableLength = dataValue.length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvariableLength = streamValueLength;\n\t\t}\n\n\t\tif (variableLength != -1 && variableLength > declaredLength)\n\t\t\t\tthrow StandardException.newException(SQLState.LANG_STRING_TRUNCATION, getTypeName(), \n\t\t\t\t\t\t\tMessageService.getTextMessage(\n\t\t\t\t\t\t\t\tMessageId.BINARY_DATA_HIDDEN),\n\t\t\t\t\t\t\tString.valueOf(declaredLength));\n\t}", "public static void verifyNotNull(String variableName, Object value, Class<?> owner) throws DiagnoseException {\r\n if (value == null)\r\n throw new DiagnoseException(owner.getName() + \" parameter [\" + variableName + \"] cannot be null.\");\r\n }", "final public void define() throws ParseException {\n String name=\"\";\n Long value;\n jj_consume_token(DEFINE);\n jj_consume_token(VARIABLE);\n name = token.image;\n jj_consume_token(NUMERO);\n try {\n value = Long.parseLong(token.image);\n }\n catch(Exception e) {\n {if (true) throw new ParseException(\"Una variable solo puede guardar numeros\");}\n }\n userVals.put(name, value);\n }", "private void checkVanillaForInitializers(VariableDeclarationListTree variables) {\n for (VariableDeclarationTree declaration : variables.declarations) {\n if (declaration.initializer == null) {\n maybeReportNoInitializer(variables.declarationType, declaration.lvalue);\n }\n }\n }", "private void dataToJS() {\n\t\tStringBuilder code = new StringBuilder();\n\t\tfor (int i = 0; i < tokens.size(); i++) {\n\t\t\tswitch (tokens.get(i)) {\n\t\t\tcase INPUT:\n\t\t\t\tboolean hasRead = false;\n\t\t\t\twhile (tokens.get(i+1) == VARIABLE_NAME || tokens.get(i+1) == COMMA) {\n\t\t\t\t\thasRead = true;\n\t\t\t\t\tif (tokens.get(i+1) == COMMA) {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (isReferenced(metadata.get(i+1))) {\n\t\t\t\t\t\tcode.append(metadata.get(i+1)+\" = Number.parseInt(prompt());\\n\");\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcode.append(\"var \"+metadata.get(i+1)+\" = Number.parseInt(prompt());\\n\");\n\t\t\t\t\t\tvarReferences.add(metadata.get(i+1));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!hasRead) outputAndThrow(new RuntimeException(\"Error: Expected variable identifier.\\n\"));\n\t\t\t\tbreak;\n\t\t\tcase OUTPUT:\n\t\t\t\ti++;\n\t\t\t\tif (tokens.get(i).isOutputable()) {\n\t\t\t\t\twhile (tokens.get(i).isOutputable()) {\n\t\t\t\t\t\tif (tokens.get(i) == COMMA) {\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\tif (i >= tokens.size()) break;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcode.append(\"alert(\");\n\t\t\t\t\t\ti = appendUntil(code, i, COMMA);\n\t\t\t\t\t\tcode.append(\");\\n\");\n\t\t\t\t\t\tif (i >= tokens.size()) break;\n\t\t\t\t\t}\n\t\t\t\t} else outputAndThrow(new RuntimeException(\"Error: Can only output variables, constants or expressions.\\n\"));\n\t\t\t\ti--;\n\t\t\t\tbreak;\n\t\t\tcase VARIABLE_NAME:\n\t\t\t\tif (i+1 >= tokens.size()) break;\n\t\t\t\tif (tokens.get(i+1) == ASSIGNMENT) {\n\t\t\t\t\tif (!varReferences.contains(metadata.get(i))) {\n\t\t\t\t\t\tcode.append(\"var \");\n\t\t\t\t\t\tvarReferences.add(metadata.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tcode.append(metadata.get(i)+\" = \");\n\t\t\t\t\ti += 2;\n\t\t\t\t\ti = appendUntil(code, i, LINE);\n\t\t\t\t\tcode.append(\";\\n\");\n\t\t\t\t} else outputAndThrow(new RuntimeException(\"Error: Expected assignment.\\n\"));\n\t\t\t\tbreak;\n\t\t\tcase IF:\n\t\t\t\tcode.append(\"if (\");\n\t\t\t\ti++;\n\t\t\t\ti = appendUntil(code, i, THEN);\n\t\t\t\tcode.append(\") {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase ELSE:\n\t\t\t\tcode.append(\"} else {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase FOR:\n\t\t\t\tcode.append(\"for (\");\n\t\t\t\tif (tokens.get(i+1) != VARIABLE_NAME && tokens.get(i+2) != ASSIGNMENT) outputAndThrow(new RuntimeException(\"Error: Expected iterator declartion.\\n\"));\n\t\t\t\tString itName = metadata.get(i+1);\n\t\t\t\tif (!varReferences.contains(itName)) varReferences.add(itName);\n\t\t\t\tcode.append(\"var \" + itName + \" = \");\n\t\t\t\ti += 3;\n\t\t\t\ti = appendUntil(code, i, COMMA);\n\t\t\t\ti++;\n\t\t\t\tcode.append(\"; \" + itName);\n\t\t\t\tStringBuilder tmp = new StringBuilder();\n\t\t\t\ti = appendUntil(tmp, i, COMMA);\n\t\t\t\ti++;\n\t\t\t\tStringBuilder perItOp = new StringBuilder();\n\t\t\t\ti = appendUntil(perItOp, i, EXECUTE);\n\t\t\t\tint num;\n\t\t\t\ttry {num = Integer.parseInt(perItOp.toString());}\n\t\t\t\tcatch (NumberFormatException e) {num = -1;}\n\t\t\t\tif (num >= 0) code.append(\" <= \" + tmp.toString() + \"; \" + itName + \"++\");\n\t\t\t\telse code.append(\" > \" + tmp.toString() + \"; \" + itName + \"--\");\n\t\t\t\tcode.append(\") {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase DO:\n\t\t\t\tcode.append(\"do {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase UNTIL:\n\t\t\t\tcode.append(\"} while (!(\");\n\t\t\t\ti++;\n\t\t\t\ti = appendUntil(code, i, LINE);\n\t\t\t\tcode.append(\"));\");\n\t\t\t\tbreak;\n\t\t\tcase WHILE:\n\t\t\t\tcode.append(\"while (\");\n\t\t\t\ti++;\n\t\t\t\ti = appendUntil(code, i, EXECUTE);\n\t\t\t\tcode.append(\") {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase END:\n\t\t\t\tcode.append(\"}\\n\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\toutput = code.toString();\n\t}", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM = 3 m\", \"0xA0182\");\r\n }", "@Test\n public void test098() throws Throwable {\n NumberInput numberInput0 = new NumberInput((Component) null, \"\", \"m\", \"m\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.param((CharSequence) \"m\", (CharSequence) \"\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public MType visit(VarDeclaration n, MType argu) {\n \t//如果f0对应的变量类型未被声明过,则报未定义错\n \tMType _ret = n.f0.accept(this, argu);\n \tif (_ret != null) {\n \t\tif (((MClasses) Mainclass.my_classes).getClassByName(_ret.getName()) == null)\n \t\t\tConsole.UndefinedClass(n.f1.f0.beginLine, _ret.getName());\n \t}\n \t\n\t return _ret;\n\t}", "boolean isVariable(Formula f);", "@Override\n public String visit(VariableDeclarator n, Object arg) {\n return null;\n }", "public void _checkVariables(int width, int height) {\r\n\t\tSystem.out.println(\"Hoehe: \" + height);\r\n\t\tSystem.out.println(\"Breite: \" + width);\r\n\t\tchar fruit = Fruit.getSymbol();\r\n\t\tchar wall = Wall.getSymbol();\r\n\t\tchar snake = Snake.getSymbol();\r\n\t\tSystem.out.println(\"fruit: \" + fruit);\r\n\t\tSystem.out.println(\"wall: \" + wall);\r\n\t\tSystem.out.println(\"snake: \" + snake);\r\n\t}", "<C, PM> Variable<C, PM> createVariable();", "public void typeCheck(/*@NotNull*/ ExpressionVisitor visitor) throws XPathException {\n Expression value = getSelectExpression();\n if (value != null) {\n value.checkForUpdatingSubexpressions();\n if (value.isUpdatingExpression()) {\n throw new XPathException(\n \"Initializing expression for global variable must not be an updating expression\", \"XUST0001\");\n }\n RoleDiagnostic role = new RoleDiagnostic(\n RoleDiagnostic.VARIABLE, getVariableQName().getDisplayName(), 0);\n ContextItemStaticInfo cit = new ContextItemStaticInfo(AnyItemType.getInstance(), true);\n Expression value2 = TypeChecker.strictTypeCheck(\n value.simplify().typeCheck(visitor, cit),\n getRequiredType(), role, visitor.getStaticContext());\n value2 = value2.optimize(visitor, cit);\n setSelectExpression(value2);\n // the value expression may declare local variables\n SlotManager map = getConfiguration().makeSlotManager();\n int slots = ExpressionTool.allocateSlots(value2, 0, map);\n if (slots > 0) {\n setContainsLocals(map);\n }\n\n if (getRequiredType() == SequenceType.ANY_SEQUENCE && !(this instanceof GlobalParam)) {\n // no type was declared; try to deduce a type from the value\n try {\n final ItemType itemType = value.getItemType();\n final int cardinality = value.getCardinality();\n setRequiredType(SequenceType.makeSequenceType(itemType, cardinality));\n GroundedValue constantValue = null;\n if (value2 instanceof Literal) {\n constantValue = ((Literal) value2).getValue();\n }\n for (BindingReference reference : references) {\n if (reference instanceof VariableReference) {\n ((VariableReference) reference).refineVariableType(\n itemType, cardinality, constantValue, value.getSpecialProperties());\n }\n }\n } catch (Exception err) {\n // exceptions can happen because references to variables and functions are still unbound\n }\n }\n\n\n }\n }", "public Object VisitInstanceVariableDef(ASTInstanceVariableDef variabledef)\n {\n //////System.out.println(\"VisitInstanceVariableDef()\");\n return CheckType(variabledef.type(), variabledef.arraydimension(), variabledef.line());\n }", "public static boolean isThirdArgumentValid(String input) {\n\t\tif (CommonUtils.isNotNullOrEmpty(input)\n\t\t\t\t&& (input.contains(Constants.TO_CONSTANT) || input.contains(Constants.IN_CONSTANT)))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public abstract Type typeCheck(SymbolTable stable) throws TypeCheckError;", "<C, PM> VariableExp<C, PM> createVariableExp();", "@Test\n public void variableNaming(){\n String $aString=\"bob\";\n float $owed=10f;\n int aMount=4;\n long Amount=5;\n String A0123456789bCd$f=\"ugh\";\n\n\n assertEquals(4,aMount);\n assertEquals(5,Amount);\n assertEquals(10.0F,$owed,0);\n assertEquals(\"bob\",$aString);\n assertEquals(\"ugh\",A0123456789bCd$f);\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M*=\\\"Hello\\\"\", \"0xA0178\");\r\n }", "Variable(String _var) {\n this._var = _var;\n }", "private void assertIsVar(SymObject object) {\n assertIsOfKind(object, SymObject.KIND_VAR,\n object.name + \" can't be resolved to a variable\");\n }", "@Test\r\n public void deriveFromOrAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M|=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH|=9\", \"(long,km^2/h)\");\r\n }", "public Variable(String name) {\r\n\tthis.name = name;\r\n }", "@Override\n\tprotected void isValid(String input) throws DataInputException\n\t{\n\t}", "public boolean validateInput() {\n/* 158 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "int isStructure(String[] h, int start) {\r\n\t\tfor (int i = start; i < h.length; i++) {\r\n\t\t\tif (openStatement(h[i]) == 0) {// if variable\r\n\t\t\t\ti++;\r\n\t\t\t\tif (i < (h.length - 1)) { // if not last input\r\n\t\t\t\t\tif (isSymbol(h[i]) == 0) { //\r\n\t\t\t\t\t\tSystem.out.println(h[i]);\r\n\t\t\t\t\t\terrorMsg = \"inncorrect structure\";\r\n\t\t\t\t\t\treturn 0; // will not run\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (i == (h.length - 1)) {// if last input\r\n\t\t\t\t\tif (isSymbol(h[i]) == 0) { // if not operand or ends on variable\r\n\t\t\t\t\t\tSystem.out.println(h[i]);\r\n\t\t\t\t\t\terrorMsg = \"unknown operand or ends on variable\";\r\n\t\t\t\t\t\treturn 0; // will not run\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (openStatement(h[i]) == 2) {\r\n\t\t\t\tSystem.out.println(h[i]);\r\n\t\t\t\terrorMsg = \"inncorrect structure\";\r\n\t\t\t\treturn 0; // will not run\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(h[i] + \" \" + h[i + 1]);\r\n\t\t\t\terrorMsg = \"cant have keywords side by side\";\r\n\t\t\t\treturn 0; // if not a variable will not run\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "public static Variable variable( String name )\n {\n NullArgumentException.validateNotNull( \"Variable name\", name );\n return new Variable( name );\n }", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_KMe2perHmSe4 = 3 mm/ks^3h^2\", \"0xA0182\");\r\n }", "private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {\n\t\tcreateImplicitVarValType(resource, acceptor, XtendVariableDeclaration.class,\n\t\t\tit -> it.getType(),\n\t\t\tit -> {\n\t\t\t\tLightweightTypeReference type = getLightweightType(it.getRight());\n\t\t\t\tif (type.isAny()) {\n\t\t\t\t\ttype = getTypeForVariableDeclaration(it.getRight());\n\t\t\t\t}\n\t\t\t\treturn type.getSimpleName();\n\t\t\t},\n\t\t\tit -> it.getRight(),\n\t\t\t() -> this.grammar.getXVariableDeclarationAccess().getRightAssignment_3_1());\n\t}", "private static void verifyArgs()\r\n\t{\r\n\t\tif(goFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GO file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(annotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input annotation file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(goSlimFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GOslim file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(slimAnnotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an output file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t}", "String getDeclare();", "@Test\r\n public void deriveFromAndAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M&=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH&=9\", \"(long,km^2/h)\");\r\n }", "public void validate () { throw new RuntimeException(); }", "public static ParameterExpression variable(Class type, String name) { throw Extensions.todo(); }", "private void checkAttributes() throws JellyTagException\n {\n if (getField() == null)\n {\n throw new MissingAttributeException(\"field\");\n }\n if (getVar() == null)\n {\n if (!(getParent() instanceof ValueSupport))\n {\n throw new JellyTagException(\n \"No target for the resolved value: \"\n + \"Specify the var attribute or place the tag \"\n + \"in the body of a ValueSupport tag.\");\n }\n }\n }", "private boolean isUnunsedVariable(final String message) {\n\t\treturn message.contains(\"Unused variable\"); //$NON-NLS-1$\n\t}", "private boolean isVariable(String refWord){\n\t\tif(refWord.charAt(0) == 'i' && Character.isDigit(refWord.charAt(1)))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\r\n\tpublic Object visitIdentExpression(IdentExpression identExpression,\r\n\t\t\tObject arg) throws Exception {\r\n\t\tString ident = identExpression.identToken.getText();\r\n\t\tDeclaration dec = symbolTable.lookup(ident);\r\n\t\tcheck(dec != null, \"undeclare IdentExpression\", identExpression);\r\n//\t\tDeclaration dec = symbolTable.lookup(ident);\r\n\t\tif (dec instanceof VarDec) {\r\n\t\t\tVarDec vd = (VarDec) dec;\r\n\t\t\tString identType = (String) vd.type.visit(this, arg);\r\n\t\t\tidentExpression.setType(identType);\r\n\t\t\treturn identType;\r\n\t\t} else {\r\n\t\t\tthrow new TypeCheckException(ident + \" is not defined as a variable\", identExpression);\r\n\t\t}\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tVariablePractice4 vp = new VariablePractice4();\n\t\tvp.inputString();\n\t\t\n\t}", "public abstract void scopeCorrectness() throws CodeException;", "@ParameterizedTest\n @ValueSource(strings = {\"Hello\", \"number1\", \"_underscore\", \"underscore_\", \"p.e.r.o.i.d.s\", \"\\\\Backslash\", \"Backslash\\\\\"})\n void testValid(String valid) throws IOException {\n try (Workbook wb = _testDataProvider.createWorkbook()) {\n Name name = wb.createName();\n assertDoesNotThrow(() -> name.setNameName(valid));\n }\n }", "public void var_decl(VarDeclList vd, Integer lg) {\n if (lexer.token == Symbol.FLOAT || lexer.token == Symbol.INT) {\n String temp = lexer.getStringValue();\n lexer.nextToken();\n IdList list = id_list(lg);\n ArrayList<Ident> iter = list.getIdList();\n \n //entra aqui se nenhuma variavel declarada em id_list já existe\n for(Ident x: iter){\n switch(lg) {\n case 1:\n symbolTable.putInGlobal(x.getName(), new Type(temp, false));\n break;\n case 2:\n symbolTable.putInLocal(x.getName(), temp);\n break;\n }\n }\n vd.addDecl(new VarDecl(temp, list));\n if (lexer.token != Symbol.SEMICOLON) {\n error.signal(\"Missing end of declaration at variable declaration\");\n }\n lexer.nextToken();\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 }" ]
[ "0.6438706", "0.6224057", "0.59217054", "0.58824486", "0.58127683", "0.5770632", "0.5738951", "0.5728532", "0.5728532", "0.5728379", "0.57255954", "0.5687568", "0.56278914", "0.5610816", "0.5590266", "0.5571233", "0.5541735", "0.5525055", "0.55241376", "0.5522616", "0.546371", "0.5442086", "0.53850263", "0.5383306", "0.5382266", "0.53657204", "0.53572285", "0.5355502", "0.532263", "0.53192604", "0.52986395", "0.5289117", "0.5283027", "0.52421826", "0.52048844", "0.5201189", "0.52006274", "0.5171193", "0.51662874", "0.5156888", "0.51531655", "0.5150396", "0.514283", "0.5137591", "0.513562", "0.51283807", "0.5121211", "0.51114774", "0.51052165", "0.51026213", "0.50982106", "0.50918496", "0.50888294", "0.5080148", "0.5066453", "0.5061723", "0.50567085", "0.503366", "0.50326174", "0.5028491", "0.50236917", "0.49977672", "0.4995593", "0.49940026", "0.49783558", "0.49697536", "0.49472582", "0.4932847", "0.49321413", "0.49296522", "0.4929624", "0.49211118", "0.4919", "0.4917785", "0.49108034", "0.4904862", "0.49045196", "0.4896294", "0.4895521", "0.48938477", "0.4887943", "0.48820463", "0.48804215", "0.486687", "0.4863841", "0.4863242", "0.48562664", "0.48555347", "0.4851367", "0.48460525", "0.48363763", "0.48358834", "0.48311576", "0.48277074", "0.4825895", "0.48198807", "0.48104548", "0.48077708", "0.48042196", "0.4797246", "0.47929725" ]
0.0
-1
The start of the definition of rules
@Override public Boolean visitStart(FormScriptGrammarParser.StartContext ctx) { return visitChildren(ctx); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\npublic void initRules(){\r\n\t\r\n}", "Rule createRule();", "Rule createRule();", "Rule createRule();", "public Rules getRules()\r\n {\r\n return rules;\r\n }", "String getRules();", "@Override\n public List getRules() {\n return rules;\n }", "public FlowRule() {\r\n }", "E9Rule createE9Rule();", "public AscendingRules() {}", "private RuleDefinition() {\r\n \tthis.id = null;\r\n \tthis.name = null;\r\n \tthis.namespace = null;\r\n this.description = null;\r\n \tthis.typeId = null;\r\n \tthis.propId = null;\r\n this.active = true;\r\n \tthis.proposition = null;\r\n \tthis.actions = null;\r\n \tthis.attributes = null;\r\n this.versionNumber = null;\r\n }", "@Override\r\n protected void initializeRules(List<AbstractValidationCheck> rules) {\n\r\n }", "public static void main(String[] args)\n {\n /*\n * Create a new loader with default factory.\n * \n * A factory will create all rule components when loader requires them\n * Default engine is used that creates all the default constructs in:\n * org.achacha.rules.compare\n * org.achacha.rules.condition\n * org.achacha.rules.action\n * \n * RulesEngineFactoryExtension can be used to extend a default factory while keeping existing constructs\n * for basic rules the default factory provides a wide variety of comparators and action elements\n * \n * The loader uses the factory to resolve where the rule parts are loaded from\n * There are several load types (file system, in-memory string, in-memory XML)\n * Here we will configure a simple in-memory string based loader and add the\n * conditions and actions from constants\n */\n RulesEngineLoaderImplMappedString loader = new RulesEngineLoaderImplMappedString(new RulesEngineFactory());\n \n // Add a simple rule and call it 'alwaysTrue', we will execute this rule using this name\n loader.addRule(\"alwaysTrue\", SIMPLE_RULE);\n \n /*\n * Create a rules engine that uses the loader and factory we just created\n * Normally these 3 objects would be someone retained so we don't have to re-parse the rules every execution\n * However this is a tutorial example\n */\n RulesEngine engine = new RulesEngine(loader);\n \n /////////////////////////// Everything above is initialization ///////////////////////////////////////\n \n /////////////////////////// Everything below is rule execution ///////////////////////////////////////\n /*\n * Now we need to have some input for the rule to process but since were are using constants in comparison we can just pass\n * an empty input model\n * \n * We use dom4j XML Element for input\n * \n * <request>\n * <input />\n * </request>\n */\n Element request = DocumentHelper.createElement(\"request\");\n request.addElement(\"input\");\n \n /*\n * RuleContext is an object that holds the input, output, event log, etc for a given rule execution\n * The engine can create a new context for us if we specify the input for the rule\n */\n RuleContext ruleContext = engine.createContext(request);\n \n /*\n * Now that we have set up our context we can execute the rule\n * Since we used addRule above and called this rule 'alwaysTrue', this is how we invoke this rule\n * \n * NOTE:\n * you can run multiple rules sequentially against the same context\n * some actions can modify input context and some conditions can check output context\n * so rules can depend on other rules\n */\n engine.execute(ruleContext, \"alwaysTrue\");\n \n /*\n * Display the output model\n * \n * Since the action we used is:\n * \n * <Action Operator='OutputValueSet'>\"\n * <Path>/result</Path>\"\n * <Value Source='Constant'><Data>yes</Data></Value>\"\n * </Action>\"\n * \n * We get the following output model:\n * <output><result>yes</result></output>\n * \n * NOTE: The path on the output action is always relative to the output element\n */\n System.out.println(\"Output Model\\n------------\");\n System.out.println(ruleContext.getOutputModel().asXML());\n }", "Rule getRule();", "public AccrualRule(){}", "E1Rule createE1Rule();", "public BNFrule()\n {\n lhs = \"\";\n rhsSymbols = new ArrayList<String>();\n }", "E4Rule createE4Rule();", "public RuleConfiguration() {\n\t\trule = new Rule();\n\t}", "@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}", "public void setRules(ArrayList<Rule> rules) {\n\t\tthis.rules = rules;\n\t}", "java.lang.String getRule();", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }" ]
[ "0.716117", "0.6842308", "0.6842308", "0.6842308", "0.6806792", "0.6753497", "0.673031", "0.67199415", "0.6698308", "0.6692289", "0.6640049", "0.6619587", "0.6569663", "0.6493521", "0.64896244", "0.64549977", "0.6414698", "0.63819015", "0.6365567", "0.63555366", "0.6318856", "0.628196", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306", "0.62712306" ]
0.0
-1
NOTE: there must be consistency between the DataType domain object names and the actual token names This is only so that the grammar also allows to declare the variables, in the context of the project, the User will never have to declare the variables because they were already defined in the attributes before defining the rules.
@Override public Boolean visitDeclaration(FormScriptGrammarParser.DeclarationContext ctx) { DataType dataType = DataType.valueOf(ctx.type.getText()); if (declaredVariables.get(ctx.name.getText()) != null) { // if variable already declared throw new IllegalArgumentException("Error at line: " + ctx.name.getLine() + ":" + ctx.name.getCharPositionInLine() + " variable " + ctx.name.getText() + " was already previously declared!"); // return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw } declaredVariables.put(ctx.name.getText(), dataType); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "VarsDeclRule createVarsDeclRule();", "public VariableToken(String text) {\n super(text);\n }", "public VariableNode(String attr)\n {\n this.name = attr;\n }", "public interface UATokenizerConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int WHITESPACE = 1;\n /** RegularExpression Id. */\n int CHAR = 5;\n /** RegularExpression Id. */\n int PICTURES = 6;\n /** RegularExpression Id. */\n int FILLERWORDS = 7;\n /** RegularExpression Id. */\n int THREELETTERWORDS = 8;\n /** RegularExpression Id. */\n int EMAIL = 9;\n /** RegularExpression Id. */\n int PRICES = 10;\n /** RegularExpression Id. */\n int DOMAIN = 11;\n /** RegularExpression Id. */\n int PHONE = 12;\n /** RegularExpression Id. */\n int PHONE2 = 13;\n /** RegularExpression Id. */\n int PHONE3 = 14;\n /** RegularExpression Id. */\n int WORD = 15;\n /** RegularExpression Id. */\n int HTML = 16;\n /** RegularExpression Id. */\n int HTML2 = 17;\n /** RegularExpression Id. */\n int HTMLCOMMENTS = 18;\n /** RegularExpression Id. */\n int NUMBER = 19;\n /** RegularExpression Id. */\n int TOPLEVELDOMAINS = 20;\n /** RegularExpression Id. */\n int SYMBOLS = 21;\n /** RegularExpression Id. */\n int OTHER = 22;\n /** RegularExpression Id. */\n int CHARACTERS = 23;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<CHAR>\",\n \"<PICTURES>\",\n \"<FILLERWORDS>\",\n \"<THREELETTERWORDS>\",\n \"<EMAIL>\",\n \"<PRICES>\",\n \"<DOMAIN>\",\n \"<PHONE>\",\n \"<PHONE2>\",\n \"<PHONE3>\",\n \"<WORD>\",\n \"<HTML>\",\n \"<HTML2>\",\n \"<HTMLCOMMENTS>\",\n \"<NUMBER>\",\n \"<TOPLEVELDOMAINS>\",\n \"<SYMBOLS>\",\n \"<OTHER>\",\n \"<CHARACTERS>\",\n };\n\n}", "@Override\n\tpublic Object visit(ASTPCGenSingleWord node, Object data)\n\t{\n\t\tFormulaSemantics semantics = (FormulaSemantics) data;\n\t\tif (node.jjtGetNumChildren() != 0)\n\t\t{\n\t\t\tFormulaSemanticsUtilities.setInvalid(semantics,\n\t\t\t\tgetInvalidCountReport(node, 0));\n\t\t\treturn semantics;\n\t\t}\n\t\tString varName = node.getText();\n\t\tFormatManager<?> formatManager =\n\t\t\t\tfm.getFactory().getVariableFormat(legalScope, varName);\n\t\tif (formatManager != null)\n\t\t{\n\t\t\tsemantics.setInfo(FormulaSemanticsUtilities.SEM_FORMAT,\n\t\t\t\tnew FormulaFormat(formatManager.getManagedClass()));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFormulaSemanticsUtilities.setInvalid(semantics, \"Variable: \"\n\t\t\t\t+ varName + \" was not found\");\n\t\t}\n\t\treturn semantics;\n\t}", "public FormValidationScriptVisitor(List<FormAttribute> declaredAttributes) {\n declaredAttributes.forEach(attribute -> declaredVariables.put(attribute.getVariableName(), attribute.getDataType()));\n }", "private ELOperandToken readVarToken() {\r\n \t\tfState = STATE_VAR;\r\n \t\tint endOfToken = index;\r\n \t\tint ch;\r\n \t\tint type = ELOperandToken.EL_PROPERTY_NAME_TOKEN;\r\n \t\twhile((ch = readCharBackward()) != -1) {\r\n \t\t\tif (!Character.isJavaIdentifierPart(ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t\t\t}\r\n \t\t}\r\n \t\treleaseChar();\r\n \t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t}", "private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {\n\t\tcreateImplicitVarValType(resource, acceptor, XtendVariableDeclaration.class,\n\t\t\tit -> it.getType(),\n\t\t\tit -> {\n\t\t\t\tLightweightTypeReference type = getLightweightType(it.getRight());\n\t\t\t\tif (type.isAny()) {\n\t\t\t\t\ttype = getTypeForVariableDeclaration(it.getRight());\n\t\t\t\t}\n\t\t\t\treturn type.getSimpleName();\n\t\t\t},\n\t\t\tit -> it.getRight(),\n\t\t\t() -> this.grammar.getXVariableDeclarationAccess().getRightAssignment_3_1());\n\t}", "public final EObject ruleVariableDeclaration() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_1_0=null;\n Token otherlv_2=null;\n EObject lv_type_0_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3266:28: ( ( ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:1: ( ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:1: ( ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:2: ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';'\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:2: ( (lv_type_0_0= ruleDataType ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3268:1: (lv_type_0_0= ruleDataType )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3268:1: (lv_type_0_0= ruleDataType )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3269:3: lv_type_0_0= ruleDataType\n {\n \n \t newCompositeNode(grammarAccess.getVariableDeclarationAccess().getTypeDataTypeParserRuleCall_0_0()); \n \t \n pushFollow(FOLLOW_ruleDataType_in_ruleVariableDeclaration7352);\n lv_type_0_0=ruleDataType();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getVariableDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"type\",\n \t\tlv_type_0_0, \n \t\t\"DataType\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3285:2: ( (lv_name_1_0= RULE_ID ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3286:1: (lv_name_1_0= RULE_ID )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3286:1: (lv_name_1_0= RULE_ID )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3287:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleVariableDeclaration7369); \n\n \t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getVariableDeclarationAccess().getNameIDTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getVariableDeclarationRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"name\",\n \t\tlv_name_1_0, \n \t\t\"ID\");\n \t \n\n }\n\n\n }\n\n otherlv_2=(Token)match(input,18,FOLLOW_18_in_ruleVariableDeclaration7386); \n\n \tnewLeafNode(otherlv_2, grammarAccess.getVariableDeclarationAccess().getSemicolonKeyword_2());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public interface LTLParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int KAS = 9;\n /** RegularExpression Id. */\n int KATE = 10;\n /** RegularExpression Id. */\n int KDATE = 11;\n /** RegularExpression Id. */\n int KEXISTS = 12;\n /** RegularExpression Id. */\n int KFORALL = 13;\n /** RegularExpression Id. */\n int KFORMULA = 14;\n /** RegularExpression Id. */\n int KIN = 15;\n /** RegularExpression Id. */\n int KNUMBER = 16;\n /** RegularExpression Id. */\n int KPI = 17;\n /** RegularExpression Id. */\n int KRENAME = 18;\n /** RegularExpression Id. */\n int KSET = 19;\n /** RegularExpression Id. */\n int KSTRING = 20;\n /** RegularExpression Id. */\n int KSUBFORMULA = 21;\n /** RegularExpression Id. */\n int INTEGER_LITERAL = 22;\n /** RegularExpression Id. */\n int REAL_LITERAL = 23;\n /** RegularExpression Id. */\n int EXPONENT = 24;\n /** RegularExpression Id. */\n int STRING_LITERAL = 25;\n /** RegularExpression Id. */\n int DESC_LITERAL = 26;\n /** RegularExpression Id. */\n int PIID = 27;\n /** RegularExpression Id. */\n int ATEID = 28;\n /** RegularExpression Id. */\n int ID = 29;\n /** RegularExpression Id. */\n int IDENTIFIER = 30;\n /** RegularExpression Id. */\n int STARTLETTER = 31;\n /** RegularExpression Id. */\n int LETTER = 32;\n /** RegularExpression Id. */\n int DIGIT = 33;\n /** RegularExpression Id. */\n int LPAREN = 34;\n /** RegularExpression Id. */\n int RPAREN = 35;\n /** RegularExpression Id. */\n int LBRACE = 36;\n /** RegularExpression Id. */\n int RBRACE = 37;\n /** RegularExpression Id. */\n int LBRACKET = 38;\n /** RegularExpression Id. */\n int RBRACKET = 39;\n /** RegularExpression Id. */\n int BAR = 40;\n /** RegularExpression Id. */\n int SEMICOLON = 41;\n /** RegularExpression Id. */\n int COMMA = 42;\n /** RegularExpression Id. */\n int DOT = 43;\n /** RegularExpression Id. */\n int COLON = 44;\n /** RegularExpression Id. */\n int ASSIGN = 45;\n /** RegularExpression Id. */\n int GT = 46;\n /** RegularExpression Id. */\n int LT = 47;\n /** RegularExpression Id. */\n int PNOT = 48;\n /** RegularExpression Id. */\n int SLASH = 49;\n /** RegularExpression Id. */\n int PLUS = 50;\n /** RegularExpression Id. */\n int MINUS = 51;\n /** RegularExpression Id. */\n int STAR = 52;\n /** RegularExpression Id. */\n int EQ = 53;\n /** RegularExpression Id. */\n int LE = 54;\n /** RegularExpression Id. */\n int GE = 55;\n /** RegularExpression Id. */\n int NE = 56;\n /** RegularExpression Id. */\n int REQ = 57;\n /** RegularExpression Id. */\n int POR = 58;\n /** RegularExpression Id. */\n int PAND = 59;\n /** RegularExpression Id. */\n int PIMPLIES = 60;\n /** RegularExpression Id. */\n int PBIIMPLIES = 61;\n /** RegularExpression Id. */\n int LALWAYS = 62;\n /** RegularExpression Id. */\n int LEVENTUALLY = 63;\n /** RegularExpression Id. */\n int LNEXTTIME = 64;\n /** RegularExpression Id. */\n int LUNTIL = 65;\n /** RegularExpression Id. */\n int URI = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_SINGLE_LINE_COMMENT = 1;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"#\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"<token of kind 8>\",\n \"\\\"as\\\"\",\n \"\\\"ate\\\"\",\n \"\\\"date\\\"\",\n \"\\\"exists\\\"\",\n \"\\\"forall\\\"\",\n \"\\\"formula\\\"\",\n \"\\\"in\\\"\",\n \"\\\"number\\\"\",\n \"\\\"pi\\\"\",\n \"\\\"rename\\\"\",\n \"\\\"set\\\"\",\n \"\\\"string\\\"\",\n \"\\\"subformula\\\"\",\n \"<INTEGER_LITERAL>\",\n \"<REAL_LITERAL>\",\n \"<EXPONENT>\",\n \"<STRING_LITERAL>\",\n \"<DESC_LITERAL>\",\n \"<PIID>\",\n \"<ATEID>\",\n \"<ID>\",\n \"<IDENTIFIER>\",\n \"<STARTLETTER>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\"|\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\":\\\"\",\n \"\\\":=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"!\\\"\",\n \"\\\"/\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"~=\\\"\",\n \"\\\"\\\\\\\\/\\\"\",\n \"\\\"/\\\\\\\\\\\"\",\n \"\\\"->\\\"\",\n \"\\\"<->\\\"\",\n \"\\\"[]\\\"\",\n \"\\\"<>\\\"\",\n \"\\\"_O\\\"\",\n \"\\\"_U\\\"\",\n \"<URI>\",\n };\n\n}", "VariableExp createVariableExp();", "public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException {\n boolean hasPropertyAgnosticType = false;\n EventType[] types = validationContext.getStreamTypeService().getEventTypes();\n for (int i = 0; i < validationContext.getStreamTypeService().getEventTypes().length; i++) {\n if (types[i] instanceof EventTypeSPI) {\n hasPropertyAgnosticType |= ((EventTypeSPI) types[i]).getMetadata().isPropertyAgnostic();\n }\n }\n\n if (!hasPropertyAgnosticType) {\n // the variable name should not overlap with a property name\n try {\n validationContext.getStreamTypeService().resolveByPropertyName(variableName, false);\n throw new ExprValidationException(\"The variable by name '\" + variableName + \"' is ambigous to a property of the same name\");\n } catch (DuplicatePropertyException e) {\n throw new ExprValidationException(\"The variable by name '\" + variableName + \"' is ambigous to a property of the same name\");\n } catch (PropertyNotFoundException e) {\n // expected\n }\n }\n\n VariableMetaData variableMetadata = validationContext.getVariableService().getVariableMetaData(variableName);\n if (variableMetadata == null) {\n throw new ExprValidationException(\"Failed to find variable by name '\" + variableName + \"'\");\n }\n isPrimitive = variableMetadata.getEventType() == null;\n variableType = variableMetadata.getType();\n if (optSubPropName != null) {\n if (variableMetadata.getEventType() == null) {\n throw new ExprValidationException(\"Property '\" + optSubPropName + \"' is not valid for variable '\" + variableName + \"'\");\n }\n eventTypeGetter = ((EventTypeSPI) variableMetadata.getEventType()).getGetterSPI(optSubPropName);\n if (eventTypeGetter == null) {\n throw new ExprValidationException(\"Property '\" + optSubPropName + \"' is not valid for variable '\" + variableName + \"'\");\n }\n variableType = variableMetadata.getEventType().getPropertyType(optSubPropName);\n }\n\n readersPerCp = validationContext.getVariableService().getReadersPerCP(variableName);\n if (variableMetadata.getContextPartitionName() == null) {\n readerNonCP = readersPerCp.get(EPStatementStartMethod.DEFAULT_AGENT_INSTANCE_ID);\n }\n variableType = JavaClassHelper.getBoxedType(variableType);\n return null;\n }", "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 Variable(String name){\n this.name = name;\n }", "public VariableNode(String name) {\n\t\tthis.name = name;\n\t}", "public Variable(String name) {\r\n\tthis.name = name;\r\n }", "public ActRuVariable() {\n this(DSL.name(\"act_ru_variable\"), null);\n }", "@Override\n public int[] getRequiredTokens() {\n return new int[] {\n TokenTypes.VARIABLE_DEF,\n };\n }", "@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }", "@Override\n public Boolean visitVariableAttribution(FormScriptGrammarParser.VariableAttributionContext ctx) {\n if (!declaredVariables.containsKey(ctx.VARIABLE().getText())) {\n // this is validated in UI/controlled by flow in the UI so should never happen, but it remains here just in case\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \": variable \" + ctx.VARIABLE().getText() + \" wasn't declared!\");\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n DataType dataType = declaredVariables.get(ctx.VARIABLE().getText());\n boolean correctType = dataType.lexerValue().equals(ctx.value().start.getType());\n /*will verify if the attribution is actually semantically valid, e.g if\n the variable was defined as an INTEGER, it can't be assigned a DATE*/\n if (!correctType) {\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \":\" + ctx.getStart().getCharPositionInLine()\n + \": Invalid attribution type!\" + \" variable \" + ctx.VARIABLE().getText() + \" can't be assigned the value \" + ctx.value().getText());\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n //verify if operators are valid in the context of the datatype\n String operator = ctx.COMPARISON_OPERATORS().getText();\n if (operator.equals(\"<\") || operator.equals(\">\")) {\n if (dataType.equals(DataType.BOOLEAN) || dataType.equals(DataType.DATE) || dataType.equals(DataType.FILE)) {\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \":\" + ctx.getStart().getCharPositionInLine()\n + \": Invalid comparison type!\" + \" variable \" + ctx.VARIABLE().getText() + \" can't be compared with operator '\" + operator + \"'\");\n }\n }\n return true;\n }", "@Override\r\n\tpublic void visit(VariableDeclaration variableDeclaration) {\n\r\n\t}", "public interface TypeScriptParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int DIGIT = 6;\n /** RegularExpression Id. */\n int ONE_TO_NINE = 7;\n /** RegularExpression Id. */\n int LETTER = 8;\n /** RegularExpression Id. */\n int SPACE = 9;\n /** RegularExpression Id. */\n int VAR = 10;\n /** RegularExpression Id. */\n int IF = 11;\n /** RegularExpression Id. */\n int ELSE_IF = 12;\n /** RegularExpression Id. */\n int ELSE = 13;\n /** RegularExpression Id. */\n int FUNCTION = 14;\n /** RegularExpression Id. */\n int BOOLEAN = 15;\n /** RegularExpression Id. */\n int NUMBER = 16;\n /** RegularExpression Id. */\n int STRING = 17;\n /** RegularExpression Id. */\n int ENUM = 18;\n /** RegularExpression Id. */\n int INTERFACE = 19;\n /** RegularExpression Id. */\n int RETURN = 20;\n /** RegularExpression Id. */\n int VOID = 21;\n /** RegularExpression Id. */\n int WHILE = 22;\n /** RegularExpression Id. */\n int PRINTLN = 23;\n /** RegularExpression Id. */\n int TRUE = 24;\n /** RegularExpression Id. */\n int FALSE = 25;\n /** RegularExpression Id. */\n int NOT = 26;\n /** RegularExpression Id. */\n int AMPRSAND = 27;\n /** RegularExpression Id. */\n int MUL = 28;\n /** RegularExpression Id. */\n int MINUS = 29;\n /** RegularExpression Id. */\n int PLUS = 30;\n /** RegularExpression Id. */\n int EQ = 31;\n /** RegularExpression Id. */\n int BAR = 32;\n /** RegularExpression Id. */\n int DIV = 33;\n /** RegularExpression Id. */\n int COLON = 34;\n /** RegularExpression Id. */\n int SEMICOLON = 35;\n /** RegularExpression Id. */\n int QM = 36;\n /** RegularExpression Id. */\n int COMMA = 37;\n /** RegularExpression Id. */\n int DOT = 38;\n /** RegularExpression Id. */\n int SINGLE_QUOTE = 39;\n /** RegularExpression Id. */\n int QUOTE = 40;\n /** RegularExpression Id. */\n int LEFT_PARAN = 41;\n /** RegularExpression Id. */\n int RIGHT_PARAN = 42;\n /** RegularExpression Id. */\n int LEFT_BRAKET = 43;\n /** RegularExpression Id. */\n int RIGHT_BRAKET = 44;\n /** RegularExpression Id. */\n int LEFT_BRACE = 45;\n /** RegularExpression Id. */\n int RIGHT_BRACE = 46;\n /** RegularExpression Id. */\n int UNDER_SCORE = 47;\n /** RegularExpression Id. */\n int LT = 48;\n /** RegularExpression Id. */\n int GT = 49;\n /** RegularExpression Id. */\n int LE = 50;\n /** RegularExpression Id. */\n int GE = 51;\n /** RegularExpression Id. */\n int DOUBLE_EQ = 52;\n /** RegularExpression Id. */\n int OR = 53;\n /** RegularExpression Id. */\n int AND = 54;\n /** RegularExpression Id. */\n int NOT_EQ = 55;\n /** RegularExpression Id. */\n int MATH_OP = 56;\n /** RegularExpression Id. */\n int STRING_LITERAL = 57;\n /** RegularExpression Id. */\n int IDENTIFIER = 58;\n /** RegularExpression Id. */\n int NUM = 59;\n /** RegularExpression Id. */\n int INTEGER = 60;\n /** RegularExpression Id. */\n int REAL = 61;\n /** RegularExpression Id. */\n int SIGN = 62;\n /** RegularExpression Id. */\n int ERROR = 63;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"<DIGIT>\",\n \"<ONE_TO_NINE>\",\n \"<LETTER>\",\n \"<SPACE>\",\n \"\\\"var\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"function\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"number\\\"\",\n \"\\\"char\\\"\",\n \"\\\"enum\\\"\",\n \"\\\"interface\\\"\",\n \"\\\"return\\\"\",\n \"\\\"void\\\"\",\n \"\\\"while\\\"\",\n \"\\\"println\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"!\\\"\",\n \"\\\"&\\\"\",\n \"\\\"*\\\"\",\n \"\\\"-\\\"\",\n \"\\\"+\\\"\",\n \"\\\"=\\\"\",\n \"\\\"|\\\"\",\n \"\\\"/\\\"\",\n \"\\\":\\\"\",\n \"\\\";\\\"\",\n \"\\\"?\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\"\\\\\\'\\\"\",\n \"\\\"\\\\\\\"\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"_\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"||\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"!=\\\"\",\n \"<MATH_OP>\",\n \"<STRING_LITERAL>\",\n \"<IDENTIFIER>\",\n \"<NUM>\",\n \"<INTEGER>\",\n \"<REAL>\",\n \"\\\"\\\"\",\n \"<ERROR>\",\n };\n\n}", "public interface GrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int FORMAL_COMMENT = 8;\n /** RegularExpression Id. */\n int MULTI_LINE_COMMENT = 9;\n /** RegularExpression Id. */\n int PLUS = 11;\n /** RegularExpression Id. */\n int MINUS = 12;\n /** RegularExpression Id. */\n int MULTIPLY = 13;\n /** RegularExpression Id. */\n int DIVIDE = 14;\n /** RegularExpression Id. */\n int MOD = 15;\n /** RegularExpression Id. */\n int UBANG = 16;\n /** RegularExpression Id. */\n int LESS_OP = 17;\n /** RegularExpression Id. */\n int MORE_OP = 18;\n /** RegularExpression Id. */\n int WHILE = 19;\n /** RegularExpression Id. */\n int IF = 20;\n /** RegularExpression Id. */\n int ELSE = 21;\n /** RegularExpression Id. */\n int BREAK = 22;\n /** RegularExpression Id. */\n int RETURN = 23;\n /** RegularExpression Id. */\n int CONTINUE = 24;\n /** RegularExpression Id. */\n int ID = 25;\n /** RegularExpression Id. */\n int LETTER = 26;\n /** RegularExpression Id. */\n int INT = 27;\n /** RegularExpression Id. */\n int SEMICOLON = 28;\n /** RegularExpression Id. */\n int LPAREN = 29;\n /** RegularExpression Id. */\n int RPAREN = 30;\n /** RegularExpression Id. */\n int LBRACKET = 31;\n /** RegularExpression Id. */\n int RBRACKET = 32;\n /** RegularExpression Id. */\n int EQUAL = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_FORMAL_COMMENT = 1;\n /** Lexical state. */\n int IN_MULTI_LINE_COMMENT = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"\\\"/*\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\"while\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"break\\\"\",\n \"\\\"return\\\"\",\n \"\\\"continue\\\"\",\n \"<ID>\",\n \"<LETTER>\",\n \"<INT>\",\n \"\\\";\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"=\\\"\",\n \"\\\"?\\\"\",\n \"\\\":\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"\\\"==\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n };\n\n}", "String getVariableDefinition();", "public interface LuaTokenTypes extends LuaDocElementTypes {\n //IFileElementType FILE = new IFileElementType(Language.findInstance(LuaLanguage.class));\n /**\n * Wrong token. Use for debugger needs\n */\n IElementType WRONG = TokenType.BAD_CHARACTER;\n\n\n /* **************************************************************************************************\n * Whitespaces & NewLines\n * ****************************************************************************************************/\n\n IElementType NL_BEFORE_LONGSTRING = new LuaElementType(\"newline after longstring stert bracket\");\n IElementType WS = TokenType.WHITE_SPACE;\n IElementType NEWLINE = new LuaElementType(\"new line\");\n\n TokenSet WHITE_SPACES_SET = TokenSet.create(WS, NEWLINE, TokenType.WHITE_SPACE, LDOC_WHITESPACE, NL_BEFORE_LONGSTRING);\n\n /* **************************************************************************************************\n * Comments\n * ****************************************************************************************************/\n\n IElementType SHEBANG = new LuaElementType(\"shebang - should ignore\");\n\n IElementType LONGCOMMENT = new LuaElementType(\"long comment\");\n IElementType SHORTCOMMENT = new LuaElementType(\"short comment\");\n\n IElementType LONGCOMMENT_BEGIN = new LuaElementType(\"long comment start bracket\");\n IElementType LONGCOMMENT_END = new LuaElementType(\"long comment end bracket\");\n\n TokenSet COMMENT_SET = TokenSet.create(SHORTCOMMENT, LONGCOMMENT, SHEBANG, LUADOC_COMMENT, LONGCOMMENT_BEGIN,\n LONGCOMMENT_END);\n\n TokenSet COMMENT_AND_WHITESPACE_SET = TokenSet.orSet(COMMENT_SET, WHITE_SPACES_SET);\n /* **************************************************************************************************\n * Identifiers\n * ****************************************************************************************************/\n\n IElementType NAME = new LuaElementType(\"identifier\");\n\n /* **************************************************************************************************\n * Integers & floats\n * ****************************************************************************************************/\n\n IElementType NUMBER = new LuaElementType(\"number\");\n\n /* **************************************************************************************************\n * Strings & regular expressions\n * ****************************************************************************************************/\n\n IElementType STRING = new LuaElementType(\"string\");\n IElementType LONGSTRING = new LuaElementType(\"long string\");\n\n IElementType LONGSTRING_BEGIN = new LuaElementType(\"long string start bracket\");\n IElementType LONGSTRING_END = new LuaElementType(\"long string end bracket\");\n\n\n\n TokenSet STRING_LITERAL_SET = TokenSet.create(STRING, LONGSTRING, LONGSTRING_BEGIN, LONGSTRING_END);\n\n\n IElementType UNTERMINATED_STRING = new LuaElementType(\"unterminated string\");\n\n\n /* **************************************************************************************************\n * Common tokens: operators, braces etc.\n * ****************************************************************************************************/\n\n\n IElementType DIV = new LuaElementType(\"/\");\n IElementType MULT = new LuaElementType(\"*\");\n IElementType LPAREN = new LuaElementType(\"(\");\n IElementType RPAREN = new LuaElementType(\")\");\n IElementType LBRACK = new LuaElementType(\"[\");\n IElementType RBRACK = new LuaElementType(\"]\");\n IElementType LCURLY = new LuaElementType(\"{\");\n IElementType RCURLY = new LuaElementType(\"}\");\n IElementType COLON = new LuaElementType(\":\");\n IElementType COMMA = new LuaElementType(\",\");\n IElementType DOT = new LuaElementType(\".\");\n IElementType ASSIGN = new LuaElementType(\"=\");\n IElementType SEMI = new LuaElementType(\";\");\n IElementType EQ = new LuaElementType(\"==\");\n IElementType NE = new LuaElementType(\"~=\");\n IElementType PLUS = new LuaElementType(\"+\");\n IElementType MINUS = new LuaElementType(\"-\");\n IElementType GE = new LuaElementType(\">=\");\n IElementType GT = new LuaElementType(\">\");\n IElementType EXP = new LuaElementType(\"^\");\n IElementType LE = new LuaElementType(\"<=\");\n IElementType LT = new LuaElementType(\"<\");\n IElementType ELLIPSIS = new LuaElementType(\"...\");\n IElementType CONCAT = new LuaElementType(\"..\");\n IElementType GETN = new LuaElementType(\"#\");\n IElementType MOD = new LuaElementType(\"%\");\n\n /* **************************************************************************************************\n * Keywords\n * ****************************************************************************************************/\n\n\n IElementType IF = new LuaElementType(\"if\");\n IElementType ELSE = new LuaElementType(\"else\");\n IElementType ELSEIF = new LuaElementType(\"elseif\");\n IElementType WHILE = new LuaElementType(\"while\");\n IElementType WITH = new LuaElementType(\"with\");\n\n IElementType THEN = new LuaElementType(\"then\");\n IElementType FOR = new LuaElementType(\"for\");\n IElementType IN = new LuaElementType(\"in\");\n IElementType RETURN = new LuaElementType(\"return\");\n IElementType BREAK = new LuaElementType(\"break\");\n\n IElementType CONTINUE = new LuaElementType(\"continue\");\n IElementType TRUE = new LuaElementType(\"true\");\n IElementType FALSE = new LuaElementType(\"false\");\n IElementType NIL = new LuaElementType(\"nil\");\n IElementType FUNCTION = new LuaElementType(\"function\");\n\n IElementType DO = new LuaElementType(\"do\");\n IElementType NOT = new LuaElementType(\"not\");\n IElementType AND = new LuaElementType(\"and\");\n IElementType OR = new LuaElementType(\"or\");\n IElementType LOCAL = new LuaElementType(\"local\");\n\n IElementType REPEAT = new LuaElementType(\"repeat\");\n IElementType UNTIL = new LuaElementType(\"until\");\n IElementType END = new LuaElementType(\"end\");\n\n /*\n IElementType MODULE = new LuaElementType(\"module\");\n IElementType REQUIRE = new LuaElementType(\"require\");\n */\n\n\n\n TokenSet KEYWORDS = TokenSet.create(DO, FUNCTION, NOT, AND, OR,\n WITH, IF, THEN, ELSEIF, THEN, ELSE,\n WHILE, FOR, IN, RETURN, BREAK,\n CONTINUE, LOCAL,\n REPEAT, UNTIL, END/*, MODULE, REQUIRE */);\n\n TokenSet BRACES = TokenSet.create(LCURLY, RCURLY);\n TokenSet PARENS = TokenSet.create(LPAREN, RPAREN);\n TokenSet BRACKS = TokenSet.create(LBRACK, RBRACK);\n\n TokenSet BAD_INPUT = TokenSet.create(WRONG, UNTERMINATED_STRING);\n \n TokenSet DEFINED_CONSTANTS = TokenSet.create(NIL, TRUE, FALSE);\n\n TokenSet UNARY_OP_SET = TokenSet.create(MINUS, GETN);\n\n TokenSet BINARY_OP_SET = TokenSet.create(\n MINUS, PLUS, DIV, MULT, EXP, MOD,\n CONCAT);\n\n TokenSet BLOCK_OPEN_SET = TokenSet.create(THEN, RPAREN, DO, ELSE, ELSEIF);\n TokenSet BLOCK_CLOSE_SET = TokenSet.create(END, ELSE, ELSEIF, UNTIL);\n\n TokenSet COMPARE_OPS = TokenSet.create(EQ, GE, GT, LT, LE, NE);\n TokenSet LOGICAL_OPS = TokenSet.create(AND, OR, NOT);\n TokenSet ARITHMETIC_OPS = TokenSet.create(MINUS, PLUS, DIV, EXP, MOD);\n\n TokenSet TABLE_ACCESS = TokenSet.create(DOT, COLON, LBRACK);\n\n TokenSet LITERALS_SET = TokenSet.create(NUMBER, NIL, TRUE, FALSE, STRING, LONGSTRING, LONGSTRING_BEGIN, LONGSTRING_END);\n\n TokenSet IDENTIFIERS_SET = TokenSet.create(NAME);\n\n TokenSet WHITE_SPACES_OR_COMMENTS = TokenSet.orSet(WHITE_SPACES_SET, COMMENT_SET);\n\n TokenSet OPERATORS_SET = TokenSet.orSet(BINARY_OP_SET, UNARY_OP_SET, COMPARE_OPS, TokenSet.create(ASSIGN));\n}", "Variable(String _var) {\n this._var = _var;\n }", "public interface JavaGrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int PLUS = 5;\n /** RegularExpression Id. */\n int MINUS = 6;\n /** RegularExpression Id. */\n int MULTIPLY = 7;\n /** RegularExpression Id. */\n int DIVIDE = 8;\n /** RegularExpression Id. */\n int OPEN_PARENTHESIS = 9;\n /** RegularExpression Id. */\n int CLOSED_PARENTHESIS = 10;\n /** RegularExpression Id. */\n int OPEN_BRACKET = 11;\n /** RegularExpression Id. */\n int CLOSED_BRACKET = 12;\n /** RegularExpression Id. */\n int OPEN_BRACE = 13;\n /** RegularExpression Id. */\n int CLOSED_BRACE = 14;\n /** RegularExpression Id. */\n int SEMICOLON = 15;\n /** RegularExpression Id. */\n int EQUALS = 16;\n /** RegularExpression Id. */\n int COMPARISON = 17;\n /** RegularExpression Id. */\n int LESS = 18;\n /** RegularExpression Id. */\n int GREATER = 19;\n /** RegularExpression Id. */\n int NUMBER = 20;\n /** RegularExpression Id. */\n int DIGIT = 21;\n /** RegularExpression Id. */\n int LETTER = 22;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"<COMPARISON>\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"<NUMBER>\",\n \"<DIGIT>\",\n \"<LETTER>\",\n \"\\\"new\\\"\",\n \"\\\",\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"\\\\\\\"\\\"\",\n \"\\\"for\\\"\",\n \"\\\"int\\\"\",\n \"\\\"++\\\"\",\n \"\\\"--\\\"\",\n };\n\n}", "public interface InputParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int TRUE = 5;\n /** RegularExpression Id. */\n int FALSE = 6;\n /** RegularExpression Id. */\n int NOT = 7;\n /** RegularExpression Id. */\n int INTEGER = 8;\n /** RegularExpression Id. */\n int STRING = 9;\n /** RegularExpression Id. */\n int CHARACTER = 10;\n /** RegularExpression Id. */\n int BOOLEAN = 11;\n /** RegularExpression Id. */\n int ASTERIX = 12;\n /** RegularExpression Id. */\n int COLON = 13;\n /** RegularExpression Id. */\n int ADT = 14;\n /** RegularExpression Id. */\n int SIGNATURES = 15;\n /** RegularExpression Id. */\n int EQUATIONS = 16;\n /** RegularExpression Id. */\n int PLUS = 17;\n /** RegularExpression Id. */\n int MINUS = 18;\n /** RegularExpression Id. */\n int ARROW = 19;\n /** RegularExpression Id. */\n int LESS_THAN = 20;\n /** RegularExpression Id. */\n int EQUALS = 21;\n /** RegularExpression Id. */\n int GREATER_THAN = 22;\n /** RegularExpression Id. */\n int HEX_ESCAPE = 23;\n /** RegularExpression Id. */\n int LEFT_PAREN = 24;\n /** RegularExpression Id. */\n int RIGHT_PAREN = 25;\n /** RegularExpression Id. */\n int UINT10 = 26;\n /** RegularExpression Id. */\n int ND = 27;\n /** RegularExpression Id. */\n int MC = 28;\n /** RegularExpression Id. */\n int ME = 29;\n /** RegularExpression Id. */\n int LU = 30;\n /** RegularExpression Id. */\n int LL = 31;\n /** RegularExpression Id. */\n int LT = 32;\n /** RegularExpression Id. */\n int LM = 33;\n /** RegularExpression Id. */\n int LO = 34;\n /** RegularExpression Id. */\n int MN = 35;\n /** RegularExpression Id. */\n int NL = 36;\n /** RegularExpression Id. */\n int NO = 37;\n /** RegularExpression Id. */\n int PD = 38;\n /** RegularExpression Id. */\n int PC = 39;\n /** RegularExpression Id. */\n int PO = 40;\n /** RegularExpression Id. */\n int SC = 41;\n /** RegularExpression Id. */\n int SM = 42;\n /** RegularExpression Id. */\n int SK = 43;\n /** RegularExpression Id. */\n int SO = 44;\n /** RegularExpression Id. */\n int CO = 45;\n /** RegularExpression Id. */\n int ID = 46;\n /** RegularExpression Id. */\n int PECULIAR_ID = 47;\n /** RegularExpression Id. */\n int INITIAL = 48;\n /** RegularExpression Id. */\n int SPECIAL_INITIAL = 49;\n /** RegularExpression Id. */\n int CONSTITUENT = 50;\n /** RegularExpression Id. */\n int SUBSEQUENT = 51;\n /** RegularExpression Id. */\n int SPECIAL_SUBSEQUENT = 52;\n /** RegularExpression Id. */\n int INLINE_HEX_ESCAPE = 53;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"#t\\\"\",\n \"\\\"#f\\\"\",\n \"\\\"not\\\"\",\n \"\\\"int\\\"\",\n \"\\\"string\\\"\",\n \"\\\"character\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"*\\\"\",\n \"\\\":\\\"\",\n \"\\\"ADT:\\\"\",\n \"\\\"Signatures:\\\"\",\n \"\\\"Equations:\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"->\\\"\",\n \"\\\"<\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"\\\\\\\\x\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"<UINT10>\",\n \"<ND>\",\n \"<MC>\",\n \"<ME>\",\n \"<LU>\",\n \"<LL>\",\n \"<LT>\",\n \"<LM>\",\n \"<LO>\",\n \"<MN>\",\n \"<NL>\",\n \"<NO>\",\n \"<PD>\",\n \"<PC>\",\n \"<PO>\",\n \"<SC>\",\n \"<SM>\",\n \"<SK>\",\n \"<SO>\",\n \"<CO>\",\n \"<ID>\",\n \"<PECULIAR_ID>\",\n \"<INITIAL>\",\n \"<SPECIAL_INITIAL>\",\n \"<CONSTITUENT>\",\n \"<SUBSEQUENT>\",\n \"<SPECIAL_SUBSEQUENT>\",\n \"<INLINE_HEX_ESCAPE>\",\n };\n\n}", "@Override public void enterParam_decl_list(MicroParser.Param_decl_listContext ctx) {\n\t\tString txt = ctx.getText();\n\t\tif(txt.compareTo(\"\") != 0) {\n\t\t\tString [] vars = txt.split(\",\");\n\t\t\tArrayList<String> tdata = new ArrayList<String>();\n\n\t\t\tfor (int i = 0; i < vars.length ; i++) {\n\t\t\t\tString name = vars[i].split(\"INT|FLOAT\")[1];\n\t\t\t\tString type = vars[i].split(name)[0];\n\n\t\t\t\t//Add Tiny to IRList\n\t\t\t\ttdata.clear();\n\t\t\t\ttdata.add(name);\n\t\t\t\tthis.meIRL.add(new IRNode(tdata, \"var\"));\n\n\t\t\t\t//Add variable info to current scope's val\n\t\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\t\ttemp.add(name);\n\t\t\t\ttemp.add(type);\n\t\t\t\tArrayList<List<String>> stHash = st.varMap.get(st.scope);\n\t\t\t\tif(stHash == null){\n\t\t\t\t\tstHash = new ArrayList<List<String>>();\n\t\t\t\t}\n\t\t\t\tst.checkDeclError(name);\n\t\t\t\tstHash.add(temp);\n\t\t\t\tst.varMap.put(st.scope, stHash);\n\t\t\t}\n\t\t}\n\t}", "VariableDeclaration createVariableDeclaration();", "public interface ParserMASConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int SINGLE_LINE_COMMENT = 9;\r\n /** RegularExpression Id. */\r\n int FORMAL_COMMENT = 10;\r\n /** RegularExpression Id. */\r\n int MULTI_LINE_COMMENT = 11;\r\n /** RegularExpression Id. */\r\n int COLON = 13;\r\n /** RegularExpression Id. */\r\n int AT = 14;\r\n /** RegularExpression Id. */\r\n int COMMA = 15;\r\n /** RegularExpression Id. */\r\n int NRAGENTS = 16;\r\n /** RegularExpression Id. */\r\n int IDENTIFIER = 17;\r\n /** RegularExpression Id. */\r\n int FILENAME = 18;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n /** Lexical state. */\r\n int IN_SINGLE_LINE_COMMENT = 1;\r\n /** Lexical state. */\r\n int IN_FORMAL_COMMENT = 2;\r\n /** Lexical state. */\r\n int IN_MULTI_LINE_COMMENT = 3;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"%\\\"\",\r\n \"\\\"//\\\"\",\r\n \"<token of kind 7>\",\r\n \"\\\"/*\\\"\",\r\n \"<SINGLE_LINE_COMMENT>\",\r\n \"\\\"*/\\\"\",\r\n \"\\\"*/\\\"\",\r\n \"<token of kind 12>\",\r\n \"\\\":\\\"\",\r\n \"\\\"@\\\"\",\r\n \"\\\",\\\"\",\r\n \"<NRAGENTS>\",\r\n \"<IDENTIFIER>\",\r\n \"<FILENAME>\",\r\n };\r\n\r\n}", "@Override\n public VariableInfo[] getVariableInfo( TagData data ) {\n // loop through and expose all attributes\n List<VariableInfo> vars = new ArrayList<VariableInfo>();\n\n try {\n String clazz = data.getAttributeString( \"className\" );\n\n if ( clazz == null ) {\n clazz = Constants.class.getName();\n }\n\n Class<?> c = Class.forName( clazz );\n\n // if no var specified, get all\n if ( data.getAttributeString( \"var\" ) == null ) {\n Field[] fields = c.getDeclaredFields();\n\n AccessibleObject.setAccessible( fields, true );\n\n for ( int i = 0; i < fields.length; i++ ) {\n vars.add( new VariableInfo( fields[i].getName(), \"java.lang.String\", true, VariableInfo.AT_END ) );\n }\n } else {\n String var = data.getAttributeString( \"var\" );\n vars.add( new VariableInfo( c.getField( var ).getName(), \"java.lang.String\", true, VariableInfo.AT_END ) );\n }\n } catch ( Exception cnf ) {\n log.error( cnf.getMessage() );\n cnf.printStackTrace();\n }\n\n return vars.toArray( new VariableInfo[] {} );\n }", "Variables createVariables();", "private void dataToJS() {\n\t\tStringBuilder code = new StringBuilder();\n\t\tfor (int i = 0; i < tokens.size(); i++) {\n\t\t\tswitch (tokens.get(i)) {\n\t\t\tcase INPUT:\n\t\t\t\tboolean hasRead = false;\n\t\t\t\twhile (tokens.get(i+1) == VARIABLE_NAME || tokens.get(i+1) == COMMA) {\n\t\t\t\t\thasRead = true;\n\t\t\t\t\tif (tokens.get(i+1) == COMMA) {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (isReferenced(metadata.get(i+1))) {\n\t\t\t\t\t\tcode.append(metadata.get(i+1)+\" = Number.parseInt(prompt());\\n\");\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcode.append(\"var \"+metadata.get(i+1)+\" = Number.parseInt(prompt());\\n\");\n\t\t\t\t\t\tvarReferences.add(metadata.get(i+1));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!hasRead) outputAndThrow(new RuntimeException(\"Error: Expected variable identifier.\\n\"));\n\t\t\t\tbreak;\n\t\t\tcase OUTPUT:\n\t\t\t\ti++;\n\t\t\t\tif (tokens.get(i).isOutputable()) {\n\t\t\t\t\twhile (tokens.get(i).isOutputable()) {\n\t\t\t\t\t\tif (tokens.get(i) == COMMA) {\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\tif (i >= tokens.size()) break;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcode.append(\"alert(\");\n\t\t\t\t\t\ti = appendUntil(code, i, COMMA);\n\t\t\t\t\t\tcode.append(\");\\n\");\n\t\t\t\t\t\tif (i >= tokens.size()) break;\n\t\t\t\t\t}\n\t\t\t\t} else outputAndThrow(new RuntimeException(\"Error: Can only output variables, constants or expressions.\\n\"));\n\t\t\t\ti--;\n\t\t\t\tbreak;\n\t\t\tcase VARIABLE_NAME:\n\t\t\t\tif (i+1 >= tokens.size()) break;\n\t\t\t\tif (tokens.get(i+1) == ASSIGNMENT) {\n\t\t\t\t\tif (!varReferences.contains(metadata.get(i))) {\n\t\t\t\t\t\tcode.append(\"var \");\n\t\t\t\t\t\tvarReferences.add(metadata.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tcode.append(metadata.get(i)+\" = \");\n\t\t\t\t\ti += 2;\n\t\t\t\t\ti = appendUntil(code, i, LINE);\n\t\t\t\t\tcode.append(\";\\n\");\n\t\t\t\t} else outputAndThrow(new RuntimeException(\"Error: Expected assignment.\\n\"));\n\t\t\t\tbreak;\n\t\t\tcase IF:\n\t\t\t\tcode.append(\"if (\");\n\t\t\t\ti++;\n\t\t\t\ti = appendUntil(code, i, THEN);\n\t\t\t\tcode.append(\") {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase ELSE:\n\t\t\t\tcode.append(\"} else {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase FOR:\n\t\t\t\tcode.append(\"for (\");\n\t\t\t\tif (tokens.get(i+1) != VARIABLE_NAME && tokens.get(i+2) != ASSIGNMENT) outputAndThrow(new RuntimeException(\"Error: Expected iterator declartion.\\n\"));\n\t\t\t\tString itName = metadata.get(i+1);\n\t\t\t\tif (!varReferences.contains(itName)) varReferences.add(itName);\n\t\t\t\tcode.append(\"var \" + itName + \" = \");\n\t\t\t\ti += 3;\n\t\t\t\ti = appendUntil(code, i, COMMA);\n\t\t\t\ti++;\n\t\t\t\tcode.append(\"; \" + itName);\n\t\t\t\tStringBuilder tmp = new StringBuilder();\n\t\t\t\ti = appendUntil(tmp, i, COMMA);\n\t\t\t\ti++;\n\t\t\t\tStringBuilder perItOp = new StringBuilder();\n\t\t\t\ti = appendUntil(perItOp, i, EXECUTE);\n\t\t\t\tint num;\n\t\t\t\ttry {num = Integer.parseInt(perItOp.toString());}\n\t\t\t\tcatch (NumberFormatException e) {num = -1;}\n\t\t\t\tif (num >= 0) code.append(\" <= \" + tmp.toString() + \"; \" + itName + \"++\");\n\t\t\t\telse code.append(\" > \" + tmp.toString() + \"; \" + itName + \"--\");\n\t\t\t\tcode.append(\") {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase DO:\n\t\t\t\tcode.append(\"do {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase UNTIL:\n\t\t\t\tcode.append(\"} while (!(\");\n\t\t\t\ti++;\n\t\t\t\ti = appendUntil(code, i, LINE);\n\t\t\t\tcode.append(\"));\");\n\t\t\t\tbreak;\n\t\t\tcase WHILE:\n\t\t\t\tcode.append(\"while (\");\n\t\t\t\ti++;\n\t\t\t\ti = appendUntil(code, i, EXECUTE);\n\t\t\t\tcode.append(\") {\\n\");\n\t\t\t\tbreak;\n\t\t\tcase END:\n\t\t\t\tcode.append(\"}\\n\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\toutput = code.toString();\n\t}", "public interface ParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int IMPLIES = 1;\n /** RegularExpression Id. */\n int EQUIVALENT = 2;\n /** RegularExpression Id. */\n int AND = 3;\n /** RegularExpression Id. */\n int OR = 4;\n /** RegularExpression Id. */\n int LBRACKET = 5;\n /** RegularExpression Id. */\n int RBRACKET = 6;\n /** RegularExpression Id. */\n int NOT = 7;\n /** RegularExpression Id. */\n int EQUALS = 8;\n /** RegularExpression Id. */\n int FORALL = 9;\n /** RegularExpression Id. */\n int THEREEXISTS = 10;\n /** RegularExpression Id. */\n int VARIABLE = 11;\n /** RegularExpression Id. */\n int PREDICATE = 12;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<IMPLIES>\",\n \"<EQUIVALENT>\",\n \"<AND>\",\n \"<OR>\",\n \"<LBRACKET>\",\n \"<RBRACKET>\",\n \"<NOT>\",\n \"<EQUALS>\",\n \"<FORALL>\",\n \"<THEREEXISTS>\",\n \"<VARIABLE>\",\n \"<PREDICATE>\",\n };\n\n}", "public interface ForteLangConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int COMPARATOR_OP = 1;\n /** RegularExpression Id. */\n int BOOLEAN_OP = 2;\n /** RegularExpression Id. */\n int SET_OP = 3;\n /** RegularExpression Id. */\n int OP = 4;\n /** RegularExpression Id. */\n int CONCAT = 5;\n /** RegularExpression Id. */\n int SELECT = 6;\n /** RegularExpression Id. */\n int CONTAINS = 7;\n /** RegularExpression Id. */\n int NUMBER = 8;\n /** RegularExpression Id. */\n int FLOATING_POINT_NUMBER = 9;\n /** RegularExpression Id. */\n int BOOLEAN = 10;\n /** RegularExpression Id. */\n int STRING = 11;\n /** RegularExpression Id. */\n int REGEX_STRING = 12;\n /** RegularExpression Id. */\n int INCLUDE = 13;\n /** RegularExpression Id. */\n int IN = 14;\n /** RegularExpression Id. */\n int MATCH = 15;\n /** RegularExpression Id. */\n int OPENBRACKET = 16;\n /** RegularExpression Id. */\n int CLOSEBRACKET = 17;\n /** RegularExpression Id. */\n int OPENSBRACKET = 18;\n /** RegularExpression Id. */\n int CLOSESBRACKET = 19;\n /** RegularExpression Id. */\n int COMMA = 20;\n /** RegularExpression Id. */\n int EQUALS = 21;\n /** RegularExpression Id. */\n int SEMICOLON = 22;\n /** RegularExpression Id. */\n int OPENCBRACKET = 23;\n /** RegularExpression Id. */\n int CLOSECBRACKET = 24;\n /** RegularExpression Id. */\n int NUM = 25;\n /** RegularExpression Id. */\n int LST = 26;\n /** RegularExpression Id. */\n int SET = 27;\n /** RegularExpression Id. */\n int FUN = 28;\n /** RegularExpression Id. */\n int BOO = 29;\n /** RegularExpression Id. */\n int STR = 30;\n /** RegularExpression Id. */\n int COLON = 31;\n /** RegularExpression Id. */\n int VAR_NAME = 32;\n /** RegularExpression Id. */\n int FUNCTION_ARROW = 33;\n /** RegularExpression Id. */\n int GUARD_START = 34;\n /** RegularExpression Id. */\n int GUARD = 35;\n /** RegularExpression Id. */\n int GUARD_ARROW = 36;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int BlockComment = 1;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<COMPARATOR_OP>\",\n \"<BOOLEAN_OP>\",\n \"<SET_OP>\",\n \"<OP>\",\n \"\\\"++\\\"\",\n \"\\\".\\\"\",\n \"\\\"?\\\"\",\n \"<NUMBER>\",\n \"<FLOATING_POINT_NUMBER>\",\n \"<BOOLEAN>\",\n \"<STRING>\",\n \"<REGEX_STRING>\",\n \"\\\"include\\\"\",\n \"\\\"in\\\"\",\n \"\\\"match\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\",\\\"\",\n \"\\\"=\\\"\",\n \"\\\";\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"num\\\"\",\n \"\\\"list\\\"\",\n \"\\\"set\\\"\",\n \"\\\"func\\\"\",\n \"\\\"bool\\\"\",\n \"\\\"str\\\"\",\n \"\\\":\\\"\",\n \"<VAR_NAME>\",\n \"\\\"->\\\"\",\n \"\\\"|>\\\"\",\n \"\\\"|\\\"\",\n \"\\\"->>\\\"\",\n \"<token of kind 37>\",\n \"<token of kind 38>\",\n \"\\\"#[\\\"\",\n \"\\\"#[\\\"\",\n \"<token of kind 41>\",\n \"\\\"]#\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n };\n\n}", "public interface IVariable<A extends AbstractDomain<?>> extends IReferenceHolder<A>, ITerm {\n\n\t@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic default Set<IVariable<?>> getVariables() {\n\t\tSet<IVariable<?>> values = new HashSet<>();\n\t\tvalues.add((IVariable<AbstractDomain<?>>) this);\n\t\treturn values;\n\t}\n\n\t/**\n\t * Lets the visitor visit the variable.\n\t * \n\t * @param IVariableVisitor\n\t * The visitor.\n\t */\n\tpublic void processWith(IVariableVisitor iVariableVisitor);\n\n\t/**\n\t * Returns whether it is a constant.\n\t * \n\t * @return Whether it is a constant.\n\t */\n\tpublic boolean isConstant();\n}", "private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }", "private void processIdentificator() {\r\n\t\tString identificator = generateString();\r\n\r\n\t\tif (identificator.equals(Constants.AND_STRING)) {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.AND_STRING);\r\n\r\n\t\t} else if (identificator.equals(Constants.XOR_STRING)) {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.XOR_STRING);\r\n\r\n\t\t} else if (identificator.equals(Constants.OR_STRING)) {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.OR_STRING);\r\n\r\n\t\t} else if (identificator.equals(Constants.NOT_STRING)) {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.NOT_STRING);\r\n\r\n\t\t} else if (identificator.equals(trueString)) {\r\n\t\t\ttoken = new Token(TokenType.CONSTANT, true);\r\n\r\n\t\t} else if (identificator.equals(falseString)) {\r\n\t\t\ttoken = new Token(TokenType.CONSTANT, false);\r\n\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.VARIABLE, identificator.toUpperCase());\r\n\t\t}\r\n\t}", "private Token getNextVariableName() {\n StringBuilder sb = new StringBuilder();\n\n while (currentIndex < this.data.length) {\n char currChar = this.data[currentIndex];\n\n if (Character.isLetterOrDigit(currChar) || currChar == '_') {\n sb.append(currChar);\n currentIndex++;\n } else {\n break;\n }\n }\n\n return new Token(TokenType.VARIABLE, sb.toString());\n }", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "Node getVariable();", "public static boolean variableDeclaration(FileInputStream f) {\n CToken t = new CToken();\n if(observer != null){\n observer.parser.setCurrentRule(\"variableDeclaration\",true);\n }\n \n if (!declarationType(f)) {\n return false;\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"mainDeclaration\",true);\n }\n \n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n \n if (t.token.equals(\"=\")) {\n t = CScanner.peekNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n if (!constant(f)) {\n System.err.format(\"Syntax Error: In rule VariableDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"variableDeclaration\",true);\n }\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n\n if (!t.token.equals(\";\")) {\n System.err.format(\"Syntax Error: In rule VariableDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n } //if not semi colon\n if(observer != null){\n observer.parser.setCurrentRule(\"variableDeclaration\",true);\n }\n } //must follow with constant\n else if (!t.token.equals(\";\")) {\n System.err.format(\"Syntax Error: In rule VariableDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n } //if not semicolon nor equals\n if(observer != null){\n observer.parser.setCurrentRule(\"variableDeclaration\", false);\n }\n return true;\n }", "public ExprVar(FEContext context, String name)\n {\n super(context);\n this.name = name;\n }", "Variable createVariable();", "Variable createVariable();", "final public Token IdentifierOrReserved() throws ParseException {\n /*@bgen(jjtree) IdentifierOrReserved */\n SimpleNode jjtn000 = new SimpleNode(JJTIDENTIFIERORRESERVED);\n boolean jjtc000 = true;\n jjtree.openNodeScope(jjtn000);Token t1;\n log.trace(\"Entering IdentifierOrReserved\");\n try {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case DEFINE:\n t1 = jj_consume_token(DEFINE);\n break;\n case LOAD:\n t1 = jj_consume_token(LOAD);\n break;\n case FILTER:\n t1 = jj_consume_token(FILTER);\n break;\n case FOREACH:\n t1 = jj_consume_token(FOREACH);\n break;\n case MATCHES:\n t1 = jj_consume_token(MATCHES);\n break;\n case ORDER:\n t1 = jj_consume_token(ORDER);\n break;\n case ARRANGE:\n t1 = jj_consume_token(ARRANGE);\n break;\n case DISTINCT:\n t1 = jj_consume_token(DISTINCT);\n break;\n case COGROUP:\n t1 = jj_consume_token(COGROUP);\n break;\n case JOIN:\n t1 = jj_consume_token(JOIN);\n break;\n case CROSS:\n t1 = jj_consume_token(CROSS);\n break;\n case UNION:\n t1 = jj_consume_token(UNION);\n break;\n case SPLIT:\n t1 = jj_consume_token(SPLIT);\n break;\n case INTO:\n t1 = jj_consume_token(INTO);\n break;\n case IF:\n t1 = jj_consume_token(IF);\n break;\n case ALL:\n t1 = jj_consume_token(ALL);\n break;\n case ANY:\n t1 = jj_consume_token(ANY);\n break;\n case AS:\n t1 = jj_consume_token(AS);\n break;\n case BY:\n t1 = jj_consume_token(BY);\n break;\n case USING:\n t1 = jj_consume_token(USING);\n break;\n case INNER:\n t1 = jj_consume_token(INNER);\n break;\n case OUTER:\n t1 = jj_consume_token(OUTER);\n break;\n case PARALLEL:\n t1 = jj_consume_token(PARALLEL);\n break;\n case GROUP:\n t1 = jj_consume_token(GROUP);\n break;\n case AND:\n t1 = jj_consume_token(AND);\n break;\n case OR:\n t1 = jj_consume_token(OR);\n break;\n case NOT:\n t1 = jj_consume_token(NOT);\n break;\n case GENERATE:\n t1 = jj_consume_token(GENERATE);\n break;\n case FLATTEN:\n t1 = jj_consume_token(FLATTEN);\n break;\n case EVAL:\n t1 = jj_consume_token(EVAL);\n break;\n case ASC:\n t1 = jj_consume_token(ASC);\n break;\n case DESC:\n t1 = jj_consume_token(DESC);\n break;\n case INT:\n t1 = jj_consume_token(INT);\n break;\n case LONG:\n t1 = jj_consume_token(LONG);\n break;\n case FLOAT:\n t1 = jj_consume_token(FLOAT);\n break;\n case DOUBLE:\n t1 = jj_consume_token(DOUBLE);\n break;\n case CHARARRAY:\n t1 = jj_consume_token(CHARARRAY);\n break;\n case BYTEARRAY:\n t1 = jj_consume_token(BYTEARRAY);\n break;\n case BAG:\n t1 = jj_consume_token(BAG);\n break;\n case TUPLE:\n t1 = jj_consume_token(TUPLE);\n break;\n case MAP:\n t1 = jj_consume_token(MAP);\n break;\n case IS:\n t1 = jj_consume_token(IS);\n break;\n case NULL:\n t1 = jj_consume_token(NULL);\n break;\n case STREAM:\n t1 = jj_consume_token(STREAM);\n break;\n case THROUGH:\n t1 = jj_consume_token(THROUGH);\n break;\n case STORE:\n t1 = jj_consume_token(STORE);\n break;\n case SHIP:\n t1 = jj_consume_token(SHIP);\n break;\n case CACHE:\n t1 = jj_consume_token(CACHE);\n break;\n case INPUT:\n t1 = jj_consume_token(INPUT);\n break;\n case OUTPUT:\n t1 = jj_consume_token(OUTPUT);\n break;\n case ERROR:\n t1 = jj_consume_token(ERROR);\n break;\n case STDIN:\n t1 = jj_consume_token(STDIN);\n break;\n case STDOUT:\n t1 = jj_consume_token(STDOUT);\n break;\n case LIMIT:\n t1 = jj_consume_token(LIMIT);\n break;\n case SAMPLE:\n t1 = jj_consume_token(SAMPLE);\n break;\n case IDENTIFIER:\n t1 = jj_consume_token(IDENTIFIER);\n break;\n default:\n jj_la1[7] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n jjtree.closeNodeScope(jjtn000, true);\n jjtc000 = false;\n {if (true) return t1;}\n } finally {\n if (jjtc000) {\n jjtree.closeNodeScope(jjtn000, true);\n }\n }\n throw new Error(\"Missing return statement in function\");\n }", "public Variable(String name) {\n this.name = name;\n checkRep();\n }", "public ConceptAtom(IRI iri)\n {\n super(iri);\n this.strVariable = \"\"; \n }", "private DataTypes getDataType(String token){\n token = token.trim();\n if (token.endsWith(\"]\"))\n return DataTypes.List;\n else if (token.endsWith(\"}\"))\n return DataTypes.Map;\n else if (token.startsWith(\"\\\"\"))\n return DataTypes.String;\n else if (token.toLowerCase().equals(\"null\"))\n return DataTypes.Null;\n else {\n if (token.toLowerCase().equals(\"true\") || token.toLowerCase().equals(\"false\"))\n return DataTypes.Boolean;\n else {\n if (token.contains(\".\"))\n return DataTypes.Float;\n else\n return DataTypes.Integer;\n }\n }\n }", "public interface ValueType {\n /** synonyms. */\n String SYNONYMS = \"synonyms\";\n /** patterns. */\n String PATTERNS = \"patterns\";\n }", "@Override\r\n\tpublic Instruction lexParse(String[] words, LexicalParser lexParser) {\r\n\t\tif (words.length!=3) return null;\r\n\t\t\r\n\t\tif (!words[1].equals(\"=\")) return null;\r\n\t\t\r\n\t\trhs=TermParser.parse(words[2]);\r\n\t\tif (rhs==null) return null;\r\n\t\t\r\n\t\tTerm var=TermParser.parse(words[0]);\r\n\t\tif (var==null) return null;\r\n\t\t\r\n\t\treturn new SimpleAssignment(words[0], rhs);\r\n\t}", "private void onSymbol(final Attributes attributes) throws SAXException\r\n\t{\r\n\t\tString name = attributes.getValue(\"name\");\r\n\t\tint size = getInt(attributes, \"size\", 1);\r\n\t\tString loc = attributes.getValue(\"loc\");\r\n\t\tString decl = attributes.getValue(\"decl\");\r\n\r\n SymbolOwnership ownership = readOwnership(decl);\r\n\t\t\r\n\t\tif(loc == null)\r\n\t\t{\r\n\t\t\tthrow new SAXException(\"Symbol declaration missing 'loc' location information\");\r\n\t\t}\r\n\t\tif(\"rom\".equals(loc))\r\n\t\t{\r\n\t\t\tRomLocation rom = new RomLocation(name, ownership);\r\n\t\t\tif(!\"none\".equals(decl))\r\n\t\t\t{\r\n\t\t\t\tm_model.registerExternalMethod(rom);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint page = readPage(loc);\r\n\r\n\t\tm_variable = new Variable(name, ownership, page, size);\r\n\t\tm_model.addVariable(m_variable);\r\n\t}", "SharedVarsDeclRule createSharedVarsDeclRule();", "public void compileClassVarDec() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString type, kind, name;\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\n\t\tElement parentXML = document.createElement(\"classVarDec\");\n\t\tele = createXMLnode(\"keyword\");\n\t\tkind = jTokenizer.returnTokenVal();\n\n\t\t// Mapping a jack keyword to a vm keyword\n\t\tif (kind.equals(\"var\")) {\n\t\t\tkind = \"local\";\n\t\t} else if (kind.equals(\"arg\")) {\n\t\t\tkind = \"argument\";\n\t\t} else if (kind.equals(\"field\")) {\n\t\t\tkind = \"this\";\n\t\t}\n\t\tparentXML.appendChild(ele);\n\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\ttype = jTokenizer.returnTokenVal();\n\t\tele = createXMLnode(tokenType);\n\t\tparentXML.appendChild(ele);\n\n\t\tjTokenizer.advance();\n\t\twhile (!jTokenizer.returnTokenVal(tokenType).equals(\";\")) {\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tparentXML.appendChild(ele);\n\t\t\tjTokenizer.advance();\n\t\t\tif (tokenType.equals(\"identifier\")) {\n\t\t\t\t// Adding the variable to the symbol table\n\t\t\t\tsymTable.define(token, type, kind);\n\t\t\t}\n\t\t}\n\n\t\t// The ending symbol of the line (;)\n\t\tele = createXMLnode(\"symbol\");\n\t\tparentXML.appendChild(ele);\n\t\troot.appendChild(parentXML);\n\t}", "public interface GlobalNode extends Node{\n\n VariableName[] getVariableNames();\n\n}", "public interface AssignmentConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int AND = 1;\n /** RegularExpression Id. */\n int OR = 2;\n /** RegularExpression Id. */\n int IMPLIES = 3;\n /** RegularExpression Id. */\n int EQUIVALENT = 4;\n /** RegularExpression Id. */\n int PREDICATE = 5;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<AND>\",\n \"<OR>\",\n \"<IMPLIES>\",\n \"<EQUIVALENT>\",\n \"<PREDICATE>\",\n };\n\n}", "public VariableMeta getMeta();", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "public LlvmValue visit(Formal n){\n\t\n\t\tSystem.out.format(\"formal**********\\n\");\n\t\t\n\t\tStringBuilder name = new StringBuilder();\n\t\t\n\t\tname.append(\"%\");\n\t\tname.append(n.name.s);\n\t\t\n\t\t//variable -> %name, com tipo n.type\n\t\tLlvmNamedValue variable = new LlvmNamedValue(name.toString(), (LlvmType)n.type.accept(this));\n\t\t\n\t\treturn variable;\t\t\n\t}", "public interface Data {\n String DATABASE = \"Database\";\n String ONLINE = \"Online\";\n\n @StringDef({DATABASE, ONLINE})\n @interface Type{}\n\n int DATABASE_ID = 0;\n int ONLINE_ID = 1;\n @IntDef({DATABASE_ID, ONLINE_ID})\n @interface Id{}\n}", "public VariableIF createVariable(VariableDecl decl);", "public IExpressionValue getUserDefinedVariable(String key);", "public interface SimpleGrParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int NumberLit = 6;\n /** RegularExpression Id. */\n int BooleanLit = 7;\n /** RegularExpression Id. */\n int StringLit = 8;\n /** RegularExpression Id. */\n int Null = 9;\n /** RegularExpression Id. */\n int And = 10;\n /** RegularExpression Id. */\n int Or = 11;\n /** RegularExpression Id. */\n int Not = 12;\n /** RegularExpression Id. */\n int Identifier = 13;\n /** RegularExpression Id. */\n int Equal = 14;\n /** RegularExpression Id. */\n int NotEqual = 15;\n /** RegularExpression Id. */\n int LessThan = 16;\n /** RegularExpression Id. */\n int LessEqualThan = 17;\n /** RegularExpression Id. */\n int GreaterThan = 18;\n /** RegularExpression Id. */\n int GreaterEqualThan = 19;\n /** RegularExpression Id. */\n int Plus = 20;\n /** RegularExpression Id. */\n int Minus = 21;\n /** RegularExpression Id. */\n int Div = 22;\n /** RegularExpression Id. */\n int Mult = 23;\n /** RegularExpression Id. */\n int Open = 24;\n /** RegularExpression Id. */\n int Close = 25;\n /** RegularExpression Id. */\n int Comma = 26;\n /** RegularExpression Id. */\n int Letter = 27;\n /** RegularExpression Id. */\n int Digit = 28;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"<NumberLit>\",\n \"<BooleanLit>\",\n \"<StringLit>\",\n \"\\\"NULL\\\"\",\n \"\\\"AND\\\"\",\n \"\\\"OR\\\"\",\n \"\\\"NOT\\\"\",\n \"<Identifier>\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"/\\\"\",\n \"\\\"*\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\",\\\"\",\n \"<Letter>\",\n \"<Digit>\",\n };\n\n}", "private void generateVariablesAndConstraints() {\n\t\tVariable norwegian=new Variable(generateDomain(), \"norwegian\");\n\t\tVariable english=new Variable(generateDomain(), \"english\");\n\t\tVariable dane=new Variable(generateDomain(), \"dane\");\n\t\tVariable german=new Variable(generateDomain(), \"german\");\n\t\tVariable swede=new Variable(generateDomain(), \"swede\");\n\t\t//colors: \"red\", \"green\", \"white\", \"yellow\", \"blue\"\n\t\tVariable red=new Variable(generateDomain(), \"red\");\n\t\tVariable green=new Variable(generateDomain(), \"green\");\n\t\tVariable white=new Variable(generateDomain(), \"white\");\n\t\tVariable yellow=new Variable(generateDomain(), \"yellow\");\n\t\tVariable blue=new Variable(generateDomain(), \"blue\");\n\t\t//tobaccos: \"light\", \"cigar\", \"pipe\", \"unfiltered\", \"menthol\"\n\t\tVariable light=new Variable(generateDomain(), \"light\");\n\t\tVariable cigar=new Variable(generateDomain(), \"cigar\");\n\t\tVariable pipe=new Variable(generateDomain(), \"pipe\");\n\t\tVariable unfiltered=new Variable(generateDomain(), \"unfiltered\");\n\t\tVariable menthol=new Variable(generateDomain(), \"menthol\");\n\t\t//drinks: \"tea\", \"milk\", \"water\", \"beer\", \"coffee\"\n\t\tVariable tea=new Variable(generateDomain(), \"tea\");\n\t\tVariable milk=new Variable(generateDomain(), \"milk\");\n\t\tVariable water=new Variable(generateDomain(), \"water\");\n\t\tVariable beer=new Variable(generateDomain(), \"beer\");\n\t\tVariable coffee=new Variable(generateDomain(), \"coffee\");\n\t\t//pets: \"fish\", \"cat\", \"bird\", \"dog\", \"horse\"\n\t\tVariable fish=new Variable(generateDomain(), \"fish\");\n\t\tVariable cat=new Variable(generateDomain(), \"cat\");\n\t\tVariable bird=new Variable(generateDomain(), \"bird\");\n\t\tVariable dog=new Variable(generateDomain(), \"dog\");\n\t\tVariable horse=new Variable(generateDomain(), \"horse\");\n\t\t\n\t\tvariables= new ArrayList<Variable>(Arrays.asList(norwegian, english, dane, german, swede,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tred, green, white, yellow, blue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlight, cigar, pipe, unfiltered, menthol,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttea, milk, water, beer, coffee,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfish, cat, bird, dog, horse));\n\t\t\n\t\tconstraints=new ArrayList<Constraint>();\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(norwegian, english, dane, german, swede))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(red, green, white, yellow, blue))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(light, cigar, pipe, unfiltered, menthol))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(tea, milk, water, beer, coffee))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(fish, cat, bird, dog, horse))).toneq()));\n\t\tconstraints.add(new equnary(norwegian, 1)); //Norweg zamieszkuje pierwszy dom\n\t\tconstraints.add(new eq(english, red));//Anglik mieszka w czerwonym domu.\n\t\tconstraints.add(new lt(green, white));//Zielony dom znajduje się bezpośrednio po lewej stronie domu białego.\n\t\tconstraints.add(new eq(dane, tea));//Duńczyk pija herbatkę.\n\t\tconstraints.add(new nextto(light, cat));//Palacz papierosów light mieszka obok hodowcy kotów.\n\t\tconstraints.add(new eq(yellow, cigar));//Mieszkaniec żółtego domu pali cygara.\n\t\tconstraints.add(new eq(german, pipe));//Niemiec pali fajkę.\n\t\tconstraints.add(new equnary(milk, 3));//Mieszkaniec środkowego domu pija mleko.\n\t\tconstraints.add(new nextto(light, water));//Palacz papierosów light ma sąsiada, który pija wodę.\n\t\tconstraints.add(new eq(unfiltered, bird));//Palacz papierosów bez filtra hoduje ptaki.\n\t\tconstraints.add(new eq(swede, dog));//Szwed hoduje psy.\n\t\tconstraints.add(new nextto(norwegian, blue));//Norweg mieszka obok niebieskiego domu.\n\t\tconstraints.add(new nextto(horse, yellow));//Hodowca koni mieszka obok żółtego domu.\n\t\tconstraints.add(new eq(menthol, beer));//Palacz mentolowych pija piwo.\n\t\tconstraints.add(new eq(green, coffee));//W zielonym domu pija się kawę\n\t}", "@Test\n public void shouldParseNATIONAL_CHAR() {\n printTest(\"shouldParseNATIONAL_CHAR()\");\n String typeString = getDataTypeString(DataTypes.DTYPE_NATIONAL_CHAR);\n String content = typeString;\n\n DdlTokenStream tokens = getTokens(content);\n\n DataType dType = parser.parse(tokens);\n\n Assert.assertNotNull(\"DataType was NOT found for Type = \" + typeString, dType);\n Assert.assertEquals(\"Wrong DataType found\", typeString, dType.getName());\n\n content = typeString + \" (255)\";\n tokens = getTokens(content);\n\n dType = parser.parse(tokens);\n\n Assert.assertNotNull(\"DataType was NOT found for Type = \" + typeString, dType);\n Assert.assertEquals(\"Wrong DataType found\", typeString, dType.getName());\n Assert.assertEquals(\"DataType length is not correct\", 255, dType.getLength());\n }", "public interface VariableIF extends VariableSimpleIF {\r\n public java.lang.String getFullName();\r\n public java.lang.String getFullNameEscaped();\r\n public java.lang.String getShortName();\r\n public void getNameAndDimensions(java.util.Formatter result, boolean useFullName, boolean strict);\r\n\r\n public boolean isUnlimited();\r\n public boolean isUnsigned();\r\n public ucar.ma2.DataType getDataType();\r\n public int getRank();\r\n public boolean isScalar();\r\n public long getSize();\r\n public int getElementSize();\r\n public int[] getShape();\r\n\r\n public java.util.List<Dimension> getDimensions();\r\n public ucar.nc2.Dimension getDimension(int index);\r\n public int findDimensionIndex(java.lang.String dimName);\r\n\r\n public java.util.List<Attribute> getAttributes();\r\n public ucar.nc2.Attribute findAttribute(java.lang.String attName);\r\n public ucar.nc2.Attribute findAttributeIgnoreCase(java.lang.String attName);\r\n\r\n public ucar.nc2.Group getParentGroup();\r\n public ucar.nc2.Variable section(java.util.List<Range> ranges) throws ucar.ma2.InvalidRangeException;\r\n public Section getShapeAsSection();\r\n public java.util.List<Range> getRanges();\r\n\r\n public ucar.ma2.Array read(int[] origin, int[] shape) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read(java.lang.String rangeSpec) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read(ucar.ma2.Section section) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read() throws java.io.IOException;\r\n\r\n public boolean isCoordinateVariable();\r\n public boolean isMemberOfStructure();\r\n public boolean isVariableLength();\r\n public boolean isMetadata();\r\n public ucar.nc2.Structure getParentStructure();\r\n\r\n public String getDescription();\r\n public String getUnitsString();\r\n\r\n // use only if isMemberOfStructure\r\n public java.util.List<Dimension> getDimensionsAll();\r\n\r\n // use only if isScalar()\r\n public byte readScalarByte() throws java.io.IOException;\r\n public short readScalarShort() throws java.io.IOException;\r\n public int readScalarInt() throws java.io.IOException;\r\n public long readScalarLong() throws java.io.IOException;\r\n public float readScalarFloat() throws java.io.IOException;\r\n public double readScalarDouble() throws java.io.IOException;\r\n public java.lang.String readScalarString() throws java.io.IOException;\r\n\r\n // debug\r\n public java.lang.String toStringDebug();\r\n}", "public interface DataNode\r\n{\r\n /** @return type name of this data node */\r\n public String get_type_name();\r\n /** @return the bits of this data node */\r\n public String get_bitsequence_value() ;\r\n \r\n /** @return size of this data in bits*/\r\n public int get_bit_size(); \r\n \r\n /** @return size of this data as an integer (for expresion evaluation\r\n * purpose */\r\n public int get_int_value() throws Exception;\r\n \r\n /** @return the number of bits this type takes */ \r\n public int get_fieldsize();\r\n \r\n /** set the expression for number of bits this type takes*/\r\n public void set_fieldsize(AST fieldsize);\r\n \r\n /** set valid ok nok */\r\n public void set_verify_then_else(AST verify_ast,AST then_ast , AST else_ast) throws Exception;\r\n \r\n /** sets the contaxt for evaluation of expressions for this data node*/\r\n public void set_context(VariableSymbolTable context);\r\n \r\n /** print a human readable form of this node */\r\n public String print();\r\n \r\n /** print with formatting \r\n * 0 = print() [debug formatted]\r\n * 1 = as string [useful to write to a file]\r\n * 2 = debug with strings [similar to 0, but with strings instad of bytes]\r\n * @return Formatted output ready to be printed\r\n */\r\n public String print(int format);\r\n public void set_name(String name);\r\n public String get_name();\r\n \r\n /** returns the maximum size this object can accept (hold) or -1 for infinity */\r\n public int get_max_accept() throws Exception;\r\n public void assign(DataNodeAbstract rhs) throws Exception;\r\n public void populate(BdplFile rhs) throws Exception;\r\n \r\n}", "@Override\n public String getExpectedInputName() {\n return \"tokens input\";\n }", "final public void define() throws ParseException {\n String name=\"\";\n Long value;\n jj_consume_token(DEFINE);\n jj_consume_token(VARIABLE);\n name = token.image;\n jj_consume_token(NUMERO);\n try {\n value = Long.parseLong(token.image);\n }\n catch(Exception e) {\n {if (true) throw new ParseException(\"Una variable solo puede guardar numeros\");}\n }\n userVals.put(name, value);\n }", "@Override String opStr() { return \"var\"; }", "public Variable(String name) {\r\n\t\tName = name;\r\n\t\tValues = new ArrayList<>();\r\n\t\tParents = new ArrayList<>();\r\n\t\tCPT = new TreeMap<>();\r\n\t}", "public Variable(String variableName) {\n super(null);\n this.variableName = variableName;\n }", "public ElementVariable(String name) {\r\n\t\tsuper();\r\n\t\tthis.name = name;\r\n\t}", "public Var(String var) {\r\n this.variable = var;\r\n }", "@Override\n\tpublic Data getDataModelVariables() {\n\t\treturn new Data();\n\t}", "public BNFrule()\n {\n lhs = \"\";\n rhsSymbols = new ArrayList<String>();\n }", "private void tokenize() {\n\t\t//Checks char-by-char\n\t\tcharLoop:\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\t//Check if there's a new line\n\t\t\tif (input.charAt(i) == '\\n') {\n\t\t\t\ttokens.add(LINE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Iterate through the tokens and find if any matches\n\t\t\tfor (Token st : Token.values()) {\n\t\t\t\t//Do not test for these because they have separate cases below\n\t\t\t\tif (st.equals(NUMBER) || st.equals(VARIABLE_NAME) || st.equals(STRING) || st.equals(LINE)) continue;\n\t\t\t\t//Skip whitespace & newlines\n\t\t\t\tif (Character.isWhitespace(input.charAt(i))) continue;\n\t\t\t\t\n\t\t\t\t//Checks for multi-character identifiers\n\t\t\t\ttry {\n\t\t\t\t\tif (input.substring(i, i + st.getValue().length()).equals(st.getValue())) {\n\t\t\t\t\t\ttokens.add(st);\n\t\t\t\t\t\ti += st.getValue().length()-1;\n\t\t\t\t\t\tcontinue charLoop;\n\t\t\t\t\t}\n\t\t\t\t} catch(StringIndexOutOfBoundsException e) {}\n\t\t\t\t//Ignore this exception because the identifiers might be larger than the input string.\n\t\t\t\t\n\t\t\t\t//Checks for mono-character identifiers\n\t\t\t\tif (st.isOneChar() && input.charAt(i) == st.getValue().toCharArray()[0]) {\n\t\t\t\t\ttokens.add(st);\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a string\n\t\t\tif (input.charAt(i) == '\"') {\n\t\t\t\ti++;\n\t\t\t\tif (i >= input.length()) break;\n\t\t\t\tStringBuilder string = new StringBuilder();\n\t\t\t\twhile (input.charAt(i) != '\"') {\n\t\t\t\t\tstring.append(input.charAt(i));\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tstring.insert(0, \"\\\"\");\n\t\t\t\tstring.append(\"\\\"\");\n\t\t\t\ttokens.add(STRING);\n\t\t\t\tmetadata.put(tokens.size()-1, string.toString());\n\t\t\t\tcontinue charLoop;\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a number\n\t\t\tif (Character.isDigit(input.charAt(i))) {\n\t\t\t\tStringBuilder digits = new StringBuilder();\n\t\t\t\twhile (Character.isDigit(input.charAt(i)) || input.charAt(i) == '.') {\n\t\t\t\t\tdigits.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (digits.length() != 0) {\n\t\t\t\t\ttokens.add(NUMBER);\n\t\t\t\t\tmetadata.put(tokens.size()-1, digits.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a variable reference/creation\n\t\t\tif (Character.isAlphabetic(input.charAt(i)) && !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\tStringBuilder varName = new StringBuilder();\n\t\t\t\twhile ( ( Character.isAlphabetic(input.charAt(i)) || Character.isDigit(input.charAt(i)) )\n\t\t\t\t\t\t&& !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\t\tvarName.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (varName.length() != 0) {\n\t\t\t\t\ttokens.add(VARIABLE_NAME);\n\t\t\t\t\tmetadata.put(tokens.size()-1, varName.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Parser(ArrayList<Token> tokenSeq, Hashtable<String, VarToken> variables) {\r\n tokens = tokenSeq; \r\n position = 0; // Current position in sequence\r\n vars = variables;\r\n }", "DataDecl DataDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, DataNameNode name);", "public AssrtIntVarNameNode(int ttype, Token t)\n\t{\n\t\tsuper(t);\n\t}", "public TokenAttributeTest(String name) {\r\n\t\tsuper(name);\r\n\t}", "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 Variable getVariable(String name);", "public interface langBConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int BREAK = 12;\n /** RegularExpression Id. */\n int CLASS = 13;\n /** RegularExpression Id. */\n int CONSTRUCTOR = 14;\n /** RegularExpression Id. */\n int ELSE = 15;\n /** RegularExpression Id. */\n int EXTENDS = 16;\n /** RegularExpression Id. */\n int FOR = 17;\n /** RegularExpression Id. */\n int IF = 18;\n /** RegularExpression Id. */\n int THEN = 19;\n /** RegularExpression Id. */\n int INT = 20;\n /** RegularExpression Id. */\n int NEW = 21;\n /** RegularExpression Id. */\n int PRINT = 22;\n /** RegularExpression Id. */\n int READ = 23;\n /** RegularExpression Id. */\n int RETURN = 24;\n /** RegularExpression Id. */\n int STRING = 25;\n /** RegularExpression Id. */\n int SUPER = 26;\n /** RegularExpression Id. */\n int BOOLEAN = 27;\n /** RegularExpression Id. */\n int TRUE = 28;\n /** RegularExpression Id. */\n int FALSE = 29;\n /** RegularExpression Id. */\n int WHILE = 30;\n /** RegularExpression Id. */\n int SWITCH = 31;\n /** RegularExpression Id. */\n int CASE = 32;\n /** RegularExpression Id. */\n int int_constant = 33;\n /** RegularExpression Id. */\n int string_constant = 34;\n /** RegularExpression Id. */\n int null_constant = 35;\n /** RegularExpression Id. */\n int IDENT = 36;\n /** RegularExpression Id. */\n int LETTER = 37;\n /** RegularExpression Id. */\n int DIGIT = 38;\n /** RegularExpression Id. */\n int UNDERSCORE = 39;\n /** RegularExpression Id. */\n int LPAREN = 40;\n /** RegularExpression Id. */\n int RPAREN = 41;\n /** RegularExpression Id. */\n int LBRACE = 42;\n /** RegularExpression Id. */\n int RBRACE = 43;\n /** RegularExpression Id. */\n int LBRACKET = 44;\n /** RegularExpression Id. */\n int RBRACKET = 45;\n /** RegularExpression Id. */\n int SEMICOLON = 46;\n /** RegularExpression Id. */\n int COMMA = 47;\n /** RegularExpression Id. */\n int DOT = 48;\n /** RegularExpression Id. */\n int DDOT = 49;\n /** RegularExpression Id. */\n int QUESTIONMARK = 50;\n /** RegularExpression Id. */\n int ASSIGN = 51;\n /** RegularExpression Id. */\n int GT = 52;\n /** RegularExpression Id. */\n int LT = 53;\n /** RegularExpression Id. */\n int EQ = 54;\n /** RegularExpression Id. */\n int LE = 55;\n /** RegularExpression Id. */\n int GE = 56;\n /** RegularExpression Id. */\n int NEQ = 57;\n /** RegularExpression Id. */\n int PLUS = 58;\n /** RegularExpression Id. */\n int MINUS = 59;\n /** RegularExpression Id. */\n int STAR = 60;\n /** RegularExpression Id. */\n int SLASH = 61;\n /** RegularExpression Id. */\n int REM = 62;\n /** RegularExpression Id. */\n int OR = 63;\n /** RegularExpression Id. */\n int AND = 64;\n /** RegularExpression Id. */\n int INVALID_LEXICAL = 65;\n /** RegularExpression Id. */\n int INVALID_CONST = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int multilinecomment = 1;\n /** Lexical state. */\n int singlelinecomment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"/*\\\"\",\n \"\\\"//\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 9>\",\n \"<token of kind 10>\",\n \"<token of kind 11>\",\n \"\\\"parar\\\"\",\n \"\\\"classe\\\"\",\n \"\\\"construtor\\\"\",\n \"\\\"senao\\\"\",\n \"\\\"herda\\\"\",\n \"\\\"para\\\"\",\n \"\\\"se\\\"\",\n \"\\\"entao\\\"\",\n \"\\\"inteiro\\\"\",\n \"\\\"novo\\\"\",\n \"\\\"imprimir\\\"\",\n \"\\\"ler\\\"\",\n \"\\\"retornar\\\"\",\n \"\\\"texto\\\"\",\n \"\\\"super\\\"\",\n \"\\\"cara_coroa\\\"\",\n \"\\\"cara\\\"\",\n \"\\\"coroa\\\"\",\n \"\\\"enquanto\\\"\",\n \"\\\"trocar\\\"\",\n \"\\\"caso\\\"\",\n \"<int_constant>\",\n \"<string_constant>\",\n \"\\\"nulo\\\"\",\n \"<IDENT>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"<UNDERSCORE>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\":\\\"\",\n \"\\\"?\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"<INVALID_LEXICAL>\",\n \"<INVALID_CONST>\",\n };\n\n}", "public interface AssignmentNode extends StackOperationNode {\n\n TemporaryVariableName getValueName();\n\n}", "public interface ParserConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int LINE_COMMENT = 6;\r\n /** RegularExpression Id. */\r\n int FORMAL_COMMENT = 7;\r\n /** RegularExpression Id. */\r\n int MULTILINE_COMMENT = 8;\r\n /** RegularExpression Id. */\r\n int INT = 9;\r\n /** RegularExpression Id. */\r\n int VOID = 10;\r\n /** RegularExpression Id. */\r\n int STRING = 11;\r\n /** RegularExpression Id. */\r\n int BOOLEAN = 12;\r\n /** RegularExpression Id. */\r\n int NULL = 13;\r\n /** RegularExpression Id. */\r\n int THIS = 14;\r\n /** RegularExpression Id. */\r\n int TRUE = 15;\r\n /** RegularExpression Id. */\r\n int FALSE = 16;\r\n /** RegularExpression Id. */\r\n int MAIN = 17;\r\n /** RegularExpression Id. */\r\n int LENGTH = 18;\r\n /** RegularExpression Id. */\r\n int PRINT = 19;\r\n /** RegularExpression Id. */\r\n int IF = 20;\r\n /** RegularExpression Id. */\r\n int NEW = 21;\r\n /** RegularExpression Id. */\r\n int ELSE = 22;\r\n /** RegularExpression Id. */\r\n int CLASS = 23;\r\n /** RegularExpression Id. */\r\n int WHILE = 24;\r\n /** RegularExpression Id. */\r\n int PUBLIC = 25;\r\n /** RegularExpression Id. */\r\n int RETURN = 26;\r\n /** RegularExpression Id. */\r\n int STATIC = 27;\r\n /** RegularExpression Id. */\r\n int EXTENDS = 28;\r\n /** RegularExpression Id. */\r\n int INTERFACE = 29;\r\n /** RegularExpression Id. */\r\n int ADD = 30;\r\n /** RegularExpression Id. */\r\n int SUB = 31;\r\n /** RegularExpression Id. */\r\n int MULT = 32;\r\n /** RegularExpression Id. */\r\n int AND = 33;\r\n /** RegularExpression Id. */\r\n int NOT = 34;\r\n /** RegularExpression Id. */\r\n int LESS = 35;\r\n /** RegularExpression Id. */\r\n int ASSIGN = 36;\r\n /** RegularExpression Id. */\r\n int LPARENS = 37;\r\n /** RegularExpression Id. */\r\n int RPARENS = 38;\r\n /** RegularExpression Id. */\r\n int LBRACKET = 39;\r\n /** RegularExpression Id. */\r\n int RBRACKET = 40;\r\n /** RegularExpression Id. */\r\n int LBRACE = 41;\r\n /** RegularExpression Id. */\r\n int RBRACE = 42;\r\n /** RegularExpression Id. */\r\n int COMMA = 43;\r\n /** RegularExpression Id. */\r\n int DOT = 44;\r\n /** RegularExpression Id. */\r\n int SEMI = 45;\r\n /** RegularExpression Id. */\r\n int NUM = 46;\r\n /** RegularExpression Id. */\r\n int ID = 47;\r\n /** RegularExpression Id. */\r\n int LETTER = 48;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"\\\\f\\\"\",\r\n \"<LINE_COMMENT>\",\r\n \"<FORMAL_COMMENT>\",\r\n \"<MULTILINE_COMMENT>\",\r\n \"\\\"int\\\"\",\r\n \"\\\"void\\\"\",\r\n \"\\\"String\\\"\",\r\n \"\\\"boolean\\\"\",\r\n \"\\\"null\\\"\",\r\n \"\\\"this\\\"\",\r\n \"\\\"true\\\"\",\r\n \"\\\"false\\\"\",\r\n \"\\\"main\\\"\",\r\n \"\\\"length\\\"\",\r\n \"\\\"System.out.println\\\"\",\r\n \"\\\"if\\\"\",\r\n \"\\\"new\\\"\",\r\n \"\\\"else\\\"\",\r\n \"\\\"class\\\"\",\r\n \"\\\"while\\\"\",\r\n \"\\\"public\\\"\",\r\n \"\\\"return\\\"\",\r\n \"\\\"static\\\"\",\r\n \"\\\"extends\\\"\",\r\n \"\\\"interface\\\"\",\r\n \"\\\"+\\\"\",\r\n \"\\\"-\\\"\",\r\n \"\\\"*\\\"\",\r\n \"\\\"&&\\\"\",\r\n \"\\\"!\\\"\",\r\n \"\\\"<\\\"\",\r\n \"\\\"=\\\"\",\r\n \"\\\"(\\\"\",\r\n \"\\\")\\\"\",\r\n \"\\\"[\\\"\",\r\n \"\\\"]\\\"\",\r\n \"\\\"{\\\"\",\r\n \"\\\"}\\\"\",\r\n \"\\\",\\\"\",\r\n \"\\\".\\\"\",\r\n \"\\\";\\\"\",\r\n \"<NUM>\",\r\n \"<ID>\",\r\n \"<LETTER>\",\r\n };\r\n\r\n}", "@Override\n\tprotected String getVariableClassName() {\n\t\treturn \"variable\";\n\t}", "@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 }", "public interface SalsaParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 9;\n /** RegularExpression Id. */\n int FORMAL_COMMENT = 10;\n /** RegularExpression Id. */\n int MULTI_LINE_COMMENT = 11;\n /** RegularExpression Id. */\n int ABSTRACT = 13;\n /** RegularExpression Id. */\n int ACK = 14;\n /** RegularExpression Id. */\n int AT = 15;\n /** RegularExpression Id. */\n int BEHAVIOR = 16;\n /** RegularExpression Id. */\n int BOOLEAN = 17;\n /** RegularExpression Id. */\n int BREAK = 18;\n /** RegularExpression Id. */\n int BYTE = 19;\n /** RegularExpression Id. */\n int CALLED = 20;\n /** RegularExpression Id. */\n int CASE = 21;\n /** RegularExpression Id. */\n int CATCH = 22;\n /** RegularExpression Id. */\n int CHAR = 23;\n /** RegularExpression Id. */\n int CONST = 24;\n /** RegularExpression Id. */\n int CONTINUE = 25;\n /** RegularExpression Id. */\n int _DEFAULT = 26;\n /** RegularExpression Id. */\n int DELAY = 27;\n /** RegularExpression Id. */\n int DOUBLE = 28;\n /** RegularExpression Id. */\n int ENUM = 29;\n /** RegularExpression Id. */\n int ELSE = 30;\n /** RegularExpression Id. */\n int ENDIF = 31;\n /** RegularExpression Id. */\n int EXTENDS = 32;\n /** RegularExpression Id. */\n int FALSE = 33;\n /** RegularExpression Id. */\n int FLOAT = 34;\n /** RegularExpression Id. */\n int FOR = 35;\n /** RegularExpression Id. */\n int IF = 36;\n /** RegularExpression Id. */\n int IMPLEMENTS = 37;\n /** RegularExpression Id. */\n int IMPORT = 38;\n /** RegularExpression Id. */\n int INSTANCEOF = 39;\n /** RegularExpression Id. */\n int INT = 40;\n /** RegularExpression Id. */\n int INTERFACE = 41;\n /** RegularExpression Id. */\n int LATER = 42;\n /** RegularExpression Id. */\n int LONG = 43;\n /** RegularExpression Id. */\n int LOOP = 44;\n /** RegularExpression Id. */\n int MODULE = 45;\n /** RegularExpression Id. */\n int NEW = 46;\n /** RegularExpression Id. */\n int NULL = 47;\n /** RegularExpression Id. */\n int OBJECT = 48;\n /** RegularExpression Id. */\n int ON = 49;\n /** RegularExpression Id. */\n int PASS = 50;\n /** RegularExpression Id. */\n int PARENT = 51;\n /** RegularExpression Id. */\n int PUBLIC = 52;\n /** RegularExpression Id. */\n int REFERENCE = 53;\n /** RegularExpression Id. */\n int SELF = 54;\n /** RegularExpression Id. */\n int SHORT = 55;\n /** RegularExpression Id. */\n int SUPER = 56;\n /** RegularExpression Id. */\n int SYNCHRONIZED = 57;\n /** RegularExpression Id. */\n int SWITCH = 58;\n /** RegularExpression Id. */\n int _TOKEN = 59;\n /** RegularExpression Id. */\n int TRUE = 60;\n /** RegularExpression Id. */\n int TRY = 61;\n /** RegularExpression Id. */\n int USING = 62;\n /** RegularExpression Id. */\n int WAITFOR = 63;\n /** RegularExpression Id. */\n int WHILE = 64;\n /** RegularExpression Id. */\n int INTEGER_LITERAL = 65;\n /** RegularExpression Id. */\n int DECIMAL_LITERAL = 66;\n /** RegularExpression Id. */\n int HEX_LITERAL = 67;\n /** RegularExpression Id. */\n int OCTAL_LITERAL = 68;\n /** RegularExpression Id. */\n int FLOATING_POINT_LITERAL = 69;\n /** RegularExpression Id. */\n int EXPONENT = 70;\n /** RegularExpression Id. */\n int CHARACTER_LITERAL = 71;\n /** RegularExpression Id. */\n int STRING_LITERAL = 72;\n /** RegularExpression Id. */\n int IDENTIFIER = 73;\n /** RegularExpression Id. */\n int LETTER = 74;\n /** RegularExpression Id. */\n int DIGIT = 75;\n /** RegularExpression Id. */\n int LPAREN = 76;\n /** RegularExpression Id. */\n int RPAREN = 77;\n /** RegularExpression Id. */\n int LBRACE = 78;\n /** RegularExpression Id. */\n int RBRACE = 79;\n /** RegularExpression Id. */\n int LBRACKET = 80;\n /** RegularExpression Id. */\n int RBRACKET = 81;\n /** RegularExpression Id. */\n int SEMICOLON = 82;\n /** RegularExpression Id. */\n int COMMA = 83;\n /** RegularExpression Id. */\n int DOT = 84;\n /** RegularExpression Id. */\n int MSG = 85;\n /** RegularExpression Id. */\n int ASSIGN = 86;\n /** RegularExpression Id. */\n int GT = 87;\n /** RegularExpression Id. */\n int LT = 88;\n /** RegularExpression Id. */\n int BANG = 89;\n /** RegularExpression Id. */\n int TILDE = 90;\n /** RegularExpression Id. */\n int COLON = 91;\n /** RegularExpression Id. */\n int EQ = 92;\n /** RegularExpression Id. */\n int LE = 93;\n /** RegularExpression Id. */\n int GE = 94;\n /** RegularExpression Id. */\n int NE = 95;\n /** RegularExpression Id. */\n int SC_OR = 96;\n /** RegularExpression Id. */\n int SC_AND = 97;\n /** RegularExpression Id. */\n int INCR = 98;\n /** RegularExpression Id. */\n int DECR = 99;\n /** RegularExpression Id. */\n int PLUS = 100;\n /** RegularExpression Id. */\n int MINUS = 101;\n /** RegularExpression Id. */\n int STAR = 102;\n /** RegularExpression Id. */\n int SLASH = 103;\n /** RegularExpression Id. */\n int BIT_AND = 104;\n /** RegularExpression Id. */\n int BIT_OR = 105;\n /** RegularExpression Id. */\n int XOR = 106;\n /** RegularExpression Id. */\n int REM = 107;\n /** RegularExpression Id. */\n int LSHIFT = 108;\n /** RegularExpression Id. */\n int RSIGNEDSHIFT = 109;\n /** RegularExpression Id. */\n int RUNSIGNEDSHIFT = 110;\n /** RegularExpression Id. */\n int PLUSASSIGN = 111;\n /** RegularExpression Id. */\n int MINUSASSIGN = 112;\n /** RegularExpression Id. */\n int STARASSIGN = 113;\n /** RegularExpression Id. */\n int SLASHASSIGN = 114;\n /** RegularExpression Id. */\n int ANDASSIGN = 115;\n /** RegularExpression Id. */\n int ORASSIGN = 116;\n /** RegularExpression Id. */\n int XORASSIGN = 117;\n /** RegularExpression Id. */\n int REMASSIGN = 118;\n /** RegularExpression Id. */\n int LSHIFTASSIGN = 119;\n /** RegularExpression Id. */\n int RSIGNEDSHIFTASSIGN = 120;\n /** RegularExpression Id. */\n int RUNSIGNEDSHIFTASSIGN = 121;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_SINGLE_LINE_COMMENT = 1;\n /** Lexical state. */\n int IN_FORMAL_COMMENT = 2;\n /** Lexical state. */\n int IN_MULTI_LINE_COMMENT = 3;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"//\\\"\",\n \"<token of kind 7>\",\n \"\\\"/*\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 12>\",\n \"\\\"abstract\\\"\",\n \"\\\"ack\\\"\",\n \"\\\"at\\\"\",\n \"\\\"behavior\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"break\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"called\\\"\",\n \"\\\"case\\\"\",\n \"\\\"catch\\\"\",\n \"\\\"char\\\"\",\n \"\\\"const\\\"\",\n \"\\\"continue\\\"\",\n \"\\\"default\\\"\",\n \"\\\"delay\\\"\",\n \"\\\"double\\\"\",\n \"\\\"enum\\\"\",\n \"\\\"else\\\"\",\n \"\\\"endif\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"false\\\"\",\n \"\\\"float\\\"\",\n \"\\\"for\\\"\",\n \"\\\"if\\\"\",\n \"\\\"implements\\\"\",\n \"\\\"import\\\"\",\n \"\\\"instanceof\\\"\",\n \"\\\"int\\\"\",\n \"\\\"interface\\\"\",\n \"\\\"later\\\"\",\n \"\\\"long\\\"\",\n \"\\\"loop\\\"\",\n \"\\\"module\\\"\",\n \"\\\"new\\\"\",\n \"\\\"null\\\"\",\n \"\\\"object\\\"\",\n \"\\\"on\\\"\",\n \"\\\"pass\\\"\",\n \"\\\"parent\\\"\",\n \"\\\"public\\\"\",\n \"\\\"reference\\\"\",\n \"\\\"self\\\"\",\n \"\\\"short\\\"\",\n \"\\\"super\\\"\",\n \"\\\"synchronized\\\"\",\n \"\\\"switch\\\"\",\n \"\\\"token\\\"\",\n \"\\\"true\\\"\",\n \"\\\"try\\\"\",\n \"\\\"using\\\"\",\n \"\\\"waitfor\\\"\",\n \"\\\"while\\\"\",\n \"<INTEGER_LITERAL>\",\n \"<DECIMAL_LITERAL>\",\n \"<HEX_LITERAL>\",\n \"<OCTAL_LITERAL>\",\n \"<FLOATING_POINT_LITERAL>\",\n \"<EXPONENT>\",\n \"<CHARACTER_LITERAL>\",\n \"<STRING_LITERAL>\",\n \"<IDENTIFIER>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\"<-\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"!\\\"\",\n \"\\\"~\\\"\",\n \"\\\":\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"||\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"++\\\"\",\n \"\\\"--\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"&\\\"\",\n \"\\\"|\\\"\",\n \"\\\"^\\\"\",\n \"\\\"%\\\"\",\n \"\\\"<<\\\"\",\n \"\\\">>\\\"\",\n \"\\\">>>\\\"\",\n \"\\\"+=\\\"\",\n \"\\\"-=\\\"\",\n \"\\\"*=\\\"\",\n \"\\\"/=\\\"\",\n \"\\\"&=\\\"\",\n \"\\\"|=\\\"\",\n \"\\\"^=\\\"\",\n \"\\\"%=\\\"\",\n \"\\\"<<=\\\"\",\n \"\\\">>=\\\"\",\n \"\\\">>>=\\\"\",\n \"\\\"?\\\"\",\n \"\\\"@\\\"\",\n };\n\n}", "public StructuredQName getVariableQName();", "public TermParser(){\n\t\tvar_map = new HashMap <String, Double>();\n\t\tvar_map.put(\"pi\", Math.PI);\n\t\tvar_map.put(\"e\", Math.E);\n\t\tclear();\n\t}", "@Override\n\tpublic void visit(UserVariable arg0) {\n\t\t\n\t}", "@Override\n\tpublic Code apply(Env env, ParseTree t) {\n\t\treturn new VarNameCode(env.s(t));\n\t}", "final public void ClassName() throws ParseException {\n jj_consume_token(IDENTIFIER);\n label_24:\n while (true) {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n case 98:\n ;\n break;\n default:\n jj_la1[104] = jj_gen;\n break label_24;\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n jj_consume_token(88);\n jj_consume_token(IDENTIFIER);\n break;\n case 98:\n jj_consume_token(98);\n jj_consume_token(IDENTIFIER);\n break;\n default:\n jj_la1[105] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n }\n }", "public interface DefccConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int MODULE_TKN = 11;\n /** RegularExpression Id. */\n int CLASS_TKN = 12;\n /** RegularExpression Id. */\n int INCLUDE_TKN = 13;\n /** RegularExpression Id. */\n int BYTE_TKN = 14;\n /** RegularExpression Id. */\n int BOOLEAN_TKN = 15;\n /** RegularExpression Id. */\n int INT_TKN = 16;\n /** RegularExpression Id. */\n int LONG_TKN = 17;\n /** RegularExpression Id. */\n int FLOAT_TKN = 18;\n /** RegularExpression Id. */\n int DOUBLE_TKN = 19;\n /** RegularExpression Id. */\n int STRING_TKN = 20;\n /** RegularExpression Id. */\n int BUFFER_TKN = 21;\n /** RegularExpression Id. */\n int VECTOR_TKN = 22;\n /** RegularExpression Id. */\n int MAP_TKN = 23;\n /** RegularExpression Id. */\n int LBRACE_TKN = 24;\n /** RegularExpression Id. */\n int RBRACE_TKN = 25;\n /** RegularExpression Id. */\n int LT_TKN = 26;\n /** RegularExpression Id. */\n int GT_TKN = 27;\n /** RegularExpression Id. */\n int SEMICOLON_TKN = 28;\n /** RegularExpression Id. */\n int COMMA_TKN = 29;\n /** RegularExpression Id. */\n int DOT_TKN = 30;\n /** RegularExpression Id. */\n int CSTRING_TKN = 31;\n /** RegularExpression Id. */\n int IDENT_TKN = 32;\n /** RegularExpression Id. */\n int IDENT_TKN_W_DOT = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int WithinOneLineComment = 1;\n /** Lexical state. */\n int WithinMultiLineComment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"//\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"/*\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"module\\\"\",\n \"\\\"class\\\"\",\n \"\\\"include\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"int\\\"\",\n \"\\\"long\\\"\",\n \"\\\"float\\\"\",\n \"\\\"double\\\"\",\n \"\\\"string\\\"\",\n \"\\\"buffer\\\"\",\n \"\\\"vector\\\"\",\n \"\\\"map\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"<CSTRING_TKN>\",\n \"<IDENT_TKN>\",\n \"<IDENT_TKN_W_DOT>\",\n };\n\n}", "@Override\n\tpublic VariableInfo[] getVariableInfo(final TagData data) {\n\t\t// loop through and expose all attributes\n\t\tfinal List<VariableInfo> vars = new ArrayList<VariableInfo>();\n\n\t\ttry {\n\t\t\tString clazz = data.getAttributeString(\"className\");\n\n\t\t\tif (clazz == null) {\n\t\t\t\tclazz = Constants.class.getName();\n\t\t\t}\n\n\t\t\tfinal Class c = Class.forName(clazz);\n\n\t\t\t// if no var specified, get all\n\t\t\tif (data.getAttributeString(\"var\") == null) {\n\t\t\t\tfinal Field[] fields = c.getDeclaredFields();\n\n\t\t\t\tAccessibleObject.setAccessible(fields, true);\n\n\t\t\t\tfor (final Field field : fields) {\n\t\t\t\t\tfinal String type = field.getType().getName();\n\t\t\t\t\tvars.add(new VariableInfo(field.getName(), ((field\n\t\t\t\t\t\t\t.getType().isArray()) ? type.substring(2,\n\t\t\t\t\t\t\ttype.length() - 1)\n\t\t\t\t\t\t\t+ \"[]\" : type), true, VariableInfo.AT_END));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfinal String var = data.getAttributeString(\"var\");\n\t\t\t\tfinal String type = c.getField(var).getType().getName();\n\t\t\t\tvars.add(new VariableInfo(c.getField(var).getName(), ((c\n\t\t\t\t\t\t.getField(var).getType().isArray()) ? type.substring(2,\n\t\t\t\t\t\ttype.length() - 1) + \"[]\" : type), true,\n\t\t\t\t\t\tVariableInfo.AT_END));\n\t\t\t}\n\t\t} catch (final Exception cnf) {\n\t\t\tthis.log.error(cnf.getMessage());\n\t\t\tcnf.printStackTrace();\n\t\t}\n\n\t\treturn vars.toArray(new VariableInfo[] {});\n\t}", "public VariableDeclarationsParser(WookieParserTD parent) {\n\t\tsuper(parent);\n\t}", "DataParamNode DataParamNode(Token t, String text);", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}" ]
[ "0.610609", "0.59114903", "0.5825624", "0.5706994", "0.55897725", "0.55883116", "0.5575416", "0.55416256", "0.5517347", "0.5510718", "0.5491513", "0.54818887", "0.54790485", "0.54356986", "0.5418458", "0.5388573", "0.53718626", "0.53419554", "0.53043735", "0.53004587", "0.529977", "0.52969134", "0.52929646", "0.5264216", "0.5259977", "0.5238216", "0.5230012", "0.522248", "0.520542", "0.51930535", "0.5172369", "0.5164427", "0.5160214", "0.5139258", "0.5117002", "0.5096025", "0.50758076", "0.50739366", "0.50683826", "0.5060089", "0.50453633", "0.5040579", "0.5030381", "0.5027774", "0.5026644", "0.5026644", "0.500544", "0.5005097", "0.49990568", "0.49784145", "0.4967172", "0.49460542", "0.49409026", "0.49378827", "0.49373457", "0.49339628", "0.49280018", "0.49275205", "0.49234822", "0.49230105", "0.49217874", "0.4916237", "0.4909455", "0.4908593", "0.49058768", "0.4886085", "0.48725292", "0.48724094", "0.4870494", "0.48669893", "0.48659673", "0.48610407", "0.48602566", "0.48600686", "0.48596552", "0.4854859", "0.4853154", "0.4848516", "0.48392832", "0.48366654", "0.48306713", "0.48286903", "0.48152083", "0.48122784", "0.48112455", "0.47939923", "0.4787544", "0.478596", "0.4784984", "0.4784058", "0.47837353", "0.47815546", "0.477568", "0.47690183", "0.47681797", "0.47636187", "0.47621575", "0.4760797", "0.47558203", "0.47504413" ]
0.5781246
3
/Throws IllegalArgumentException if not semantically valid or variable wasn't declared Note: we throw an exception instead of storing the errors in a list due to it making more sense in the context of the application, as the users are also allowed to write the script line by line. We leave the return false as a comment so the reader can see what an implementation that recursively returns the result would look like.
@Override public Boolean visitVariableAttribution(FormScriptGrammarParser.VariableAttributionContext ctx) { if (!declaredVariables.containsKey(ctx.VARIABLE().getText())) { // this is validated in UI/controlled by flow in the UI so should never happen, but it remains here just in case throw new IllegalArgumentException("Semantic error at line: " + ctx.getStart().getLine() + ": variable " + ctx.VARIABLE().getText() + " wasn't declared!"); // return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw } DataType dataType = declaredVariables.get(ctx.VARIABLE().getText()); boolean correctType = dataType.lexerValue().equals(ctx.value().start.getType()); /*will verify if the attribution is actually semantically valid, e.g if the variable was defined as an INTEGER, it can't be assigned a DATE*/ if (!correctType) { throw new IllegalArgumentException("Semantic error at line: " + ctx.getStart().getLine() + ":" + ctx.getStart().getCharPositionInLine() + ": Invalid attribution type!" + " variable " + ctx.VARIABLE().getText() + " can't be assigned the value " + ctx.value().getText()); // return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw } //verify if operators are valid in the context of the datatype String operator = ctx.COMPARISON_OPERATORS().getText(); if (operator.equals("<") || operator.equals(">")) { if (dataType.equals(DataType.BOOLEAN) || dataType.equals(DataType.DATE) || dataType.equals(DataType.FILE)) { throw new IllegalArgumentException("Semantic error at line: " + ctx.getStart().getLine() + ":" + ctx.getStart().getCharPositionInLine() + ": Invalid comparison type!" + " variable " + ctx.VARIABLE().getText() + " can't be compared with operator '" + operator + "'"); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract void checkWhetherVariable(SyntaxUnit use);", "@Override\n public Boolean visitDeclaration(FormScriptGrammarParser.DeclarationContext ctx) {\n DataType dataType = DataType.valueOf(ctx.type.getText());\n if (declaredVariables.get(ctx.name.getText()) != null) { // if variable already declared\n throw new IllegalArgumentException(\"Error at line: \" + ctx.name.getLine() + \":\" + ctx.name.getCharPositionInLine()\n + \" variable \" + ctx.name.getText() + \" was already previously declared!\");\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n declaredVariables.put(ctx.name.getText(), dataType);\n return true;\n }", "public void correctErrors();", "boolean isTroubled( ExpressionExperiment expressionExperiment );", "public void testSingleVar() { assertValid(\"int a;\"); }", "public boolean validateInput() {\n/* 158 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void checkValue(Variable toBeVariable) throws MethodCallWithNonexistentParameter {\n if (!toBeVariable.hasValue()) {\n throw new MethodCallWithNonexistentParameter();\n }\n }", "public boolean hasErrors();", "@Test\n\t/**\n\t * Testing the basic expressions.\n\t * Testing:\n\t * - A correct sample program.\n\t * - A sample program containing spelling and context free errors.\n\t * - A sample program containing context errors.\n\t * - A sample program containing runtime errors.\n\t * \n\t * @throws ParseException\n\t * @throws IOException\n\t */\n\tpublic void basicExprTest() throws ParseException, IOException{\n\t\tint[] input = {0, 1, 0, 99, 2, 1, 2, 0, 0, 99};\n\t\tint[] output = {1, 0, -1, 0, 1, -1, 0, 99, 97, -1, 2, 1, 2, 0, -1, 0, 1, 0, -1, 97, -1, 2, -1, 98};\n\t\tcheckRuntime(\"basicExprCorrect\", input, output);\n\t\t\n\t\t/** Check whether a program contains syntax errors. */\n\t\tcheckFail(\"basicExprSpellingContextFreeSyntaxError\");\n\t\t\n\t\t/** Check whether a program contains the given errors. */\n\t\tSet<String> errors = new HashSet<String>();\n\t\terrors.add(\"Line 10:1 - Variable 'z' is immutable.\");\n\t\terrors.add(\"Line 13:3 - Expected type 'Integer' but found 'Boolean'\");\n\t\terrors.add(\"Line 15:5 - Expected type 'Boolean' but found 'Char'\");\n\t\terrors.add(\"Line 17:10 - Expected type 'Integer' but found 'Char'\");\n\t\terrors.add(\"Line 17:1 - Expected type 'Integer' but found 'Boolean'\");\n\t\terrors.add(\"Line 18:1 - Expected type 'Integer' but found 'Char'\");\n\t\terrors.add(\"Line 18:16 - Expected type 'Integer' but found 'Char'\");\n\t\terrors.add(\"Line 19:7 - Expected type 'Boolean' but found 'Integer'\");\n\t\terrors.add(\"Line 19:13 - Expected type 'Boolean' but found 'Char'\");\n\t\terrors.add(\"Line 22:1 - Expected type 'Integer' but found 'Boolean'\");\t\t\n\t\terrors.add(\"Line 23:1 - Expected type 'Char' but found 'Integer'\");\n\t\terrors.add(\"Line 26:5 - Expected type 'Char' but found 'Integer'\");\n\t\terrors.add(\"Line 27:5 - Expected type 'Boolean' but found 'Integer'\");\n\t\terrors.add(\"Line 30:1 - 'p' not defined in scope\");\n\t\terrors.add(\"Line 30:1 - Variable 'p' not declared\");\n\t\terrors.add(\"Line 30:4 - 'q' not defined in scope\");\n\t\terrors.add(\"Line 30:4 - Variable 'q' not declared\");\n\t\terrors.add(\"Line 37:1 - Expected type 'null' but found 'Char'\");\n\t\terrors.add(\"Line 38:58 - Expected type not null but found 'null'\");\n\t\tcheckContextFail(\"basicExprContextError\", errors);\n\t\t\n\t\t/** Check whether a program gives a runtime error. */\n\t\tcheckRuntimeFail(\"basicExprRuntimeError\");\n\t}", "@Test\n\t/**\n\t * Testing the functions and procedures.\n\t * Testing:\n\t * - A correct sample program.\n\t * - A sample program containing spelling and context free errors.\n\t * - A sample program containing context errors.\n\t * - A sample program containing runtime errors.\n\t * \n\t * @throws ParseException\n\t * @throws IOException\n\t */\n\tpublic void functionTest() throws ParseException, IOException{\n\t\tint[] input = {13};\n\t\tint[] output = {10, 0, 589, 233};\n\t\tcheckRuntime(\"functionCorrect\", input, output);\n\t\t\n\t\t/** Check whether a program contains syntax errors. */\n\t\tcheckFail(\"functionSpellingContextFreeSyntaxError\");\n\t\t\n\t\t/** Check whether a program contains the given errors. */\n\t\tSet<String> errors = new HashSet<String>();\n\t\terrors.add(\"Line 6:1 - No return statements are allowed.\");\n\t\terrors.add(\"Line 28:31 - 'ivar2' not defined in scope\");\n\t\terrors.add(\"Line 38:27 - Expected type 'Boolean' but found 'Integer'\");\n\t\terrors.add(\"Line 39:47 - Expected type 'Char' but found 'Integer'\");\n\t\terrors.add(\"Line 46:35 - Expected type not null but found 'null'\");\n\t\terrors.add(\"Line 48:28 - 'ivar3' already defined within the scope\");\n\t\terrors.add(\"Line 48:36 - 'function5' not defined in scope\");\n\t\terrors.add(\"\");\t//Because \"Line 48:36 - 'function5' not defined in scope\" is noticed twice\n\t\terrors.add(\"Line 48:36 - Expected type not null but found 'null'\");\n\t\tcheckContextFail(\"functionContextError\", errors);\n\t\t\n\t\t/** Check whether a program gives a runtime error. */\n\t\tcheckRuntimeFail(\"functionRuntimeError\");\n\t}", "public boolean needsProblem();", "boolean hasErrors();", "public abstract boolean isParseCorrect();", "boolean getPossiblyBad();", "protected void errorSyntaxis(){\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint pos = fun.length;\n\t\tfor(int i = pos; i > 0;i--)\n\t\t\tvalidSyntaxis(Arrays.copyOfRange(fun,0,i));\n\t}", "public abstract String check() throws Exception;", "@Test\n\t/**\n\t * Testing the conditional statements.\n\t * Testing:\n\t * - A correct sample program.\n\t * - A sample program containing spelling and context free errors.\n\t * - A sample program containing context errors.\n\t * - A sample program containing runtime errors.\n\t * \n\t * @throws ParseException\n\t * @throws IOException\n\t */\n\tpublic void conditionalTest() throws ParseException, IOException{\n\t\tint[] input = {5, 4, 10, 6, 99};\n\t\tint[] output = {1, -1, 5, 5, 99, 5, -1, 99};\n\t\tcheckRuntime(\"conditionalCorrect\", input, output);\n\t\t\n\t\t/** Check whether a program contains syntax errors. */\n\t\tcheckFail(\"conditionalSpellingContextFreeSyntaxError\");\n\t\t\n\t\t/** Check whether a program contains the given errors. */\n\t\tSet<String> errors = new HashSet<String>();\n\t\terrors.add(\"Line 36:24 - Expected type 'Boolean' but found 'Char'\");\n\t\terrors.add(\"Line 34:10 - Expected type 'Boolean' but found 'Integer'\");\n\t\terrors.add(\"Line 39:9 - Expected type not null but found 'null'\");\n\t\terrors.add(\"Line 44:10 - Expected type not null but found 'null'\");\n\t\terrors.add(\"Line 58:10 - 'ivar4' not defined in scope\");\n\t\terrors.add(\"Line 61:9 - 'ivar3' not defined in scope\");\n\t\terrors.add(\"Line 65:1 - Expected type 'Boolean' but found 'Integer'\");\n\t\terrors.add(\"Line 103:1 - Expected type 'Char' but found 'Boolean'\");\n\t\terrors.add(\"Line 132:1 - Expected type 'Integer' but found 'Char'\");\n\t\tcheckContextFail(\"conditionalContextError\", errors);\n\t\t\n\t\t/** Check whether a program gives a runtime error. */\n\t\tcheckRuntimeFail(\"conditionalRuntimeError\", 1);\n\t}", "boolean isError();", "public void validate () { throw new RuntimeException(); }", "void check() throws YangException;", "boolean hadErrors();", "static int checkErrors(String fString){ //throws GrafProg.GrafObjects.Function.FunctionFormatException{\n int errorCode = 0;\n int leftCount = 0;\n int rightCount = 0;\n if (tokensOK(fString)){\n for (int counter = 0; counter < fString.length(); counter++){\n if (fString.charAt(counter) =='(') leftCount++;\n else if (fString.charAt(counter) ==')') rightCount++;\n //else if ((fString.charAt(counter) =='^') && (fString.charAt(counter+1) == '-')) errorCode = 3; //not sure why I disallowed negative exponents\n else if (isaNonMinusOperator(fString.charAt(counter)) && (isaNonMinusOperator(fString.charAt(counter+1)))) return 4; //don't allow two consecutive operators\n else if ((fString.charAt(counter) == '-') && (isaNonMinusOperator(fString.charAt(counter+1)))) return 4;\n else if (fString.substring(fString.length() - 1).equals(\"-\")) return 4;\n else if (fString.substring(fString.length() - 1).equals(\"+\")) return 4;\n else if (fString.substring(fString.length() - 1).equals(\"*\")) return 4;\n else if (fString.substring(fString.length() - 1).equals(\"/\")) return 4;\n else if (fString.substring(fString.length() - 1).equals(\"(\")) return 4;\n }\n }else return 6; //bad tokens in string\n if (leftCount != rightCount) return 2;//non-matching parentheses\n //if (errorCode != 0) throw new GrafProg.GrafObjects.Function.FunctionFormatException();\n return errorCode;\n }", "@Test\r\n public void testInvalidModuloAssignmentExpressionWithSIUnits3() throws IOException {\n checkError(\"varS%=3\", \"0xA0189\");\r\n }", "private boolean validateUserInputs() {\n ArrayList<String> errors = new ArrayList();\n \n if (this.view.getContent().equals(\"\")) {\n errors.add(\"\\t - Enter a comment\");\n }\n \n if (errors.size() > 0) {\n String errorMsg = \"Unable to save new Asset.\\nDetails:\";\n for (String error : errors) {\n errorMsg += \"\\n\" + error;\n }\n JOptionPane.showMessageDialog(this.view, errorMsg, \"Unable to Save\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n return true;\n }", "void checkReturnSt (int ln) {\r\n if (!return_type.isVoid ())\r\n OzcError.needReturnSt (ln);\r\n else \r\n need_return = true;\r\n }", "private void checkRep() {\n\t\tif (CHECK_CONSTANT) {\n\t\tassert (label != null && childNode != null);\n\t\t}\n\t}", "public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException {\n boolean hasPropertyAgnosticType = false;\n EventType[] types = validationContext.getStreamTypeService().getEventTypes();\n for (int i = 0; i < validationContext.getStreamTypeService().getEventTypes().length; i++) {\n if (types[i] instanceof EventTypeSPI) {\n hasPropertyAgnosticType |= ((EventTypeSPI) types[i]).getMetadata().isPropertyAgnostic();\n }\n }\n\n if (!hasPropertyAgnosticType) {\n // the variable name should not overlap with a property name\n try {\n validationContext.getStreamTypeService().resolveByPropertyName(variableName, false);\n throw new ExprValidationException(\"The variable by name '\" + variableName + \"' is ambigous to a property of the same name\");\n } catch (DuplicatePropertyException e) {\n throw new ExprValidationException(\"The variable by name '\" + variableName + \"' is ambigous to a property of the same name\");\n } catch (PropertyNotFoundException e) {\n // expected\n }\n }\n\n VariableMetaData variableMetadata = validationContext.getVariableService().getVariableMetaData(variableName);\n if (variableMetadata == null) {\n throw new ExprValidationException(\"Failed to find variable by name '\" + variableName + \"'\");\n }\n isPrimitive = variableMetadata.getEventType() == null;\n variableType = variableMetadata.getType();\n if (optSubPropName != null) {\n if (variableMetadata.getEventType() == null) {\n throw new ExprValidationException(\"Property '\" + optSubPropName + \"' is not valid for variable '\" + variableName + \"'\");\n }\n eventTypeGetter = ((EventTypeSPI) variableMetadata.getEventType()).getGetterSPI(optSubPropName);\n if (eventTypeGetter == null) {\n throw new ExprValidationException(\"Property '\" + optSubPropName + \"' is not valid for variable '\" + variableName + \"'\");\n }\n variableType = variableMetadata.getEventType().getPropertyType(optSubPropName);\n }\n\n readersPerCp = validationContext.getVariableService().getReadersPerCP(variableName);\n if (variableMetadata.getContextPartitionName() == null) {\n readerNonCP = readersPerCp.get(EPStatementStartMethod.DEFAULT_AGENT_INSTANCE_ID);\n }\n variableType = JavaClassHelper.getBoxedType(variableType);\n return null;\n }", "private static Boolean errorCheck(String Buffer){\n if(Buffer.matches(\"Y\")) return true;\n if(Buffer.matches(\"N\")) return false;\n screenClear(); //Clears the screen and applies an error message.\n return moreInput(); //Recursive repeat upon error.\n }", "@Test\n\tpublic void testMakeSureVarVariablesCanShadowLetVariables()\n\t{\n\t\tString[] code = {\n\t\t\t\"let a = 1;\",\n\t\t \"let b = 2;\",\n\t\t \"var c = 3;\",\n\n\t\t \"function sup(a) {\",\n\t\t \"var b = 4;\",\n\t\t \"let c = 5;\",\n\t\t \"let d = 6;\",\n\t\t \"if (false) {\",\n\t\t \"var d = 7;\",\n\t\t \"}\",\n\t\t \"return b + c + a + d;\",\n\t\t \"}\",\n\n\t\t \"sup();\"\n\t\t};\n\t\t\n\t\tth.addError(1, 5, \"'a' is defined but never used.\");\n\t th.addError(2, 5, \"'b' is defined but never used.\");\n\t th.addError(3, 5, \"'c' is defined but never used.\");\n\t th.addError(9, 5, \"'d' has already been declared.\");\n\t\tth.test(code, new LinterOptions().set(\"esnext\", true).set(\"unused\", true).set(\"undef\", true).set(\"funcscope\", true));\n\t}", "public boolean hasError();", "@Override\n public String semanticChecker(SymbolTable table){\n \tSymbolTable top = table;\n \tSymbolTable test;\n \twhile(top.ascend() != null){\n \t top = top.ascend();\n \t}\n \ttest = null;\n \n \t//check if variable exist\n \tif(top.locate(name) != null || (test = table.locate(name)) != null){\n \t return \"semantic error\"; //syntaxError\n \t}\n \n \t//create new entry\n \ttable.newEntry(type, name);\n \n \treturn type; //yeah baby!\n }", "boolean hasError();", "boolean hasError();", "boolean hasError();", "public String validate() {\n\n // validate input source\n int inputCounts = 0;\n if (!inputFiles.isEmpty())\n inputCounts++;\n if (inputDescriptor != null)\n inputCounts++;\n if (stdin)\n inputCounts++;\n if (stdinDescriptor)\n inputCounts++;\n if (customInputStream != null)\n inputCounts++;\n\n if (inputCounts == 0)\n return \"Must specify at least one input source.\";\n if (inputCounts > 1)\n return \"Please specify only one type of input source.\";\n\n\n // validate output target\n int outputCounts = 0;\n if (outputDir != null)\n outputCounts++;\n if (outputFile != null)\n outputCounts++;\n if (stdout)\n outputCounts++;\n\n if (outputCounts == 0)\n return \"Must specify an output target.\";\n if (outputCounts > 1)\n return \"Please specify only one output target.\";\n\n if (outputLang != null) {\n if (outputFile != null)\n return \"Native java/python compilation cannot be used with the --outputFile option\";\n if (stdout)\n return \"Native java/python compilation cannot be used with the --stdout option\";\n }\n\n return null;\n }", "private void checkSafety() {\n\t\tSet<VariableTerm> bindingVariables = new HashSet<>();\n\t\tSet<VariableTerm> nonbindingVariables = new HashSet<>();\n\n\t\t// Check that all negative variables occur in the positive body.\n\t\tfor (Atom posAtom : bodyAtomsPositive) {\n\t\t\tbindingVariables.addAll(posAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(posAtom.getNonBindingVariables());\n\t\t}\n\n\t\tfor (Atom negAtom : bodyAtomsNegative) {\n\t\t\t// No variables in a negated atom are binding.\n\t\t\tnonbindingVariables.addAll(negAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(negAtom.getNonBindingVariables());\n\t\t}\n\n\t\t// Rule heads must be safe, i.e., all their variables must be bound by the body.\n\t\tif (!isConstraint()) {\n\t\t\tnonbindingVariables.addAll(headAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(headAtom.getNonBindingVariables());\n\t\t}\n\n\t\t// Check that all non-binding variables are bound in this rule.\n\t\tnonbindingVariables.removeAll(bindingVariables);\n\n\t\tif (nonbindingVariables.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new RuntimeException(\"Encountered unsafe variable \" + nonbindingVariables.iterator().next().toString() + \" in rule: \" + toString()\n\t\t\t\t+ System.lineSeparator() + \"Notice: A rule is considered safe if all variables occurring in negative literals, builtin atoms, and the head of the rule also occur in some positive literal.\");\n\t}", "@Test\r\n public void testInvalidDecPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"--varS\", \"0xA0173\");\r\n }", "@Test\r\n public void testInvalidDoubleLeftAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M<<=3 m\", \"0xA0187\");\r\n }", "boolean hasErrormessage();", "@Test\r\n public void testInvalidModuloAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S%=3m\", \"0xA0189\");\r\n }", "public interface ATypeCheckNode {}", "private static boolean checkForSyntaxErrors(String line, int lineCounter) {\n boolean good = true;\n if (checkIfNested(line)) {\n if (checkFirstLastTag(line)) {\n System.out.println(\"Error on line \" + lineCounter + \": Error type : Syntax \" + \": Bad nested tags : \" + line.charAt(1) + \" : \" + line.charAt(line.length() - 2));\n good = false;\n }\n if (!checkForInnerTags(line, lineCounter)) {\n System.out.println(\"Error on line \" + lineCounter + \": Error type : Syntax \" + \": Inner tag issue\");\n good = false;\n }\n } else {\n if (brackets(line)) {\n if (line.charAt(1) == '<' || line.charAt(line.length() - 2) == '>') {\n System.out.println(\"Error on line \" + lineCounter + \": Error type : Syntax \" + \": Extra bracket\");\n good = false;\n }\n } else {\n System.out.println(\"Error on line \" + lineCounter + \": Error type : Syntax \" + \": Not closed brackets\");\n good = false;\n }\n }\n return good;\n }", "@Test\r\n public void testInvalidDoubleLeftAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM<<=3\", \"0xA0187\");\r\n }", "private String syntax(ArrayList<String> tokens){\r\n String tkn=\"Done\";\r\n boolean VarDeclFlag = true;\r\n boolean exitFlag = false;\r\n ArrayList<String> temp = new ArrayList<>();\r\n //TODO return error\r\n //TODO return error method\r\n for(int i=0; i<tokens.size(); i++){\r\n if(VarDeclFlag){ \r\n if(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isLeftParen(tokens.get(i))){\r\n VarDeclFlag=false;\r\n tokensDef.add(\"LeftParen\");\r\n i++;\r\n while(!isRightParen(tokens.get(i)) && exitFlag){\r\n if(exitFlag && !isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n if(tokens.get(i).endsWith(\",\")){\r\n\t\t\t\t\t\t\t\t\t\r\n if(isId(removeLast(tokens.get(i)))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n }\r\n }\r\n else{\r\n if(isId(tokens.get(i))){\r\n exitFlag = true;\r\n tokensDef.add(\"Var\");\r\n i++; \r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n\t\tif(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isLeftParen(tokens.get(i))){\r\n VarDeclFlag=false;\r\n\t\t\ttokensDef.add(\"LeftParen\");\r\n i++;\r\n if(!isRightParen(tokens.get(i))){\r\n while(!isRightParen(tokens.get(i))){\r\n if(exitFlag && !isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n if(tokens.get(i).endsWith(\",\")){\r\n if(isId(removeLast(tokens.get(i)))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n }\r\n else \r\n return \"error\";\r\n }\r\n else{\r\n if(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isRightParen(tokens.get(i))){\r\n tokensDef.add(\"RightParen\");\r\n i++;\r\n }\r\n else\r\n return \"error\";\r\n }\r\n }\r\n \r\n }\r\n }\r\n else{\r\n tokensDef.add(\"RightParen\");\r\n i++;\r\n } \r\n }\r\n }\r\n }\r\n }\r\n\t\t\r\n return tkn;\r\n \r\n }", "@Override\n public boolean hasValenceError() {\n String valenceCheck = atom.checkBadValence();\n//\n// System.out.println(\"valenceCheckBad \" + valenceCheck);\n// System.out.println(\"calling actual checkValence \" + atom.checkValence());\n// System.out.println(\"valenceCheckBad again \" + atom.checkBadValence());\n return !valenceCheck.isEmpty();\n }", "@Test\r\n public void testInvalidOrAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M|=3 m\", \"0xA0184\");\r\n }", "public Node typeCheck () {\n\tif (declist!=null) \n\t for (Node dec:declist)\n\t\tdec.typeCheck();\n if ( !(FOOLlib.isSubtype(body.typeCheck(),type)) ){\n System.out.println(\"Wrong return type for function \"+id);\n System.exit(0);\n } \n return null;\n }", "boolean hasPossiblyBad();", "@Test\r\n public void testInvalidModuloAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varD_S%=3\", \"0xA0189\");\r\n }", "public abstract boolean hasWarning();", "@Test\n\tpublic void testExoticGood() {\n\t\tassertNoException(\"int foo(int a) { return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int b = 42; } return a; }\", \"(a (b))\");\n\t\tassertNoException(\"int foo(int a) { int c = -1; { int b = a; c = b + 3; } return c; }\", \"(a, c (b))\");\n\t\tassertNoException(\"int foo(int a) { a = 42; return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int a = 42; } return a; }\", \"(a (a))\");\n\t}", "@Test\r\n public void testInvalidMinusPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"-varS\", \"0xA0175\");\r\n }", "@Test\r\n public void testInvalidOrAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM|=3\", \"0xA0184\");\r\n }", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "@Override\n public String checkRule() {\n if (line.matches(\"^\\\\D+$\")) {\n return (\"Complies rule 'Has no numbers' \\n\");\n } else {\n return \"\";\n }\n }", "@Test\n public void semanticError_badID_prog_idsdifferent() {\n\n List<String> code = new ArrayList<>();\n code.add(\"CD19 Prog\");\n code.add(\"main\");\n code.add(\"a : integer\");\n code.add(\"begin\");\n code.add(\"a = 5;\");\n code.add(\"end\");\n code.add(\"CD19 blag\");\n\n Scanner scanner = new Scanner(new CodeFileReader(code));\n List<Token> tokens = scanner.getAllTokens();\n\n Parser parser = new Parser(tokens);\n TreeNode tree = parser.parse();\n\n System.out.println(tree.prettyPrintTree());\n for (SemanticErrorMessage message : parser.getSemanticErrors())\n System.out.println(message.printAll());\n\n for (SyntacticErrorMessage message : parser.getSyntacticErrors())\n System.out.println(message.printAll());\n\n assertEquals(true, parser.getSemanticErrors().size() == 1);\n assertEquals(true, parser.getSemanticErrors().get(0).getErrorMessage().contains(\"Start and End\"));\n\n assertEquals(true, parser.isSyntacticallyValid());\n assertEquals(false, parser.isSemanticallyValid());\n\n }", "@Test\r\n public void testInvalidPlusPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"+varS\", \"0xA0174\");\r\n }", "private static void printErrorMessage() {\n System.out.println(\"Oh no! It looks like I wasn't able to understand the arguments you passed in :(\"\n + \"\\nI can only handle arguments passed in a format like the following: 1/2 * 3/4\\n\");\n }", "@Test\r\n public void testInvalidDivideAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M/=\\\"Hello\\\"\", \"0xA0179\");\r\n }", "protected abstract int isValidInput();", "public boolean isContentInvalid() {\n/* 1156 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "boolean hasWarnings();", "public abstract Error errorCheck(Model m, String command);", "private static String checkReturn(String code) {\n if (!code.contains(\"return\")) {\n long numberOfSemiColons = code.chars().filter(c -> c == ';').count();\n if (numberOfSemiColons <= 1 && !code.contains(\"throw\")) {\n return \"return \".concat(code);\n }\n }\n return code;\n }", "private void checkNotUnknown() {\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }", "@Test\r\n public void testInvalidAndAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM&=2\", \"0xA0183\");\r\n }", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM = 3 m\", \"0xA0182\");\r\n }", "boolean isFail();", "private boolean User_Input() {\r\n \r\n if ( Get_Now_Token_Tpye() == VOID\r\n || Get_Now_Token_Tpye() == INT\r\n || Get_Now_Token_Tpye() == FLOAT\r\n || Get_Now_Token_Tpye() == CHAR\r\n || Get_Now_Token_Tpye() == STRING\r\n || Get_Now_Token_Tpye() == BOOL ) { \r\n // 先不要拿\r\n if ( Definition() ) { // 如果是 Definition()\r\n System.out.print( \"> \" ) ;\r\n Print_Definition() ;\r\n return true ;\r\n } // if()\r\n else { // 不是 Definition()\r\n Print_Error( Get_Error_Token(), Get_Error_Type(), Get_Error_Token_No_Id() ) ;\r\n return false ;\r\n } // else()\r\n } // if()\r\n else if ( Statement() ) { // 如果是 Statement()\r\n \r\n System.out.print( \"> \" ) ;\r\n \r\n if ( Return_ListAllVariables() ) { // 印出所有全域變數 // 由小到大\r\n Print_ListAllVariables() ;\r\n } // if()\r\n else if ( Return_ListAllFunctions() ) { // 印出所有 Function 名稱 // 由小到大\r\n Print_ListAllFunctions() ;\r\n } // else if()\r\n else if ( Return_ListVariable() ) { // 印出一個 已定義的變數 以及型別\r\n Print_ListVariable() ;\r\n } // else if()\r\n else if ( Return_ListFunction() ) { // 印出一個 已定義的 Function\r\n Print_ListFunction() ;\r\n } // else if()\r\n \r\n if ( !Return_Done() ) { // 如果不是 Done();\r\n Print_Statement() ;\r\n } // if()\r\n \r\n return true ;\r\n } // else if()\r\n else { // 都不是\r\n Print_Error( Get_Error_Token(), Get_Error_Type(), Get_Error_Token_No_Id() ) ;\r\n return false ;\r\n } // else()\r\n \r\n }", "public org.apache.spark.ml.param.Param<java.lang.String> handleInvalid () { throw new RuntimeException(); }", "@Test\r\n public void testInvalidAndAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M&=varI_M\", \"0xA0183\");\r\n }", "private int[] checkFunction(String arg, int[] argumentData) throws ParseException {\n\t\tint index = argumentData[0];\n\t\tint end = argumentData[1];\n\t\tint type = argumentData[2];\n\t\t\n\t\tString function = ParsingUtils.nextWord(arg, index + 1);\t\t\n\t\tif(!info.checkForFunction(function)){\n\t\t\tParseException ex=new ParseException(\"could not find function \" + function, index);\n\t\t\tErrorUtils.parseError(arg,\"could not find function \" + function ,ex,verbose);\n\t\t}\n\t\tint numberOfArguments = 0;\n\t\ttry{\n\t\t\tnumberOfArguments = ParsingUtils.numberOfArg(arg, index, end);\n\t\t} catch (ParseException ex) {\n\t\t\tErrorUtils.parseError(arg, \"Could not find the closing index for string\", ex, verbose);\n\t\t}\n\t\ttree.grow(function, numberOfArguments);\n\t\t\n\t\ttype = ensureProperArguments(arg, function, index, end, numberOfArguments);\n\t\t\n\t\tif (type == ERROR){\n\t\t\tParseException ex=new ParseException(\"Something had the wrong type\",index);\n\t\t\tErrorUtils.parseError(arg,\"Something had the wrong type\",ex,verbose);\n\t\t}\n\n\t\treturn new int[] {index,end,type};\n\t}", "@Test\r\n public void testInvalidDivideAssignmentExpressionWithSIUnits3() throws IOException {\n checkError(\"varM/=varM\", \"0xA0179\");\r\n }", "public void testManyVariablesAcrossCallsOk() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), (f(X, Y, Z) :- g(X), g(Y), g(Z))], (?- f(X, X, X)), [[X <-- x]]]\");\n }", "public boolean isValid() {\r\n/* */ try {\r\n/* 326 */ validate();\r\n/* 327 */ } catch (ValidationException vex) {\r\n/* 328 */ return false;\r\n/* */ } \r\n/* 330 */ return true;\r\n/* */ }", "abstract void checkWhetherFunction(int nParamsUsed, SyntaxUnit use);", "public abstract boolean validate();", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n SystemInUtil.addInputLine(\")\");\n jSTerm0.add((Object) \"lc\");\n jSTerm0.isEmpty();\n jSSubstitution0.add((Object) \"lc\");\n jSTerm0.applySubstitutionPF(jSSubstitution0);\n jSTerm0.add((Object) null);\n JSJshopVars.percent = 846;\n StringReader stringReader0 = new StringReader(\"lc\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer0);\n JSSubstitution jSSubstitution1 = new JSSubstitution();\n streamTokenizer0.eolIsSignificant(true);\n // Undeclared exception!\n try { \n jSTerm0.standarizerPredicateForm();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "EvaluatorException mo19168b(String str, String str2, int i, String str3, int i2);", "private boolean unaryOperandIssues() {\n\t\tString errorMessage1 = perform.getOperand1ErrorMessage();\n\t\tif (errorMessage1.length() == 0) {\n\t\t\tlabel_errOperand1.setText(errorMessage1);\n\t\t}\n\n\t\tif (!perform.getOperand1Defined()) {\n\t\t\tlabel_errOperand1.setText(\"No Value found\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n SystemInUtil.addInputLine((String) null);\n SystemInUtil.addInputLine((String) null);\n JSTerm jSTerm0 = new JSTerm();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n Integer integer0 = new Integer(1);\n linkedList0.add(integer0);\n linkedList0.add((Integer) null);\n jSTerm0.removeAll(linkedList0);\n jSTerm0.retainAll(linkedList0);\n SystemInUtil.addInputLine((String) null);\n jSTerm0.add((Object) \"not\");\n // Undeclared exception!\n try { \n jSTerm0.standarizerPredicateForm();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1 >= 1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "@Test\r\n public void testInvalidIncSuffixExpressionWithSIUnits() throws IOException {\n checkError(\"varS++\", \"0xA0170\");\r\n }", "boolean isVariable(Formula f);", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSTerm0.add((Object) \"umd.cs.shop.JSParserError\");\n jSSubstitution0.add((Object) jSTerm0);\n JSSubstitution jSSubstitution1 = new JSSubstitution();\n JSTerm jSTerm1 = new JSTerm();\n jSTerm1.add((Object) jSTerm0);\n JSJshopVars.exclamation = (-3277);\n jSTerm0.add((Object) jSTerm1);\n jSTerm0.clonePF();\n jSTerm0.applySubstitutionPF(jSSubstitution0);\n Object object0 = new Object();\n SystemInUtil.addInputLine(\"umd.cs.shop.JSParserError\");\n JSSubstitution jSSubstitution2 = new JSSubstitution();\n // Undeclared exception!\n try { \n jSTerm0.print();\n fail(\"Expecting exception: StackOverflowError\");\n \n } catch(StackOverflowError e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "boolean _non_existent();", "private static boolean isBadInput(String s) {\n\t\tString[] split = s.split(\"\\\\s+\");\n\t\tif (split.length != 3) {\n\t\t\tSystem.err.printf(\"Unknow length: %d\\n\", split.length);\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\tInteger.parseInt(split[0]);\n\t\t\tInteger.parseInt(split[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.err.printf(\"Input numbers only.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (split[1].length() != 1) {\n\t\t\tSystem.err.printf(\"Operator should be one character.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "abstract public boolean argsNotFull();", "@Override\n\tpublic boolean isMalformed() {\n\t\treturn malformed;\n\t}", "@Check\n\tpublic void checkIfVariableDefinitionsAreValid(VariableDefinition anEntity) {\n\t\tif (anEntity.getName() != null) {\n\t\t\tString tempName = anEntity.getName().getName();\n\t\t\tif (tempName != null) {\n\t\t\t\tif (tempName.contains(\".\")) {\n\t\t\t\t\terror(\"Variable definitions may not be fully or partly qualified. Please put the variable in the according packagedef to qualify it!\",\n\t\t\t\t\t\t\tnull);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n public void testInvalidDoubleRightAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M>>=3m\", \"0xA0186\");\r\n }", "void doWhat() throws NotConnectedException\n\t{\n\t\t/* wait a bit if we are not halted */\n\t\twaitTilHalted();\n\t\ttry\n\t\t{\n\t\t\tObject result = null;\n\n\t\t\t/* pull the rest of the line */\n\t\t\tString s = restOfLine();\n\n\t\t\t// first parse it, then attempt to evaluate the expression\n\t\t\tValueExp expr = parseExpression(s);\n\n\t\t\t// make sure no assignment\n\t\t\tif ( expr.containsAssignment() )\n\t\t\t\tthrow new IllegalAccessException();\n\n\t\t\tresult = evalExpression(expr).value;\n\n\t\t\t/* dump the output */\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tif (result instanceof Variable)\n\t\t\t{\n\t\t\t\tVariable v = (Variable) result;\n\n\t\t\t\t// if it has a path then display it!\n\t\t\t\tif (v.isAttributeSet(VariableAttribute.IS_LOCAL))\n\t\t\t\t\ts = getLocalizationManager().getLocalizedTextString(\"localVariable\"); //$NON-NLS-1$\n\t\t\t\telse if (v.isAttributeSet(VariableAttribute.IS_ARGUMENT))\n\t\t\t\t\ts = getLocalizationManager().getLocalizedTextString(\"functionArgumentVariable\"); //$NON-NLS-1$\n\t\t\t\telse if ( (v instanceof VariableFacade) && (s = ((VariableFacade)v).getPath()) != null && s.length() > 0 )\n\t\t\t\t\t;\n\t\t\t\telse\n\t\t\t\t\ts = \"_global\"; //$NON-NLS-1$\n\n\t\t\t\tsb.append(s);\n\t\t\t}\n\t\t\telse\n\t\t\t\tsb.append(getLocalizationManager().getLocalizedTextString(\"mustBeOnlyOneVariable\")); //$NON-NLS-1$\n\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(IllegalAccessException iae)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noSideEffectsAllowed\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotEvaluate\")); //$NON-NLS-1$\n\t\t}\n\t}", "private void checkRep() throws RuntimeException {\r\n \t\r\n \t//check edge label\r\n if (this.label == null) {\r\n throw new RuntimeException(\"Edge label is undefined\");\r\n }\r\n \r\n //check parent node\r\n if (this.pnode.getName().toString().length() == 0) {\r\n throw new RuntimeException(\"Parent node name is invalid\");\r\n }\r\n\r\n if (this.pnode.getName() == null) {\r\n throw new RuntimeException(\"Parent node name is undefined\");\r\n }\r\n \r\n //check child node\r\n if (this.cnode.getName().toString().length() == 0) {\r\n throw new RuntimeException(\"Child node name is invalid\");\r\n }\r\n \r\n if (this.cnode.getName() == null) {\r\n throw new RuntimeException(\"Child node name is undefined\");\r\n }\r\n \r\n }", "@Test\r\n public void testInvalidIncPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"++varS\", \"0xA0172\");\r\n }", "@Test\r\n public void testInvalidLogicalRightAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M>>>=varI_M\", \"0xA0188\");\r\n }", "abstract public boolean isVariableCommand();", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M*=\\\"Hello\\\"\", \"0xA0178\");\r\n }", "@Test\n public void syntactic_fail(){\n SetupMocks.setup();\n\n List<Token> tokens= new ArrayList<>();\n\n// tokens.add(new Token(Token.TSTRG,1,1,null));\n\n tokens.add(new Token(Token.TCOMA,1,1,null));\n\n Parser parser = new Parser(tokens);\n\n NPrintItemNode nPrintItemNode = new NPrintItemNode();\n nPrintItemNode.setnExprNode(NExprNode.INSTANCE());\n\n TreeNode printitem = nPrintItemNode.make(parser);\n\n assertEquals(TreeNode.NUNDEF, printitem.getValue());\n\n }", "public Boolean validate(R answerFromTest);", "protected void validate_return(java.lang.String[] param){\r\n \r\n }", "public void checkNotPolymorphicOrUnknown() {\n if (isPolymorphic())\n throw new AnalysisException(\"Unexpected polymorphic value!\");\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }" ]
[ "0.5939114", "0.5698873", "0.5512859", "0.5493694", "0.5461182", "0.54124445", "0.54047984", "0.5348311", "0.53403014", "0.5334631", "0.53318626", "0.52966875", "0.52551395", "0.5254016", "0.52428526", "0.5238834", "0.51864594", "0.51798296", "0.51674074", "0.5158626", "0.51554316", "0.5139481", "0.51375127", "0.5135527", "0.5128236", "0.510104", "0.50972635", "0.5094445", "0.5090922", "0.50879174", "0.50833964", "0.50780636", "0.50780636", "0.50780636", "0.50743395", "0.5064885", "0.5063028", "0.50591904", "0.5058572", "0.50517464", "0.50465405", "0.5045023", "0.5044262", "0.5040522", "0.5038258", "0.5037845", "0.5031914", "0.5021229", "0.5019595", "0.5018671", "0.50126797", "0.5009863", "0.50081617", "0.50068796", "0.5006751", "0.5003608", "0.50026506", "0.49976563", "0.49970606", "0.4994875", "0.49946424", "0.4989065", "0.49886173", "0.49831104", "0.49719343", "0.49692023", "0.49668393", "0.4966755", "0.49659604", "0.49634925", "0.49625465", "0.49612832", "0.49596542", "0.4954825", "0.495318", "0.49409473", "0.49384364", "0.49309286", "0.49256852", "0.4916212", "0.4913803", "0.49104488", "0.49068013", "0.4892879", "0.48915628", "0.48870796", "0.48870358", "0.48809862", "0.48808438", "0.4879653", "0.48736948", "0.48706225", "0.48685935", "0.48685417", "0.48673198", "0.4865243", "0.48593214", "0.48574376", "0.48565984", "0.4852658" ]
0.54039925
7
With dynamic programming. Time complexity O(No. of items Expected Weight)
public static int knapSackWithDP(int expectedWeight) { int N = values.length; int[][] dP = new int[N + 1][expectedWeight + 1]; boolean[][] takeSoln = new boolean[N + 1][expectedWeight + 1]; for (int i = 1; i <= N; i++) { for (int j = 1; j <= expectedWeight; j++) { if (weights[i - 1] > j) { dP[i][j] = dP[i - 1][j]; } else { int option1 = dP[i - 1][j], option2 = values[i - 1] + dP[i - 1][j - weights[i - 1]]; dP[i][j] = Math.max(option2, option1); takeSoln[i][j] = (option2 > option1); } } } System.out.println("Selected items are: "); int totalWt = 0, totalValue = 0; for (int k = N, wt = expectedWeight; k > 0; k--) { if (takeSoln[k][wt]) { totalWt += weights[k - 1]; totalValue += values[k - 1]; System.out.printf(" Item %d with weight %d and value %d\n", k, weights[k - 1], values[k - 1]); wt -= weights[k - 1]; } } System.out.printf("Calculated total weight= %d and total value= %d\n", totalWt, totalValue); return dP[N][expectedWeight]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}", "public static void knapsackDynamicProgramming(objects[] items, int capacity, int n) \r\n { \r\n\t\t//use bubble sort to sort item by their weight\t\t\t\t\r\n\t\tfor (int i = 0; i < n-1; i++) \t\t\t\t\r\n\t\t{ \t\t \r\n\t\t\tfor (int j = 0; j < (n-i-1); j++) \t\t \r\n\t\t\t{\t\t \r\n\t\t\t\tif (items[j].weight < items[j+1].weight) \t\t \r\n\t\t\t\t{ \t\t \t\r\n\t\t\t\t\tobjects temp = items[j]; \t\t \r\n\t\t\t\t\titems[j] = items[j+1]; \t\t \r\n\t\t\t\t\titems[j+1] = temp; \t\t \t\t\t\t\t\r\n\t\t\t\t}\t\t \r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n \tif(n <= 0 || capacity <= 0)\r\n \t{\r\n \t\tSystem.out.print(\"Error capacity and object numbers can't be 0\");\r\n \t}\r\n \r\n \tint matrixTable[][] = new int[n+1][capacity+1]; \r\n \r\n \tfor (int i = 0; i <= n; i++) \r\n \t{ \r\n \t\tfor (int j = 0; j <= capacity; j++) \r\n \t\t{ \r\n \t\t\t//Preset row 0 value and column value to 0\r\n \t\t\tif (i==0 || j==0) \r\n \t {\r\n \t\t\t\tmatrixTable[i][j] = 0; \r\n \t }\r\n \r\n \t\t\t//If current row number is greater than current weight number\r\n \t\t\telse if (items[i-1].weight <= j) \r\n \t\t\t{\r\n \t\t\t\t//Compare the top value with top value plus value(use weight as the value to go left)result\r\n \t\t\t\t//and use the greatest value for the current one.\r\n \t\t\t\tmatrixTable[i][j] = Math.max(items[i-1].profit + matrixTable[i-1][j-items[i-1].weight], matrixTable[i-1][j]); \r\n \t\t\t}\r\n \t\t\t//If row number is less than current weight number just use the top value\r\n \t\t\telse \r\n \t\t\t{ \t \r\n \t\t\t\tmatrixTable[i][j] = matrixTable[i-1][j];\r\n \t\t\t}\r\n \t\t} \t\r\n \t} \r\n \t\r\n\t\tint totalProfit = matrixTable[n][capacity]; \t\t\r\n\t\tint temp = matrixTable[n][capacity];\r\n\t\tint [] itemInKnapsack = new int [n];\r\n\t\t\r\n\t\t//solving which item is in the knapsack\r\n for (int i = n; i > 0 && temp > 0; i--) { \r\n \r\n \r\n \tif (temp == matrixTable[i - 1][capacity]) \r\n \t{\r\n continue;\r\n \t}\r\n \t//if the top value is different than it is include in the knapsack\r\n else \r\n { \r\n itemInKnapsack[i-1] = items[i-1].index; //Save item number\r\n temp = temp - items[i - 1].profit; \r\n capacity = capacity - items[i - 1].weight; \r\n } \r\n } \r\n \r\n printResult(itemInKnapsack, totalProfit, 2); //Call print result\r\n }", "public static void main(String[] args){ w = the total weight\n\t\t// i = item i\n\t\t// m[i, w] = maximum value attained with weight <= w using items up to i\n\t\t//\n\t\t// recurrence relation:\n\t\t// m[0, w] = 0, if there's zero items, the sum is zero\n\t\t// m[i, w] = m[i-1, w], if w(i) > w, the new item's weight > current weight limit\n\t\t// m[i, w] = max(m[i-1, w],\n\t\t// \t\t\t\t m[i-1, w-w(i)] + v(i), if w(i) <= w\n\t\t//\n\t\t//\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\n\t\titems.add(new Item(10, 60));\n\t\titems.add(new Item(20, 100));\n\t\titems.add(new Item(30, 120));\n\n\t\tSystem.out.println(knapsack(items.size()-1, 50, items));\n\t}", "public static int zeroOneKnapsack(int[] weight, int[] value, int capacity) {\n\t\tint[][] dp = new int[weight.length + 1][capacity + 1];\n\n\t\tfor (int i = 0; i < weight.length + 1 ; i++) {\n\t\t\t for (int j = 0; j < capacity + 1; j++) {\n\t\t\t\t\n\t\t\t\t // base condition for memoization\n\t\t\t\t // first row and first column for 2d matrix is initialised to 0\n\t\t\t\t // profit = 0 when number of items = 0 or bag capacity = 0 \n\t\t\t\t if (i == 0 || j == 0) { \n\t\t\t\t\t dp[i][j] = 0;\n\t\t\t\t } \n\t\t\t\t \n\t\t\t\t // weight of item under consideration is less than capacity of bag\n\t\t\t\t // value of i in 2d matrix corresponds to (i-1)th element in weight and value arrays\n\t\t\t\t // hence, weight(i-1) is compared with the corresponding matrix cell capacity(i.e.column)\n\t\t\t\t \n\t\t\t\t else if (weight[i-1] <= j){\n\t\t\t\t\t \n\t\t\t\t\t // possibility 1: when item having weight(i-1) is added to bag\n\t\t\t\t\t // item having weight(i-1) has value(i-1)\n\t\t\t\t\t // this value added to array value for (i-1)th row and (j-weight[i-1])th column\n\t\t\t\t\t // because :\n\t\t\t\t\t // 1) the total capacity reduced by weight(i-1) after deciding item inclusion\n\t\t\t\t\t // 2) total no.of elements reduced by 1 after deciding item inclusion\n\t\t\t\t\t \n\t\t\t\t\t int a = value[i-1] + dp[i-1][j-weight[i-1]];\n\t\t\t\t\t \n\t\t\t\t\t// possibility 1: when item having weight(i-1) is not added to bag\n\t\t\t\t\t// 1) the total capacity remains as is after deciding item exclusion\n\t\t\t\t\t// 2) total no.of elements reduced by 1 after deciding item exclusion\n\t\t\t\t\t \n\t\t\t\t\t int b = dp[i-1][j];\n\t\t\t\t\t \n\t\t\t\t\t // max of a and b taken to find maximum profit value \n\t\t\t\t\t dp[i][j] = Math.max(a, b);\t \n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t // weight of item under consideration is more than capacity of bag\n\t\t\t\t // hence item having weight(i-1) is not added to bag\n\t\t\t\t else {\n\t\t\t\t\t \n\t\t\t\t\t// 1) the total capacity remains as is after deciding item exclusion\n\t\t\t\t\t// 2) total no.of elements reduced by 1 after deciding item exclusion\n\t\t\t\t\t \n\t\t\t\t\t dp[i][j] = dp[i-1][j];\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dp[weight.length][capacity];\n\t\t\n\t}", "public static int dynamic_p(int objects,int capacity){\r\n // Array to accommodate dynamic programming solutions\r\n int dp_array[][] = new int[objects+1][capacity+1];\r\n // filling the 2D array\r\n for(int i=0; i<= objects;i++){\r\n for(int j=0; j<= capacity;j++){\r\n if(i == 0)\r\n dp_array[i][j]=0; // base case(number of objects are zero)\r\n else if(j == 0)\r\n dp_array[i][j]=0; // base case(capacity is zero)\r\n else if(randvariables[i-1] <= j){ // checking if the wight of object is less than the current knapsack capacity\r\n int included = randvalues[i-1]+dp_array[i-1][j-randvariables[i-1]]; // object is included\r\n int not_included = dp_array[i-1][j]; // object is not included\r\n\r\n //taking the max of these two\r\n if(included > not_included)\r\n dp_array[i][j] = included;\r\n else\r\n dp_array[i][j]= not_included;\r\n }\r\n else // weight is more than capacity .. not including the object\r\n dp_array[i][j] = dp_array[i-1][j];\r\n }\r\n }\r\n\r\n //System.out.println(Arrays.deepToString(dp_array));\r\n int solution = dp_array[objects][capacity];\r\n boolean[] optimalset = solution_used(dp_array,objects,capacity);\r\n System.out.println(Arrays.toString(optimalset));\r\n dp_array = null;\r\n return solution; // return the final solution\r\n\r\n }", "static int webknapSackDyna(int W, int wt[], int val[], int n) {\n int i, w;\n int K[][] = new int[n + 1][W + 1];\n //K[i][w] represents the max value for weight w by using i elements\n // row i represents using i values\n // col w represents the current weight\n // Build table K[][] in bottom up manner\n // n is the number of values available to use\n // for each available value\n for (i = 0; i <= n; i++) {\n // for each weight until target weight is achieved\n for (w = 0; w <= W; w++) {\n\n if (i == 0 || w == 0)\n K[i][w] = 0;\n // if the previous weight is still less than the target weight it can potentially be included\n // to calculate the max val for current weight\n else if (wt[i - 1] <= w)\n // val[i-1]: value for the i th weight\n // K[i-1][w-wt[i-1]]: max value using i-1 values to achieve weight target weight - wt of i-1 element\n // val[i-1] + K[i-1][w-wt[i-1]] -> used ith weight add val[i-] and use the remaining i-1 weights to\n // get to the target weight w-wt of ith element -> wt-wt[i-1]\n // K[i-1][w] => max value using i-1 elements to achieve weight w i.e. not using ith element\n K[i][w] = max(val[i - 1] + K[i - 1][w - wt[i - 1]], K[i - 1][w]);\n // wt[i-1] > w\n else\n K[i][w] = K[i - 1][w];\n }\n }\n\n return K[n][W];\n }", "static int dynamicProgramming(int problem) {\r\n\t\tint items = problems.get(problem).size();\r\n\t\tint cap = capacities.get(problem);\r\n\r\n\t\tint x = 0;\r\n\t\tfor(int i = 1; i < items + 1; i++, x++) {\r\n\t\t\tweights[i] = problems.get(problem).get(x).weight;\r\n\t\t\tprofits[i] = problems.get(problem).get(x).profit;\r\n\t\t}\r\n\r\n\t\tint[][] P = new int[items + 1][cap + 1];\r\n\r\n\t\tfor(int i = 0; i < items + 1; i++) {\r\n\t\t\tfor(int j = 0; j < cap + 1; j++) {\r\n\t\t\t\tP[i][j] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(int c = 0; c < cap + 1; c++) {\r\n\t\t\tP[0][c] = 0;\r\n\t\t}\r\n\r\n\t\tfor(int i = 1; i < items + 1; i++) {\r\n\t\t\tP[i][0] = 0;\r\n\t\t\tfor(int c = 1; c < cap + 1; c++) {\r\n\t\t\t\tif(i >= 2 && c >= 2) {\r\n\t\t\t\t\tP[i-2][c-2] = -1;\r\n\t\t\t\t}\r\n\t\t\t\tif(weights[i] <= c && P[i-1][c-weights[i]] + profits[i] > P[i-1][c]) {\r\n\t\t\t\t\tP[i][c] = P[i-1][c-weights[i]] + profits[i];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tP[i][c] = P[i-1][c];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn P[items][cap];\r\n\t}", "private static Integer packDPRec(Integer capacity, List<Integer> weights, List<ItemDTO> items, Integer n, Integer[][] mem, List<Integer> optimalChoice) {\n // Base condition\n if (n == 0 || capacity <= 0)\n return 0;\n\n if (mem[n][capacity] != -1) {\n return mem[n][capacity];\n }\n\n if (weights.get(n - 1) > capacity) {\n // Store the value of function call\n // stack in table before return\n List<Integer> subOptimalChoice = new ArrayList<>();\n mem[n][capacity] = packDPRec(capacity, weights, items, n - 1, mem, subOptimalChoice);\n optimalChoice.addAll(subOptimalChoice);\n return mem[n][capacity];\n } else {\n // Return value of table after storing\n List<Integer> optimalChoiceIncluded = new ArrayList<>();\n List<Integer> optimalChoiceExcluded = new ArrayList<>();\n Integer valueIncluded = items.get(n - 1).getValue() + packDPRec(capacity - weights.get(n - 1), weights, items, n - 1, mem, optimalChoiceIncluded);\n Integer valueExcluded = packDPRec(capacity, weights, items, n - 1, mem, optimalChoiceExcluded);\n if (valueIncluded > valueExcluded) {\n optimalChoice.addAll(optimalChoiceIncluded);\n optimalChoice.add(items.get(n - 1).getId());\n mem[n][capacity] = valueIncluded;\n }else{\n optimalChoice.addAll(optimalChoiceExcluded);\n mem[n][capacity] = valueExcluded;\n }\n return mem[n][capacity];\n }\n }", "public static void dynamicProgramming2(int[][] myArray){ \t\r\n\t\tint countNode = myArray.length;\r\n\t\tint rows = myArray[0].length;\r\n\t\tif(rows != countNode) {\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\t}\r\n\t\t\r\n \tint[] cost = new int[countNode];\r\n \tint[] prev = new int[countNode];\r\n \tboolean[] visited = new boolean[countNode];\r\n \t\r\n \tfor(int i = 0; i < countNode; i++) {\r\n \t\tcost[i] = myArray[0][i];\r\n \t\tprev[i] = 0;\r\n \t\tvisited[i] = false;\r\n \t}\r\n \t\r\n \tint cur = 0; \t\r\n \twhile(true)\r\n \t{\r\n \t\tfor(int i = cur; i < countNode; i++)\r\n \t\t{\r\n \t\t\tif(myArray[cur][i] + cost[cur] < cost[i])\r\n \t\t\t{\r\n \t\t\t\tcost[i] = myArray[cur][i] + cost[cur];\r\n \t\t\t\tprev[i] = cur;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tvisited[cur] = true;\r\n \t\tif(AllVisited(visited)) break;\r\n \t\t\r\n \t\t// Choose the node which is not visited yet\r\n \t\t// and has the minimum cost so far.\r\n \t\tint min = Integer.MAX_VALUE;\r\n \t\tfor(int i = 0; i < countNode; i++){\r\n \t\t\tif(!visited[i] && cost[i] < min) {\r\n \t\t\t\tcur = i;\r\n \t\t\t\tmin = cost[i];\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \tSystem.out.println(\"Dynamic Programming2:\");\r\n \tSystem.out.println(\"Minimum Cost to go from 1 to \" + countNode + \" is \" + cost[countNode - 1]);\r\n \tStack<Integer> s = new Stack<Integer>();\r\n \tint traveller = countNode - 1;\r\n \ts.push(countNode);\r\n \twhile(traveller != 0)\r\n \t{\r\n \t\ts.push(prev[traveller] + 1);\r\n \t\ttraveller = prev[traveller];\r\n \t}\r\n \t\r\n \tStringBuilder sb = new StringBuilder();\r\n \twhile(!s.empty())\r\n \t{\r\n \t\tsb.append(s.pop());\r\n \t\tif (!s.empty()) {\r\n \t\tsb.append(\" -> \");\r\n \t\t}\r\n \t}\r\n \t\r\n \tSystem.out.println(\"Path from 1 to end is \" + sb.toString()); \r\n \tSystem.out.println();\r\n }", "private static long calculateBestPickWithoutRepetition(int weight, Item[] items, long[][] DP) {\n\n for(int w = 1; w <= weight; w++) {\n for(int i = 1; i <= items.length; i++) {\n DP[w][i] = DP[w][i-1];\n Item item = items[i-1];\n\n if (item.getWeight() <= w) {\n DP[w][i] = Math.max(DP[w][i], DP[w - item.getWeight() ][i-1] + item.getValue());\n }\n }\n }\n\n return DP[DP.length -1][DP[0].length - 1];\n }", "int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}", "static int knapsack(int[] weight, int[] value, int n, int maxWeight) {\n int[][] dp = new int[n+1][maxWeight+1];\n for (int i=0;i<=n;i++) {\n for (int j =0;j<=maxWeight;j++) {\n dp[i][j] = -1;\n }\n }\n int ans= knapsack(weight,value,n,maxWeight,dp);\n return ans;\n\n }", "private static void buildSolution(int weight, int currentItem, Item[] items, long[][] DP, boolean[] used) {\n\n if (currentItem == 0) {\n return;\n }\n\n int itemIndex = currentItem - 1;\n\n if (DP[weight][currentItem] == DP[weight][currentItem - 1]) {\n used[itemIndex] = false;\n buildSolution(weight, currentItem - 1, items, DP, used);\n return;\n }\n\n used[currentItem - 1] = true;\n buildSolution(weight - items[itemIndex].getWeight(), currentItem - 1, items, DP, used);\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt(), M = scanner.nextInt();\n int[][] graph = new int[N + 1][N + 1];\n\n for (int i = 0; i < M; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int weight = scanner.nextInt();\n graph[from][to] = weight;\n }\n \n int[][][] dp = new int[N + 1][N + 1][N + 1];\n\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (graph[i][j] != 0) {\n dp[0][i][j] = graph[i][j];\n } else {\n dp[0][i][j] = Integer.MAX_VALUE;\n }\n }\n }\n \n for (int k = 0; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n dp[k][i][i] = 0;\n }\n }\n\n for (int k = 1; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (dp[k - 1][i][k] != Integer.MAX_VALUE && dp[k - 1][k][j] != Integer.MAX_VALUE) {\n dp[k][i][j] = Math.min(dp[k - 1][i][j], dp[k -1][i][k] + dp[k -1][k][j]);\n } else {\n dp[k][i][j] = dp[k - 1][i][j];\n }\n }\n }\n }\n\n int Q = scanner.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < Q; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int res = dp[N][from][to] == Integer.MAX_VALUE ? -1 : dp[N][from][to];\n sb.append(res).append('\\n');\n }\n System.out.println(sb.toString());\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 void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tint T = sc.nextInt();\r\n\t\t\r\n\t\tfor (int z = 1; z <= T; z++) {\r\n\t\t\tint N = sc.nextInt();\r\n\t\t\tint[] input = new int[N+1];\r\n\t\t\t\r\n\t\t\tfor (int j = 1; j <= N; j++) {\r\n\t\t\t\tinput[j] = sc.nextInt();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint[] weight = new int[N+1];\r\n\t\t\tint[] memWeight = new int[N+1];\r\n\t\t\t\r\n\t\t\tint cnt = 1;\r\n\t\t\tweight[1] = 1;\r\n\t\t\tmemWeight[1] = input[1]; \r\n\t\t\tfor (int j = 2; j <= N; j++) {\r\n\t\t\t\tfor (int k = cnt; k >= 1 ; k--) {\r\n\t\t\t\t\tif(input[j] > memWeight[k] && k == cnt) {\r\n\t\t\t\t\t\tmemWeight[++cnt] = input[j];\r\n\t\t\t\t\t\tweight[j] = cnt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(input[j] > memWeight[k] && k < cnt) {\r\n\t\t\t\t\t\tmemWeight[k+1] = input[j];\r\n\t\t\t\t\t\tweight[j] = cnt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(k == 1) {\r\n\t\t\t\t\t\tmemWeight[k] = input[j] < memWeight[k] ? input[j] : memWeight[k];\r\n\t\t\t\t\t\tweight[j] = cnt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// result\r\n\t\t\tint maxV = -1;\r\n\t\t\tfor (int i = 1; i <= N; i++) {\r\n\t\t\t\tif(maxV < weight[i]) {\r\n\t\t\t\t\tmaxV = weight[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"#\"+z+\" \"+maxV);\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t}", "static int knapsackDP(int weights[],int values[],int noOFitems,int capacityOfKnapsack){\n int dp[][] = new int[noOFitems+1][capacityOfKnapsack+1];\n\n for(int i=1;i<noOFitems+1;i++){\n for(int w=1;w<capacityOfKnapsack+1;w++){\n\n int inc = 0;\t\n if(weights[i] <= w){\n inc = values[i] + dp[i-1][w-weights[i]];\n }\n int exc = dp[i-1][w];\n dp[i][w] = Math.max(inc,exc);\n\n }\n }\n \n for (int i = 0; i < noOFitems+1; i++) {\n\t\t\tfor (int j = 0; j < capacityOfKnapsack+1; j++) {\n\t\t\t\tSystem.out.print(dp[i][j]+ \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n \n return dp[noOFitems][capacityOfKnapsack];\n\t}", "void ksUnbounded(int targetWeight, int nItems, int[] iWeights, int[] iValues) {\n\r\n\t\tint[][] ksItemCapacity = new int[nItems + 1][targetWeight + 1];\r\n\t\tint[][] ksTrack = new int[nItems + 1][targetWeight + 1];\r\n\r\n\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\tksItemCapacity[0][w] = 0;\r\n\t\t}\r\n\r\n\t\tfor (int item = 1; item < nItems; item++) {\r\n\t\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\t\t// last known Maximum value of KS contents s.t. their weight\r\n\t\t\t\t// totals to atmost w-iWeights[item]\r\n\t\t\t\tint eItemValue = (iWeights[item] <= w) ? ksItemCapacity[item - 1][w\r\n\t\t\t\t\t\t- iWeights[item]]\r\n\t\t\t\t\t\t: 0;\r\n\t\t\t\tif ((iWeights[item] <= w)\r\n\t\t\t\t\t\t&& (iValues[item] + eItemValue) > ksItemCapacity[item - 1][w]) {\r\n\t\t\t\t\tksItemCapacity[item][w] = eItemValue + iValues[item];\r\n\t\t\t\t\t// current item included\r\n\t\t\t\t\tksTrack[item][w] = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tksItemCapacity[item][w] = ksItemCapacity[item - 1][w];\r\n\t\t\t\t\t// current item not included\r\n\t\t\t\t\tksTrack[item][w] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Print KS contents\r\n\t\tArrayList<Integer> ksContents = new ArrayList<Integer>();\r\n\t\tint tW = targetWeight;\r\n\t\tfor (int item = nItems; item >= 0; item--) {\r\n\t\t\tif (ksTrack[item][tW] == 1) {\r\n\t\t\t\ttW -= iWeights[item];\r\n\t\t\t\tksContents.add(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Items choosen are:\");\r\n\t\tint W = 0, V = 0;\r\n\t\tfor (Integer e : ksContents) {\r\n\t\t\tW += iWeights[e];\r\n\t\t\tV += iValues[e];\r\n\t\t\tSystem.out.println(\"Weight: \" + iWeights[e] + \", Value: \"\r\n\t\t\t\t\t+ iValues[e]);\r\n\t\t}\r\n\t\tSystem.out.println(\"Total weight: \" + W + \" Total value: \" + V);\r\n\t}", "private static int distance(ArrayList<Integer>[] adj, ArrayList<Integer>[] cost, int s, int t) {\n\n Set<Integer> visited = new HashSet<>(); //option 1\n Map<Integer, Integer> distance = new HashMap<>();\n// Queue<Integer> q = new PriorityQueue<>(11, (o1, o2) -> { //option 0\n// Integer d1 = distance.get(o1); //option 0\n// Integer d2 = distance.get(o2); //option 0\n Queue<Map.Entry<Integer, Integer>> q = new PriorityQueue<>(11, (o1, o2) -> { //option 1\n Integer d1 = o1.getValue(); //option 1\n Integer d2 = o2.getValue(); //option 1\n\n if (Objects.equals(d1, d2)) return 0;\n if (d1 == null) return 1;\n if (d2 == null) return -1;\n\n return d1 - d2;\n });\n\n distance.put(s, 0);\n// q.addAll(IntStream.range(0, adj.length).boxed().collect(Collectors.toList())); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(s, 0)); //option 1\n\n while (!q.isEmpty()) {\n// int u = q.remove(); //option 0\n int u = q.remove().getKey(); //option 1\n\n if (u == t) {\n Integer dist = distance.get(u);\n if (dist == null) return -1;\n return dist;\n }\n\n if (visited.contains(u)) continue; //option 1\n visited.add(u); //option 1\n\n List<Integer> adjList = adj[u];\n List<Integer> costList = cost[u];\n for (int i = 0; i < adjList.size(); i++) {\n int v = adjList.get(i);\n int w = costList.get(i);\n Integer dist = distance.get(v);\n Integer newDist = distance.get(u);\n if (newDist != null) newDist += w;\n\n if (newDist != null && (dist == null || dist > newDist)) {\n //relax\n distance.put(v, newDist);\n// q.remove(v); //option 0\n// q.add(v); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(v, distance.get(v))); //option 1\n }\n }\n }\n\n return -1;\n }", "static int knapsack(int W, int wt[], int val[], int n)\n\t{\n\t\t// base case\n\t\tif (n==0 || W==0)\n\t\t\treturn 0;\n\t\t\n\t\t// If weight of nth item is more than knapsack capacity W, then\n\t\t// this item cannot be included in optimal solution\n\t\tif (wt[n-1] > W)\n\t\t\treturn knapsack(W, wt, val, n-1);\n\t\t\n\t\t// return maximum of two cases\n\t\t// nth item included\n\t\t// not included\n\t\telse return max(val[n-1] + knapsack(W-wt[n-1],wt,val,n-1),\n\t\t\t\tknapsack(W,wt,val,n-1)\n\t\t\t\t);\n\t}", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tint N=scan.nextInt();\n\t\tint a=scan.nextInt();\n\t\tint b=scan.nextInt();\n\t\tint[] nums=new int[N];\n\t\tint[][] weight=new int[N][N];\n\t\tfor(int i=0;i<N;i++){\n\t\t\tnums[i]=scan.nextInt();\n\t\t\tweight[i][i]=nums[i];\n\t\t}\n\t\tfor(int i=0;i<N;i++){\n\t\t\tfor(int j=i+1;j<N;j++){\n\t\t\t\tweight[i][j]=weight[i][j-1]+nums[j];\n\t\t\t}\n\t\t}\n\t\tlong[][] dp=new long[N][N];\n\t\tfor(int i=2;i<=N;i++){//dis\n\t\t\tfor(int j=0;j<=N-i;j++){//start\n\t\t\t\tint end=j+i-1;\n\t\t\t\tlong min=Integer.MAX_VALUE;\n\t\t\t\tfor(int k=j;k<end;k++){\n\t\t\t\t\tmin=Math.min(min, dp[j][k]+dp[k+1][end]+weight[j][k]*a+weight[k+1][end]*b);\n\t\t\t\t}\n\t\t\t\tdp[j][end]=min;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dp[0][N-1]);\n\t\tscan.close();\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "static int optimalWeight(int W, int[] w) {\n \tif (W ==0) {\n \t\treturn 0; \n \t}\n \t\n \t\n \t\n \n \tint[][] table = new int [W+1][w.length+1];\n \tfor(int i = 0; i <=w.length; i++) {\n \t\ttable[W][i] =0; \n\n \t}\n \t\n \tfor(int i = 0; i <=W; i++) {\n \t\ttable[i][w.length] =0; \n\n \t}\n \t\n \tint val = 0;\n \tfor (int i = 0; i <= W; i++) {\n \t\t\n \t\tfor (int j = 1; j<=w.length; j++) {\n \t\t\ttable[i][j] = table[i][j-1];\n \t\t\tif (w[j-1]<=i) {\n \t\t\t\tval = table[i-w[j-1]][j-1] +w[j-1]; \n \t\t\tif (table[i][j]<val) {\n \t\t\t\ttable[i][j] = val;\n \t\t\t}\n \t\t\t}\n \t\t\t\n\n \t\t}\n \t\t\n \t}\n \t\n \treturn table[W][w.length];\n\n }", "public boolean canPartition(int[] nums) {\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n // sum cannot be splitted evenly\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n \n // dp[i][j] represents whether 0~i-1 numbers can reach\n // weight capacity j\n boolean[][] dp = new boolean[n+1][target+1];\n \n for (int i = 1; i <= n; i++) dp[i][0] = true;\n for (int j = 1; j <= target; j++) dp[0][j] = false;\n dp[0][0] = true;\n \n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= target; j++) {\n // if don't pick current number\n dp[i][j] = dp[i-1][j];\n if (j >= nums[i-1]) {\n dp[i][j] = dp[i][j] || dp[i-1][j-nums[i-1]];\n }\n }\n }\n return dp[n][target];\n \n \n // Solution2: optimizing to save space\n // https://leetcode.com/problems/partition-equal-subset-sum/discuss/90592/01-knapsack-detailed-explanation/94996\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n boolean[] dp = new boolean[target+1];\n dp[0] = true;\n for (int num : nums) {\n // here is the trick to save space\n // because we have to update dp[j] based on \n // previous dp[j-num] and dp[j] from previous loop.\n // if we update dp from left to right\n // we first update smaller dp which is dp[j-num]\n // then we won't be able to get original dp[j-num] and dp[j]\n // from previous loop, and eventually we get the wrong\n // answer. But if we update dp from right to left\n // we can assure everything is based on previous state\n for (int j = target; j >= num; j--) {\n // if (j >= num) {\n dp[j] = dp[j] || dp[j-num];\n // }\n }\n }\n return dp[target];\n }", "public static int optimalWeight(int W, int[] w) {\n int[][] knapsackMaxValues = new int[W+1][w.length+1];\n for(int i=1; i<=W; i++) {\n for(int j=1;j<=w.length; j++) {\n int keepItem;\n try {\n keepItem = w[j-1] + knapsackMaxValues[i-w[j-1]][j-1];\n } catch (ArrayIndexOutOfBoundsException exception) {\n keepItem = 0;\n }\n int leaveItem;\n try {\n leaveItem = knapsackMaxValues[i][j-1];\n } catch (ArrayIndexOutOfBoundsException exception) {\n leaveItem = 0;\n }\n if(keepItem > leaveItem)\n knapsackMaxValues[i][j] = keepItem;\n else\n knapsackMaxValues[i][j] = leaveItem;\n }\n //printKnapsack(knapsackMaxValues);\n }\n\n return knapsackMaxValues[W][w.length];\n }", "private boolean feasible() {\n\t\tint weight = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tassert x[i] == 0 || x[i] == 1;\n\t\t\tweight += w[i] * x[i];\n\t\t}\n\t\treturn weight <= k;\n\t}", "static int knapSack(int totalWeight, int wt[], int val[], int n) {\n\t\t// Base Case\n\t\tif (n == 0 || totalWeight == 0)\n\t\t\treturn 0;\n\n\t\t// If weight of the nth item is more than Knapsack capacity W, then\n\t\t// this item cannot be included in the optimal solution\n\t\tif (wt[n - 1] > totalWeight)\n\t\t\treturn knapSack(totalWeight, wt, val, n - 1);\n\n\t\t// Return the maximum of two cases:\n\t\t// (1) nth item included\n\t\t// (2) not included\n\t\telse\n\t\t\treturn max(\n\t\t\t\t\tval[n - 1]\n\t\t\t\t\t\t\t+ knapSack(totalWeight - wt[n - 1], wt, val, n - 1),\n\t\t\t\t\tknapSack(totalWeight, wt, val, n - 1));\n\t}", "private double bound(int i, double weight, double value, int[] items) {\n\t\tint item, wi;\n\t\tassert weight - k < EPS; // Because of when bound is called in fill\n\t\tfor (int j = n - 1; j >= 0; j--) {\n\t\t\titem = items[j];\n\t\t\tif (item <= i)\n\t\t\t\tcontinue;\n\t\t\twi = w[item];\n\t\t\tif (wi < k - weight) {\n\t\t\t\tweight += wi;\n\t\t\t\tvalue += v[item];\n\t\t\t}\n\t\t\telse return value + ((double) (k - weight) / wi) * v[item];\n\t\t}\n\t\treturn value;\n\t}", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n//\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tint N= Integer.parseInt(st.nextToken());\n\t\tint T= Integer.parseInt(st.nextToken());\n\t\t\n\t\t//for each N, three possible problem sets (P, A, G)\n\t\t//and P (prep time: min), V (value)\n\t\t//P <= A <= G\n\t\t\n\t\t//given limit T\n\t\t//find max profit\n\t\tint[][] v = new int[N+1][3+1];\n\t\tint[][] w = new int[N+1][3+1];\n\t\t\n\t\t//one \n\t\t\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tfor (int j = 1; j <= 3; j++) {\n\t\t\t\tw[i][j] = Integer.parseInt(st.nextToken());\n\t\t\t\tv[i][j] = Integer.parseInt(st.nextToken());\n\t\t\t}\n\t\t}\n//\t\tfor (int i = 1; i <= N; i++) {\n//\t\t\tfor (int j = 1; j <= 3; j++) {\n//\t\t\t\tSystem.out.println(w[i][j] + \" \"+ v[i][j]);\n//\t\t\t}\n//\t\t}\n\t\tint[][] dp = new int[2][T+1];\n\t\t//where k looks at the kth row of the values/weight array\n\t\tfor (int k = 1; k <= N; k++) {\n\t\t\tfor (int x = 0; x <= T; x++) {\n\t\t\t\t//going through each weight and value\n\t\t\t\tboolean ran = false;\n\t\t\t\tfor (int a = 1; a <= 3; a++) {\t\t\t\t\t\n\t\t\t\t\tif (w[k][a] > x) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tran = true;\n\t\t\t\t\t\tdp[1][x] = Math.max(Math.max(dp[0][x],dp[0][x-w[k][a]] + v[k][a]),dp[1][x]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!ran) {\n\t\t\t\t\tdp[1][x] = dp[0][x];\n\t\t\t\t}\n\t\t\t}\n\t\t\tdp[0] = dp[1].clone();\n//\t\t\tfor (int[] row: dp) {\n//\t\t\t\tfor (int m: row) {\n//\t\t\t\t\tSystem.out.print(m + \" \");\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println();\n//\t\t\t}\n\t\t}\n\t\t\n//\t\tfor (int[] row: dp) {\n//\t\t\tfor (int m: row) {\n//\t\t\t\tSystem.out.print(m + \" \");\n//\t\t\t}\n//\t\t\tSystem.out.println();\n//\t\t}\n\t\tSystem.out.println(dp[1][T]);\n\t}", "protected abstract void solve(Items items,Knapsack knapsack);", "static int unboundedKnapsack(int [] val,int[] wt, int W){\n int n = val.length;\n int[][] dp = new int[n+1][W+1];\n for (int i =0;i<=n;i++){\n dp[i][0] = 0;\n }\n for (int j = 0;j<=W;j++){\n dp[0][j] = 0;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=W;j++){\n if (wt[i-1] <= j){\n dp[i][j] = Math.max(dp[i-1][j], val[i-1] + dp[i][j - wt[i-1]]);\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][W];\n }", "public int knapsack01(int[] w, int[] v, int C) {\n //dp[i] = Math.max(v[i] + dp[i - 1, c - w[i]], dp[i - 1, c])\n int[][] dp = new int[w.length][C];\n for (int i = 0; i <= C; i++) {\n if (i >= w[0])\n dp[0][i] = v[0];\n }\n for (int i = 1; i < w.length; i++) {\n for (int j = 0; j <= C; j++) {\n if (j >= w[i]) {\n dp[i][j] = Math.max(v[i] + dp[i - 1][C - w[i]], dp[i - 1][C]);\n } else {\n dp[i][j] = dp[i - 1][C];\n }\n }\n }\n return dp[w.length - 1][C];\n }", "public Knapsack bruteForceCalc (ArrayList <Item> items,int capacity, int num_items) {\n\t\tif (num_items <= 0) {\n\t\t\tKnapsack knapsack = new Knapsack(0);\n\t\t\treturn knapsack;\n\t\t} \n\t\telse if (items.get(num_items -1).getWeight() > capacity) {\n\t\t\treturn bruteForceCalc(items, capacity, num_items - 1);\n\t\t} else {\n\n\t\t\tKnapsack ignore = bruteForceCalc(items,capacity, num_items - 1);\n\t\t\tKnapsack take = bruteForceCalc(items,capacity - items.get(num_items -1).getWeight(), num_items - 1);\n\t\t\t\n\t\t\tint ignoreVal = ignore.getValue();\n\t\t\tint takeVal = items.get(num_items - 1).getValue() + take.getValue();\n\t\t\t \n\t\t\tif( Math.max(ignoreVal, takeVal) == ignoreVal ) \n\t\t\t\treturn ignore;\n\t\t\telse {\n\t\t\t\ttake.addItem(items.get(num_items - 1));\n\t\t\t\treturn take;\n\t\t\t}\n\t\t}\n\t}", "public static int[][] neighborhoodSearch(float[] benefit, float[] weight, int[] knapsackWeight){\n\n /*\n Using greedy algorithm to put items in knapsacks\n */\n\n // number of items\n int itemLen = benefit.length;\n // number of knapsacks\n int knapsackLen = knapsackWeight.length;\n // key: index of item, value: benefit / weight of item\n Map<Integer, Float> benefitPerWeightToIndexMap = new TreeMap<>();\n // if item i is included in knapsack j, result[i][j] = 1, otherwise result[i][j] = 0\n int[][] result = new int[itemLen][knapsackLen];\n // initialize the map\n for (int i = 0; i < itemLen; i++) {\n benefitPerWeightToIndexMap.put(i, (benefit[i] / weight[i]));\n }\n\n // the value comparator for sorting the entrySet in the map by value in descending order (using lambda)\n Comparator<Map.Entry<Integer, Float>> valueComparator = (o1, o2) -> o2.getValue().compareTo(o1.getValue());\n // convert the map to list to sort it by value comparator\n List<Map.Entry<Integer, Float>> benefitPerWeightToIndexList = new ArrayList<>(benefitPerWeightToIndexMap.entrySet());\n benefitPerWeightToIndexList.sort(valueComparator);\n\n printBenefitPerWeightList(benefitPerWeightToIndexList);\n\n int greedyTotalBenefit = 0;\n\n // put items in list into knapsacks\n for (int j = 0; j < knapsackLen; j++) {\n // the items have been put in and ready to be delete\n List<Map.Entry<Integer, Float>> deleteList = new ArrayList<>();\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightToIndexList) {\n int i = entry.getKey();\n if (weight[i] <= knapsackWeight[j]) {\n result[i][j] = 1;\n greedyTotalBenefit += benefit[i];\n deleteList.add(entry);\n knapsackWeight[j] -= weight[i];\n }\n }\n // delete the items have been put in\n benefitPerWeightToIndexList.removeAll(deleteList);\n }\n // After greedy algorithm\n System.out.println(\"------After greedy algorithm------\");\n printKnapsackWeight(knapsackWeight);\n printItemsNotIncluded(benefitPerWeightToIndexList);\n System.out.println(\"Total benefit:\" + greedyTotalBenefit);\n printResult(result);\n\n /*\n Search neighborhood\n */\n\n int neighborTotalBenefit = greedyTotalBenefit;\n\n // traversing knapsacks\n for (int j1 = 0; j1 < knapsackLen - 1; j1++) {\n for (int j2 = j1 + 1; j2 < knapsackLen; j2++) {\n // traversing items in the two knapsacks\n for (int i1 = 0; i1 < itemLen; i1++) {\n for (int i2 = 0; i2 < itemLen; i2++) {\n // judge if item i1 and item i2 exists in knapsack j1 and j2 respectively\n if (result[i1][j1] == 1 && result[i2][j2] == 1) {\n // tempList for update benefitPerWeightToIndexList in iteration\n List<Map.Entry<Integer, Float>> tempList = new ArrayList<>(benefitPerWeightToIndexList);\n // traversing items that have not been included\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightToIndexList) {\n int i3 = entry.getKey();\n // judge if the neighborhood solution is feasible\n if (knapsackWeight[j2] + weight[i2] - weight[i1] >= 0\n && knapsackWeight[j1] + weight[i1] - weight[i3] >= 0) {\n // judge if the neighborhood solution is better\n if (neighborTotalBenefit - benefit[i2] + benefit[i3] > neighborTotalBenefit) {\n // change the current solution to the neighborhood solution\n result[i1][j1] = 0;\n result[i1][j2] = 1;\n\n result[i2][j2] = 0;\n\n result[i3][j1] = 1;\n\n tempList.remove(entry);\n int finalI2 = i2;\n tempList.add(new Map.Entry<Integer, Float>() {\n @Override\n public Integer getKey() {\n return finalI2;\n }\n\n @Override\n public Float getValue() {\n return benefit[finalI2] / weight[finalI2];\n }\n\n @Override\n public Float setValue(Float value) {\n return null;\n }\n });\n\n knapsackWeight[j1] += weight[i1] - weight[i3];\n knapsackWeight[j2] += weight[i2] - weight[i1];\n\n neighborTotalBenefit = (int) (neighborTotalBenefit - benefit[i2] + benefit[i3]);\n\n System.out.println(\"------Find a better solution------\");\n System.out.println(\"Remove item\" + i2 + \" in \" + \"knapsack\" + j2 + \", move item\" + i1 + \" from knapsack\" + j1 + \" to \" + \"knapsack\" + j2 + \" and put item\" + i3 + \" in knapsack\" + j1);\n printKnapsackWeight(knapsackWeight);\n printItemsNotIncluded(tempList);\n System.out.println(\"Total benefit:\" + neighborTotalBenefit);\n printResult(result);\n }\n }\n }\n // update the list after traversing the list\n benefitPerWeightToIndexList = tempList;\n }\n }\n }\n }\n }\n\n return result;\n }", "static int knapsack(Item[] items, int maxWeight) {\n return knapsack(items, maxWeight, 0);\n }", "@Test\n\tpublic void when_provided_maximum_size_list_with_all_elements_that_can_be_added_then_return_sum_in_allowable_amount_of_time() {\n\t\tfinal int[] elements = Fixture.initializeRandomList(MAX_NUM_ELEMENTS, MIN_ELEMENT_SIZE, 5);\n\t\tfinal int elementSum = IntStream.of(elements).sum();\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal int result = Knapsack.getOptimalWeight(elementSum, elements);\n\n\t\tassertThat(result, is(elementSum));\n\t\tassertThat(System.currentTimeMillis() - startTime < Fixture.MAX_ALLOWABLE_CALCULATION_TIME, is(true));\n\t}", "private static int partition3(int[] A) {\n \tint sum = 0;\r\n \tfor (int i = 0; i < A.length; i++) \r\n sum += A[i]; \r\n \r\n if (sum%3 != 0) \r\n return 0; \r\n \r\n int weight[][] = new int[sum/3+1][A.length+1];\r\n \r\n // initialize top row as true \r\n for (int i = 0; i <= A.length; i++) \r\n \tweight[0][i] = 0; \r\n \r\n // initialize leftmost column, except part[0][0], as 0 \r\n for (int i = 1; i <= sum/3; i++) \r\n \tweight[i][0] = 0; \r\n //The logic of Discrete Knapsack with no repetitions\r\n int count = 0;\r\n for(int i=1; i<=sum/3; i++){\r\n \tfor(int j=1;j<=A.length;j++){\r\n \t\tweight[i][j] = weight[i][j-1];\r\n \t\tint weight1 = 0;\r\n \t\tif(A[j-1]<=i)\r\n \t\t\tweight1 = weight[i-A[j-1]][j] + A[j-1];\r\n \t\tweight[i][j] = Math.max(weight1, weight[i][j]);\r\n \t\tif(weight[i][j] == sum/3)\r\n \t\t\tcount++;\r\n \t\t\r\n \t}\r\n }\r\n if(count < 3)\r\n \treturn 0;\r\n else\r\n \treturn 1;\r\n }", "private void Knapsack(int[] vol, int[] ben, int n, int V, int[][] M)\r\n {\r\n int i,j;\r\n \r\n for (i=1; i<n; i++) {\r\n M[i][0] = 0;\r\n }\r\n \r\n for (j=1; j<V; j++) {\r\n M[0][j] = 0;\r\n }\r\n\r\n for (i=1; i<=n; i++) {\r\n for (j=1; j<=V; j++) {\r\n if(vol[i] > j) {\r\n M[i][j] = M[i-1][j];\r\n } else {\r\n M[i][j] = max(M[i-1][j], M[i-1][j-vol[i]] + ben[i]);\r\n }\r\n }\r\n }\r\n }", "static int zeroOneKnapsack(int []val,int [] wt,int W){\n// initialize\n int[][] dp = new int[val.length+1][W+1];\n\n int n = val.length;\n for (int i = 0;i<=n;i++){\n dp[i][0] = 0;\n }\n for (int j = 0;j<=W;j++){\n dp[0][j] = 0;\n }\n\n for (int i = 1;i<=n;i++){\n for(int j = 1;j<=W;j++){\n if (wt[i-1] <= j){\n dp[i][j] = Math.max(val[i-1] + dp[i-1][j - wt[i-1]], dp[i-1][j]);\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][W];\n }", "public Solution solve(KnapsackData data);", "public static TempResult max(int allowedWeight, Set<Item> items) {\n\t\tint[] values=new int[items.size()];\n\t\tint[] weights=new int[items.size()];\n\t\t\n\n\t\tArrayList<Item> items2=new ArrayList<Item>(items);\n\t\tfor (int i=0; i<items2.size(); i++) {\n\t\t\tvalues[i]=items2.get(i).value;\n\t\t\tweights[i]=items2.get(i).weight;\n\t\t}\n\t\t\n int[][] totalValue = new int[values.length+1][allowedWeight+1];\n boolean[][] includedorNot = new boolean[values.length+1][allowedWeight+1];\n \n //We introduce item one by one to the system.\n //For each introduced item, we consider the maximal profit\n //for weight=[0:allowedWeight]\n for (int i=0; i<values.length; i++) {\n \t//introduce item i into the system.\n \tint val=values[i];\n \tint weight=weights[i];\n \t\n \tint itemIndex=i+1;\n \t\n \tfor (int w=1; w<=allowedWeight; w++) {\n \t\t\n \t\t//Zero copy of ith item; i-1 is calculated already\n \t\tint profit1=totalValue[itemIndex-1][w];\n \t\t\n \t\t//one copy of ith item.\n \t\tint profit2=Integer.MIN_VALUE;\n \t\tif (w-weight>=0) {\n \t\t\t//for a particular targeted weight, add item i does not overflow the targeted weight.\n \t\t\tprofit2=totalValue[itemIndex-1][w-weight]+val;\n \t\t}\n \t\t\n \t\tif (profit1>profit2) {\n \t\t\tincludedorNot[itemIndex][w]=false;\n \t\t\ttotalValue[itemIndex][w]=profit1;\n \t\t} else {\n \t\t\tincludedorNot[itemIndex][w]=true;\n \t\t\ttotalValue[itemIndex][w]=profit2;\n \t\t}\n \t}\n }\n\t\t\n \n TempResult result=new TempResult(0, 0);\n result.value=totalValue[values.length][allowedWeight];\n result.items=new LinkedList<>();\n int w=allowedWeight;\n for (int itemIndex=values.length; itemIndex>0; itemIndex--) {\n \tif (includedorNot[itemIndex][w]) {\n \t\tresult.items.add(items2.get(itemIndex-1));\n \t\tw=w-weights[itemIndex-1];\n \t} \n }\n \n return result;\n \n\t}", "public Solution(int[] w) {\n // get a Random instance\n random = new Random();\n\n // fulfill weightPrefixSum array\n int len = w.length;\n weightPrefixSum = new int[len];\n weightPrefixSum[0] = w[0];\n for(int i = 1; i < w.length; i++){\n weightPrefixSum[i] = weightPrefixSum[i-1] + w[i];\n }\n }", "static int webknapSackRecur(int W, int wt[], int val[], int n) {\n // Base Case\n if (n == 0 || W == 0)\n return 0;\n\n // wt[i] represents the weight of the ith item\n // If weight of the nth item is more than Knapsack capacity W, then\n // this item cannot be included in the optimal solution\n if (wt[n - 1] > W)\n return webknapSackRecur(W, wt, val, n - 1);\n\n // Return the maximum of two cases:\n // (1) nth item included\n // (2) not included\n else return max(val[n - 1] + webknapSackRecur(W - wt[n - 1], wt, val, n - 1),\n webknapSackRecur(W, wt, val, n - 1)\n );\n }", "static int knapSack(int W, int wt[], int val[], int n, List<Integer> incl, List<Integer> v) {\r\n\tList<Integer> v1 = new ArrayList<>();\r\n\tList<Integer> v2 = new ArrayList<>();\r\n\t// Base Case\r\n\tif (n == 0 || W == 0)\r\n\t return 0;\r\n\t// If weight of the nth item is more than Knapsack capacity W, then\r\n\t// this item cannot be included in the optimal solution\r\n\tif (wt[n - 1] > W) {\r\n\t return knapSack(W, wt, val, n - 1, incl, v1);\r\n\t}\r\n\r\n\t// Return the maximum of two cases:\r\n\t// (1) nth item included\r\n\t// (2) not included\r\n\telse {\r\n\t System.out.println(wt[n - 1]);\r\n\t v1.add(n - 1);\r\n\t int m = val[n - 1] + knapSack(W - wt[n - 1], wt, val, n - 1, incl, v1);\r\n\t int n1 = knapSack(W, wt, val, n - 1, incl, v2);\r\n\t if (Math.max(m, n1) == m) {\r\n\t\tv.addAll(v1);\r\n\t } else {\r\n\t\tv.addAll(v2);\r\n\t }\r\n\t return Math.max(m, n1);\r\n\t}\r\n }", "private void ObjectsKnapsack(int[] vol, int[][] M, int n, int V, int[] objects)\r\n {\r\n int i,W;\r\n W = V;\r\n \r\n for(i=n; i>=1; i--) {\r\n if(M[i][W] == M[i-1][W]) {\r\n objects[i] = 0;\r\n } else {\r\n \tobjects[i] = 1;\r\n W = W - vol[i];\r\n }\r\n }\r\n }", "@SuppressWarnings(\"unchecked\") // 빡쳐서 넣음 ArrayList<Pair> 이 라인에 계속 노란줄 떠서 시발\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint V = scan.nextInt(); // 정점의 개수\n\t\tint E = scan.nextInt(); // 간선의 개수\n\t\tint K = scan.nextInt(); // 시작 정점 번호\n\t\tint weight[] = new int[V + 1]; // 시작점에서 해당 정점(인덱스)까지의 최단거리\n\t\tboolean visit[] = new boolean[V + 1]; // 정점 방문여부\n\t\tArrayList<Pair>[] route = new ArrayList[V + 1];\n\t\tfor (int i = 1; i < V + 1; i++) {\n\t\t\troute[i] = new ArrayList<Pair>();\n\t\t\tif (i == K)\n\t\t\t\tcontinue;\n\t\t\tweight[i] = INF;\n\t\t}\n\t\tfor (int i = 0; i < E; i++) {\n\t\t\tint u = scan.nextInt();\n\t\t\tint v = scan.nextInt();\n\t\t\tint w = scan.nextInt();\n\t\t\troute[u].add(new Pair(v, w));\n\t\t}\n\t\t/*\n\t\t * 테스트 용\n\t\t * 2 3 \n\t\t * 1 \n\t\t * 1 2 3\n\t\t * 1 2 1 \n\t\t * 1 2 4\n\t\t * \n\t\t */\n\t\t\n\t\t\n\t\n\t\tPriorityQueue<Pair> q = new PriorityQueue<Pair>();\n\t\tq.offer(new Pair(K, 0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tPair pair = q.poll();\n\t\t\tSystem.out.println(pair.v+\" \"+pair.w);\n\t\t\tif (visit[pair.v] == true)\n\t\t\t\tcontinue;\n\t\t\tvisit[pair.v] = true; //route\n\t\t\t/*\n\t\t\t * ArrayList<Pair> arrayList = route[pair.v]; \n\t\t\t * for (int i = 0; i < arrayList.size(); i++) { Pair p = arrayList.get(i); }\n\t\t\t * \n\t\t\t */\n\t\t\tfor (Pair p : route[pair.v]) { //route[pair.v] 값들을 p 변수에 하나하나씩 대입\n\t\t\t\tif (visit[p.v] == false) {\n\t\t\t\t\tweight[p.v] = Math.min(weight[p.v], weight[pair.v] + p.w);\n\t\t\t\t\tq.add(new Pair(p.v, weight[p.v]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tfor (int i = 1; i < V + 1; i++) {\n\t\t\tif (weight[i] == INF) {\n\t\t\t\tSystem.out.println(\"INF\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(weight[i]);\n\t\t}\n\t}", "public static int[][] greedy(float[] benefit, float[] weight, int[] knapsackWeight) {\n // number of items\n int itemLen = benefit.length;\n // number of knapsacks\n int knapsackLen = knapsackWeight.length;\n // key: index of item, value: benefit / weight of item\n Map<Integer, Float> benefitPerWeightMap = new TreeMap<>();\n // if item i is included in knapsack j, result[i][j] = 1, otherwise result[i][j] = 0\n int[][] result = new int[itemLen][knapsackLen];\n // initialize the map\n for (int i = 0; i < itemLen; i++) {\n benefitPerWeightMap.put(i, (benefit[i] / weight[i]));\n }\n\n // the value comparator for sorting the entrySet in the map by value in descending order (using lambda)\n Comparator<Map.Entry<Integer, Float>> valueComparator = (o1, o2) -> o2.getValue().compareTo(o1.getValue());\n // convert the map to list to sort it by value comparator\n List<Map.Entry<Integer, Float>> benefitPerWeightList = new ArrayList<>(benefitPerWeightMap.entrySet());\n benefitPerWeightList.sort(valueComparator);\n\n // put items in list into knapsacks\n for (int j = 0; j < knapsackLen; j++) {\n // the items have been put in and ready to be delete\n List<Map.Entry<Integer, Float>> deleteList = new ArrayList<>();\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightList) {\n int i = entry.getKey();\n if (weight[i] <= knapsackWeight[j]) {\n result[i][j] = 1;\n deleteList.add(entry);\n knapsackWeight[j] -= weight[i];\n }\n }\n // delete the items have been put in\n benefitPerWeightList.removeAll(deleteList);\n }\n return result;\n }", "public int kSum(int[] A, int k, int target) {\n\t\tint res=0;\r\n\t\t//考虑k=1的情况\r\n//\t\tif (k==1) {\r\n//\t\t\tfor(int i=0;i<A.length;i++) {\r\n//\t\t\t\tif (A[i]==target) {\r\n//\t\t\t\t\tres++;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\treturn res;\r\n//\t\t}\r\n//\t\tint sum_k_1=0;\r\n//\t\tint sum=target-sum_k_1;\r\n//\t\tif (k>1 && k<A.length) {\r\n//\t\t\tfor(int i=0;i<A.length-1;i++) {\r\n//\t\t\t\tfor(int j=i+1;j<A.length;j++) {\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t//动态规划\r\n\t\tint n=A.length;\r\n\t\tint[][][] f=new int[n+1][k+1][target+1];\r\n\t\tfor(int i=0;i<n+1;i++) {\r\n\t\t\tf[i][0][0]=1;\r\n\t\t}\r\n\t\tfor(int i=1;i<=n;i++) {\r\n\t\t\tfor(int j=1;j<=k && j<=i;j++) {\r\n\t\t\t\tfor(int t=1;t<=target;t++) {\r\n\t\t\t\t\tf[i][j][t]=0;\r\n\t\t\t\t\tif (t>=A[i-1]) {\r\n\t\t\t\t\t\tf[i][j][t]=f[i-1][j-1][t-A[i-1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tf[i][j][t]+=f[i-1][j][t];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn f[n][k][target];\r\n }", "public void\tgetData() throws IOException{\n\t\tint i,j, val;\n\t\tint profitOfItems[], weight[];\n\t\t\n\t\tSystem.out.println(\"Enter the weight of the Knapsack ( must be positive):\");\n\t\tknapsackWeight = KnapsackAlgorithmImplementation.getNumber();\n\t\t\n\t\tSystem.out.println(\"\\nEnter the number of items to put in knapsack ( must be positive):\");\n\t\tnumberOfItems = KnapsackAlgorithmImplementation.getNumber();\n\t\t\n\t\tprofitOfItems = new int[numberOfItems + 1];\n\t\tfor ( i = 1 ; i <= numberOfItems ; i++) {\n\t\t\tSystem.out.println(\"Enter profit of item \" + String.valueOf(i));\n\t\t\tprofitOfItems[i] = KnapsackAlgorithmImplementation.getNumber();\n\t\t}\t\n\t\t\n\t\tweight = new int[numberOfItems + 1];\n\t\tfor ( i = 1 ; i <= numberOfItems ; i++) {\n\t\t\tSystem.out.println(\"Enter weight of item \" + String.valueOf(i));\n\t\t\tweight[i] = KnapsackAlgorithmImplementation.getNumber();\n\t\t}\t\n\t\t\n\t\tProfit = new int[numberOfItems + 1][knapsackWeight + 1];\n\t\tDir\t = new int[numberOfItems + 1][knapsackWeight + 1];\n\t\t\n\t\tfor ( j = 0 ; j <= knapsackWeight; j++) {\n\t\t\tProfit[0][j] = 0;\t\n\t\t}\t\n\t\tfor ( i = 0 ; i <= numberOfItems; i++) {\n\t\t\tProfit[i][0] = 0;\t\n\t\t}\n\t\tfor ( i = 1 ; i <= numberOfItems; i++) { \n\t\t\tfor ( j = 1 ; j <= knapsackWeight; j++) {\n\t\t\t\tif ( weight[i] > j) {\n\t\t\t\t\tProfit[i][j] = Profit[i-1][j];\n\t\t\t\t\tDir[i][j] = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tval = profitOfItems[i] + Profit[i-1][j - weight[i]];\n\t\t\t\t\tProfit[i][j] = Find_Max( Profit[i-1][j] , val); \n\t\t\t\t\tif ( Profit[i][j] == val)\n\t\t\t\t\t\tDir[i][j] = 2;\n\t\t\t\t\telse\n\t\t\t\t\t\tDir[i][j] = 1;\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Maximum profit that can fit in the knapsack is :\" + Profit[numberOfItems][knapsackWeight]);\n\t\tPrint_KnapsackItems(Dir,weight);\t\t\n\t}", "public void maximize()\n\t{\n\t\tint i,j,max=cost[0][0];\n\t\t\n\t\tfor(i=0;i<n;i++)\n\t\t{\n\t\t\tfor(j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]>max)\n\t\t\t\t{\n\t\t\t\t\tmax=cost[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(i=0;i<n;i++)\n\t\t{\n\t\t\tfor(j=0;j<n;j++)\n\t\t\t{\t\t\n\t\t\t\tcost[i][j]=max-cost[i][j];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public int calculateMinimumHP(ArrayList<ArrayList<Integer>> grid) {\n\t\t\t\t int m =grid.size(), n = grid.get(0).size();\n\t\t\t\t int[][][] dp = new int[m+1][n+1][2];\n\t\t\t\t \n\t\t\t\t dp[0][0][0] = 0;\n\t\t\t\t dp[0][0][1] = 0;\n\t\t\t\t dp[0][1][0] = 1; // start with life\n\t\t\t\t dp[0][1][1] = 0; // balance life\n\t\t\t\t dp[1][0][0] = 1;\n\t\t\t\t dp[1][0][1] = 0;\n\t\t\t\t for(int i=2;i<dp[0].length;i++){\n\t\t\t\t\t dp[0][i][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[0][i][1] = 0;\n\t\t\t\t }\n\t\t\t\t for(int i=2;i<dp.length;i++){\n\t\t\t\t\t dp[i][0][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[i][0][1] = 0;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t for(int i=1;i<dp.length;i++){\n\t\t\t\t\t for(int j=1;j<dp[0].length;j++){\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(grid.get(i-1).get(j-1) < 0){\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0] - grid.get(i-1).get(j-1) - fromCell[1];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+ grid.get(i-1).get(j-1)>0?fromCell[1]+ grid.get(i-1).get(j-1):0;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+grid.get(i-1).get(j-1);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t return dp[m][n][0];\n\t\t\t\t \n\t\t\t }", "public static void main(String[] args) {\n\t\t\n\t\tint max_size,n; \n \n ArrayList<item> items=new ArrayList();\n\t\t// item 1, value 6, size 1\n items.add(new item(1, 6, 1));\n\t\t// item 2, value 10, size 2\n\t\titems.add(new item(2, 10, 2));\n\t\t// item 3, value 12, size 3\n\t\titems.add(new item(3, 12, 3));\n\t\t// the size of your knapsack\n max_size=5; \n\t\t// sort items by density\n\t\tsortitems(items);\n \n System.out.println(\"The maximum value we can place into the knapsack is \"+ greedyfractionalknapsack(items, max_size));\n\n\n\n}", "public double knapsack(double[] valuePass, double[] weightPass, double capacity) {\n\n if (valuePass.length == 0) { return 0; }\n value = valuePass;\n weight = weightPass;\n double[] subsets = new double[value.length];\n double takenValue = 0;\n double takenWeight = 0;\n double selection = 0;\n\n // look at each subset of the entire set\n for (int i = 0; i < Math.pow(2, value.length); i++) {\n\n /* INVARIANT: the value/weight values are greater than 0 */\n if (KnapsackMain.debug)\n assert assertionValueWeightGreaterThanZero(takenValue, takenWeight);\n\n // variables for the inner loop\n int itemToTake = value.length - 1;\n double temporaryValue = 0;\n double temporaryWeight = 0;\n\n // wh\n while (subsets[itemToTake] != 0 && itemToTake > 0) {\n subsets[itemToTake] = 0;\n itemToTake = itemToTake - 1;\n }\n\n subsets[itemToTake] = 1;\n\n for (int j = 0; j < value.length; j++) {\n\n // if the item is marked in the subset, then add it to the takenValue\n if (subsets[j] == 1 ) {\n temporaryValue = temporaryValue + value[j];\n temporaryWeight = temporaryWeight + weight[j];\n }\n }\n\n if (temporaryValue > takenValue && temporaryWeight <= capacity) {\n takenValue = temporaryValue;\n takenWeight = temporaryWeight;\n }\n }\n return takenValue;\n }", "private static int solve(int[] wt, int[] val, int n, int w) {\n int[][] dp = new int[n+1][w + 1];\n\n for (int i = 1; i <= n; ++i) {\n for (int j = 1; j <= w; ++j) {\n if (wt[i-1] <= j) dp[i][j] = Math.max(dp[i-1][j] , val[i-1]+dp[i-1][j-wt[i-1]]);\n else dp[i][j] = dp[i-1][j];\n }\n }\n return dp[n][w];\n }", "public static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\t\t\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tN = Integer.parseInt(st.nextToken());\n\t\tM = Integer.parseInt(st.nextToken());\n\t\t\n\t\tcon = new ArrayList[N+1]; conW = new ArrayList[N+1];\n\t\tD = new long[N+1];\n\t\tfor(int i =1;i<=N;i++ ){\n\t\t\tcon[i] = new ArrayList<>();\n\t\t\tconW[i] = new ArrayList<>();\n\t\t\tD [i] = Long.MAX_VALUE;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<=M;i++){\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\tint c = Integer.parseInt(st.nextToken());\n\t\t\tcon[a].add(b); \n\t\t\tconW[a].add(c); \n\t\t}\n\n\t\tD[1] = 0;\n\t\tfor(int i=1;i<=N;i++){\n\t\t\tif(D[i] < Long.MAX_VALUE){\n\t\t\t\tfor (int j=0;j<con[i].size();j++){\n\t\t\t\t\tint k = con[i].get(j);//i->k\n\t\t\t\t\tint w = conW[i].get(j);//i->k까지 가는데 cost\n\t\t\t\t\tD[k] = Math.min(D[k], D[i]+w);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(D[N] < Long.MAX_VALUE ? D[N] : -1);\n\n\t}", "private void generateRecursive(ArrayList<double[]> weights,\n\t\t\tdouble[] weight, int numberOfObjectives, int left, int total, int index) {\n\t\tif (index == (numberOfObjectives - 1)) {\n\t\t\tweight[index] = (double)left/total;\n\t\t\tweights.add(weight.clone());\n\t\t} else {\n\t\t\tfor (int i = 0; i <= left; i += 1) {\n\t\t\t\tweight[index] = (double) i / total;\n\t\t\t\tgenerateRecursive(weights, weight, numberOfObjectives, left - i, total, index + 1);\n\t\t\t}\n\t\t}\n\t}", "public static int[] knapsackNoRep(int[] values, int[] weights, int twt) {\n // at maxValSets[i] points to a row of weight indices that provide the max set to achieve weight i;\n int[][] maxValSets = new int[twt + 1][];\n for (int i = 0; i < weights.length; i++) {\n //there is only one value[i] to achieve maximum weight i\n maxValSets[weights[i]] = new int[]{i};\n }\n\n // maxValSets[weights[0]] = new int[]{0};\n int currWt = weights[0];\n while (currWt <= twt) {\n // start with weights at currWt\n for (int wtIndx = 0; wtIndx < weights.length; wtIndx++) {\n // these are set of indices that provide current max value at currWt\n int[] currMaxIndices = maxValSets[currWt];\n // if the current weight index has not already been used\n int nextWt = currWt + weights[wtIndx];\n if ((nextWt <= twt) && (!contains(currMaxIndices, wtIndx))) {\n // need to find weight indices at currWt + weight[wtIndx]\n int nextMaxWithCurr = Arrays.stream(currMaxIndices).map((ind) -> values[ind]).sum() + values[wtIndx];\n int[] nextCurrMaxIndices = maxValSets[nextWt];\n int nextCurrMax = 0;\n if (nextCurrMaxIndices != null) {\n nextCurrMax = Arrays.stream(nextCurrMaxIndices).map((ind) -> values[ind]).sum();\n }\n // if\n if (nextMaxWithCurr > nextCurrMax) {\n int[] newMaxArr = new int[currMaxIndices.length + 1];\n System.arraycopy(currMaxIndices, 0, newMaxArr, 0, currMaxIndices.length);\n // at the last element add the current weight index\n newMaxArr[currMaxIndices.length] = wtIndx;\n maxValSets[nextWt] = newMaxArr;\n }\n }\n }\n currWt++;\n while ((currWt <= twt) && (maxValSets[currWt] == null)) {\n currWt++;\n }\n }\n int[] tinds = maxValSets[twt];\n if (tinds != null) {\n int maxVal = 0;\n System.out.println(\"For target weight \" + twt + \" use:\");\n for (int i : tinds) {\n System.out.print(\"weight \" + weights[i] + \" val \" + values[i] + \" ,\");\n maxVal += values[i];\n }\n System.out.println(\" Total value = \" + maxVal);\n }\n return maxValSets[twt];\n\n }", "public void solveUsingLeastCostMethod() {\n\n this.solution = new Solution();\n\n Source[] proxySources = Arrays.copyOf(sources, sources.length);\n Destination[] proxyDestinations = Arrays.copyOf(destinations, destinations.length);\n int[][] matrix = new int[costs.length][costs[0].length];\n\n List<Integer> rows = new ArrayList<Integer>();\n List<Integer> columns = new ArrayList<Integer>();\n while ( rows.size() != proxySources.length && columns.size() != proxyDestinations.length ) {\n //getting minimum cell (if there is a tie, we choose where is the maximum quantity)\n int indexI,indexJ, value;\n indexI = 0;\n indexJ = 0;\n value = 0;\n boolean firstElement = true;\n for(int i=0;i<proxySources.length;i++) {\n if( !rows.contains(i) ) {\n for(int j=0;j<proxyDestinations.length;j++) {\n if( !columns.contains(j) ) {\n if ( firstElement ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n firstElement = false;\n }\n if( costs[i][j] < value ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n }\n else if( costs[i][j] == value ) {\n if( Math.min(proxySources[i].getSupply(),proxyDestinations[j].getDemand()) > Math.min(proxySources[indexI].getSupply(),proxyDestinations[indexJ].getDemand()) ) {\n indexI = i;\n indexJ = j;\n value = costs[i][j];\n }\n }\n }\n }\n }\n }\n int supply = proxySources[indexI].getSupply();\n int demand = proxyDestinations[indexJ].getDemand();\n\n\n this.solution.add(sources[indexI], destinations[indexJ], Math.min(supply,demand), costs[indexI][indexJ]);\n\n if ( supply < demand ) {\n proxySources[indexI].setSupply(0);\n proxyDestinations[indexJ].setDemand(demand - supply);\n rows.add(indexI);\n }\n else if( supply > demand ) {\n proxySources[indexI].setSupply(supply-demand);\n proxyDestinations[indexJ].setDemand(0);\n columns.add(indexJ);\n }\n else {\n proxySources[indexI].setSupply(0);\n proxyDestinations[indexJ].setDemand(0);\n rows.add(indexI);\n columns.add(indexJ);\n }\n }\n this.solution.showSolution();\n\n\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "private void findSmallestCost() {\n int best = 0;\n fx = funFitness[0];\n for (int i = 1; i < population; i++) {\n if (funFitness[i] < fx) {\n fx = funFitness[i];\n best = i;\n }\n }\n //System.arraycopy(currentPopulation[best], 0, bestSolution, 0, dimension);\n copy(bestSolution, currentPopulation[best]);\n }", "private static long calc1()\n {\n final int min = 1000;\n final int max = 10000;\n\n // initialize\n List<List<Integer>> m = new ArrayList<>();\n for (int k = 0; k < end; k++) {\n List<Integer> list = new ArrayList<Integer>();\n int n = 1;\n while (k >= start) {\n int p = pkn(k, n);\n if (p >= max) {\n break;\n }\n if (p >= min) {\n list.add(p);\n }\n n++;\n }\n m.add(list);\n }\n\n boolean[] arr = new boolean[end];\n arr[start] = true;\n\n List<Integer> solutions = new ArrayList<>();\n List<Integer> list = m.get(start);\n for (Integer first : list) {\n LinkedList<Integer> values = new LinkedList<>();\n values.add(first);\n f(m, arr, values, 1, solutions);\n // we stop at the first solution found\n if (!solutions.isEmpty()) {\n break;\n }\n }\n\n // solutions.stream().forEach(System.out::println);\n int res = solutions.stream().reduce(0, Integer::sum);\n return res;\n }", "public Collection<MatchingPair> matchingPairs(Collection<Integer> values, Integer targetSum)\n {\n HashMap<Integer, Integer> tableCompteur = new HashMap<>();\n LinkedHashMap<Integer, Integer> tablePaire = new LinkedHashMap<Integer, Integer>();\n Collection<MatchingPair> paireSansDuplication = new LinkedList();\n Collection<MatchingPair> solution = new LinkedList();\n\n // On itere sur les valeurs donnee pour savoir le compte de chaque valeur\n for (Integer valeur : values)\n {\n if (tableCompteur.containsKey(valeur))\n {\n // Partie Compteur\n Integer compteur = tableCompteur.get(valeur);\n compteur++;\n tableCompteur.put(valeur, compteur);\n }\n else {\n tableCompteur.put(valeur, 0);\n }\n\n }\n\n // On itere sur les valeurs donnee pour savoir les paires\n for (Integer element : values)\n {\n int temp = targetSum - element;\n if (tablePaire.containsKey(element))\n {\n if (tablePaire.get(element) != null)\n {\n paireSansDuplication.add(new MatchingPair(element, temp));\n }\n // si la table contient l'element on met nul pour ne pas avoir de repetition\n tablePaire.put(temp, null);\n }\n else if (!tablePaire.containsKey(element))\n {\n tablePaire.put(temp, element);\n }\n }\n\n // On trouve le minimum count entre les paire et leur compte pour tenir en compte de toutes les possibilites. Ici le meilleur cas reste O(n) ( pas de paire)\n for (MatchingPair paire : paireSansDuplication)\n {\n if (paire != null) { // verification au debug pr erreur nullpointer\n int a = tableCompteur.get(paire.first);\n int b = tableCompteur.get(paire.second);\n int minCount = Math.min(a+1, b+1);\n for (int i = 0; i < pow(minCount, 2); i++)\n {\n solution.add(new MatchingPair(paire.first, paire.second));\n }\n }\n }\n return solution;\n }", "public void initial()\n\t{ \n\t\tint i,j; \n\t\tint tempValue=0;\n\t\tfor(i=0; i<n; i++) \n\t\t{ \n\t\t\tfor(j=0; j<n; j++)\n\t\t\t {\n\t\t\t\tif(j==0)\n\t\t\t\t{\n\t\t\t\t\ttempValue = cost[i][j];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(tempValue> cost[i][j])\n\t\t\t\t\t{\n\t\t\t\t\t\ttempValue = cost[i][j];\n\t\t\t\t\t}\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tfor (j=0; j<n;j++)\n\t\t\t{\n\t\t\t\tcost[i][j] = cost[i][j]- tempValue;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tfor(j=0;j<n;j++)\n\t\t{\n\t\t\tfor (i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tif(i==0)\n\t\t\t\t{\n\t\t\t\t\ttempValue = cost[i][j];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t if(tempValue> cost[i][j])\n\t\t\t\t {\n\t\t\t\t \ttempValue = cost[i][j];\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tcost[i][j] = cost[i][j] - tempValue;\n\t\t\t}\n\t\t}\t\n\t}", "private void combinationSum3(int[] candidates, int k, int i, int currentSum, int target, List<List<Integer>> response, List<Integer> temp) {\n if (temp.size() == k) {\n\n if (currentSum == target)\n response.add(new ArrayList<>(temp));\n\n\n return;\n }\n\n if (i == candidates.length)\n return;\n\n\n //1. Our choices: We can choose a number from the list any number of times and all the numbers\n for (int s = i; s < candidates.length; s++) {\n\n //if this element is greater than target, then adding it to current sum make bigger than target\n //since,elements are sorted, then all the element after this element are > target\n if (candidates[s] > target)\n break;\n\n //Our constraints : We can't go beyond target, we can take more element than available in array\n if (currentSum + candidates[s] <= target) {\n currentSum += candidates[s];\n temp.add(candidates[s]);\n\n combinationSum3(candidates, k, s + 1, currentSum, target, response, temp);\n\n //backtrack\n temp.remove(temp.size() - 1);\n currentSum -= candidates[s];\n }\n }\n\n }", "int knapsack01(int[] v, int[] w, int capacity) {\n return knapsack01(v, w, capacity, 0, 0);\n }", "public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int sum = sc.nextInt();\n int N = sc.nextInt();\n sc.nextLine();\n int [][] arr = new int[N][2];\n for(int i = 0;i<N;i++)\n {\n arr[i][0] = sc.nextInt();\n arr[i][1] = sc.nextInt();\n sc.nextLine();\n }\n //Arrays.sort(arr, new Comparator<int[]>() {\n // @Override\n // public int compare(int[] o1, int[] o2) {\n // return o1[1]-o2[1]; //按第二列价值排个序。\n // }\n //});\n int [][] dp = new int[N+1][sum+1];\n int [][] path = new int[N+1][sum+1];\n for(int i = 1;i<=N;i++)\n {\n for(int j = 1;j<=sum;j++)\n {\n if(j<arr[i-1][0])\n dp[i][j] = dp[i-1][j];\n else\n {\n if(dp[i-1][j]<dp[i-1][j-arr[i-1][0]]+arr[i-1][1])\n path[i][j] = 1;\n dp[i][j] = Math.max(dp[i-1][j],dp[i-1][j-arr[i-1][0]]+arr[i-1][1]);\n }\n }\n }\n System.out.println(dp[N][sum]);\n\n int i = N;\n int j = sum;\n while (i>0&&j>0)\n {\n if(path[i][j]==1)\n {\n System.out.print(1+\" \");\n j -=arr[i-1][0];\n }\n else\n {\n i--;\n System.out.print(0+\" \");\n }\n }\n\n\n // 改进版。只使用一维数组。\n // int [] f = new int[sum+1];\n // for(int i = 0;i<N;i++)\n // {\n // for (int j = sum;j>=0;j--)\n // {\n // if(j>=arr[i][0])\n // f[j] = Math.max(f[j], f[j-arr[i][0]]+arr[i][1]);\n // }\n // }\n // System.out.println(f[sum]);\n\n }", "public static void mst(int n)\r\n {\r\n \r\n boolean[]visited=new boolean[n+1];\r\n \r\n //sort queue with considering weight as a key\r\n PriorityQueue<Node>queue=new PriorityQueue<>(new Comparator<Node>(){\r\n public int compare(Node n1,Node n2)\r\n {\r\n return n1.weight-n2.weight;\r\n }\r\n });\r\n \r\n visited[1]=true;\r\n \r\n for(Edge e:list[1])\r\n {\r\n queue.add(new Node(e.weight,e.vertex,1));\r\n }\r\n \r\n while(queue.size()!=0)\r\n {\r\n Node node=queue.poll();\r\n \r\n int weight=node.weight;\r\n int curr=node.curr;\r\n int parent=node.parent;\r\n \r\n if(visited[curr])\r\n continue;\r\n \r\n visited[curr]=true;\r\n arr.add(new Node(weight,curr,parent));\r\n ans+=weight;\r\n \r\n for(Edge e:list[curr])\r\n {\r\n queue.add(new Node(e.weight,e.vertex,curr));\r\n }\r\n \r\n }\r\n \r\n }", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "public static void main(String args[]) {\r\n\tList<Integer> list = new ArrayList<>();\r\n\tint id[] = new int[] { 38, 21, 13, 15 };\r\n\tint val[] = new int[] { 500, 1800, 1500, 50 };\r\n\tint wt[] = new int[] { 130, 280, 120, 50 };\r\n\tint W = 300;\r\n\tint n = val.length;\r\n\tSystem.out.println(knapSack(W, wt, val, n, list, list));\r\n\tSystem.out.println(Arrays.toString(list.toArray()));\r\n }", "private void apriori(){\n HashMap<BitSet, Integer> frequentItemsBit = new HashMap<>();\n HashMap<BitSet, Integer> allAssociations = new HashMap<>();\n \n // Put all the 1-itemsets in frequent item hashmap. It will be scanned\n // for getting k-itemsets and cleared iteratively. \n for (int i = 0; i < frequentItemListSetLenOne.size(); i++) {\n BitSet bitSet = new BitSet(bitsetLen);\n bitSet.set(i, true);\n frequentItemsBit.put(bitSet, frequentItemListSetLenOne.get(i).getValue());\n }\n\n int currentK = 1;\n boolean emptyFrequentSet = false;\n \n while (!emptyFrequentSet) {\n \n // create candidates\n if(currentK > 1){\n HashMap<BitSet, Integer> frequentItemsBitT = (HashMap)frequentItemsBit.clone();\n frequentItemsBit.clear();\n frequentItemsBit = candidate_gen(frequentItemsBitT, currentK);\n }\n \n // If no frequent itemSet in current level break\n if(frequentItemsBit.isEmpty())\n break;\n \n // if currentK >= minimumK insert into final list\n if (currentK >= min_itemset_size_K) {\n for (Map.Entry<BitSet, Integer> entry : frequentItemsBit.entrySet()) {\n allAssociations.put(entry.getKey(), entry.getValue());\n }\n }\n currentK++;\n }\n \n printAssociations(allAssociations);\n }", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(new FileReader(\"talent.in\"));// new InputStreamReader(System.in)); //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"talent.out\")));\n int N = sc.nextInt();\n int minWeight = sc.nextInt();\n int[] weight = new int[N];\n int[] value = new int[N];\n int totalTalent = 0;\n for (int i = 0; i < N; i++) {\n int wt = sc.nextInt();\n int val = sc.nextInt();\n weight[i] = wt;\n value[i] = val;\n totalTalent += val;\n }\n\n // Store, for a given talent, what is the smallest weight used to achieve it?\n int[] dp = new int[totalTalent + 1];\n Arrays.fill(dp, (int) 1e9);\n dp[0] = 0;\n // the min weight to produce 0 talent is 0. However,\n // it is necessary to make everything else big because we can only BUILD\n // from 0\n double bestRatio = 0;\n for (int cow = 0; cow < N; cow++) {\n // look at each cow, and go DOWN THROUGH THE dp array, updating the\n // best weight achievable BEHIND US. This countercurrent motion ensures no repeated\n // counting of a single cow's talents\n int contribution = value[cow];\n int wt = weight[cow];\n for (int talent = totalTalent; talent >= 0; talent--) {\n int boostedTalent = contribution + talent;\n int boostedWeight = dp[talent] + wt;\n // with the min weight of a certain talent,\n // is it possible to get a smaller boostedWeight for a boostedTalent\n if (boostedTalent <= totalTalent) {\n // If we are in bounds,\n if (boostedWeight < dp[boostedTalent]) {\n // and the attempted team has a better weight value\n // then update it!\n // Initially, when everything is 1 billion, this cannot\n // happen except for from the base cases, building outward\n dp[boostedTalent] = boostedWeight;\n\n // At the same time, we can be more efficient by constantly\n // checking if we had enough weight first of all, and\n // second of all had a better talent/weight ratio!\n double ratio = (double) boostedTalent / boostedWeight;\n if (ratio > bestRatio && boostedWeight >= minWeight) {\n bestRatio = ratio;\n }\n }\n }\n }\n }\n\n out.println((int) (1000 * bestRatio));\n out.close();\n }", "public static int knapsack(int[] weights, int[] values, int n, int maxWeight) {\n return knapSack(maxWeight, weights, values, n);\r\n }", "static void knapsack(int problem, int i, int profit, int weight) {\r\n\t\tif(weight <= capacities.get(problem) && profit > maxProfit) {\r\n\t\t\tmaxProfit = profit;\r\n\t\t\tnumbest = i;\r\n\t\t\tfor(int j = 0; j < include.length; j++){\r\n\t\t\t\tbestset[j] = include[j];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(promising(problem, weight, profit, i)) {\r\n\t\t\tinclude[i+1] = \"yes\";\r\n\t\t\tknapsack(problem, i+1, profit + profits[i+1], weight + weights[i+1]);\r\n\t\t\tinclude[i+1] = \"no\";\r\n\t\t\tknapsack(problem, i+1, profit, weight);\r\n\t\t}\r\n\t}", "private double costOf(int w) {\n\t\treturn getVertex(w).getCost();\n\t}", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "public void solve_base(Items items,Knapsack knapsack) {\n iteration=0;\n best_value=-1;\n System.out.println(\"iteration:\"+iteration+\" solve_begin_time:\"+System.currentTimeMillis());\n this.solve(items,knapsack);\n System.out.println(\"iteration:\"+iteration+\" solve_end_time:\"+System.currentTimeMillis());\n }", "private static List<Integer> packDPInit(PackageDTO packageDTO) {\n // Declare the table dynamically\n Integer itemsSize = packageDTO.getItems().size();\n Integer capacityGrams = packageDTO.getCapacity() * GRAMS_IN_KILO;\n Integer mem[][] = new Integer[itemsSize + 1][capacityGrams + 1];\n\n //I need to re-instance my list as an Integer List to use The values on my memoization structure\n List<Integer> weights = new ArrayList<>();\n for(ItemDTO item : packageDTO.getItems()){\n Double weightGrams = item.getWeight() * GRAMS_IN_KILO;\n weights.add(weightGrams.intValue());\n }\n\n // Loop to initially filled the\n // table with -1\n for(int i = 0; i < itemsSize + 1; i++)\n for(int j = 0; j < capacityGrams + 1; j++)\n mem[i][j] = -1;\n\n List<Integer> optimalChoice = new ArrayList<>();\n packDPRec(capacityGrams, weights, packageDTO.getItems(), weights.size(), mem, optimalChoice);\n return optimalChoice;\n }", "public static int estimateVehicles( int adj[][]) {\n\t\tHashMap<Integer,Integer> hp=new HashMap<Integer,Integer>();\n\t\tfor(int i=143;i<233;i++) {\n\t\t\tint tem=gr.dijkstra(adj, 233,i );\n\t\t\thp.put(i, tem);\n\t\t}\n\t\t//System.out.println(\"HP: \"+hp);\n\t\tHashMap<Integer,Integer>sort = hp.entrySet().stream().sorted(Map.Entry.comparingByValue())\n\t .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));\n\t\tint noOfVehicles=1;\n\t\t//System.out.println(\"SORT: \"+sort);\n\t\tcost=0;\n\t\tfor(int i: sort.keySet()) {\n\t\tif(flag1==0) {\n\t\t\tscr=233;\n\t\t\tdes=i;\n\t\t\ttime=gr.dijkstra(adj, scr, des);\n\t\t\tcost=cost+time;\n\t\t\tscr=des;\n\t\t\tflag1=1;\n\t\t\tcontinue;\n\t\t}\n\t\telse {\n\t\t\tdes=i;\n\t\t\ttime=gr.dijkstra(adj, scr, des);\n\t\t\tint t=gr.dijkstra(adj, des, 233);\n\t\t\tcost=cost+time+t;\n\t\t\t//System.out.println(\"cost flag1: \"+cost);\n\t\t\tif(cost>=480) {\n\t\t\t\tscr=233;\n\t\t\t\tdes=i;\n\t\t\t\tnoOfVehicles++;\n\t\t\t\tcost=0;\n\t\t\t\t//System.out.println(\"scr: \"+scr+\" des: \"+des);\n\t\t\t\t//System.out.println(\"noOfVehicles: \"+noOfVehicles);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcost=cost-t;\n\t\t\tscr=des;\n\t\t\t\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"noOfVehicles: \"+noOfVehicles);\n\t\treturn noOfVehicles;\n\t}", "public static void main(String[] args) {\n System.out.println(\"------Random items and knapsacks------\");\n int itemLen = 10;\n int knapsackLen = 4;\n float[] benefit = new float[itemLen];\n float[] weight = new float[itemLen];\n int[] knapsackWeight = new int[knapsackLen];\n\n Random random = new Random();\n for (int i = 0; i < itemLen; i++) {\n // random benefit: 1 ~ 10\n benefit[i] = random.nextInt(9) + 1;\n // random weight: 1 ~ 10\n weight[i] = random.nextInt(9) + 1;\n }\n for (int i = 0; i < knapsackLen; i++) {\n // random knapsack weight: 5 ~ 15\n knapsackWeight[i] = random.nextInt(10) + 5;\n }\n\n /*\n Print items and knapsacks\n */\n System.out.print(\"Items benefit:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(benefit[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Items weight:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(weight[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Knapsacks weight:\");\n for (int i = 0; i < knapsackLen; i++) {\n System.out.print(knapsackWeight[i] + \" \");\n }\n System.out.println();\n\n // neighborhood search\n neighborhoodSearch(benefit, weight, knapsackWeight);\n\n }", "private static int optimalBinary(int[][] costMatrix, int[] key, int[] values, int[][] nodeMatrix) {\n\t\tint min=0;\n\t\tint n= values.length;\n\t\tint r;\n\t\tint currentSum=0;\n\t\t\n\t\tfor(int size=1;size<=n; size++){\n\t\t\t////System.out.println(\"size \"+size);\n\t\t\tfor(int l=1;l<=n-size+1;l++){\n\t\t\t\tcurrentSum=0;\n\t\t\t\tr=l+size-1;\n\t\t\t\tmin = costMatrix[l][r];\n\t\t\t\t////System.out.println(\"\"+l+r);\n\t\t\t\tint sum1=0;\n\t\t\t\tfor(int k=l;k<=r;k++){\n\t\t\t\t\tsum1+=values[k-1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(l==r){\n\t\t\t\t\tmin=values[l-1];\n\t\t\t\t}else{\n\t\t\t\t\tfor(int k=l;k<=r;k++){\n\t\t\t\t\t\t////System.out.println(\" :::: K which is root \" +k+ \" : \" +l+ \" \" +(k-1)+ \" \"+ (k+1)+\" \"+ r +\" : \");\n\t\t\t\t\t\tcurrentSum = sum1 + costMatrix[l][k-1]+ ( (k+1 <= n) ? costMatrix[k+1][r] : 0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(currentSum<min){ \n\t\t\t\t\t\t\tmin=currentSum;\n\t\t\t\t\t\t\tnodeMatrix[l][r]=k;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcostMatrix[l][r]= min;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn min;\n\t}", "abstract Double getWeight(int i, int j);", "double fractionalKnapsack(int W, Item arr[], int n) \n {\n Arrays.sort(arr, new Comparator<Item>() {\n \n public int compare(Item a, Item b)\n {\n return b.value*a.weight - a.value*b.weight;\n }\n });\n \n double ans = 0.0;\n \n for(Item it : arr )\n {\n int wt = it.weight;\n int val = it.value;\n \n if( W > wt )\n {\n W -= wt;\n ans += val;\n }\n \n else\n {\n ans += (val*W)/(double)wt;\n break;\n }\n }\n \n return ans;\n }", "public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }", "public int solution(int K, int[] A) {\n \n int total =0;\n int currentLength=0;\n \n for(int i=0; i<A.length; i++){\n currentLength = currentLength + A[i];\n if(currentLength >= K){\n total++;\n currentLength=0; // update\n }\n }\n return total;\n }", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint arr[] = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\tint sum = sc.nextInt();\n\t\tHashMap<Integer,Integer> map = new HashMap<>();\n \t\tArrays.sort(arr);\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint reqSum = sum-temp;\n\t\t\tarr[i]=0;\n\t\t\tint l=0;\n\t\t\tint r = n-1;\n\t\t\twhile(l<r) {\n\t\t\t\t//System.out.println(\"l \" + l + \" r \" + r + \" i = \"+ i);\n\t\t\t\tif(arr[l] + arr[r]==reqSum && arr[l]!=0 && arr[r]!=0 ) {\n\t\t\t\t\tint arr2[] = new int[3];\n\t\t\t\t\tarr2[0] = temp;\n\t\t\t\t\tarr2[1] = arr[l];\n\t\t\t\t\tarr2[2] = arr[r];\n\t\t\t\t\tif(map.containsKey(arr2[0]) || map.containsKey(arr2[1]) || map.containsKey(arr2[2])) {\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tArrays.sort(arr2);\n\t\t\t\t\t\tSystem.out.println(arr2[0] + \" \" + arr2[1] + \" \" + arr2[2]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tl++;\n\t\t\t\t}else if(arr[l] + arr[r] < reqSum) {\n\t\t\t\t\tl++;\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tr--;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tarr[i] = temp;\t\n\t\t\tmap.put(arr[i], 1);\n\t\t}\n\t}", "public Knapsack(int k, int[] v, int[] w) {\n\t\tif (v.length != w.length)\n\t\t\tthrow new IllegalArgumentException(\"ambiguous problem size\");\n\t\tn = v.length;\n\t\tif (n < 1)\n\t\t\tthrow new IllegalArgumentException(\"no items to put in knapsack\");\n\t\tthis.k = k;\n\t\tthis.v = new int[n];\n\t\tthis.w = new int[n];\n\t\tSystem.arraycopy(v, 0, this.v, 0, n);\n\t\tSystem.arraycopy(w, 0, this.w, 0, n);\n\t\tx = new int[n];\n\t\tint max = optimize(); // sets x\n\t\tassert feasible();\n\t\toptimal = objective() == max;\n\t}", "private static int minCoins_bottom_up_dynamic_approach(int[] coins, int amount) {\n if (coins == null || coins.length == 0) return 0;\n if (amount < 0) return 0;\n\n int memo[][] = new int[coins.length + 1][amount + 1];\n\n // populate first row\n for (int col = 0; col <= amount; col++) {\n memo[0][col] = 0;// Important. always initialize 1st row with 1s\n }\n\n // populate first col\n for (int row = 0; row < coins.length; row++) {\n memo[row][0] = 0;// Important. initialize 1st col with 1s or 0s as per your need as explained in method comment\n }\n\n /*\n populate second row\n\n if amount(col) <= coin value, then one coin is required with that value to make that amount\n if amount(col) > coin value, then\n total coins required = amount/coin_value, if remainder=0, otherwise amount/coin_value+1\n */\n for (int col = 1; col <= amount; col++) {\n if (col <= coins[0]) {\n memo[1][col] = 1;\n } else {\n int quotient = col / coins[0];\n\n memo[1][col] = quotient;\n\n int remainder = col % coins[0];\n if (remainder > 0) {\n memo[1][col] += 1;\n }\n }\n }\n\n // start iterating from second row\n for (int row = 2; row < memo.length; row++) {\n // start iterating from second col\n for (int col = 1; col < memo[row].length; col++) {\n\n int coin = coins[row - 1];\n\n // formula to find min required coins for an amount at memo[row][col]\n if (coin > col) { // if coin_value > amount\n memo[row][col] = memo[row - 1][col]; // reserve prev row's value (value determined for prev coins)\n } else {\n memo[row][col] = Math.min(memo[row - 1][col], memo[row][col - coin]) + 1; // min(value determined by prev coins - prev row, value at amount=current_amount-coin_value) + 1\n }\n }\n }\n\n printMemo(coins, memo);\n\n return memo[memo.length - 1][memo[0].length - 1]; // final value is stored in last cell\n }", "@Override\n\tprotected void computeWithoutTime() {\n\t\tinitShortestPaths();\n\n\t\t// Then we sort for each node v the list of terminals by the distance from v\n\t\tsortedRequiredVertices = new HashMap<Integer, TreeSet<Integer>>();\n\t\tsortRequiredVertices();\n\t\t\n\t\t// Copy of the terminals\n\t\tHashSet<Integer> req = new HashSet<Integer>(\n\t\t\t\tinstance.getRequiredVertices());\n\n\t\t// Union of all the solutions returned by the subalgorithm CH2\n\t\tHashSet<Arc> currentSol = new HashSet<Arc>();\n\n\t\t// Until all terminals are reached\n\t\twhile (req.size() > 0) {\n\n\t\t\t// We apply CH2 to reach some of the non reached terminals\n\t\t\tCouple<HashSet<Arc>, HashSet<Integer>> tree = applyCH2(req);\n\n\t\t\t// tree.first the tree returned by CH2\n\t\t\t// tree.second is the terminals of that tree\n\n\t\t\tcurrentSol.addAll(tree.first);\n\t\t\tfor (Arc a : tree.first)\n\t\t\t\tcosts.put(a, 0); // Set the cost of the arc to 0, as this arc is already used in the solution, it does not cost anything to use it again.\n\t\t\treq.removeAll(tree.second);\n\t\t}\n\n\t\t// Compute the returned solution and its cost.\n\t\tarborescence = new HashSet<Arc>();\n\t\tint c = 0;\n\t\tfor (Arc a : currentSol) {\n\t\t\tList<Arc> l = shortestPaths.get(a);\n\t\t\tif (a.getInput().equals(a.getOutput()))\n\t\t\t\tl = new ArrayList<Arc>();\n\t\t\tfor (Arc b : l) {\n\t\t\t\tarborescence.add(b);\n\t\t\t\tc += instance.getCost(b);\n\t\t\t}\n\t\t}\n\t\tcost = c;\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int q = sc.nextInt();\n\n for(int k = 0; k < q; k++) {\n int m = sc.nextInt();\n int n = sc.nextInt();\n\n // indicate number of pieces\n long x = 1;\n long y = 1;\n \n ArrayList<Long> c_y = new ArrayList<Long>();\n for(int i = 0; i < m - 1; i++) {\n c_y.add(sc.nextLong());\n }\n \n ArrayList<Long> c_x = new ArrayList<Long>();\n for(int i = 0; i < n - 1; i++) {\n c_x.add(sc.nextLong());\n }\n\n Collections.sort(c_y, Collections.reverseOrder());\n Collections.sort(c_x, Collections.reverseOrder());\n\n // cut: most expensive = cut first\n int index_X = 0;\n int index_Y = 0;\n long totalCost = 0;\n\n while(!(x == n && y == m)) {\n if(x < n && y < m) {\n // compare cost to decide whether cut horizontally or vertically\n if(c_y.get(index_Y) >= c_x.get(index_X)) {\n totalCost += c_y.get(index_Y) * x;\n y++;\n index_Y++;\n } else if(c_y.get(index_Y) < c_x.get(index_X)) {\n totalCost += c_x.get(index_X) * y;\n x++;\n index_X++; \n }\n } else if(x == n && y < m) {\n totalCost += c_y.get(index_Y) * x;\n index_Y++;\n y++;\n } else if(x < n && y == m) {\n totalCost += c_x.get(index_X) * y;\n index_X++;\n x++;\n }\n }\n\n totalCost = totalCost % (long)(Math.pow(10, 9) + 7);\n System.out.println(totalCost );\n }\n }", "public int solution(int K, int[] A) {\n HashMap<Integer,ArrayList<Integer>> map = new HashMap<Integer,ArrayList<Integer>>();\n \n int dup=0,nonDup=0;\n for (int i=0;i< A.length;i++){\n if(2*A[i]==K){\n if(!map.containsKey(A[i])){\n dup++;\n map.put(A[i],new ArrayList<Integer>());\n }\n continue;\n }\n \n if(!map.containsKey(A[i])){\n \tmap.put(A[i],new ArrayList<Integer>());\n }\n map.get(A[i]).add(i);\n nonDup+=map.get(K-A[i]).size();\n }\n return nonDup*2+dup;\n }", "public int minimumCost(int N, int[][] connections) {\n int[] parent = new int[N + 1];\n Arrays.fill(parent, -1);\n Arrays.sort(connections, (a,b) -> (a[2]-b[2]));\n int cnt = 0;\n int minCost = 0;\n \n for(int[] edge: connections){\n int src = edge[0];\n int dst = edge[1];\n int cost = edge[2];\n \n int srcSubsetId = find(parent, src);\n int dstSubsetId = find(parent, dst);\n \n if(srcSubsetId == dstSubsetId) {\n // Including this edge will cause cycles, then ignore it\n continue;\n }\n cnt += 1;\n minCost += cost;\n union(parent, src, dst);\n }\n return cnt==N-1? minCost : -1;\n}", "private long getMaxValue( Item[] items, int maxWeight, int n) {\n\t\tif ( n == 0 || maxWeight == 0 )\n\t\t\treturn 0;\n\n\t\t// Weight of the nth item is more than maxWeight -> \n\t\t// We cannot include this item into the optimal solutions.\n\t\t// Fall back to to the nth-1 item.\n\t\tif ( items[n - 1].getWeight() > maxWeight)\n\t\t\treturn getMaxValue( items, maxWeight, n-1);\n\t\t\n\t\t// Return the maximum of these two cases:\n\t\t// 1) nth item included\n\t\t// 2) nth item is not included\n\t\t\n\t\tlong includedValue = items[n-1].getValue() + getMaxValue(items, maxWeight-items[n-1].getWeight(), n-1);\n\t\tlong notIncludedValue = getMaxValue(items, maxWeight, n - 1);\n\t\treturn Math.max( includedValue, notIncludedValue);\n\t}", "public static void main(String[] args) throws NumberFormatException, IOException {\n\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tint T = Integer.parseInt(br.readLine());\r\n\t\tStringTokenizer st;\r\n\t\tfor (int test_case = 1; test_case <= T; test_case++) {\r\n\t\t\tst = new StringTokenizer(br.readLine());\r\n\t\t\tN = Integer.parseInt(st.nextToken());\r\n\t\t\tK = Integer.parseInt(st.nextToken());\r\n\t\t\tst = new StringTokenizer(br.readLine());\r\n\t\t\tlist = new ArrayList[N + 1];\r\n\t\t\tfor (int i = 1; i <= N; i++) {\r\n\t\t\t\tlist[i] = new ArrayList<Integer>();\r\n\t\t\t}\r\n\t\t\tfor (int i = 1; i <= N; i++) {\r\n\t\t\t\tint k = Integer.parseInt(st.nextToken());\r\n\t\t\t\tlist[k].add(i);\r\n\t\t\t}\r\n//\t\t\tfor (int i = 1; i <= N; i++) {\r\n//\t\t\t\tfor (int j = 0; j < list[i].size(); j++)\r\n//\t\t\t\t\tSystem.out.print(i + \", \" + list[i].get(j) + \" \");\r\n//\t\t\t}\r\n//\t\t\tSystem.out.println();\r\n\r\n\t\t\tQueue<Integer> q;\r\n//\t\t\tfor(int i = 1; i<=N;i++) {\r\n//\t\t\t\tif(list[i].size()==0) {\r\n//\t\t\t\t\tq.add(i);\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t\tint visited[];\r\n\t\t\tint answer = 0;\r\n\t\t\tfor (int i = 1; i <= N; i++) {// 각 굴에 대해서 인원 센다\r\n\t\t\t\tq = new LinkedList<Integer>();\r\n\t\t\t\tvisited = new int[N + 1];\r\n\t\t\t\tint count = K;\r\n//\t\t\t\tfor (int j = 1; j < K; j++) {// 지날 수 있는 굴의 최대갯수 K\r\n\t\t\t\tif (list[i].size() < 1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tint idx;\r\n\t\t\t\tfor (int u = 0; u < list[i].size(); u++) {\r\n\t\t\t\t\tidx = list[i].get(u);\r\n\t\t\t\t\tq.add(idx);\r\n\t\t\t\t}\r\n\t\t\t\twhile (count > 0 && !q.isEmpty()) {\r\n\t\t\t\t\tidx = q.poll();\r\n\r\n\t\t\t\t\tfor (int m = 0; m < list[idx].size(); m++) {\r\n\r\n\t\t\t\t\t\tint dd = list[idx].get(m);\r\n\t\t\t\t\t\tif (visited[dd] == 0 && dd != i) {\r\n\t\t\t\t\t\t\tvisited[dd] = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tq.add(list[idx].get(m));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcount--;\r\n\r\n\t\t\t\t}\r\n//\t\t\t\t}\r\n\t\t\t\tfor (int e = 1; e <= N; e++) {\r\n\t\t\t\t\tif (visited[e] == 1)\r\n\t\t\t\t\t\tanswer++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"#\" + test_case + \" \" + answer);\r\n\r\n\t\t}\r\n\r\n\t}", "static int distributeCandy(int[] score) {\n java.util.TreeMap<Integer,Integer> candcalmap=new java.util.TreeMap<Integer,Integer>();\n int totcand=0,numcan=1;\n /* for(int indx=1;indx<score.length;indx++)\n {\n while(score[indx-1]<(indx<score.length?score[indx]:Integer.MAX_VALUE))\n {\n numcan++;\n indx++;\n totcand+=numcan;\n //System.out.println(numcan+\"-\"+indx+\":\"+totcand);\n if(indx==score.length)\n break;\n }\n numcan=1;\n totcand+=numcan;\n \n }\n*/\tfor(int sc:score)\n {\n candcalmap.put(sc,candcalmap.get(sc)==null?1:candcalmap.get(sc)+1);\n }\n for(Map.Entry<Integer,Integer> e:candcalmap.entrySet())\n {\n totcand+=numcan*e.getValue();\n// System.out.println(e.getValue()+\"-\"+e.getKey()+\":\"+numcan+\" \"+totcand);\n numcan++;\n }\n return totcand;\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}", "public static ArrayList < ArrayList < Double >> binPack(double weight[], int n, double bin_cap) { \r\n int binCount = 0;\r\n int k = 0;\r\n double[] bin_space = new double[n];\r\n\r\n ArrayList < Integer > bin = new ArrayList < Integer > ();\r\n ArrayList < Double > val = new ArrayList < Double > ();\r\n ArrayList < ArrayList < Double >> binVal = new ArrayList < ArrayList < Double >> ();\r\n binVal.add(k, new ArrayList < Double > ());\r\n System.out.println(\".......Commencing Calculation...........\\n\");\r\n startTime = System.nanoTime();\r\n for (int i = 0; i < n; i++) {\r\n int j;\r\n for (j = 0; j < binCount; j++) {\r\n \r\n if (bin_space[j] >= weight[i]) {\r\n bin_space[j] = bin_space[j] - weight[i];\r\n //val.add(weight[i]);\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + j + \" took in weight \" + weight[i]);\r\n break;\r\n }\r\n \r\n }\r\n System.out.println(\"*Bad fit for next weight size \"+ weight[i]+ \r\n \"\\n\\n ***NEW BIN CREATED***\\n\");\r\n if (j == binCount) {\r\n \r\n bin_space[binCount] = bin_cap - weight[i];\r\n //val.add(weight[i]);\r\n binCount++;\r\n //k++;\r\n bin.add(j);\r\n binVal.add(j, new ArrayList < Double > ());\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + k + \" took in weight **\" + weight[i]);\r\n }\r\n } \r\n endTime = System.nanoTime();\r\n elapsedTime = (endTime- startTime);\r\n System.out.println(\"\\nBIN PACKING ALGORITHM COMPLETE\\n\");\r\n \r\n return binVal;\r\n }", "public static void main(String[] args) {\n\t\tint[] w = { 1, 4, 3 };\n\t\tint[] val = { 1500, 3000, 2000 };\n\t\tint m = 4;\n\t\tint n = val.length;\n\t\tint[][] v = new int[n + 1][m + 1];\n\t\tint[][] path = new int[n + 1][m + 1];\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tv[i][0] = 0;\n\t\t}\n\t\tfor (int i = 0; i < v[0].length; i++) {\n\t\t\tv[0][i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tfor (int j = 0; j < v[i].length; j++) {\n\t\t\t\tSystem.out.print(v[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tfor (int i = 1; i < v.length; i++) {\n\t\t\tfor (int j = 1; j < v[i].length; j++) {\n\t\t\t\tif(w[i-1]>j) {\n\t\t\t\t\tv[i][j]=v[i-1][j];\n\t\t\t\t}else {\n\t\t\t\t\tif(v[i-1][j]<val[i-1]+v[i-1][j-w[i-1]]) {\n\t\t\t\t\t\tv[i][j]=val[i-1]+v[i-1][j-w[i-1]];\n\t\t\t\t\t\tpath[i][j]=1;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tv[i][j]=v[i-1][j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int[] i:v) {\n\t\t\tSystem.out.println(Arrays.toString(i));\n\t\t}\n\t}", "public static int[][] optimalBST2(double[] p,double[] q, int num){\n double[][] e = new double[num+2][num+2];//子树期望代价\n double[][] w = new double[num+2][num+2];//子树总概率\n //why e and w is two bigger than num?\n //because when i==j, e[i][i-1] + e[i+1][j] + w[i][j];\n\n int[][] root = new int[num+1][num+1];//记录根节点\n //root[i][j] -- 用来存放i-j组成的最优二叉查找树的根节点\n\n //init--初始化\n for(int i=1; i<num+2; i++){\n e[i][i-1] = q[i-1];\n w[i][i-1] = q[i-1];\n }\n\n for(int d = 0; d<num; d++){\n //插入个数 : 0 - num-1, 从0开始\n for(int i=1; i<=num-d; i++){\n //起始下标 : 1 - num, 从1开始\n int j = i + d;\n e[i][j] = 9999;\n w[i][j] = w[i][j-1] + p[j] + q[j];//\n\n //because of root[i][j-1] <= root[i][j] <= root[i+1][j]\n //so why?\n //\n //进行优化!!!\n if(i == j){\n root[i][j] = i;\n e[i][j] = e[i][i-1] + e[i+1][i] + w[i][i];\n }else{\n for(int k=root[i][j-1]; k<=root[i+1][j]; k++){\n //中间下标\n double temp = e[i][k-1] + e[k+1][j] + w[i][j];\n if(temp < e[i][j]){\n e[i][j] = temp;\n //找到小的,记录下来\n root[i][j] = k;\n }\n\n }\n }\n }\n }\n return root;\n }", "public int knapSackDP(int wt[], int val[], int mw) {\n // init DP\n int[][] dp = new int[wt.length + 1][mw + 1];\n\n // base conditions\n // set all rows for n=0 and w=0 to 0\n\n // Loop\n for (int n = 1; n < dp.length; n++) {\n for (int w = 1; w < dp[0].length; w++) {\n if (wt[n - 1] > w)\n dp[n][w] = dp[n - 1][w];\n else\n dp[n][w] = Math.max(val[n - 1] + dp[n - 1][w - wt[n - 1]], dp[n - 1][w]);\n }\n }\n return dp[dp.length - 1][dp[0].length - 1];\n }" ]
[ "0.7345551", "0.71857923", "0.6874977", "0.6697859", "0.6623731", "0.66015404", "0.6574661", "0.6539444", "0.65312326", "0.6495757", "0.64956975", "0.64951265", "0.6474207", "0.6456372", "0.63735646", "0.63697106", "0.6357988", "0.63428175", "0.6300504", "0.62843573", "0.62609434", "0.622997", "0.6198317", "0.61964446", "0.6189098", "0.6187247", "0.6157634", "0.61562604", "0.6153252", "0.61278385", "0.60993594", "0.6063794", "0.60606474", "0.60590315", "0.60519004", "0.6051742", "0.60500705", "0.6038128", "0.59895575", "0.59835017", "0.5979595", "0.59357285", "0.5932144", "0.5921364", "0.5920772", "0.59163505", "0.5872534", "0.5856889", "0.58502245", "0.584896", "0.580484", "0.5798765", "0.5790169", "0.5775502", "0.57733655", "0.5771193", "0.5759619", "0.5744927", "0.57428944", "0.57052916", "0.5699414", "0.5693023", "0.5680858", "0.567768", "0.56688344", "0.56660616", "0.5654754", "0.5645576", "0.5629056", "0.5625345", "0.561961", "0.56168693", "0.5615624", "0.5604955", "0.56038815", "0.559268", "0.5584314", "0.5583085", "0.5576586", "0.5575471", "0.55751985", "0.5569633", "0.5565541", "0.5550776", "0.55412924", "0.55339396", "0.5522969", "0.55215144", "0.5515175", "0.55115783", "0.5511299", "0.5497578", "0.5497338", "0.5495477", "0.5487113", "0.54802567", "0.54783756", "0.5476765", "0.5468872", "0.5458931" ]
0.611997
30
make camera follow a target entity
public void moveCam() { float x = this.cam_bind_x; //current pos the camera is binded to float y = this.cam_bind_y; //this amazing camera code is from: https://stackoverflow.com/questions/24047172/libgdx-camera-smooth-translation Vector3 target = new Vector3(x+MathUtils.cos(Global.m_angle)*20,y+MathUtils.sin(Global.m_angle)*20,0); final float speed = 0.1f, ispeed=1.0f-speed; Vector3 cameraPosition = cam.position; cameraPosition.scl(ispeed); target.scl(speed); cameraPosition.add(target); cam.position.set(cameraPosition); this.updateCam(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}", "public Entity getCameraFollowTarget() {\n return followTarget;\n }", "public void cameraUpdate(float delta) {\n Vector3 vPosition = cam.position;\n\n // a + (b-a) * trail amount \n // target\n // a = the current cam position\n //b the current player posistion\n\n\n //determines which player the camera follows\n if (Gdx.input.isKeyJustPressed(Input.Keys.SPACE)) {\n nCurrentPlayer = nCurrentPlayer * -1;\n }\n if (nCurrentPlayer > 0) {\n vPosition.x = cam.position.x + (bplayer.getPosition().x * PPM - cam.position.x) * 0.1f;\n vPosition.y = cam.position.y + (bplayer.getPosition().y * PPM - cam.position.y) * 0.1f;\n } else {\n vPosition.x = cam.position.x + (bplayer2.getPosition().x * PPM - cam.position.x) * 0.1f;\n vPosition.y = cam.position.y + (bplayer2.getPosition().y * PPM - cam.position.y) * 0.1f;\n }\n cam.position.set(vPosition);\n cam.update();\n }", "public void afterDraw(INNode target)\n {\n this.grabber.afterRender();\n\n INDirector.setProjection(ProjectionFormat.DirectorProjection3D);\n\n if(target.getCamera().getDirty())\n {\n Vertex2F offset = target.getAnchorePointInPixel();\n\n //Camera should be applied to AnchorPoint\n GL11.glTranslatef(offset.x, offset.y, 0);\n target.getCamera().locate();\n GL11.glTranslatef(-offset.x, -offset.y, 0);\n }\n\n this.texture.bind();\n this.blit();\n }", "private void moveCamera(float tpf) {\n //Place the camera at the node\n this.getCamera().setLocation(cameraNode.getLocalTranslation().multLocal(1,0,1).add(0, 2, 0));\n cameraNode.lookAt(cam.getDirection().mult(999999), new Vector3f(0,1,0)); //Makes the gun point\n if (im.up) {\n cameraNode.move(getCamera().getDirection().mult(tpf).mult(10));\n }\n else if (im.down) {\n cameraNode.move(getCamera().getDirection().negate().mult(tpf).mult(10));\n }\n if (im.right) {\n cameraNode.move(getCamera().getLeft().negate().mult(tpf).mult(10));\n }\n else if (im.left) {\n cameraNode.move(getCamera().getLeft().mult(tpf).mult(10));\n }\n }", "@Override\n\tpublic void act(float delta) {\n\t\tsuper.act(delta);\n\t\t\n\t\tif(PWM.instance().pointIsInObstacle(this.getX(), this.getY())){\n\t\t\tif(!PWM.instance().pointIsInObstacle(this.getX(), lastPos.y)){\n\t\t\t\tthis.setPosition(this.getX(), lastPos.y);\n\t\t\t}else if(!PWM.instance().pointIsInObstacle(lastPos.x, this.getY())){\n\t\t\t\tthis.setPosition(lastPos.x, this.getY());\n\t\t\t}else{\n\t\t\t\tthis.setPosition(lastPos.x, lastPos.y);\n\t\t\t}\n\t\t\t\n\t\t\tthis.lastPos.x = this.getX();\n\t\t\tthis.lastPos.y = this.getY();\n\t\t\t\n\t\t}\t\t\t\t\n\t\t\n\t\tmainCameraFollowHero();\n\t\t\n\t\t\n\t}", "private void pointCameraAt(Point3D target,Group root){\n for(Node node: root.getChildren()){\n node.setTranslateX(node.getTranslateX()-xOffset);\n node.setTranslateY(node.getTranslateY()-yOffset);\n node.setTranslateZ(node.getTranslateZ()-zOffset);\n }\n\n xOffset = -target.getX(); yOffset = -target.getY(); zOffset = -target.getZ();\n\n for(Node node: root.getChildren()){\n node.setTranslateX(node.getTranslateX()+xOffset);\n node.setTranslateY(node.getTranslateY()+yOffset);\n node.setTranslateZ(node.getTranslateZ()+zOffset);\n }\n }", "private Mat4x4 calculateMatCamera(Vec4df up, Vec4df target, Mat4x4 transform) {\n lookDirection = MatrixMath.matrixMultiplyVector(transform, target);\n target = MatrixMath.vectorAdd(origin, lookDirection);\n return MatrixMath.matrixPointAt(origin, target, up);\n }", "private void move() {\n\t\t\tx += Math.PI/12;\n\t\t\thead.locY = intensity * Math.cos(x) + centerY;\n\t\t\thead.yaw = spinYaw(head.yaw, 3f);\n\t\t\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, head.getId(), \n\t\t\t\tnew Location(player.getWorld(), head.locX, head.locY, head.locZ, head.yaw, 0));\n\t\t}", "@Override\n\tpublic void moveCamera() {\n\n\t}", "public void cameraTransform(Vector3f targ, Vector3f up) {\r\n\t\t// First normalize the target\r\n\t\tVector3f n = targ;\r\n\t\tn.normalize();\r\n\t\t// Then normalize the up vector\r\n\t\tVector3f u = up;\r\n\t\tu.normalize();\r\n\t\t// Then cross the two together to get the right vector\r\n\t\tu = u.cross(n);\r\n\t\tVector3f v = n.cross(u);\r\n\r\n\t\t// Finally build a matrix from the result\r\n\t\tm[0][0] = u.x; m[0][1] = u.y; m[0][2] = u.z; m[0][3] = 0.0f;\r\n\t\tm[1][0] = v.x; m[1][1] = v.y; m[1][2] = v.z; m[1][3] = 0.0f;\r\n\t\tm[2][0] = n.x; m[2][1] = n.y; m[2][2] = n.z; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\r\n\t}", "public void setTarget(Vector3f target) \n {\n float distance = FastMath.abs(target.y - this.getPosition().y);\n this.motionTarget = target;\n this.motionPath = new MotionPath();\n \n this.motionPath.addWayPoint(this.getPosition());\n\n this.motionPath.addWayPoint(new Vector3f(this.getPosition().x, target.y, this.getPosition().z));\n \n grabberMotion = new MotionEvent(this.node, this.motionPath);\n grabberMotion.setInitialDuration(distance / this.speed);\n }", "public void onUpdate()\n {\n super.onUpdate();\n this.jumpMovementFactor = 0.0F;\n this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;\n\n if (this.target != null && this.target instanceof EntityLiving)\n {\n EntityLiving var1 = (EntityLiving) this.target;\n\n if (var1.getHealth() <= 0 || !this.canEntityBeSeen(var1))\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n } else\n {\n if (this.target != null && this.target.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n\n if (this.target == null)\n {\n this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);\n\n if (this.target == null)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n\n return;\n }\n }\n }\n\n if (this.posX == (double) this.getOrgX() && this.posY == (double) this.getOrgY() && this.posZ == (double) this.getOrgZ())\n {\n if (!this.isReformed())\n {\n this.setReformed(true);\n }\n\n this.stop();\n this.moveTimer = 0;\n }\n\n if (this.slider == null)\n {\n Vec3 var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n MovingObjectPosition var18 = this.worldObj.rayTraceBlocks(var16, var2);\n var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\n if (var18 != null)\n {\n var2 = Vec3.createVectorHelper(var18.hitVec.xCoord, var18.hitVec.yCoord, var18.hitVec.zCoord);\n }\n\n if (!this.worldObj.isRemote)\n {\n Object var4 = null;\n List var15 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(4.0D, 4.0D, 4.0D));\n double var6 = 0.0D;\n\n for (int var8 = 0; var8 < var15.size(); ++var8)\n {\n Entity var9 = (Entity) var15.get(var8);\n\n if (var9.canBeCollidedWith() && var9 != this)\n {\n float var10 = 0.3F;\n\n if (var9 instanceof EntitySlider)\n {\n this.slider = (EntitySlider) var9;\n var18 = null;\n }\n\n AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);\n MovingObjectPosition var12 = var11.calculateIntercept(var16, var2);\n\n if (var12 != null)\n {\n double var13 = var16.distanceTo(var12.hitVec);\n\n if (var13 < var6 || var6 == 0.0D)\n {\n var6 = var13;\n }\n }\n }\n }\n }\n\n if (this.slider == null || this.slider.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n }\n } else if (this.slider.target != this.target)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n } else\n {\n this.fallDistance = 0.0F;\n double var17;\n double var5;\n double var3;\n\n if (this.gotMovement)\n {\n if (this.isCollided)\n {\n var17 = this.posX - 0.5D;\n var3 = this.boundingBox.minY + 0.75D;\n var5 = this.posZ - 0.5D;\n\n if (this.crushed)\n {\n this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, \"random.explode\", 3.0F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);\n this.worldObj.playSoundAtEntity(this, \"aeboss.slider.collide\", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));\n }\n\n this.stop();\n } else\n {\n if (this.speedy < 2.0F)\n {\n this.speedy += 0.035F;\n }\n\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n\n if (this.direction == 0)\n {\n this.motionY = (double) this.speedy;\n\n if (this.boundingBox.minY > (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY + 0.35D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 1)\n {\n this.motionY = (double) (-this.speedy);\n\n if (this.boundingBox.minY < (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY - 0.25D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 2)\n {\n this.motionX = (double) this.speedy;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 3)\n {\n this.motionX = (double) (-this.speedy);\n\n if (this.posX < (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 4)\n {\n this.motionZ = (double) this.speedy;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 5)\n {\n this.motionZ = (double) (-this.speedy);\n\n if (this.posZ < (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n }\n }\n } else\n {\n this.motionY = 0.0D;\n\n if (this.moveTimer > 0)\n {\n --this.moveTimer;\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n } else\n {\n var17 = Math.abs(this.posX - (this.reform ? (double) this.getOrgX() : this.target.posX));\n var3 = Math.abs(this.boundingBox.minY - (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY));\n var5 = Math.abs(this.posZ - (this.reform ? (double) this.getOrgZ() : this.target.posZ));\n\n if (var17 > var5)\n {\n this.direction = 2;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX))\n {\n this.direction = 3;\n }\n } else\n {\n this.direction = 4;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ))\n {\n this.direction = 5;\n }\n }\n\n if (var3 > var17 && var3 > var5 || var3 > 0.25D && this.rand.nextInt(5) == 0)\n {\n this.direction = 0;\n\n if (this.posY > (this.reform ? (double) this.getOrgY() : this.target.posY))\n {\n this.direction = 1;\n }\n }\n\n this.gotMovement = true;\n }\n }\n\n if (this.harvey > 0.01F)\n {\n this.harvey *= 0.8F;\n }\n }\n }", "public void setVisionTargetPosition(double position){\n visionTargetPosition = position;\n }", "protected void FacetoTarget(Character pc, Object target) {\n int dx, dy;\n if (target instanceof Character) {\n dx = ((Character) target).x - pc.x;\n dy = ((Character) target).y - pc.y;\n } else if (target instanceof Envir_Item) {\n dx = ((Envir_Item) target).getX() - bottom_screen.left - pc.x;\n dy = ((Envir_Item) target).getY() - bottom_screen.top - pc.y;\n } else {\n return;\n }\n\n if (Math.abs(dx) >= Math.abs(dy)) {\n if (dx > 0) {\n pc.setDir(2);\n } else {\n pc.setDir(1);\n }\n } else {\n if (dy > 0) {\n pc.setDir(0);\n } else {\n pc.setDir(3);\n }\n }\n }", "@Override\n public void execute() {\n if (limelight.hasTarget()) {\n Robot.getRobotContainer().getSwerveController().setRumble(RumbleType.kLeftRumble, 0.0);\n\n /**\n * First things first is to calculate distance from target and move towards it\n * second step would be to go ahead and calculate our offset from the target\n * rotation wise so we can go ahead and adjust accordingly. This whole process\n * should happen very quickly and in a closed loop to ensure that it works every\n * time and very accurately. Something we may or may not have to be weary of is\n * bumping into one of the field elements while moving. Potentially we can have\n * an ultrasonic or somehting to prevent that from happening? Not sure if its a\n * big enough issue to worry about at the moment.\n */\n\n // TODO: we will need different PID constants for the different portions, but we\n // can do that later\n double KpDistance = 0.1;\n // \"Instead of actually calculating the distance, you can use the limelight\n // cross-hair. Just position your robot at your ideal distance from the target\n // and calibrate the y-position of the cross-hair. Now your y-angle will report\n // as 0.0 when your robot is at the corect distance. Using this trick, you don’t\n // ever have to actually calculate the actual distance and your code can look\n // something like this\"\n double y_adjust = -KpDistance * limelight.getAngleY();\n // double y_adjust = yController.calculate(limelight.getAngleY());\n\n // we can now set our robot to move forward / back towards this new Y value\n // in swerve terms, this most likely means the \"forward\"\n\n // now we can get the x value we have to adjust by and pass that in for strafe\n double x_adjust = KpDistance * limelight.getAngleX();\n // double x_adjust = xController.calculate(limelight.getAngleX());\n // for now, lets assume that we are already looking straight on at the target so\n // we can ignore any sort of rotation. However, this may be important later!\n // for rotation, we can always just get the current gyro value and\n // hypothetically just turn the robot till it gets to -180 b, but thats\n // something\n // for later lol\n\n // System.out.println(\"X ADJUST: \" + x_adjust);\n // System.out.println(\"Y ADJUST: \" + y_adjust);\n\n Rotation2 currentGyroAngleRotation = DrivetrainSubsystem.getInstance().getGyroscope().getAngle();\n // DrivetrainSubsystem.getInstance().getG\n // double newOutput = MathUtil.clamp(\n // pidController.calculate(currentGyroAngle.toDegrees(), 0), -0.25, .25);\n // double newOutput = pid.calculate(currentGyroAngle.toDegrees(), 0);\n double currentGyroAngle = currentGyroAngleRotation.toDegrees();\n if (currentGyroAngle > 180) {\n currentGyroAngle = (360 - currentGyroAngle) * 0.01;\n } else {\n currentGyroAngle = (0 - currentGyroAngle) * 0.01;\n }\n\n drive.drive(new Vector2(Math.copySign(Math.pow(y_adjust, 2.0), y_adjust),\n Math.copySign(Math.pow(x_adjust, 2.0), -x_adjust)), currentGyroAngle, false);\n\n // once aligned, we set this boolean to true which will finish the command\n // we also later might need to set this to a certain range and not just 0, but\n // again we can do that later once we can get more testing in\n // if (y_adjust == 0 && x_adjust == 0) {\n // this.isAligned = true;\n // }\n } else {\n Robot.getRobotContainer().getSwerveController().setRumble(RumbleType.kLeftRumble, 0.5);\n }\n\n }", "private void move (Point3D target){\n double xPos = drone.getTranslateX();\n double yPos = drone.getTranslateY();\n double zPos = drone.getTranslateZ();\n Point3D from = new Point3D(xPos, yPos, zPos); // get p1\n Point3D to = target;\n Duration duration = Duration.seconds(calculateDistance(from, to) / getSpeed());\n animate(createMoveAnimation(to, duration));\n\n }", "public void applyStrategy(){\n\t\tfloat dx, dy;\n\t\t\n\t\tdx = targetCar.getX() - myCar.getX();\n\t\tdy = targetCar.getY() - myCar.getY();\n\t\t\n\t\t// awesome, atan2 handles all the hard parts of arctan calculations\n\t\tint angle = (int)Math.toDegrees( Math.atan2(dx, dy) );\n\t\tmyCar.setHeading( angle );\n\t}", "public void goToSprite(Sprite target) { \n goToXY(target.pos.x,target.pos.y);\n }", "@Override\n public void move(){\n setDirectionSpeed(180, 7);\n this.moveTowardsAPoint(target.getCenterX(), target.getCenterY());\n }", "public void unFollowing() {\n\t\tdouble newTargetX, newTargetY, xValue, yValue;\n\t\tdouble slope = (kin.target.y - kin.position.y) / (kin.target.x - kin.position.x);\n\t\t\n\t\t// off to the left of the screen\n\t\tif (kin.position.x < kin.target.x) {\n\t\t\tnewTargetY = (MainPanel.PWIDTH + img.getWidth() - kin.target.x) * slope + kin.target.y;\n\t\t\txValue = MainPanel.PWIDTH + img.getWidth();\n\t\t} else { // off the right of the screen\n\t\t\tnewTargetY = (-kin.target.x - img.getWidth()) * slope + kin.target.y;;\n\t\t\txValue = -img.getWidth();\n\t\t}\n\t\t\n\t\t// off to the top of the screen\n\t\tif (kin.position.y < kin.target.y) {\n\t\t\tnewTargetX = (MainPanel.PHEIGHT + img.getHeight() - kin.target.y) / slope + kin.target.x;\n\t\t\tyValue = MainPanel.PHEIGHT + img.getHeight();\n\t\t} else { // off the bottom of the screen\n\t\t\tnewTargetX = (-kin.target.y - img.getHeight()) / slope + kin.target.x;\n\t\t\tyValue = -img.getHeight();\n\t\t}\n\t\t\n\t\t// compare distances and use the minimum as target\n\t\tif (getDistance(kin.position.x, kin.position.y, xValue, newTargetY) < getDistance(kin.position.x, kin.position.y, newTargetX, yValue)) {\n\t\t\tkin.target = new Vector2d(xValue, newTargetY);\n\t\t} else {\n\t\t\tkin.target = new Vector2d(newTargetX, yValue);\n\t\t} // end else\n\t}", "public void updateCamera() {\n\t}", "private void goTo(double x, double y) \n\t{\n\t\t/* Transform our coordinates into a vector */\n\t\tx -= getX();\n\t\ty -= getY();\n\t \n\t\t/* Calculate the angle to the target position */\n\t\tdouble angleToTarget = Math.atan2(x, y);\n\t \n\t\t/* Calculate the turn required get there */\n\t\tdouble targetAngle = Utils.normalRelativeAngle(angleToTarget - getHeadingRadians());\n\t \n\t\t/* \n\t\t * The Java Hypot method is a quick way of getting the length\n\t\t * of a vector. Which in this case is also the distance between\n\t\t * our robot and the target location.\n\t\t */\n\t\tdouble distance = Math.hypot(x, y);\n\t \n\t\t/* This is a simple method of performing set front as back */\n\t\tdouble turnAngle = Math.atan(Math.tan(targetAngle));\n\t\tsetTurnRightRadians(turnAngle);\n\t\tif(targetAngle == turnAngle) {\n\t\t\tsetAhead(distance);\n\t\t} else {\n\t\t\tsetBack(distance);\n\t\t}\n\t}", "public void follow() {\n\n\t\t// moves y position\n\t\tif (centerY < StartingClass.MIDDLE_Y - 100) {\n\t\t\tcenterY += MOVEMENT_SPEED;\n\t\t} else {\n\t\t\tisMovingY = false;\n\t\t}\n\t}", "public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }", "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}", "public void processCamera() {\n\t\tif (Mario.getX() > 300) {\n\t\t\tlevelCompound.move(-Mario.xVel, 0);\n\t\t\tPhysics.moveHitboxes(-Mario.xVel, 0);\n\t\t\tPhysics.moveEnemies(-Mario.xVel, 0);\n\t\t\tMario.setLocation(299, Mario.getY());\n\n\t\t\tlevelCompound.move(-3, 0);\n\t\t\tPhysics.moveHitboxes(-3, 0);\n\t\t\tPhysics.moveEnemies(-3, 0);\n\t\t}\n\t}", "public void target()\n {\n if(noRotation == false)\n {\n if(timer % 3 == 0)\n {\n int currentRotation = getRotation();\n turnTowards(xMouse, yMouse);\n int newRotation = getRotation();\n if (Math.abs(currentRotation-newRotation) > 180)\n {\n if (currentRotation < 180) currentRotation += 360;\n else newRotation += 360;\n }\n if(currentRotation != newRotation)\n { \n setRotation(currentRotation+direction()*8);\n }\n }\n }\n }", "protected void execute() {\t\n \ttarget = Robot.trackingCamera.getTargetPosition();\n \t\n \tSmartDashboard.putNumber(\"targetX\", target[0]);\n \tSmartDashboard.putNumber(\"targetY\", target[1]);\n \t\n \tif(target[0] == TrackingCamera.NOTFOUND || lastDistance < 28){\n \t\tsuper.execute();\n \t\treturn;\n \t}\n \t\n \ttargetX = target[0];\n \ttargetY = target[1];\n \t\n \tsuper.execute();\n \t//System.out.println(distance);\n }", "public void reach(Pose pose) throws ManipulatorException;", "@Override\n public void setCamera (GL2 gl, GLU glu, GLUT glut) {\n glu.gluLookAt(0, 0, 2.5, // from position\n 0, 0, 0, // to position\n 0, 1, 0); // up direction\n }", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t\ttarget = pointEntity(caster,50);\r\n\t\tif (target == null) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trefund = true;\r\n\t\t\tdead = true;\r\n\t\t\tif (refined)\r\n\t\t\t\tsteprange = 240;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tplaySound(Sound.BLOCK_CONDUIT_DEACTIVATE,caster.getLocation(),5,2F);\r\n\t\t\tplaySound(Sound.BLOCK_CONDUIT_ACTIVATE,caster.getLocation(),5,2F);\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tdist = target.getLocation().distance(caster.getLocation());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void setTargetPosition(double position){\n targetPosition = position;\n }", "public TurnToTarget() {\n forceDone = false;\n turnToTarget = new TurnToAngle(0);\n }", "public void startExecuting()\n\t{\n\t\tdouble d0 = this.leapTarget.xCoord - this.entity.posX;\n\t\tdouble d1 = this.leapTarget.zCoord - this.entity.posZ;\n\t\tfloat f = MathHelper.sqrt(d0 * d0 + d1 * d1);\n\t\tthis.entity.motionX += (d0 / (double)f * 0.5D * 0.800000011920929D + this.entity.motionX * 0.20000000298023224D)/2;\n\t\tthis.entity.motionZ += (d1 / (double)f * 0.5D * 0.800000011920929D + this.entity.motionZ * 0.20000000298023224D)/2;\n\t\tthis.entity.motionY = (double)this.leapMotionY;\n\t}", "public void startMovingToTarget() \r\n {\n movingToTarget = true;\r\n }", "@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}", "public FollowEntityMover( Vector2 beginningPoint, Entity entity,\n\t\t\tVector2 offset, float speed ) {\n\t\tthis.beginningPoint = beginningPoint.cpy( );\n\t\tthis.offset = offset.cpy( );\n\t\tthis.entity = entity;\n\t\tthis.speed = speed;\n\t\tpuzzleType = PuzzleType.OVERRIDE_ENTITY_MOVER;\n\t}", "void setRocketTarget(Vector2 target);", "private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}", "private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }", "private void changeCameraPosition() {\n yPosition = mPerspectiveCamera.position.y;\n if (isMovingUp) {\n yPosition += 0.1;\n if (yPosition > 20)\n isMovingUp = false;\n } else {\n yPosition -= 0.1;\n if (yPosition < 1)\n isMovingUp = true;\n }\n\n mPerspectiveCamera.position.set(xPosition, yPosition, zPosition);\n mPerspectiveCamera.update();\n }", "private void lookAt(Bot bot) {\n\t\t// http://www.gamefromscratch.com/post/2012/11/18/GameDev-math-recipes-Rotating-to-face-a-point.aspx\n\t\tdesiredDirection = Math.atan2(bot.getY() - sens.getYPos(), bot.getX() - sens.getXPos()) * (180 / Math.PI);\n\t\tfixDirections();\n\t}", "protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}", "@Override\n public void onDrawFrame(GL10 gl10) {\n glClear(GL_COLOR_BUFFER_BIT);\n\n Location drawCameraLocation;\n\n //Don't draw until camera location is known\n if (mCurrentCameraLocation == null && mNewCameraLocation == null) {\n //Log.d(LOG_TAG, \"onDraw 1\");\n return;\n } else if (mCurrentCameraLocation == null && mNewCameraLocation != null) {\n //Log.d(LOG_TAG, \"onDraw 2\");\n mCurrentCameraLocation = mNewCameraLocation;\n drawCameraLocation = mCurrentCameraLocation;\n } else if (mCurrentCameraLocation != null && mNewCameraLocation != null && mTargetCameraLocation == null) {\n //Log.d(LOG_TAG, \"onDraw 3\");\n\n float distance = mNewCameraLocation.distanceTo(mCurrentCameraLocation);\n\n ///Increment step to target location when new camera location\n // is greater than 1.5 meters from current location\n if (distance > 1.5f) {\n mTargetCameraLocation = mNewCameraLocation;\n }\n\n drawCameraLocation = mCurrentCameraLocation;\n }\n\n //Provide increment location (if necessary) for smooth changes in camera positions\n else if (mCurrentCameraLocation != null && mTargetCameraLocation != null) {\n //Log.d(LOG_TAG, \"onDraw 4\");\n float cameraDistance = mCurrentCameraLocation.distanceTo(mTargetCameraLocation);\n\n\n float x = (float) mCameraStep / TOTALCAMERASTEPS;\n //float y = (float)Math.pow(x,3)*(x*(6*x-15)+10);\n //float y = (float)Math.pow(x,2)*(3-2*x); //smoothstep\n float y = x;\n\n float incDistance = y * cameraDistance;\n float bearing = mCurrentCameraLocation.bearingTo(mTargetCameraLocation);\n\n bearing = (bearing + 360) % 360;\n\n drawCameraLocation = calculateDestinationLocation(mCurrentCameraLocation, bearing, incDistance);\n drawCameraLocation.setAccuracy(mTargetCameraLocation.getAccuracy());\n\n mCameraStep++;\n\n if (mCameraStep == TOTALCAMERASTEPS) {\n //mCurrentCameraLocation = mTargetCameraLocation;\n mCurrentCameraLocation = drawCameraLocation;\n mTargetCameraLocation = null;\n mCameraStep = 0;\n }\n } else {//Never should come to this\n Log.d(LOG_TAG, \"onDraw 5\");\n\n drawCameraLocation = mCurrentCameraLocation;\n }\n\n /*\n setLookAtM(viewMatrix, 0, viewValues[0], viewValues[1], viewValues[2]\n , viewValues[3], viewValues[4], viewValues[5]\n , viewValues[6], viewValues[7], viewValues[8]);\n */\n\n multiplyMM(viewMatrix, 0, rotationMatrix, 0, modelSensorMatrix, 0);\n // Multiply the view and projection matrices together.\n multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0);\n\n\n //Process each image texture with drawCameraLocation\n for (ImageTexture it : mImageTextures) {\n\n\n if (it == null) {\n return;\n }\n\n double ItAngle;\n double distance = drawCameraLocation.distanceTo(it.mLocation);\n\n\n\n /*\n if (distance > (drawCameraLocation.getAccuracy() /0.68f))\n {\n ItAngle = (drawCameraLocation.bearingTo(it.mLocation) + 360) % 360;\n it.rotateAroundCamera((float) ItAngle );\n\n Log.d(LOG_TAG, \"onDrawFrame: distance = \" + distance + \" > \" + (drawCameraLocation.getAccuracy() /0.68f) + \", ItAngle = \" +ItAngle );\n }\n //Within accuracy radius\n else {\n distance = 4;\n }\n\n */\n\n ItAngle = (drawCameraLocation.bearingTo(it.mLocation) + 360) % 360;\n\n\n if (distance != 0 || ItAngle != 0.0f) {\n it.rotateAroundCamera((float) ItAngle);\n it.moveFromToCamera((float) -distance * 0.79f);\n }\n\n\n Log.d(LOG_TAG, \"onDrawFrame: distance = \" + distance + \" > \" + (drawCameraLocation.getAccuracy() / 0.68f) + \", ItAngle = \" + ItAngle);\n Log.d(LOG_TAG, \"onDrawFrame: drawCameraLocation = \" + drawCameraLocation.getLatitude() + \", \" + drawCameraLocation.getLongitude()\n + \" \" + it.mLocation.getLatitude() + \", \" + it.mLocation.getLongitude());\n\n\n String debugStr = \"Camera: \" + String.format(\"%5.6f\", drawCameraLocation.getLatitude()) + \", \" + String.format(\"%5.6f\", drawCameraLocation.getLongitude())\n + \"\\nAccuracy: \" + String.format(\"%5.7f\", drawCameraLocation.getAccuracy()) + \", Z: \" + String.format(\"%3.1f\", mAzimuth)\n //+ \"\\nImage: \" + String.format(\"%5.7f\",it.mLocation.getLatitude()) + \", \" + String.format(\"%5.7f\",it.mLocation.getLongitude())\n + \"\\nDistance: \" + String.format(\"%5.5f\", distance) + \", ItAngle: \" + String.format(\"%3.7f\", it.mCameraRotationAngle);\n\n\n float[] modelMatrix = it.calculateModelMatrix();\n multiplyMM(modelViewProjectionMatrix, 0, viewProjectionMatrix, 0, modelMatrix, 0);\n mTextureShaderProgram.useProgram();\n mTextureShaderProgram.setUniforms(modelViewProjectionMatrix, it.mTextureId, it.opacity);//every object sets its own mvpMatrix, texture, and alpha values\n it.bindData(mTextureShaderProgram);\n it.draw();\n }\n }", "@Override\n protected void execute() {\n Robot.getEndEffectorAngle().goToPos(holdPos);\n }", "public void centerOnEntity(Item e)\n {\n xOffset = e.GetX() - refLinks.GetWidth()/2 + e.GetWidth()/2;\n yOffset = e.GetY() - refLinks.GetHeight()/2 + e.GetHeight()/2;\n checkCameraLimits();\n }", "public void approachTargetWithVision() {\n final double STEER_P = 0.005; \n final double DRIVE_P = 0.05; \n final double DESIRED_TARGET_AREA = 4; // Area of the target when the robot reaches the wall\n final double MAX_DRIVE = 0.75; // Simple speed limit so we don't drive too fast\n final double STEER_I = 0.005;\n final double DRIVE_I = 0.0;\n final double STEER_D = 0.02;\n final double xError;\n final double aError;\n double DRIVE_INTEGRAL = 0;\n\n \n\n double tv = NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"tv\").getDouble(0);\n double tx = NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"tx\").getDouble(0);\n double ta = NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ta\").getDouble(0);\n xError = tx;\n aError = (DESIRED_TARGET_AREA - ta);\n // SmartDashboard.putNumber(\"TA\", ta);\n // SmartDashboard.putNumber(\"TA Error\", aError);\n SmartDashboard.putNumber(\"TX Error\", xError);\n STEER_INTEGRAL = STEER_INTEGRAL + (xError*0.02);\n DRIVE_INTEGRAL = DRIVE_INTEGRAL + (aError * 0.02);\n STEER_DERIVATIVE = (xError - STEER_ERROR_PRIOR)/0.02;\n SmartDashboard.putNumber(\"Integral\", STEER_INTEGRAL);\n SmartDashboard.putNumber(\"Derivative\", STEER_DERIVATIVE);\n SmartDashboard.putNumber(\"TA\", ta);\n\n\n if (tv < 1.0) {\n m_LimelightHasValidTarget = false;\n drive_cmd = 0.0;\n steer_cmd = 0.0;\n } else {\n m_LimelightHasValidTarget = true;\n // Start with proportional steering\n steer_cmd = (xError * STEER_P) + (STEER_INTEGRAL * STEER_I) + (STEER_DERIVATIVE * STEER_D);\n\n // try to drive forward until the target area reaches our desired area\n drive_cmd = (aError * DRIVE_P) + (DRIVE_INTEGRAL * DRIVE_I);\n // don't let the robot drive too fast into the goal\n if (drive_cmd > MAX_DRIVE){\n drive_cmd = MAX_DRIVE;\n }\n }\n\n Robot.driveTrain.setLeftMotors(-drive_cmd - steer_cmd);\n Robot.driveTrain.setRightMotors(-drive_cmd + steer_cmd);\n\n STEER_ERROR_PRIOR = xError;\n\n }", "public void updatePlayer() {\n if(this.hasCam) {\n this.camDir.set(cam.getDirection()).multLocal(0.3f);\n this.camLeft.set(cam.getLeft()).multLocal(0.2f);\n //initialize the walkDirection value so it can be recalculated\n walkDirection.set(0,0,0);\n if (this.left) {\n this.walkDirection.addLocal(this.camLeft);\n }\n if (this.right) {\n this.walkDirection.addLocal(this.camLeft.negate());\n }\n if (this.up) {\n this.walkDirection.addLocal(this.camDir);\n }\n if (this.down) {\n this.walkDirection.addLocal(this.camDir.negate());\n }\n this.mobControl.setWalkDirection(this.walkDirection);\n //player.get\n cam.setLocation(this.mobControl.getPhysicsLocation().add(0,1.5f,0));\n this.setRootPos(this.mobControl.getPhysicsLocation().add(0,-0.75f,0));\n this.setRootRot(this.camDir, this.camLeft);\n }\n // If the actor control does not have ownership of cam, do nothing\n }", "public void setupArbiTrack() {\n ARImageNode targetImageNode = new ARImageNode(\"target.png\");\n\n // Scale and rotate the image to the correct transformation.\n targetImageNode.scaleByUniform(0.25f);\n targetImageNode.rotateByDegrees(90, 1, 0, 0);\n\n // Initialise gyro placement. Gyro placement positions content on a virtual floor plane where the device is aiming.\n ARGyroPlaceManager gyroPlaceManager = ARGyroPlaceManager.getInstance();\n gyroPlaceManager.initialise();\n\n // Add target node to gyro place manager\n gyroPlaceManager.getWorld().addChild(targetImageNode);\n\n // Initialise the arbiTracker\n ARArbiTrack arbiTrack = ARArbiTrack.getInstance();\n arbiTrack.initialise();\n\n // Set the arbiTracker target node to the node moved by the user.\n arbiTrack.setTargetNode(targetImageNode);\n arbiTrack.getTargetNode().setVisible(false);\n\n // Add model node to world\n arbiTrack.getWorld().addChild(modelNode);\n }", "public abstract void turnToLiving(int x, int y);", "public void pointToSprite(Sprite target) {\n pointToXY((int)target.pos.x,(int)target.pos.y);\n }", "public void lookThrough()\r\n {\r\n //rotate the pitch around the X axis\r\n glRotatef(pitch, 1.0f, 0.0f, 0.0f);\r\n //rotate the yaw around the Y axis\r\n glRotatef(yaw, 0.0f, 1.0f, 0.0f);\r\n //translate to the position vector's location\r\n glTranslatef(position.x, position.y, position.z);\r\n \r\n FloatBuffer lightPosition = BufferUtils.createFloatBuffer(4);\r\n lightPosition.put(lPosition.x).put(\r\n lPosition.y).put(lPosition.z).put(1.0f).flip();\r\n glLight(GL_LIGHT0, GL_POSITION, lightPosition);\r\n }", "public void offsetCamera(Location offset){\n //updateCoordinateToScreenPosition();\n xCameraOffset = offset.getX();\n yCameraOffset = offset.getY();\n }", "public void centerCameraOn(GameObject thing) {\r\n\t\tthis.cameraX = (int)(thing.getX() - Game.WIDTH / 2);\r\n\t\tthis.cameraY = (int) (thing.getY() - Game.HEIGHT / 2);\r\n\t}", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }", "public void apply() {\n double currentHeading = self.getHeading();\n IGameIterator iter = target.getCollection().getIterator();\n Pylon nextPylon = null;\n while (iter.hasNext()) {\n iter.getNext();\n if (iter.get() instanceof Pylon) {\n if (((Pylon) iter.get()).getNum() == self.getLatestPylon() + 1) { //if it is the next pylon\n nextPylon = (Pylon) iter.get();\n }\n }\n }\n if (nextPylon == null) { //if there are no more pylons\n self.changeSpeed(0 - ((int) self.getMaxSpeed())); //stop at the finish line\n return;\n }\n\n double deltaX = nextPylon.getPosition().getX() - self.getPosition().getX();\n double deltaY = nextPylon.getPosition().getY() - self.getPosition().getY();\n newHeading = Math.toDegrees(Math.atan2(deltaY, deltaX));\n double rightTurn;\n double leftTurn;\n\n rightTurn = (newHeading - currentHeading);\n if (rightTurn < 0)\n rightTurn += 360;\n leftTurn = 360 - rightTurn;\n\n if (leftTurn <= rightTurn) {\n //turn left\n self.steer(-15);\n } else {\n // turn right\n self.steer(15);\n }\n //self.steer((int) (newHeading - currentHeading));\n currentHeading = self.getHeading();\n\n //move at max speed towards it\n self.changeSpeed((int) self.getMaxSpeed());\n }", "public Target(TargetMeta targetMeta, float x, float y) {\n super(targetMeta, x, y);\n metaObject = targetMeta;\n hitCounter = 0;\n }", "static void translateToFace(MatrixStack matrices, PlayerEntityModel<AbstractClientPlayerEntity> model,\n\t\t\tAbstractClientPlayerEntity player, float headYaw, float headPitch) {\n\n\t\tif (player.isInSwimmingPose() || player.isFallFlying()) {\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(model.head.roll));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(headYaw));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(-45.0F));\n\t\t} else {\n\n\t\t\tif (player.isInSneakingPose() && !model.riding) {\n\t\t\t\tmatrices.translate(0.0F, 0.25F, 0.0F);\n\t\t\t}\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(headYaw));\n\t\t\tmatrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(headPitch));\n\t\t}\n\t\tmatrices.translate(0.0F, -0.25F, -0.3F);\n\t}", "@Override\n public void act(float delta)\n {\n SCALE = PlayScreen.scale;\n\n if(actCount < 4)actCount++;\n\n dt=delta;\n if(!initialized)\n {\n mirror.setRotation(initRotation);\n\n dt = delta;\n positionChanged();\n\n if (hittime > (1.0 / 5.0))\n {\n if (hit >= 0) hit--;\n hittime = 0;\n\n //Set rotation to the nearest multiple of 90\n mirror.setRotation(90 * (Math.round(mirror.getRotation() / 90)));\n\n if (mirror.getRotation() >= 360)\n {\n mirror.setRotation(((mirror.getRotation() - 360 * (int) (mirror.getRotation() / 360)) / 90) * 90);\n }\n\n //setRotation(mirror.getRotation());\n }\n //setOrigin(mirror.getOriginX(), mirror.getOriginY());\n }\n\n if(initialized && hit>0)\n {\n positionChanged();\n\n if(hittime>=(1.0/5.0))\n {\n if(hit>0)hit--;\n hittime = 0;\n if (hit == 0)\n {\n\n //Set rotation to the nearest multiple of 90\n mirror.setRotation(90 * (Math.round(mirror.getRotation() / 90)));\n\n if (mirror.getRotation() >= 360)\n {\n mirror.setRotation(((mirror.getRotation() - 360 * (int) (mirror.getRotation() / 360)) / 90) * 90);\n }\n\n //setRotation(mirror.getRotation());\n }\n }\n\n }\n\n //Handles fading in/out of obstacle when triggered by a Toggle object\n if(fadeIn || fadeOut)\n {\n if(fadeIn)\n {\n if(mirror.getColor().a <0.95f)\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, mirror.getColor().a + 1 * delta * 8 / 4.0f);\n }\n else\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, 1f);\n fadeIn = false;\n fadeOut = false;\n }\n }\n else\n {\n if(mirror.getColor().a >= 0.39f)\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, mirror.getColor().a - 1 * delta * 15 / 4.0f);\n }\n else\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, Toggle.fadealpha);\n fadeIn = false;\n fadeOut = false;\n }\n }\n }\n\n\n\n\n if(!initialized)\n {\n initialized = true;\n }\n\n if(actCount<4){defineBody(); calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());}\n\n if(poly.getRotation() != mirror.getRotation()){calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());}\n\n super.act(delta);\n }", "public AlignByCamera ()\n\t{\n\t\trequires(Subsystems.transmission);\n\t\trequires(Subsystems.goalVision);\n\n\t\tthis.motorRatio = DEFAULT_ALIGNMENT_SPEED;\n\t}", "public void actionPerformed(ActionEvent ae){\n\t\ttarget.moveCameraBRU(target.getVVec().normalize(0.2f));\r\n\t\t// set V vec to 1.0 length\r\n\t\ttarget.getVVec().normalize(1.0f);\r\n\t}", "public void update() {\n\t\tupdateCamera();\n\t}", "@Override\n\tpublic void onNewFrame(HeadTransform transform) {\n\t\tglUseProgram(programPointer);\n\t\t\n\t\t// Find the pointers\n\t\tviewProjectionPointer = glGetUniformLocation(programPointer, \"u_MVP\");\n\t\tlightPosPointer = glGetUniformLocation(programPointer, \"u_LightPos\");\n\t\tviewPointer = glGetUniformLocation(programPointer, \"u_MVMatrix\");\n\t\tmodelPointer = glGetUniformLocation(programPointer, \"u_Model\");\n\t\t\n\t\t// Slowly rotate each of the cubes\n\t\tfor(Cube cube : cubes){\n\t\t\tcube.rotate(TIME_DELTA, 0.5f, 0.5f, 1.0f);\n\t\t}\n\t\t\n\t\t// Update the camera\n\t\tcamera.pointAt(0f, 0f, CAMERA_Z, 0f, 0f, 0f, 0f, 1f, 0f);\n\t\tcamera.setHeadCorrection(transform);\n\t\t\n\t\tcheckGLError(\"onNewFrame\");\n\t}", "public void moveActor();", "public void update(World world, Target target);", "@Override\n public void startFollow(Creature target, Callable<Boolean> onEnd, Consumer<Method> onExit, ENaviType naviType) {\n cancelMoveTask();\n if (!target.getLocation().isValid()) {\n onMovementComplete();\n return;\n }\n\n synchronized (_mutex) {\n _movementCompleted = onEnd;\n _movementFailed = onExit;\n }\n\n getOwner().getAi().setFindPathCompleted(false);\n _followTarget = target;\n _destinationLocation = new Location(_followTarget.getLocation());\n _isSectorActive = true;\n _movementTick = System.currentTimeMillis();\n _navigationType = naviType;\n\n if (_movementTask == null || _movementTask.isDone()) {\n notifySector(true);\n _movementTask = ThreadPool.getInstance().scheduleAiAtFixedRate(this, 150, 150, TimeUnit.MILLISECONDS);\n }\n }", "protected void rotateTo(double target) {\n robot.rightFront.setDirection(REVERSE);\n robot.rightBack.setDirection(REVERSE);\n\n while (opModeIsActive() && robot.rightFront.getDirection() != REVERSE) {\n idle();\n }\n\n if (target < 0) target += 360;\n\n double heading = get360Heading();\n while (opModeIsActive() && !withinRange(heading, target)) {\n // Run Dubberke-Richards logic\n if (Math.abs(heading - target) <= 180) {\n if (heading-target >= 0) {\n rotateRight();\n } else {\n rotateLeft();\n }\n } else { // |heading-target| > 180\n if (heading-target<0) {\n rotateRight();\n } else {\n rotateLeft();\n }\n }\n\n // Update heading for next loop\n heading = get360Heading();\n\n telemetry.addData(\"Heading\", heading);\n telemetry.update();\n }\n\n halt();\n }", "@Override\n\tpublic void setTarget(Object arg0) {\n\t\tdefaultEdgle.setTarget(arg0);\n\t}", "public Follow(Mob owner, Mob target, PathFinder finder) {\r\n super(owner);\r\n if (owner == null) throw new NullPointerException(\"Follow owner may not be null\");\r\n if (target == null) throw new NullPointerException(\"Target may not be null\");\r\n\r\n this.target = new WeakReference<>(target);\r\n this.pathFinder = finder;\r\n }", "private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}", "@Override\npublic void setAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){\n}", "private void moveForwards() {\n\t\tposition = MoveAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(position);\n\t\t\n\t\t// Extracted the condition to check if tractor is in Ditch\n\t\tif(isTractorInDitch()){\n\t\t\tthrow new TractorInDitchException();\n\t\t}\n\t}", "public void setCamera(Point position, Point lookAt) {\n setValueInTransaction(PROP_CAMERA, new Camera(position, lookAt));\n }", "@Override\n\tpublic Pnt2d applyTo(Pnt2d uv) {\n\t\tdouble[] xy = Ai.operate(MathUtil.toHomogeneous(uv.toDoubleArray()));\n\t\t// apply the camera's radial lens distortion in the normalized plane:\n\t\tdouble[] xyd = cam.warp(xy);\n\t\t// apply the (forward) camera mapping to get the undistorted sensor point (u',v'):\n\t\treturn PntDouble.from(cam.mapToSensorPlane(xyd));\n\t}", "public void act() \n {\n move(-16);\n \n \n if (isAtEdge())\n {\n setLocation(700,getY());\n }\n \n if (isTouching(Shots.class))\n {\n getWorld().addObject(new SpaceObject(), 500,Greenfoot.getRandomNumber(400));\n }\n \n }", "public void update() {\n\n\t\tfollow();\n\t\tcreateHitBox(this);\n\t}", "public void onScannedRobot(ScannedRobotEvent e) {\r\n\t\tif (isFriend(e.getName())) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tEnemy en;\r\n\t\tif (targets.containsKey(e.getName())) {\r\n\t\t\ten = (Enemy) targets.get(e.getName());\r\n\t\t} else {\r\n\t\t\ten = new Enemy();\r\n\t\t\ttargets.put(e.getName(), en);\r\n\t\t}\r\n\t\t// the next line gets the absolute bearing to the point where the bot is\r\n\t\tdouble absbearing_rad = (getHeadingRadians() + e.getBearingRadians())\r\n\t\t\t\t% (2 * PI);\r\n\t\t// this section sets all the information about our target\r\n\t\ten.name = e.getName();\r\n\t\tdouble h = normaliseBearing(e.getHeadingRadians() - en.heading);\r\n\t\th = h / (getTime() - en.ctime);\r\n\t\ten.changehead = h;\r\n\t\ten.x = getX() + Math.sin(absbearing_rad) * e.getDistance(); // works out\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the x\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// coordinate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of where\r\n\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// target is\r\n\t\ten.y = getY() + Math.cos(absbearing_rad) * e.getDistance(); // works out\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the y\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// coordinate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of where\r\n\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// target is\r\n\t\ten.bearing = e.getBearingRadians();\r\n\t\ten.heading = e.getHeadingRadians();\r\n\t\ten.ctime = getTime(); // game time at which this scan was produced\r\n\t\ten.speed = e.getVelocity();\r\n\t\ten.distance = e.getDistance();\r\n\t\ten.live = true;\r\n\t\tif ((en.distance < target.distance) || (target.live == false)) {\r\n\t\t\ttarget = en;\r\n\t\t}\r\n\t}", "@Override\n public void execute() {\n drivetrain.set(ControlMode.MotionMagic, targetDistance, targetDistance);\n }", "public void onMouseClick(Location point) {\n\t Thread t6 = new MoveMouth(0, 0, canvas);\n t6.start(); \n }", "private void updateView(){\n \n camera.updateView();\n }", "public void setTurretTargetAngle(double target){\r\n\t\tturretTarget = target;\r\n\t}", "public void faceTo( int playerId )\n\t{\n\t\tdirUpdateRequired = true;\n\t\tupdateRequired = true;\n\t}", "public void turnAbsolute(int target)\n {\n int heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n double turnSpeed = 0.15;\n\n while (Math.abs(heading - target) > 45)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.5, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.5, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n while (Math.abs(heading - target) > 10)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.1, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.1, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n while (Math.abs(heading - target) > 5)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.01, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.01, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n stop();\n }", "public void updateMob(Vector3f target,float tpf) {\n //System.out.println(\"updateMob called with state = \" + this.state);\n switch(this.state) {\n case -1:\n //dead state\n this.handle.removeFromParent();\n this.mobControl.destroy();\n this.state = -2;\n break;\n case 0:\n //default state\n if(this.health < 0f) {\n this.changeState(-1);\n }\n Vector3f temp = target.subtract(this.handle.getLocalTranslation());\n \n this.mobControl.setWalkDirection(Vector3f.ZERO);\n this.setRootPos(this.mobControl.getPhysicsLocation());\n //System.out.println(\"id = \"+ this.id + \". State = 0 (STANDBY) - Dist \" + temp.length());\n if( temp.length() < 50) {\n this.initSeekBehavior();\n }\n break;\n case 1:\n //run seek behavior\n Vector3f temp2 = target.subtract(this.handle.getLocalTranslation());\n //System.out.println(\"id = \"+ this.id + \". State = 1 (SEEK) - Dist \" + temp2.length());\n if( temp2.length() < 70) {\n this.updateSeekBehavior(target, tpf);\n } else {\n this.changeState(0);\n } \n break;\n case 2:\n //melee attack\n }\n }", "@Override\n public void execute() {\n double forwardSpeed;\n double rotationSpeed;\n\n // Vision-alignment mode\n // Query the latest result from PhotonVision\n double target = RobotContainer.m_Drive.Get_tv();\n\n if (target != 0.0f) {\n // First calculate range\n double range =\n PhotonUtils.calculateDistanceToTargetMeters(\n CAMERA_HEIGHT_METERS,\n TARGET_HEIGHT_METERS,\n CAMERA_PITCH_RADIANS,\n Units.degreesToRadians(RobotContainer.m_Drive.Get_ty()));\n SmartDashboard.putNumber(\"range\", range);\n // Use this range as the measurement we give to the PID controller.\n // -1.0 required to ensure positive PID controller effort _increases_ range\n if(RobotContainer.m_Drive.Get_ty()<-1){\n forwardSpeed = 1.0 * forwardController.calculate(range, GOAL_RANGE_METERS);;\n }\n else if(RobotContainer.m_Drive.Get_ty() > 1){\n forwardSpeed = -1.0 * forwardController.calculate(range, GOAL_RANGE_METERS);\n }\n else{\n forwardSpeed = 0;\n }\n\n\n // Also calculate angular power\n // -1.0 required to ensure positive PID controller effort _increases_ yaw\n rotationSpeed = -1.0 * turnController.calculate(RobotContainer.m_Drive.Get_tx(), 0);\n } else {\n // If we have no targets, stay still.\n forwardSpeed = 0;\n rotationSpeed = 0;\n } \n // Use our forward/turn speeds to control the drivetrain\n Robot.hardware.m_diffDrive.arcadeDrive(forwardSpeed,rotationSpeed);\n }", "public void attachToBody(Body body, float offsetX, float offSetY, float degrees);", "private void handleTap(Frame frame, Camera camera) {\n MotionEvent tap = tapHelper.queuedSingleTapsPoll();\n if (anchors.size() < 2 && tap != null && camera.getTrackingState() == TrackingState.TRACKING) {\n for (HitResult hit : frame.hitTest(x,y)) {\n // Check if any plane was hit, and if it was hit inside the plane polygon\n Trackable trackable = hit.getTrackable();\n // Creates an anchor if a plane or an oriented point was hit.\n if ((trackable instanceof Plane\n && ((Plane) trackable).isPoseInPolygon(hit.getHitPose())\n && (PlaneRenderer.calculateDistanceToPlane(hit.getHitPose(), camera.getPose()) > 0))\n || (trackable instanceof Point\n && ((Point) trackable).getOrientationMode()\n == Point.OrientationMode.ESTIMATED_SURFACE_NORMAL)) {\n\n // Assign a color to the object for rendering based on the trackable type\n // this anchor attached to. - 파란색\n float[] objColor = new float[]{66.0f, 133.0f, 244.0f, 255.0f};\n\n // Adding an Anchor tells ARCore that it should track this position in\n // space.\n anchors.add(new ColoredAnchor(hit.createAnchor(), objColor));\n\n if (anchors.size() == 1) {\n float anchorX = anchors.get(0).anchor.getPose().tx();\n float anchorY = anchors.get(0).anchor.getPose().ty();\n float anchorZ = anchors.get(0).anchor.getPose().tz();\n float[] points = new float[]{anchorX, anchorY, anchorZ};\n mPoints[0] = points; // 해당 점의 좌표를 배열에 저장\n } else if (anchors.size() == 2) {\n float anchorX = anchors.get(1).anchor.getPose().tx();\n float anchorY = anchors.get(1).anchor.getPose().ty();\n float anchorZ = anchors.get(1).anchor.getPose().tz();\n float[] points = new float[]{anchorX, anchorY, anchorZ};\n mPoints[1] = points; // 해당 점의 좌표를 배열에 저장\n updateDistance(mPoints[0], mPoints[1]); //거리 업데이트\n }\n\n break;\n }\n }\n }\n else if(anchors.size() == 2 && long_pressed_flag==1) // 점이 꾹 눌리면, 점을 이동시킴\n {\n for (HitResult hit : frame.hitTest(x,y)) {\n handleMoveEvent(nowTouchingPointIndex, hit);\n }\n\n }\n\n }", "private Action refuelAt(Position target) {\n\t\tif (position.equals(target)) return new RefuelAction();\n\n\t\treturn moveTowardsPosition(target);\n\t}", "public void findRobotPosition(){\n targetVisible = false;\n for (VuforiaTrackable trackable : allTrackables) {\n if (((VuforiaTrackableDefaultListener)trackable.getListener()).isVisible()) {\n telemetry.addData(\"Visible Target\", trackable.getName());\n targetVisible = true;\n\n // Get the position of the visible target and put the X & Y position in visTgtX and visTgtY\n // We will use these for determining bearing and range to the visible target\n OpenGLMatrix tgtLocation = trackable.getLocation();\n VectorF tgtTranslation = tgtLocation.getTranslation();\n visTgtX = tgtTranslation.get(0) / mmPerInch;\n visTgtY = tgtTranslation.get(1) / mmPerInch;\n //telemetry.addData(\"Tgt X & Y\", \"{X, Y} = %.1f, %.1f\", visTgtX, visTgtY);\n\n // getUpdatedRobotLocation() will return null if no new information is available since\n // the last time that call was made, or if the trackable is not currently visible.\n OpenGLMatrix robotLocationTransform = ((VuforiaTrackableDefaultListener)trackable.getListener()).getUpdatedRobotLocation();\n if (robotLocationTransform != null) {\n lastLocation = robotLocationTransform;\n }\n break;\n }\n }\n\n // Provide feedback as to where the robot is located (if we know).\n if (targetVisible) {\n // express position (translation) of robot in inches.\n VectorF translation = lastLocation.getTranslation();\n //telemetry.addData(\"Pos (in)\", \"{X, Y, Z} = %.1f, %.1f, %.1f\",\n // translation.get(0) / mmPerInch, translation.get(1) / mmPerInch, translation.get(2) / mmPerInch);\n\n // express the rotation of the robot in degrees.\n Orientation rotation = Orientation.getOrientation(lastLocation, EXTRINSIC, XYZ, DEGREES);\n //telemetry.addData(\"Rot (deg)\", \"{Roll, Pitch, Heading} = %.0f, %.0f, %.0f\", rotation.firstAngle, rotation.secondAngle, rotation.thirdAngle);\n\n // Robot position is defined by the standard Matrix translation (x and y)\n robotX = translation.get(0)/ mmPerInch;\n robotY = translation.get(1)/ mmPerInch;\n\n // Robot bearing (in +vc CCW cartesian system) is defined by the standard Matrix z rotation\n robotBearing = rotation.thirdAngle;\n\n // target range is based on distance from robot position to the visible target\n // Pythagorean Theorum\n targetRange = Math.sqrt((Math.pow(visTgtX - robotX, 2) + Math.pow(visTgtY - robotY, 2)));\n\n // target bearing is based on angle formed between the X axis to the target range line\n // Always use \"Head minus Tail\" when working with vectors\n targetBearing = Math.toDegrees(Math.atan((visTgtY - robotY)/(visTgtX - robotX)));\n\n // Target relative bearing is the target Heading relative to the direction the robot is pointing.\n // This can be used as an error signal to have the robot point the target\n relativeBearing = targetBearing - robotBearing;\n // Display the current visible target name, robot info, target info, and required robot action.\n\n telemetry.addData(\"Robot\", \"[X]:[Y] (Heading) [%5.0fin]:[%5.0fin] (%4.0f°)\",\n robotX, robotY, robotBearing);\n telemetry.addData(\"Target\", \"[TgtRange] (TgtBearing):(RelB) [%5.0fin] (%4.0f°):(%4.0f°)\",\n targetRange, targetBearing, relativeBearing);\n }\n else {\n telemetry.addData(\"Visible Target\", \"none\");\n }\n }", "public RectificationMapping (Camera cam) {\n//\t\tthis.isInverseFlag = true;\t// maps target -> source\n\t\tthis.cam = cam;\n\t\tthis.Ai = cam.getInverseA();\n\t}", "public void updateTarget(EnemyBot newRadarTarget) {\r\n\t\tradarTarget = newRadarTarget;\r\n\t}", "public void camera360() {\n\n }", "public void moveTo(float x, float y) {\n \tposition.set(x,y);\n \tif (mouseJoint != null) {\n \t\tmouseJoint.setTarget(position);\n \t}\n }", "private void configureCamera() {\n float fHeight = cam.getFrustumTop() - cam.getFrustumBottom();\n float fWidth = cam.getFrustumRight() - cam.getFrustumLeft();\n float fAspect = fWidth / fHeight;\n float yDegrees = 45f;\n float near = 0.02f;\n float far = 20f;\n cam.setFrustumPerspective(yDegrees, fAspect, near, far);\n\n flyCam.setMoveSpeed(5f);\n\n cam.setLocation(new Vector3f(2f, 4.7f, 0.4f));\n cam.setRotation(new Quaternion(0.348f, -0.64f, 0.4f, 0.556f));\n }", "@Override\r\n\tpublic void moveTo(float x, float y) {\n\t\t\r\n\t}", "private void update() {\n if (this.target != null) {\r\n if (this.target.getX() > this.x + this.size / 2\r\n || this.target.getX()\r\n + this.target.getSize() < this.x - this.size / 2) {\r\n this.target = null;\r\n this.firing = false;\r\n }\r\n }\r\n if (this.target != null) {\r\n if (this.target.getY() > this.y + this.size / 2\r\n || this.target.getY() + this.target.getSize()\r\n < this.y - this.size / 2) {\r\n this.target = null;\r\n this.firing = false;\r\n }\r\n }\r\n }", "private void recenter(PlayerMapObjectInterface target) {\n\n\t}", "public static final boolean isTargetInFrontOf(Entity seeker, Entity target, float fov) \r\n\t{\r\n\t\t// thanks again to Battlegear2 for the following code snippet\r\n\t\tdouble dx = target.posX - seeker.posX;\r\n\t\tdouble dz;\r\n\r\n\t\tfor (dz = target.posZ - seeker.posZ; dx * dx + dz * dz < 1.0E-4D; dz = (Math.random() - Math.random()) * 0.01D) \r\n\t\t{\r\n\t\t\tdx = (Math.random() - Math.random()) * 0.01D;\r\n\t\t}\r\n\r\n\t\twhile (seeker.rotationYaw > 360) { seeker.rotationYaw -= 360; }\r\n\t\twhile (seeker.rotationYaw < -360) { seeker.rotationYaw += 360; }\r\n\r\n\t\tfloat yaw = (float)(Math.atan2(dz, dx) * 180.0D / Math.PI) - seeker.rotationYaw;\r\n\t\tyaw = yaw - 90;\r\n\r\n\t\twhile (yaw < -180) { yaw += 360; }\r\n\t\twhile (yaw >= 180) { yaw -= 360; }\r\n\r\n\t\treturn yaw < fov && yaw > -fov;\r\n\t}" ]
[ "0.72800136", "0.72604", "0.6750922", "0.6624118", "0.63173926", "0.63097775", "0.6290217", "0.62663555", "0.6175413", "0.61498386", "0.6128602", "0.61195856", "0.6111938", "0.60610425", "0.60524917", "0.6014375", "0.5853441", "0.58465844", "0.5836699", "0.58215046", "0.58074886", "0.5789916", "0.5785208", "0.57749844", "0.576881", "0.5757883", "0.57511115", "0.57500464", "0.5677511", "0.5670914", "0.5666406", "0.5633073", "0.5604594", "0.55962527", "0.5584828", "0.5582932", "0.5582559", "0.55692637", "0.5556881", "0.5548008", "0.55334467", "0.55230045", "0.55107003", "0.5492381", "0.54726356", "0.54625905", "0.54359883", "0.54262155", "0.5421036", "0.5413926", "0.54127496", "0.5400518", "0.5398612", "0.53980094", "0.5388928", "0.5380301", "0.53766733", "0.536683", "0.53664064", "0.5358495", "0.53584015", "0.5357625", "0.5355101", "0.53524196", "0.53437465", "0.53401095", "0.5339574", "0.5337108", "0.5323047", "0.531859", "0.53091717", "0.5272391", "0.5269829", "0.5259569", "0.52578497", "0.5256495", "0.5251119", "0.5250915", "0.5250591", "0.5246932", "0.5244349", "0.5239994", "0.52352446", "0.5235152", "0.52284", "0.52210414", "0.5218335", "0.52135", "0.5211865", "0.5209481", "0.52072895", "0.52023923", "0.52022505", "0.5198021", "0.51932174", "0.51886004", "0.5179615", "0.5178172", "0.5177074", "0.51764965" ]
0.66820353
3
INTERNAL: Executed on the RCM when received. Just add the remote object reference to the connection list.
public void executeWithRCM(RemoteCommandManager rcm) { RemoteConnection connection = rcm.getTransportManager().createConnection(this.getServiceId()); // null is returned from createConnection if connection cannot be created if (connection != null) { rcm.getTransportManager().getConnectionsToExternalServices().put(connection.getServiceId().getId(), connection); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void connectObject(Remote remoteObj)\n\tthrows RemoteException\n {\n StubAdapter.connect\n (remoteObj, (com.sun.corba.ee.spi.orb.ORB)ORBManager.getORB()); \n }", "private void establishConnection() {\n\n try {\n\n for(Clone clone:this.clones){\n ClearConnection connection = new ClearConnection();\n connection.connect(clone.getIp(), clone.getOffloadingPort(), 5 * 1000);\n this.connections.add(connection);\n }\n\n this.protocol = new ERAMProtocol();\n this.ode = new ERAMode();\n\n } catch (Exception e) {\n Log.e(TAG,\"Connection setup with the Remote Server failed - \" + e);\n }\n }", "@Override\r\n\t\t\t\t\t\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\t\t\t\t\t\tif(!method.getName().equals(\"close\")){\r\n\t\t\t\t\t\t\t\treturn method.invoke(conn, args);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tlistConnection.add(conn);\r\n\t\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "public void addRemoteConnection(RemoteConnection connection) {\n service.addRemoteConnection(connection);\n }", "@Override\n public void connect() {\n super.connect();\n if (remoteMediaPlayer != null) {\n connected = true;\n reportConnected(connected);\n }\n }", "@Override\r\n\tpublic ServerBean connect() throws RemoteException {\n\t\tSystem.out.println(\"coming from DealServerImp\");\r\n\t\treturn null;\r\n\t}", "protected void handleNewRemoteConnectionSelected() {\n \t\tif (getUIConnectionManager() != null) {\n \t\t\tIRemoteConnection conn = getUIConnectionManager().newConnection(getShell(), fAttrHints, fAttrHintValues);\n \t\t\tif (conn != null) {\n \t\t\t\thandleRemoteServiceSelected(conn);\n \t\t\t\thandleConnectionSelected();\n \t\t\t}\n \t\t}\n \t}", "@Override\n\t\t\tpublic void onConnectRemoteNode(String url) {\t \t\t\t\n\t\t\t}", "public void registerObject(NetObject object, String channel);", "void onRecvObject(Object object);", "public void reconnected() { }", "void associate(RTMPConnection rtmpConn, IMRTMPConnection mrtmpConn);", "@Override\n\tpublic void run() {\n\t\t\t\n\t\t\ttry {\n\t\t\tLocateRegistry.createRegistry(port);\n\t\t\t}catch(RemoteException e){\n\t\t\t\tSystem.out.println(\"Another peer is running in this machine\");\n\t\t\t}\n\t\t\t\n\t\t\tInterfaceUI rmi;\n\t\t\ttry {\n\t\t\t\trmi = (InterfaceUI)UnicastRemoteObject.exportObject(this, 0);\n\t\t\t\tRegistry registry = LocateRegistry.getRegistry();\n\t\t\t\tregistry.rebind(this.id, rmi);\n\t\t\t\n\t\t\t\n\t\t\t} catch (RemoteException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\t\tpublic void onReceive(Connection connection, Object message) {\n\t\t\tnetworkObjectResolver.income(message);\r\n\t\t}", "public void registerConnection(TCPReceiverThread receiverThread, String sourceID, String targetID);", "void getObject(String globalName) throws RemoteException, NotBoundException, MalformedURLException {\n remoteObject = (GraphInterface) Naming.lookup(globalName);\n }", "public Connection invoke(final PeerClient remoteClient) {\n final RemoteMedia remoteMedia = new RemoteMedia(context, enableH264, !enableAudioReceive, !enableVideoReceive, aecContext);\n final AudioStream audioStream = new AudioStream(enableAudioSend ? localMedia.getAudioTrack().getOutputs() : null, enableAudioReceive ? remoteMedia.getAudioTrack().getInputs() : null);\n final VideoStream videoStream = new VideoStream(enableVideoSend ? localMedia.getVideoTrack().getOutputs() : null, enableVideoReceive ? remoteMedia.getVideoTrack().getInputs() : null);\n\n final Connection connection;\n\n // Add the remote view to the layout.\n layoutManager.addRemoteView(remoteMedia.getId(), remoteMedia.getView());\n\n mediaTable.put(remoteMedia.getView(), remoteMedia);\n fragment.registerForContextMenu(remoteMedia.getView());\n remoteMedia.getView().setOnTouchListener(fragment);\n\n if (enableDataChannel) {\n DataChannel channel = new DataChannel(\"mydatachannel\") {{\n setOnReceive(new IAction1<DataChannelReceiveArgs>() {\n @Override\n public void invoke(DataChannelReceiveArgs dataChannelReceiveArgs) {\n android.util.Log.w(\"--ICELINK LIB--\",\"\\n------- About to get 'name' bounds records 1 [App.java]...\");\n /*\n String name = remoteClient.getBoundRecords().get(\"name\").getValueJson();\n name = name.substring(1, name.length() - 1);\n */\n textListener.onReceivedText(ProviderName, dataChannelReceiveArgs.getDataString());\n }\n });\n\n addOnStateChange(new IAction1<DataChannel>() {\n @Override\n public void invoke(DataChannel dataChannel) {\n android.util.Log.w(\"--ICELINK LIB--\",\"\\n------- About to get 'name' bounds records 2 [App.java]...\");\n /*\n String name = remoteClient.getBoundRecords().get(\"name\").getValueJson();\n name = name.substring(1, name.length() - 1);\n */\n if (dataChannel.getState() == DataChannelState.Connected) {\n synchronized (channelLock)\n {\n dataChannels.add(dataChannel);\n }\n textListener.onPeerJoined(ProviderName);\n } else if (dataChannel.getState() == DataChannelState.Closed || dataChannel.getState() == DataChannelState.Failed) {\n synchronized (channelLock)\n {\n dataChannels.remove(dataChannel);\n }\n\n textListener.onPeerLeft(ProviderName);\n }\n }\n });\n }};\n\n DataStream dataStream = new DataStream(channel);\n connection = new Connection(new Stream[]{audioStream, videoStream, dataStream});\n } else {\n connection = new Connection(new Stream[]{audioStream, videoStream});\n }\n\n connection.setIceServers(iceServers);\n\n connection.addOnStateChange(new fm.icelink.IAction1<Connection>() {\n public void invoke(Connection c) {\n // Remove the remote view from the layout.\n if (c.getState() == ConnectionState.Closing ||\n c.getState() == ConnectionState.Failing) {\n if (layoutManager.getRemoteView(remoteMedia.getId()) != null) {\n layoutManager.removeRemoteView(remoteMedia.getId());\n remoteMedia.destroy();\n }\n }\n }\n });\n\n return connection;\n }", "@Override\n public void onConnect() {\n connected.complete(null);\n }", "public interface RemoteDBConnection extends Remote, DBConnection {\n\n\t/**\n\t * Key the database connection in registered with in RMI registry.\n\t */\n\tpublic static final String REGISTRY_KEY = \"DBConnection\";\n}", "public final void addExistingConnection(java.lang.String r1, android.telecom.ParcelableConnection r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.2.addExistingConnection(java.lang.String, android.telecom.ParcelableConnection):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.addExistingConnection(java.lang.String, android.telecom.ParcelableConnection):void\");\n }", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public static void bind(String name, myRemoteInterface obj) throws AlreadyBoundException, RemoteException, IOException {\n\t\tString className = obj.getClass().getCanonicalName();\n\t\tString ip = null;\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost().getHostAddress();\n \n\t\t} catch (UnknownHostException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString nameWithSpace = Naming.parseHostPort(name);\n\t\tString args[] = nameWithSpace.split(\" \");\n\t\t\n\t\tRemoteObjectRef newRef = new RemoteObjectRef(ip, 9999,args[2] , className,\"bind\");\n\t\t\n\t\tObjectMap.insertIntoServerMap(args[2], obj);\n\t\t\n\t\tRegistryInterface stub = null;\n\t\t try{\n\t\t\t \n\t\t\t Class<?> stub_class = Class.forName(\"registry.Registry_stub\");\n\t\t\t stub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t\t if(stub_class != null){\n\t\t\t\t byte[] temp = downloadToServer(stub_class, newRef);\n\t\t\t }\n\t\t} catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstub.bind(name, newRef);\n\t\t\n\t}", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }", "@Reference\n public void setRemoteChannelLookup(final RemoteChannelLookup remoteChannelLookup)\n {\n m_RemoteChannelLookup = remoteChannelLookup;\n }", "void putRemoteConnectionContextObject( String key, Object value );", "private RRCPConnectionListener() {\n mainThread = new Thread(this);\n }", "public void registerObject(NetObject object);", "public static void rebind(String name, myRemoteInterface obj) throws RemoteException, AlreadyBoundException {\n\t\n\t\tString className = obj.getClass().getCanonicalName();\n\t\tString ip = null;\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost().getHostAddress();\n \n\t\t} catch (UnknownHostException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString nameWithSpace = Naming.parseHostPort(name);\n\t\tString args[] = nameWithSpace.split(\" \");\n\t\t\n\t\tRemoteObjectRef newRef = new RemoteObjectRef(ip, 9999,args[2] , className,\"rebind\");\n\t\t\n\t\tObjectMap.insertIntoServerMap(args[2], obj);\n\t\t\n\t\tRegistryInterface stub = null;\n\t\t try{\n\t\t\t \n\t\t\t Class<?> stub_class = Class.forName(\"registry.Registry_stub\");\n\t\t\t stub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t\t if(stub_class != null){\n\t\t\t\t byte[] temp = downloadToServer(stub_class, newRef);\n\t\t\t }\n\t\t} catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstub.rebind(name, newRef);\n\t\t\n\t\t\n\t}", "@Override\n public void addConnection(Link link)\n {\n connections.add(link);\n if (executableProcess != null)\n addConnectionToExec(link);\n }", "protected void onConnect() {}", "@Override\n \tpublic void reconnectionSuccessful() {\n \t}", "private void initRMI() throws RemoteException {\n log.info(\"Registering with RMI\");\n Registry registry = LocateRegistry.getRegistry();\n registry.rebind(address, this);\n }", "@Override\n\tpublic void reconnect() {\n\n\t}", "@Override\n public void registerConnectorListener(RemoteConnectorListener listener) {\n connectorListeners.add(listener);\n }", "@Override\n public void run() {\n load_remote_data();\n }", "public interface PeerRMI extends Remote {\n\n\t/**\n\t * Allows the backup of a document amongst the peers of the network\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString backup(String request) throws RemoteException;\n\n\t/**\n\t * Allows the enhanced backup of a document amongst the peers of the network\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString backupENH(String request) throws RemoteException;\n\t\n\t/**\n\t * Allows the deletion of a document saved in the peers of the network\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString delete(String request) throws RemoteException;\n\n\t/**\n\t * Allows the enhanced deletion of a document saved in the peers of the network\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString deleteENH(String request) throws RemoteException;\n\n\t/**\n\t * Allows the restoration of a document saved in the other peers of the network, the restored file will be saved in the peer-iniatior\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString restore(String request) throws RemoteException;\n\n\t/**\n\t * Allows the restoration of a document saved in the other peers of the network, the restored file will be saved in the peer-iniatior\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString restoreENH(String request) throws RemoteException;\n\n\t/**\n\t * Allows the enhanced reclaim of space of the initiator-peer\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString reclaim(String request) throws RemoteException;\n\n\t/**\n\t * Allows the user to get the state of the initiator-peer\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString state() throws RemoteException;\n}", "void onConnectionAdded(SocketConnection connection);", "@Override\n public void run() {\n try {\n while (true) {\n finalLB.addClient();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private void connectingPeer() {\n for (int index = 0; index < this.peers.size(); index++) {\n String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));\n try {\n Node distNode = NodeFactory.getNode(peerUrl);\n P2PService peer = (P2PService) distNode.getActiveObjects(P2PService.class.getName())[0];\n \n if (!peer.equals(this.localP2pService)) {\n // Send a message to the remote peer to record me\n peer.register(this.localP2pService);\n // Add the peer in my group of acquaintances\n this.acqGroup.add(peer);\n }\n } catch (Exception e) {\n logger.debug(\"The peer at \" + peerUrl +\n \" couldn't be contacted\", e);\n }\n }\n }", "interface Connect extends RconConnectionEvent, Cancellable {}", "@Override\r\n public Object connect() {\n if(status()){\r\n //creates thread that checks messages in the network\r\n System.out.println(\"notifying network that connection is good\");\r\n notifyObservers(this);\r\n }\r\n return socket;\r\n }", "public void connect() {}", "@Override\n\tprotected void initChannel(SocketChannel ch) throws Exception {\n\t\tch.pipeline().addLast(new DisardServerHandle());\n\t}", "@Override\n public void connecterFibreOptique() throws ConnecteurException, RemoteException, MalformedURLException, NotBoundException {\n Naming.rebind(url, (ConnecteurRemoteInterface) this);\n \n // Enregistrement de tous les autres connecteurs\n // et notification a tous les autres connecteurs\n for (String name : Naming.list(\"rmi://localhost:1099/\")) {\n name = \"rmi:\" + name;\n if (!name.equals(url)) {\n Remote o = Naming.lookup(name);\n if (o instanceof ConnecteurRemoteInterface) {\n // Enregistrement du connecteur courant\n System.out.println(url + \": \\tEnregistrement auprès de \" + name);\n ((ConnecteurRemoteInterface) o).enregistrerConnecteur(url, controleurUrl);\n // Enregistrement d'un connecteur distant\n enregistrerConnecteur(name, (ConnecteurRemoteInterface) o);\n }\n else if (o instanceof PrismeRemoteInterface) {\n if (prisme == null) {\n this.prismeUrl = name;\n prisme = (PrismeRemoteInterface) o;\n prisme.enregisterConnecteur(url);\n }\n else {\n throw new ConnecteurException(\"Plusieurs prismes semblent exister.\");\n }\n }\n }\n }\n connecteur.connecter();\n }", "protected RemoteServer(RemoteRef ref) {\n super(ref);\n }", "@Override\r\n public void onRecvObject(Object object) {\n if (object instanceof UpdateNames) {\r\n // UpdateNames updateNames = (UpdateNames) object;\r\n return;\r\n }\r\n\r\n if (object instanceof ChatMessage) {\r\n ChatMessage chatMessage = (ChatMessage) object;\r\n LogExt.d(TAG, \"receive text: \" + chatMessage.text);\r\n if (null != mNetTransportListener && null != chatMessage) {\r\n if (!TextUtils.isEmpty(chatMessage.text)\r\n && chatMessage.text\r\n .startsWith(Configuration.CMD_CONNECT_ADB)) {\r\n String temp = chatMessage.text.substring(\r\n Configuration.CMD_CONNECT_ADB.length()).trim();\r\n mServerHandler\r\n .sendMessage(mServerHandler\r\n .obtainMessage(Configuration.MSG_CONNECT_LOCAL_ADBD));\r\n LogExt.d(TAG,\r\n \"start connect local adb pc terminal ip is \"\r\n + temp);\r\n }\r\n }\r\n return;\r\n }\r\n\r\n if (object instanceof Data) {\r\n Data data = (Data) object;\r\n if (null != mNetTransportListener && null != data) {\r\n if (null != mAdbSession) {\r\n mAdbSession.onRemoteClientNewData(data);\r\n } else {\r\n LogExt.e(TAG, \"adb session not ready error!\");\r\n }\r\n }\r\n LogExt.d(TAG, \"receive data: \" + data.getString());\r\n }\r\n }", "public interface RMIClientInterface extends Remote {\n\n void sendSnapshot(SnapshotToSend snapshotToSend) throws RemoteException;\n\n void sendMap(ArrayList<Map> mapArrayList) throws RemoteException;\n\n void gameInitialization(SnapshotToSend snapshotToSend) throws RemoteException;\n\n void isYourTurn() throws RemoteException;\n\n void finishTurn() throws RemoteException;\n\n void onStartMarket() throws RemoteException;\n\n void onStartBuyPhase() throws RemoteException;\n\n void disableMarketPhase() throws RemoteException;\n\n void selectPermitCard() throws RemoteException;\n\n void selectCityRewardBonus(SnapshotToSend snapshotToSend) throws RemoteException;\n\n void moveKing(ArrayList<City> kingPath) throws RemoteException;\n\n void sendMatchFinishedWithWin(ArrayList<BaseUser> finalSnapshot) throws RemoteException;\n\n void ping() throws RemoteException;\n\n void selectOldPermiCard() throws RemoteException;\n\n void onUserDisconnect(String username) throws RemoteException;\n}", "@Override\n \tpublic void reconnectingIn(int arg0) {\n \t}", "@Override\n protected void initChannel (SocketChannel ch) throws Exception {\n // can utilize channel to push message to different client since one channel correspond to one client\n System.out.println(\"client socket channel hashcode = \" + ch.hashCode());\n ch.pipeline().addLast(new NettyServerHandler());\n }", "private void runRemotely() {\n if (!isDas())\n return;\n\n List<Server> remoteServers = getRemoteServers();\n\n if (remoteServers.isEmpty())\n return;\n\n try {\n ParameterMap paramMap = new ParameterMap();\n paramMap.set(\"monitor\", \"true\");\n paramMap.set(\"DEFAULT\", pattern);\n ClusterOperationUtil.replicateCommand(\"get\", FailurePolicy.Error, FailurePolicy.Warn, remoteServers,\n context, paramMap, habitat);\n }\n catch (Exception ex) {\n setError(Strings.get(\"admin.get.monitoring.remote.error\", getNames(remoteServers)));\n }\n }", "protected abstract void onConnect();", "public void addPendingCallToProxy(IBinder iBinder) {\n HiLog.info(LOG_LABEL, \"addPendingCallToProxy\", new Object[0]);\n this.mRemote = iBinder;\n processLiveCallWhenServiceConnected();\n CallAudioState callAudioState = this.mPendingCallAudioState;\n if (callAudioState != null) {\n HiLog.info(LOG_LABEL, \"addPendingCallToProxy:onCallAudioStateChanged %{public}s\", new Object[]{callAudioState.toString()});\n onCallAudioStateChanged(this.mPendingCallAudioState);\n this.mPendingCallAudioState = null;\n }\n Boolean bool = this.mPendingCanAddCall;\n if (bool != null) {\n HiLog.info(LOG_LABEL, \"addPendingCallToProxy:onCanAddCallChanged %{public}s\", new Object[]{bool.toString()});\n onCanAddCallChanged(this.mPendingCanAddCall.booleanValue());\n this.mPendingCanAddCall = null;\n }\n }", "@Override\n\tprotected void populateRemoteHost() {\n\t\tthrow noSocket();\n\t}", "@Override\r\n public void remoteDeviceAdded(Registry registry, RemoteDevice device) {\r\n deviceAdded(device);\r\n }", "@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}", "RemoteConnectionImpl() throws RemoteException {\r\n\t\tsuper();\r\n\t}", "private void addConnection(PooledConnection v){\n // If the pool is null, create a new Vector\n if(pool == null)\n pool = new Vector(size);\n //Add the PooledConnection Object to the vector\n pool.addElement(v);\n }", "public synchronized void restoreConnection(Connection connection) {\n\t\tconnections.add(connection);\n\t\tnotifyAll();\n\n\t}", "void onRemoteDescriptionSet();", "protected void connectionEstablished() {}", "@Override\r\n\t\tpublic void onConnect(Connection connection) {\n\r\n\t\t}", "@Override\r\n \tpublic void clientConnectedCallback(RoMClient newClient) {\r\n \t\t// Add new client and start listening to this one\r\n \t\tthis.clients.addClient(newClient);\r\n \r\n \t\t// Create the ReceiveClientCommandThread for this client\r\n \t\tReceiveClientCommandThread receiveCommandThread = new ReceiveClientCommandThread(newClient, this, this);\r\n \t\treceiveCommandThread.start();\r\n \r\n \t\t// Create the CommandQueue Thread for this client\r\n \t\tClientCommandQueueThread commandQueueThread = new ClientCommandQueueThread(newClient);\r\n \t\tcommandQueueThread.start();\r\n \t}", "public static void main(String[] args) throws RemoteException{\n \r\n Registry registry= LocateRegistry.createRegistry(5099); //registrar a nuestro cliente \r\n registry.rebind(\"hello\", new ObjectRemote());\r\n }", "@Override\r\n protected void onConnected() {\n \r\n }", "@Override\n public void run()\n {\n while (true)\n {\n try\n {\n final Socket socket = m_ServerSocket.accept(); // NOFORTIFY: unreleased resource:\n //resources are managed by the remote channel lookup\n m_Logging.info(\"Connection made from %s for remote interface\", \n socket.getRemoteSocketAddress());\n \n m_RemoteChannelLookup.newServerSocketChannel(socket);\n }\n catch (final IOException e)\n {\n if (m_ServerSocket.isClosed())\n {\n m_Logging.info(\"Server socket has been closed, will stop accepting connections\");\n return;\n }\n }\n }\n }", "@Override\n public abstract void connect();", "private void init() {\n System.out.println(\"Binding to RMIRegistry...\");\n String theName = getConfigManager().getString(\"REMOTE_NAME\");\n if (null != theName) {\n bind(theName, this);\n } else {\n LoggingServices.getCurrent().logMsg(getClass().getName(), \"init()\"\n , \"Could not find name to bind to in registry.\"\n , \"Make sure loyalty.cfg contains a RMIREGISTRY entry.\", LoggingServices.MAJOR);\n }\n }", "public void connectedTo(ServerDescriptor desc);", "@Override\n protected void initChannel(SocketChannel ch) throws Exception {\n ChannelPipeline pipeline = ch.pipeline();\n\n // add handler\n InetSocketAddress remoteSocketAddress = new InetSocketAddress(directRemoteHost, directRemotePort);\n pipeline.addLast(new DirectProxyUpstreamHandler(remoteSocketAddress, false, 1048576, new RequestInterceptor(remoteSocketAddress), \" -->\"));\n }", "protected void handleConnect()\n throws ConnectionFailedException\n { \n int registryPort = getRegistryPort(locator);\n Home home = null;\n Exception savedException = null;\n Iterator it = getConnectHomes().iterator();\n \n while (it.hasNext())\n {\n //TODO: -TME Need to figure this out a little better as am now dealing with\n // with 2 ports, the rmi server and the registry.\n try\n {\n home = (Home) it.next();\n String host = home.host;\n final int port = home.port;\n locator.setHomeInUse(home);\n storeLocalConfig(configuration);\n log.debug(this + \" looking up registry: \" + host + \",\" + port);\n final Registry registry = LocateRegistry.getRegistry(host, registryPort);\n log.debug(this + \" trying to connect to: \" + home);\n Remote remoteObj = lookup(registry, \"remoting/RMIServerInvoker/\" + port);\n log.debug(\"Remote RMI Stub: \" + remoteObj);\n setServerStub((RMIServerInvokerInf) remoteObj);\n connected = true;\n break;\n }\n catch(Exception e)\n {\n savedException = e;\n connected = false;\n RemotingRMIClientSocketFactory.removeLocalConfiguration(locator);\n log.trace(\"Unable to connect RMI invoker client to \" + home, e);\n\n }\n }\n\n if (server == null)\n {\n String message = this + \" unable to connect RMI invoker client\";\n log.debug(message);\n throw new CannotConnectException(message, savedException);\n }\n }", "public void onRemoteSoAddressChanged(RtpStreamReceiver rr, SocketAddress remote_soaddr)\n { if (symmetric_rtp && sender!=null) sender.setRemoteSoAddress(remote_soaddr);\n }", "@Override\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n remoteServiceMethodSolver = IRemoteServiceMethod.Stub.asInterface(iBinder);\n Log.d(\"BindLog\", \"bind远程服务连接已成功,并获取了代理\");\n }", "@Override\n public void initNetworkValues() {\n\n setNetworkObjectType(NetworkObjectType.ROCKET);\n\n }", "void onConnect(IServerConnection<_ATTACHMENT> connection);", "public void m23076a(RemoteMessage remoteMessage) {\n }", "@Override\n public void connectionLost() {\n }", "public void send(Object object){\n synchronized (S2CMessages){\n S2CMessages.add(object);\n S2CMessages.notifyAll();\n }\n }", "public void testChannelHopping() throws RemoteException {\n List<Channel> channelList = mBinder.getChannelList();\n for(Channel channel : channelList) {\n mBinder.joinChannel(channel.getId());\n }\n try {\n Thread.sleep(TEST_OBSERVATION_DELAY);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "void pushReconnectPending(PushConnection pushConnection);", "abstract void onConnect();", "public void onConnection();", "public abstract void onConnect();", "void connectionCreated();", "@Override\n public void onConnected() {\n getLogger().log(Level.FINE,\n \"Connected to {0} and pre-writing\",\n remoteAddress);\n try {\n if (!onChannelPreWrite()) {\n channelExecutor.registerReadWrite(socketChannel, this);\n }\n } catch (IOException e) {\n if (getLogger().isLoggable(Level.FINE)) {\n getLogger().log(Level.FINE,\n // CRC: Update wording?\n \"Error registering for read/write after pre-write: \" +\n \"remoteAddress={0}, error={1}\",\n new Object[] {\n remoteAddress,\n CommonLoggerUtils.getStackTrace(e)});\n }\n shutdown(e.getMessage(), true);\n }\n }", "@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n RemoteSensor remoteSensor = RemoteSensorManager.getInstance().addSensorChannel(ctx);\n QueuerManager.getInstance().addClient(remoteSensor);\n// System.out.println(RemoteSensorManager.getInstance().getRemoteSensorsNamesList().size());\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "private static EventStreamRPCConnection connectToGGCOverEventStreamIPC(SocketOptions socketOptions,\n String authToken, String ipcServerSocketPath)\n throws ExecutionException, InterruptedException {\n\n try (EventLoopGroup elGroup = new EventLoopGroup(1);\n ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null)) {\n\n final EventStreamRPCConnectionConfig config =\n new EventStreamRPCConnectionConfig(clientBootstrap, elGroup, socketOptions, null,\n ipcServerSocketPath, DEFAULT_PORT_NUMBER,\n GreengrassConnectMessageSupplier.connectMessageSupplier(authToken));\n final CompletableFuture<Void> connected = new CompletableFuture<>();\n final EventStreamRPCConnection connection = new EventStreamRPCConnection(config);\n final boolean[] disconnected = {false};\n final int[] disconnectedCode = {-1};\n //this is a bit cumbersome but does not prevent a convenience wrapper from exposing a sync\n //connect() or a connect() that returns a CompletableFuture that errors\n //this could be wrapped by utility methods to provide a more\n connection.connect(new EventStreamRPCConnection.LifecycleHandler() {\n //only called on successful connection.\n // That is full on Connect -> ConnectAck(ConnectionAccepted=true)\n @Override\n public void onConnect() {\n connected.complete(null);\n }\n\n @Override\n public void onDisconnect(int errorCode) {\n disconnected[0] = true;\n disconnectedCode[0] = errorCode;\n }\n\n //This on error is for any errors that is connection level, including problems during connect()\n @Override\n public boolean onError(Throwable t) {\n connected.completeExceptionally(t);\n return true; //hints at handler to disconnect due to this error\n }\n });\n connected.get();\n return connection;\n }\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }", "@Override\n public void completed(AsynchronousSocketChannel sockChannel, AsynchronousServerSocketChannel serverSock ) {\n serverSock.accept( serverSock, this );\n\n try{\n //Print IP Address\n System.out.println( sockChannel.getLocalAddress().toString());\n\n //Add To Client List\n list.add(list.size(), sockChannel);\n\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //start to read message from the client\n startRead( sockChannel );\n \n }", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\t\t\n\t}", "public void connected() {\n\t\tthis.model.setClient(this);\n\t\tfor (Option o : options) {\n\t\t\to.initiate(this);\n\t\t}\n\t}", "public void afterReceive() {\n\t}", "@Override\n public void connectionLost(Throwable cause) {\n }", "public void registerReceiver(Channel.Receiver receiver);", "@Override\n public void run() {\n mLogView.logI(\"Remote video starting, uid: \" + (uid & 0xFFFFFFFFL));\n setupRemoteVideo(uid, uid == WINDOW_SHARE_UID ? mRemoteShareContainerSplit : mRemoteCameraContainer);\n }", "public boolean connect() throws RemoteException {\n\t\ttry {\n\t\t\t// Get remote object reference\n\t\t\tthis.registry = LocateRegistry.getRegistry(host, port);\n\t\t\tthis.server = (ServerInterface) registry.lookup(\"Server\");\n\t\t\tid = this.server.getNewClientId();\n\t\t\tClientInterface c_strub = (ClientInterface) UnicastRemoteObject.exportObject(this, 0);\n\t\t\tregistry.bind(id, c_strub);\n\t\t\treturn this.server.addClient(username, password, id);\n\t\t}\n\t\tcatch (AlreadyBoundException | NotBoundException e) {\n\t\t\tSystem.err.println(\"Error on client :\" + e);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public void testConnectAndReconnectOfBridgeStack() throws Exception {\n a=new JChannel(createBridgeStack());\n a.setName(\"A\");\n b=new JChannel(createBridgeStack());\n b.setName(\"B\");\n\n a.connect(BRIDGE_CLUSTER);\n b.connect(BRIDGE_CLUSTER);\n Util.waitUntilAllChannelsHaveSameView(10000, 500, a, b);\n\n b.disconnect();\n Util.waitUntilAllChannelsHaveSameView(10000, 500, a);\n\n b.connect(BRIDGE_CLUSTER);\n Util.waitUntilAllChannelsHaveSameView(10000, 500, a, b);\n }" ]
[ "0.6116003", "0.60725796", "0.5991449", "0.58689564", "0.58672374", "0.5750971", "0.5717659", "0.57175255", "0.56363994", "0.5623885", "0.5542973", "0.550479", "0.5467163", "0.54637736", "0.5459903", "0.543182", "0.5416747", "0.5414955", "0.5412949", "0.5394295", "0.5384313", "0.5384313", "0.53659344", "0.53582823", "0.5340586", "0.5335673", "0.5332851", "0.53204453", "0.5316493", "0.53033245", "0.52998745", "0.52990067", "0.5298681", "0.52745426", "0.5263374", "0.5256706", "0.52503324", "0.524612", "0.5236266", "0.52280873", "0.522061", "0.52192974", "0.5218614", "0.52180135", "0.52109796", "0.52081466", "0.52074105", "0.518582", "0.5175393", "0.5163847", "0.51614535", "0.5156327", "0.5137667", "0.51372975", "0.5127588", "0.5120852", "0.51085806", "0.5107642", "0.5105104", "0.51012135", "0.50996524", "0.5098504", "0.50953954", "0.50882584", "0.50875944", "0.5085147", "0.50720567", "0.5060186", "0.50601166", "0.5041928", "0.5041757", "0.5038725", "0.5019138", "0.50187606", "0.5012312", "0.5009098", "0.5008906", "0.500883", "0.5002193", "0.50013727", "0.5000444", "0.4997521", "0.49921292", "0.49885452", "0.49855518", "0.4967908", "0.49647814", "0.4958788", "0.49441865", "0.49441865", "0.4940332", "0.49379548", "0.49320605", "0.49286914", "0.49280983", "0.49272862", "0.4923892", "0.49164897", "0.49084055", "0.49059302" ]
0.5704263
8
Internal RCM commands do not implement this method
public void executeWithSession(AbstractSession session) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "private GetLCCommand() {\n initFields();\n }", "public void command(byte[] cmdMessage) throws SAPIException{\r\n\t\t\t\t//sends command to RBNB\r\n\t\t\t\t\r\n\t\t\t\tsrcMap.PutDataAsByteArray(srcMap.GetIndex(getParameterToStringById(\"sourceChannelCommandName\")), cmdMessage); //cmds channel\t \t\r\n\t \tsrc.Flush(srcMap); \t\r\n\t\t}", "@Override\r\n public void execute(Command command) {\n\r\n }", "void legalCommand();", "public interface CommandInterface {\n\n\tpublic static class Commands\n\t{\n\t\tpublic static final String ABORT = \"ABOR\";\n\t\tpublic static final String ACCOUNT_INFO = \"ACCT\";\n\t\tpublic static final String AUTHENTICATION_DATA = \"ADAT\";\n\t\tpublic static final String ALLOCATE_DISK_SPACE = \"ALLO\";\n\t\tpublic static final String APPEND = \"APPE\";\n\t\tpublic static final String AUTHENTICATION_MECHANISM = \"AUTH\";\n\t\tpublic static final String GET_AVAILABLE_SPACE = \"AVBL\";\n\t\tpublic static final String CLEAR_COMMAND_CHANNEL = \"CCC\";\n\t\tpublic static final String CHANGE_TO_PARENT_DIRECTORY = \"CDUP\";\n\t\tpublic static final String CONFIDENTIALITY_PROTECTION_COMMAND = \"CONF\";\n\t\tpublic static final String SERVER_IDENTIFICATION = \"CSID\";\n\t\tpublic static final String CHANGE_WORKING_DIRECTORY = \"CWD\";\n\t\tpublic static final String DELETE_FILE = \"DELE\";\n\t\tpublic static final String GET_DIRECTORY_SIZE = \"DSIZ\";\n\t\tpublic static final String PRIVACY_PROTECTED = \"ENC\";\n\t\tpublic static final String SPECIFY_ADDRESS_AND_PORT = \"EPRT\";\n\t\tpublic static final String ENTER_EXTENDED_PASSIVE_MODE = \"EPSV\";\n\t\tpublic static final String GET_FEATURE_LIST = \"FEAT\";\n\t\tpublic static final String HELP = \"HELP\";\n\t\tpublic static final String GET_HOST_BY_NAME = \"HOST\";\n\t\tpublic static final String LANGUAGE_NEGOTIATION = \"LANG\";\n\t\tpublic static final String GET_FILES_LIST = \"LIST\";\n\t\tpublic static final String SPECIFY_LONGADDRESS_AND_PORT = \"LPRT\";\n\t\tpublic static final String ENTER_LONG_PASSIVE_MODE = \"LPSV\";\n\t\tpublic static final String GET_LAST_MODIFICATION_TIME = \"MDTM\";\n\t\tpublic static final String MODIFY_CREATION_TIME = \"MFCT\";\n\t\tpublic static final String MODIFY_FACT = \"MFF\";\n\t\tpublic static final String MODIFY_MODYFICATION_TIME = \"MFMT\";\n\t\tpublic static final String INTEGRITY_PROTECTION = \"MIC\";\n\t\tpublic static final String MAKE_DIRECTORY = \"MKD\";\n\t\tpublic static final String LIST_A_CONTENT = \"MLSD\";\n\t\tpublic static final String PROVIDES_DATA = \"MLST\";\n\t\tpublic static final String SET_TRANSFER_MODE = \"MODE\";\n\t\tpublic static final String LIST_OF_FILE_NAMES = \"NLST\";\n\t\tpublic static final String NO_OPERATION = \"NOOP\";\n\t\tpublic static final String SELECT_OPTIONS = \"OPTS\";\n\t\tpublic static final String AUTHENTICATION_PASSWORD = \"PASS\";\n\t\tpublic static final String ENTER_PASSIVE_MODE = \"PASV\";\n\t\tpublic static final String PROTECTION_BUFFER_SIZE = \"PBSZ\";\n\t\tpublic static final String SPECIFY_PORT = \"PORT\";\n\t\tpublic static final String DATA_CHANNEL_PROTECTION_LEVEL = \"PROT\";\n\t\tpublic static final String PRINT_WORKING_DIRECTORY = \"PWD\";\n\t\tpublic static final String DISCONNECT = \"QUIT\";\n\t\tpublic static final String REINITIALIZE = \"REIN\";\n\t\tpublic static final String RESTART = \"REST\";\n\t\tpublic static final String RETRIEVE_A_COPY = \"RETR\";\n\t\tpublic static final String REMOVE_DIRECTORY = \"RMD\";\n\t\tpublic static final String REMOVE_DIRECTORY_TREE = \"RMDA\";\n\t\tpublic static final String RENAME_FROM = \"RNFR\";\n\t\tpublic static final String RENAME_TO = \"RNTO\";\n\t\tpublic static final String SITE_SPECIFFIC_COMMAND = \"SITE\";\n\t\tpublic static final String SIZE_OF_FILE = \"SIZE\";\n\t\tpublic static final String MOUNT_FILE_STRUCTURE = \"SMNT\";\n\t\tpublic static final String USE_SINGLE_PORT_PASSIVE_MODE = \"SPSV\";\n\t\tpublic static final String GET_STATUS = \"STAT\";\n\t\tpublic static final String ACCEPT_AND_STORE = \"STOR\";\n\t\tpublic static final String STORE_FILE_UNIQUELY = \"STOU\";\n\t\tpublic static final String SET_FILE_TRANSFER_STRUCT = \"STRU\";\n\t\tpublic static final String GET_SYSTEM_TYPE = \"SYST\";\n\t\tpublic static final String GET_THUMBNAIL = \"THMB\";\n\t\tpublic static final String SET_TRANSFER_TYPE = \"TYPE\";\n\t\tpublic static final String AUTHENTICATION_USERNAME = \"USER\";\n\t}\n\t\n\t/**\n\t * Types of transmission.\n\t * @author P.Gajewski\n\t *\n\t */\n\tpublic static class TransmissionTypes\n\t{\n\t\tpublic static final String BINARY = \"I\";\n\t\tpublic static final String ASCII = \"A\";\n\t}\n\n\t/**\n\t * Inner class for responses from server.\n\t * @author P.Gajewski\n\t *\n\t */\n\tpublic static class ServerResonses\n\t{\n\t\t/**\n\t\t * 1xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class PossitivePreliminaryReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"100\";\n\t\t\tpublic static final String RESTART_REPLY = \"110\";\n\t\t\tpublic static final String SERVICE_READY = \"120\";\t\n\t\t\tpublic static final String DATA_CONNECTION_ALREADY_OPENED = \"125\";\n\t\t\tpublic static final String FILE_STATUS_OKAY = \"150\";\n\t\t}\n\t\t\n\t\t/**\n\t\t * 2xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class PossitiveCompletionReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"200\";\n\t\t\tpublic static final String SYSTEM_STATUS = \"211\";\n\t\t\tpublic static final String DIRECTORY_STATUS = \"212\";\n\t\t\tpublic static final String FILE_STATUS = \"213\";\n\t\t\tpublic static final String HELP_MESSAGE = \"214\";\n\t\t\tpublic static final String NAME_SYSTEM_TYPE = \"215\";\n\t\t\tpublic static final String READY_FOR_NEW_USER = \"220\";\n\t\t\tpublic static final String SERVICE_CLOSING_CONTROL_CONNECTION = \"221\";\n\t\t\tpublic static final String OPEN_DATA_CONNECTION = \"225\";\t\t\t\n\t\t\tpublic static final String CLOSING_DATA_CONNECTION = \"226\";\n\t\t\tpublic static final String PASSIVE_MODE = \"227\";\n\t\t\tpublic static final String LONG_PASSIVE_MODE = \"228\";\n\t\t\tpublic static final String EXTENDED_PASSIVE_MODE = \"229\";\n\t\t\tpublic static final String USER_LOG_IN = \"230\";\n\t\t\tpublic static final String USER_LOG_OUT = \"231\";\n\t\t\tpublic static final String LOGOUT_NOTED = \"232\";\n\t\t\tpublic static final String REQUESTED_OK = \"250\";\n\t\t\tpublic static final String PATHNAME_CREATED = \"257\";\t\t\t\n\t\t}\n\t\t\n\t\t/**\n\t\t * 3xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class PositiveIntermediateReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"300\";\n\t\t\tpublic static final String USERNAME_OK_PASSWORD_NEEDED = \"331\";\n\t\t\tpublic static final String NEED_ACCOUNT_FOR_LOGIN = \"332\";\n\t\t\tpublic static final String REQUESTED_FILE_ACTION = \"350\";\n\t\t}\n\t\t\n\t\t/**\n\t\t * 4xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class TransientNegativeCompletionReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"400\";\n\t\t\tpublic static final String SERVICE_NOT_AVAILABLE = \"421\";\n\t\t\tpublic static final String CANT_OPEN_DATA_CONNECTION = \"425\";\n\t\t\tpublic static final String CONNECTION_CLOSED = \"426\";\n\t\t\tpublic static final String INVALID_USERNAME_OR_PASSWORD = \"430\";\n\t\t\tpublic static final String REQUESTED_HOST_UNAVAILABLE = \"434\";\n\t\t\tpublic static final String REQUESTED_FILE_ACTION_NOT_TAKEN = \"450\";\n\t\t\tpublic static final String LOCAL_ERROR = \"451\";\n\t\t\tpublic static final String FILE_BUSY = \"452\";\t\n\t\t}\n\t\t\n\t\t/**\n\t\t * 5xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class PermamentNegativeCompletionReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"500\";\n\t\t\tpublic static final String SYNTAX_ERROR = \"501\";\n\t\t\tpublic static final String COMMAND_NOT_IMPLEMENTED = \"502\";\n\t\t\tpublic static final String BAD_SEQUENCE_OF_COMMANDS = \"503\";\n\t\t\tpublic static final String COMMAND_NOT_IMPLEMENTED_FOR_THAT_PARAMETER = \"504\";\n\t\t\tpublic static final String NOT_LOGGED_IN = \"530\";\n\t\t\tpublic static final String NEED_ACCOUNT_FOR_STORING_FILES = \"532\";\n\t\t\tpublic static final String POLICY_REQUIRES_SSL = \"534\";\n\t\t\tpublic static final String FILE_NOT_FOUND = \"550\";\n\t\t\tpublic static final String PAGE_TYPE_UNKNOWN = \"551\";\t\t\t\n\t\t\tpublic static final String EXCEEDED_STORAGE_ALLOCATION = \"552\";\n\t\t\tpublic static final String FILE_NAME_NOT_ALLOWED = \"553\";\t\t\n\t\t}\n\t\t\n\t\t/**\n\t\t * 6xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class ProtectedReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"600\";\n\t\t\tpublic static final String INTEGRITY_PROTECTED_REPLY = \"631\";\n\t\t\tpublic static final String CONFIDENTIALITY_AND_INTEGRITY_PROTECTED_REPLY = \"632\";\t\t\t\n\t\t\tpublic static final String CONFIDENTIALITY_PROTECTED_REPLY = \"633\";\t\t\t\n\t\t}\n\t}\n\t\n\t/**\n\t * Language controller.\n\t */\n\tpublic final static LanguageController lc = LanguageController.getInstance();\n\t\n\tpublic void execute(FTPLexer lexer);\n}", "public dynamixel_command_t getArmCommand();", "public interface CommandSender \n{\n /**\n * Handle a respond from the robot.\n * @param result The result.\n * @param originalCommand The command which was sent to the robot.\n */\n public void handleResponse(byte[] result, Command originalCommand);\n \n /**\n * Handle an error that occured when communicating to the robot.\n * @param code The error code that was sent by the robot.\n */\n public void handleError(int code);\n \n /**\n * Needed when sending a command repetitively to the robot.\n * @return The command string that should be used.\n */\n public Command getCurrentCommand();\n \n}", "public abstract String getCommand();", "@Override\n public Answer executeRequest(Command cmd) {\n return null;\n }", "@Override\r\n\tprotected void beforeSendCommands(String cmds) {\n\r\n\t}", "public CPRCommand()\r\n {\r\n }", "public void getCommandsUpdate() {\n\t\t\r\n\t}", "public abstract void onCommand(MessageEvent context) throws Exception;", "private void getGameCommands(){\n\n }", "@Override\n public int getCommandId() {\n return serialUid;\n }", "@Override\n public CommandProcessorResponse run(String command, Context context)\n throws CommandNeedRetryException {\n return null;\n }", "protected AbstractRvIcbm(int command, long icbmMessageId, long rvSessionId,\n final RvCommand rvCommand) {\n this(command, icbmMessageId, rvCommand.getRvStatus(),\n rvSessionId, rvCommand.getCapabilityBlock(),\n new LiveWritable() {\n public void write(OutputStream out) throws IOException {\n rvCommand.writeRvData(out);\n }\n });\n }", "@Override\n\tpublic void setCommand(String cmd) {\n\t\t\n\t}", "void processCommand (String command, ZMsg msg);", "@Override\n\tpublic IResponse sendCommand(ICommand command) throws RPCException {\n\t\treturn null;\n\t}", "void sendMessage(String pid,String cmd,MintReply mr,int flags)\n{\n sendMessage(pid,cmd,null,mr,flags);\n}", "protected PermissionsCommandBase(Guid commandId) {\n super(commandId);\n }", "private void registerCommands() {\n }", "public interface ICommand {\n\tpublic abstract void execute(Rover roverInMovement, Plateau currentPlateauState) throws RoverOutOfPlateauException, GridBusyByOtherRoverException;\n}", "private void sendGameCommand(){\n\n }", "@Override\r\n protected void executeCommand(MyRobot robot) {\n }", "int getCmd();", "public RedoCommand() {\n }", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "public Channel method_4090() {\n return null;\n }", "protected byte[] send(byte[] cmd) throws CommunicationException {\n return send(cmd, true);\n }", "public Channel method_4121() {\n return null;\n }", "protected CardCommandAPDU() {\n }", "public interface Command extends Message {\n\n}", "java.lang.String getCommand();", "network.message.PlayerResponses.Command getCommand();", "@Override\r\n\tpublic String getCOMMAND() {\n\t\treturn COMMAND;\r\n\t}", "private interface Command {\n public void execute();\n }", "@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}", "Commands getCommandes();", "public interface CommandControllerPowerState extends PowerState {\n\n\t/**\n\t * Processes the current command. The behavior of this method is dictated by\n\t * the current CommandControllerPowerState implementation.\n\t * \n\t * @param command\n\t * The command the process.\n\t * @param controller\n\t * The controller which invoked this method.\n\t * \n\t * @return The response of the command invocation.\n\t * @throws CommandControllerException\n\t * If this method is called an the processCommand cannot be\n\t * completed.\n\t */\n\tpublic ArrayList<Object> processCommand(byte[] command, CommandController controller)\n\t\t\tthrows CommandControllerException;\n\n}", "public interface Command_Quality {\r\n\t\r\n\tvoid execute();\r\n\r\n}", "public interface PowreedCommand<Result extends PowreedCommandResultInterface> extends Comparable<PowreedCommand<Result>> {\n\n /**\n * The name of the command\n *\n * @return name of the command or sub-command\n */\n String getName();\n\n /**\n * The parameter list of command\n *\n * @return parameter list of command\n */\n List<PowreedCommandParameter> getParameters();\n\n /**\n * The description to describe the command\n *\n * @return description of command\n */\n String getDescription();\n\n /**\n * The permission which allow player to access to the command\n *\n * @return the permission as Strings\n */\n String getPermission();\n\n /**\n * The plugin of the command as an instance\n *\n * @return plugin of the command\n */\n Plugin getPlugin();\n\n /**\n * Convert to the help string by using help command\n *\n * @return the help string by using help command\n */\n default String toHelpString() {\n // Builder\n StringBuilder builder = new StringBuilder();\n // Name\n builder.append(ChatColor.RED).append(getName()).append(\" \");\n // Parameter\n Iterator<PowreedCommandParameter> iterator = this.getParameters().iterator();\n while (iterator.hasNext()) {\n PowreedCommandParameter next = iterator.next();\n\n if (next.isRequired()) {\n builder.append(ChatColor.GOLD).append(\"<\").append(next.getName()).append(\">\");\n } else {\n builder.append(ChatColor.DARK_GRAY).append(\"[\").append(next.getName()).append(\"]\");\n }\n\n if (iterator.hasNext()) {\n builder.append(\" \");\n }\n }\n // Description\n builder.append(ChatColor.RED).append(\": \").append(ChatColor.GRAY).append(getDescription());\n // Return to string\n return builder.toString();\n }\n\n /**\n * This method will be called by using\n *\n * @param sender the sender who call command\n * @param args the argument list\n * @return the result of command\n */\n Result command(@NotNull CommandSender sender, List<String> args);\n\n /**\n * Compare by the name. To order the command or something else relate to it\n *\n * @param o an another object to compare\n * @return the index of comparison related to String compare\n * @see String#compareTo(String)\n */\n @Override\n default int compareTo(@NotNull PowreedCommand o) {\n return this.getName().compareTo(o.getName());\n }\n\n /**\n * Tab executor of the command as suggestion\n *\n * @param sender the sender who tab\n * @param args the previous arguments as list\n * @return the list of suggestion\n */\n List<String> tab(CommandSender sender, List<String> args);\n}", "public interface ServerCommand {\n\t\n\t/**\n\t * Command wird ausgef&uuml;hrt.\n\t * \n\t * @param m Member, welcher den Command ausgef&uuml;hrt hat.\n\t * @param c TextChannel, in dem der Command ausgef&uuml;hrt wurde.\n\t * @param msg Message, in der der Command steht.\n\t */\n public abstract void performCommand(Member m, TextChannel c, Message msg);\n}", "public int onCommand(java.lang.String r6) {\n /*\n r5 = this;\n java.io.PrintWriter r0 = r5.getOutPrintWriter()\n r1 = -1\n if (r6 == 0) goto L_0x0009\n r2 = r6\n goto L_0x000b\n L_0x0009:\n java.lang.String r2 = \"\"\n L_0x000b:\n int r3 = r2.hashCode() // Catch:{ Exception -> 0x00dd }\n switch(r3) {\n case -1894245460: goto L_0x008b;\n case -1845752298: goto L_0x0081;\n case -1687551032: goto L_0x0077;\n case -1367724422: goto L_0x006d;\n case -1313911455: goto L_0x0062;\n case 113291: goto L_0x0057;\n case 55361425: goto L_0x004c;\n case 200896764: goto L_0x0040;\n case 703160488: goto L_0x0036;\n case 1749711139: goto L_0x002c;\n case 1791471818: goto L_0x0020;\n case 1854493850: goto L_0x0014;\n default: goto L_0x0012;\n } // Catch:{ Exception -> 0x00dd }\n L_0x0012:\n goto L_0x0097\n L_0x0014:\n java.lang.String r3 = \"monitor-battery\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 3\n goto L_0x0098\n L_0x0020:\n java.lang.String r3 = \"get-job-state\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 9\n goto L_0x0098\n L_0x002c:\n java.lang.String r3 = \"get-battery-not-low\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 6\n goto L_0x0098\n L_0x0036:\n java.lang.String r3 = \"get-battery-seq\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 4\n goto L_0x0098\n L_0x0040:\n java.lang.String r3 = \"heartbeat\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 10\n goto L_0x0098\n L_0x004c:\n java.lang.String r3 = \"get-storage-not-low\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 8\n goto L_0x0098\n L_0x0057:\n java.lang.String r3 = \"run\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 0\n goto L_0x0098\n L_0x0062:\n java.lang.String r3 = \"timeout\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 1\n goto L_0x0098\n L_0x006d:\n java.lang.String r3 = \"cancel\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 2\n goto L_0x0098\n L_0x0077:\n java.lang.String r3 = \"get-battery-charging\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 5\n goto L_0x0098\n L_0x0081:\n java.lang.String r3 = \"get-storage-seq\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 7\n goto L_0x0098\n L_0x008b:\n java.lang.String r3 = \"trigger-dock-state\"\n boolean r2 = r2.equals(r3) // Catch:{ Exception -> 0x00dd }\n if (r2 == 0) goto L_0x0012\n r2 = 11\n goto L_0x0098\n L_0x0097:\n r2 = r1\n L_0x0098:\n switch(r2) {\n case 0: goto L_0x00d7;\n case 1: goto L_0x00d2;\n case 2: goto L_0x00cd;\n case 3: goto L_0x00c8;\n case 4: goto L_0x00c3;\n case 5: goto L_0x00be;\n case 6: goto L_0x00b9;\n case 7: goto L_0x00b4;\n case 8: goto L_0x00af;\n case 9: goto L_0x00aa;\n case 10: goto L_0x00a5;\n case 11: goto L_0x00a0;\n default: goto L_0x009b;\n } // Catch:{ Exception -> 0x00dd }\n L_0x009b:\n int r1 = r5.handleDefaultCommands(r6) // Catch:{ Exception -> 0x00dd }\n goto L_0x00dc\n L_0x00a0:\n int r1 = r5.triggerDockState(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00a5:\n int r1 = r5.doHeartbeat(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00aa:\n int r1 = r5.getJobState(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00af:\n int r1 = r5.getStorageNotLow(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00b4:\n int r1 = r5.getStorageSeq(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00b9:\n int r1 = r5.getBatteryNotLow(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00be:\n int r1 = r5.getBatteryCharging(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00c3:\n int r1 = r5.getBatterySeq(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00c8:\n int r1 = r5.monitorBattery(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00cd:\n int r1 = r5.cancelJob(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00d2:\n int r1 = r5.timeout(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00d7:\n int r1 = r5.runJob(r0) // Catch:{ Exception -> 0x00dd }\n return r1\n L_0x00dc:\n return r1\n L_0x00dd:\n r2 = move-exception\n java.lang.StringBuilder r3 = new java.lang.StringBuilder\n r3.<init>()\n java.lang.String r4 = \"Exception: \"\n r3.append(r4)\n r3.append(r2)\n java.lang.String r3 = r3.toString()\n r0.println(r3)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.server.job.JobSchedulerShellCommand.onCommand(java.lang.String):int\");\n }", "@Override\n\tpublic String matchCommand() {\n\t\treturn null;\n\t}", "public abstract void doCommand(String command);", "public interface Command {\n\n\n}", "@Override\n\tpublic void handleServerCmd() {\n\t\t\n\t}", "@Override\n public void execute() {\n if(state.getState()!=1) {\n client.printParseMessage();\n return;\n } else if(inputArgs.length < 1) {\n System.out.println(client.strings.getString(\"manage_command_message\"));\n return;\n }\n try {\n client.setDraftTag(inputArgs[0]);\n channel.send(new ReadRequest(client.getDraftTag()));\n ReadReply reply = (ReadReply) channel.receive();\n if(!reply.lines.isEmpty()) {\n String replyLine = reply.lines.get(reply.lines.size() - 1);\n if(Push.CLOSE_LINE.equals(replyLine)) {\n System.out.println(client.strings.getString(\"manage_close_command_message\"));\n return;\n }\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(ReadCommand.class.getName())\n .log(Level.SEVERE, null, ex);\n }\n state.setState(2);\n }", "private ReductionPublisherRequestCommand() { super(null); }", "public Channel method_4112() {\n return null;\n }", "protected void channelRead0(ChannelHandlerContext channelHandlerContext, CommandMessage command) throws Exception {\r\n\r\n final Op cmd = command.op;\r\n\r\n // now do the real work\r\n if (this.verbose) {\r\n final StringBuilder log = new StringBuilder(1024);\r\n log.append(cmd);\r\n if (command.element != null) {\r\n log.append(\" \").append(command.element.getKey());\r\n }\r\n log.append(\" \").append(command.key);\r\n logger.info(log.toString());\r\n }\r\n\r\n final Channel channel = channelHandlerContext.channel();\r\n if (cmd == null) {\r\n handleNoOp(command, channel);\r\n } else {\r\n switch (cmd) {\r\n case GET:\r\n handleGet(command, channel);\r\n break;\r\n case GETS:\r\n handleGets(command, channel);\r\n break;\r\n case APPEND:\r\n handleAppend(command, channel);\r\n break;\r\n case PREPEND:\r\n handlePrepend(command, channel);\r\n break;\r\n case DELETE:\r\n handleDelete(command, channel);\r\n break;\r\n case DECR:\r\n handleDecr(command, channel);\r\n break;\r\n case INCR:\r\n handleIncr(command, channel);\r\n break;\r\n case REPLACE:\r\n handleReplace(command, channel);\r\n break;\r\n case ADD:\r\n handleAdd(command, channel);\r\n break;\r\n case SET:\r\n handleSet(command, channel);\r\n break;\r\n case CAS:\r\n handleCas(command, channel);\r\n break;\r\n case STATS:\r\n handleStats(command, channel);\r\n break;\r\n case VERSION:\r\n handleVersion(command, channel);\r\n break;\r\n case QUIT:\r\n handleQuit(channel);\r\n break;\r\n case FLUSH_ALL:\r\n handleFlush(command, channel);\r\n break;\r\n case VERBOSITY:\r\n handleVerbosity(command, channel);\r\n break;\r\n default:\r\n throw new UnknownCommandException(\"unknown command\");\r\n }\r\n }\r\n }", "@Override\n public void Execute() {\n\n }", "public String[] readCommand();", "public interface Commander {\r\n\t\r\n\t/**\r\n\t * This will issue a command. It returns a receipt for the issuance, not for the other all interaction.\r\n\t * @param commandToIssue The command to issue.\r\n\t * @throws things.thinger.SystemException\r\n\t */\r\n\tpublic Receipt issueCommand(Command\t\tcommandToIssue) throws SystemException;\r\n\t\r\n\t/**\r\n\t * Query the reponse progress a command. It is up to the implementation as to when responses are handled. If they\r\n\t * are not handled in a separate thread, it is possible this call with take time to handle responses. The implementation will\r\n\t * make a best-effort to keep InterruptedExceptions from fouling the process. If it successful, the interruption will propagate\r\n\t * as a simple WARNING level SystemException. If not, you could see anything up to a PANIC.\r\n\t * @param commandReceipt The issuance receipt. \r\n\t * @return A response object.\r\n\t * @throws things.thinger.SystemException\r\n\t */\r\n\tpublic CommandResponse queryResponse(Receipt\tcommandReceipt) throws SystemException;\r\n\t\r\n\t\r\n\t/**\r\n\t * Allow the disposal procecure to run. It is safe to call this any time. It will sweep any DISPOSED responses\r\n\t * from the system, which may build up over time. The CommandResponse implementations may or may not call it.\r\n\t * @throws things.thinger.SystemException\r\n\t */\r\n\tpublic void disposal() throws SystemException;\r\n\t\r\n}", "public ResponseToCommand execute() {\n throw new UnsupportedOperationException(Messages.COMMAND_ABSTRACT_METHOD_ERROR);\n }", "String getCommand();", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n \n }", "private CommandBrocker() {}", "public String getUserCommand();", "public void processCommand() {\n if (cam != null) {\n // No commands if no draw canvas to retrieve them from!\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_UP) || StdDraw.isKeyPressed(KeyEvent.VK_UP))\n this.setR(this.getR().minus(this.getFacingVector().times(1e8)));\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_DOWN) || StdDraw.isKeyPressed(KeyEvent.VK_DOWN)) \n this.setR(this.getR().plus(this.getFacingVector().times(1e8)));\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_LEFT) || StdDraw.isKeyPressed(KeyEvent.VK_LEFT)) \n this.rot += FOV_INCREMENT;\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_RIGHT) || StdDraw.isKeyPressed(KeyEvent.VK_RIGHT)) \n this.rot -= FOV_INCREMENT; \n }\n }", "private Command() {\n initFields();\n }", "@Override\n public void process(Serializable msg) {\n ((Command) msg).execute(arg);\n }", "public abstract void setCommand(String cmd);", "public void sendCommand(Command cmd);", "public ModifyVirtualMachine(){\r\n\t\t super(COMMAND);\r\n\t}", "public interface Command {\n\t public String execute(String[] request);\n}", "byte getCommand(int n) {\r\n return command_journal[n];\r\n }", "public interface Command {\n\t/**\n *it is used to be defined and to call engine methods\n */\n public void execute();\n \n}", "private void retriveCommand(){\n\t\tdirections.add(\"Turn left.\");\n\t\tdirections.add(\"Walk 20 meters and turn right.\");\n\t\tdirections.add(\"Arrive destination.\");\n\t}", "@Override\r\n\tprotected void initDefaultCommand() {\n\t\t\r\n\t}", "public String getCommand() { return command; }", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "private void customCommands(MessageEvent message) {\r\n String command = message.getMessage();\r\n \r\n if (!reservedCommands.contains(command)) {\r\n String[]info;\r\n info = manager.getCommandFromDatabase(command, message.getChannel().getName());\r\n\r\n //checks if the command is in custom mod commands\r\n if (info[1].matches(\"-m\")) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"You're not allowed to use this command.\");\r\n }\r\n }\r\n //checks if the command is in the custom commands available to everyone\r\n else if (info[1].matches(\"-e\")) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"No such command exists\");\r\n }\r\n }\r\n }", "public GetMotorPositionCommand ()\r\n {\r\n }", "private ExecuteMessage() {\n initFields();\n }", "public interface iCommand {\n void execute(String peerId, JSONObject payload) throws JSONException;\n}", "ICommand getCommand(String requestType, String title, String points, String source, String activity_id) throws Exception;", "@Override\n public void initDefaultCommand() {\n\n }", "public interface IDeviceManager {\n\n //디바이스 제어시 사용\n ResultMessage deviceExecute(String commandId, String deviceId, String deviceCommand);\n}", "int getCommand();", "protected VmPoolCommandBase(Guid commandId) {\n super(commandId);\n }", "@Override\n public void initDefaultCommand() \n {\n }", "@Override\n\tpublic void execute(ByteBuffer buff) {\n\t\t\n\t}", "@Override\n public void execute() {\n this.context.setToken(new Token(context.getLexemeType(), context.getLexemeBuffer().toString()));\n this.context.getLexemeBuffer().setLength(0);\n if (command != null) {\n command.execute();\n }\n }", "@Override\n\tprotected void initDefaultCommand() {\n\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\n\t}", "@Override\n\t\tpublic void onDirectMessage(DirectMessage arg0) {\n\t\t\t\n\t\t}", "@Override\r\n public void onMessage(MessageEvent message) {\r\n String newMessage = message.getMessage();\r\n String response;\r\n\r\n //split the message on spaces to identify the command\r\n String[] messageArray = newMessage.split(\" \");\r\n \r\n switch (messageArray[0]) {\r\n case \"!command\":\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n if (messageArray.length == 2) {\r\n if (messageArray[1].equals(\"off\")) {\r\n commandsActive = false;\r\n } \r\n if (messageArray[1].equals(\"on\")) {\r\n commandsActive = true;\r\n }\r\n }\r\n }\r\n break;\r\n //command to make a custom command for the bot\r\n case \"!addcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = addCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to add commands.\");\r\n }\r\n }\r\n break;\r\n case \"!commands\":\r\n if (commandsActive) {\r\n if (messageArray.length ==1) {\r\n ArrayList<String> commands = manager.getCommands(message.getChannel().getName());\r\n String commandList = \"The custom commands available to everyone for this channel are: \";\r\n while (!commands.isEmpty()) {\r\n commandList += commands.remove(0) + \", \";\r\n }\r\n message.getChannel().send().message(commandList);\r\n }\r\n }\r\n break;\r\n //command to delete a custom command from the bot\r\n case \"!delcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = delCom(messageArray[1], message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to remove commands.\");\r\n }\r\n }\r\n break;\r\n //command to edit a custom command the bot has\r\n case \"!editcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = editCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to edit commands.\");\r\n }\r\n }\r\n break;\r\n\r\n //default message handling for custom commands\r\n default:\r\n if (commandsActive) {\r\n if (message.getMessage().startsWith(\"!\") && !messageArray[0].equals(\"!permit\")&& !messageArray[0].equals(\"!spam\")) {\r\n customCommands(message);\r\n }\r\n }\r\n break;\r\n }\r\n }", "public abstract boolean doCommand() throws Exception;", "public String \n getCommand() \n {\n return pCommand;\n }", "public interface RemoveCommentCommand extends Command {\r\n\r\n /**\r\n * Get the owner of the comment\r\n *\r\n * @return The owner of the comment\r\n */\r\n public Peer getPeer();\r\n\r\n /**\r\n * Set the owner of the comment\r\n *\r\n * @param peer The owner of the comment\r\n */\r\n public void setPeer(Peer peer);\r\n\r\n /**\r\n * Get the music to comment\r\n *\r\n * @return The music to comment\r\n */\r\n public Music getMusic();\r\n\r\n /**\r\n * Set the music to comment\r\n *\r\n * @param music The music to comment\r\n */\r\n public void setMusic(Music music);\r\n\r\n /**\r\n * Get the id of the comment for the music\r\n *\r\n * @return The id of the comment for the music\r\n */\r\n public int getCommentId();\r\n\r\n /**\r\n * Set the id of the comment for the music\r\n *\r\n * @param commentId The id of the comment for the music\r\n */\r\n public void setCommentId(int commentId);\r\n}", "byte[] getChannelCommand() throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n baos.write(rgbCommand(r, g, b));\n baos.write(wwcwCommand(ww, cw));\n return baos.toByteArray();\n }" ]
[ "0.64483696", "0.6428367", "0.62497044", "0.61863184", "0.6167178", "0.6127029", "0.61241174", "0.6011662", "0.60090595", "0.59848726", "0.59826076", "0.5963515", "0.5938374", "0.59369105", "0.59356713", "0.5890723", "0.5814816", "0.57980144", "0.5744377", "0.57229435", "0.57188576", "0.57179344", "0.571413", "0.5692887", "0.56901294", "0.5688311", "0.56474644", "0.5632725", "0.563094", "0.56191707", "0.56072104", "0.560225", "0.5600689", "0.5593021", "0.5591398", "0.55783325", "0.55779344", "0.5570003", "0.55631876", "0.5559099", "0.5552083", "0.5550812", "0.5549891", "0.55478764", "0.55381984", "0.5538031", "0.55317205", "0.55256766", "0.551962", "0.55061966", "0.55060965", "0.5501776", "0.54965496", "0.54873943", "0.5486782", "0.54861766", "0.5483068", "0.5482837", "0.54821014", "0.5477975", "0.5467009", "0.5467009", "0.5467009", "0.5464503", "0.54632074", "0.545211", "0.5451262", "0.54506266", "0.5447764", "0.5442852", "0.5434184", "0.54294384", "0.54292953", "0.54218155", "0.5417721", "0.54176074", "0.541346", "0.5408413", "0.54025215", "0.54025215", "0.54025215", "0.54015267", "0.5401048", "0.5400871", "0.540014", "0.5392387", "0.5387206", "0.5385809", "0.538008", "0.5377151", "0.537629", "0.5374337", "0.53726596", "0.53630215", "0.53630215", "0.5360812", "0.5356792", "0.5347258", "0.53438765", "0.53433186", "0.53431594" ]
0.0
-1
/ /home/zy/workspace2/ReadFromZYF/LffLogs/JpfTargetApollo.main().txt Parse time: 0.006 seconds. Solve time: 0.479 seconds.
public static void initBenchmark() { functionName.add(" JpfTargetApollo.main()_0"); paraName.add("in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double"); binaryExp.add("(((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.014 seconds. functionName.add(" JpfTargetApollo.main()_1"); paraName.add("in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double"); binaryExp.add("((0.0==(((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)))"); //Parse time: 0.0 seconds. Solve time: 0.003 seconds. functionName.add(" JpfTargetApollo.main()_2"); paraName.add("in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double"); binaryExp.add("(((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)>0.0))"); //Parse time: 0.0 seconds. Solve time: 0.48 seconds. functionName.add(" JpfTargetApollo.main()_3"); paraName.add("in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double"); binaryExp.add("(((0.18181818181818185*(((0.5*(((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)*((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)))+(0.0-(((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)))-0.04759988869075444))<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.247 seconds. functionName.add(" JpfTargetApollo.main()_4"); paraName.add("in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double"); binaryExp.add("((0.0==(0.18181818181818185*(((0.5*(((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)*((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)))+(0.0-(((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)))-0.04759988869075444)))) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.003 seconds. functionName.add(" JpfTargetApollo.main()_5"); paraName.add("in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double"); binaryExp.add("(((0.18181818181818185*(((0.5*(((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)*((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)))+(0.0-(((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)))-0.04759988869075444))>0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.041 seconds. functionName.add(" JpfTargetApollo.main()_6"); paraName.add("in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("(((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.014 seconds. functionName.add(" JpfTargetApollo.main()_7"); paraName.add("in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("((0.0==(((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0))) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.002 seconds. functionName.add(" JpfTargetApollo.main()_8"); paraName.add("in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("(((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)>0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); // 可解 Parse time: 0.0 seconds. Solve time: 0.59 seconds. functionName.add(" JpfTargetApollo.main()_9"); paraName.add("in2_1_5_SYMREAL,in2_2_6_SYMREAL,in1_1_2_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("(((0.18181818181818185*(((0.5*((((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)*(((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)))+(0.0-(((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)))-3.332757323673897))<0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.455 seconds. functionName.add(" JpfTargetApollo.main()_10"); paraName.add("in2_1_5_SYMREAL,in2_2_6_SYMREAL,in1_1_2_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("((0.0==(0.18181818181818185*(((0.5*((((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)*(((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)))+(0.0-(((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)))-3.332757323673897)))) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.069 seconds. functionName.add(" JpfTargetApollo.main()_11"); paraName.add("in2_1_5_SYMREAL,in2_2_6_SYMREAL,in1_1_2_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("(((0.18181818181818185*(((0.5*((((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)*(((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)))+(0.0-(((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)))-3.332757323673897))>0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.001 seconds. Solve time: 0.035 seconds. functionName.add(" JpfTargetApollo.main()_12"); paraName.add("in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("(((((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0)<0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.188 seconds. functionName.add(" JpfTargetApollo.main()_13"); paraName.add("in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("((0.0==(((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0))) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); //Parse time: 0.0 seconds. Solve time: 0.002 seconds. functionName.add(" JpfTargetApollo.main()_14"); paraName.add("in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("(((((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0)>0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); // 可解Parse time: 0.0 seconds. Solve time: 0.454 seconds. functionName.add(" JpfTargetApollo.main()_15"); paraName.add("in2_1_5_SYMREAL,in2_2_6_SYMREAL,in1_1_2_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL"); paraType.add("double,double,double,double,double,double"); binaryExp.add("(((0.18181818181818185*(((0.5*((((((0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/0.006285533905932738)/2.0)*(((((0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/0.006285533905932738)/2.0)))+(0.0-(((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0)))-0.4165109785694488))<0.0)) && (((((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0)<0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws Exception {\n\n // Create a buffered reader so that we can read full lines of input.\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n // Retrieve the name of the file to build the graph from.\n System.out.printf(\"Enter the name of the graph file (something.tsv): \");\n System.out.flush();\n String fileName = in.readLine().trim();\n\n // Construct the full file name from the simple name given.\n if (fileName.indexOf('/') < 0) {\n fileName = \"src/main/resources/hw6/data/\" + fileName;\n } else {\n System.err.printf(\"Error: file name must be simple (no '/'s)\\n\");\n System.exit(1);\n }\n\n // Build the graph from the file and report the time spent to the user.\n\n long startTime = System.currentTimeMillis();\n Graph<String, String> graph = buildGraph(fileName);\n long endTime = System.currentTimeMillis();\n\n double duration = (endTime - startTime) / 1000.;\n System.out.printf(\"Parsed graph in %.1f seconds\\n\", duration);\n System.out.printf(\" - %d characters\\n\", graph.size());\n System.out.printf(\" - %d pairs appeared together\\n\", (graph.getNumOfEdges())/2);\n System.out.println();\n\n // Read in the names of the two characters and check that they exist.\n\n System.out.printf(\"To find a path between two characters...\\n\");\n System.out.printf(\"Enter the first character's name: \");\n System.out.flush();\n String src = in.readLine().trim();\n if (!graph.contains(new GraphNode<String>(src))) {\n System.err.printf(\"Error: no such node\\n\");\n System.exit(1);\n }\n\n System.out.printf(\"Enter the second character's name: \");\n System.out.flush();\n String dest = in.readLine().trim();\n if (!graph.contains(new GraphNode<String>(dest))) {\n System.err.printf(\"Error: no such node\\n\");\n System.exit(1);\n }\n\n // Find the shortest path.\n\n startTime = System.currentTimeMillis();\n List<GraphEdge<String, String>> path = shortestPath(graph, src, dest);\n endTime = System.currentTimeMillis();\n\n duration = (endTime - startTime) / 1000.;\n System.out.printf(\"Found shortest path in %.1f seconds\\n\", duration);\n System.out.println();\n\n // Display the shortest path to the user.\n if (path == null) {\n System.out.printf(\"No path from %s to %s\\n\", src, dest);\n } else {\n System.out.printf(\"Shortest path:\\n\");\n System.out.printf(\" from %s\\n\", src);\n for (GraphEdge<String, String> edge : path) {\n \t System.out.printf(\" to %s [in %s]\\n\",\n edge.getDestination().getData(), edge.getData());\n }\n }\n }", "public static void main(String[] args) throws Exception {\n File source = new File(\"/media/datahaki/data/gokart/localize/20191022T120450_00\", \"log.lcm\");\n // new File(\"/media/datahaki/data/gokart/tokio/20190310/20190310T220933_00\", \"log.lcm\");\n // Optional<ByteBuffer> optional = FirstLogMessage.of(source, GokartPoseChannel.INSTANCE.channel());\n of( //\n source, //\n // DatahakiLogFileLocator.file(GokartLogFile._20190418T145229_b6a70baf), //\n Tensors.fromString(\"{49.38618[m], 46.52503[m], -2.48823}\"), // cut 0\n // Tensors.fromString(\"{28.19444[m], 57.56746[m], 1.75896}\"), // cut 1\n // GokartPoseEvent.of(optional.get()).getPose(), //\n new File(source.getParentFile(), \"post.lcm\"));\n }", "public static void main(String[] args) throws Exception {\n if(args.length < 2) {\n System.out.println(\"Not enough parameters! java -jar programAnalysis.jar <Analysis> <Input file> \");\n return;\n }\n\n // Parse the analysis input\n String analysisString = args[0];\n\n // Get Analysis from factory\n GeneralAnalysisFactory analysisFactory = new GeneralAnalysisFactory();\n GeneralAnalysis analysis = analysisFactory.getInstance(analysisString);\n\n TheLangLexer lex = new TheLangLexer(new ANTLRFileStream(args[1]));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TheLangParser parser = new TheLangParser(tokens);\n ProgramGeneralAnalysisListener listener = new ProgramGeneralAnalysisListener(analysis);\n parser.addParseListener(listener);\n\n try {\n TheLangParser.ProgramContext parserResult = parser.program();\n\n BaseMutableTreeNode rootTree = listener.getRootTree();\n FlowGraph graph = new FlowGraph();\n\n Enumeration en = rootTree.preorderEnumeration();\n int i = 1;\n while (en.hasMoreElements()) {\n\n // Unfortunately the enumeration isn't genericised so we need to downcast\n // when calling nextElement():\n BaseMutableTreeNode node = (BaseMutableTreeNode) en.nextElement();\n ParserRuleContext object = (ParserRuleContext) node.getUserObject();\n\n if(BaseStatement.class.isAssignableFrom(node.getClass())) {\n BaseStatement statement = (BaseStatement) node;\n graph.processStatement(statement);\n\n System.out.println(\"label-\" + i++ + \": \" + object.getText());\n }\n\n }\n\n analysis.doAnalysis(graph);\n\n System.out.println(analysis.printResult());\n\n// CommonTree t = (CommonTree) parserResult.getTree();\n// CommonTree t2 = (CommonTree) t.getChild(0);\n// int startToken = t2.getTokenStartIndex();\n// int stopToken = t2.getTokenStopIndex();\n// CommonToken token = (CommonToken) t2.getToken();\n// System.out.println(token.getText());\n//\n// if (parserResult != null) {\n// CommonTree tree = (CommonTree) parserResult.tree;\n// System.out.println(tree.toStringTree());\n// }\n } catch (RecognitionException e) {\n e.printStackTrace();\n }\n\n }", "public static void main(String[] args) throws JsonGenerationException, JsonMappingException, IOException{\n\t\tDictionary root = new Dictionary();\n\t\tparse Parse = new parse();\n long begin = System.currentTimeMillis();\n //String fileName = args[0];\n //String examine = args[1];\n Parse.parseFILE(\"word_tagged.txt\", root);\n long end = System.currentTimeMillis();\n System.out.println(\"insertion time elapse: \" + (double)(end-begin)/1000);\n \n \n /***********************Read data from phrase check dataset**************************/\n \n\t\tBigram n = new Bigram(Parse.parseFILE(\"Grammar.txt\"));\n\t n.train();\n\t ObjectMapper phrase = new ObjectMapper();\n\t String PhraseJson = phrase.writeValueAsString(n);\n\t phrase.writeValue(new File(\"Phrase.json\"), n);\n\t \n\t /***********************Read data from grammar rule dataset**************************/\n\t BuildRule rule = new BuildRule(Parse.parseFILE(\"Grammar.txt\"), 3, root);\n\t rule.train();\n\t \n\t System.out.println(rule.testing);\n\t ConvertToJson con = new ConvertToJson(rule);\n\t ObjectMapper mapper = new ObjectMapper();\n\t String ruleJson = mapper.writeValueAsString(rule);\n\t\tmapper.writeValue(new File(\"GrammarRule.json\"), rule);\n /***************************Begin to check*************************************/\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the number of members: \");\n\t\tnumberOfMembers = scanner.nextInt();\n\t\tSystem.out.println(\"Enter the number of timestamps: \");\n\t\tnumberOfTimestamps = scanner.nextInt();\n\t\tscanner.close();\n\t\t\n\t\t/**\n\t\t * Generating logFile with values given by user,\n\t\t * calculating time taken to generate and printing that time.\n\t\t */\n\t\tstartTime = System.nanoTime();\n\t\tgenerateLogFile(numberOfMembers, numberOfTimestamps);\n\t\ttimeLast = System.nanoTime() - startTime;\n\t\tcalculateTime(\"File generated in\", timeLast);\n\t\t\n\t\t/**\n\t\t * Initializing algorithm instances,\n\t\t * calculating time taken to initialize and printing that time.\n\t\t */\n\t\tstartTime = System.nanoTime();\n\t\tquickFind = new QuickFindUF(numberOfMembers);\n\t\tquickUnion = new QuickUnionUF(numberOfMembers);\n\t\tweightedQuickUnion = new WeightedQuickUnionUF(numberOfMembers);\n\t\tweightedQuickUnionByHeight = new WeightedQuickUnionByHeightUF(numberOfMembers);\n\t\tquickUnionPathCompression = new QuickUnionPathCompressionUF(numberOfMembers);\n\t\tweightedQuickUnionPathCompression = new WeightedQuickUnionPathCompressionUF(numberOfMembers);\n\t\ttimeLast = System.nanoTime() - startTime;\n\t\tcalculateTime(\"Instances generated in\", timeLast);\n\t\t\n\t\t/**\n\t\t * Running algorithms and initializing variables of time taken.\n\t\t */\n\t\tdouble quickFindTime = runAlgorithm(quickFind);\n\t\tdouble quickUnionTime = runAlgorithm(quickUnion);\n\t\tdouble weightedQuickUnionTime = runAlgorithm(weightedQuickUnion);\n\t\tdouble weightedQuickUnionByHeightTime = runAlgorithm(weightedQuickUnionByHeight);\n\t\tdouble quickUnionPathCompressionTime =runAlgorithm(quickUnionPathCompression);\n\t\tdouble weightedQuickUnionPathCompressionTime = runAlgorithm(weightedQuickUnionPathCompression);\n\t\t\n\t\t/**\n\t\t * Creating list of times taken to run by different algorithms\n\t\t * to get the shortest time taken.\n\t\t */\n\t\tArrayList<Double> algorithmTimes = new ArrayList<>();\n\t\talgorithmTimes.add(quickFindTime);\n\t\talgorithmTimes.add(quickUnionTime);\n\t\talgorithmTimes.add(weightedQuickUnionTime);\n\t\talgorithmTimes.add(weightedQuickUnionByHeightTime);\n\t\talgorithmTimes.add(quickUnionPathCompressionTime);\n\t\talgorithmTimes.add(weightedQuickUnionPathCompressionTime);\n\t\tCollections.sort(algorithmTimes);\n\t\tdouble shortestTime = algorithmTimes.get(0);\n\t\t\n\t\t/**\n\t\t * Printing comparison of time taken by algorithms in relation to the shortest time. \n\t\t */\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\"Times Comparison\");\n\t\tSystem.out.println(\"======================================================\");\n\t\tSystem.out.printf(quickFind.getClass().getSimpleName() + \"\\t\\t\\t\\t%.5f%n\"\n\t\t\t\t+ quickUnion.getClass().getSimpleName() + \"\\t\\t\\t\\t%.5f%n\"\n\t\t\t\t+ weightedQuickUnion.getClass().getSimpleName() + \"\\t\\t\\t%.5f%n\"\n\t\t\t\t+ weightedQuickUnionByHeight.getClass().getSimpleName() + \"\\t\\t%.5f%n\"\n\t\t\t\t+ quickUnionPathCompression.getClass().getSimpleName() + \"\\t\\t%.5f%n\"\n\t\t\t\t+ weightedQuickUnionPathCompression.getClass().getSimpleName() + \"\\t%.5f%n\",\n\t\t\t\tquickFindTime/shortestTime, quickUnionTime/shortestTime,weightedQuickUnionTime/shortestTime, \n\t\t\t\tweightedQuickUnionByHeightTime/shortestTime, quickUnionPathCompressionTime/shortestTime, weightedQuickUnionPathCompressionTime/shortestTime);\n\t}", "public static void main(String[] args) {\n int lineSize = Integer.parseInt(args[0]);\n String[] input = getInput(args);\n\n WordWrap ww = new WordWrap(lineSize, input);\n Long start = System.currentTimeMillis();\n Integer[] lines = ww.solve();\n Long end = System.currentTimeMillis();\n\n System.out.println(\"solved in \"+((end-start)/1000.0) +\" seconds\");\n printResult(lines, input);\n }", "public static void main(String[] args) throws IOException {\n\n SimpleDateFormat ft = new SimpleDateFormat(\"hh:mm:ss\");\n System.out.println(\"Started at \" + ft.format(new Date()));\n\n // Folder containing android apps to analyze\n final PluginId pluginId = PluginId.getId(\"idaDoctor\");\n final IdeaPluginDescriptor pluginDescriptor = PluginManager.getPlugin(pluginId);\n File experimentDirectory = new File(root_project.getBasePath());\n fileName = new File(pluginDescriptor.getPath().getAbsolutePath()+\"/resources/results.csv\");\n String smellsNeeded = args[0];\n\n FILE_HEADER = new String[StringUtils.countMatches(smellsNeeded, \"1\") + 1];\n\n DataTransmissionWithoutCompressionRule dataTransmissionWithoutCompressionRule = new DataTransmissionWithoutCompressionRule();\n DebuggableReleaseRule debbugableReleaseRule = new DebuggableReleaseRule();\n DurableWakeLockRule durableWakeLockRule = new DurableWakeLockRule();\n InefficientDataFormatAndParserRule inefficientDataFormatAndParserRule = new InefficientDataFormatAndParserRule();\n InefficientDataStructureRule inefficientDataStructureRule = new InefficientDataStructureRule();\n InefficientSQLQueryRule inefficientSQLQueryRule = new InefficientSQLQueryRule();\n InternalGetterSetterRule internaleGetterSetterRule = new InternalGetterSetterRule();\n LeakingInnerClassRule leakingInnerClassRule = new LeakingInnerClassRule();\n LeakingThreadRule leakingThreadRule = new LeakingThreadRule();\n MemberIgnoringMethodRule memberIgnoringMethodRule = new MemberIgnoringMethodRule();\n NoLowMemoryResolverRule noLowMemoryResolverRule = new NoLowMemoryResolverRule();\n PublicDataRule publicDataRule = new PublicDataRule();\n RigidAlarmManagerRule rigidAlarmManagerRule = new RigidAlarmManagerRule();\n SlowLoopRule slowLoopRule = new SlowLoopRule();\n UnclosedCloseableRule unclosedCloseableRule = new UnclosedCloseableRule();\n\n String[] smellsType = {\"DTWC\", \"DR\", \"DW\", \"IDFP\", \"IDS\", \"ISQLQ\", \"IGS\", \"LIC\", \"LT\", \"MIM\", \"NLMR\", \"PD\", \"RAM\", \"SL\", \"UC\"};\n\n FILE_HEADER[0] = \"Class\";\n\n int headerCounter = 1;\n\n for (int i = 0; i < smellsNeeded.length(); i++) {\n if (smellsNeeded.charAt(i) == '1') {\n FILE_HEADER[headerCounter] = smellsType[i];\n headerCounter++;\n }\n }\n\n CSVFormat csvFileFormat = CSVFormat.DEFAULT.withRecordSeparator(NEW_LINE_SEPARATOR);\n FileWriter fileWriter = new FileWriter(fileName);\n try (CSVPrinter csvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat)) {\n csvFilePrinter.printRecord((Object[]) FILE_HEADER);\n\n for (File project : experimentDirectory.listFiles()) {\n\n if (!project.isHidden()) {\n\n // Method to convert a directory into a set of java packages.\n ArrayList<PackageBean> packages = FolderToJavaProjectConverter.convert(project.getAbsolutePath());\n\n for (PackageBean packageBean : packages) {\n\n for (ClassBean classBean : packageBean.getClasses()) {\n\n List record = new ArrayList();\n\n System.out.println(\"-- Analyzing class: \" + classBean.getBelongingPackage() + \".\" + classBean.getName());\n\n record.add(classBean.getBelongingPackage() + \".\" + classBean.getName());\n\n if (smellsNeeded.charAt(0) == '1') {\n if (dataTransmissionWithoutCompressionRule.isDataTransmissionWithoutCompression(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(1) == '1') {\n if (debbugableReleaseRule.isDebuggableRelease(RunAndroidSmellDetection.getAndroidManifest(project))) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(2) == '1') {\n if (durableWakeLockRule.isDurableWakeLock(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(3) == '1') {\n if (inefficientDataFormatAndParserRule.isInefficientDataFormatAndParser(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(4) == '1') {\n if (inefficientDataStructureRule.isInefficientDataStructure(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(5) == '1') {\n if (inefficientSQLQueryRule.isInefficientSQLQuery(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(6) == '1') {\n if (internaleGetterSetterRule.isInternalGetterSetter(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(7) == '1') {\n if (leakingInnerClassRule.isLeakingInnerClass(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(8) == '1') {\n if (leakingThreadRule.isLeakingThread(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(9) == '1') {\n if (memberIgnoringMethodRule.isMemberIgnoringMethod(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(10) == '1') {\n if (noLowMemoryResolverRule.isNoLowMemoryResolver(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(11) == '1') {\n if (publicDataRule.isPublicData(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(12) == '1') {\n if (rigidAlarmManagerRule.isRigidAlarmManager(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(13) == '1') {\n if (slowLoopRule.isSlowLoop(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(14) == '1') {\n if (unclosedCloseableRule.isUnclosedCloseable(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n csvFilePrinter.printRecord(record);\n }\n }\n }\n }\n }\n System.out.println(\"CSV file was created successfully!\");\n System.out.println(\"Finished at \" + ft.format(new Date()));\n }", "public static void main(String[] args) throws IOException {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(UFTest.class.getResource(\"/\").getPath()+\"1.5/largeUF.txt\"));\n String str = bufferedReader.readLine();\n UFLJWQU uf = new UFLJWQU(Integer.parseInt(str));\n long beginTime =System.currentTimeMillis();\n while ((str = bufferedReader.readLine())!=null){\n String[] array = str.split(\" \");\n int p = Integer.parseInt(array[0]);\n int q = Integer.parseInt(array[1]);\n if(uf.connected(p,q)) continue;\n uf.union(p,q);\n// System.out.println(p+\" -- \"+q);\n }\n System.out.println(uf.count());\n System.out.println(\"cost time :\"+(System.currentTimeMillis() - beginTime));\n }", "public static void main(String[] args) throws Exception {\n\n long startTime = System.currentTimeMillis();\n String inputFilePath = FILE_PATH;\n HackAssembler assembler = new HackAssembler();\n assembler.assemble(inputFilePath);\n long endTime = System.currentTimeMillis();\n System.out.println(\"Total asembly time: \"+(endTime - startTime) +\" ms\");\n\n }", "public void preParseInputFileAE(String inputFile) {\n System.out.println(\"Parsing AE log file...\");\n // gathering lots of data\n serverNames = new LinkedHashSet<>();\n applicationNames = new LinkedHashSet<>();\n serviceNames = new LinkedHashSet<>();\n // connected applications, by servers, by simulation step\n graphHistory = new HashMap<>(); // Map<Integer, Map<FakeServer, List<FakeApplication>>>\n // servers, by simulation step\n serverHistory = new HashMap<>(); // Map<Integer, List<FakeServer>>\n // applications, by simulation step\n applicationHistory = new HashMap<>(); // Map<Integer, List<FakeApplication>>\n int stepCounter = 0;\n try {\n BufferedReader br = Files.newBufferedReader(new File(inputFile).toPath());\n String line;\n while ((line = br.readLine()) != null) {\n // init the maps\n graphHistory.put(stepCounter, new HashMap<>());\n serverHistory.put(stepCounter, new ArrayList<>());\n applicationHistory.put(stepCounter, new ArrayList<>());\n List<FakeServer> currentServers = new ArrayList<>();\n // splitting the servers\n String[] serversRaw = line.split(\"\\\\|\");\n // grabbing robustness from last position\n double robustnessRandomShuffle = Double.parseDouble(serversRaw[serversRaw.length - 4]);\n double robustnessRandomForward = Double.parseDouble(serversRaw[serversRaw.length - 3]);\n double robustnessRandomBackward = Double.parseDouble(serversRaw[serversRaw.length - 2]);\n double robustnessServiceShuffle = Double.parseDouble(serversRaw[serversRaw.length - 1]);\n // stat\n maxSimultaneousServers = Math.max(serversRaw.length - 4, maxSimultaneousServers);\n // for all server full String\n for (String serverRaw : Arrays.asList(serversRaw).subList(0, serversRaw.length - 4)) {\n // grabbing the server part\n String server = serverRaw.split(\"=\")[0];\n // grabbing the application part\n String applications = serverRaw.split(\"=\")[1];\n // server name\n serverNames.add(server.split(\"/\")[0]);\n // building the server object\n FakeServer fakeServer = new FakeServer(server.split(\"/\")[0], Integer.parseInt(server.split(\"/\")[1]),\n Integer.parseInt(server.split(\"/\")[2]), Integer.parseInt(server.split(\"/\")[3]), Integer.parseInt(server.split(\"/\")[4]),\n Arrays.asList(server.split(\"/\")).subList(5, server.split(\"/\").length));\n // stats and tools\n serverHistory.get(stepCounter).add(fakeServer);\n currentServers.add(fakeServer);\n graphHistory.get(stepCounter).put(fakeServer, new ArrayList<>());\n maxServerGeneration = Math.max(Integer.parseInt(server.split(\"/\")[1]), maxServerGeneration);\n maxServerConnections = Math.max(Integer.parseInt(server.split(\"/\")[2]), maxServerConnections);\n maxServerSize = Math.max(Arrays.asList(server.split(\"/\")).size(), maxServerSize);\n serviceNames.addAll(Arrays.asList(server.split(\"/\")).subList(5, server.split(\"/\").length));\n maxSimultaneousApplications = Math.max(applications.split(\";\").length, maxSimultaneousApplications);\n // applications\n for (String application : applications.split(\";\")) {\n // building the application object\n FakeApplication fakeApplication = new FakeApplication(application.split(\"/\")[0], Integer.parseInt(application.split(\"/\")[1]),\n Integer.parseInt(application.split(\"/\")[2]), Integer.parseInt(application.split(\"/\")[4]),\n Arrays.asList(application.split(\"/\")).subList(5, application.split(\"/\").length),\n Arrays.asList(application.split(\"/\")[3].split(\"_\")).stream()\n .map(neighborName -> (FakeServer) findActor(neighborName, currentServers))\n .collect(Collectors.toList()));\n // stats and tools\n applicationHistory.get(stepCounter).add(fakeApplication);\n graphHistory.get(stepCounter).get(fakeServer).add(fakeApplication);\n applicationNames.add(application.split(\"/\")[0]);\n maxApplicationGeneration = Math.max(Integer.parseInt(application.split(\"/\")[1]), maxApplicationGeneration);\n maxApplicationConnections = Math.max(Integer.parseInt(application.split(\"/\")[2]), maxApplicationConnections);\n maxApplicationSize = Math.max(Arrays.asList(application.split(\"/\")).size(), maxApplicationSize);\n serviceNames.addAll(Arrays.asList(application.split(\"/\")).subList(5, application.split(\"/\").length));\n }\n }\n stepCounter++;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(\"Names: \" + serverNames.size() + \"/\" + applicationNames.size() + \"/\" + serviceNames.size());\n System.out.println(\"MaxSimult: \" + maxSimultaneousServers + \"/\" + maxSimultaneousApplications);\n System.out.println(\"MaxGen: \" + maxServerGeneration + \"/\" + maxApplicationGeneration);\n System.out.println(\"MaxSize: \" + maxServerSize + \"/\" + maxApplicationSize);\n stepNumber = stepCounter;\n }", "void run() throws IOException {\n\r\n\t\treader = new BufferedReader(new FileReader(\"input.txt\"));\r\n\r\n\t\tout = new PrintWriter(new FileWriter(\"output.txt\"));\r\n\t\ttokenizer = null;\r\n\t\tsolve();\r\n\t\treader.close();\r\n\t\tout.flush();\r\n\r\n\t}", "public static void test(String[] args) throws Exception {\n\t\tAbstractPILPDelegate.setDebugMode(null);\r\n\t\t\r\n\t\tComputeCostBasedOnFreq ins = new ComputeCostBasedOnFreq();\r\n\t\tins.initPreMapping(\"D:/data4code/replay/pre.csv\");\r\n\t\tins.getEventSeqForEachPatient(\"D:/data4code/cluster/LogBasedOnKmeansPlusPlus-14.csv\");\r\n\t\tins.removeOneLoop();\r\n\r\n\t\tPetrinetGraph net = null;\r\n\t\tMarking initialMarking = null;\r\n\t\tMarking[] finalMarkings = null; // only one marking is used so far\r\n\t\tXLog log = null;\r\n\t\tMap<Transition, Integer> costMOS = null; // movements on system\r\n\t\tMap<XEventClass, Integer> costMOT = null; // movements on trace\r\n\t\tTransEvClassMapping mapping = null;\r\n\r\n\t\tnet = constructNet(\"D:/data4code/mm.pnml\");\r\n\t\tinitialMarking = getInitialMarking(net);\r\n\t\tfinalMarkings = getFinalMarkings(net);\r\n\t\tXParserRegistry temp=XParserRegistry.instance();\r\n\t\ttemp.setCurrentDefault(new XesXmlParser());\r\n\t\tlog = temp.currentDefault().parse(new File(\"D:/data4code/mm.xes\")).get(0);\r\n//\t\tlog = XParserRegistry.instance().currentDefault().parse(new File(\"d:/temp/BPI2013all90.xes.gz\")).get(0);\r\n\t\t//\t\t\tlog = XParserRegistry.instance().currentDefault().parse(new File(\"d:/temp/BPI 730858110.xes.gz\")).get(0);\r\n\t\t//\t\t\tlog = XFactoryRegistry.instance().currentDefault().openLog();\r\n\t\tcostMOS = constructMOSCostFunction(net);\r\n\t\tXEventClass dummyEvClass = new XEventClass(\"DUMMY\", 99999);\r\n\t\tXEventClassifier eventClassifier = XLogInfoImpl.STANDARD_CLASSIFIER;\r\n\t\tcostMOT = constructMOTCostFunction(net, log, eventClassifier, dummyEvClass);\r\n\t\tmapping = constructMapping(net, log, dummyEvClass, eventClassifier);\r\n\r\n\t\tint cost1 = AlignmentTest.computeCost(costMOS, costMOT, initialMarking, finalMarkings, null, net, log,\r\n\t\t\t\tmapping, false);\r\n\t\tSystem.out.println(cost1);\r\n\t\t\r\n//\t\tint iteration = 0;\r\n//\t\twhile (true) {\r\n//\t\t\tSystem.out.println(\"start: \" + iteration);\r\n//\t\t\tlong start = System.currentTimeMillis();\r\n//\t\t\tint cost1 = AlignmentTest.computeCost(costMOS, costMOT, initialMarking, finalMarkings, null, net, log,\r\n//\t\t\t\t\tmapping, false);\r\n//\t\t\tlong mid = System.currentTimeMillis();\r\n//\t\t\tSystem.out.println(\" With ILP cost: \" + cost1 + \" t: \" + (mid - start));\r\n//\r\n//\t\t\tlong mid2 = System.currentTimeMillis();\r\n//\t\t\tint cost2 = AlignmentTest.computeCost(costMOS, costMOT, initialMarking, finalMarkings, null, net, log,\r\n//\t\t\t\t\tmapping, false);\r\n//\t\t\tlong end = System.currentTimeMillis();\r\n//\r\n//\t\t\tSystem.out.println(\" No ILP cost: \" + cost2 + \" t: \" + (end - mid2));\r\n//\t\t\tif (cost1 != cost2) {\r\n//\t\t\t\tSystem.err.println(\"ERROR\");\r\n//\t\t\t}\r\n//\t\t\t//System.gc();\r\n//\t\t\tSystem.out.flush();\r\n//\t\t\titeration++;\r\n//\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tlong startTime = System.nanoTime();\r\n\r\n\t\tFile sudFile = new File(args[0]);\r\n\r\n\t\t// parse the file and get the sudoku in a matrix\r\n\t\tNode[][] puzzle = parseFile(sudFile);\r\n\r\n\t\t// solve the puzzle with recursive backtracking\r\n\t\t// solved = solveWithoutMRV(puzzle, 0, 0);\r\n\r\n\t\t// solve the puzzle with recursive backtracking AND MRV\r\n\t\tsolved = solveWithMRV(puzzle, 0, 0);\r\n\r\n\t\t// print completed puzzle\r\n\t\tif (solved == true) {\r\n\t\t\tprintArray(puzzle);\r\n\t\t}\r\n\r\n\t\t// capture and print the runtime length in milliseconds\r\n\t\tlong endTime = System.nanoTime();\r\n\t\tlong duration = (endTime - startTime) / 1000000;\r\n\t\tSystem.out.println(\"Program finished in: \" + duration + \" milliseconds.\\n\");\r\n\t}", "public static void main(String[] args) throws IOException {\n if (args.length != 1) {\n System.out.println(\"Usage: FuzzySearchMain <entities file>\");\n System.exit(1);\n }\n String fileName = args[0];\n\n System.out.print(\"Reading strings and building index...\");\n\n // Build q-gram index.\n QGramIndex qgi = new QGramIndex(3);\n qgi.buildFromFile(fileName);\n\n System.out.print(\" done.\\n\");\n Scanner sc = new Scanner(System.in);\n ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();\n while (true) {\n System.out.println(\" \\n Please enter an input: \");\n String s = sc.nextLine();\n long time1 = System.nanoTime();\n s = QGramIndex.normalizeString(s);\n result = qgi.findMatches(s, s.length() / 4);\n result = qgi.sortResult(result);\n System.out.print(\"#PED = \" + qgi.noPED + \" \");\n System.out.println(\"#RES = \" + result.size());\n for (int i = 0; i < Math.min(5, result.size()); i++) {\n System.out.println(qgi.originalWords.get(result.get(i).get(0)) \n + \" \" + result.get(i).get(1) + \" \"\n + result.get(i).get(2));\n }\n long time2 = System.nanoTime();\n long timediff = (time2 - time1) / 1000000;\n System.out.println(\"Time taken is: \" + timediff + \"ms\");\n }\n }", "public static void main(String arg[]) throws IOException, InterruptedException {\n\n\t\tString fileName = new File(arg[0]).getName();\n\t final String path = \"C:\\\\Users\\\\alessandro\\\\Desktop\\\\Test\\\\\"+fileName+\".txt\";\n\n\t File file = new File(path);\n\t \n\t \n\t double archi, nodi,densitÓ;\n\n\t\tImmutableGraph graph1 = ArcListASCIIGraph.loadOffline(arg[0]);\n\t\t\t\n\t\t\tif(file.exists()){\n\t\t\tSystem.out.println(\"dentro if\");\n\t\t\t\tBufferedWriter bw = null;\n\t\t\t\t\tFileWriter fw = null;\n\t\t\t\t\tfw = new FileWriter(file.getAbsoluteFile(), true);\n\t\t\t\t\tbw = new BufferedWriter(fw);\n//\t\t\t\t\t dispersionCentrality disp = new dispersionCentrality();\n//\t\t\t\t\t Date primaDisp = new Date();\n//\t\t\t\t\t\tbw.write(\"Dispersion Index:\" +disp.dispersionCentrality(graph1)+\" tempo di esecuzione: \");\n//\t\t\t\t\t\tDate dopoDisp = new Date();\n//\t\t\t\t\t\tbw.write(dopoDisp.getTime()-primaDisp.getTime()+\" ms \\r\\n\");\n//\t\t\t\t\t\n//\t\t\t\t\t embeddednessIndex embe = new embeddednessIndex();\t\n//\n//\t\t\t\t\t Date primaEmb = new Date();\n//\t\t\t\t\t\tbw.write(\"Embeddedness Index: \"+embe.computeEmbeddedness(graph1)+\" tempo di esecuzione: \");\n//\t\t\t\t\t\tDate dopoEmb = new Date();\n//\t\t\t\t\t\tbw.write(dopoEmb.getTime()-primaEmb.getTime()+\" ms \\r\\n\");\n\t\t\t\t\t\n//\t\t\t\t\tdegreeCentrality degree = new degreeCentrality();\n//\t\t\t\t\tDate primaDegree = new Date();\n//\t\t\t\t\tbw.write(\"Index Degree centrality node: \"+degree.computeNodeDegree(graph1)+\" tempo dis esecuzione: \");\n//\t\t\t\t\tDate dopoDegree = new Date();\n//\t\t\t\t\tbw.write(dopoDegree.getTime()-primaDegree.getTime()+\" ms \\r\\n\");\n//\t\t\t\t\n//\t\t\t\t\tcenter cent = new center();\n//\t\t\t\t\tDate primaCenter = new Date();\n//\t\t\t\t\tbw.write(\"Center of Graph: \"+ cent.getcenter(graph1)+\" tempo di esecuzione: \");\n//\t\t\t\t\tDate dopoCenter = new Date();\n//\t\t\t\t\tbw.write(dopoCenter.getTime()-primaCenter.getTime()+\" ms \\r\\n\");\n//\t\t\t\t\tSystem.out.println(\"DONE\");\n//\t\t\t\t\tbw.close();\n\t\t\t\t\t\n\t\t\t\t\t deleteDuplicate delete = new deleteDuplicate();\n\t\t\t\t\t delete.stripDuplicatesFromFile(arg[0]);\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\tarchi=graph1.numArcs();\n\t\t\tnodi =graph1.numNodes();\n\t\t\tdensitÓ = archi/(nodi*(nodi-1));\n\t\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tfr = new FileReader(arg[0]);\n\t\tbr = new BufferedReader(fr);\n\t\t\n\t\tString sCurrentLine;\n\t\tString app;\n\n\t\tbr = new BufferedReader(new FileReader(arg[0]));\n\t\tint countLine = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\tcountLine = countLine + 1;\n\t\t\tapp = sCurrentLine.replaceAll(\"[^0-9]+\", \" \");\n\t\tfor (String s : Arrays.asList(app.trim().split(\" \")))\n\t\t\t\tListanodi.add(Integer.valueOf(s));\n\n\t\t}\n\t\tif (br != null)\n\t\t\tbr.close();\n\n\t\tif (fr != null)\n\t\t\tfr.close();\n\t\tDirectedGraph<String, DefaultEdge> graph = createStringGraph(Listanodi);\n\t\tConnectivityInspector<String, DefaultEdge> inspector = new ConnectivityInspector<String, DefaultEdge>(\n\t\t\t\tgraph);\n\t\t\t\t\n\t\tKosarajuStrongConnectivityInspector<String,DefaultEdge>finder = new KosarajuStrongConnectivityInspector<String,DefaultEdge>( graph);\n\t\t\n\t\t\n\t\tBridge bridge= new Bridge();\n\t\tList<String> weaklyBridge =bridge.numberOfWeaklyBridge(graph, Listanodi, inspector.connectedSets().size());\n\t\tList<String> strongBridge =bridge.numberStrongBridge(graph, Listanodi, finder.stronglyConnectedSets().size());\n\t\t\n\t\tarticulationPoint artPoint = new articulationPoint();\n\t\tList<String> weaklyArtPoit = artPoint.numberOfWeaklyArticulationPoint(graph, Listanodi, inspector.connectedSets().size());\n\t\tList<String> strengthArtPoint = artPoint.numberOfStrongArticulationPoint(graph, Listanodi, finder.stronglyConnectedSets().size());\n\t\t\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\n\t\tcomponentiConnesse componenti = new componentiConnesse();\n\t\t\n\t\t\n\t\t double sum=0,average;\n\t\t List<Integer> temp = new ArrayList<Integer>();\n\t\t for(int i = 0; i<nodi ;i++){\n\t\t\ttemp.add(graph1.outdegree(i));\n\t\t\tsum= sum+graph1.outdegree(i); \n\t\t }\n\t\t average = sum/nodi;\n\t\t\n\t\t \n\t\t\n\t\t List<Double> ListOfneighbourdhood = new ArrayList<Double>();\n\t\t neighbourhood prova = new neighbourhood();\n\t\t ListOfneighbourdhood = prova.computeNeighbour(graph1, 10);\n\t\t\n\t\tcenter cent = new center();\n\t\t \n\t\t diameter d = new diameter();\n\t\t double diameter = d.effectiveDiamete(0.9, ListOfneighbourdhood);\n\t\t\n\t\t NeighbourhoodFunction n = new NeighbourhoodFunction();\n\t\tlong [] x = n.computeExact(graph1, 0, new ProgressLogger());\n\t\n\t\tdouble diametro =n.effectiveDiameter(0.9, n.compute(graph1,0,new ProgressLogger()));\n\t\t\n\t\tcloseness closeness = new closeness();\n\t\tbetweenness between = new betweenness();\n\t\tdegreeCentrality degree = new degreeCentrality();\n\t\tpageRankCentrality page = new pageRankCentrality();\n\t\t clusteringIndex cluster = new clusteringIndex();\n\t\t embeddednessIndex embe = new embeddednessIndex();\t\n\t\t dispersionCentrality disp = new dispersionCentrality();\t\t\n\n\t\t\n\t\ttry {\n\n\n\t\t\tfw = new FileWriter(path);\n\t\t\t\n\t\t\t\t\t\t\n\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\n\t\t\t\n\t\t\tbw.write(\"Numero nodi: \"+nodi+\"\\r\\n\");\n\t\t\tbw.write(\"Numero archi: \"+archi+\"\\r\\n\");\n\t\t\tbw.write(\"Dimensione grafo: \"+ archi+\"\\r\\n\");\n\t\t\tbw.write(\"DensitÓ: \"+densitÓ+\"\\r\\n\");\n\t\t\tbw.write(\"Numero Componenti Connesse di un grafo: \"+componenti.computeWeakConnectedComponents(graph1)+\"\\r\\n\");\n\t\t\tbw.write(\"Numero Componenti Fortemente Connesse: \"+ componenti.computeStrongConnectedComponents(graph1)+\"\\r\\n\");\n\t\t\t\n\t\t\t bw.write(\"Numero Medio Grado Nodo: \"+ average+\"\\r\\n\");\n\t\t\t bw.write(\"Massimo: \"+ Collections.max(temp)+\"\\r\\n\");\n\t\t\t bw.write(\"Minimo:\"+ Collections.min(temp)+\"\\r\\n\");\n\t\t\t\n\t\t\t ParallelBreadthFirstVisit grafo = new ParallelBreadthFirstVisit(graph1, 0,false,null);\n\t\t\t for (int i=0 ; i< nodi ; i++){\n\t\t\t\t bw.write(\"Nodi visitati: \"+grafo.visit(i)+\"\\r\\n\");\n\n\t\t\t }\n\t\t\t \n\t\t\t bw.write(\"Lista vicinanza: \"+ListOfneighbourdhood+\"\\r\\n\");\n\t\t\t Date primaCenter = new Date();\n\t\t\t\tbw.write(\"Center of Graph: \"+ cent.getcenter(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoCenter = new Date();\n\t\t\t\tbw.write(dopoCenter.getTime()-primaCenter.getTime()+\" ms \\r\\n\");\n\t\t\t bw.write(\"effective diameter: \"+ diameter+\"\\r\\n\");\n\t\t\t\tfor ( int i=0 ; i< x.length;i++)\n\t\t\t\t\t bw.write(\"visitati i nodi x[\"+i+\"]: \"+x[i]+\"\\r\\n\" );\n\t\t\t bw.write(\"Diametro: \"+diametro+\"\\r\\n\");\n\t\t\t Date primaWBridge = new Date();\n\t\t\t bw.write(\"WeakBridge: \"+weaklyBridge+\" tempo di esecuzione: \");\n\t\t\t Date dopoWBridge = new Date();\n\t\t\t \n\t\t\tbw.write(dopoWBridge.getTime()-primaWBridge.getTime()+\" ms \\r\\n\");\n\t\t\t\n\t\t\tDate primaSBridge = new Date();\n\t\t\t bw.write(\"StrengtBridge: \"+strongBridge+\" tempo di esecuzione: \");\n\t\t\t Date dopoSBridge = new Date();\n\t\t\t\tbw.write(dopoSBridge.getTime()-primaSBridge.getTime()+\" ms \\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaWArt = new Date();\n\t\t\t bw.write(\"Weak ArticulationPoint: \"+weaklyArtPoit+\" tempo di esecuzione: \");\n\t\t\t Date dopoWArt = new Date();\n\t\t\t\tbw.write(dopoWArt.getTime()-primaWArt.getTime()+\" ms \\r\\n\");\n\n\t\t\t\tDate primaSArt = new Date();\n\t\t\t bw.write(\"Strengt ArticulationPoint: \"+strengthArtPoint+\" tempo di esecuzione: \");\n\t\t\t Date dopoSArt = new Date();\n\t\t\t\tbw.write(dopoSArt.getTime()-primaSArt.getTime()+\" ms \\r\\n\");\n\n\t\t\t \n\t\t\t bw.write(\"\\r\\n\\r\\n\\r\\n Indici di centralitÓ:\\r\\n\");\n\t\t\t\tDate primaCloseness = new Date();\n\t\t\t\tbw.write(\"Set Of Closeness: \"+closeness.computeCloseness(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoCloseness = new Date();\n\t\t\t\tbw.write(dopoCloseness.getTime()-primaCloseness.getTime()+\"ms \\r\\n\");\n\t\t\t\tDate primaBetweenness = new Date();\n\t\t\t\tbw.write(\"List of Betweenness: \"+ between.computeBetweenness(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoBetweenness = new Date();\n\t\t\t\tbw.write(dopoBetweenness.getTime()-primaBetweenness.getTime()+\"ms \\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaNBetweenness = new Date();\n\t\t\t\t\n\t\t\t\tbw.write(\"List of Normalized Betweenness: \"+between.normalize(between.computeBetweenness(graph1),nodi)+\" tempodiesecuzione: \");\n\t\t\t\tDate dopoNBetweenness= new Date();\n\t\t\t\tbw.write(dopoNBetweenness.getTime()-primaNBetweenness.getTime()+\"ms \\r\\n\");\n\n\t\t\t\tDate primaDegree = new Date();\n\t\t\t\tbw.write(\"Index of degree:\"+degree.computeDegreeCentrality(graph1)+\"\\r\\n\");\n\t\t\t\tDate dopoDegree = new Date();\n\t\t\t\tbw.write(dopoDegree.getTime()-primaDegree.getTime()+\"ms \\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaSDegree = new Date();\n\t\t\t\tbw.write(\"Index Degree centrality node: \"+degree.computeNodeDegree(graph1)+\" tempo dis esecuzione: \");\n\t\t\t\tDate dopoSDegree = new Date();\n\t\t\t\tbw.write(dopoSDegree.getTime()-primaSDegree.getTime()+\" ms \\r\\n\");\n\n\t\t\t\tDate primaPage = new Date();\n\t\t\t\tbw.write(\"Indice di Autovettore:\"+page.getPageRankIntex(page.computePageRankCentrality(graph1))+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoPage = new Date();\n\t\t\t\tbw.write(dopoPage.getTime()-primaPage.getTime()+\"ms \\r\\n\");\n\n\t\t\t\tfor(int i=0 ; i<graph1.numNodes();i++)\n\t\t\t\tbw.write(\"Per il nodo:\"+i+\" il valore di Clustering Ŕ pari a :\"+cluster.clusterCoefficent(graph1, i)+\"\\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaCluster =new Date();\n\t\t\t\tbw.write(\"L'Indice di Clustering Ŕ pari a: \"+cluster.clusterIndex(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoCluster = new Date();\n\t\t\t\tbw.write(dopoCluster.getTime()-primaCluster.getTime()+\" ms \\r\\n\");\n\n\t\t\t\tDate primaEmb = new Date();\n\t\t\t\tbw.write(\"Embeddedness Index: \"+embe.computeEmbeddedness(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoEmb = new Date();\n\t\t\t\tbw.write(dopoEmb.getTime()-primaEmb.getTime()+\" ms \\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaDisp = new Date();\n\t\t\t\tbw.write(\"Dispersion Index:\" +disp.dispersionCentrality(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoDisp = new Date();\n\t\t\t\tbw.write(dopoDisp.getTime()-primaDisp.getTime()+\" ms \\r\\n\");\n\n\t\t\t\tSystem.out.println(\"Done\");\n\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\n\t\t\ttry {\n\n\t\t\t\tif (bw != null)\n\t\t\t\t\tbw.close();\n\n\t\t\t\tif (fw != null)\n\t\t\t\t\tfw.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n TextAnalyzerService tas = new TextAnalyzerService();\n ResultObject resultObject;\n List<String> resultList = new ArrayList<>();\n String path = \"1.txt\";\n boolean isBracketsOk = false;\n\n try {\n isBracketsOk = tas.parsing(path).equals(\"correct\") ? true : false;\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n try {\n resultList = tas.readFile(path);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n resultObject = new ResultObject(path, resultList, isBracketsOk);\n //System.out.println(resultObject.toString());\n\n for(String x : resultObject.getListOfString()){\n System.out.println(x);\n }\n }", "private static void parseOneFile(File logFile) throws FileNotFoundException, IOException, Exception\n\t{\n\t\t\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(new FileInputStream(logFile), \"UTF-8\"));\n\t\tString line = null;\n\t\tint lineNum = 0;\n\t\twhile ((line = bf.readLine()) != null)\n\t\t{\n\t\t\t// 数据入库日志\n\t\t\tif (line.indexOf(ParserSqlldrLog.flag) > 0)\n\t\t\t{\n\t\t\t\tParserSqlldrLog sl = new ParserSqlldrLog();\n\t\t\t\tif (sl.parseLog(line))\n\t\t\t\t{\n\t\t\t\t\tParserSqlldrLog preSl = getSqlldrLog(sl.getSrcFile().getPath(), sl.getDataFile().getPath());\n\t\t\t\t\tif (preSl != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpreSl.merge(sl);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tsqlldrLogs.add(sl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 文件转换日志\n\t\t\telse if (line.indexOf(ParserMiddleLog.flag) > 0)\n\t\t\t{\n\t\t\t\tParserMiddleLog pml = new ParserMiddleLog();\n\t\t\t\tif (pml.parseLog(line))\n\t\t\t\t{\n\t\t\t\t\tParserMiddleLog prePml = getParserMiddleLogByFilePath(pml.getSrcFile().getPath(),\n\t\t\t\t\t\t\tpml.getHandleName());\n\t\t\t\t\tif (prePml != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tprePml.merge(pml);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tparserMiddleLogs.add(pml);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 文件解析入库根日志\n\t\t\telse if (line.indexOf(ParserMainLog.flag) > 0)\n\t\t\t{\n\t\t\t\tParserMainLog pl = new ParserMainLog();\n\t\t\t\tif (pl.parseLog(line))\n\t\t\t\t{\n\t\t\t\t\tParserMainLog prePl = getParserLogByFilePath(pl.getSrcFile().getPath());\n\t\t\t\t\tif (prePl != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tprePl.merge(pl);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tparserLogs.add(pl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (++lineNum % 10000 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"已解析\" + lineNum + \"行\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"该文件共解析\" + lineNum + \"行\");\n\n\t\tbf.close();\n\t}", "public static void main(String[] args)\n {\t\t\n\t\t\tFastTimer timer = new FastTimer();\n\t\t\n\t\t\n\t\t\tGameGrid loaded_grid = new GameGrid(7,7);\n\t\t\t\tboolean isSuccess = loaded_grid.LoadFromFile(\"test.puzzle\");\n\t\t\tif(isSuccess == true){\n\t\t\t\tSystem.out.print(\"Solution initiale\\n\");\n\t\t\t\tloaded_grid.PrintToCmd();\t\t\t\n\t\t\t}\n\t\t\tList<GameMove> found_moves = loaded_grid.GetAvailableMove(); \n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"\\n\\nInitial possible moves\\n\");\n\t\t\tfor(GameMove current_move :found_moves){\n\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tList<GameMove> solution_move = new LinkedList();\n\t\t\tloaded_grid.ResetMonitoring();\n\t\t\t\n\t\t\ttimer.StartTime();\n\t\t\t\tboolean result = loaded_grid.FindSolution(solution_move);\n\t\t\ttimer.StopTime();\n\t\t\t\n\t\t\tSystem.out.println(\"\\n**************************\");\n\t\t\tSystem.out.println(\"File name : \" + loaded_grid.loaded_file_name+\"\\n\");\n\t\t\tif(result == false){\n\t\t\t\tSystem.out.println(\"Pas de solution\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Solution in \" +solution_move.size() +\" moves\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\tTime : \"+timer.LastDelta + \" millsec\");\n\t\t\tSystem.out.println(\"\tNode visited :\"+loaded_grid.node_visited_cpt);\n\t\t\tSystem.out.println(\"\tDept require :\"+loaded_grid.max_dept);\n\t\t\tSystem.out.println(\"\tDept limitation :\"+loaded_grid.dept_limit);\n\t\t\t\n\t\t\tif(solution_move.size() > 0){\n\t\t\t\tSystem.out.println(\"\\nMove from last to first\\n\");\n\t\t\t\tfor(GameMove current_move :solution_move){\n\t\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\\n**************************\\n\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.print(\"Final grid\\n\");\n\t\t\tloaded_grid.PrintToCmd();\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tString folder = \"/Users/haopeng/Dropbox/research/2nd/Usecase/Yanlei/\";\n\t\tString fileName = \"P0_2324.txt\";\n\t\t\n\t\tFileReader reader = new FileReader(folder + fileName, 20000000);\n\t\treader.parseFile();\n\t\t\n\t\t//reader.printValues(reader.getServerName(), \"ServerName\");\n\t\t//reader.printValues(reader.getCommand(), \"Command\");\n\t\t//reader.printValues(reader.getTimestamp(), \"Timestamp\"); \n\t\t//reader.printValues(reader.getPath(), \"Path\");\n\t\treader.printValues(reader.getMethod(), \"Method\");\n\t}", "public static void main(String[] args) throws IOException {\n\t\tMain t = new Main();\n\t\tSystem.out.println(\"The model is trained: \");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tSystem.out.println(\"Check validation in example of \\\"AB\\\":\");\n\t\tt.checkValid(\"AB\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"============= unsmoothed models =============================================================================\");\n\t\tSystem.out.print(\"Unigram: \");\n\t\tSystem.out.println(t.uni);\n\t\tSystem.out.print(\"Bigram: \");\n\t\tSystem.out.println(t.bi);\n\t\tSystem.out.print(\"Trigram: \");\n\t\tSystem.out.println(t.tri);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"============= add-one smoothed models ========================================================================\");\n\t\tSystem.out.println(\"Note: this is only one of smoothed models , not the tuning process. Because there would be too many console lines.\");\n\t\tSystem.out.println(\"Here I take add-k = 0.7 as an example.\");\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tdouble k = 0.7;\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tSystem.out.println(\"Then I take the classic add-k = 1.0 as an example.\");\n\t\tSystem.out.println(\"*************************************************************************************************************\");\n\t\tk = 1.0;\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, k, null, null);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"===== linear interpolation smoothed models ===================================================================\");\n\t\tdouble[] lambdas_tri = new double[] {1.0 / 3, 1.0 / 3, 1.0 / 3};\n\t\tdouble[] lambdas_bi = new double[] {1.0 / 2, 1.0 / 2};\n\t\tSystem.out.println(\"First is equally weighted lambdas: \" + Arrays.toString(lambdas_tri) + \" and \" + Arrays.toString(lambdas_bi));\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tSystem.out.println(\"**************************************************************************************************************\");\n\t\tlambdas_tri = new double[] {0.5, 0.3, 0.2};\n\t\tlambdas_bi = new double[] {0.7, 0.3};\n\t\tSystem.out.println(\"Then is tuned-weighted lambdas: \" + Arrays.toString(lambdas_tri) + \" and \" + Arrays.toString(lambdas_bi));\n\t\tSystem.out.println(\"Again, this is not all the tuning process. Here is only one set of lambdas.\");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(esTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tt.training(deTrainingDir, 0.7);\n\t\tt.calculateScore(testDir, 0, lambdas_bi, lambdas_tri);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"=================== Generating texts ==========================================================================\");\n\t\tSystem.out.println(\"To save console space, here I generate A to E, five sentences. Feel free to adjust parameters in code.\");\n\t\tSystem.out.println(\"***************************************************************************************************************\");\n\t\tt.training(enTrainingDir, 0.7);\n\t\tSystem.out.println(\"**************** Bi-gram generating ***************************************************************************\");\n\t\tfor (char c = 'A'; c <= 'E'; c++) {\n\t\t\tt.generateWithBigramModel(String.valueOf(c));\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Not that good huh?\");\n\t\tSystem.out.println(\"**************** Tri-gram generating *************************************************************************\");\n\t\tfor (char c = 'A'; c <= 'E'; c++) {\n\t\t\tt.generateWithBigramModel(String.valueOf(c));\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"...Seems not good as well.\");\n\t}", "public static void main(String[] args) throws Exception\n\t{\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"input6.txt\"));\n\t\tSystem.setOut(new PrintStream(new File(\"output.txt\")));\n\n\t\tsolve(br);\n\t}", "public void testParseLoggingWithApplicationTime() {\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset3.txt\");\n GcManager gcManager = new GcManager();\n gcManager.store(testFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"Max young space not calculated correctly.\", 1100288, jvmRun.getMaxYoungSpace());\n Assert.assertEquals(\"Max old space not calculated correctly.\", 1100288, jvmRun.getMaxOldSpace());\n Assert.assertEquals(\"NewRatio not calculated correctly.\", 1, jvmRun.getNewRatio());\n Assert.assertEquals(\"Event count not correct.\", 3, jvmRun.getEventTypes().size());\n Assert.assertFalse(JdkUtil.LogEventType.UNKNOWN.toString() + \" collector identified.\",\n jvmRun.getEventTypes().contains(LogEventType.UNKNOWN));\n Assert.assertEquals(\"Should not be any unidentified log lines.\", 0, jvmRun.getUnidentifiedLogLines().size());\n Assert.assertTrue(\"Log line not recognized as \" + JdkUtil.LogEventType.PAR_NEW.toString() + \".\",\n jvmRun.getEventTypes().contains(JdkUtil.LogEventType.PAR_NEW));\n Assert.assertTrue(\n \"Log line not recognized as \" + JdkUtil.LogEventType.APPLICATION_STOPPED_TIME.toString() + \".\",\n jvmRun.getEventTypes().contains(JdkUtil.LogEventType.APPLICATION_STOPPED_TIME));\n Assert.assertTrue(Analysis.INFO_NEW_RATIO_INVERTED + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.INFO_NEW_RATIO_INVERTED));\n }", "public static void main(String[] args) {\n\t\tString solutionFile = \"dataset/vlc/task1_solution.en.clusterMle.txt\";\n//\t\tString queryFile = \"dataset/vlc/task1_query.en.f8.n5.txt\";\n//\t\tString targetFile = \"dataset/vlc/task1_target.en.f8.n5.txt\";\n//\t\tString linkFile = \"dataset/vlc/sim_0p_100n.csv\";\n\t\t\n\t\tString malletFile = \"dataset/vlc/folds/all.0.4189.mallet\";\n\t\tString queryFile = \"dataset/vlc/folds/query.0.csv\";\n\t\tString targetFile = \"dataset/vlc/folds/target.0.csv\";\n\t\tString linkFile = \"dataset/vlc/folds/trainingPairs.0.csv\";\n\t\t\n\t\tdouble alpha = 0.01, beta = 0.01, lambda = 0.01;\n\t\t\n\t\tMalletMleCluster clusterMle = new MalletMleCluster(malletFile, linkFile, alpha);\n\t\tTask1Solution solver = new Task1Solution(clusterMle);\n//\t\tfor(alpha = 0.1; alpha<1; alpha += 0.2) {\n//\t\t\tfor(beta = 0.1; beta<1; beta += 0.2) {\n\t\t\t\tfor (lambda = 0.1; lambda<1; lambda += 0.05) {\n\t\t\tclusterMle.setSmoothParameters(alpha, beta, lambda);\n//\t\t\tclusterMle.retrieveTask1Solution(queryFile, solutionFile);\n\t\t\ttry {\n\t\t\t\tsolver.retrieveTask1Solution(queryFile, solutionFile);\n\t\t\t\tdouble precision = Task1Solution.evaluateResult(targetFile, solutionFile);\n\t\t\t\tSystem.out.println(\"alpha: \" + alpha + \"beta: \" + beta + \n\t\t\t\t\t\t\", Lambda: \" + lambda + \", Mle precision: \" + precision);\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\t\t}\n//\t\t\t}\n//\t\t}\n\t}", "protected void parse() throws ParseException {\n String s;\n try {\n s=getFullText();\n } catch (IOException ioe) {\n if (ioe instanceof FileNotFoundException) {\n throw new DataNotFoundException (\"Could not find log file.\", ioe);\n } else {\n throw new ParseException (\"Error getting log file text.\", new File (getFileName()));\n }\n }\n StringTokenizer sk = new StringTokenizer(s);\n ArrayList switches = new ArrayList(10);\n while (sk.hasMoreElements()) {\n String el =sk.nextToken().trim();\n if (el.startsWith(\"-J\")) {\n if (!(el.equals(\"-J-verbose:gc\"))) {\n if (!(el.startsWith(\"-J-D\"))) {\n JavaLineswitch curr = new JavaLineswitch(el.substring(2));\n addElement (curr); \n }\n }\n }\n }\n }", "private void parse() throws IOException {\n\n\t\tStats statsObject = new Stats();\n\n\t\tstatsObject.setProcessName(process);\n\n\t\tList<String> lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset());\n\n\t\tPattern timePattern = Pattern.compile(\"((\\\\d+)-)*(\\\\d+)\\\\W((\\\\d+):)*(\\\\d+)\\\\.(\\\\d+)\");\n\n\t\tSystem.out.println(filename+\" \"+lines.get(0));\n\t\tMatcher matcher = timePattern.matcher(lines.get(0));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setStartTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\n\t\tmatcher = timePattern.matcher(lines.get(lines.size() - 1));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setEndTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\t\tString error = new String();\n\t\tfor (String line : lines) {\n\n\t\t\tif (line.startsWith(\"[\")) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"Number of records processed: \")) {\n\n\t\t\t\t\tPattern numberPattern = Pattern.compile(\"\\\\d+\");\n\t\t\t\t\tmatcher = numberPattern.matcher(line);\n\t\t\t\t\t\n\t\t\t\t\tString numberOfRecordsProcessed = \"N/A\";\n\t\t\t\t\t\n\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\tnumberOfRecordsProcessed = matcher.group();\n\t\t\t\t\t}\n\t\t\t\t\tstatsObject.setRecordsProcessed(numberOfRecordsProcessed);\n\n\t\t\t\t}\n\n\t\t\t\telse if (line.contains(\"WARNING\")) {\n\t\t\t\t\tif (line.contains(\"MISSING Property\")) {\n\t\t\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\t\t\tstatsObject.addError(line);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstatsObject.incrementWarningCounter();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (line.contains(\"Exception\") || (line.contains(\"Error\"))) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\terror = error + line;\n\t\t\t} else {\n\t\t\t\terror = error + line ;\n\t\t\t}\n\n\t\t}\n\t\t// reader.close();\n\t\tif (statsObject.getErrorCounter() > 0) {\n\t\t\tstatsObject.setStatus(\"Failure\");\n\t\t}\n\n\t\tPattern pattern = Pattern.compile(\"\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\");\n\t\tmatcher = pattern.matcher(filename);\n\t\tString date = null;\n\t\twhile (matcher.find()) {\n\t\t\tdate = matcher.group(0);\n\t\t\tbreak;\n\t\t}\n\t\tboolean saveSuccessful = OutputManipulator.addToStatFile(username, process, date, statsObject);\n\n\t\tif (saveSuccessful) {\n\t\t\tFileParseScheduler.addSuccessfulParsedFileName(username, process, filename);\n\t\t}\n\n\t\tFileParseScheduler.removeLatestKilledThreads(process + filename);\n\t}", "public static void main(String[] args) throws Exception{\n\t\t\r\n\t\tSpecialFileHander handle=new SpecialFileHander();\r\n\t\tReadFileBuilder builder = new ReadFileBuilder(handle);\r\n\t\tfinal long startTime = System.currentTimeMillis();\r\n\t\tMultiThreadFileReader bigFileReader = builder.buildMultiThreadFileReader();\r\n\t\tbigFileReader.excute();\r\n\t\tfinal long useTime = System.currentTimeMillis()-startTime;\r\n\t\tSystem.out.println(\"整个文件解析入库耗时时间:\"+useTime);\r\n\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\ttry{\n\t\t\tMyLogger d = MyLogger.getInstance();\n \t\tif(args.length != 4) {\n \t\t\t\tSystem.err.println(\"Less than Required length input, please enter three parameters for logger level,input file,output file\\n\");\n \t\t\t\tSystem.exit(1);\n \t\t\t}\n \t\t\tif(Integer.parseInt(args[2])>3 ||Integer.parseInt(args[2])<0)\n \t\t\t{\n \t\t\t\tSystem.err.println(\"Invalid Value\");\n \t\t\t\tSystem.exit(1);\n \t\t\t}\n \t\t\td.set(Integer.parseInt(args[2]),args[1]);\n\t \t\n\t\t\tint N=Integer.parseInt(args[3]);\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tArrayList<Integer> l = new ArrayList<Integer>();\n\t\t\t\n\t\t\tString str = \"\";\n\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tfor(int i=0;i<N;i++){\n\t\t\t\tFileProcessor fp = new FileProcessor(args[0], args[1]);\n\t\t\t\tTreeInfo tst = new TreeInfo();\n\t\t\t\tPopulateTreeVisitorInterface ptv = new PopulateTreeVisitor(fp);\n\t\t\t\ttst.accept(ptv);\n\t\t\t\twordCountVisitorInterface wcv = new WordCountVisitor(fp);\n\t\t\t\ttst.accept(wcv);\n\t\t\t}\n\t\t\t\n\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\tlong totalTime = (endTime- startTime)/1000;\n\t\t\tSystem.out.println(\"Total Time Insertion : \" + totalTime);\n\t\t}\n\t\tcatch(NumberFormatException e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\t\n\t}", "public static void main(String[] args) throws Exception {\n CharStream input = CharStreams.fromFileName(\"T2-Ejercicios/T2-Ej2/Multiplo.txt\");\n FileOutputStream f = new FileOutputStream(\"T2-Ejercicios/T2-Ej2/MultiploOut.txt\");\n System.setOut(new PrintStream(f));\n // create a lexer that feeds off of input CharStream\n MultiploLexer lexer = new MultiploLexer(input);\n // create a buffer of tokens pulled from the lexer\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n // create a parser that feeds off the tokens buffer\n MultiploParser parser = new MultiploParser(tokens);\n parser.r();\n System.out.println(); // print a \\n after translation\n }", "public static void main(String[] args) throws Exception {\n\t\tlong startTime, stopTime;\n\t\tdouble t_searchCache, t_storeCache;\n//\t\tMap<SmallGraph, SmallGraph> cache = new HashMap<SmallGraph, SmallGraph>(); // the cache\n\t\t// the index on the ploytrees stored in the cache\n\t\tMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>> cacheIndex = new HashMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>>();\n\t\tMap<SmallGraph, Pair<Integer, SmallGraph>> polytree2query = new HashMap<SmallGraph, Pair<Integer, SmallGraph>>();\n\n\t\t// reading the original data graph\n\t\tGraph originalDataGraph = new Graph(args[0]);\n\t\tif(args.length == 6)\toriginalDataGraph.buildParentIndex(args[5]);\n\n\t\t// reading all popular data graphs\n\t\tFile dirG = new File(args[1]);\n\t\tif(!dirG.isDirectory())\n\t\t\tthrow new Exception(\"The specified path for the candidate data graphs is not a valid directory\");\n\t\tFile[] graphFiles = dirG.listFiles();\n\t\tint nPopularGraphs = graphFiles.length;\n\t\tGraph[] graphs = new Graph[nPopularGraphs];\n\t\tfor(int i=0; i < nPopularGraphs; i++)\n\t\t\tgraphs[i] = new Graph(graphFiles[i].getAbsolutePath());\n\t\t\n\t\t// statistical result file\n\t\tFile file = new File(args[2]);\n\t\t// if file does not exists, then create it\n\t\tif (!file.exists()) file.createNewFile();\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\t\t\t\n\t\tBufferedWriter bw = new BufferedWriter(fw);\t\n\n\t\tbw.write(\"queryNo\\t querySize\\t degree\\t sourceNo\\t isPolytree\\t nHitCandidates\\t t_searchCache\\t isHit\\t hitQueryNo\\t hitQuerySize\\t t_storeCache\\n\");\n\t\tStringBuilder fileContents = new StringBuilder();\n\t\t\n\t\tint nSourceOptions = nPopularGraphs + 1; // number of sources for creating query\n\t\tRandom randSource = new Random();\n\t\tint[] querySizes = {20,22,24,26,28,30,32,34,36,38}; // different available sizes for queries\n\t\tRandom randQuerySize = new Random();\n//\t\tRandom randDegree = new Random();\n\t\tRandom randCenter = new Random();\n\t\t\t\t\n\t\tint requestedQueries = Integer.parseInt(args[4]);\n\t\tfor(int queryNo=0; queryNo < requestedQueries; queryNo++) { // main loop\n\t\t\tSystem.out.print(\"Processing Q\" + queryNo + \":\\t\");\n\t\t\tSmallGraph q;\n\t\t\tint querySize = 25;\n\t\t\tint degree = 5;\n\t\t\tint sourceNo = randSource.nextInt(nSourceOptions);\n\t\t\t// q is created\n\t\t\tif(sourceNo == nSourceOptions - 1) { // from the original data graph\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\t//degree = randDegree.nextInt(querySize/DEGREE_RATIO);\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tint center = randCenter.nextInt(originalDataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(originalDataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} else {\t// from popular data graphs\n\t\t\t\tGraph dataGraph = graphs[sourceNo];\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tif(degree == 0) continue;\n\t\t\t\t\tint center = randCenter.nextInt(dataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(dataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} //if-else\n\t\t\t\n\t\t\tfileContents.append(queryNo + \"\\t\" + q.getNumVertices() + \"\\t\" + degree + \"\\t\" + sourceNo + \"\\t\");\n\t\t\tSystem.out.print(\"N\" + q.getNumVertices() + \"D\" + degree + \"S\" + sourceNo + \",\\t\");\n\t\t\t\n\t\t\tint queryStatus = q.isPolytree();\n\t\t\tswitch (queryStatus) {\n\t\t\t\tcase -1: System.out.println(\"The query Graph is disconnected\");\n\t\t\t\t\tfileContents.append(\"-1\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 0: System.out.print(\"! polytree, \");\n\t\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: System.out.print(\"a polytree, \");\n\t\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: System.out.println(\"Undefined status of the query graph\");\n\t\t\t\t\tfileContents.append(\"2\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// searching in the cache\n\t\t\tPair<Integer, SmallGraph> hitPair = null;\n\t\t\tstartTime = System.nanoTime();\n\t\t\tboolean notInCache = true;\n\t\t\tSet<SmallGraph> candidateMatchSet = CacheUtils.getCandidateMatchSet(q, cacheIndex);\n\t\t\tint nHitCandidates = candidateMatchSet.size();\n\t\t\tSystem.out.print(\"nHitCandidates=\" + nHitCandidates + \", \");\n\t\t\tfileContents.append(nHitCandidates + \"\\t\");\n\t\t\t\n\t\t\tfor(SmallGraph candidate : candidateMatchSet) {\n\t\t\t\tif(CacheUtils.isDualCoverMatch(q, candidate)) {\n\t\t\t\t\tnotInCache = false;\n\t\t\t\t\tSystem.out.print(\"Hit the cache!, \");\n\n\t\t\t\t\thitPair = polytree2query.get(candidate);\n\t\t\t\t\t// use the cache content to answer the query\n//\t\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\t\tSmallGraph inducedSubgraph = cache.get(candidate);\n//\t\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(inducedSubgraph, queryGraph);\n//\t\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\t\tSystem.out.println(\"The time for tight simulation from cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t\tbreak; // the first match would be enough \n\t\t\t\t} //if\n\t\t\t} //for\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_searchCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.print(\"search: \" + t_searchCache + \", \");\n\t\t\tfileContents.append(t_searchCache + \"\\t\");\n\t\t\t\n\t\t\tif(! notInCache) { // found in the cache\n\t\t\t\t// hit query\n\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\tint hitQueryNo = hitPair.getValue0();\n\t\t\t\tSmallGraph hitQuery = hitPair.getValue1();\n\t\t\t\thitQuery.print2File(args[3] + \"/Q\" + hitQueryNo + \"_N\" + hitQuery.getNumVertices() + \".txt\");\n\t\t\t\tfileContents.append(hitQueryNo + \"\\t\" + hitQuery.getNumVertices() + \"\\t\");\n\t\t\t}\n\n\t\t\tstartTime = System.nanoTime();\n\t\t\tif(notInCache) { // Not found in the cache\n\t\t\t\tSystem.out.print(\"Not the cache!, \");\n\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\tfileContents.append(\"-1\\t-1\\t\");\n//\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(dataGraph, queryGraph);\n//\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\tSystem.out.println(\"The time for tight simulation without cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t// store in the cache\n\t\t\t\t// The polytree of the queryGraph is created\n\t\t\t\tint center = q.getSelectedCenter();\n\t\t\t\tSmallGraph polytree = GraphUtils.getPolytree(q, center);\n\t\t\t\t// The dualSimSet of the polytree is found\n\t\t\t\t// The induced subgraph of the dualSimSet is found\n\t\t\t\t// The <polytree, inducedSubgraph> is stored in the cache\n//\t\t\t\tcache.put(polytree, inducedSubgraph);\n\t\t\t\tSet<Pair<Integer, Integer>> sig = polytree.getSignature(); \n\t\t\t\tif (cacheIndex.get(sig) == null) {\n\t\t\t\t\tSet<SmallGraph> pltSet = new HashSet<SmallGraph>();\n\t\t\t\t\tpltSet.add(polytree);\n\t\t\t\t\tcacheIndex.put(sig, pltSet);\n\t\t\t\t} else\n\t\t\t\t\tcacheIndex.get(sig).add(polytree);\n\t\t\t\t\n\t\t\t\tpolytree2query.put(polytree, new Pair<Integer, SmallGraph>(queryNo, q)); // save the queries filling the cache\n\t\t\t} //if\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_storeCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.println(\"store: \" + t_storeCache);\n\t\t\tfileContents.append(t_storeCache + \"\\n\");\t\t\t\n\t\t\t\n\t\t\tbw.write(fileContents.toString());\n\t\t\tfileContents.delete(0, fileContents.length());\n\t\t} //for\n\t\t\n\t\tbw.close();\n\t\t\n\t\tSystem.out.println(\"Number of signatures stored: \" + cacheIndex.size());\n\t\tSystem.out.println(\"Number of polytrees stored: \" + polytree2query.size());\n\t\tint maxSet = 0;\n\t\tfor(Set<SmallGraph> pt : cacheIndex.values()) {\n\t\t\tint theSize = pt.size();\n\t\t\tif(theSize > maxSet)\n\t\t\t\tmaxSet = theSize;\n\t\t} //for\n\t\tSystem.out.println(\"The maximum number of stored polytrees with the same signature: \" + maxSet);\n\t}", "static void parseIt() {\n try {\n long start = System.nanoTime();\n int[] modes = {DET_MODE, SUM_MODE, DOUBLES_MODE};\n String[] filePaths = {\"\\\\catalogue_products.xml\", \"\\\\products_to_categories.xml\", \"\\\\doubles.xml\"};\n HashMap<String, String[]> update = buildUpdateMap(remainderFile);\n window.putLog(\"-------------------------------------\\n\" + updateNodes(offerNodes, update) +\n \"\\nФайлы для загрузки:\");\n for (int i = 0; i < filePaths.length; i++) {\n // Define location for output file\n File outputFile = new File(workingDirectory.getParent() + filePaths[i]);\n pushDocumentToFile(outputFile, modes[i]);\n printFileInfo(outputFile);\n }\n window.putLog(\"-------------------------------------\\nВсего обработано уникальных записей: \" +\n offerNodes.size());\n long time = (System.nanoTime() - start) / 1000000;\n window.putLog(\"Завершено без ошибок за \" + time + \" мс.\");\n offerNodes = null;\n //window.workshop.setParseButtonDisabled();\n } catch (TransformerException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \" (\" + e.getException() + \")\\n\\t\" + e.getMessageAndLocation()));\n } catch (ParserConfigurationException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getLocalizedMessage()));\n } catch (SAXException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(\"SAXexception: \" + e.getMessage()));\n\n } catch (IOException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getMessage() + \". \" + e.getStackTrace()[0]));\n }\n }", "public static void main(String[] args) throws FileNotFoundException{ \n File file = new File(\"/Users/admin/NetBeansProjects/AlgoDataA3/src/algodataa3e3/output_interpret.txt\");\n Scanner input = new Scanner(file); \n \n SeparateChainingHash_A3E3<String, Integer> st = new SeparateChainingHash_A3E3<>(INTERVAL);\n //141491 words\n //9944 uniqe (with toLowerCase)\n \n //read file word by word and store in array\n while (input.hasNext()) {\n String key = input.next().toLowerCase();\n st.put(key, 1);\n }\n \n for(int i = 0; i < INTERVAL; i++){\n \n System.out.println(\"In hash #\" + (i+1) + \" there are \" + st.sizeOfList(i) + \" nodes\");\n }\n }", "private void parse() throws IOException {\r\n\t\tClassLoader cl = getClass().getClassLoader();\r\n\t\tFile file = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t\tFile file2 = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t FileReader fr = new FileReader(file);\r\n\t FileReader fr2 = new FileReader(file2);\r\n\t\tin=new BufferedReader(fr);\r\n\t\tin2=new BufferedReader(fr2);\r\n\t\tString line;\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) parseTerm();\r\n\t\t}\r\n\t\tin.close();\r\n\t\tfr.close();\r\n\t\t\r\n\t\t//terms.printTerms();\r\n\t\tbuffer=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) createEdges();\r\n\t\t}\r\n\t\tin2.close();\r\n\t\tfr2.close();\r\n\t\tLOGGER.info(\"Finished Building DAGs!\");\r\n\t\t\r\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException, InterruptedException {\n ArrayList<Metric> metrics = new ArrayList<Metric>();\n metrics.add(new ELOC());\n metrics.add(new NOPA());\n metrics.add(new NMNOPARAM());\n MyClassifier c1 = new MyClassifier(\"Logistic Regression\");\n c1.setClassifier(new Logistic());\n String type = \"CodeSmellDetection\";\n String smell = \"Large Class\";\n Model model = new Model(\"antModel1\", \"ant\", \"https://github.com/apache/ant.git\", metrics, c1, \"\", type, smell);\n Process process = new Process();\n String periodLength = \"All\";\n String version = \"rel/1.8.3\";\n \n String projectName = model.getProjName();\n process.initGitRepositoryFromFile(scatteringFolderPath + \"/\" + projectName\n + \"/gitRepository.data\");\n try {\n DeveloperTreeManager.calculateDeveloperTrees(process.getGitRepository()\n .getCommits(), periodLength);\n DeveloperFITreeManager.calculateDeveloperTrees(process.getGitRepository()\n .getCommits(), periodLength);\n } catch (Exception ex) {\n Logger.getLogger(TestFile.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n List<Commit> commits = process.getGitRepository().getCommits();\n PeriodManager.calculatePeriods(commits, periodLength);\n List<Period> periods = PeriodManager.getList();\n \n String dirPath = Config.baseDir + projectName + \"/models/\" + model.getName();\n Files.createDirectories(Paths.get(dirPath));\n \n for (Period p : periods) {\n File periodData = new File(dirPath + \"/predictors.csv\");\n PrintWriter pw1 = new PrintWriter(periodData);\n \n String message1 = \"nome,\";\n for(Metric m : metrics) {\n message1 += m.getNome() + \",\";\n }\n message1 += \"isSmell\\n\";\n pw1.write(message1);\n \n //String baseSmellPatch = \"C:/ProgettoTirocinio/dataset/apache-ant-data/apache_1.8.3/Validated\";\n CalculateSmellFiles cs = new CalculateSmellFiles(model.getProjName(), \"Large Class\", \"1.8.1\");\n \n List<FileBean> smellClasses = cs.getSmellClasses();\n \n String projectPath = baseFolderPath + projectName;\n \n Git.gitReset(new File(projectPath));\n Git.clean(new File(projectPath));\n \n List<FileBean> repoFiles = Git.gitList(new File(projectPath), version);\n System.out.println(\"Repo size: \"+repoFiles.size());\n \n \n for (FileBean file : repoFiles) {\n \n if (file.getPath().contains(\".java\")) {\n File workTreeFile = new File(projectPath + \"/\" + file.getPath());\n\n ClassBean classBean = null;\n \n if (workTreeFile.exists()) {\n ArrayList<ClassBean> code = new ArrayList<>();\n ArrayList<ClassBean> classes = ReadSourceCode.readSourceCode(workTreeFile, code);\n \n String body = file.getPath() + \",\";\n if (classes.size() > 0) {\n classBean = classes.get(0);\n\n }\n for(Metric m : metrics) {\n try{\n body += m.getValue(classBean, classes, null, null, null, null) + \",\";\n } catch(NullPointerException e) {\n body += \"0.0,\";\n }\n }\n \n //isSmell\n boolean isSmell = false;\n for(FileBean sm : smellClasses) {\n if(file.getPath().contains(sm.getPath())) {\n System.out.println(\"ok\");\n isSmell = true;\n break;\n }\n }\n \n body = body + isSmell + \"\\n\";\n pw1.write(body); \n }\n }\n }\n Git.gitReset(new File(projectPath));\n pw1.flush();\n }\n \n WekaEvaluator we1 = new WekaEvaluator(baseFolderPath, projectName, new Logistic(), \"Logistic Regression\", model.getName());\n \n ArrayList<Model> models = new ArrayList<Model>();\n \n models.add(model);\n System.out.println(models);\n //create a project\n Project p1 = new Project(\"https://github.com/apache/ant.git\");\n p1.setModels(models);\n p1.setName(\"ant\");\n p1.setVersion(version);\n \n ArrayList<Project> projects;\n //projects.add(p1);\n \n //create a file\n// try {\n// File f = new File(Config.baseDir + \"projects.txt\");\n// FileOutputStream fileOut;\n// if(f.exists()){\n// projects = ProjectHandler.getAllProjects(); \n// Files.delete(Paths.get(Config.baseDir + \"projects.txt\"));\n// //fileOut = new FileOutputStream(f, true);\n// } else {\n// projects = new ArrayList<Project>();\n// Files.createFile(Paths.get(Config.baseDir + \"projects.txt\"));\n// }\n// fileOut = new FileOutputStream(f);\n// projects.add(p1);\n// ObjectOutputStream out = new ObjectOutputStream(fileOut);\n// out.writeObject(projects);\n// out.close();\n// fileOut.close();\n//\n// } catch (FileNotFoundException e) {\n// e.printStackTrace();\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// ProjectHandler.setCurrentProject(p1);\n// Project curr = ProjectHandler.getCurrentProject();\n// System.out.println(curr.getGitURL()+\" --- \"+curr.getModels());\n// ArrayList<Project> projectest = ProjectHandler.getAllProjects();\n// for(Project testp : projectest){\n// System.out.println(testp.getModels());\n// }\n }", "static String getTimeAndSizeFromLog(String fileName){\n\t\tString res = \"\";\n\t\t\n//\t\tFile logFile = new File(\"R:/Eclipse/Partitionner/out/log_atl2_AllRanges_1000_30_20_20150629-1640.log\");\n//\t\tArrayList<ArrayList<String>> fileNames = Utils.extractModelsFromLogFile(logFile);\n\t\tArrayList<String> listNames = new ArrayList<>();\n\t\t\n\t\tString l = \"\", listModels = \"\", timeElapsed = \"\", checkRates = \"\";\n\t\t\n\t\tFile f = new File(Config.DIR_OUT+fileName);\n\t\t\n\t\tSystem.out.println(\"Reading '\"+f.getAbsolutePath()+\"'...\\t\");\n\t\ttry {\n\t\t\tPattern p=Pattern.compile(\"\\\\{.*\\\\}\");\n\t\t\tScanner scanner = new Scanner(f);\n while (scanner.hasNextLine()) { \n l = scanner.nextLine();\n if(l.trim().startsWith(\"Time\")){//Time elapsed : 5:28:19:125\n\t\t\t\t\tMatcher ma=Pattern.compile(\"\\\\:.*\").matcher(l);\n\t\t\t\t\t while(ma.find()) \n\t\t\t\t\t\t timeElapsed = ma.group().substring(1, ma.group().length()-1).trim();\n\t\t\t\t}\n if(l.trim().startsWith(\"Best\")){//Time elapsed : 5:28:19:125\n\t\t\t\t\tMatcher ma=Pattern.compile(\"Best\\\\:[\\\\S]*,{1}\").matcher(l);\n\t\t\t\t\t while(ma.find()) \n\t\t\t\t\t\t checkRates = ma.group().substring(\"Best:\".length(), ma.group().length()-1).trim();\n\t\t\t\t}\n \n\t\t\t\tif(l.trim().startsWith(\"Best\")){//Best:0.89...8,0.96...4,10 (MS15386:10 Models):(COV:89,DIS:96) rd(0,0)\t 10{model_00581.xmi,mo[...]8551.xmi}\n\t\t\t\t\tMatcher ma=p.matcher(l);\n\t\t\t\t\t while(ma.find()) \n\t\t\t listModels = ma.group().substring(1, ma.group().length()-1);\n\t\t\t\t}\n\t\t\t}\n scanner.close();\n listNames = Utils.extractModelsFromList(Config.DIR_INSTANCES+Config.METAMODEL_NAME+File.separator, \n \t\t\t\tlistModels\t\t\t\t\n \t\t\t\t,\",\");\n\n \t\tModelSet ms = new ModelSet(listNames);\n \t\tint totalClasses = 0, totalProperties = 0;\n \t\tfor (Model m : ms.getModels()) {\n \t\t\ttotalClasses += m.getNbClasses();\n \t\t\ttotalProperties += m.getNbProperties();\n \t\t}\n \t\tfloat avgClasses = (float)totalClasses / ms.size();\n \t\tfloat avgProperties = (float)totalProperties / ms.size();\n \t\tres= \";\"+timeElapsed+\";\"+avgClasses+\";\"+avgProperties;\n \t\tSystem.out.println(\" Average model size : \"+checkRates+\"..\\t\"+res);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"WARNING : Could not process file '\"+f.getAbsolutePath()+\"'\");\n//\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t\treturn res;\n\t}", "public static void main(String[] args) throws IOException {\n\t\tCharStream input = CharStreams.fromFileName(\"C:\\\\Users\\\\User\\\\eclipse-workspace\\\\Compilateur-Aisha-Liliya\\\\src\\\\test\\\\test0.txt\");\n\t\tLangageLexer lexer = new LangageLexer( input);\n\t\tLangageParser parser = new \tLangageParser(new CommonTokenStream(lexer));\n\t\tListener l =new Listener();\n\t\tparser.addParseListener(l);\n\t\t\n\t\tParseTree tree = parser.code();\n\tl.s.printTE();\n\tl.s.printTS();\n\tl.s.printQuad();\n\tl.s.printCODEOBJET();\n\t}", "public static void main(String[] args) {\n\t\tString dir = \"C:\\\\Jat\\\\jat\\\\input\\\\\";\n\t\tString gpsmeasfile = \"gps\\\\rgpsmeas_rbar_geom1_mp.jat\";\n//\t\tString gpsmeasfile = \"gpsmeasblk.txt\";\n\t\tString insmeasfile = \"simu_rbar.jat\";\n\t\tString rinexfile = \"gps\\\\rinex.n\";\n//\t\tRGPS_MeasurementList gps = new RGPS_MeasurementList();\n//\t\tgps.readFromFile(dir+gpsmeasfile);\n\t\tRGPS_MeasurementList gps = RGPS_MeasurementList.recover(dir+gpsmeasfile);\n\t\tINS_MeasurementList ins = INS_MeasurementList.recover(dir+insmeasfile);\n//\t\tint big = ins.size();\n//\t\tSystem.out.println(\"ins size = \"+big);\n\t\tlong seed = -1;\n\t\tGPS_Constellation constellation = new GPS_Constellation(dir+rinexfile);\n\t\tLinePrinter lp1 = new LinePrinter(\"C:\\\\Jat\\\\jat\\\\output\\\\ekf_simu_rbar_geom1_mp_new_at_1.txt\");\n\t\tLinePrinter lp2 = new LinePrinter(\"C:\\\\Jat\\\\jat\\\\output\\\\ekf_simu_rbar_geom1_mp_new_at_2.txt\");\n\t\tLinePrinter lp3 = new LinePrinter(\"C:\\\\Jat\\\\jat\\\\output\\\\ekf_simu_rbar_geom1_mp_at_resid.txt\");\n\t\tProcessModel process = new RGPS_SIMU_ProcessModel(ins, constellation, lp1, lp2, lp3, seed);\n\t\tMeasurementModel meas = new RGPS_INS_MeasurementModel(gps, constellation);\n\t\tExtendedKalmanFilter ekf = new ExtendedKalmanFilter(meas, gps, process);\n\t\tlong ts = System.currentTimeMillis();\n\n\t\tekf.process();\n\t\t\n\t\tlong tf = System.currentTimeMillis();\n\t\tdouble dtf = (tf - ts)/(60.0 * 1000.0);\n\t\tSystem.out.println(\"EKF Time Elapsed: \"+dtf);\n\t\t\n\n\t}", "static public void main(String[] args) throws IOException{\n\t\tString sample = \"h19x24\";\n\t\tString parentFolder = \"/media/kyowon/Data1/Dropbox/fCLIP/new24/\";\t\t\n\t\tString bedFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.bed\";\n\t\tString dbFasta = \"/media/kyowon/Data1/RPF_Project/genomes/hg19.fa\";\n\t\tString parameterFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.param\";\n\t\t\n\t\tString trainOutFileName = parentFolder + sample + \".train.csv\";\n\t\tString arffTrainOutFileName = parentFolder + sample + \".train.arff\";\n\t\t\n\t\tString cisOutFileName = parentFolder + sample + \".csv\";\n\t\tString transOutFileNameM = parentFolder + sample + \".pair.M.csv\";\n\t\tString transOutFileNameU = parentFolder + sample + \".pair.U.csv\";\n\t\tString transControlOutFileNameM = parentFolder + sample + \".pair.M.AntiSense.csv\";\n\t\tString transControlOutFileNameU = parentFolder + sample + \".pair.U.AntiSense.csv\";\n\t\tString rmskBed = \"/media/kyowon/Data1/fCLIP/Data/cat.rmsk.bed\";\n\t\tString siControlBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siControl_R1_Aligned_Sorted.bed\";\n\t\tString siKDDroshaBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDrosha_R1_Aligned_Sorted.bed\";\n\t\tString siKDDicerBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDicer_R1_Aligned_Sorted.bed\";\n\t\t\n\t\tString cisBed5pFileName = cisOutFileName + \".5p.bed\";\n\t\tString cisBed3pFileName = cisOutFileName + \".3p.bed\";\n\t\t\n\t\tdouble unpairedScoreThreshold = 0.25; \n\t\tdouble pairedScoreThreshold = unpairedScoreThreshold/5;\n\t//\tdouble motifScoreThreshold = 0.15;\n\t\t\n\t\tint num3pPaired = 10;\n\t\tint num5pPaired = 20;\n\t\t\n\t\tString filteredTransOutFileName = transOutFileNameM + \".filtered.csv\";\n\t\t\n\t\tint blatHitThreshold = 100000000;\n\t\tint transPairSeqLength = FCLIP_Scorer.getFlankingNTNumber() *2 + 80;\n\t\t\n\t\tZeroBasedFastaParser fastaParser = new ZeroBasedFastaParser(dbFasta);\n\t\tMirGff3FileParser mirParser = new MirGff3FileParser(\"/media/kyowon/Data1/fCLIP/genomes/hsa_hg19.gff3\");\n\t\tAnnotationFileParser annotationParser = new AnnotationFileParser(\"/media/kyowon/Data1/fCLIP/genomes/hg19.refFlat.txt\");\n\t\tFCLIP_ScorerTrainer.train(parameterFileName, bedFileName, mirParser, annotationParser);\n\t\t\n\t\ttrain(trainOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\t\trunCis(cisOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\n\t\tScoredPositionOutputParser.generateBedFromCsv(cisOutFileName, cisBed5pFileName, cisBed3pFileName, false); // for fold change..\n\t//\tScoredPositionOutputParser.generateFastaForMotif(cisOutFileName, cisOutFileName + \".5p.motif.fa\", cisOutFileName + \".3p.motif.fa\",cisOutFileName + \".motif.m\", \"M\");\n\t\t\n\t\trunTrans(transOutFileNameM, transOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, false);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transOutFileNameM, transOutFileNameM + \".5p.motif.fa\", transOutFileNameM + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(transOutFileNameM + \".rmsk.csv\", transOutFileNameM + \".link.txt\");\n\t//\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t///\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\trunTrans(transControlOutFileNameM, transControlOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, true);\t\t\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transControlOutFileNameM, transControlOutFileNameM + \".5p.motif.fa\", transControlOutFileNameM + \".3p.motif.fa\");\n\t//\tGenerateCircosLinkFiles.run(transControlOutFileNameM + \".rmsk.csv\", transControlOutFileNameM + \".link.txt\");\n\t\t//CheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\tfilterTransPairs(transOutFileNameM, filteredTransOutFileName, num3pPaired, num5pPaired);\n\t\tCheckRepeat.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(filteredTransOutFileName, filteredTransOutFileName + \".5p.motif.fa\", filteredTransOutFileName + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(filteredTransOutFileName + \".rmsk.csv\", filteredTransOutFileName + \".link.txt\");\n\t///\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\t\n\t\t// generate background for drosha and dicer..\n\t\t\n\t\t\n\t\t// motif different conditioin?? \n\t\t\n\t\t\t\t\n\t\t//GenerateDepthsForEncodeDataSets.generate(outFileName, outFileName + \".encode.csv\", annotationParser);\n\t\t\n\t\t\n\t}", "public static void main(String args[]) throws Exception {\n\n String sourceFile = args[0]; //source file has supervised SRL tags\n String targetFile = args[1]; //target file has supervised SRL tags\n String alignmentFile = args[2];\n String sourceClusterFilePath = args[3];\n String targetClusterFilePath = args[4];\n String projectionFilters = args[5];\n double sparsityThresholdStart = Double.parseDouble(args[6]);\n double sparsityThresholdEnd = Double.parseDouble(args[6]);\n\n\n Alignment alignment = new Alignment(alignmentFile);\n HashMap<Integer, HashMap<Integer, Integer>> alignmentDic = alignment.getSourceTargetAlignmentDic();\n\n final IndexMap sourceIndexMap = new IndexMap(sourceFile, sourceClusterFilePath);\n final IndexMap targetIndexMap = new IndexMap(targetFile, targetClusterFilePath);\n ArrayList<String> sourceSents = IO.readCoNLLFile(sourceFile);\n ArrayList<String> targetSents = IO.readCoNLLFile(targetFile);\n\n System.out.println(\"Projection started...\");\n DependencyLabelsAnalyser dla = new DependencyLabelsAnalyser();\n for (int senId = 0; senId < sourceSents.size(); senId++) {\n if (senId % 100000 == 0)\n System.out.print(senId);\n else if (senId % 10000 == 0)\n System.out.print(\".\");\n\n Sentence sourceSen = new Sentence(sourceSents.get(senId), sourceIndexMap);\n Sentence targetSen = new Sentence(targetSents.get(senId), targetIndexMap);\n int maxNumOfProjectedLabels = dla.getNumOfProjectedLabels(sourceSen, alignmentDic.get(senId));\n double trainGainPerWord = (double) maxNumOfProjectedLabels/targetSen.getLength();\n\n if (trainGainPerWord >= sparsityThresholdStart && trainGainPerWord< sparsityThresholdEnd) {\n dla.analysSourceTargetDependencyMatch(sourceSen, targetSen, alignmentDic.get(senId),\n sourceIndexMap, targetIndexMap, projectionFilters);\n }\n }\n System.out.print(sourceSents.size() + \"\\n\");\n dla.writeConfusionMatrix(\"confusion_\"+sparsityThresholdStart+\"_\"+sparsityThresholdEnd+\".out\", sourceIndexMap, targetIndexMap);\n }", "public static void main(String[] args) throws Exception {\n for (String arg : args) {\n if (arg.split(\"=\").length != 2) {\n continue;\n }\n if (arg.startsWith(\"filePath=\")) {\n filePath = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"showTop=\")) {\n showTop = Integer.valueOf(arg.split(\"=\")[1]);\n } else if (arg.startsWith(\"warnTime=\")) {\n warnTime = Integer.valueOf(arg.split(\"=\")[1]);\n } else if (arg.startsWith(\"maxCountLine=\")) {\n maxCountLine = Long.valueOf(arg.split(\"=\")[1]);\n } else {\n System.out.println(\"unknow arg:\" + arg);\n System.out.println(helpInfo);\n System.exit(0);\n }\n }\n System.out.println(\"filePath=\" + filePath + \" maxCountLine=\" + maxCountLine + \" showTop=\" + showTop + \" warnTime=\" + warnTime);\n\n long beginTime = System.currentTimeMillis();\n File dir = new File(filePath);\n if (dir.isDirectory()) {\n for (File file : dir.listFiles()) {\n loadData(file);\n }\n } else if (dir.isFile()) {\n loadData(dir);\n }\n printStat();\n printWarnStatMap();\n System.out.println(\"readLine:\" + readLine + \" countLine:\" + countLine + \" useTime:\" + (System.currentTimeMillis() - beginTime));\n }", "public static void main(String[] args) throws Exception {\n\n\t\tDecimalFormat df = new DecimalFormat();\n\t\tdf.setMinimumFractionDigits(2);\n\t\tdf.setMaximumFractionDigits(2);\n\t\t\n\t\tlong startTime = new Date().getTime();\n\n\t\tCityGMLConverterConf conf;\n\n\t\tif (args.length == 1) {\n\t\t\tconf = new CityGMLConverterConf(args[0]);\n\t\t} else {\n\t\t\tconf = new CityGMLConverterConf();\n\t\t}\n\n\t\tconf.outputConf();\n\n\t\t// create new urban configuration\n\t\tUrbanCLMConfiguration uclm = new UrbanCLMConfiguration(conf.pollat,\n\t\t\t\tconf.pollon, conf.dlat, conf.dlon, conf.startlat_tot,\n\t\t\t\tconf.startlon_tot, conf.ie_tot, conf.je_tot, conf.n_uclass,\n\t\t\t\tconf.angle_udir, conf.ke_uhl, conf.hhl_uhl);\n\n\t\tPJ sourcePJ = new PJ(conf.proj4code);\n\t\tPJ targetPJ = new PJ(\"+init=epsg:4326 +latlong\");\n\n\t\t// set up citygml4j context\n\t\tCityGMLContext ctx = CityGMLContext.getInstance();\n\t\tCityGMLBuilder builder = ctx.createCityGMLBuilder();\n\t\tCityGMLInputFactory in = builder.createCityGMLInputFactory();\n\n\t\tList<Path> paths = new ArrayList<>();\n\t\tPath folder = Path.of(conf.inputGMLFolder);\n\t\tif (Files.isDirectory(folder)) {\n\t\t\tFiles.walk(Paths.get(conf.inputGMLFolder))\n\t\t\t\t\t.filter((p) -> p.toFile().getAbsolutePath().toLowerCase().endsWith(\"gml\")\n\t\t\t\t\t\t\t|| p.toFile().getAbsolutePath().toLowerCase().endsWith(\"xml\"))\n\t\t\t\t\t.forEach((p) -> paths.add(p));\n\t\t\tif (paths.isEmpty()) {\n\t\t\t\tSystem.err.println(\"No gml or xml files in \" + conf.inputGMLFolder + \" found\");\n\t\t\t\tSystem.err.println(\"Stopping now\");\n\t\t\t\tSystem.exit(10);\n\t\t\t}\n\t\t} else {\n\t\t\tpaths.add(folder);\n\t\t}\n\t\t\n\t\tCityGMLConverterStats stats = new CityGMLConverterStats(conf);\n\n\t\treadImpSurfaceFile(conf, uclm);\n\n\t\t// lock for parallel execution\n\t\tLock lock = new ReentrantLock();\n\t\t\n\t\tCityGMLConverterData cgml = new CityGMLConverterData(uclm, conf, sourcePJ, targetPJ, stats, df, lock);\n\t\tSystem.out.println(\"Reading files\");\n\n\t\tint pathsLengthLength = (int)(Math.log10(paths.size())+1);\n\t\t// here loop over citygmlfiles\n\t\tfor (int i = 0; i < paths.size(); i++) {\n\n\t\t\tPath file = paths.get(i);\n\n\t\t\tSystem.out.println(\" File \" + String.format(\"%\" + pathsLengthLength + \"d\",i + 1) + \"/\"\n\t\t\t\t\t+ paths.size() + \": \" + file);\n\n\t\t\tCityGMLReader reader = in.createCityGMLReader(file.toFile());\n\t\t\twhile (reader.hasNext()) {\n\t\t\t\tCityGML citygml;\n\t\t\t\t// try to read feature and skip if failed\n\t\t\t\ttry{\n\t\t\t\t\tcitygml = reader.nextFeature();\n\t\t\t\t} catch ( CityGMLReadException e ) {\n\t\t\t\t\tstats.addReadError(file.toString());;\n\t\t\t\t\tSystem.err.println(\"Cannot read \" + file);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (citygml.getCityGMLClass() == CityGMLClass.CITY_MODEL) {\n\t\t\t\t\tCityModel cityModel = (CityModel)citygml;\n\n\t\t\t\t\tcgml.addBuildings(cityModel);\n\t\t\t\t\t// everything that is need is now in cgmlct, rest can be deleted\n\t\t\t\t\tcityModel = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treader.close();\n\t\t}\n\t\t\n\t\tint nChunks;\n\t\tint nThreadsLocal;\n\t\tint nBuildingsPerThreadLocal;\n\t\tif (conf.nThreads == 1) {\n\t\t\tnChunks = 1;\n\t\t\tnThreadsLocal = 1;\n\t\t\tnBuildingsPerThreadLocal = cgml.buildings.size();\n\t\t\tSystem.out.println(\"Visibility calculation using 1 thread\");\n\t\t} else {\n\t\t\t// round up of division cgml.buildings.size() / conf.nBuildingsPerThread\n\t\t\tnChunks = (cgml.buildings.size() + conf.nBuildingsPerThread - 1) / conf.nBuildingsPerThread;\n\t\t\tnThreadsLocal = Math.min(conf.nThreads, nChunks);\n\t\t\tnBuildingsPerThreadLocal = conf.nBuildingsPerThread;\n\t\t\tSystem.out.println(\"Splitting visibility calculation in \" + \n\t\t\t\t\tnChunks + \" chunk(s) with \" + nBuildingsPerThreadLocal + \" buildings each, using \" + \n\t\t\t\t\tnThreadsLocal + \" thread(s)\");\n\t\t}\n\n\t\tExecutorService exec = Executors.newFixedThreadPool(nThreadsLocal);\n\t\t\n\t\tfor (int indexChunk = 0; indexChunk < nChunks; indexChunk++) {\n\t\t\texec.execute(new CityGMLVisibilityRunnable(cgml, indexChunk * conf.nBuildingsPerThread,\n\t\t\t\t\tMath.min((indexChunk + 1) * nBuildingsPerThreadLocal, cgml.buildings.size()), indexChunk,\n\t\t\t\t\tnChunks, conf));\n\t\t}\n\t\t\t\t\n\t\texec.shutdown();\n\t\texec.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS);\n\t\t\n\t\tif (!conf.saveMemory) cgml.calcStreetProperties();\n\t\t\n\t\tSystem.out.println(\"Largest Building: \" + df.format(Collections.max(stats.getBuildingHeights())) + \" m\");\n\t\tSystem.out.println(\"Smallest Building: \" + df.format(Collections.min(stats.getBuildingHeights())) + \" m\");\n\n\t\tuclm.fakeUrbanClassFrac();\n\t\tuclm.normBuildingFrac();\n\t\tuclm.normBuildProbAndCalcStreetFraction();\n\t\tuclm.normStreetWidth();\n\t\tuclm.calculateBuildingWidth();\n\t\tif (conf.consistentOutput) {\n\t\t\tuclm.defineMissingData(conf.frUrbLimit);\n\t\t}\n\t\t\n\t\tlong lasted = new Date().getTime() - startTime;\n\t\tSystem.out.printf(\"Urban parameter calculation took %.1f minutes%n\",\n\t\t\t\tlasted / 1000. / 60.);\n\t\t\n\t\tSystem.out.println(\"Creating output\");\n\t\t// text logs\n\t\tstats.writeLogs();\n\t\t\n\t\t// building statistics\n\t\tNetcdfFileWriter ncfile = NetcdfFileWriter.createNew(NetcdfFileWriter.Version.netcdf3, conf.statsFile);\n\t\tstats.toNetCDFfile(ncfile);\n\t\tncfile.close();\n\t\t\n\t\t// main output\n\t\tncfile = NetcdfFileWriter.createNew(NetcdfFileWriter.Version.netcdf3, conf.outputFile);\n\t\t// Add additional parameters to NetCDF file.\n\t\tDateFormatter dfDate = new DateFormatter();\n\t\tncfile.addGroupAttribute(null, new Attribute(\"creation_date\", dfDate.toDateTimeString(new Date())));\n\t\tconf.toNetCDFfile(ncfile);\n\t\tuclm.toNetCDFfile(ncfile);\n\t\tncfile.close();\n\n\t\tSystem.out.println(\"Finished\");\n\t}", "static public void main(String argv[]) {\n String archivo_a_parsear = \"/home/maldad/repos/automatas/semantico/EjemploA/src/ejemploa/test.txt\";\n try {\n parser p = new parser(new Lexer(new FileReader(archivo_a_parsear)));\n Object result = p.parse().value; \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }", "public void test(int maxLength, double maxVelocity, int maxEpoch) {\n\t\tMAX_LENGTH = maxLength;\n\t\tpso = new ParticleSwarmOptimization(MAX_LENGTH);\t\t//instantiate and define params for PSO here\n\t\tpso.setVMax(maxVelocity);\n\t\tpso.setMaxEpoch(maxEpoch);\n\t\tlong testStart = System.nanoTime();\n\t\tString filepath = \"PSO-N\"+MAX_LENGTH+\"-\"+maxVelocity+\"-\"+maxEpoch+\".txt\";\n\t\tlong startTime = 0;\n long endTime = 0;\n long totalTime = 0;\n int fail = 0;\n int success = 0;\n \n\t\tlogParameters();\n \n for(int i = 0; i < MAX_RUN; ) {\t\t\t\t\t\t\t\t\t\t\t\t//run 50 sucess to pass passing criteria\n \tstartTime = System.nanoTime();\n \tif(pso.algorithm()) {\n \t\tendTime = System.nanoTime();\n \t\ttotalTime = endTime - startTime;\n \t\t\n \t\tSystem.out.println(\"Done\");\n \t\tSystem.out.println(\"run \"+(i+1));\n \tSystem.out.println(\"time in nanoseconds: \"+totalTime);\n \tSystem.out.println(\"Success!\");\n \t\n \truntimes[i] = totalTime;\n \ti++;\n \tsuccess++;\n \t\n \t//write to log\n \tlogWriter.add((String)(\"Run: \"+i));\n \tlogWriter.add((String)(\"Runtime in nanoseconds: \"+totalTime));\n \tlogWriter.add((String)(\"Found at epoch: \"+pso.getEpoch()));\n \tlogWriter.add((String)(\"Population size: \"+pso.getPopSize()));\n \tlogWriter.add(\"\");\n \t\n \tfor(Particle p: pso.getSolutions()) {\t\t\t\t\t\t\t\t//write solutions to log file\n\t\t\t\t\tlogWriter.add(p);\n\t\t\t\t\tlogWriter.add(\"\");\n \t\t\t}\n \t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//count failures for failing criteria\n \t\tfail++;\n \t\tSystem.out.println(\"Fail!\");\n \t}\n \t\n \tif(fail >= 100) {\n \t\tSystem.out.println(\"Cannot find solution with these params\");\n \t\tbreak;\n \t}\n \tstartTime = 0;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//reset time\n \tendTime = 0;\n \ttotalTime = 0;\n }\n\t\n System.out.println(\"Number of Success: \" +success);\n System.out.println(\"Number of failures: \"+fail);\n logWriter.add(\"Runtime summary\");\n logWriter.add(\"\");\n \n\t\tfor(int x = 0; x < runtimes.length; x++){\t\t\t\t\t\t\t\t\t//print runtime summary\n\t\t\tlogWriter.add(Long.toString(runtimes[x]));\n\t\t}\n\t\t\n\t\tlong testEnd = System.nanoTime();\n\t\tlogWriter.add(Long.toString(testStart));\n\t\tlogWriter.add(Long.toString(testEnd));\n\t\tlogWriter.add(Long.toString(testEnd - testStart));\n\t\t\n \n \tlogWriter.writeFile(filepath);\n \tprintRuntimes();\n\t}", "public static void main(String[] args) throws IOException {\n AdjListGraph adjListGraph = null;\r\n AdjMatrixGraph adjMatGraph = null;\r\n AdjMatrixMoreEfficientGraph adjEffGraph = null;\r\n \r\n // Create object for input sequence according to the file name\r\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n System.out.print(\"Enter input filename: \");\r\n String filename = br.readLine();\r\n \r\n // Inserting data to each graph, pay attention to different path representation for ubuntu and windows\r\n In inputFile = new In(\"data/\" + filename);\r\n adjListGraph = new AdjListGraph(inputFile);\r\n inputFile = new In(\"data/\" + filename);\r\n adjMatGraph = new AdjMatrixGraph(inputFile);\r\n inputFile = new In(\"data/\" + filename);\r\n adjEffGraph = new AdjMatrixMoreEfficientGraph(inputFile);\r\n \r\n /*\r\n * Step 2\r\n * get the size of graph of each representation\r\n * AdjListGraph.java: adj\r\n * AdjMatrixGraph.java: adj\r\n\t\t * Please use adjListGraph.sizeOfGraph() to get the memory usage of the graph with list implementation. \r\n\t\t * Please use adjMatGraph.sizeOfGraph() to get the memory usage of the graph with matrix implementation. \r\n */\r\n \r\n // Output every required data from all versions\r\n System.out.format(\"1. Number of vertices = %d \\n\", adjListGraph.V());\r\n System.out.format(\"2. Number of edges = %d \\n\", adjListGraph.E());\r\n System.out.format(\"3. Output of the graph using adjacency list:\\n\");\r\n //adjListGraph.printGraph();\r\n System.out.format(\"4. Adjacency list\\n (a) Memory needed to record edges = %d\\n\", adjListGraph.E() * Size.INTEGER);\r\n System.out.format(\" (b) Total amount of memory used = %d\\n\", adjListGraph.sizeOfGraph());\r\n System.out.format(\" (c) Efficiency = %f\\n\", 100.0 * adjListGraph.E() * Size.INTEGER / adjListGraph.sizeOfGraph());\r\n System.out.format(\"5. Output of the graph using matrix:\\n\");\r\n //adjMatGraph.printGraph();\r\n System.out.format(\"6. Adjacency matrix\\n (a) Memory needed to record edges = %d\\n\", adjMatGraph.E() * Size.BOOLEAN);\r\n System.out.format(\" (b) Total amount of memory used = %d\\n\", adjMatGraph.sizeOfGraph());\r\n System.out.format(\" (c) Efficiency = %f\\n\", 100.0 * adjMatGraph.E() * Size.BOOLEAN / adjMatGraph.sizeOfGraph());\r\n //adjEffGraph.printGraph();\r\n System.out.format(\"Additional task: Efficient Adjacency matrix\\n (a) Memory needed to record edges = %d\\n\", adjEffGraph.E() * Size.BOOLEAN);\r\n System.out.format(\" (b) Total amount of memory used = %d\\n\", adjEffGraph.sizeOfGraph());\r\n System.out.format(\" (c) Efficiency = %f\\n\", 100.0 * adjEffGraph.E() * Size.BOOLEAN / adjEffGraph.sizeOfGraph());\r\n }", "public static void main(String[] args) throws Exception\n\t{\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"input6.txt\"));\tSystem.setOut(new PrintStream(new File(\"output.txt\")));\n\t\t\n\t\tint t = Integer.parseInt(br.readLine());\n\t\tfor(int i = 1; i <= t; i++)\n\t\t\tSystem.out.println(\"Case #\"+i+\": \"+solve(br));\n\t}", "public static void main(String[] args) throws Exception {\n ExecutionEnvironment env = ExecutionEnvironment.createLocalEnvironment();\n env.getConfig().disableSysoutLogging();\n env.setParallelism(4);\n\n /********** DATA LOADING ***************/\n //Load the data set\n DataFlink<DataInstance> data = DataFlinkLoader.open(env,\"./datasets/BigSensorReadings.arff\");\n\n int nRooms = 10;\n\n /********** Model Definition ************/\n DAG fireDetectorModel = creatBigFireDectectorModel(data.getAttributes(),nRooms);\n\n /********** Model Learning ************/\n //Define the learning engine (distributed Variational Message Passing) and the parameters\n dVMP svb = new dVMP();\n svb.setBatchSize(1000);\n svb.setOutput(true);\n svb.setDAG(fireDetectorModel);\n\n //Specify the associated constraints (encoding prior knowledge)\n for (int i = 0; i < nRooms; i++) {\n Variable sensorT1 = fireDetectorModel.getVariables().getVariableByName(\"SensorTemp1_\"+i);\n Variable sensorT2 = fireDetectorModel.getVariables().getVariableByName(\"SensorTemp2_\"+i);\n svb.addParameterConstraint(new Constraint(\"alpha\", sensorT1, 0.0));\n svb.addParameterConstraint(new Constraint(\"alpha\", sensorT2, 0.0));\n svb.addParameterConstraint(new Constraint(\"beta1\", sensorT1, 1.0));\n svb.addParameterConstraint(new Constraint(\"beta1\", sensorT2, 1.0));\n\n Variable temp = fireDetectorModel.getVariables().getVariableByName(\"Temperature_\"+i);\n svb.addParameterConstraint(new Constraint(\"alpha | {Fire_\"+i+\" = 0}\", temp, 0.0));\n svb.addParameterConstraint(new Constraint(\"beta1 | {Fire_\"+i+\" = 0}\", temp, 1.0));\n\n }\n\n //Set-up the learning phase\n svb.initLearning();\n\n //Perform Learning\n Stopwatch watch = Stopwatch.createStarted();\n svb.updateModel(data);\n System.out.println(watch.stop());\n\n\n //Print the learnt model\n System.out.println(svb.getLearntBayesianNetwork());\n\n }", "public static void main(String[] args) {\n\t\tString filename = \"src/y20161B/B-small-practice\";\n\t\t//String filename = \"src/y20161B/B-large-practice\";\n\n\t\tFileInputStream file;\n\t\tint T;\n\n\t\ttry {\n\t\t\tfile = new FileInputStream(filename+\".in\");\n\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(file));\n\n\t\t\tT = Integer.parseInt(in.readLine());\n\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(filename+\".out\"));\n\n\t\t\tfor (int i=0; i<T; i++) {\n\t\t\t\tint ind = i+1;\n\t\t\t\t// parser\n\t\t\t\tString buff[] = in.readLine().split(\" \");\n\t\t\t\tString C = buff[0];\n\t\t\t\tString J = buff[1];\n\t\t\t\t\n\t\t\t\t// calcul\n\t\t\t\tString res = solve(C, J);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Result \"+i+\": \"+res);\n\t\t\t\tbw.write(\"Case #\"+ind+\": \"+res+\"\\n\");\n\t\t\t}\n\t\t\tbw.close();\n\n\t\t\tin.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run() {\n \n if (Parameter != null && Parameter instanceof ConvertTextUnitsParameter) {\n CastParameter = (ConvertTextUnitsParameter)Parameter;\n }\n else {\n CastParameter = null;\n }\n\n String shortErrorMessage = \"Error: Text Units Cannot be Converted!\";\n this.acceptTask(TaskProgress.INDETERMINATE, \"Initial Preparations\");\n this.validateParameter(Parameter, shortErrorMessage);\n this.openDiasdemCollection(CastParameter.getCollectionFileName());\n this.checkPrerequisitesAndSetDefaultTextUnitsLayer(shortErrorMessage);\n \n if (CastParameter.getConversionType() == ConvertTextUnitsParameter\n .APPLY_REGULAR_EXPRESSION_TO_TEXT_UNITS) {\n RegexPattern = Pattern.compile(CastParameter.getRegularExpression());\n }\n \n if (CastParameter.getConversionType() == ConvertTextUnitsParameter\n .IDENTIFY_SPECIFIED_MULTI_TOKEN_TERMS) {\n // read multi token word: each line contains one multi token word;\n // comment lines start with '#'\n TextFile multiTokenFile = new TextFile(\n new File(CastParameter.getMultiTokenFileName()));\n multiTokenFile.open();\n String line = multiTokenFile.getFirstLineButIgnoreCommentsAndEmptyLines();\n ArrayList list = new ArrayList();\n while (line != null) {\n list.add(line.trim());\n line = multiTokenFile.getNextLineButIgnoreCommentsAndEmptyLines();\n }\n // sort multi token terms by decreasing length\n Collections.sort(list, new SortStringsByDecreasingLength());\n // for (int i = 0; i < list.size(); i++) {\n // System.out.println((String)list.get(i));\n // }\n // System.out.println(list.size());\n String[] multiToken = new String[list.size()];\n for (int i = 0; i < list.size(); i++)\n multiToken[i] = (String)list.get(i);\n multiTokenFile.close();\n MyMultiTokenWordIdentifier = new HeuristicMultiTokenWordIdentifier(\n multiToken);\n }\n else {\n MyMultiTokenWordIdentifier = null;\n }\n \n if (CastParameter.getConversionType() == ConvertTextUnitsParameter\n .FIND_AND_REPLACE_SPECIFIED_TOKENS) {\n // read token replacement file: each line contains the tokens to search \n // for and the replacement tokens separated by a tab stop;\n // comment lines start with '#'\n TextFile tokenReplacementFile = new TextFile(\n new File(CastParameter.getTokenReplacementFileName()));\n tokenReplacementFile.open();\n String line = tokenReplacementFile.getFirstLineButIgnoreCommentsAndEmptyLines();\n HashMap tokensSearchList = new HashMap();\n String[] tokensContents = null;\n while (line != null) {\n tokensContents = line.split(\"\\t\");\n if (tokensContents.length == 2\n && tokensContents[1].trim().length() > 0) {\n try {\n tokensSearchList.put(tokensContents[0].trim(), \n tokensContents[1].trim());\n }\n catch (PatternSyntaxException e) {\n System.out.println(\"[TokenizeTextUnitsTask] Regex syntax error in \"\n + \" file \" + CastParameter.getTokenReplacementFileName() + \": \"\n + \" Line \\\"\" + line + \"\\\"; error message: \" + e.getMessage());\n }\n }\n else {\n System.out.println(\"[TokenizeTextUnitsTask] Error in file \"\n + CastParameter.getTokenReplacementFileName() + \": Line \\\"\"\n + line + \"\\\" does not conform to syntax!\");\n }\n line = tokenReplacementFile.getNextLineButIgnoreCommentsAndEmptyLines();\n }\n // sort multi token terms by decreasing length\n ArrayList list = new ArrayList(tokensSearchList.keySet());\n Collections.sort(list, new SortStringsByDecreasingLength());\n // create arrays for token replacement \n String[] tokensSearch = new String[list.size()];\n String[] tokensReplace = new String[list.size()];\n Iterator iterator = list.iterator();\n int i = 0;\n while (iterator.hasNext()) {\n TmpString = (String)iterator.next();\n tokensSearch[i] = TmpString;\n tokensReplace[i++] = (String)tokensSearchList.get(TmpString);\n }\n tokenReplacementFile.close();\n MyTokenReplacer = new HeuristicTokenReplacer(tokensSearch, tokensReplace);\n }\n else {\n MyTokenReplacer = null;\n }\n \n int counterProgress = 0;\n long maxProgress = DiasdemCollection.getNumberOfDocuments();\n \n DiasdemDocument = DiasdemCollection.getFirstDocument(); \n while (DiasdemDocument != null) {\n \n if (counterProgress == 1 || (counterProgress % 50) == 0) {\n Progress.update( (int)(counterProgress * 100 / maxProgress),\n \"Processing Document \" + counterProgress);\n DiasdemServer.setTaskProgress(Progress, TaskThread);\n }\n\n DiasdemDocument.setActiveTextUnitsLayer(DiasdemProject\n .getActiveTextUnitsLayerIndex());\n DiasdemDocument.backupProcessedTextUnits(DiasdemProject\n .getProcessedTextUnitsRollbackOption());\n \n for (int i = 0; i < DiasdemDocument.getNumberOfProcessedTextUnits(); \n i++) {\n DiasdemTextUnit = DiasdemDocument.getProcessedTextUnit(i);\n switch (CastParameter.getConversionType()) {\n case ConvertTextUnitsParameter.CONVERT_TEXT_UNITS_TO_LOWER_CASE: {\n TextUnitContentsAsString = DiasdemTextUnit.getContentsAsString()\n .toLowerCase();\n break;\n }\n case ConvertTextUnitsParameter.CONVERT_TEXT_UNITS_TO_UPPER_CASE: {\n TextUnitContentsAsString = DiasdemTextUnit.getContentsAsString()\n .toUpperCase();\n break;\n } \n case ConvertTextUnitsParameter.APPLY_REGULAR_EXPRESSION_TO_TEXT_UNITS: {\n RegexMatcher = RegexPattern.matcher(DiasdemTextUnit\n .getContentsAsString());\n TmpStringBuffer = new StringBuffer(DiasdemTextUnit\n .getContentsAsString().length() + 10000);\n while (RegexMatcher.find()) {\n RegexMatcher.appendReplacement(TmpStringBuffer,\n CastParameter.getReplacementString());\n }\n TextUnitContentsAsString = RegexMatcher.appendTail(TmpStringBuffer)\n .toString();\n break;\n }\n case ConvertTextUnitsParameter.IDENTIFY_SPECIFIED_MULTI_TOKEN_TERMS: {\n TextUnitContentsAsString = MyMultiTokenWordIdentifier\n .identifyMultiTokenWords(DiasdemTextUnit.getContentsAsString());\n break;\n } \n case ConvertTextUnitsParameter.FIND_AND_REPLACE_SPECIFIED_TOKENS: {\n TextUnitContentsAsString = MyTokenReplacer\n .replaceTokens(DiasdemTextUnit.getContentsAsString());\n break;\n } \n case ConvertTextUnitsParameter.REMOVE_PART_OF_SPEECH_TAGS_FROM_TOKENS: {\n TextUnitContentsAsString = this.removeTagsFromTokens(\n DiasdemTextUnit.getContentsAsString(), \"/p:\");\n break;\n } \n case ConvertTextUnitsParameter.REMOVE_WORD_SENSE_TAGS_FROM_TOKENS: {\n TextUnitContentsAsString = this.removeTagsFromTokens(\n DiasdemTextUnit.getContentsAsString(), \"/s:\");\n break;\n } \n default: {\n TextUnitContentsAsString = DiasdemTextUnit.getContentsAsString();\n }\n }\n DiasdemTextUnit.setContentsFromString(TextUnitContentsAsString);\n DiasdemDocument.replaceProcessedTextUnit(i, DiasdemTextUnit);\n }\n\n DiasdemCollection.replaceDocument(DiasdemDocument\n .getDiasdemDocumentID(), DiasdemDocument);\n \n DiasdemDocument = DiasdemCollection.getNextDocument();\n counterProgress++;\n \n } // read all documents\n \n super.closeDiasdemCollection();\n \n CastResult = new ConvertTextUnitsResult(TaskResult.FINAL_RESULT,\n \"All processed text units have been converted in the DIAsDEM document\\n\" +\n \" collection \" +\n Tools.shortenFileName(CastParameter.getCollectionFileName(), 55) + \"!\", \n \"Processed text units have been converted.\");\n this.setTaskResult(100, \"All Documents Processed ...\", CastResult,\n TaskResult.FINAL_RESULT, Task.TASK_FINISHED);\n \n }", "public static void main(String[] args) {\n // solution for the problem\n int solution;\n // end time of the program\n long endTime;\n // start time of the program\n long startTime;\n\n startTime = System.nanoTime();\n solution = findTriangleNumber(TARGET_FACTORS);\n endTime = System.nanoTime();\n\n // print answer and time taken\n System.out.println(ANSWER + solution);\n System.out.printf(TIME_TAKEN, (double) (endTime - startTime) / TIME_CONVERSION);\n }", "public static void main(String[] args) throws IOException, InterruptedException, Household.InvalidHouseholdException, Matching.HouseholdAlreadyMatchedException, HousingMarket.FreeSpaceException, Matching.HouseAlreadyMatchedException, Matching.HouseholdLinkedToMultipleException, Matching.HouseholdLinkedToHouseholdException, DynamicMatching.TooManyTimestepsException, Matching.HouseLinkedToMultipleException, MatchingEvaluator.HouseholdIncomeTooHighException, CycleFinder.FullyExploredVertexDiscoveredException, Matching.PreferredNoHouseholdlessHouseException, Matching.HouseLinkedToHouseException {\n String inputFileName = \"../../Data/Input/test2.csv\";\n String outputfolder = \"../../Data/Output/Scores/\";\n\n int nTimes = 50; // Amount of matchings generated per configuration.\n long allowedRunningTime = 1_000; // Time an experiment for _nTimes_ matchings is allowed to run.\n int maxVal = 150; // Maximum lineCount.\n float timestepRatio = 2/3f; // Ratio of time-steps in a dynamic matching that have not yet been taken.\n // Uses H or F, whichever is lowest.\n // ---------------------------------------------------------------------------------------------------\n\n\n int[] startLines = new int[50];\n int counter = 0;\n for (int i = 0; i < 50; i++) {\n startLines[i] = counter;\n counter = counter + (1000 - maxVal) / nTimes; // == 17 with maxVal == 150 & nTimes == 50.\n }\n\n ArrayList<Double> envRatios = new ArrayList<>(Arrays.asList(0.5, 0.75, 1.0, 1.25, 1.5));\n\n ArrayList<Integer> lineCounts = new ArrayList<>(Arrays.asList(5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 20, 25, 30, 35, 40, 45, 50, 75, 100, 125, 150));\n// ArrayList<Integer> lineCounts = new ArrayList<>(Arrays.asList(5, 6, 7, 8, 9, 10, 11, 12));\n// ArrayList<Integer> lineCounts = new ArrayList<>(Arrays.asList(20, 25, 30, 35, 40, 45, 50, 75, 100, 125, 150));\n\n Experimenter experimenter = new Experimenter(inputFileName, outputfolder, allowedRunningTime, nTimes, startLines, envRatios, lineCounts, timestepRatio);\n experimenter.runExperiments();\n }", "public static void main(String[] args) {\n\t\tFile f= new File(\"E://workplace/BigFileRead/src/data/itcont.txt\");\r\n\t\ttry {\r\n\t\t\tBufferedReader b=new BufferedReader(new FileReader(f));\r\n\t\t\tString readLine=\"\";\r\n\t\t\t\r\n\t\t\t//得到总行数\r\n\t\t\tInstant lineCountStart=Instant.now();//当前时间\r\n\t\t\tint lines=0;\r\n\t\t\tInstant nameStart=Instant.now();\r\n\t\t\tArrayList<String> names=new ArrayList<String>();\r\n\t\t\t//得到第432个和第43243个名字\r\n\t\t\tArrayList<Integer> indexs=new ArrayList<>();\r\n\t\t\t\r\n\t\t\tindexs.add(1);\r\n\t\t\tindexs.add(433);\r\n\t\t\tindexs.add(43244);\r\n\t\t\t//计算每个月的捐赠量\r\n\t\t\tInstant donationsStart=Instant.now();\r\n\t\t\tArrayList<String> dates=new ArrayList<String>();\r\n\t\t\t//计算每一个名字的出现次数\r\n\t\t\tInstant commonNamesStart=Instant.now();\r\n\t\t\tArrayList<String> firstNames=new ArrayList<String>();\r\n\t\t\tSystem.out.println(\"start read file using input stream!\");\r\n\t\t\ttry {\r\n\t\t\t\twhile((readLine=b.readLine())!=null){\r\n\t\t\t\tlines++;\r\n\t\t\t\t//得到所有的名字\r\n\t\t\t\tString array1[]=readLine.split(\"\\\\s*\\\\|s*\");\r\n\t\t\t\tString name=array1[7];\r\n\t\t\t\tnames.add(name);\r\n\t\t\t\tif(indexs.contains(lines)){\r\n\t\t\t\t\tSystem.out.println(\"names:\"+names.get(lines-1)+\"at index: \"+(lines-1));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif (name.contains(\", \")){\r\n\t\t\t\t\tString array2[]=(name.split(\",\"));\r\n\t\t\t\t\tString firstHalfOfName=array2[1].trim();\r\n\t\t\t\t\tif(firstHalfOfName!=\"undefined\"||!firstHalfOfName.isEmpty()){\r\n\t\t\t\t\t\tif(firstHalfOfName.contains(\" \")){\r\n\t\t\t\t\t\t\tString array3[]=(name.split(\" \"));\r\n\t\t\t\t\t\t\tString firstName=array3[0].trim();\r\n\t\t\t\t\t\t\tfirstNames.add(firstName);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tfirstNames.add(firstHalfOfName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString rawDate=array1[4];\r\n\t\t\t\tString year=rawDate.substring(0,4);\r\n\t\t\t\tString month=rawDate.substring(4,6);\r\n\t\t\t\tString formatDate=month+\"-\"+year;\r\n\t\t\t\tdates.add(formatDate);\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tInstant namesEnd=Instant.now();\r\n\t\t\tlong timeElapseNames=Duration.between(nameStart, namesEnd).toMillis();\r\n\t\t\tSystem.out.println(\"names time :\"+timeElapseNames+\"ms\");\r\n\t\t\tSystem.out.println(\"total lines :\"+lines);\r\n\t\t\t\r\n\t\t\tInstant lineCountsEnd=Instant.now();\r\n\t\t\tlong timeElapselineCounts=Duration.between(lineCountStart, lineCountsEnd).toMillis();\r\n\t\t\tSystem.out.println(\"lines time :\"+timeElapseNames+\"ms\");\r\n\t\t\t\r\n\t\t\tHashMap<String, Integer> dateMap=new HashMap<String, Integer>();\r\n\t\t\tfor(String date:dates){\r\n\t\t\t\tInteger count =dateMap.get(date);\r\n\t\t\t\tif(count==null){\r\n\t\t\t\t\tdateMap.put(date, 1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tdateMap.put(date, count+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (Map.Entry<String, Integer> entry :dateMap.entrySet()){\r\n\t\t\t\tString key=entry.getKey();\r\n\t\t\t\tInteger value=entry.getValue();\r\n\t\t\t\tSystem.out.println(\"Donations per month and year: \"+key+\" and donation count: \"+value);\r\n\t\t\t}\r\n\t\t\tInstant donationEnd=Instant.now();\r\n\t\t\tlong timeElapsedDonations=Duration.between(donationsStart, donationEnd).toMillis();\r\n\t\t\tSystem.out.println(\"Donation time: \"+timeElapsedDonations+\" ms\");\r\n\t\t\t\t\r\n\t\t\tHashMap<String, Integer> map=new HashMap<String, Integer>();\r\n\t\t\tfor(String name : firstNames){\r\n\t\t\t\tInteger count =dateMap.get(name);\r\n\t\t\t\tif(count==null){\r\n\t\t\t\t\tmap.put(name, 1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmap.put(name, count+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tLinkedList<Entry<String, Integer>> list =new LinkedList<>(map.entrySet());\r\n\t\t\t\r\n\t\t\tCollections.sort(list,new Comparator<Map.Entry<String, Integer>>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\treturn (o2.getValue()).compareTo(o1.getValue());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The most Common first name is: \"+list.get(0).getKey()+\" and it occurs: \"+list.get(0).getValue()+\" time.\");\r\n\t\t\tInstant commonNameEnd=Instant.now();\r\n\t\t\tlong timeElapseCommonName =Duration.between(commonNamesStart, commonNameEnd).toMillis();\r\n\t\t\tSystem.out.println(\"most common name time: \"+timeElapseCommonName+\" ms\");\r\n\t\t} catch (FileNotFoundException e) { \r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws Exception{\n // long time = System.currentTimeMillis();\n File file = new File(\"input.txt\");\n File data = new File(\"output.txt\");\n Scanner input = new Scanner(file);\n PrintWriter output = new PrintWriter(data);\n\n algo = input.next();\n bx = input.nextInt();\n by = input.nextInt();\n bz = input.nextInt();\n\n ops = new int[bx][by][bz][18];\n openState = new Node[bx][by][bz];\n closedState = new Node[bx][by][bz];\n\n sx = input.nextInt();\n sy = input.nextInt();\n sz = input.nextInt();\n\n gx = input.nextInt();\n gy = input.nextInt();\n gz = input.nextInt();\n\n int n = input.nextInt();\n input.nextLine(); // flush \\n buffer\n for (int i = 0; i < n; i++) {\n String s = input.nextLine();\n String[] paras = s.split(\"\\\\s+\");\n int tx = Integer.parseInt(paras[0]);\n int ty = Integer.parseInt(paras[1]);\n int tz = Integer.parseInt(paras[2]);\n for (int j = 3; j < paras.length; j++)\n ops[tx][ty][tz][j - 3] = Integer.parseInt(paras[j]);\n }\n List<int[]> ans = ucs();\n int sum = 0, cnt = ans.size();\n if (cnt == 0)\n output.println(\"FAIL\");\n else {\n for (int[] step : ans)\n sum += step[3];\n output.println(sum);\n output.println(cnt);\n for (int[] step : ans) {\n for (int i = 0; i < step.length; i++) {\n if (i == 0)\n output.print(step[i]);\n else\n output.print(\" \" + step[i]);\n }\n output.println();\n }\n }\n output.close();\n // System.out.println(\"finish time is \" + (System.currentTimeMillis() - time) / 1000D);\n }", "@Test\n public void testParse()\n {\n System.out.println(\"parse\");\n System.out.println(\" Test simple case\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n Model model = token.parse();\n assertTrue(model.isCompiled());\n System.out.println(\" Test complex case\");\n final File complexFile = new File(\"src/test/data/balancer.example.txt\");\n final Token complexToken = lexer.analyze(complexFile);\n model = complexToken.parse();\n assertTrue(model.isCompiled());\n }", "public static void main(String[] args) {\n startTime = System.currentTimeMillis();\n\n // to log\n commandLine = args;\n \n // Parse and process commandline arguments\n if (!initialize(args))\n return;\n\n if ( (edgeDirFixed==false) && (numberOfProbableStructure==-1)) {\n \t System.out.println(\"Exiting: Edge direction not fixed and LOO selected (numberOfProbableNetworks = -1). More networks must be created, but be warned that this will increase the computational load.\");\n System.exit(-1);\n }\n // Read all necessary data\n initializeData();\n\n ExecutorService executor = Executors.newFixedThreadPool(numberOfThreads);\n \n // Instantiates Collection<Future> to add to for each call to executor's submit() method.\n List<Future<String>> futureList = new ArrayList<Future<String>>(listOfTargetGeneSets.size());\n\n for (int i = 0; i < listOfTargetGeneSets.size(); i++) {\n VariableSet targetSet = listOfTargetGeneSets.get(i);\n CallableEDDY callableEDDY = new CallableEDDY(data, targetSet, sampleClass, \n \t\tnumberOfPermutation, numberOfProbableStructure, \n \t\tprobabilityPowerFactor, maxParentAmount, pValueThreshold, priorWeight,\n \t\tisSilent, quickPermutationEnabled, edgeDirFixed, includeNeighbor, \n \t\tpriorDirectionality, approximatePermutations, resamplingRate);\n \n futureList.add(executor.submit(callableEDDY));\n }\n\n // Waits for the returned String from each thread (represented as a \"Future\") &\n // writes it to output file.\n try {\n for (Future<String> f : futureList)\n printToLog(f);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n // This will make the executor accept no new threads\n // and finish all existing threads in the queue\n executor.shutdown();\n\n try {\n long elapsedTimeMillis = (System.currentTimeMillis() - startTime);\n String elapsedTime = String.format(\"%02d hrs: %02d min: %02d sec\", TimeUnit.MILLISECONDS.toHours(elapsedTimeMillis),\n TimeUnit.MILLISECONDS.toMinutes(elapsedTimeMillis) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(elapsedTimeMillis)),\n TimeUnit.MILLISECONDS.toSeconds(elapsedTimeMillis) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(elapsedTimeMillis)));\n System.out.printf(\"Tasks completed. Elapsed Time: \" + elapsedTime + \"\\n\");\n output.write(\"\\nElapsed Time: \" + elapsedTime);\n output.close();\n } catch (Exception e) {e.printStackTrace();}\n\n }", "public static void main(String [] args) throws IOException {\n\t\tBufferedReader f = new BufferedReader(new FileReader(\"Prob1BA.in\"));\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"Prob1BA.out\")));\n\t\tint T = Integer.parseInt(f.readLine());\n\t\tfor(int n = 0; n < T; n++){\n\t\t\tString[] str = (f.readLine()).split(\" \");\n\t\t\tint A = Integer.parseInt(str[0]);\n\t\t\tint N = Integer.parseInt(str[1]);\n\t\t\tString[] str2 = (f.readLine()).split(\" \");\n\t\t\tArrayList<Integer> motes = new ArrayList<Integer>();\n\t\t\tfor(int i = 0; i < N; i++){\n\t\t\t\tmotes.add(Integer.parseInt(str2[i]));\n\t\t\t}\n\t\t\tCollections.sort(motes);\n\t\t\tint ans = solve(A, motes);\n\t\t\tSystem.out.println(\"Case #\" + (n+1) + \": \" + ans);\n\t\t}\n\t\t//long end = System.currentTimeMillis();\n\t\t//System.out.println(end - start);\n\t\tout.close();\n\t}", "public static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t//BufferedReader br = new BufferedReader(new FileReader(\"input/vol2/Problem127.in\"));\n\t\tString line = \"\";\n\t\t\n\t\twhile(true) {\n\t\t\tLinkedList<String> strings = new LinkedList<String>();\n\t\t\tLinkedList<Card> deck = new LinkedList<Card>();\n\t\t\tline = br.readLine().trim();\n\t\t\tif(line.equals(\"#\"))\n\t\t\t\tbreak;\n\t\t\tCollections.addAll(strings, line.split(\" \"));\n\t\t\tline = br.readLine().trim();\n\t\t\tCollections.addAll(strings, line.split(\" \"));\n\t\t\tfor(String str : strings) {\n\t\t\t\tdeck.add(new Card(str));\n\t\t\t}\n\t\t\tTableau solution = new Tableau();\n\t\t\tfor(Card c : deck) {\n\t\t\t\t//System.out.print(\"Adding: \" + c + \" \");\n\t\t\t\tsolution.add(c);\n\t\t\t\t//System.out.println(solution);\n\t\t\t\t//solution.debug();\n\t\t\t}\n\t\t\tSystem.out.println(solution);\n\t\t}\n\t\t//System.out.println(\"Runtime: \" + (System.currentTimeMillis() - startTime) + \"ms\");\n\t}", "public static void main(String[] args) throws IOException{\n \tBufferedReader br = new BufferedReader( \n new InputStreamReader(System.in)); \n\t \t\n\t \tt=1;\n\t \twhile(t--!=0){\n\t \t\tn=Integer.parseInt(br.readLine());\n\t \t\tdist=new long[n+1];\n\t \t\tJourney j=new Journey(n);\t \t\n\t \t\tfor(int i=1;i<=n-1;i++){\n\t \t\t\tString str[]=br.readLine().split(\" \");\n\t \t\t\tint u=Integer.parseInt(str[0]);\n\t \t\t\tint v=Integer.parseInt(str[1]);\n\t \t\t\tadj[u].add(v);\n\t \t\t\tadj[v].add(u);\n\t \t\t}\n\t \t\tSystem.out.println(String.format(\"%.20f\",dfs(1,-1)));\n\t \t}\t \t\n\t\t System.out.println(ans.toString());\n\n }", "public void preParseInputFileFF(String inputFolder) {\n System.out.println(\"Parsing FF log file...\");\n serverNames = new LinkedHashSet<>();\n applicationNames = new LinkedHashSet<>();\n serviceNames = new LinkedHashSet<>();\n graphHistory = new HashMap<>();\n serverHistory = new HashMap<>();\n applicationHistory = new HashMap<>();\n robustnessByStep = new HashMap<>();\n int fileStep;\n try {\n // for all files in the input folder\n for (File inputFile : Arrays.asList(new File(inputFolder).listFiles()).stream()\n .filter(file -> !file.isDirectory())\n .collect(Collectors.toList())) {\n // grabbing the step from the file name\n fileStep = Integer.parseInt(inputFile.getName().split(\"_\")[2]);\n graphHistory.put(fileStep, new HashMap<>());\n serverHistory.put(fileStep, new ArrayList<>());\n applicationHistory.put(fileStep, new ArrayList<>());\n List<FakeServer> currentServers = new ArrayList<>();\n BufferedReader br = Files.newBufferedReader(inputFile.toPath());\n String line;\n robustnessByStep.put(fileStep, (double) (Integer.parseInt(br.readLine().split(\"=\")[1].trim())) / 1000d);\n // skipping lines until \"PLATFORMS\"\n while ((line = br.readLine()) != null && !line.equalsIgnoreCase(\"PLATFORMS\")) {\n\n }\n //reading platforms\n while (!(line = br.readLine()).equalsIgnoreCase(\"APPLICATIONS\")) {\n if (line.length() > 0) {\n String server = line;\n String services = br.readLine();\n serverNames.add(server.split(\";\")[0].trim());\n FakeServer fakeServer = new FakeServer(server.split(\";\")[0].trim(), 0,\n Integer.parseInt(server.split(\";\")[1]), Integer.parseInt(server.split(\";\")[2]), fileStep,\n Arrays.asList(services.substring(1, services.length() - 1).split(\",\")).stream()\n .map(String::trim)\n .collect(Collectors.toList()));\n serverHistory.get(fileStep).add(fakeServer);\n currentServers.add(fakeServer);\n graphHistory.get(fileStep).put(fakeServer, new ArrayList<>());\n maxServerGeneration = Math.max(0, maxServerGeneration);\n maxServerConnections = Math.max(Integer.parseInt(server.split(\";\")[1]), maxServerConnections);\n maxServerSize = Math.max(fakeServer.services.size(), maxServerSize);\n serviceNames.addAll(fakeServer.services);\n maxSimultaneousApplications = Math.max(0, maxSimultaneousApplications);\n }\n }\n //reading applications\n while ((line = br.readLine()) != null) {\n if (line.length() > 0) {\n String application = line;\n String services = br.readLine();\n String servers = br.readLine();\n String neighbors = br.readLine();\n FakeApplication fakeApplication = new FakeApplication(application.split(\";\")[0].trim(), 0,\n servers.substring(1, servers.length() - 2).split(\"\\\\s\").length, fileStep,\n Arrays.asList(services.substring(1, services.length() - 1).split(\",\")).stream()\n .map(String::trim)\n .collect(Collectors.toList()),\n neighbors.equalsIgnoreCase(\"\") ? new ArrayList<>() : Arrays.asList(neighbors.substring(1, neighbors.length() - 2).split(\"\\\\s\")).stream()\n .map(neighborName -> (FakeServer) findActor(neighborName, currentServers))\n .collect(Collectors.toList()));\n applicationHistory.get(fileStep).add(fakeApplication);\n for (String server : servers.substring(1, servers.length() - 2).split(\"\\\\s\")) {\n graphHistory.get(fileStep)\n .get(findActor(server, new ArrayList<>(graphHistory.get(fileStep).keySet())))\n .add(fakeApplication);\n }\n applicationNames.add(fakeApplication.name);\n maxApplicationGeneration = Math.max(fakeApplication.generation, maxApplicationGeneration);\n maxApplicationConnections = Math.max(fakeApplication.connections, maxApplicationConnections);\n maxApplicationSize = Math.max(fakeApplication.services.size(), maxApplicationSize);\n serviceNames.addAll(fakeApplication.services);\n }\n }\n serviceNames.remove(\"\");\n stepNumber = Math.max(fileStep + 1, stepNumber);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(\"Names: \" + serverNames.size() + \"/\" + applicationNames.size() + \"/\" + serviceNames.size());\n System.out.println(\"MaxSimult: \" + maxSimultaneousServers + \"/\" + maxSimultaneousApplications);\n System.out.println(\"MaxGen: \" + maxServerGeneration + \"/\" + maxApplicationGeneration);\n System.out.println(\"MaxSize: \" + maxServerSize + \"/\" + maxApplicationSize);\n }", "public static void main(String[] args) throws java.lang.Exception {\n double []averageTime = new double[3]; //double array to get average time\n MaxFlow m = new MaxFlow();\n Stopwatch stopwatch = new Stopwatch();\n\n getDataset();\n try{\n System.out.println(\"\\n\"+\"The maximum possible flow is \" + m.fordFulkerson(graph.getAddMatrix(), 0, graph.getNumOfNode()-1));\n for(int i =1; i<=3;i++){\n System.out.println(\"Time \"+i+\" : \"+stopwatch.elapsedTime());\n averageTime[i-1]= stopwatch.elapsedTime();\n }\n\n\n double a = averageTime[0]; //calculate the average time\n double b = averageTime[1];\n double c = averageTime[2];\n double average = (a+b+c)/3;\n System.out.println(\"\\nAverage Time: \"+average);\n\n graph.printArray();\n\n }catch (NullPointerException e){\n System.out.println(\"\");\n }\n }", "public static void main(String[] args) {\n\t\tUtility.dirPath = \"C:\\\\Users\\\\imSlappy\\\\workspace\\\\FeelingAnalysis\\\\Documents\\\\2_group_eng\";\n\t\tString sub[] = {\"dup\",\"bug\"};\n\t\tUtility.classLabel = sub;\n\t\tUtility.numdoc = 350;\n\t\tSetClassPath.read_path(Utility.dirPath);\n\t\tUtility.language = \"en\";\n\t\t\n\t\tUtility.stopWordHSEN = Fileprocess.FileHashSet(\"data/stopwordAndSpc_eng.txt\");\n\t\tUtility.dicen = new _dictionary();\n\t\tUtility.dicen.getDictionary(\"data/dicEngScore.txt\");\n\t\t\n\t\tUtility.vocabHM = new HashMap();\n\t\t// ================= completed initial main Program ==========================\n\n\t\tMainExampleNaive ob = new MainExampleNaive();\n\t\t\n\t\t// --------------------- Pre-process -----------------------\n\t\tob.word_arr = new HashSet [Utility.listFile.length][];\n\t\tob.wordSet = new ArrayList<String>();\n\t\tfor (int i = 0; i < Utility.listFile.length; i++) {\n\t\t\tob.word_arr[i]=new HashSet[Utility.listFile[i].length];\n\t\t\tfor (int j = 0; j < Utility.listFile[i].length; j++) {\n\t\t\t\tStringBuffer strDoc = Fileprocess.readFile(Utility.listFile[i][j]);\n\t\t\t\tob.word_arr[i][j]=ob.docTokenization(new String(strDoc));\n\t\t\t}\n\t\t\tob.checkBound(3, 10000);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"++ Total : \"+Utility.vocabHM.size()+\" words\");\n\t\tSystem.out.println(\"++ \"+Utility.vocabHM);\n\t\t\n\t\t// ---------------------- Selection ------------------------\n//\t\tInformationGain ig = new InformationGain(ob.word_arr.length*ob.word_arr[0].length , ob.wordSet,ob.word_arr);\n//\t\tArrayList<String> ban_word = ig.featureSelection(0.0); // selected out with IG = 0\n//\t\t//ob.banFeature(ban_word);\n//\t\tSystem.out.println(\"ban list[\"+ban_word.size()+\"] : \"+ban_word);\n//\t\t\n//\t\tSystem.out.println(\"-- After \"+Utility.vocabHM.size());\n//\t\tSystem.out.println(\"-- \"+Utility.vocabHM);\n\t\t\n\t\tob.setWordPosition();\n\t\t// ---------------------- Processing -----------------------\n\t\tNaiveBayes naive = new NaiveBayes();\n\t\tnaive.naiveTrain(true);\n\t\t\n\t\tint result = naive.naiveUsage(\"after cold reset of my pc (crash of xp) the favorites of firefox are destroyed and all settings are standard again! Where are firefox-favorites stored and the settings ? how to backup them rgularely? All other software on my pc still works properly ! even INternetExplorer\");\n\t\tSystem.out.println(\"\\nResult : \"+Utility.classLabel[result]);\n\t}", "@Override\n\tpublic void run() {\n\t\tfileName = \"out_\" + Program.getProgram().getFileName() + \"_\";\n\t\tint numAddStop = 0;\n\t\t//fileName = \"out_themida_\";\n\n\t\t//fileState.clearContentFile();\n\t\t//bkFile.clearContentFile();\n\t\toverallStartTime = System.currentTimeMillis();\n\t\tlong overallStartTemp = overallStartTime;\n\t\t// BE-PUM algorithm\n\t\tSystem.out.println(\"Starting On-the-fly Model Generation algorithm.\");\n\t\tprogram.getResultFileTemp().appendInLine('\\n' + program.getFileName() + '\\t');\n\t\t\n\t\t// Set up initial context\n\t\tX86TransitionRule rule = new X86TransitionRule();\n\t\tBPCFG cfg = Program.getProgram().getBPCFG();\n\t\tEnvironment env = new Environment();\n\t\t//env.getMemory().resetImportTable(program);\n\t\tAbsoluteAddress location = Program.getProgram().getEntryPoint();\n\t\tInstruction inst = Program.getProgram().getInstruction(location, env);\n\t\tList<BPPath> pathList = new ArrayList<BPPath>();\n\t\t\n\t\t// Insert start node\n\t\tBPVertex startNode = null;\n\t\tstartNode = new BPVertex(location, inst);\n\t\tstartNode.setType(0);\n\t\tcfg.insertVertex(startNode);\n\n\t\tBPState curState = null;\n\t\tBPPath path = null;\n\t\tcurState = new BPState(env, location, inst);\n\t\tpath = new BPPath(curState, new PathList(), new Formulas());\n\t\tpath.setCurrentState(curState);\n\t\tpathList.add(path);\n\n\t\t/*if (Program.getProgram().getFileName().equals(\"api_test_v2.3_lvl1.exe\") \n\t\t\t\t&& isRestored) {\n\t\t\tSystem.out.println(\"Restore State from File.\");\n\t\t\tFileProcess reFile = new FileProcess(\"data/data/restoreState.txt\");\n\t\t\tpathList = restoreState(reFile);\n\t\t\t// bkFile.clearContentFile();\n\t\t\tSystem.out.println(\"Finished restoring state!\");\n\t\t}*/\n\n\t\t// Update at first -----------------------------\n\t\tTIB.setBeUpdated(true);\n\t\tTIB.updateTIB(curState);\n\t\t// ---------------------------------------------\n\n\t\t// PHONG - 20150801 /////////////////////////////\n\t\t// Packer Detection via Header\n\t\tSystem.out.println(\"================PACKER DETECTION VIA HEADER ======================\");\n\t\tif (OTFModelGeneration.detectPacker)\n\t\t{\n\t\t\tprogram.getDetection().detectViaHeader(program);\n\t\t\tprogram.getDetection().setToLogFirst(program);\n\t\t}\n\t\tSystem.out.println(\"==================================================================\");\n\t\t/////////////////////////////////////////////////\n\t\t\n\t\tsynchronized (OTFThreadManager.getInstance()) {\n\t\t\ttry {\n\t\t\t\tOTFThreadManager.getInstance().check(this, pathList);\n\t\t\t\tOTFThreadManager.getInstance().wait();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// PHONG - 20150724\n\t\tSystem.out.println(\"================PACKER DETECTION VIA OTF======================\");\n\t\tprogram.getDetection().packedByTechniques();\n\t\tprogram.getDetection().packedByTechniquesFrequency();\n\t\tSystem.out.println(\"==============================================================\");\n\t}", "public static void main(String[] args) \n\t{\n\t\tlong startTime, stopTime;\n\t\t\n\t\tstartTime = System.nanoTime();\n\t\tPathFinder.solveMaze(\"tinyMaze.txt\", \"tinyMazeOutput.txt\");\n\t\tstopTime = System.nanoTime();\n\t\t\n\t\tSystem.out.println(\"Run-time for tinyMaze.txt: \" + (stopTime - startTime)/(Math.pow(10.0, 9)) + \" seconds\");\n\t\t\n\t\tstartTime = System.nanoTime();\n\t\t// test on 100X100 maze -- largest size that needs to fit within the time constraint\n\t\tPathFinder.solveMaze(\"randomMaze.txt\", \"randomMazeOutput.txt\");\n\t\tstopTime = System.nanoTime();\n\t\t\n\t\tSystem.out.println(\"Run-time for randomMaze.txt: \" + (stopTime - startTime)/(Math.pow(10.0, 9)) + \" seconds\");\n\t}", "static public void main(String[] args)\n {\n try {\n ParserModel parser = new ParserModel();\n\n Map<String, String> options = getOptions(args);\n\n // process received options\n \n if (hasRequiredOptionsMissing(options)) {\n throw new IllegalArgumentException(\n \"Please provide all required options: \" + String.join(\",\", requiredOptions)\n );\n }\n\n String duration = options.get(\"duration\");\n if (!isValidDuration(duration.toUpperCase())) {\n throw new IllegalArgumentException(\"Unknown duration: \" + duration);\n }\n\n String startDateStr = options.get(\"startDate\");\n LocalDateTime startDate = null;\n try {\n startDate = parser.prepareDateArgument(startDateStr);\n } catch (DateTimeParseException e) {\n throw new IllegalArgumentException(\n \"Expected date pattern: \" + ParserModel.DATE_PATTERN\n );\n }\n\n String thresholdStr = options.get(\"threshold\");\n int threshold;\n try {\n threshold = Integer.parseInt(thresholdStr);\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\n \"Expected int value for threshold, actual: \" + thresholdStr\n );\n }\n\n // take action based on processed options\n // if \"accesslog\" option is provided, also process log file\n if (options.containsKey(\"accesslog\")) {\n List<LogEntry> list = parser.parse(options.get(\"accesslog\"));\n parser.saveLogEntries(list);\n }\n \n duration = duration.toUpperCase();\n Map<String, Integer> result = parser.findAboveThresholdIPs(startDate, Duration.valueOf(duration), threshold);\n\n if (result.isEmpty()) {\n System.out.println(\"No above-threshold IPs for given arguments\");\n } else {\n result.keySet().forEach((ip) -> {\n System.out.println(ip);\n });\n\n parser.logBlockedIPs(result, startDate, Duration.valueOf(duration), threshold);\n }\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public static void main(String[] args) throws Exception {\n final DataModel data = new DataModel();\n GeoApiContext context = new GeoApiContext.Builder().apiKey(\"AIzaSyDWspiiu2xZwfxBCtt4_B9tcdHR-uEZYvY\").build();\n\n long[][] distanceMatrix=null ;\n Gson gson = new Gson();\n String lines = Files.readString(Paths.get(\"out.txt\"), Charset.defaultCharset());\n System.out.println(lines);\n distanceMatrix = gson.fromJson(lines.toString(),long[][].class);\n\n\n data.distanceMatrix = distanceMatrix;\n\n // Create Routing Index Manager\n RoutingIndexManager manager = new RoutingIndexManager(data.distanceMatrix.length, data.vehicleNumber, data.depot);\n\n // Create Routing Model.\n RoutingModel routing = new RoutingModel(manager);\n\n // Create and register a transit callback.\n final int transitCallbackIndex = routing.registerTransitCallback((long fromIndex, long toIndex) -> {\n // Convert from routing variable Index to user NodeIndex.\n int fromNode = manager.indexToNode(fromIndex);\n int toNode = manager.indexToNode(toIndex);\n return data.distanceMatrix[fromNode][toNode];\n });\n\n // Define cost of each arc.\n routing.setArcCostEvaluatorOfAllVehicles(transitCallbackIndex);\n\n // Add Distance constraint.\n routing.addDimension(transitCallbackIndex, 0, 1000000000, true, // start cumul to zero\n \"Distance\");\n RoutingDimension distanceDimension = routing.getMutableDimension(\"Distance\");\n distanceDimension.setGlobalSpanCostCoefficient(100);\n\n // Setting first solution heuristic.\n RoutingSearchParameters searchParameters = main.defaultRoutingSearchParameters().toBuilder()\n .setFirstSolutionStrategy(FirstSolutionStrategy.Value.GLOBAL_CHEAPEST_ARC).build();\n\n // Solve the problem.\n Assignment solution = routing.solveWithParameters(searchParameters);\n\n // Print solution on console.\n printSolution(data, routing, manager, solution);\n }", "public static void main(String[] args) throws Exception{\n\t\tfinal int source = 224;\n\t\tfinal int end = 6;\n\t\t//filereader/writer \n\t\tFile outputFile = new File(\"output.txt\");\n\t\tString inputFile = \"/Users/admin/Desktop/test_input_2.txt\";\n\t\tFileWriter writer = new FileWriter(outputFile);\n\t\tFileParser parser = new FileParser();\n\t\t//231 Hexagon array\n\t\tint[] lattice = parser.parseFile(inputFile);\n\t\t\n\t\t//array of nodes creating a 'map' of the hexagonal lattice\n\t\tMap map = new Map(lattice); //create map of only valid nodes\n\t\tDijkstras shortPath = new Dijkstras();\n\t\t\n\t\t\n\t\tArrayList<Integer> path = shortPath.dijkstra(map.map, source,end); //sort map\n\t\tint sum = 0;\n\t\t// + 2 because its base 0 and because its only 231 in length, not 233\n\t\tfor(int i = 0; i < path.size();i++){\n\t\t\twriter.write((path.get(i).intValue() + 2) + \" Value: \" + lattice[path.get(i)] + \"\\n\");\n\t\t\tsum+= lattice[path.get(i)];\n\t\t}\n\t\twriter.write(\"MINIMAL-COST PATH COSTS: \" + sum);\n\t\twriter.close();\n\t\tSystem.out.print(\"File is located at: \" + outputFile.getAbsolutePath());\n\t}", "public static void main(String[] args) throws IOException{\n\t\tBufferedReader a = new BufferedReader(new FileReader(\"files/10000R.txt\"));\n\t\t// to record the start time of the program\n\t\tlong startTime = System.nanoTime();\n\t\tSystem.out.println(\"Start Time\" +startTime);\n\t\t// to put input files into array\n\t\tint arraySize = Integer.parseInt(a.readLine());\n\t\tint[] inputArray = new int[arraySize];\n\t\tfor (int i= 0; i < arraySize; i++){\n\t\t\tinputArray[i]= Integer.parseInt(a.readLine());\n\t\t}\n\t\t// to do the merge sort\n\t\t\tmergeS(inputArray);\n\t\t\tprintArray(inputArray);\n\t\t\t\n\t\t\t// to record the end time\n\t\tlong endTime = System.nanoTime();\n\t\tSystem.out.println(\"End Time\" +endTime);\n\t\tlong estimatedTime = endTime-startTime;\n\t\tSystem.out.println(\"Estimated Time\" +estimatedTime);\n\t\t\n\t\t}", "public static void main(String[] args) throws Exception {\n\t\tfor(int i=200;i<=1200;i+=200){\n\t\t\tString inputPath=\"\";\n\t\t\t\n\t\t\t/*inputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-std-logSize\";\n\t\t\tSystem.out.println(\"Level:\"+i+\",std-LogSize:\");\n\t\t\tvalue(inputPath);*/\n\t\t\t/*inputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-origin\";\n\t\t\tSystem.out.println(\"origin:\");\n\t\t\tvalue(inputPath);*/\n\t\t\t\n\t\t\tinputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-mixedTime-test1\";\n\t\t\tSystem.out.println(\"level\"+i+\", mixedTime:\");\n\t\t\tvalue(inputPath);\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t\n\t\t\t/*inputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-std-0\";\n\t\t\tSystem.out.println(\"std-0:\");\n\t\t\tvalue(inputPath);\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tinputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-std\";\n\t\t\tSystem.out.println(\"Level:\"+i+\",std:\");\n\t\t\tvalue(inputPath);\n\t\t\t\n\t\t\tinputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-square\";\n\t\t\tSystem.out.println(\"Level:\"+i+\",square:\");\n\t\t\tvalue(inputPath);\n\t\t\t\n\t\t\tinputPath=\"/home/Hadoop/桌面/files/\"+i+\"/result-line\";\n\t\t\tSystem.out.println(\"Level:\"+i+\",line:\");\n\t\t\tvalue(inputPath);\n\t\t\t*/\n\t\t\t\n\t\t}\n \n }", "public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\tSystem.out.println(parseInputFile());\r\n\t\t\r\n\t}", "private void compute() {\n try {\n sc = new InputReader(new FileInputStream(\"./resources/trainandpeter\"));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(ex);\n }\n text = sc.readNext().toCharArray();\n n = text.length;\n pattern1 = sc.readNext();\n pattern2 = sc.readNext();\n buildDfa(pattern1.toCharArray());\n int patpos1 = search(0, n, true);\n int patpos2 = search(n - 1, -1, false);\n if (patpos1 == -1 && patpos2 == -1) {\n System.out.println(\"fantasy\");\n System.exit(0);\n }\n buildDfa(pattern2.toCharArray());\n int patpos3 = -1;\n if (patpos1 > -1) {\n patpos3 = search(patpos1 + pattern1.length(), n, true);\n }\n int patpos4 = -1;\n if (patpos2 > -1) {\n patpos4 = search(patpos2 - pattern1.length(), -1, false);\n }\n if (patpos3 == -1 && patpos4 == -1) {\n System.out.println(\"fantasy\");\n System.exit(0);\n }\n if (patpos1 > -1 && patpos2 > -1 && patpos3 > -1 && patpos4 > -1) {\n System.out.println(\"both\");\n System.exit(0);\n }\n if (patpos1 > -1 && patpos3 > -1) {\n System.out.println(\"forward\");\n System.exit(0);\n }\n if (patpos2 > -1 && patpos4 > -1) {\n System.out.println(\"backward\");\n System.exit(0);\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tString task = \"palsquare\"; //XXX change this\n\t\tString path = !TESTING ? task + \".in\"\n\t\t\t\t: System.getProperty(\"user.dir\") + File.separator + \"src\" + File.separator + \"test.in\";\n\t\tInputReader in = new InputReader(new FileInputStream(path));\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(task + \".out\")));\n\t\tsolve(in, out);\n\t\tout.close();\n\t}", "public static void main(String[] args) {\n String timestamp;\n TrafficSnapshotHolder counter = new TrafficSnapshotHolder();\n try (FileReader fr = new FileReader(\"data/traffic1.txt\");\n BufferedReader br = new BufferedReader(fr)) {\n while ((timestamp = br.readLine()) != null) {\n counter.add(extractInfo(timestamp));\n }\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n if(counter.isEmpty()){\n System.out.println(\"File at location is empty, please check file\");\n System.exit(0);\n }\n counter.processSnapshots();\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\t\n\t\t\n\t\tFenetre fenetre = new Fenetre();\n\t\ttry {\n\t\t\tindex.deserializeRoot();\n\t\t\thmw.deserializeHM();\n\t\t\thmwd.deserializeHM();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"pas d'index serialise \");\n\t\t\te.printStackTrace();\n\t\t\tTravailFichier.createIndexStemming(\"./corpus/\", index);\n\t\t\tMainForestier.hmw.setHM(TravailFichier.createIndexNumberDocs(\"./corpus/\"));\n\t\t\tMainForestier.hmwd.setHM(TravailFichier.createIndexDocs(\"./corpus/\").getMapDocs());\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tindex.serializeRoot();\n\t\thmw.serializeHM();\n\t\thmwd.serializeHM();\n\t\t\n\t\t/*double beginTime = System.currentTimeMillis();\n\t\tfor(int i = 0; i<10000; i++){\n\t\t\tindex.lookup(\"argentine\");\n\t\t}\n\t\tdouble endTime = System.currentTimeMillis();\n\t\tSystem.out.println(endTime - beginTime);*/\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args){\r\n try {\r\n AnalizadorSintactico asin = new AnalizadorSintactico(\r\n new AnalizadorLexico( new FileReader(args[0])));\r\n Object result = asin.parse().value;\r\n System.out.println(\"\\n*** Resultados finales ***\");\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "@Test\n public void test9MLog_Siebel_SingleRun() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IOException, IllegalAccessException {\n String logPath_base = \"/home/xiaohe/workspace/DATA/FakeData4TestingPerf/Pub_fake.log\";\n// Common.testLog_multiTimes(logPath_base, 5, true); //eager eval\n\n// Common.testLog_multiTimes(logPath_base, 1, false); //lazy eval\n\n// String logPath_base = \"/home/xiaohe/workspace/DATA/ldccComplete_MonpolyStyle\";\n\n String[] args = new String[]{\"./test/count/insert.sig\", \"./test/count/insert.fl\", logPath_base};\n Main.main(args);\n\n }", "protected void run() {\n\t\ttry {\n\t\t\tFileSet fileSet = targetModel.getFileSet();\n\t\t\tsetPhaseLength(phases.length);\n\t\t\tsetPhase(0);\n\t\t\tprintln(\"loading \" + fileSet.getCdt() + \" ... \");\n\t\t\ttry {\n\t\t\t\tparser.setParseQuotedStrings(fileSet.getParseQuotedStrings());\n\t\t\t\tparser.setResource(fileSet.getCdt());\n\t\t\t\tparser.setProgressTrackable(this);\n\t\t\t\tRectData tempTable = parser.loadIntoTable();\n\t\t\t\t\n\t\t\t\tif (loadProgress.getCanceled()) return;\n\t\t\t\tsetPhase(1);\n\t\t\t\tparseCDT(tempTable);\n\t\t\t} catch (LoadException e) {\n\t\t\t\tthrow e;\n\t\t\t} catch (Exception e) {\n\t\t\t\t// this should never happen!\n\t\t\t\tLogBuffer.println(\"TVModel.ResourceLoader.run() : while parsing cdt got error \" + e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new LoadException(\"Error Parsing CDT: \" + e, LoadException.CDTPARSE);\n\t\t\t}\n\t\t\tif (loadProgress.getCanceled()) return;\n\t\t\t\n\t\t\tsetPhase(2);\n\t\t\tif (targetModel.getArrayHeaderInfo().getIndex(\"AID\") != -1) {\n\t\t\t\tprintln(\"parsing atr\");\n\t\t\t\ttry {\n\t\t\t\t\tparser.setResource(fileSet.getAtr());\n\t\t\t\t\tparser.setProgressTrackable(this);\n\t\t\t\t\tRectData tempTable = parser.loadIntoTable();\n\t\t\t\t\tsetPhase(3);\n\t\t\t\t\tparseATR(tempTable);\n\t\t\t\t\ttargetModel.hashAIDs();\n\t\t\t\t\ttargetModel.hashATRs();\n\t\t\t\t\ttargetModel.aidFound(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tprintln(\"error parsing ATR: \" + e.getMessage());\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tprintln(\"ignoring array tree.\");\n\t\t\t\t\tsetHadProblem(true);\n\t\t\t\t\ttargetModel.aidFound(false);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttargetModel.aidFound(false);\n\t\t\t}\n\t\t\t\n\t\t\tif (loadProgress.getCanceled()) return;\n\t\t\tsetPhase(4);\n\t\t\tif (targetModel.getGeneHeaderInfo().getIndex(\"GID\") != -1) {\n\t\t\t\tprintln(\"parsing gtr\");\n\t\t\t\ttry {\n\t\t\t\t\tparser.setResource(fileSet.getGtr());\n\t\t\t\t\tparser.setProgressTrackable(this);\n\t\t\t\t\tRectData tempTable = parser.loadIntoTable();\n\t\t\t\t\tif (loadProgress.getCanceled()) return;\n\t\t\t\t\tsetPhase(5);\n\t\t\t\t\tparseGTR(tempTable);\n\t\t\t\t\ttargetModel.hashGIDs();\n\t\t\t\t\ttargetModel.hashGTRs();\n\t\t\t\t\ttargetModel.gidFound(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tprintln(\"error parsing GTR: \" + e.getMessage());\n\t\t\t\t\tprintln(\"ignoring gene tree.\");\n\t\t\t\t\tsetHadProblem(true);\n\t\t\t\t\ttargetModel.gidFound(false);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttargetModel.gidFound(false);\n\t\t\t}\n\t\t\tif (loadProgress.getCanceled()) return;\n\t\t\tsetPhase(6);\n\n\t\t\ttry {\n\t\t\t\tprintln(\"parsing jtv config file\");\n\t\t\t\tString xmlFile = targetModel.getFileSet().getJtv();\n\t\t\t\t\n\t\t\t\tXmlConfig documentConfig;\n\t\t\t\tif (xmlFile.startsWith(\"http:\")) {\n\t\t\t\t\tdocumentConfig = new XmlConfig(new URL(xmlFile), \"DocumentConfig\");\n\t\t\t\t} else {\n\t\t\t\t\tdocumentConfig = new XmlConfig(xmlFile, \"DocumentConfig\");\n\t\t\t\t}\n\t\t\t\ttargetModel.setDocumentConfig(documentConfig);\n\t\t\t} catch (Exception e) {\n\t\t\t\ttargetModel.setDocumentConfig(null);\n\t\t\t\tprintln(\"Got exception \" + e);\n\t\t\t\tsetHadProblem(true);\n\t\t\t}\n\t\t\tif (loadProgress.getCanceled()) return;\n\t\t\tsetPhase(7);\n\t\t\tif (getException() == null) {\n\t\t\t\t/*\t\n\t\t\t\tif (!fileLoader.getCompleted()) {\n\t\t\t\t\tthrow new LoadException(\"Parse not Completed\", LoadException.INTPARSE);\n\t\t\t\t}\n\t\t\t\t//System.out.println(\"f had no exceptoin set\");\n\t\t\t\t*/\n\t\t\t} else {\n\t\t\t\tthrow getException();\n\t\t\t}\n\t\t\ttargetModel.setLoaded(true);\n\t\t\t//\tActionEvent(this, 0, \"none\",0);\n\t\t} catch (java.lang.OutOfMemoryError ex) {\n\t\t\t\t\t\t\tJPanel temp = new JPanel();\n\t\t\t\t\t\t\ttemp. add(new JLabel(\"Out of memory, allocate more RAM\"));\n\t\t\t\t\t\t\ttemp. add(new JLabel(\"see Chapter 3 of Help->Documentation... for Out of Memory\"));\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(parent, temp);\n\t\t} catch (LoadException e) {\n\t\t\tsetException(e);\n\t\t\tprintln(\"error parsing File: \" + e.getMessage());\n\t\t\tprintln(\"parse cannot succeed. please fix.\");\n\t\t\tsetHadProblem(true);\n\t\t}\n\t\tsetFinished(true);\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"TraceA v1.04, 24.10.2015\");\r\n\t\t\r\n\t\tif (args.length < 2) {\r\n\t\t\tSystem.err.println (\"usage: TraceA <TDB-XML-File> <OSA-Log-File-Wildcard> ...\\n\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t};\r\n\t\t\r\n\t\tfinal File tdb = new File (args[0]);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tTdbProcessing.processTdb (tdb);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"Error in TDB-XML: '\" + e.getMessage() + \"', in file: \" + args[0]);\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t\t\r\n\r\n\t\ttry {\r\n\t\t\tfor (int i=1; i < args.length; i++) {\r\n\t\t\t\tFile argi0 = new File (args[i]);\r\n\t\t\t\tString s0 = argi0.getAbsolutePath();\r\n\t \t\t\tFile argi = new File (s0);\r\n\t\t\t\tString wildcard = argi.getName();\r\n\t\t\t\tFile logfiledir = argi.getParentFile();\r\n\t\t\t\tJFnPatternMatcher patternmatcher = new JFnPatternMatcher (wildcard);\r\n\t\t\t\tFile logfiles[] = logfiledir.listFiles(patternmatcher);\r\n\t\t\t\t// TODO: order of logfiles[] is undefined !!!\r\n\t\t\t\tfor (final File logfile : logfiles) {\r\n\t\t\t\t\tprocessLog(logfile);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tevaluate();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"Excption: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t\t\r\n \tSystem.out.println(\"ready.\\n\");\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) {\n\t\tString grid = Mission_Impossible.gen_grid();\n\t\tlong start = System.currentTimeMillis();\n\t\tMission_Impossible.solve(grid, \"BF\", false);\n\t\tSystem.out.println(\"Total Time\");\n\t\tSystem.out.println(System.currentTimeMillis() - start);\n\n\t}", "public static void main(String[] args) throws IOException {\r\n\t\tBufferedReader bf = new BufferedReader(new FileReader(\"entrada_polinomios\"));\r\n\t\t\r\n\t\ttry{\r\n\t\t\twhile(true){\r\n\t\t\t\t\r\n\t\t\t\tString aux1 = bf.readLine();\r\n\t\t\t\tint grado = Integer.parseInt(aux1);\r\n\t\t\t\tString aux2 = bf.readLine();\r\n\t\t\t\tint[] coeficientes = new int[grado + 1];\r\n\t\t\t\tString palabrasSeparadas[] = aux2.split(\" \");\r\n\t\t\t\tfor(int i = 0; i < grado + 1;i++){\r\n\t\t\t\t\tcoeficientes[i] = Integer.parseInt(palabrasSeparadas[i]);\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println(\"holiwi\");\r\n\t\t\t\tVector<Integer> v_aux = new Vector();\r\n\t\t\t\tString aux3 = bf.readLine();\r\n\t\t\t\t//System.out.println(aux3);\r\n\t\t\t\tString valores_a_evaluar[] = aux3.split(\" \");\r\n\t\t\t\tint valor = Integer.parseInt(valores_a_evaluar[0]);\r\n\t\t\t\tint i = 1;\r\n\t\t\t\twhile(valor != 0){\r\n\r\n\t\t\t\t\tv_aux.add(valor);\r\n\t\t\t\t\tvalor = Integer.parseInt(valores_a_evaluar[i]);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tint[] entrada = new int[1 + grado + 1 + v_aux.size()];\r\n\t\t\t\tentrada[0] = grado;\r\n\t\t\t\t//System.out.println(entrada.length + \",\" + coeficientes.length);\r\n\t\t\t\tfor(int j = 0; j < grado + 1; j++){\r\n\t\t\t\t\tentrada[j+1] = coeficientes[j];\r\n\t\t\t\t}\r\n\t\t\t\tfor(int j = 0; j < v_aux.size(); j++){\r\n\t\t\t\t\tentrada[1 + grado + 1 +j] = v_aux.get(j);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPolinomios a = new Polinomios();\r\n\t\t\t\ta.solve(entrada);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\r\n\t}", "public static void main(String[] args) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n System.setProperty(\"current.date\", dateFormat.format(new Date()));\n // set path\n if (args.length > 1) path = args[1];\n // лучше называть каталог с результатами осмысленно :)\n File cfgFile = new File(args[0]);\n PropertyConfigurator.configure(cfgFile.getAbsolutePath());\n \n File[] files = getFilesInDir(path);\n for (File file : files) {\n // среднее считать - за сколько поколений в среднем достигается максимальнй фитнес - проще в расчетах писать и пихать в файл\n try {\n read(file.getAbsolutePath());\n System.out.println(\"Stats: \" + stats.size());\n }catch (IOException ex) { log.info(ex); }\n }\n \n System.out.println(\"bestFitness: \" + bestFitness);\n System.out.println(\"bestFile : \" + bestFile);\n System.out.println(\"bestUrgent : \" + bestUrgent);\n \n for (Integer id : stats.keySet()) {\n Stat stat = stats.get(id);\n //System.out.println(stat);\n //System.out.println(id + \". SumFit: \" + stat.sumFit() + \". SumUrg: \" + stat.sumUrgent());\n //System.out.println(id + \". AvgFit: \" + stat.avgFit() + \". avgUrg: \" + stat.avgUrgent());\n log.info(stat.avgFit() + \" \" + stat.avgUrgent() + \" \" + stat.id());\n }\n }", "public static void main(String[] args) throws Exception {\n Options options = new Options();\n \n Option fileOpt = new Option(\"f\", \"file\", true, \"target spec file\");\n fileOpt.setRequired(false);\n options.addOption(fileOpt);\n \n Option coverOpt = new Option(\"c\", \"cover\", false, \"Set if the input is a coverability check.\");\n coverOpt.setRequired(false);\n options.addOption(coverOpt);\n \n Option boundOpt = new Option(\"b\", \"bound\", true, \"Set a bound on the absolute values of entries in k\");\n boundOpt.setRequired(false);\n options.addOption(boundOpt);\n \n Option minOpt = new Option(\"m\", \"min\", false, \"Set if minization should be used.\");\n minOpt.setRequired(false);\n options.addOption(minOpt); \n Option verbOpt = new Option(\"v\", \"verbose\", false, \"Set if more output is required.\");\n verbOpt.setRequired(false);\n options.addOption(verbOpt);\n \n CommandLineParser parserCmd = new DefaultParser();\n HelpFormatter formatter = new HelpFormatter();\n CommandLine cmd;\n \n try {\n cmd = parserCmd.parse(options, args);\n } catch (ParseException e) {\n System.out.println(e.getMessage());\n formatter.printHelp(\"Inequalizer\", options);\n System.exit(1);\n return;\n }\n if (cmd.hasOption(\"cover\")) {\n cover = true;\n }\n if (cmd.hasOption(\"min\")) {\n Formula.isOpt = true;\n }\n if (cmd.hasOption(\"verbose\")) {\n log.setLevel(Level.ALL);\n } else {\n log.setLevel(Level.OFF);\n }\n if (cmd.hasOption(\"bound\")) {\n isBounded = true;\n bound = Integer.parseInt(cmd.getOptionValue(\"bound\"));\n }\n if (cmd.hasOption(\"file\")) {\n String filePath = cmd.getOptionValue(\"file\");\n if (!filePath.endsWith(\"spec\")) {\n System.out.println(\"Unrecognized Petri Net format\");\n System.exit(0);\n return;\n }\n File modelfile = new File(filePath);\n \n String mcmtext = FileUtils.readFileToString(modelfile, \"UTF-8\");\n ANTLRInputStream mcminput = new ANTLRInputStream(mcmtext);\n PNLexer lexer = new PNLexer(mcminput);\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n PNParser parser = new PNParser(tokens);\n //System.out.println((parser.mcm()).getText());\n //System.out.println(parser.mcm());\n PetriNet.setNet(parser.pn().netz);\n } else {\n if(cmd.hasOption(\"verbose\"))\n {\n// log.setLevel(Level.OFF);\n// for (int i = 1; i < 100; i++) {\n setExample(7);\n// }\n// System.exit(0);\n }\n else formatter.printHelp(\"Inequalizer\", options);\n }\n \n log.info(PetriNet.getNet().toString());\n log.info(\"M0: \" + m0.toString() + \"\\n\");\n log.info(\"MF: \" + mF.toString() + \"\\n\");\n// System.out.println(\"#P: \"+PetriNet.getNet().getSize()+\" #T: \"+PetriNet.getNet().getTransitions().size());\n// int[] k={3,2};\n// Inequality in=new Inequality(k);\n// in.findC();\n// in.print();\n \nif (isBounded) phi = new Formula(bound, cover);\nelse phi =new Formula(cover);\n \n \n Inequality temp = phi.simplesolve();\n if (temp != null) {\n //System.out.println(\"1\");\n //System.exit(0);\n System.out.println(\"The formula for trivial invariants produced a result.\");\n temp.setCnotrel();\n for (PNTransition transition : PetriNet.getNet().getTransitions()) {\n if (temp.isRelevant(transition) && !temp.isTrivialStable(transition)) {\n System.err.println(\"The inequalite is not stable wrt: \" + transition.getName());\n }\n }\n } else {\n log.info(\"There is no trivial solution.\");\n if(quant) temp=phi.quantifiedsolve();\n else temp = Cegar();\n }\n if (temp != null) {\n System.out.println(cmd.getOptionValue(\"file\"));\n// System.out.println(\"The marking is not reachable, it is separated from M0 by the following inductive inequality:\");\n temp.print();\n } else {\n System.out.println(\"0\");\n// System.out.println(\"There is no inductive inequality.\");\n }\n \n }", "public void start() {\n try {\n long start = System.currentTimeMillis();\n readFile();\n result = wordStorage.getTopNWords(3);\n long end = System.currentTimeMillis();\n long timeTaken = ((end - start) / 1000);\n logger.info(\"time taken to run program: \" + timeTaken);\n display.displayTimeTaken(timeTaken);\n display.displayTopNWords(result);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws Exception {\n\t\tString v25message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v25|T|2.5\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\";\n\n\t\tString v23message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v23|T|2.3\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\";\n\n\t\t/*\n\t\t * The first (and probably better in most ways) technique is as follows. Use a model class\n\t\t * factory called the CanonicalModelClassFactory. This class forces a specific version of\n\t\t * HL7 to be used. Because HL7 v2.x is a backwards compatible standard, you can choose the\n\t\t * highest version you need to support, and the model classes will be compatible with\n\t\t * messages from previous versions.\n\t\t */\n\n\t\tHapiContext context = new DefaultHapiContext();\n\n\t\t// Create the MCF. We want all parsed messages to be for HL7 version 2.5,\n\t\t// despite what MSH-12 says.\n\t\tCanonicalModelClassFactory mcf = new CanonicalModelClassFactory(\"2.5\");\n\t\tcontext.setModelClassFactory(mcf);\n\n\t\t// Pass the MCF to the parser in its constructor\n\t\tPipeParser parser = context.getPipeParser();\n\n\t\t// The parser parses the v2.3 message to a \"v25\" structure\n\t\tca.uhn.hl7v2.model.v25.message.ORU_R01 msg = (ca.uhn.hl7v2.model.v25.message.ORU_R01) parser.parse(v23message);\n\n\t\t// 20169838-v23\n\t\tSystem.out.println(msg.getMSH().getMessageControlID().getValue());\n\n\t\t// The parser also parses the v2.5 message to a \"v25\" structure\n\t\tmsg = (ca.uhn.hl7v2.model.v25.message.ORU_R01) parser.parse(v25message);\n\n\t\t// 20169838-v25\n\t\tSystem.out.println(msg.getMSH().getMessageControlID().getValue());\n\n//\t\t/*\n//\t\t * The second technique is to use the Terser. The Terser allows you\n//\t\t * to access field values using a path-like notation. For more information\n//\t\t * on the Terser, see the example here:\n//\t\t * http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/ExampleUseTerser.html\n//\t\t */\n//\n//\t\t// This time we just use a normal ModelClassFactory, which means we will be\n//\t\t// using the standard version-specific model classes\n//\t\tcontext.setModelClassFactory(new DefaultModelClassFactory());\n//\n//\t\t// 20169838-v23\n//\t\tMessage v23Message = parser.parse(v23message);\n//\t\tTerser t23 = new Terser(v23Message);\n//\t\tSystem.out.println(t23.get(\"/MSH-10\"));\n//\n//\t\t// 20169838-v25\n//\t\tMessage v25Message = parser.parse(v25message);\n//\t\tTerser t25 = new Terser(v25Message);\n//\t\tSystem.out.println(t25.get(\"/MSH-10\"));\n//\n//\t\t/*\n//\t\t * Note that this second technique has one major drawback: Although\n//\t\t * message definitions are backwards compatible, some group names\n//\t\t * change between versions. If you are accessing a group within\n//\t\t * a complex message structure, this can cause issues.\n//\t\t *\n//\t\t * This is less of an issue for some message types where groups are\n//\t\t * not used much (e.g. ADT)\n//\t\t */\n//\n//\t\t// This works and prints \"Test Value\"\n//\t\tSystem.out.println(t23.get(\"/RESPONSE/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n//\n//\t\t// This fails...\n//\t\t// System.out.println(t25.get(\"/RESPONSE/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n//\n//\t\t// ...because this would be required to extract the OBX-5 value from a v2.5 message\n//\t\tSystem.out.println(t25.get(\"/PATIENT_RESULT/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n\n\t\t/*\n\t\t * Another technique which may occasionally be useful is to simply use\n\t\t * a \"Generic\" message structure. Generic message structures can\n\t\t * represent anything within an HL7 message, but they don't actually\n\t\t * model all of the intricacies of the structure within the message,\n\t\t * but rather just model all of the data in an unstructured way.\n\t\t */\n\n\t\t// Create a new context using a Generic Model Class Factory\n\t\tcontext = new DefaultHapiContext();\n\t\tcontext.setModelClassFactory(new GenericModelClassFactory());\n\n\t\tv25message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v25|T|2.5\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\\r\"\n\t\t\t\t+ \"NTE||Note for OBX(1)\\r\"\n\t\t\t\t+ \"OBX|2|ST|||Value number 2\";\n\n\t\t// The parser will always parse this as a \"GenericMessage\"\n\t\tGenericMessage message = (GenericMessage) context.getPipeParser().parse(v25message);\n\n\t\t/*\n\t\t * A generic message has a flat structure, so you can ask for any\n\t\t * field by only its segment name, not a complex path\n\t\t */\n\t\tTerser t = new Terser(message);\n\t\tSystem.out.println(t.get(\"/OBX-5\"));\n\t\t// Prints: Test Value\n\n\t\t/*\n\t\t * This technique isn't great for messages with complex structures. For\n\t\t * example, the second OBX in the message above is a part of the base structure\n\t\t * because GenericMessage has no groups.\n\t\t *\n\t\t * It can be accessed using a new segment name (OBX2 instead of OBX)\n\t\t * but this is error prone, so use with caution.\n\t\t */\n\t\tSystem.out.println(t.get(\"/OBX2-5\"));\n\t\t// Prints: Value number 2\n\n\t}", "public static void main(String[] args) throws Exception {\n long startTime = System.currentTimeMillis();\n PPIGraph task = new PPIGraph();\n\n task.parseOptions(args);\n task.openConnection(true, false, false);\n task.graph();\n task.closeConnection();\n System.out.println(\"Total elapsed time: \" + ((long) (System.currentTimeMillis() - startTime) / 1000) + \" s\");\n }", "public static void main(String[] args) {\n try {\n readHouseTxt();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n\n\n\n }", "public static void main(String[] args) throws IOException {\n List<String> instanceToRun = Arrays.asList(\"fnl4461-n44600\");\n //List<String> instanceToRun = Competition.INSTANCES;\n for (String instance : instanceToRun) {\n System.out.println(\"Running on \" + instance);\n String fname = String.format(\"resources/%s.txt\", instance);\n InputStream is = LOADER.getResourceAsStream(fname);\n\n TravelingThiefProblem problem = Util.readProblem(is);\n System.out.println(problem.numOfCities + \" \" + problem.numOfItems);\n problem.name = instance;\n int popSize = instance.charAt(0) == 'p' ? 10 : 100;\n int eliteSize = instance.charAt(0) == 'p' ? 3 : 20;\n int generations = instance.charAt(0) == 'p' ? 10 : 100;\n double evalProbability = problem.numOfItems > 34000 ? 10.0 / problem.numOfItems : 0.04;\n //Algorithm algorithm = new GeneticAlgorithm(popSize, eliteSize,0.02, 1, evalProbability);\n\n Algorithm algorithm = new AntColonyAlgorithm.Builder()\n .withHistoryCoefficient(0.1)\n .withHeuristicCoefficient(2.5)\n .withTotalAnts(40)\n .build();\n List<Solution> nds = algorithm.solve(problem);\n System.out.println(problem.name + \" \" + nds.size() + \" \" + Competition.numberOfSolutions(problem));\n File dir = new File(\"results\");\n Util.writeSolutions(\"results\", Competition.TEAM_NAME, problem, nds);\n }\n }", "public static void main(String[] args) throws Exception {\n\t\tString hex_body = \"7E 24 86 36 00 00 01 01 51 23 14 05 14 22 33 87 60 C6 11 40 57 59 0E 00 00 00 FF FB DF FF E5 41 30 00 52 00 00 00 00 63 07 03 03 5E 03 01 CC 00 26 3A 10 60 01 95 00 08 C4 1F 00 00 4E 00 10 00 2C 7E\";\n\t\tbyte[] data = HexUtil.hexToBytes(hex_body);\n\t\t\n\t\tPengAoDaPackage pkg = PengAoDaPackage.parse(data);\n\t\tbyte[] body = pkg.getBody();\n\t\t\n\t\tPengAoDaTimeGPSInfo gps = PengAoDaTimeGPSInfo.parse(body, 0);\n\t\tSystem.out.println(gps);\n\t}", "void run() throws Exception {\n is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n\n long s = System.currentTimeMillis();\n solve();\n out.flush();\n tr(System.currentTimeMillis() - s + \"ms\");\n }", "public static void main(String[] args) throws IOException {\n\t\tScanner input= new Scanner(new File(\"input.txt\"));\n\t\tFile analysis = new File(\"analysis.txt\");\n\t\tanalysis.createNewFile();\n\t\tFileWriter wrt = new FileWriter(\"analysis.txt\");\n\t\t\n\t\t\n\t\tString line =new String();\n\t\tString arg =new String();\n\t\t\n\t\twhile(input.hasNextLine()){\n\t\t\tChessList list = new ChessList();\n\t\t\t//pulls arguments from input.txt\n\t\t\tline=input.nextLine();\n\t\t\targ=input.nextLine();\n\t\t\t\n\t\t\tString[] data=line.split(\"\\\\s+\");\n\t\t\tString[] ar = arg.split(\"\\\\s+\");\n\t\t\t\n\t\t\tint xarg = Integer.parseInt(ar[0]);\n\t\t\tint yarg = Integer.parseInt(ar[1]);\n\t\t\tint size = Integer.parseInt(data[0]);\n\t\t\tfor(int i=1;i<data.length;i+=3){\n\t\t\t\tString name=data[i];\n\t\t\t\tint x=Integer.parseInt(data[i+1]);\n\t\t\t\tint y=Integer.parseInt(data[i+2]);\n\t\t\t\tNode temp=new Node(createPiece(name,x,y,size));\n\t\t\t\tlist.add(temp);\n\t\t\t}\n\t\t\t\t\n\t\t\t\t//checks validity and writes it into analysis.txt\n\t\t\t\tif (list.checkValid()==false){\n\t\t\t\t\twrt.write(\"Invalid\");\n\t\t\t\t}\n\t\t\t\t//if valid, finds the argument and returns an attack if possible\n\t\t\t\telse{\n\t\t\t\t\tif(list.checkSpace(xarg, yarg)==null){\n\t\t\t\t\t\twrt.write(\"- \");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\twrt.write(list.checkSpace(xarg, yarg).name()+\" \");\n\t\t\t\t\t}\n\t\t\t\t\tif(!list.checkAttack()){\n\t\t\t\t\t\twrt.write(\"-\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\twrt.write(list.firstAttack());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\twrt.write(\"\\n\");\n\t\t}\n\t\tinput.close();\n\t\twrt.close();\n\t}", "public static void main(String[] args) {\n\t\tif(args.length > 0) {\n\t\t\ttry {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(args[0]));\n\t\t\t\tint cmd = parseCommands(br.readLine());\n\t\t\t\tPrintStream ps = new PrintStream(\"Output Stats for input \" + args[0]);\n\t\t\t\tAllStats as = new AllStats();\n\t\t\t\tif(cmd == 3) {\n\t\t\t\t\tps.println(\"Given edges:\");\n\t\t\t\t\tArrayList<Edge> e = new ArrayList<Edge>();\n\t\t\t\t\t// Read in the lines and parse them to edges\n\t\t\t\t\tString s = br.readLine();\n\t\t\t\t\twhile(s != null){\n\t\t\t\t\t\tEdge temp = parseToEdge(s);\n\t\t\t\t\t\tif(temp == null){\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.add(temp);\n\t\t\t\t\t\tps.println(temp);\n\t\t\t\t\t\ts = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t\tps.println();\n\t\t\t\t\t// Make a grid with default initial edge and given sequence\n\t\t\t\t\tGrid grid = new Grid();\n\t\t\t\t\tgrid.addInitialEdge(new Edge(new Point(0, 1, 0), new Point(1, 0, 0)));\n\t\t\t\t\tgrid.addInitialSeq(e.toArray(new Edge[e.size()]));\n\t\t\t\t\t// Run algorithm and print results\n\t\t\t\t\tgrid.runAlgorithm(1);\n\t\t\t\t\tas.display(new DataStructure2(grid), e.size(), 1, ps);\n\t\t\t\t\tdrawFan(grid.lastFan(), \"Final fan for input \" + args[0]);\n\t\t\t\t\tdrawFan(grid.initialFan(), \"Initial fan for input \" + args[0]);\n\t\t\t\t\tdrawGridPart(grid, \"Grid for input: \" + args[0], new PreciseNumber(0), new PreciseNumber(0), 1);\n\t\t\t\t\t//drawGrid(grid, \"Grid for input: \" + args[0]);\n\t\t\t\t} else if(cmd > 0) {\n\t\t\t\t\tint distance = Integer.parseInt(br.readLine().trim());\n\t\t\t\t\tif(cmd == 1) {\n\t\t\t\t\t\tps.println(\"Exhaustive search for \"+ distance + \" divisions\");\n\t\t\t\t\t\tps.println();\n\t\t\t\t\t\texhaustiveSearch(distance, as, 1, ps);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tps.println(\"Random grid of \"+ distance + \" divisions\");\n\t\t\t\t\t\tps.println();\n\t\t\t\t\t\tGrid grid = solveRandGrid(distance, 1);\n\t\t\t\t\t\tas.display(new DataStructure2(grid), distance, 1, ps);\n\t\t\t\t\t\tdrawFan(grid.lastFan(), \"Final fan for input \" + args[0]);\n\t\t\t\t\t\tdrawFan(grid.initialFan(), \"Initial fan for input \" + args[0]);\n\t\t\t\t\t\tdrawGrid(grid, \"Grid for input: \" + args[0]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tps.close();\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (java.io.FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not valid\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Input error\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Invalid distance\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t// Start the interactive visualizer\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tDrawingPanel d = new DrawingPanel();\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\t\tSolver m = new Solver();\r\n\t\t\r\n\r\n\r\n\t\ttry {\r\n\t\t\tm.readData(\"data/Test_case_1.in\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\r\n\t\tint answer = m.solve(\"data/Test_case_1.in\");\r\n\r\n\t\tSystem.out.println(answer);\r\n\t\t\r\n\r\n\r\n\t}", "public static void main(String[] args) throws IOException, SQLException, InterruptedException {\r\n System.setOut(new PrintStream(new FileOutputStream(new File(\"log.txt\"))));\r\n\r\n if (Config.DB.NUCLEAR_OPTION) {\r\n String myDearestWarning = \"NUCLEAR_OPTION ENABLED... RUN FOR YOUR FUCKIN LIFE (i.e. ask yourself if you ABSOLUTELY need this)\\n\" +\r\n \"THIS OPTION SHOULD BE USED ONLY FOR TESTING. IT WILL DELETE THESE TABLES TO START A FRESH DEDUPLICATION/MERGE:\\n\" +\r\n \"articles, articles_authors, authors, authors_organizes, journals, merge_logs, organizes\\n\" +\r\n \"YOU HAVE 20 SECONDS TO THINK ABOUT YOUR LIFE...\";\r\n\r\n System.out.println(myDearestWarning);\r\n System.err.println(myDearestWarning);\r\n\r\n Thread.sleep(20000);\r\n }\r\n\r\n long start = System.nanoTime();\r\n\r\n IndexElastic.indexCrawledISIAndScopus();\r\n\r\n importAllScopus();\r\n\r\n IndexElastic.indexAvailableArticles();\r\n IndexElastic.indexAvailableJournals();\r\n IndexElastic.indexAvailableOrganizations();\r\n\r\n int maxIDOfISI = DataUtl.getMaxIDOfTable(Config.DB.INPUT, \"isi_documents\");\r\n if (Config.START_IMPORT_ISI_FROM > maxIDOfISI) {\r\n throw new RuntimeException(\"Config.START_IMPORT_ISI_FROM is larger than the current max ID of isi_documents.\");\r\n }\r\n\r\n for (int i = Config.START_IMPORT_ISI_FROM; i <= maxIDOfISI; ++i) {\r\n\r\n try {\r\n List<Deduplicator.Match> matches = Deduplicator.deduplicate(Article.ISI, i);\r\n\r\n if (matches.size() != 0) {\r\n writeLogToDB(matches);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n Sluginator.slugifyAll();\r\n\r\n long elapsed = System.nanoTime() - start;\r\n\r\n IndexElastic.cleanTemporaryIndices();\r\n\r\n System.out.println(\"All took \" + elapsed + \" nanoseconds\");\r\n }", "public static List<ExactCall> readExactLog(final BufferedReader reader, final List<Integer> startsToKeep, GenomeLocParser parser) throws IOException {\n if ( reader == null ) throw new IllegalArgumentException(\"reader cannot be null\");\n if ( startsToKeep == null ) throw new IllegalArgumentException(\"startsToKeep cannot be null\");\n if ( parser == null ) throw new IllegalArgumentException(\"GenomeLocParser cannot be null\");\n\n List<ExactCall> calls = new LinkedList<ExactCall>();\n\n // skip the header line\n reader.readLine();\n\n // skip the first \"type\" line\n reader.readLine();\n\n while (true) {\n final VariantContextBuilder builder = new VariantContextBuilder();\n final List<Allele> alleles = new ArrayList<Allele>();\n final List<Genotype> genotypes = new ArrayList<Genotype>();\n final double[] posteriors = new double[2];\n final double[] priors = MathUtils.normalizeFromLog10(new double[]{0.5, 0.5}, true);\n final List<Integer> mle = new ArrayList<Integer>();\n final Map<Allele, Double> log10pRefByAllele = new HashMap<Allele, Double>();\n long runtimeNano = -1;\n\n GenomeLoc currentLoc = null;\n while (true) {\n final String line = reader.readLine();\n if (line == null)\n return calls;\n\n final String[] parts = line.split(\"\\t\");\n final GenomeLoc lineLoc = parser.parseGenomeLoc(parts[0]);\n final String variable = parts[1];\n final String key = parts[2];\n final String value = parts[3];\n\n if (currentLoc == null)\n currentLoc = lineLoc;\n\n if (variable.equals(\"type\")) {\n if (startsToKeep.isEmpty() || startsToKeep.contains(currentLoc.getStart())) {\n builder.alleles(alleles);\n final int stop = currentLoc.getStart() + alleles.get(0).length() - 1;\n builder.chr(currentLoc.getContig()).start(currentLoc.getStart()).stop(stop);\n builder.genotypes(genotypes);\n final int[] mleInts = ArrayUtils.toPrimitive(mle.toArray(new Integer[]{}));\n final AFCalcResult result = new AFCalcResult(mleInts, 1, alleles, posteriors, priors, log10pRefByAllele);\n calls.add(new ExactCall(builder.make(), runtimeNano, result));\n }\n break;\n } else if (variable.equals(\"allele\")) {\n final boolean isRef = key.equals(\"0\");\n alleles.add(Allele.create(value, isRef));\n } else if (variable.equals(\"PL\")) {\n final GenotypeBuilder gb = new GenotypeBuilder(key);\n gb.PL(GenotypeLikelihoods.fromPLField(value).getAsPLs());\n genotypes.add(gb.make());\n } else if (variable.equals(\"log10PosteriorOfAFEq0\")) {\n posteriors[0] = Double.valueOf(value);\n } else if (variable.equals(\"log10PosteriorOfAFGt0\")) {\n posteriors[1] = Double.valueOf(value);\n } else if (variable.equals(\"MLE\")) {\n mle.add(Integer.valueOf(value));\n } else if (variable.equals(\"pRefByAllele\")) {\n final Allele a = Allele.create(key);\n log10pRefByAllele.put(a, Double.valueOf(value));\n } else if (variable.equals(\"runtime.nano\")) {\n runtimeNano = Long.valueOf(value);\n } else {\n // nothing to do\n }\n }\n }\n }", "public void parseFile(){\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"ElevatorConfig.txt\"));\n \n String fileRead;\n \n totalSimulatedTime = 1000;\n Integer.parseInt(br.readLine());\n simulatedSecondRate = 30;\n Integer.parseInt(br.readLine());\n \n for (int onFloor = 0; onFloor< 5; onFloor++){\n \n fileRead = br.readLine(); \n String[] tokenize = fileRead.split(\";\");\n for (int i = 0; i < tokenize.length; i++){\n String[] floorArrayContent = tokenize[i].split(\" \");\n \n int destinationFloor = Integer.parseInt(floorArrayContent[1]);\n int numPassengers = Integer.parseInt(floorArrayContent[0]);\n int timePeriod = Integer.parseInt(floorArrayContent[2]);\n passengerArrivals.get(onFloor).add(new PassengerArrival(numPassengers, destinationFloor, timePeriod));\n }\n }\n \n br.close();\n \n } catch(FileNotFoundException e){ \n System.out.println(e);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n\n }", "private static void solve() throws IOException {\n\n OptimizationGame.solve();\n SumOfSumOfDigits.solve();\n CrossTheStreet.solve();\n }", "public void parse(){\n\t\t//Read next line in content; timestamp++\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(instructionfile))) {\n\t\t String line;\n\t\t while ((line = br.readLine()) != null) {\n\t\t \t//divide the line by semicolons\n\t\t \tString[] lineParts = line.split(\";\");\n\t\t \tfor(String aPart: lineParts){\n\t\t\t \tSystem.out.println(\"Parser:\"+aPart);\n\n\t\t\t \t// process the partial line.\n\t\t\t \tString[] commands = parseNextInstruction(aPart);\n\t\t\t \tif(commands!=null){\n\t\t\t\t\t\t\n\t\t\t \t\t//For each instruction in line: TransactionManager.processOperation()\n\t\t\t \t\ttm.processOperation(commands, currentTimestamp);\n\t\t\t \t}\n\t\t \t}\n\t\t \t//Every new line, time stamp increases\n\t \t\tcurrentTimestamp++;\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n \t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n\n String fileEdgeList = \"../DataSource/PANCANsigEdgeList.csv\";\n String fileGtTrainingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.training.10.csv\";\n// String fileGtTestingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.testing.10.csv\";\n String fileGeTrainingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.GeM.4468tumors.training.10.csv\";\n String fileGeTestingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.GeM.4468tumors.testing.10.csv\";\n String fileInferDriver = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.InferDriver.10.withTumorID.csv\";\n// String fileDriverSGATable = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.DriverSGATable.10.csv\";\n \n \n DataReader dataObj = new DataReader(fileEdgeList, fileGtTrainingMatrix, fileGeTrainingMatrix);\n\n int reRun = 0;\n double T = 0.5;\n do {\n reRun += 1;\n\n EstimateParams paramObj = new EstimateParams(dataObj.edgeList, dataObj.driverSGAs, dataObj.targetDEGs, dataObj.driverSGATable, dataObj.targetDEGTable);\n InferDriverActivation actObj = new InferDriverActivation(paramObj.mapEdgeParam, paramObj.mapSGAParam,\n dataObj.targetDEGTable, dataObj.driverSGAs, dataObj.targetDEGs, dataObj.mapSgaDegs);\n\n\n actObj.thresholding(T);\n \n actObj.updateInferDriverTable( dataObj.driverSGATable);\n \n double change = actObj.compareMatrix(dataObj.driverSGATable);\n\n System.out.println(\"Current T is \" + T);\n System.out.println(\"Change is \" + change);\n System.out.println(\"This is the \" + reRun + \"th run\");\n if (change < 0.001 || T > 1) {\n System.out.println(\"Total times of run is \" + reRun + \". Final cut shreshold is \" + T);\n \n// dataObj.readInGtMatrix(fileGtTestingMatrix);\n dataObj.readInGeMatrix(fileGeTestingMatrix);\n InferDriverActivation actObjTesting = new InferDriverActivation(paramObj.mapEdgeParam, paramObj.mapSGAParam,\n dataObj.targetDEGTable, dataObj.driverSGAs, dataObj.targetDEGs, dataObj.mapSgaDegs);\n \n actObjTesting.outputInferActivation(fileInferDriver, dataObj.tumorNames);\n// dataObj.outputDriverSGATable(fileDriverSGATable); //output contains tumorName, since tumor name is defined in dataObj, so no need to pass in\n\n break; \n \n } else {\n dataObj.updateDriverSGATable(actObj.inferDriverTable);\n T += 0.05;\n \n }\n\n } while (true);\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tString magType = \"\";\n\t\tString resultsType = \"\";\n\t\tString timeZone = \"\";\n\t\tString pathToDataFile = \"\";\n\t\tString pathToResultsFile = \"\";\n\t\t\t\n\t\tString path = args[0];\n\t\t\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(path);\n\t\t\tScanner sc = new Scanner(fr);\n\t\t\t\n\t\t\tmagType = sc.nextLine();\n\t\t\tresultsType = sc.nextLine();\n\t\t\ttimeZone = sc.nextLine();\n\t\t\tpathToDataFile = sc.nextLine();\n\t\t\tpathToResultsFile = sc.nextLine();\n\t\t\t\n\t\t\tsc.close();\n\t\t\tfr.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\t\n\t\t// choose between different types of magnetometer\n\t\tswitch(magType) { \n\t\tcase \"-pa\": // Pos1-aero\n\t\t\tPOSaero pa = new POSaero(timeZone);\n\t\t\tpa.getDataFromFile(pathToDataFile);\n\t\t\tpa.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\t\n\t\t\tbreak;\n\t\tcase \"-pg\": // MMPOS \n\t\t\tMMPOS pg = new MMPOS(timeZone);\n\t\t\tpg.getDataFromFile(pathToDataFile);\n\t\t\tpg.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-m\": // Minimag\n\t\t\tMinimag m = new Minimag(timeZone);\n\t\t\tm.getDataFromFile(pathToDataFile);\n\t\t\tm.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-g\": // GEM\n\t\t\tGEM g = new GEM(timeZone);\n\t\t\tg.getDataFromFile(pathToDataFile);\n\t\t\tg.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-mq\": // quantum (MVS)\n\t\t\tMVS mvs = new MVS(timeZone);\n\t\t\tmvs.getDataFromFile(pathToDataFile);\n\t\t\tmvs.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-gs\": // Geoscan\n\t\t\tGeoscan gs = new Geoscan(timeZone);\n\t\t\tgs.getDataFromFile(pathToDataFile);\n\t\t\tgs.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Wrong type of magnetometer\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tAnalyse ana = new Analyse(20, 5);\r\n//\t\tArrayList<Map.Entry<Integer, Double>> current = ana.getNeighbor(\"\")\r\n//\t\tfor(int i = 0; i < ana.average.length; i++){\r\n//\t\t\tSystem.out.println(ana.average[i]);\r\n//\t\t}\r\n//\t\tfor (int i = 0; i < 5; i++) {\r\n//\t\t\tSystem.out.println(ana.heap.get(i).getValue());\r\n//\t\t}\r\n\t\tSystem.out.println(ana.similarity.size());\r\n//\t\tArrayList<Map.Entry<Integer, Double>> record = ana.getNeighbor(\"0155061224\");\r\n//\t\tSystem.out.println(ana.heap.size());\r\n//\t\tSystem.out.println(record.size());\r\n//\t\tfor(int i = 0; i < record.size(); i++){\r\n//\t\t\tSystem.out.println(record.get(i).getKey());\r\n//\t\t\tSystem.out.println(record.get(i).getValue());\r\n////\t\t\tSystem.out.println(ana.matrix[record.get(i).getKey()][ana.read.getItems().indexOf(3149)]);\r\n//\t\t}\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"score\" + ana.predictionBaseline(\"100\"));\r\n\t\tlong end = System.currentTimeMillis();\r\n\t\tSystem.out.println(end - start);\r\n//\t\tSystem.out.println(ana.predictionBaseline(\"0155061224\"));\r\n\t}", "private void test() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tBpmnModelInstance modelInstance = Bpmn.readModelFromFile(loadedFile);\n\t\tJsonEncoder jsonEncoder = new JsonEncoder(loadedFile.getName());\n\t\tBpmnBasicMetricsExtractor basicExtractor = new BpmnBasicMetricsExtractor(modelInstance, jsonEncoder);\n\t\tBpmnAdvancedMetricsExtractor advExtractor = new BpmnAdvancedMetricsExtractor(basicExtractor, jsonEncoder);\n\t\tlong loadTime = System.currentTimeMillis() - startTime;\n//\t\tSystem.out.println(\"Tempo load del file: \" + loadTime + \"ms\");\n\t\tbasicExtractor.runMetrics();\n\t\tlong basicTime = System.currentTimeMillis() - loadTime - startTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche di base: \" + basicTime + \"ms\");\n\t\tadvExtractor.runMetrics();\n\t\tlong advTime = System.currentTimeMillis() - basicTime - startTime - loadTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche avanzate: \" + advTime + \"ms\");\n\t\tjsonEncoder.exportJson();\n\t\tMySqlInterface db = new MySqlInterface();\n\t\tdb.connect();\n//\t\tdb.createTables(jsonEncoder);\n//\t\tdb.createAndInsertMetricsInfosTable();\n//\t\tdb.saveMetrics(jsonEncoder);\n//\t\tdb.closeConnection();\n\t}", "public static void main(String[] args) {\n\t\tPropertyManager.setPropertyFilePath(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/TextDigesterConfig.properties\");\n\t\t\n\t\tString text = MultilingImport.readText(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/multilingMss2015Training/body/text/\" + lang + \"/\" + docName);\n\n\t\t/* Process text document */\n\t\tLangENUM languageOfHTMLdoc = FlProcessor.getLanguage(text);\n\t\t\n\t\tTDDocument TDdoc = FlProcessor.generateDocumentFromFreeText(text, null, languageOfHTMLdoc);\n\n\t\t// Store GATE document\n\t\tWriter out = null;\n\t\ttry {\n\t\t\tout = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/\" + lang + \"_\" + docName.replace(\".txt\", \"_GATE.xml\")), \"UTF-8\"));\n\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tout.write(TDdoc.getGATEdoc().toXml());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tout.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\ttry {\n\t\t\tLexRankSummarizer lexRank = new LexRankSummarizer(languageOfHTMLdoc, SentenceSimilarityENUM.cosineTFIDF, false, 0.01);\n\t\t\tMap<Annotation, Double> sortedSentences = lexRank.sortSentences(TDdoc);\n\t\t\t\n\t\t\tList<Annotation> sentListOrderedByRelevance = new ArrayList<Annotation>();\n\t\t\tfor(Entry<Annotation, Double> sentence : sortedSentences.entrySet()) {\n\t\t\t\tlogger.info(\"Score: \" + sentence.getValue() + \" - '\" + GtUtils.getTextOfAnnotation(sentence.getKey(), TDdoc.getGATEdoc()) + \"'\");\n\t\t\t\tsentListOrderedByRelevance.add(sentence.getKey());\n\t\t\t}\n\t\t\t\n\t\t\tlogger.info(\"Summary max 100 tokens: \");\n\t\t\tList<Annotation> summarySentences = GtUtils.orderAnnotations(sentListOrderedByRelevance, TDdoc.getGATEdoc(), 100);\n\t\t\tfor(Annotation ann : summarySentences) {\n\t\t\t\tlogger.info(GtUtils.getTextOfAnnotation(ann, TDdoc.getGATEdoc()));\n\t\t\t}\n\t\t} catch (TextDigesterException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t*/\n\t}", "public static void main(String[] args) {\n Path filePath = Paths.get(\"log.txt\");\n\n unique(filePath);\n getPostRatio(filePath);\n\n\n }" ]
[ "0.60559464", "0.6018329", "0.596444", "0.5948753", "0.5917568", "0.5899849", "0.5855357", "0.5846092", "0.58263123", "0.5811143", "0.57724494", "0.5765423", "0.57605314", "0.5735043", "0.5704295", "0.57036316", "0.57021576", "0.5642784", "0.5607331", "0.56063354", "0.55864364", "0.55714715", "0.5546274", "0.5533616", "0.55313724", "0.55252963", "0.5524608", "0.5504868", "0.5501432", "0.5469576", "0.5465871", "0.5462688", "0.5440638", "0.5437278", "0.5436513", "0.54327136", "0.54194564", "0.5419116", "0.54176116", "0.54147476", "0.5405637", "0.54030234", "0.5400367", "0.5393074", "0.5384026", "0.5379127", "0.53722376", "0.53704417", "0.53702295", "0.5365682", "0.53492486", "0.53436744", "0.5339335", "0.53389996", "0.5330174", "0.53187186", "0.5317477", "0.5316257", "0.53139365", "0.5312794", "0.5305206", "0.5288215", "0.52865535", "0.5277367", "0.52769995", "0.5272543", "0.52665156", "0.52586204", "0.52577174", "0.5250039", "0.524772", "0.5245515", "0.52427846", "0.5241041", "0.52410275", "0.5240814", "0.5240362", "0.5240046", "0.5237116", "0.5232377", "0.5230265", "0.5224825", "0.522268", "0.52225477", "0.5221954", "0.5220066", "0.5215265", "0.5213726", "0.5213295", "0.52122223", "0.5200389", "0.51961917", "0.5196173", "0.51957273", "0.5190257", "0.51866585", "0.5184132", "0.5179743", "0.51727724", "0.5166088" ]
0.62374544
0
TODO Autogenerated method stub
public static void main(String[] args) { ShapeFactory sf = new ShapeFactory(); Shape value = sf.createShape("Rectangle"); value.draw(); Shape value1 = sf.createShape("Circle"); value1.draw(); Shape value2 = sf.createShape("Square"); value2.draw(); }
{ "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